更新布控

This commit is contained in:
2026-01-28 16:40:47 +08:00
parent 0e5a9c710d
commit 2635c76e79
8 changed files with 425 additions and 994 deletions

View File

@ -29,7 +29,7 @@ import ControlWarning from "@/views/backOfficeSystem/fourColorManage/warningCont
import RegionalControl from "@/views/backOfficeSystem/fourColorManage/warningControl/regionalControl/index.vue" import RegionalControl from "@/views/backOfficeSystem/fourColorManage/warningControl/regionalControl/index.vue"
import { ref } from "vue"; import { ref } from "vue";
const butList=ref(["预警整合","七类重点","身份预警","行为预警","组合预警","人像预警","车辆预警","布控预警","区域预警"]) const butList=ref(["预警整合","七类重点","身份预警","行为预警","组合预警","人像预警","车辆预警","布控预警","区域预警"])
const qh = ref('人像预警') const qh = ref('区域预警')
const add = (flag) => { const add = (flag) => {
qh.value = flag qh.value = flag
} }

View File

@ -1,7 +1,5 @@
<template> <template>
<div> <div>
<!-- 搜索 --> <!-- 搜索 -->
<div ref="searchBox" class="mt10"> <div ref="searchBox" class="mt10">
<Searchs :searchArr="searchConfiger" @submit="onSearch" @reset="reset" :key="pageData.keyCount"> <Searchs :searchArr="searchConfiger" @submit="onSearch" @reset="reset" :key="pageData.keyCount">
@ -17,17 +15,23 @@
<PageTitle :malginLeft="10" :height="35" backgroundColor="#ffff" :marginBottom="5" :marginTop="5"> <PageTitle :malginLeft="10" :height="35" backgroundColor="#ffff" :marginBottom="5" :marginTop="5">
<template #left> <template #left>
<el-button type="primary" @click="exportExl" size="small">导出</el-button> <el-button type="primary" @click="exportExl" size="small">导出</el-button>
<el-button type="primary" size="small" @click="handleQs">签收</el-button>
</template> </template>
</PageTitle> </PageTitle>
<!-- 表格 --> <!-- 表格 -->
<div class="tabBox tabBox_zdy" :style="{ height: (pageData.tableHeight + 40) + 'px' }"> <div class="tabBox tabBox_zdy" :style="{ height: (pageData.tableHeight + 40) + 'px' }">
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight" <MyTable
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth" expand :tableData="pageData.tableData"
@chooseData="handleChooseData"> :tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight"
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
expand
@chooseData="handleChooseData"
>
<template #expand="{ props }"> <template #expand="{ props }">
<div class="expand-content" style="max-width: 100%"> <Items :row="props || {}" :dict="dict" />
<Items :row="props || {}" :dict="dict" />
</div>
</template> </template>
<template #yjJb="{ row }"> <template #yjJb="{ row }">
<DictTag :value="row.yjJb" :tag="false" :color="bqYs(row.yjJb)" :options="D_GS_SSYJ" /> <DictTag :value="row.yjJb" :tag="false" :color="bqYs(row.yjJb)" :options="D_GS_SSYJ" />
@ -296,6 +300,23 @@ const exportExl = () => {
exportExlByObj(titleObj, data, '预警布控') exportExlByObj(titleObj, data, '预警布控')
} }
const handleQs = () => {
if (selectRows.value?.length === 0) return proxy.$message({ type: "warning", message: "请选择要签收的预警" });
let wqs = selectRows.value.filter(item => item.czzt == '01');
if (wqs.length == 0) return proxy.$message({ type: "warning", message: "数据都已签收,请选择未签收的数据" });
let yqs = selectRows.value.filter(item => item.czzt == '02');
let texy = yqs.length > 0 ? `${yqs.length}条已签收预警数据,确认要签收${wqs.length}条未签收预警数据吗?` : '确认要签收所有预警数据吗?'
proxy.$confirm(texy, "警告", { type: "warning" }).then(() => {
let ids = wqs.map(item => item.id)
qcckPost({ids}, '/mosty-gsxt/tbYjxx/batchQs').then(() => {
proxy.$message({ type: "success", message: "成功" });
getList();
}).catch(() => {
proxy.$message({ type: "error", message: "失败" });
});
}).catch(() => { });
}
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@ -15,6 +15,7 @@
<PageTitle :malginLeft="10" :height="35" backgroundColor="#ffff" :marginBottom="5" :marginTop="5"> <PageTitle :malginLeft="10" :height="35" backgroundColor="#ffff" :marginBottom="5" :marginTop="5">
<template #left> <template #left>
<el-button type="primary" @click="exportExl" size="small">导出</el-button> <el-button type="primary" @click="exportExl" size="small">导出</el-button>
<el-button type="primary" size="small" @click="handleQs">签收</el-button>
</template> </template>
</PageTitle> </PageTitle>
<!-- 表格 --> <!-- 表格 -->
@ -25,6 +26,9 @@
<template #xsd="{ row }"> <template #xsd="{ row }">
{{ `${row.xsd}%` }} {{ `${row.xsd}%` }}
</template> </template>
<template #czzt="{ row }">
<DictTag :value="row.czzt" :options="D_GSXT_YJXX_CZZT" />
</template>
<template #yjJb="{ row }"> <template #yjJb="{ row }">
<DictTag :value="row.yjJb" :tag="false" :color="bqYs(row.yjJb)" :options="D_BZ_YJJB" /> <DictTag :value="row.yjJb" :tag="false" :color="bqYs(row.yjJb)" :options="D_BZ_YJJB" />
</template> </template>
@ -39,8 +43,7 @@
<template #controls="{ row }"> <template #controls="{ row }">
<el-link type="warning" @click="pushAssess(row)">全息档案</el-link> <el-link type="warning" @click="pushAssess(row)">全息档案</el-link>
<el-link type="success" @click="handleQsFk(row, '签收')" v-if="row.czzt == '01' && permission_sfqs">签收</el-link> <el-link type="success" @click="handleQsFk(row, '签收')" v-if="row.czzt == '01' && permission_sfqs">签收</el-link>
<el-link type="success" @click="handleQsFk(row, '反馈')" <el-link type="success" @click="handleQsFk(row, '反馈')" v-else-if="row.czzt == '02' && permission_sfqs">反馈</el-link>
v-else-if="row.czzt == '02' && permission_sfqs">反馈</el-link>
<el-link type="primary" @click="openAddModel(row)">详情</el-link> <el-link type="primary" @click="openAddModel(row)">详情</el-link>
</template> </template>
</MyTable> </MyTable>
@ -133,6 +136,7 @@ const pageData = reactive({
tableColumn: [ tableColumn: [
{ label: "预警人姓名", prop: "yjRyxm" }, { label: "预警人姓名", prop: "yjRyxm" },
{ label: "相似度", prop: "xsd", showSolt: true }, { label: "相似度", prop: "xsd", showSolt: true },
{ label: "处置状态", prop: "czzt", showSolt: true },
{ label: "预警时间", prop: "yjSj", width: 200 }, { label: "预警时间", prop: "yjSj", width: 200 },
{ label: "预警标签", prop: "yjbqmc" }, { label: "预警标签", prop: "yjbqmc" },
{ label: "身份证号", prop: "yjRysfzh", width: 200 }, { label: "身份证号", prop: "yjRysfzh", width: 200 },
@ -318,7 +322,6 @@ const handleChooseData = (val) => {
selectRows.value = val selectRows.value = val
} }
const exportExl = () => { const exportExl = () => {
const titleObj = { const titleObj = {
yjRyxm: "姓名", yjRyxm: "姓名",
yjRysfzh: "身份证号", yjRysfzh: "身份证号",
@ -348,6 +351,23 @@ const exportExl = () => {
} }
const handleQs = () => {
if (selectRows.value?.length === 0) return proxy.$message({ type: "warning", message: "请选择要签收的预警" });
let wqs = selectRows.value.filter(item => item.czzt == '01');
if (wqs.length == 0) return proxy.$message({ type: "warning", message: "数据都已签收,请选择未签收的数据" });
let yqs = selectRows.value.filter(item => item.czzt == '02');
let texy = yqs.length > 0 ? `${yqs.length}条已签收预警数据,确认要签收${wqs.length}条未签收预警数据吗?` : '确认要签收所有预警数据吗?'
proxy.$confirm(texy, "警告", { type: "warning" }).then(() => {
let ids = wqs.map(item => item.id)
qcckPost({ids}, '/mosty-gsxt/tbYjxx/batchQs').then(() => {
proxy.$message({ type: "success", message: "成功" });
getList();
}).catch(() => {
proxy.$message({ type: "error", message: "失败" });
});
}).catch(() => { });
}
</script> </script>
<style> <style>

View File

@ -11,14 +11,14 @@
<FormMessage :formList="formData" v-model="listQuery" ref="elform"> <FormMessage :formList="formData" v-model="listQuery" ref="elform">
<template #yjTp> <template #yjTp>
<template v-if="!listQuery.yjTp || listQuery.yjTp.includes('baidu')"> <template v-if="!listQuery.yjTp || listQuery.yjTp.includes('baidu')">
<img src="@/assets/images/car.png" width="80" height="100" v-if="listQuery.yjlx == 2" /> <img src="@/assets/images/car.png" width="80" height="100" v-if="listQuery.yjLx == 2" />
<img src="@/assets/images/default_male.png" width="80" height="100" v-else /> <img src="@/assets/images/default_male.png" width="80" height="100" v-else />
</template> </template>
<el-image v-else style="width: 80px; height:120px" :src="listQuery.yjTp" :preview-src-list="[listQuery.yjTp]" <el-image v-else style="width: 80px; height:120px" :src="listQuery.yjTp" :preview-src-list="[listQuery.yjTp]"
show-progress> show-progress>
<template #error> <template #error>
<div class="image-slot error"> <div class="image-slot error">
<img src="@/assets/images/car.png" width="80" height="100" v-if="listQuery.yjlx == 2" /> <img src="@/assets/images/car.png" width="80" height="100" v-if="listQuery.yjLx == 2" />
<img src="@/assets/images/default_male.png" width="80" height="100" v-else /> <img src="@/assets/images/default_male.png" width="80" height="100" v-else />
</div> </div>
</template> </template>

View File

@ -11,14 +11,13 @@
<FormMessage :formList="formData" v-model="listQuery" ref="elform"> <FormMessage :formList="formData" v-model="listQuery" ref="elform">
<template #yjTp> <template #yjTp>
<template v-if="!listQuery.yjTp || listQuery.yjTp.includes('baidu')"> <template v-if="!listQuery.yjTp || listQuery.yjTp.includes('baidu')">
<img src="@/assets/images/car.png" width="80" height="100" v-if="listQuery.yjlx == 2" /> <img src="@/assets/images/car.png" width="80" height="100" v-if="listQuery.yjLx == 2" />
<img src="@/assets/images/default_male.png" width="80" height="100" v-else /> <img src="@/assets/images/default_male.png" width="80" height="100" v-else />
</template> </template>
<el-image v-else style="width: 80px; height:120px" :src="listQuery.yjTp" :preview-src-list="[listQuery.yjTp]" <el-image v-else style="width: 80px; height:120px" :src="listQuery.yjTp" :preview-src-list="[listQuery.yjTp]" show-progress>
show-progress>
<template #error> <template #error>
<div class="image-slot error"> <div class="image-slot error">
<img src="@/assets/images/car.png" width="80" height="100" v-if="listQuery.yjlx == 2" /> <img src="@/assets/images/car.png" width="80" height="100" v-if="listQuery.yjLx == 2" />
<img src="@/assets/images/default_male.png" width="80" height="100" v-else /> <img src="@/assets/images/default_male.png" width="80" height="100" v-else />
</div> </div>
</template> </template>

View File

@ -1,324 +0,0 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title">组合标签管理{{ title }} </span>
<div>
<el-button
type="primary"
size="small"
:loading="loading"
@click="submit"
>保存</el-button
>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="form_cnt">
<FormMessage
v-model="listQuery"
:formList="formData"
ref="elform"
:rules="rules"
>
<!-- 身份标签细类 -->
<template #sfbqIdList>
<el-button @click="openDialog('01')">选择</el-button>
<div class="boxlist">
<MyTable
:tableData="tableDate.sfbqIdList"
:tableColumn="tableDate.tableColumn"
:tableHeight="tableDate.tableHeight"
:key="tableDate.keyCount"
:tableConfiger="tableDate.tableConfiger"
:controlsWidth="tableDate.controlsWidth"
>
<template #bqLx="{ row }">
<DictTag
:value="row.bqLx"
:tag="false"
:options="props.dic.D_GS_BQ_LX"
/>
</template>
<template #bqLb="{ row }">
<DictTag
:value="row.bqLb"
:tag="false"
:options="props.dic.D_GS_BQ_LB"
/>
</template>
<template #bqYs="{ row }">
<DictTag
:value="row.bqYs"
:tag="false"
:options="props.dic.D_GS_SSYJ"
/>
</template>
<template #bqDj="{ row }">
<DictTag
:tag="false"
:value="row.bqDj"
:options="props.dic.D_GS_BQ_DJ"
/>
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-link
type="danger"
@click="delDictItem(row.id, '身份标签细类')"
>删除</el-link
>
</template>
</MyTable>
</div>
</template>
<!-- 行为标签细类 -->
<template #xwbqIdList>
<el-button @click="openDialog('02')">选择</el-button>
<div class="boxlist">
<MyTable
:tableData="tableDate.xwbqIdList"
:tableColumn="tableDate.tableColumn"
:tableHeight="tableDate.tableHeight"
:key="tableDate.keyCount"
:tableConfiger="tableDate.tableConfiger"
:controlsWidth="tableDate.controlsWidth"
>
<template #bqLx="{ row }">
<DictTag
:value="row.bqLx"
:tag="false"
:options="props.dic.D_GS_BQ_LX"
/>
</template>
<template #bqLb="{ row }">
<DictTag
:value="row.bqLb"
:tag="false"
:options="props.dic.D_GS_BQ_LB"
/>
</template>
<template #bqYs="{ row }">
<DictTag
:value="row.bqYs"
:tag="false"
:options="props.dic.D_GS_SSYJ"
/>
</template>
<template #bqDj="{ row }">
<DictTag
:tag="false"
:value="row.bqDj"
:options="props.dic.D_GS_BQ_DJ"
/>
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-link
type="danger"
@click="delDictItem(row.id, '行为标签细类')"
>删除</el-link
>
</template>
</MyTable>
</div>
</template>
</FormMessage>
</div>
<!-- 列表弹窗 -->
<DialogList
:Single="false"
:roleIds="roleIds"
v-if="chooseShow"
:dic="props.dic"
@chooseDate="chooseDate"
:titleValue="chooseTitle"
v-model="chooseShow"
:bqLx="chooseType"
bqDl="02"
></DialogList>
</div>
</template>
<script setup>
import MyTable from "@/components/aboutTable/MyTable.vue";
import DialogList from "@/views/backOfficeSystem/fourColorManage/components/dialogList.vue";
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
import {
ref,
defineExpose,
defineProps,
reactive,
defineEmits,
getCurrentInstance
} from "vue";
const emit = defineEmits(["updateDate"]);
const { proxy } = getCurrentInstance();
const props = defineProps({
dic: Object
});
const roleIds = ref([]); //角色id
const chooseType = ref("01"); //选择弹窗类型
const chooseShow = ref(false); //选择弹窗
const chooseTitle = ref(""); //选择弹窗
const dialogForm = ref(false); //弹窗
const formData = reactive([
{ label: "组合标签名称", prop: "bqMc", type: "input" },
{ label: "组合标签代码", prop: "bqDm", type: "input" },
{
label: "标签等级",
prop: "bqDj",
type: "select",
options: props.dic.D_GS_BQ_DJ
},
{
label: "标签颜色",
prop: "bqYs",
type: "select",
options: props.dic.D_GS_SSYJ
},
{ label: "组合标签分值", prop: "bqFz", type: "input" },
{ label: "组合标签说明", prop: "bqSm", type: "input" },
{ label: "身份标签细类", prop: "sfbqIdList", type: "slot", width: "100%" },
{ label: "行为标签细类", prop: "xwbqIdList", type: "slot", width: "100%" }
]);
const rules = reactive({
bqMc: [{ required: true, message: "请输入组合标签名称", trigger: "blur" }],
bqDm: [{ required: true, message: "请输入组合标签代码", trigger: "blur" }],
zhbqjf: [{ required: true, message: "请输入组合标签积分", trigger: "blur" }],
sfbqIdList: [
{ required: true, message: "请选择身份标签细类", trigger: "change" }
],
xwbqIdList: [
{ required: true, message: "请选择行为标签细类", trigger: "change" }
]
});
const tableDate = reactive({
sfbqIdList: [], //表格数据
xwbqIdList: [], //表格数据
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "null",
loading: false
},
total: 0,
tableHeight: 225,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
}, //分页
controlsWidth: 90, //操作栏宽度
tableColumn: [
{ label: "标签名称", prop: "bqMc", showOverflowTooltip: true },
{ label: "标签代码", prop: "bqDm" },
{ label: "标签大类名称", prop: "bqDlMc" },
{ label: "标签类型", prop: "bqLx", showSolt: true },
{ label: "标签类别", prop: "bqLb", showSolt: true },
{ label: "标签颜色", prop: "bqYs", showSolt: true },
{ label: "标签等级", prop: "bqDj", showSolt: true }
]
});
const listQuery = ref({}); //表单
const loading = ref(false);
const elform = ref();
const title = ref("");
// 初始化数据
const init = (type, row) => {
dialogForm.value = true;
title.value = type == "add" ? "新增" : "编辑";
if (row) getDataById(row.id);
};
// 根据id查询详情
const getDataById = (id) => {
qcckGet({}, "/mosty-gsxt/tbGsxtBqzh/selectVoById/" + id).then((res) => {
listQuery.value = res;
tableDate.sfbqIdList = res.sfbqList;
listQuery.value.sfbqIdList = res.sfbqList.map((item) => item.id);
tableDate.xwbqIdList = res.xwbqList;
listQuery.value.xwbqIdList = res.xwbqList.map((item) => item.id);
tableDate.keyCount++;
});
};
// 提交
const submit = () => {
elform.value.submit((data) => {
let url =
title.value == "新增"
? "/mosty-gsxt/tbGsxtBqzh/save"
: "/mosty-gsxt/tbGsxtBqzh/update";
let params = { ...data };
loading.value = true;
qcckPost(params, url)
.then((res) => {
proxy.$message({ type: "success", message: title.value + "成功" });
emit("updateDate");
loading.value = false;
close();
})
.catch(() => {
loading.value = false;
});
});
};
// 打开弹窗
const openDialog = (type) => {
chooseShow.value = true;
chooseType.value = type;
chooseTitle.value = type == "01" ? "选择身份标签细类" : "选择行为标签细类";
roleIds.value =
type == "01"
? tableDate.sfbqIdList.map((item) => item.id)
: tableDate.xwbqIdList.map((item) => item.id);
};
// 选择数据
const chooseDate = (data) => {
if (chooseType.value == "01") {
tableDate.sfbqIdList = data;
listQuery.value.sfbqIdList = tableDate.sfbqIdList.map((item) => item.id);
} else {
tableDate.xwbqIdList = data;
listQuery.value.xwbqIdList = tableDate.xwbqIdList.map((item) => item.id);
}
};
// 删除
const delDictItem = (id, type) => {
switch (type) {
case "身份标签细类":
tableDate.sfbqIdList = tableDate.sfbqIdList.filter(
(item) => item.id !== id
);
listQuery.value.sfbqIdList = tableDate.sfbqIdList.map((item) => item.id);
break;
case "行为标签细类":
tableDate.xwbqIdList = tableDate.xwbqIdList.filter(
(item) => item.id !== id
);
listQuery.value.xwbqIdList = tableDate.xwbqIdList.map((item) => item.id);
break;
}
};
// 关闭
const close = () => {
listQuery.value = {};
tableDate.sfbqIdList = [];
tableDate.xwbqIdList = [];
dialogForm.value = false;
loading.value = false;
};
defineExpose({ init });
</script>
<style lang="scss" scoped>
@import "~@/assets/css/layout.scss";
@import "~@/assets/css/element-plus.scss";
.boxlist {
width: 99%;
height: 225px;
margin-top: 10px;
overflow: hidden;
}
</style>

View File

@ -1,376 +0,0 @@
<template>
<div>
<!-- 表格 -->
<div class="tabBox tabBox_zdy" :style="{ height: maxHeight + 130 + 'px' }">
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="maxHeight + 'px'"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
:expand="true" @chooseData="handleChooseData" :rowClassName="getRowClassName">
<template #expand="{ props }">
<div class="expand-content" style="max-width: 100%">
<Items :row="props" :dict="dict" />
</div>
</template>
<template #yjTp="{ row }">
<template v-if="!row.yjTp || row.yjTp.includes('baidu')">
<img src="@/assets/images/car.png" width="30" height="30" v-if="row.yjLx == 2" />
<img src="@/assets/images/default_male.png" width="30" height="30" v-else />
</template>
<el-image v-else style="width: 30px; height:30px" :src="row.yjTp" :preview-src-list="[row.yjTp]"
show-progress>
<template #error>
<div class="image-slot error">
<img src="@/assets/images/car.png" width="30" height="30" v-if="row.yjLx == 2" />
<img src="@/assets/images/default_male.png" width="30" height="30" v-else />
</div>
</template>
</el-image>
</template>
<template #nl="{ row }">
{{ IdCard(row.yjRysfzh, 3) }}
</template>
<template #xb="{ row }">
{{ IdCard(row.yjRysfzh, 2) }}
</template>
<template #xsd="{ row }">
{{ row.xsd }}%
</template>
<template #yjLylx="{ row }">
<DictTag v-model:value="row.yjLylx" :options="props.dict.D_BZ_YJLY" />
</template>
<template #czzt="{ row }">
<DictTag v-model:value="row.czzt" :options="props.dict.D_GSXT_YJXX_CZZT" />
</template>
<template #yjJb="{ row }">
<DictTag v-model:value="row.yjJb" :options="props.dict.D_BZ_YJJB" />
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-link type="warning" @click="pushAssess(row)">全息档案</el-link>
<el-link type="primary" @click="handleCzjy(row)" v-if="roleCode">处置建议</el-link>
<!-- <el-link type="primary" @click="showDetail(row)">转合成</el-link> -->
<!-- <el-link type="danger" @click="delDictItem(row.id)">转会商</el-link> -->
<el-link type="success" @click="handleQsFk(row, '签收')" v-if="row.czzt == '01' && permission_sfqs">签收</el-link>
<el-link type="success" @click="handleQsFk(row, '反馈')" v-else-if="row.czzt == '02' && permission_sfqs">反馈</el-link>
<!-- <el-link type="success" @click="handleQsFk(row, '查看反馈')" v-else>查看反馈</el-link> -->
<el-link type="primary" @click="openAddFrom(row)">详情</el-link>
<el-link type="primary" @click="pushWarning(row)">指派</el-link>
</template>
<!-- <el-button type="success" @click="showFeedback(item, '签收')" v-if="item.czzt == '01'">签收</el-button>
<el-button type="success" @click="showFeedback(item, '反馈')" v-if="item.czzt == '02'">反馈</el-button>
<el-button type="success" @click="showFeedback(item, '查看反馈')" v-if="item.czzt == '03'">查看反馈</el-button> -->
</MyTable>
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="maxHeight + 100" :pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"></Pages>
</div>
</div>
<HolographicArchive v-model="assessShow" :dataList="dataList" />
<FkDialog @change="getList" />
<Information v-model="showDialog" title="发送指令" @submit='submit' @close='closeFszl'>
<SemdFqzl ref="semdFqzlRef" :itemData="itemData" @handleClose="handleClose" identification="yj"
:tacitly="tacitly" />
</Information>
<!-- <AddFrom ref="addFrom" /> -->
<!-- 处置建议 -->
<Czjy ref="czjyRef" @okSubmit="getList"></Czjy>
<ZpForm v-model="warningShow" :dataList="dataList"/>
</template>
<script setup>
import Czjy from './czjy.vue'
import { getItem, setItem } from '@/utils/storage'
import Items from '../item/items.vue'
import MyTable from "@/components/aboutTable/MyTable.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import { IdCard } from '@/utils/validate.js'
import { tbYjxxGetPageList } from '@/api/yj.js'
import HolographicArchive from '@/views/home/components/holographicArchive.vue'
import Information from "@/views/home/model/information.vue";
import SemdFqzl from '@/components/instructionHasBeen/sendFqzl.vue'
import FkDialog from "@/views/backOfficeSystem/fourColorManage/warningControl/centerHome/components/fkDialog.vue";
import ZpForm from "@/views/backOfficeSystem/fourColorManage/warningControl/sevenWarning/zpForm.vue";
import emitter from "@/utils/eventBus.js";
import { holographicProfileJump } from "@/utils/tools.js"
import { exportExlByObj } from "@/utils/exportExcel.js"
import { getMultiDictVal } from "@/utils/dict.js"
import { qcckGet, qcckPost } from "@/api/qcckApi.js";
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
const { proxy } = getCurrentInstance();
const props = defineProps({
dict: {
type: Object,
default: {}
},
maxHeight: {
type: [Number, String],
default: 666
}
});
const permission_sfqs = ref(false)
const roleCode = ref(false)
const czjyRef = ref()
const pageData = reactive({
tableData: [], //表格数据
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "null",
loading: false,
haveControls: true
},
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
}, //分页
controlsWidth: 250, //操作栏宽度
tableColumn: [
{ label: "状态", prop: "czzt", showSolt: true },
{ label: "预警图片", prop: "yjTp", showSolt: true, width: 100 },
{ label: "布控车牌号", prop: "yjClcph", showOverflowTooltip: true },
{ label: "处置状态", prop: "czzt", showSolt: true },
{ label: "预警级别", prop: "yjJb", showSolt: true },
{ label: "预警时间", prop: "yjSj", showOverflowTooltip: true },
{ label: "标题", prop: "yjBt" },
{ label: "预警地址", prop: "yjDz", showOverflowTooltip: true },
{ label: "接收单位", prop: "ssbm", showOverflowTooltip: true },
{ label: "内容", prop: "yjNr", showOverflowTooltip: true },
]
});
/** 选中项 */
const selectRows = ref([])
onMounted(() => {
let str = getItem('deptId') ? getItem('deptId')[0].deptLevel : ''
permission_sfqs.value = str.startsWith('2'||'3') ? false : true;
let rols = getItem('roleList') ? getItem('roleList'):[]
let obj = rols.find(item => {
return ['JS_666666','JS_777777','JS_888888'].includes(item.roleCode)
})
roleCode.value = obj ? true : false;
// tabHeightFn();
getList()
});
const changeNo = (val) => {
pageData.pageConfiger.pageCurrent = val;
getList()
}
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
getList()
}
const ORDIMG = 'https://89.40.7.122:38496/image'
const IMGYM = 'https://sg.lz.dsj.xz/dhimage'
const getList = (val) => {
pageData.tableConfiger.loading = true;
const promes = {
...val,
yjLx: '2', // 车辆预警
pageCurrent: pageData.pageConfiger.pageCurrent,
pageSize: pageData.pageConfiger.pageSize
}
delete promes.times;
tbYjxxGetPageList(promes).then((res) => {
pageData.tableData = res.records.map(item => {
return {
...item,
yjTp: item.yjlx == '01' ? item.yjTpreplace(ORDIMG, IMGYM) : item.yjTp
}
}) || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
}).catch(() => {
pageData.tableConfiger.loading = false;
})
}
// 全息档案
const assessShow = ref(false)
const dataList = ref()
const pushAssess = (val) => {
return holographicProfileJump(val.yjLx,val) // 全息档案跳转
}
// 处理签收
const handleQsFk = (val, type) => {
switch (type) {
case '签收':
proxy.$confirm("是否确定要签收?", "警告", { type: "warning" }).then(() => {
qcckPost({ id: val.id }, "/mosty-gsxt/tbYjxx/yjqs").then(() => {
val.czzt = '02'
getList()
proxy.$message({ type: "success", message: "签收成功" });
});
})
break;
case '反馈':
case '查看反馈':
emitter.emit("openFkDialog", { id: val.id, type });
break;
}
}
const handleCzjy = (row) => {
czjyRef.value.init( row)
}
// 发送指令
const showDialog = ref(false)
const itemData = ref()
const showDetail = (item) => {
showDialog.value = true;
itemData.value = item
}
const handleClose = () => {
showDialog.value = false;
}
const semdFqzlRef = ref()
const tacitly = {
title: 'yjbt',
instructionContent: 'yjnr'
}
const submit = () => {
semdFqzlRef.value.getsendFqzl()
}
const closeFszl = () => {
semdFqzlRef.value.close()
}
const addFrom = ref()
const openAddFrom = (row) => {
emitter.emit('openAddFrom', row)
}
// 根据预警级别设置行样式
const getRowClassName = (row) => {
if (!row.row.yjJb) return '';
const level = String(row.row.yjJb);
if (level === '01' || level.includes('红') || level.includes('高')) return 'warning-level-01';
if (level === '02' || level.includes('橙') || level.includes('中')) return 'warning-level-02';
if (level === '03' || level.includes('黄') || level.includes('低')) return 'warning-level-03';
if (level === '04' || level.includes('蓝')) return 'warning-level-04';
return '';
};
// // 表格高度计算
// const tabHeightFn = () => {
// pageData.tableHeight = window.innerHeight - 430;
// window.onresize = function () {
// tabHeightFn();
// };
// };
// 指派
const warningShow = ref(false)
const pushWarning = (val) => {
warningShow.value = true;
dataList.value = val;
}
const handleChooseData = (val) => {
selectRows.value = val
}
const exportExl = () => {
const titleObj = {
czzt_cname: "处置状态",
yjSj: "预警时间",
yjRyxm: "姓名",
nl_cname: "年龄", // IdCard(row.yjRysfzh, 3)
yjLylx: "数据来源",
xb_cname: "性别",
yjJb_cname: "预警级别",
xsd_cname: "相似度",
yjDz: "预警地点",
yjCs: "预警次数",
yjRysjh: "布控手机号",
yjClcph: "布控车牌号",
yjRysfzh: "身份证",
}
/** 导出【选中】的数据 (没有就全部)*/
const needArr = selectRows.value?.length > 0 ? selectRows.value : pageData.tableData
const data = needArr.map(item => {
return {
...item,
nl_cname: IdCard(item.yjRysfzh, 3),
xb_cname: IdCard(item.yjRysfzh, 2),
xsd_cname: (item.xsd > 0 ? item.xsd : 0) + '%',
czzt_cname: getMultiDictVal(item.czzt, props.dict.D_GSXT_YJXX_CZZT),
yjJb_cname: getMultiDictVal(item.yjJb, props.dict.D_BZ_YJJB),
}
})
exportExlByObj(titleObj, data, props.excelTitle || '预警.xlsx')
}
defineExpose({
getList,
exportExl
})
</script>
<style lang="scss">
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
/* 预警级别行样式 */
.warning-level-01 {
background-color: rgba(255, 2, 2, 0.1) !important;
}
.warning-level-01:hover {
background-color: rgba(255, 2, 2, 0.15) !important;
}
.warning-level-02 {
background-color: rgba(255, 140, 0, 0.1) !important;
}
.warning-level-02:hover {
background-color: rgba(255, 140, 0, 0.15) !important;
}
.warning-level-03 {
background-color: rgba(255, 210, 8, 0.1) !important;
}
.warning-level-03:hover {
background-color: rgba(255, 210, 8, 0.15) !important;
}
.warning-level-04 {
background-color: rgba(0, 0, 255, 0.1) !important;
}
.warning-level-04:hover {
background-color: rgba(0, 0, 255, 0.15) !important;
}
/* 确保行样式应用到所有单元格 */
.warning-level-01 td,
.warning-level-02 td,
.warning-level-03 td,
.warning-level-04 td {
background-color: transparent !important;
}
.tabBox_zdy{
.el-table--fit {
overflow: unset !important;
}
}
</style>

View File

@ -1,87 +1,146 @@
<template> <template>
<div> <div>
<Search :searchArr="searchConfiger" @submit="onSearch" @reset="onReset" :key="pageData.keyCount"> <!-- 搜索 -->
</Search> <div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" @reset="onReset" :key="pageData.keyCount">
<template #yjRyxms>
<el-select clearable v-model="listQuery.yjRyxm" filterable remote allow-create default-first-optionreserve-keyword placeholder="请输入布控人员" :remote-method="remoteMethod" :loading="loading" style="width: 240px">
<el-option v-for="item in opentions" :key="item.rySfzh" :label="item.ryXm" :value="item.rySfzh" />
</el-select>
</template>
</Search>
</div>
<PageTitle :malginLeft="10" :height="35" backgroundColor="#ffff" :marginBottom="5" :marginTop="5"> <PageTitle :malginLeft="10" :height="35" backgroundColor="#ffff" :marginBottom="5" :marginTop="5">
<template #left> <template #left>
<el-button type="primary" @click="exportExl" size="small">导出</el-button> <el-button type="primary" size="small" @click="exportExl">导出</el-button>
</template> <el-button type="primary" size="small" @click="handleQs" v-if="permission_sfqs">签收</el-button>
</template>
</PageTitle> </PageTitle>
<!-- 搜索 -->
<!-- 表格 --> <!-- 表格 -->
<div class="tabBox" :style="{ height: (pageData.tableHeight + 40) + 'px', paddingTop: '10px' }"> <div class="tabBox tabBox_zdy">
<!-- <div style="padding:0 10px;"> <el-button type="primary" @click="exportExcel">导出</el-button></div> --> <MyTable
<LocalWarning :maxHeight="pageData.tableHeight - 160" ref="localWarningRef" :tableData="pageData.tableData"
:dict="{ D_GSXT_YJXX_CZZT, D_BZ_YJJB, D_BZ_YJLYXT, D_BZ_YJLY }" excelTitle="车辆预警" /> :tableColumn="pageData.tableColumn"
</div> :tableHeight="pageData.tableHeight"
</div> :key="pageData.keyCount"
<el-dialog v-model="showDc" title="导出预警" width="80%"> :tableConfiger="pageData.tableConfiger"
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="500" :controlsWidth="pageData.controlsWidth"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"> expand
<template #yjTp="{ row }"> @chooseData="handleChooseData"
<template v-if="!row.yjTp || row.yjTp.includes('baidu')"> :rowClassName="getRowClassName"
<img src="@/assets/images/car.png" width="30" height="30" v-if="row.yjLx == 2" /> >
<img src="@/assets/images/default_male.png" width="30" height="30" v-else /> <template #expand="{ props }">
<Items :row="props" />
</template> </template>
<el-image v-else style="width: 30px; height:30px" :src="row.yjTp" :preview-src-list="[row.yjTp]" show-progress> <template #yjTp="{ row }">
<template #error> <template v-if="!row.yjTp || row.yjTp.includes('baidu')">
<div class="image-slot error"> <img src="@/assets/images/car.png" width="30" height="30" v-if="row.yjLx == 2" />
<img src="@/assets/images/car.png" width="30" height="30" v-if="row.yjLx == 2" /> <img src="@/assets/images/default_male.png" width="30" height="30" v-else />
<img src="@/assets/images/default_male.png" width="30" height="30" v-else />
</div>
</template> </template>
</el-image> <el-image v-else style="width: 30px; height:30px" :src="row.yjTp" :preview-src-list="[row.yjTp]"
show-progress>
<template #error>
<div class="image-slot error">
<img src="@/assets/images/car.png" width="30" height="30" v-if="row.yjLx == 2" />
<img src="@/assets/images/default_male.png" width="30" height="30" v-else />
</div>
</template>
</el-image>
</template>
<template #nl="{ row }">
{{ IdCard(row.yjRysfzh, 3) }}
</template>
<template #xb="{ row }">
{{ IdCard(row.yjRysfzh, 2) }}
</template>
<template #xsd="{ row }">
{{ row.xsd }}%
</template>
<template #yjLylx="{ row }">
<DictTag v-model:value="row.yjLylx" :options="D_BZ_YJLY" />
</template> </template>
<template #nl="{ row }"> <template #czzt="{ row }">
{{ IdCard(row.yjRysfzh, 3) }} <DictTag v-model:value="row.czzt" :options="D_GSXT_YJXX_CZZT" />
</template> </template>
<template #yjLylx="{ row }"> <template #yjJb="{ row }">
<DictTag v-model:value="row.yjLylx" :options="D_BZ_YJLY" /> <DictTag v-model:value="row.yjJb" :options="D_BZ_YJJB" />
</template> </template>
<template #xb="{ row }"> <!-- 操作 -->
{{ IdCard(row.yjRysfzh, 2) }} <template #controls="{ row }">
</template> <el-link type="warning" @click="pushAssess(row)">全息档案</el-link>
<template #czzt="{ row }"> <el-link type="primary" @click="handleCzjy(row)" v-if="roleCode">处置建议</el-link>
<DictTag v-model:value="row.czzt" :options="D_GSXT_YJXX_CZZT" /> <!-- <el-link type="primary" @click="showDetail(row)">转合成</el-link> -->
</template> <!-- <el-link type="danger" @click="delDictItem(row.id)">转会商</el-link> -->
<template #yjJb="{ row }"> <el-link type="success" @click="handleQsFk(row, '签收')" v-if="row.czzt == '01' && permission_sfqs">签收</el-link>
<DictTag v-model:value="row.yjJb" :options="D_BZ_YJJB" /> <el-link type="success" @click="handleQsFk(row, '反馈')" v-else-if="row.czzt == '02' && permission_sfqs">反馈</el-link>
</template> <!-- <el-link type="success" @click="handleQsFk(row, '查看反馈')" v-else>查看反馈</el-link> -->
<template #xsd="{ row }"> <el-link type="primary" @click="openAddFrom(row)">详情</el-link>
{{ row.xsd }}% <el-link type="primary" @click="pushWarning(row)">指派</el-link>
</template> </template>
<!-- 操作 --> </MyTable>
</MyTable> <Pages
<template #footer> @changeNo="changeNo"
<div class="dialog-footer"> @changeSize="changeSize"
<el-button @click="showDc = false">关闭</el-button> :tableHeight="pageData.tableHeight"
<el-button type="primary" @click="handleExport"> :pageConfiger="{ ...pageData.pageConfiger, total: pageData.total }">
导出 </Pages>
</el-button> </div>
</div>
</template> </div>
</el-dialog>
<HolographicArchive v-model="assessShow" :dataList="dataList" />
<Information v-model="showDialog" title="发送指令" @submit='submitSendZl' @close='closeFszl'>
<SemdFqzl ref="semdFqzlRef" :itemData="itemData" @handleClose="handleClose" identification="yj" :tacitly="tacitly" />
</Information>
<!-- 详情 -->
<AddFromz ref="addFromRefs" :dict="{ D_GSXT_YJXX_CZZT, D_BZ_YJJB, D_BZ_YJLYXT }" /> <AddFromz ref="addFromRefs" :dict="{ D_GSXT_YJXX_CZZT, D_BZ_YJJB, D_BZ_YJLYXT }" />
<!-- 处置建议 -->
<Czjy ref="czjyRef" @okSubmit="getList"></Czjy>
<!-- 指派 -->
<ZpForm v-model="warningShow" :dataList="dataList"/>
<!-- 反馈 -->
<FkDialog @change="getList" />
</template> </template>
<script setup> <script setup>
import * as MOSTY from "@/components/MyComponents/index"; import { qcckGet, qcckPost } from "@/api/qcckApi.js";
import PageTitle from "@/components/aboutTable/PageTitle.vue"; import emitter from "@/utils/eventBus.js";
import Search from "@/components/aboutTable/Search.vue"; import { getItem, setItem } from '@/utils/storage'
import { exportExlByObj } from "@/utils/exportExcel.js"
import { getMultiDictVal } from "@/utils/dict.js"
import { tbYjxxGetPageList } from '@/api/yj.js'
import { IdCard } from '@/utils/validate.js' import { IdCard } from '@/utils/validate.js'
import { tbGsxtZdrySelectList } from "@/api/zdr.js" import { tbGsxtZdrySelectList } from "@/api/zdr.js"
import { tbYjxxQueryYjxx } from "@/api/yj.js"; import { holographicProfileJump } from "@/utils/tools.js"
import LocalWarning from "./components/localWarning.vue"; import Items from './item/items.vue'
import MyTable from "@/components/aboutTable/MyTable.vue"; import HolographicArchive from '@/views/home/components/holographicArchive.vue'
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue"; import Information from "@/views/home/model/information.vue";
import FkDialog from "@/views/backOfficeSystem/fourColorManage/warningControl/centerHome/components/fkDialog.vue";
import ZpForm from "@/views/backOfficeSystem/fourColorManage/warningControl/sevenWarning/zpForm.vue";
import Czjy from './components/czjy.vue';
import AddFromz from './components/addFrom.vue'; import AddFromz from './components/addFrom.vue';
import FileSaver from "file-saver"; import MyTable from "@/components/aboutTable/MyTable.vue";
import emitter from "@/utils/eventBus.js"; import Pages from "@/components/aboutTable/Pages.vue";
import * as XLSX from "xlsx"; import PageTitle from "@/components/aboutTable/PageTitle.vue";
import Search from "@/components/aboutTable/Search.vue";
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
const ORDIMG = 'https://89.40.7.122:38496/image'
const IMGYM = 'https://sg.lz.dsj.xz/dhimage'
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const { D_GSXT_YJXX_CZZT, D_BZ_YJJB, D_BZ_YJLY } = proxy.$dict("D_GSXT_YJXX_CZZT", "D_BZ_YJJB", "D_BZ_YJLY") const { D_GSXT_YJXX_CZZT,D_GS_QLZDRLX, D_BZ_YJJB, D_BZ_YJLYXT, D_BZ_YJLY, D_BZ_XB } = proxy.$dict("D_GSXT_YJXX_CZZT",'D_GS_QLZDRLX ', "D_BZ_YJJB", "D_BZ_YJLYXT", "D_BZ_YJLY", "D_BZ_XB")
const searchBox = ref(); //搜索框 const searchBox = ref(); //搜索框
const roleCode = ref(false)
const czjyRef = ref()
const itemData = ref()
const semdFqzlRef = ref()
const warningShow = ref(false)
const dataList = ref([])
const showDialog = ref(false)// 发送指令
const assessShow = ref(false)// 全息档案
const searchConfiger = ref( const searchConfiger = ref(
[ [
{ label: "车牌号", prop: 'yjClcph', showType: "input", placeholder: "请输入车牌号", }, { label: "车牌号", prop: 'yjClcph', showType: "input", placeholder: "请输入车牌号", },
@ -92,46 +151,14 @@ const searchConfiger = ref(
{ label: "活动发生地址", prop: 'yjDz', placeholder: "请输入活动发生地址", showType: "input" }, { label: "活动发生地址", prop: 'yjDz', placeholder: "请输入活动发生地址", showType: "input" },
{ label: "接收单位", prop: 'ssbmdm',showType: "department" }, { label: "接收单位", prop: 'ssbmdm',showType: "department" },
]); ]);
const shortcuts = [
{
text: '近一周',
value: () => {
const end = new Date()
const start = new Date()
start.setDate(start.getDate() - 7)
return [start, end]
},
},
{
text: '近一月',
value: () => {
const end = new Date()
const start = new Date()
start.setMonth(start.getMonth() - 1)
return [start, end]
},
},
{
text: '近三月',
value: () => {
const end = new Date()
const start = new Date()
start.setMonth(start.getMonth() - 3)
return [start, end]
},
},
]
const pageData = reactive({ const pageData = reactive({
/** 表格高度 */
tableHeight: 600,
tableData: [], //表格数据 tableData: [], //表格数据
keyCount: 0, keyCount: 0,
tableConfiger: { tableConfiger: {
rowHieght: 61, rowHieght: 61,
showSelectType: "null", showSelectType: "null",
loading: false, loading: false,
haveControls: false haveControls: true
}, },
total: 0, total: 0,
@ -139,209 +166,273 @@ const pageData = reactive({
pageSize: 20, pageSize: 20,
pageCurrent: 1 pageCurrent: 1
}, //分页 }, //分页
controlsWidth: 160, //操作栏宽度 controlsWidth: 250, //操作栏宽度
tableColumn: [ tableColumn: [
{ label: "预警图片", prop: "yjTp", showSolt: true },
{ label: "状态", prop: "czzt", showSolt: true }, { label: "状态", prop: "czzt", showSolt: true },
{ label: "预警时间", prop: "yjSj", showOverflowTooltip: true }, { label: "预警图片", prop: "yjTp", showSolt: true, width: 100 },
{ label: "姓名", prop: "yjRyxm" },
{ label: "年龄", prop: "nl", showSolt: true },
{ label: "数据来源", prop: "yjLylx", showOverflowTooltip: true, showSolt: true },
{ label: "性别", prop: "xb", showSolt: true },
{ label: "预警级别", prop: "yjJb", showSolt: true },
{ label: "相似度", prop: "xsd", showSolt: true },
{ label: "预警地址", prop: "yjDz", showOverflowTooltip: true },
{ label: "预警次数", prop: "yjCs", showOverflowTooltip: true },
{ label: "布控手机号", prop: "yjRysjh", showOverflowTooltip: true },
{ label: "布控车牌号", prop: "yjClcph", showOverflowTooltip: true }, { label: "布控车牌号", prop: "yjClcph", showOverflowTooltip: true },
{ label: "身份证", prop: "yjRysfzh", showOverflowTooltip: true }, { label: "处置状态", prop: "czzt", showSolt: true },
{ label: "预警级别", prop: "yjJb", showSolt: true },
{ label: "预警时间", prop: "yjSj", showOverflowTooltip: true },
{ label: "标题", prop: "yjBt" },
{ label: "预警地址", prop: "yjDz", showOverflowTooltip: true },
{ label: "接收单位", prop: "ssbm", showOverflowTooltip: true },
{ label: "内容", prop: "yjNr", showOverflowTooltip: true },
] ]
}); });
const showDc = ref(false) const addFromRefs = ref()
const addFromRefs = ref(null) const listQuery = ref({})
const opentions = ref([])
const loading = ref(false)
const selectRows = ref([])
const permission_sfqs = ref(false)
onMounted(() => { onMounted(() => {
let str = getItem('deptId') ? getItem('deptId')[0].deptLevel : ''
permission_sfqs.value = str.startsWith('2'||'3') ? false : true;
let rols = getItem('roleList') ? getItem('roleList'):[]
let obj = rols.find(item => {
return ['JS_666666','JS_777777','JS_888888'].includes(item.roleCode)
})
roleCode.value = obj ? true : false;
tabHeightFn(); tabHeightFn();
emitter.on('openAddFrom', (val) => { getList()
if (addFromRefs.value) { });
addFromRefs.value.init('add', val) // 搜索
const onReset = () => {
listQuery.value.yjRyxm = ''
}
const onSearch = (val) => {
listQuery.value = { ...listQuery.value,...val };
listQuery.value.startTime = val.times ? val.times[0] : ''
listQuery.value.endTime = val.times ? val.times[1] : ''
getList()
}
const changeNo = (val) => {
pageData.pageConfiger.pageCurrent = val;
getList()
}
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
getList()
}
const getList = () => {
pageData.tableConfiger.loading = true;
const promes = {
...listQuery.value,
yjLx: '2', // 车辆预警
pageCurrent: pageData.pageConfiger.pageCurrent,
pageSize: pageData.pageConfiger.pageSize
}
delete promes.times;
tbYjxxGetPageList(promes).then((res) => {
pageData.tableData = res.records.map(item => {
return {
...item,
yjTp: item.yjlx == '01' ? item.yjTpreplace(ORDIMG, IMGYM) : item.yjTp
}
}) || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
}).catch(() => {
pageData.tableConfiger.loading = false;
})
}
const remoteMethod = (query) => {
if (!query) return opentions.value = [];
loading.value = true
tbGsxtZdrySelectList({ ryXm: query }).then(res => {
opentions.value = res || [];
loading.value = false;
}).catch(() => {
loading.value = false
})
}
// 根据预警级别设置行样式
const getRowClassName = (row) => {
if (!row.row.yjJb) return '';
const level = String(row.row.yjJb);
if (level === '01' || level.includes('红') || level.includes('高')) return 'warning-level-01';
if (level === '02' || level.includes('橙') || level.includes('中')) return 'warning-level-02';
if (level === '03' || level.includes('黄') || level.includes('低')) return 'warning-level-03';
if (level === '04' || level.includes('蓝')) return 'warning-level-04';
return '';
};
// 处理签收
const handleQsFk = (val, type) => {
switch (type) {
case '签收':
proxy.$confirm("是否确定要签收?", "警告", { type: "warning" }).then(() => {
qcckPost({ id: val.id }, "/mosty-gsxt/tbYjxx/yjqs").then(() => {
val.czzt = '02'
getList()
proxy.$message({ type: "success", message: "签收成功" });
});
})
break;
case '反馈':
case '查看反馈':
emitter.emit("openFkDialog", { id: val.id, type });
break;
}
}
const handleChooseData = (val) => {
selectRows.value = val
}
// 导出
const exportExl = () => {
const titleObj = {
czzt_cname: "处置状态",
yjSj: "预警时间",
yjRyxm: "姓名",
nl_cname: "年龄", // IdCard(row.yjRysfzh, 3)
yjLylx: "数据来源",
xb_cname: "性别",
yjJb_cname: "预警级别",
xsd_cname: "相似度",
yjDz: "预警地点",
yjCs: "预警次数",
yjRysjh: "布控手机号",
yjClcph: "布控车牌号",
yjRysfzh: "身份证",
}
/** 导出【选中】的数据 (没有就全部)*/
const needArr = selectRows.value?.length > 0 ? selectRows.value : pageData.tableData
const data = needArr.map(item => {
return {
...item,
nl_cname: IdCard(item.yjRysfzh, 3),
xb_cname: IdCard(item.yjRysfzh, 2),
xsd_cname: (item.xsd > 0 ? item.xsd : 0) + '%',
czzt_cname: getMultiDictVal(item.czzt, D_GSXT_YJXX_CZZT),
yjJb_cname: getMultiDictVal(item.yjJb, D_BZ_YJJB),
} }
}) })
}); exportExlByObj(titleObj, data, '人像预警.xlsx')
const listQuery = ref({
})
const localWarningRef = ref(null);
// 搜索
const onSearch = (val) => {
const promes = { ...val }
promes.startTime = val.times ? val.times[0] : ''
promes.endTime = val.times ? val.times[1] : ''
localWarningRef.value.getList(promes)
} }
const loading = ref(false)
const searchArr = ref() const handleQs = () => {
const resetForm = (formEl) => { if (selectRows.value?.length === 0) return proxy.$message({ type: "warning", message: "请选择要签收的预警" });
listQuery.value = {} let wqs = selectRows.value.filter(item => item.czzt == '01');
localWarningRef.value.getList() if (wqs.length == 0) return proxy.$message({ type: "warning", message: "数据都已签收,请选择未签收的数据" });
let yqs = selectRows.value.filter(item => item.czzt == '02');
let texy = yqs.length > 0 ? `${yqs.length}条已签收预警数据,确认要签收${wqs.length}条未签收预警数据吗?` : '确认要签收所有预警数据吗?'
proxy.$confirm(texy, "警告", { type: "warning" }).then(() => {
let ids = wqs.map(item => item.id)
qcckPost({ids}, '/mosty-gsxt/tbYjxx/batchQs').then(() => {
proxy.$message({ type: "success", message: "成功" });
getList();
}).catch(() => {
proxy.$message({ type: "error", message: "失败" });
});
}).catch(() => { });
}
// 全息档案跳转
const pushAssess = (val) => {
return holographicProfileJump(val.yjLx,val)
}
const showDetail = (item) => {
showDialog.value = true;
itemData.value = item
}
const handleClose = () => {
showDialog.value = false;
}
const submitSendZl = () => {
semdFqzlRef.value.getsendFqzl()
}
const closeFszl = () => {
semdFqzlRef.value.close()
}
// 处置建议
const handleCzjy = (row) => {
czjyRef.value.init(row)
}
// 详情
const openAddFrom = (val) => {
addFromRefs.value.init('add', val)
} }
// 指派
const pushWarning = (val) => {
warningShow.value = true
dataList.value = val;
}
// 表格高度计算 // 表格高度计算
const tabHeightFn = () => { const tabHeightFn = () => {
pageData.tableHeight = window.innerHeight - (searchBox.value?.offsetHeight || 0) - 270; pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 290;
window.onresize = function () { window.onresize = function () {
tabHeightFn(); tabHeightFn();
}; };
}; };
// 导出
const exportExcel = () => {
const promes = {
yjRyxm: listQuery.value.yjRyxm,
yjlx: listQuery.value.yjlx,
startTime: listQuery.value.time ? listQuery.value.time[0] : '',
endTime: listQuery.value.time ? listQuery.value.time[1] : '',
}
tbYjxxQueryYjxx(promes).then(res => {
pageData.tableData = res
showDc.value = true
})
}
// 处理Excel导出
const handleExport = () => {
// 创建一个临时表格用于导出
const tempTable = document.createElement('table');
// 创建表头
const thead = document.createElement('thead');
const headerRow = document.createElement('tr');
// 添加序号列
const indexTh = document.createElement('th');
indexTh.textContent = '序号';
headerRow.appendChild(indexTh);
// 添加其他列头
pageData.tableColumn.forEach(column => {
const th = document.createElement('th');
th.textContent = column.label;
headerRow.appendChild(th);
});
thead.appendChild(headerRow);
tempTable.appendChild(thead);
// 创建表体
const tbody = document.createElement('tbody');
// 处理表格数据
pageData.tableData.forEach((row, index) => {
const tr = document.createElement('tr');
// 添加序号
const indexTd = document.createElement('td');
indexTd.textContent = index + 1;
tr.appendChild(indexTd);
// 添加其他单元格数据
pageData.tableColumn.forEach(column => {
const td = document.createElement('td');
// 处理自定义插槽的情况
if (column.showSolt) {
if (column.prop === 'yjTp') {
// 照片字段只显示文字描述
td.textContent = '有照片';
} else if (column.prop === 'nl') {
// 年龄字段
td.textContent = IdCard(row.yjRysfzh, 3);
} else if (column.prop === 'xb') {
// 性别字段
td.textContent = IdCard(row.yjRysfzh, 2);
} else if (column.prop === 'xsd') {
// 相似度字段
td.textContent = '90%';
} else {
// 其他字段
td.textContent = row[column.prop] || '';
}
} else {
// 普通字段
td.textContent = row[column.prop] || '';
}
tr.appendChild(td);
});
tbody.appendChild(tr);
});
tempTable.appendChild(tbody);
// 执行Excel导出
let xlsxParam = { raw: true };
let wb = XLSX.utils.table_to_book(tempTable, xlsxParam);
let wbout = XLSX.write(wb, {
bookType: "xlsx",
bookSST: true,
type: "array"
});
// 保存文件
try {
const exportTime = new Date().toLocaleString('zh-CN').replace(/\//g, '-').replace(/:/g, '-');
FileSaver.saveAs(
new Blob([wbout], { type: "application/octet-stream" }),
`预警数据导出_${exportTime}.xlsx`
);
showDc.value = false;
} catch (e) {
console.error('导出Excel失败:', e);
}
}
const exportExl = () => {
localWarningRef.value && localWarningRef.value.exportExl()
};
</script> </script>
<style lang="scss" scoped>
::v-deep .el-table--fit {
height: calc(100% - 50px) !important;
}
.filter-title { <style lang="scss">
display: flex;
align-items: center;
margin-bottom: 10px;
width: 100%;
background: linear-gradient(to right, #9ed7ff, #e6f0f8);
padding: 5px 15px;
.filter-label {
display: flex;
align-items: center;
font-weight: bold;
color: #000;
margin-right: 10px;
white-space: nowrap;
}
.filter-line {
flex: 1;
height: 1px;
background-color: #ccc;
}
}
</style>
<style>
.el-loading-mask { .el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important; background: rgba(0, 0, 0, 0.5) !important;
} }
.searchBox { /* 预警级别行样式 */
background-color: #fff; .warning-level-01 {
margin-bottom: 10px; background-color: rgba(255, 2, 2, 0.1) !important;
}
.warning-level-01:hover {
background-color: rgba(255, 2, 2, 0.15) !important;
}
.warning-level-02 {
background-color: rgba(255, 140, 0, 0.1) !important;
}
.warning-level-02:hover {
background-color: rgba(255, 140, 0, 0.15) !important;
}
.warning-level-03 {
background-color: rgba(255, 210, 8, 0.1) !important;
}
.warning-level-03:hover {
background-color: rgba(255, 210, 8, 0.15) !important;
}
.warning-level-04 {
background-color: rgba(0, 0, 255, 0.1) !important;
}
.warning-level-04:hover {
background-color: rgba(0, 0, 255, 0.15) !important;
}
/* 确保行样式应用到所有单元格 */
.warning-level-01 td,
.warning-level-02 td,
.warning-level-03 td,
.warning-level-04 td {
background-color: transparent !important;
}
.tabBox_zdy{
.el-table--fit {
overflow: unset !important;
}
} }
</style> </style>