This commit is contained in:
2026-01-20 10:34:32 +08:00
parent d82a4d2629
commit c0df066a26
3 changed files with 103 additions and 21 deletions

View File

@ -2,16 +2,15 @@
<div>
<div class="titleBox">
<PageTitle title="七类重点人员" />
</div>
<!-- 搜索 -->
<div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount">
<template #age="{ row }">
<div class="ageBox">
<el-input v-model="queryFrom.age_s" type="number" :min="1" :max="100" style="width: 80px;"></el-input>
<el-input v-model="queryFrom.age_s" placeholder="开始年龄" type="number" :min="1" :max="100" style="width: 102px;"></el-input>
<span style="color: #333;" class="ml5 mr5"></span>
<el-input v-model="queryFrom.age_b" type="number" :min="parseInt(queryFrom.age_s)+1" :max="100" style="width: 80px;"></el-input>
<el-input v-model="queryFrom.age_b" placeholder="结束年龄" type="number" :min="parseInt(queryFrom.age_s)+1" :max="100" style="width: 102px;"></el-input>
</div>
</template>
</Search>
@ -24,10 +23,10 @@
<DictTag :value="row.czzt" :tag="false" :options="D_GSXT_YJXX_CZZT" />
</template>
<template #sex="{ row }">
<span v-if="row.yjRysfzh"> {{ IdCard.getSex(row.yjRysfzh,2) }} </span>
<span v-if="row.yjRysfzh"> {{ IdCard(row.yjRysfzh,2) }} </span>
</template>
<template #age="{ row }">
<span v-if="row.yjRysfzh"> {{ IdCard.getAge(row.yjRysfzh,3) }} </span>
<span v-if="row.yjRysfzh"> {{ IdCard(row.yjRysfzh,3) }} </span>
</template>
<template #yjJb="{ row }">
<DictTag :value="row.yjJb" :tag="false" :options="D_BZ_YJJB" />
@ -36,14 +35,14 @@
<DictTag :value="row.bqdl" :tag="false" :options="D_GS_QLZDRLX" />
</template>
<template #yjLylx="{ row }">
<DictTag :value="row.yjLylx" :tag="false" :options="D_GS_QLZDRLX" />
<DictTag :value="row.yjLylx" :tag="false" :options="D_BZ_YJLY" />
</template>
<template #yjLx="{ row }">
<DictTag :value="row.yjLx" :tag="false" :options="D_GS_QLZDRYXX" />
</template>
<template #controls="{ row }">
<el-link type="warning">报错</el-link>
<el-link type="warning">指派</el-link>
<el-link type="warning" @click="pushWarning(row)">指派</el-link>
</template>
</MyTable>
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
@ -52,9 +51,11 @@
}"></Pages>
</div>
</div>
<ZpForm v-model="warningShow" :dataList="dataList"/>
</template>
<script setup>
import ZpForm from "./zpForm.vue";
import { IdCard } from '@/utils/validate.js'
import PageTitle from "@/components/aboutTable/PageTitle.vue";
import Search from "@/components/aboutTable/Search.vue";
@ -63,20 +64,21 @@ import Pages from "@/components/aboutTable/Pages.vue";
import { qcckGet, qcckPost } from "@/api/qcckApi.js";
import { reactive, ref, onMounted, getCurrentInstance, } from "vue";
const { proxy } = getCurrentInstance();
// 预警类型D_GS_YJLX
const { D_GS_YJLX,D_GS_QLZDRLX,D_BZ_RYLB,D_BZ_YJJB, D_GS_QLZDRYXX,D_BZ_XB,D_GSXT_YJXX_CZZT } = proxy.$dict('D_GS_YJLX','D_GS_QLZDRLX','D_BZ_RYLB',"D_BZ_YJJB", "D_GS_QLZDRYXX", "D_BZ_XB","D_GSXT_YJXX_CZZT"); //获取字典数据
const { D_BZ_YJLY,D_GS_QLZDRLX,D_BZ_YJJB, D_GS_QLZDRYXX,D_BZ_XB,D_GSXT_YJXX_CZZT } = proxy.$dict('D_BZ_YJLY','D_GS_QLZDRLX',"D_BZ_YJJB", "D_GS_QLZDRYXX", "D_BZ_XB","D_GSXT_YJXX_CZZT"); //获取字典数据
const searchBox = ref(); //搜索框
const warningShow = ref(false);
const dataList = ref([]);
const searchConfiger = ref(
[
{ label: "姓名", prop: 'xm', placeholder: "请输入姓名", showType: "input" },
{ label: "姓名", prop: 'yjRyxm', placeholder: "请输入姓名", showType: "input" },
{ label: "年龄段", prop: 'age', placeholder: "请输入身份证号码", showType: "Slot" },
{ label: "性别", prop: 'xbdm', placeholder: "请选择性别", showType: "select", options: D_BZ_XB },
{ label: "身份证", prop: 'sfzh', placeholder: "请输入身份证号码", showType: "input" },
{ label: "预警时间", prop: 'datatime', showType: "datetimerange" },
{ label: "身份证", prop: 'yjRysfzh', placeholder: "请输入身份证号码", showType: "input" },
{ label: "预警时间", prop: 'times', showType: "datetimerange" },
{ label: "状态", prop: 'czzt', placeholder: "请选择状态", showType: "select", options: D_GSXT_YJXX_CZZT },
{ label: "人员类别", prop: 'rylb', placeholder: "请选择人员类别", showType: "select", options: D_BZ_RYLB },
{ label: "细类", prop: 'bqdl', placeholder: "请选择细类", showType: "select", options: D_GS_QLZDRYXX },
{ label: "活动发生地址", prop: 'hfsdz', placeholder: "请输入活动发生地址", showType: "input" },
{ label: "人员类别", prop: 'bqdl', placeholder: "请选择人员类别", showType: "select", options: D_GS_QLZDRLX },
{ label: "细类", prop: 'yjbqmc', placeholder: "请输入细类", showType: "input" },
{ label: "活动发生地址", prop: 'yjDz', placeholder: "请输入活动发生地址", showType: "input" },
{ label: "接收单位", prop: 'ssbmdm',showType: "department" },
]);
@ -104,8 +106,8 @@ const pageData = reactive({
{ label: "性别", prop: "sex" ,showSolt: true },
{ label: "年龄", prop: "age", showSolt: true },
{ label: "预警级别", prop: "yjJb", showSolt: true },
{ label: "人员类别", prop: "yjLx", showSolt: true },
{ label: "细类", prop: "bqdl" ,showSolt: true},
{ label: "人员类别", prop: "bqdl", showSolt: true },
{ label: "细类", prop: "yjbqmc" },
{ label: "轨迹类别", prop: "yjLylx", showSolt: true },
{ label: "活动发生地", prop: "yjDz" },
{ label: "接收单位", prop: "ssbm" },
@ -120,7 +122,10 @@ onMounted(() => {
// 搜索
const onSearch = (val) => {
console.log(val);
queryFrom.value = { ...val }
queryFrom.value.StartTime = val.times ? val.times[0] : ''
queryFrom.value.EndTime = val.times ? val.times[1] : ''
pageData.pageConfiger.pageCurrent = 1;
getList()
}
@ -148,6 +153,11 @@ const getList = () => {
})
}
const pushWarning = (val) => {
warningShow.value = true;
dataList.value = val;
}
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 250;

View File

@ -0,0 +1,76 @@
<!--预警指派展示组件 -->
<template>
<el-dialog :draggable="true" :model-value="modelValue" :title="title" :width="width" @close="close" append-to-body>
<div class="archive-container">
<FormMessage :formList="formData" v-model="listQuery" ref="elform" :rules="rules" :labelWidth="90">
</FormMessage>
</div>
<template #footer>
<div class="dialog-footer" style="text-align: center;">
<el-button type="primary" @click="submit">确定</el-button>
<el-button @click="close">关闭</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import { ref, defineProps, defineEmits, reactive, watch, getCurrentInstance } from 'vue';
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { tbYjxxYjzp } from '@/api/yj'
const { proxy } = getCurrentInstance();
const props = defineProps({
modelValue: {
type: Boolean,
default: false
},
title: {
type: String,
default: '预警指派'
},
width: {
type: String,
default: '50%'
},
url: {
type: String,
default: ''
},
dataList: {
type: Object,
default: () => ({})
}
});
const listQuery = ref()
const formData = ref([
{ label: "指派部门", prop: "zpbmdm", depMc: 'zpbm', type: "department", width: '45%' },
{ label: "指派原因", prop: "zpyy", type: "textarea", width: '80%' },
])
const rules = reactive({
zpbmdm: [{ required: true, message: "请选择指派部门", trigger: "blur" }],
zpyy: [{ required: true, message: "请输入指派原因", trigger: "change" }],
});
const elform = ref(null)
const submit = async () => {
elform.value.submit(() => {
const params = { ...listQuery.value, yjid: props.dataList.id };
tbYjxxYjzp(params).then((res) => {
proxy.$message({ type: "success", message: "成功" });
close();
}).catch(() => {
proxy.$message({ type: "error", message: "失败" });
});
});
}
// 定义事件
const emit = defineEmits(['update:modelValue']);
const close = () => {
elform.value.reset()
emit('update:modelValue', false);
};
</script>
<style scoped>
</style>