feat: 搜索条件更新
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="titleBox">
|
<div class="titleBox">
|
||||||
|
|
||||||
<PageTitle title="预警列表">
|
<PageTitle title="人像预警">
|
||||||
<el-button type="success" @click="openSearch">
|
<el-button type="success" @click="openSearch">
|
||||||
<Search style="width: 1em; height: 1em; margin-right: 8px" />
|
<Search style="width: 1em; height: 1em; margin-right: 8px" />
|
||||||
<span style="vertical-align: middle" v-if="!search">搜索</span>
|
<span style="vertical-align: middle" v-if="!search">搜索</span>
|
||||||
@ -13,11 +13,11 @@
|
|||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<div ref="searchBox" class="searchBox" v-if="search">
|
<div ref="searchBox" class="searchBox" v-if="search">
|
||||||
<el-form :model="listQuery" label-width="auto" :inline="true" ref="searchArr">
|
<el-form :model="listQuery" label-width="auto" :inline="true" ref="searchArr">
|
||||||
<el-form-item label="布控类型" prop="yjlx">
|
<!-- <el-form-item label="布控类型" prop="yjlx">
|
||||||
<el-select v-model="listQuery.yjlx" placeholder="请选择预警类型">
|
<el-select v-model="listQuery.yjlx" placeholder="请选择预警类型">
|
||||||
<el-option v-for="item in D_BZ_YJLX" :key="item.value" :label="item.label" :value="item.value" />
|
<el-option v-for="item in D_BZ_YJLX" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item label="布控人员" prop="yjRyxm ">
|
<el-form-item label="布控人员" prop="yjRyxm ">
|
||||||
<el-select clearable v-model="listQuery.yjRyxm" filterable remote reserve-keyword placeholder="请输入布控人员"
|
<el-select clearable v-model="listQuery.yjRyxm" filterable remote reserve-keyword placeholder="请输入布控人员"
|
||||||
:remote-method="remoteMethod" :loading="loading" style="width: 240px">
|
:remote-method="remoteMethod" :loading="loading" style="width: 240px">
|
||||||
@ -36,17 +36,10 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<div class="tabBox" :style="{ height: (pageData.tableHeight + 40) + 'px' }">
|
<div class="tabBox" :style="{ height: (pageData.tableHeight + 40) + 'px', paddingTop: '10px' }">
|
||||||
<el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-click="handleClick"
|
<div style="padding:0 10px;"> <el-button type="primary" @click="exportExcel">导出</el-button></div>
|
||||||
style="position: relative;z-index: 1;">
|
<LocalWarning :maxHeight="search ? (pageData.tableHeight - 200) : (pageData.tableHeight - 150)"
|
||||||
<el-tab-pane label="本地预警" name="local">
|
ref="localWarningRef" :dict="{ D_GSXT_YJXX_CZZT, D_BZ_YJJB, D_BZ_YJLYXT }" :search="search" />
|
||||||
<div style="padding:0 10px;"> <el-button type="primary" @click="exportExcel">导出</el-button></div>
|
|
||||||
<LocalWarning :maxHeight="search ? (pageData.tableHeight - 200) : (pageData.tableHeight - 200)"
|
|
||||||
ref="localWarningRef" :dict="{ D_GSXT_YJXX_CZZT, D_BZ_YJJB, D_BZ_YJLYXT }" :search="search"/>
|
|
||||||
<!-- pageData.tableHeight-125 -->
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="区厅预警" name="district">区厅预警</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog v-model="showDc" title="导出预警" width="80%" align-center>
|
<el-dialog v-model="showDc" title="导出预警" width="80%" align-center>
|
||||||
@ -112,7 +105,7 @@ import FileSaver from "file-saver";
|
|||||||
import emitter from "@/utils/eventBus.js";
|
import emitter from "@/utils/eventBus.js";
|
||||||
import * as XLSX from "xlsx";
|
import * as XLSX from "xlsx";
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const { D_BZ_YJLX, D_GSXT_YJXX_CZZT, D_BZ_YJJB, D_BZ_YJLYXT } = proxy.$dict("D_BZ_YJLX", "D_GSXT_YJXX_CZZT", "D_BZ_YJJB", "D_BZ_YJLYXT")
|
const { D_GSXT_YJXX_CZZT, D_BZ_YJJB, D_BZ_YJLYXT } = proxy.$dict("D_GSXT_YJXX_CZZT", "D_BZ_YJJB", "D_BZ_YJLYXT")
|
||||||
const searchBox = ref(); //搜索框
|
const searchBox = ref(); //搜索框
|
||||||
const shortcuts = [
|
const shortcuts = [
|
||||||
{
|
{
|
||||||
@ -182,14 +175,16 @@ const addFromRefs = ref(null)
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tabHeightFn();
|
tabHeightFn();
|
||||||
emitter.on('openAddFrom', (val) => {
|
emitter.on('openAddFrom', (val) => {
|
||||||
console.log( addFromRefs.value);
|
console.log(addFromRefs.value);
|
||||||
if(addFromRefs.value) {
|
if (addFromRefs.value) {
|
||||||
addFromRefs.value.init('add', val)
|
addFromRefs.value.init('add', val)
|
||||||
}
|
}
|
||||||
// addFromRefs.value.init('add', val)
|
// addFromRefs.value.init('add', val)
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
const listQuery = ref({})
|
const listQuery = ref({
|
||||||
|
yjlx: '1', // 1.人员预警
|
||||||
|
})
|
||||||
const opentions = ref([])
|
const opentions = ref([])
|
||||||
const localWarningRef = ref(null);
|
const localWarningRef = ref(null);
|
||||||
// 搜索
|
// 搜索
|
||||||
@ -243,7 +238,7 @@ const tabHeightFn = () => {
|
|||||||
} else {
|
} else {
|
||||||
pageData.tableHeight = window.innerHeight - 250;
|
pageData.tableHeight = window.innerHeight - 250;
|
||||||
}
|
}
|
||||||
window.onresize = function () {
|
window.onresize = function() {
|
||||||
tabHeightFn();
|
tabHeightFn();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="titleBox">
|
<div class="titleBox">
|
||||||
|
|
||||||
<PageTitle title="预警列表">
|
<PageTitle title="车辆预警">
|
||||||
<el-button type="success" @click="openSearch">
|
<el-button type="success" @click="openSearch">
|
||||||
<Search style="width: 1em; height: 1em; margin-right: 8px" />
|
<Search style="width: 1em; height: 1em; margin-right: 8px" />
|
||||||
<span style="vertical-align: middle" v-if="!search">搜索</span>
|
<span style="vertical-align: middle" v-if="!search">搜索</span>
|
||||||
@ -13,11 +13,11 @@
|
|||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<div ref="searchBox" class="searchBox" v-if="search">
|
<div ref="searchBox" class="searchBox" v-if="search">
|
||||||
<el-form :model="listQuery" label-width="auto" :inline="true" ref="searchArr">
|
<el-form :model="listQuery" label-width="auto" :inline="true" ref="searchArr">
|
||||||
<el-form-item label="布控类型" prop="yjlx">
|
<!-- <el-form-item label="布控类型" prop="yjlx">
|
||||||
<el-select v-model="listQuery.yjlx" placeholder="请选择预警类型">
|
<el-select v-model="listQuery.yjlx" placeholder="请选择预警类型">
|
||||||
<el-option v-for="item in D_BZ_YJLX" :key="item.value" :label="item.label" :value="item.value" />
|
<el-option v-for="item in D_BZ_YJLX" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item label="布控人员" prop="yjRyxm ">
|
<el-form-item label="布控人员" prop="yjRyxm ">
|
||||||
<el-select clearable v-model="listQuery.yjRyxm" filterable remote reserve-keyword placeholder="请输入布控人员"
|
<el-select clearable v-model="listQuery.yjRyxm" filterable remote reserve-keyword placeholder="请输入布控人员"
|
||||||
:remote-method="remoteMethod" :loading="loading" style="width: 240px">
|
:remote-method="remoteMethod" :loading="loading" style="width: 240px">
|
||||||
@ -36,17 +36,10 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<div class="tabBox" :style="{ height: (pageData.tableHeight + 40) + 'px' }">
|
<div class="tabBox" :style="{ height: (pageData.tableHeight + 40) + 'px', paddingTop: '10px' }">
|
||||||
<el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-click="handleClick"
|
<div style="padding:0 10px;"> <el-button type="primary" @click="exportExcel">导出</el-button></div>
|
||||||
style="position: relative;z-index: 1;">
|
<LocalWarning :maxHeight="search ? (pageData.tableHeight - 200) : (pageData.tableHeight - 150)"
|
||||||
<el-tab-pane label="本地预警" name="local">
|
ref="localWarningRef" :dict="{ D_GSXT_YJXX_CZZT, D_BZ_YJJB, D_BZ_YJLYXT }" :search="search" />
|
||||||
<div style="padding:0 10px;"> <el-button type="primary" @click="exportExcel">导出</el-button></div>
|
|
||||||
<LocalWarning :maxHeight="search ? (pageData.tableHeight - 200) : (pageData.tableHeight - 200)"
|
|
||||||
ref="localWarningRef" :dict="{ D_GSXT_YJXX_CZZT, D_BZ_YJJB, D_BZ_YJLYXT }" :search="search"/>
|
|
||||||
<!-- pageData.tableHeight-125 -->
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="区厅预警" name="district">区厅预警</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog v-model="showDc" title="导出预警" width="80%" align-center>
|
<el-dialog v-model="showDc" title="导出预警" width="80%" align-center>
|
||||||
@ -112,7 +105,7 @@ import FileSaver from "file-saver";
|
|||||||
import emitter from "@/utils/eventBus.js";
|
import emitter from "@/utils/eventBus.js";
|
||||||
import * as XLSX from "xlsx";
|
import * as XLSX from "xlsx";
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const { D_BZ_YJLX, D_GSXT_YJXX_CZZT, D_BZ_YJJB, D_BZ_YJLYXT } = proxy.$dict("D_BZ_YJLX", "D_GSXT_YJXX_CZZT", "D_BZ_YJJB", "D_BZ_YJLYXT")
|
const { D_GSXT_YJXX_CZZT, D_BZ_YJJB, D_BZ_YJLYXT } = proxy.$dict("D_GSXT_YJXX_CZZT", "D_BZ_YJJB", "D_BZ_YJLYXT")
|
||||||
const searchBox = ref(); //搜索框
|
const searchBox = ref(); //搜索框
|
||||||
const shortcuts = [
|
const shortcuts = [
|
||||||
{
|
{
|
||||||
@ -182,14 +175,16 @@ const addFromRefs = ref(null)
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tabHeightFn();
|
tabHeightFn();
|
||||||
emitter.on('openAddFrom', (val) => {
|
emitter.on('openAddFrom', (val) => {
|
||||||
console.log( addFromRefs.value);
|
console.log(addFromRefs.value);
|
||||||
if(addFromRefs.value) {
|
if (addFromRefs.value) {
|
||||||
addFromRefs.value.init('add', val)
|
addFromRefs.value.init('add', val)
|
||||||
}
|
}
|
||||||
// addFromRefs.value.init('add', val)
|
// addFromRefs.value.init('add', val)
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
const listQuery = ref({})
|
const listQuery = ref({
|
||||||
|
yjlx: '2', // 2.车辆预警
|
||||||
|
})
|
||||||
const opentions = ref([])
|
const opentions = ref([])
|
||||||
const localWarningRef = ref(null);
|
const localWarningRef = ref(null);
|
||||||
// 搜索
|
// 搜索
|
||||||
@ -243,7 +238,7 @@ const tabHeightFn = () => {
|
|||||||
} else {
|
} else {
|
||||||
pageData.tableHeight = window.innerHeight - 250;
|
pageData.tableHeight = window.innerHeight - 250;
|
||||||
}
|
}
|
||||||
window.onresize = function () {
|
window.onresize = function() {
|
||||||
tabHeightFn();
|
tabHeightFn();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user