2025-06-02 20:25:19 +08:00
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<div class="titleBox">
|
|
|
|
|
<PageTitle title="预警管理"> </PageTitle>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 表格 -->
|
|
|
|
|
<div ref="searchBox">
|
|
|
|
|
<Search :searchArr="searchConfiger" @submit="onSearch" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tabBox">
|
2026-01-28 11:18:47 +08:00
|
|
|
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
|
|
|
|
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
|
|
|
|
|
@chooseData="chooseData">
|
2025-06-02 20:25:19 +08:00
|
|
|
<template #yjTp="{ row }">
|
|
|
|
|
<div class="phone">
|
|
|
|
|
<el-image v-if="row.tp" :src="urlImg + row.yjTp" fit="cover" lazy />
|
2026-03-19 20:06:24 +08:00
|
|
|
<el-image v-else :src="row.yjLx=='1'?default_male:car" fit="cover" lazy />
|
2025-06-02 20:25:19 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template #yjLx="{ row }">
|
|
|
|
|
<dict-tag :options="D_BZ_YJLX" :value="row.yjLx" :tag="false" />
|
|
|
|
|
</template>
|
2026-01-28 17:29:13 +08:00
|
|
|
<template #gzyfx="{ row }">
|
|
|
|
|
<dict-tag :options="D_BZ_GZYFX" :value="row.gzyfx" :tag="false" />
|
|
|
|
|
</template>
|
2025-06-02 20:25:19 +08:00
|
|
|
|
|
|
|
|
<!-- 操作 -->
|
|
|
|
|
<template #controls="{ row }">
|
|
|
|
|
<el-link type="primary" @click="addEdit('detail', row)">详情</el-link>
|
|
|
|
|
</template>
|
|
|
|
|
</MyTable>
|
2026-01-28 11:18:47 +08:00
|
|
|
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
|
|
|
|
|
...pageData.pageConfiger,
|
|
|
|
|
total: pageData.total
|
|
|
|
|
}"></Pages>
|
2025-06-02 20:25:19 +08:00
|
|
|
</div>
|
|
|
|
|
<!-- 编辑详情 -->
|
|
|
|
|
<!-- 编辑详情 -->
|
2026-01-28 17:29:13 +08:00
|
|
|
<EditAddForm ref="detailDiloag" :dict="{ D_BZ_YJLX, D_BZ_YJJB, D_BZ_GZYFX }" />
|
2025-06-02 20:25:19 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import PageTitle from "@/components/aboutTable/PageTitle.vue";
|
|
|
|
|
import MyTable from "@/components/aboutTable/MyTable.vue";
|
|
|
|
|
import Pages from "@/components/aboutTable/Pages.vue";
|
|
|
|
|
import EditAddForm from "./components/editAddForm.vue";
|
|
|
|
|
import Search from "@/components/aboutTable/Search.vue";
|
2026-01-28 11:18:47 +08:00
|
|
|
import { jczgetPageList, selectJczFullList } from "@/api/mosty-jcz.js";
|
2025-06-02 20:25:19 +08:00
|
|
|
import { reactive, ref, onMounted, getCurrentInstance, watch } from "vue";
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
const urlImg = "/mosty-api/mosty-base/minio/image/download/";
|
2026-01-28 17:29:13 +08:00
|
|
|
const { D_BZ_YJLX, D_BZ_YJJB, D_BZ_GZYFX } = proxy.$dict("D_BZ_YJLX", "D_BZ_YJJB", "D_BZ_GZYFX");
|
2026-01-28 11:18:47 +08:00
|
|
|
const jczList = ref()
|
2026-03-19 20:06:24 +08:00
|
|
|
const default_male = require('@/assets/images/default_male.png')
|
|
|
|
|
const car = require('@/assets/images/car.png')
|
|
|
|
|
|
2025-06-02 20:25:19 +08:00
|
|
|
const searchConfiger = ref([
|
2026-01-28 17:29:13 +08:00
|
|
|
{
|
|
|
|
|
label: "感知源编号",
|
|
|
|
|
prop: "yjGzyid",
|
|
|
|
|
placeholder: "感知源编号",
|
|
|
|
|
showType: "input",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "所属检查站",
|
|
|
|
|
prop: "jczid",
|
|
|
|
|
placeholder: "所属检查站",
|
|
|
|
|
showType: "select",
|
|
|
|
|
options: {}
|
|
|
|
|
},
|
2025-06-02 20:25:19 +08:00
|
|
|
{
|
|
|
|
|
label: "预警类型",
|
|
|
|
|
prop: "yjLx",
|
|
|
|
|
placeholder: "预警类型",
|
|
|
|
|
showType: "select",
|
|
|
|
|
options: D_BZ_YJLX
|
2026-01-28 17:29:13 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "感知源方向",
|
|
|
|
|
prop: "gzyfx",
|
|
|
|
|
placeholder: "感知源方向",
|
2026-01-28 11:18:47 +08:00
|
|
|
showType: "select",
|
2026-01-28 17:29:13 +08:00
|
|
|
options: D_BZ_GZYFX
|
2025-06-02 20:25:19 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "发生时间",
|
|
|
|
|
prop: "startTime",
|
|
|
|
|
placeholder: "发生时间",
|
|
|
|
|
showType: "datetimerange"
|
|
|
|
|
}
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
const detailDiloag = ref();
|
|
|
|
|
const pageData = reactive({
|
|
|
|
|
tableData: [], //表格数据
|
|
|
|
|
keyCount: 0,
|
|
|
|
|
tableConfiger: {
|
|
|
|
|
rowHieght: 61,
|
|
|
|
|
showSelectType: "null",
|
|
|
|
|
loading: false
|
|
|
|
|
},
|
|
|
|
|
total: 0,
|
|
|
|
|
pageConfiger: {
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
pageCurrent: 1
|
|
|
|
|
}, //分页
|
|
|
|
|
controlsWidth: 250, //操作栏宽度
|
|
|
|
|
tableColumn: [
|
|
|
|
|
{ label: "预警图片", prop: "yjTp", showSolt: true },
|
2026-01-28 17:29:13 +08:00
|
|
|
{ label: "所属检查站", prop: "jczmc" },
|
2025-06-02 20:25:19 +08:00
|
|
|
{ label: "感知源名称", prop: "yjGzymc" },
|
2026-01-28 17:29:13 +08:00
|
|
|
{ label: "感知源编号", prop: "yjGzyid" },
|
2025-06-02 20:25:19 +08:00
|
|
|
{ label: "预警时间", prop: "yjSj" },
|
|
|
|
|
{ label: "预警人员", prop: "yjRyxm" },
|
2026-01-28 17:29:13 +08:00
|
|
|
{ label: "预警标签", prop: "yjbq" },
|
2025-06-02 20:25:19 +08:00
|
|
|
{ label: "预警车牌号", prop: "yjClcph" },
|
2026-01-28 17:29:13 +08:00
|
|
|
{ label: "预警类型", prop: "yjLx", showSolt: true },
|
|
|
|
|
{ label: "方向", prop: "gzyfx", showSolt: true },
|
2025-06-02 20:25:19 +08:00
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
tabHeightFn();
|
2026-01-28 17:29:13 +08:00
|
|
|
getselectJczFullList()
|
2025-06-02 20:25:19 +08:00
|
|
|
});
|
|
|
|
|
//查询条件
|
|
|
|
|
const queryCondition = ref({});
|
|
|
|
|
// 获取数据
|
|
|
|
|
const getjczgetXfllList = () => {
|
|
|
|
|
pageData.tableConfiger.loading = true;
|
|
|
|
|
const promes = { ...queryCondition.value, ...pageData.pageConfiger };
|
|
|
|
|
jczgetPageList(promes)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
pageData.tableData = res.records;
|
|
|
|
|
pageData.total = res.total;
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
pageData.tableConfiger.loading = false;
|
|
|
|
|
});
|
|
|
|
|
};
|
2026-01-28 11:18:47 +08:00
|
|
|
|
|
|
|
|
// 获取检查站数据
|
|
|
|
|
|
|
|
|
|
const getselectJczFullList = () => {
|
|
|
|
|
selectJczFullList().then((res) => {
|
|
|
|
|
jczList.value = res.map(item => ({
|
|
|
|
|
label: item.jczmc,
|
|
|
|
|
value: item.id
|
|
|
|
|
}))
|
|
|
|
|
searchConfiger.value[1].options = jczList.value
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-02 20:25:19 +08:00
|
|
|
getjczgetXfllList();
|
|
|
|
|
// 搜索
|
|
|
|
|
const onSearch = (val) => {
|
2025-07-21 17:47:27 +08:00
|
|
|
console.log(val);
|
|
|
|
|
const startTime = {
|
2026-01-28 11:18:47 +08:00
|
|
|
...val,
|
|
|
|
|
startTime: val.startTime ? val.startTime[0] : "",
|
|
|
|
|
endTime: val.startTime ? val.startTime[1] : ""
|
2025-07-21 17:47:27 +08:00
|
|
|
}
|
|
|
|
|
|
2026-01-28 11:18:47 +08:00
|
|
|
queryCondition.value = { ...queryCondition.value, ...startTime };
|
2025-06-02 20:25:19 +08:00
|
|
|
getjczgetXfllList();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const changeNo = (val) => {
|
|
|
|
|
pageData.pageConfiger.pageNum = val;
|
|
|
|
|
};
|
|
|
|
|
const changeSize = (val) => {
|
|
|
|
|
pageData.pageConfiger.pageSize = val;
|
|
|
|
|
};
|
|
|
|
|
// 新增
|
|
|
|
|
const addEdit = (type, row) => {
|
|
|
|
|
detailDiloag.value.init(type, row);
|
|
|
|
|
};
|
|
|
|
|
const searchBox = ref(null);
|
|
|
|
|
// 表格高度计算
|
|
|
|
|
const tabHeightFn = () => {
|
|
|
|
|
pageData.tableHeight =
|
|
|
|
|
window.innerHeight - searchBox.value.offsetHeight - 280;
|
|
|
|
|
window.onresize = function () {
|
|
|
|
|
tabHeightFn();
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.el-loading-mask {
|
|
|
|
|
background: rgba(0, 0, 0, 0.5) !important;
|
|
|
|
|
}
|
|
|
|
|
</style>
|