lcw
This commit is contained in:
@ -4,9 +4,16 @@
|
||||
<span class="title">{{ title }}重点人管理</span>
|
||||
<div>
|
||||
<el-button type="primary" size="small" v-if="butShow" :loading="loading" @click="submit">保存</el-button>
|
||||
<el-button type="primary" size="small" v-if="showAuditShBtn && showButData"
|
||||
@click="openAuditDialog('sh')">审核</el-button>
|
||||
<el-button type="primary" size="small" v-if="showAuditSpBtn && showButData"
|
||||
@click="openAuditDialog('sp')">审批</el-button>
|
||||
<el-button size="small" @click="close">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<AuditDialog v-model="auditDialogVisible" :title="auditTitle" :formData="auditForm" :rules="auditRules"
|
||||
:reasonProp="auditReasonProp" :loading="auditLoading" :dictEnum="D_BZ_SF" @cancel="handleAuditCancel"
|
||||
@submit="handleAuditSubmit" />
|
||||
<div class="form_cnt flex just-between">
|
||||
<div class="left_box">
|
||||
<ul class="anchor-list">
|
||||
@ -20,8 +27,8 @@
|
||||
:class="activeSection === 'character-section' ? 'active' : ''">背景信息</li>
|
||||
<li @click="scrollToSection('controlInfo-section')"
|
||||
:class="activeSection === 'controlInfo-section' ? 'active' : ''" v-if="!butShow">管控信息</li>
|
||||
<li @click="scrollToSection('featinfo-section')"
|
||||
:class="activeSection === 'featinfo-section' ? 'active' : ''" v-if="!butShow">全要素布控</li>
|
||||
<li @click="scrollToSection('featinfo-section')" :class="activeSection === 'featinfo-section' ? 'active' : ''"
|
||||
v-if="!butShow">全要素布控</li>
|
||||
<li @click="scrollToSection('demandsInfo-section')"
|
||||
:class="activeSection === 'demandsInfo-section' ? 'active' : ''" v-if="!butShow">密切联系人</li>
|
||||
<li @click="scrollToSection('requestInfo-section')"
|
||||
@ -69,13 +76,13 @@
|
||||
<div id="judgmentRecord-section" v-if="!butShow">
|
||||
<VisitRecord ref="visitRecord" :disabled="disabled" :showBut="showBut" :dataList="listQuery" />
|
||||
</div>
|
||||
<div id="historyAssembly-section" v-if="!butShow" >
|
||||
<div id="historyAssembly-section" v-if="!butShow">
|
||||
<CaseInfo ref="caseInfo" :disabled="disabled" :showBut="showBut" :dataList="listQuery" />
|
||||
</div>
|
||||
<div id="joblogging-section" v-if="!butShow">
|
||||
<ActualPerformance ref="actualPerformance" :disabled="disabled" :showBut="showBut" :dataList="listQuery" />
|
||||
</div>
|
||||
<div id="joblogging-joblog" v-if="!butShow" >
|
||||
<div id="joblogging-joblog" v-if="!butShow">
|
||||
<CzModel ref="czModel" :disabled="disabled" :showBut="showBut" :dataList="listQuery" />
|
||||
</div>
|
||||
</div>
|
||||
@ -87,6 +94,7 @@
|
||||
import { getItem } from "@/utils/storage";
|
||||
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
|
||||
import { tbGsxtZdrySelectVoById, tbGsxtZdrySave } from "@/api/zdr.js";
|
||||
import AuditDialog from "./auditDialog.vue";
|
||||
import ControlInfo from '../../mpvGroup/model/controlInfo.vue'
|
||||
import Info from "../model/info.vue";
|
||||
import PersonnelTags from '../model/personnelTags.vue'
|
||||
@ -101,10 +109,11 @@ import CaseInfo from '../model/caseInfo.vue'
|
||||
import ActualPerformance from '../model/actualPerformance.vue'
|
||||
import CzModel from '../model/czModel.vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { ref, onUnmounted, getCurrentInstance } from "vue";
|
||||
import { ref, onUnmounted, getCurrentInstance, computed, reactive } from "vue";
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { D_BZ_SF } = proxy.$dict("D_BZ_SF");
|
||||
const emit = defineEmits(["updateDate"]);
|
||||
const chooseMarksVisible = ref(false);
|
||||
const dialogForm = ref(false); //弹窗
|
||||
@ -115,23 +124,50 @@ const listQuery = ref({});
|
||||
const butShow = ref(false)
|
||||
const title = ref('新增')
|
||||
const showData = ref(false)
|
||||
const modeType = ref("detail")
|
||||
const currentRowId = ref("")
|
||||
const auditDialogVisible = ref(false)
|
||||
const auditLoading = ref(false)
|
||||
const auditForm = reactive({
|
||||
id: "",
|
||||
sftg: undefined,
|
||||
shBtgyy: "",
|
||||
spBtgyy: ""
|
||||
})
|
||||
const auditRules = reactive({
|
||||
sftg: [{ required: true, message: "请选择是否通过", trigger: "change" }],
|
||||
shBtgyy: [{ required: true, message: "请输入不通过原因", trigger: "blur" }],
|
||||
spBtgyy: [{ required: true, message: "请输入不通过原因", trigger: "blur" }]
|
||||
})
|
||||
const auditTitle = computed(() => modeType.value === "sp" ? "审批" : "审核")
|
||||
const auditReasonProp = computed(() => modeType.value === "sp" ? "spBtgyy" : "shBtgyy")
|
||||
const showAuditShBtn = computed(() => modeType.value === "detail" && dataListQuery.value?.zdrZt == "02")
|
||||
const showAuditSpBtn = computed(() => modeType.value === "detail" && dataListQuery.value?.zdrZt == "04")
|
||||
const props = defineProps({
|
||||
rylx: {
|
||||
type: String,
|
||||
default: '01'
|
||||
}
|
||||
},
|
||||
showButData: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
})
|
||||
const dataListQuery = ref({})
|
||||
// 初始化数据
|
||||
const init = (type, row) => {
|
||||
dialogForm.value = true;
|
||||
modeType.value = type;
|
||||
currentRowId.value = row?.id || "";
|
||||
if (type == 'add') {
|
||||
butShow.value = true
|
||||
title.value = '新增'
|
||||
disabled.value = false
|
||||
showBut.value = false
|
||||
listQuery.value = {}
|
||||
} else {
|
||||
|
||||
butShow.value = false
|
||||
dataListQuery.value = { ...row }
|
||||
tbGsxtZdrySelectVoById({ id: row.id }).then(res => {
|
||||
listQuery.value = { ...res }
|
||||
})
|
||||
@ -143,8 +179,7 @@ const init = (type, row) => {
|
||||
disabled.value = true
|
||||
showBut.value = false
|
||||
title.value = '删除'
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
disabled.value = true
|
||||
showBut.value = false
|
||||
title.value = '详情'
|
||||
@ -213,7 +248,7 @@ const submit = async () => {
|
||||
info.value.throwData()
|
||||
// personnelTags.value.throwData(),
|
||||
]);
|
||||
tbGsxtZdrySave({...infoData,rylx:props.rylx}).then(res => {
|
||||
tbGsxtZdrySave({ ...infoData, rylx: props.rylx }).then(res => {
|
||||
proxy.$message({
|
||||
message: '新增成功',
|
||||
type: 'success',
|
||||
@ -224,10 +259,47 @@ const submit = async () => {
|
||||
|
||||
};
|
||||
|
||||
const butzt = ref()
|
||||
const openAuditDialog = (type) => {
|
||||
// modeType.value = type;
|
||||
butzt.value = type
|
||||
auditForm.id = currentRowId.value || listQuery.value?.id || "";
|
||||
auditForm.sftg = undefined;
|
||||
auditForm.shBtgyy = "";
|
||||
auditForm.spBtgyy = "";
|
||||
auditDialogVisible.value = true;
|
||||
}
|
||||
|
||||
const handleAuditCancel = () => {
|
||||
auditDialogVisible.value = false;
|
||||
auditLoading.value = false;
|
||||
// modeType.value = "detail";
|
||||
auditForm.id = "";
|
||||
auditForm.sftg = undefined;
|
||||
auditForm.shBtgyy = "";
|
||||
auditForm.spBtgyy = "";
|
||||
}
|
||||
|
||||
const handleAuditSubmit = () => {
|
||||
auditLoading.value = true;
|
||||
const url = butzt.value === "sp" ? "/mosty-gsxt/tbGsxtZdry/updateSp" : "/mosty-gsxt/tbGsxtZdry/updateSh";
|
||||
const successMsg = modeType.value === "sp" ? "审批成功" : "审核成功";
|
||||
qcckPost(auditForm, url).then(() => {
|
||||
proxy.$message({
|
||||
message: successMsg,
|
||||
type: 'success',
|
||||
})
|
||||
auditDialogVisible.value = false;
|
||||
modeType.value = "detail";
|
||||
close();
|
||||
}).catch(() => {
|
||||
auditLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 关闭
|
||||
const close = () => {
|
||||
if (route.query.id) {
|
||||
if (route.query.id) {
|
||||
const query = { ...route.query };
|
||||
delete query.id;
|
||||
router.replace({ query });
|
||||
@ -235,6 +307,14 @@ const close = () => {
|
||||
|
||||
dialogForm.value = false;
|
||||
loading.value = false;
|
||||
auditLoading.value = false;
|
||||
auditDialogVisible.value = false;
|
||||
modeType.value = "detail";
|
||||
currentRowId.value = "";
|
||||
auditForm.id = "";
|
||||
auditForm.sftg = undefined;
|
||||
auditForm.shBtgyy = "";
|
||||
auditForm.spBtgyy = "";
|
||||
emit('updateDate')
|
||||
};
|
||||
|
||||
|
||||
@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<el-dialog :model-value="modelValue" :title="title" width="500px" @update:model-value="handleModelValueChange"
|
||||
@close="handleCancel">
|
||||
<el-form :model="formData" ref="elAuditForm" label-width="100px" :rules="rules" style="width: 100%;">
|
||||
<el-form-item label="是否通过" prop="sftg" class="mt10 mb10">
|
||||
<MOSTY.Select filterable v-model="formData.sftg" :dictEnum="dictEnum" style="width: 100%;" clearable
|
||||
placeholder="请选择是否通过" />
|
||||
</el-form-item>
|
||||
<el-form-item label="不通过原因" :prop="reasonProp" v-if="formData.sftg == 0">
|
||||
<MOSTY.Other style="width: 100%;" clearable v-model="formData[reasonProp]" type="textarea"
|
||||
placeholder="请输入不通过原因" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="flex just-center">
|
||||
<el-button @click="handleCancel">取消</el-button>
|
||||
<el-button type="primary" @click="handleSubmit" v-loading="loading">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import * as MOSTY from "@/components/MyComponents/index";
|
||||
import { ref } from "vue";
|
||||
|
||||
defineProps({
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: "审核"
|
||||
},
|
||||
formData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
rules: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
reasonProp: {
|
||||
type: String,
|
||||
default: "shBtgyy"
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
dictEnum: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
});
|
||||
|
||||
const emit = defineEmits(["update:modelValue", "cancel", "submit"]);
|
||||
const elAuditForm = ref();
|
||||
|
||||
const handleModelValueChange = (val) => {
|
||||
emit("update:modelValue", val);
|
||||
};
|
||||
|
||||
const handleCancel = () => {
|
||||
emit("cancel");
|
||||
};
|
||||
|
||||
const handleSubmit = () => {
|
||||
elAuditForm.value.validate((valid) => {
|
||||
if (!valid) return;
|
||||
emit("submit");
|
||||
});
|
||||
};
|
||||
</script>
|
||||
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 搜索 -->
|
||||
<div ref="searchBox" class="mt10">
|
||||
<Search :searchArr="searchConfiger" @submit="onSearch" >
|
||||
<div ref="searchBox" class="mt10">
|
||||
<Search :searchArr="searchConfiger" @submit="onSearch">
|
||||
<el-button type="primary" size="small" @click="addEdit('add', '')">
|
||||
<el-icon style="vertical-align: middle">
|
||||
<CirclePlus />
|
||||
@ -13,10 +13,9 @@
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
<div class="margTop">
|
||||
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
||||
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
|
||||
@chooseData="chooseData">
|
||||
<div class="margTop" style="padding: 0;">
|
||||
<WarnDataTable :data="pageData.tableData" :columns="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
||||
:loading="pageData.tableConfiger.loading" @selection-change="chooseData">
|
||||
<template #bqList="{ row }">
|
||||
<ul>
|
||||
<li class="one_text_detail marks mb4" :key="index" v-for="(item, index) in row.bqList">{{ item.bqMc }}({{
|
||||
@ -39,7 +38,7 @@
|
||||
<DictTag :tag="false" :value="row.zdrRyjb" :options="D_GS_ZDR_RYJB" />
|
||||
</template>
|
||||
<template #zdrBkZt="{ row }">
|
||||
<DictTag :tag="false" :value="row.zdrBkZt" :options="D_ZDRGK_GKZT" />
|
||||
<DictTag :tag="false" :value="row.zdrBkZt" :options="D_BZ_RCBKZT" />
|
||||
</template>
|
||||
<template #zdrCzzt="{ row }">
|
||||
<DictTag :tag="false" :value="row.zdrCzzt" :options="D_GS_ZDR_CZZT" />
|
||||
@ -54,7 +53,9 @@
|
||||
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link size="small" type="success" @click="handleremove(row.id)">移除</el-link>
|
||||
<!-- <el-link size="small" type="success" @click="handleremove(row.id)">移至关注库</el-link> -->
|
||||
<el-link size="small" type="success" @click="handleMoveToFocus(row.id)">移入关注库</el-link>
|
||||
<el-link size="small" type="success" @click="handleremove(row.id)">移入基础库</el-link>
|
||||
<el-link size="small" type="success" v-if="row.zdrZt == '01' || row.zdrZt == '03'"
|
||||
@click="handleSend(row.id)">送审</el-link>
|
||||
<el-link size="small" type="primary" v-if="row.zdrZt == '01' || row.zdrZt == '03'"
|
||||
@ -62,7 +63,7 @@
|
||||
<el-link size="small" type="primary" @click="addEdit('detail', row)">详情</el-link>
|
||||
<el-link size="small" type="danger" @click="deleteRow(row.id)">删除</el-link>
|
||||
</template>
|
||||
</MyTable>
|
||||
</WarnDataTable>
|
||||
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
|
||||
...pageData.pageConfiger,
|
||||
total: pageData.total
|
||||
@ -84,7 +85,7 @@ import { ElMessage } from "element-plus";
|
||||
import ChooseUser from "@/components/ChooseList/ChooseUser/index.vue";
|
||||
import ZxsForm from "./components/zxsForm.vue";
|
||||
import PageTitle from "@/components/aboutTable/PageTitle.vue";
|
||||
import MyTable from "@/components/aboutTable/MyTable.vue";
|
||||
import WarnDataTable from "@/views/backOfficeSystem/ces/components/WarnDataTable.vue";
|
||||
import Pages from "@/components/aboutTable/Pages.vue";
|
||||
import Search from "@/components/aboutTable/Search.vue";
|
||||
import AddForm from "./components/addForm.vue";
|
||||
@ -95,8 +96,8 @@ import { getItem } from "@/utils/storage.js";
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { D_GS_ZDQT_ZT, D_GS_ZDR_RYJB, D_BZ_XB, D_BZ_MZ, D_BZ_XZQHDM, D_ZDRGK_GKZT, D_GS_ZDR_CZZT, D_GS_BQ_ZL, D_GS_BQ_LB, D_GS_BQ_LX, D_GS_ZDR_YJDJ, D_GS_BK_SSJZ, D_GS_BK_SQLX, D_BZ_SF, D_GS_XS_LY, D_BZ_SSZT, D_GS_XS_LX, D_GS_XS_QTLX } =
|
||||
proxy.$dict("D_GS_ZDQT_ZT", "D_GS_ZDR_RYJB", "D_BZ_XB", "D_BZ_MZ", "D_BZ_XZQHDM", "D_ZDRGK_GKZT", "D_GS_ZDR_CZZT", "D_GS_BQ_ZL", "D_GS_BQ_LB", "D_GS_BQ_LX", "D_GS_ZDR_YJDJ", "D_GS_BK_SSJZ", "D_GS_BK_SQLX", "D_BZ_SF", "D_GS_XS_LY", "D_BZ_SSZT", "D_GS_XS_LX", "D_GS_XS_QTLX");
|
||||
const { D_GS_ZDQT_ZT, D_GS_ZDR_RYJB, D_BZ_XB, D_BZ_MZ, D_BZ_RCBKZT, D_BZ_XZQHDM, D_ZDRGK_GKZT, D_GS_ZDR_CZZT, D_GS_BQ_ZL, D_GS_BQ_LB, D_GS_BQ_LX, D_GS_ZDR_YJDJ, D_GS_BK_SSJZ, D_GS_BK_SQLX, D_BZ_SF, D_GS_XS_LY, D_BZ_SSZT, D_GS_XS_LX, D_GS_XS_QTLX } =
|
||||
proxy.$dict("D_GS_ZDQT_ZT", "D_BZ_RCBKZT", "D_GS_ZDR_RYJB", "D_BZ_XB", "D_BZ_MZ", "D_BZ_XZQHDM", "D_ZDRGK_GKZT", "D_GS_ZDR_CZZT", "D_GS_BQ_ZL", "D_GS_BQ_LB", "D_GS_BQ_LX", "D_GS_ZDR_YJDJ", "D_GS_BK_SSJZ", "D_GS_BK_SQLX", "D_BZ_SF", "D_GS_XS_LY", "D_BZ_SSZT", "D_GS_XS_LX", "D_GS_XS_QTLX");
|
||||
const obj = ref({});
|
||||
const showzxs = ref(false);
|
||||
const zxsDilof = ref();
|
||||
@ -151,28 +152,29 @@ const pageData = reactive({
|
||||
},
|
||||
controlsWidth: 250,
|
||||
tableColumn: [
|
||||
{ label: "姓名", prop: "ryXm",width: 100 },
|
||||
{ label: "性别", prop: "ryXb", showSolt: true, width: 80 },
|
||||
{ label: "姓名", prop: "ryXm", width: 100 },
|
||||
{ label: "性别", prop: "ryXb", slotName: "ryXb", width: 80 },
|
||||
{ label: "身份证", prop: "rySfzh", width: 170 },
|
||||
{ label: "民族", prop: "ryMz", showSolt: true, width: 80 },
|
||||
{ label: "民族", prop: "ryMz", slotName: "ryMz", width: 80 },
|
||||
{ label: "户籍派出所", prop: "hjdPcsmc" },
|
||||
{ label: "标签", prop: "bqList", showSolt: true, showOverflowTooltip: true },
|
||||
{ label: "管辖单位", prop: "gxSsbmmc" },
|
||||
{ label: "管控状态", prop: "zdrBkZt", showOverflowTooltip: true,showSolt: true, width: 100 },
|
||||
{ label: "审核状态", prop: "zdrZt", showSolt: true, width: 100 },
|
||||
{ label: "标签", prop: "bqList", slotName: "bqList", showOverflowTooltip: true },
|
||||
{ label: "协管单位", prop: "gxSsbmmc" },
|
||||
{ label: "管控状态", prop: "zdrBkZt", showOverflowTooltip: true, slotName: "zdrBkZt", width: 100 },
|
||||
{ label: "审核状态", prop: "zdrZt", slotName: "zdrZt", width: 100 },
|
||||
{ label: "入库时间", prop: "zdrRkkssj", },
|
||||
{ label: "操作", prop: "controls", slotName: "controls", width: 250 },
|
||||
]
|
||||
});
|
||||
const isShiQzDelet = ref(false)
|
||||
const isShiQzDelet = ref(false)
|
||||
onMounted(() => {
|
||||
tabHeightFn();
|
||||
const isShiQz = getItem('roleList').find(item => item.roleCode == 'JS_777777') != undefined
|
||||
const isShiQz = getItem('roleList').find(item => item.roleCode == 'JS_777777') != undefined
|
||||
if (isShiQz) isShiQzDelet.value = true
|
||||
if (route.query.id) {
|
||||
addEdit('x', {
|
||||
id: route.query.id
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
getList();
|
||||
}
|
||||
});
|
||||
@ -198,7 +200,7 @@ const getList = () => {
|
||||
pageData.tableConfiger.loading = true;
|
||||
// 人员类型D_ZDRY_RYLX(01 重点 02 普通〉
|
||||
// rylx: '01',
|
||||
let data = {...pageData.pageConfiger, ...queryFrom.value,rylx: '01' };
|
||||
let data = { ...pageData.pageConfiger, ...queryFrom.value, rylx: '01' };
|
||||
qcckGet(data, "/mosty-gsxt/tbGsxtZdry/selectPage").then((res) => {
|
||||
pageData.tableData = res.records || [];
|
||||
pageData.total = res.total;
|
||||
@ -226,7 +228,14 @@ const handleremove = (id) => {
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
const handleMoveToFocus = (id) => {
|
||||
proxy.$confirm("确定要移至关注库?", "警告", { type: "warning" }).then(() => {
|
||||
qcckPost({ id, rylx: '03' }, "/mosty-gsxt/tbGsxtZdry/rylxyd").then(() => {
|
||||
proxy.$message({ type: "success", message: "移除成功" });
|
||||
getList();
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
const chooseData = (data) => {
|
||||
ids.value = Array.isArray(data) ? data.map((item) => item.id) : [];
|
||||
|
||||
@ -6,38 +6,26 @@
|
||||
<el-button type="primary" v-if="showBut" :disabled="disabled" @click="submit">保存</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<FormMessage :disabled="disabled" v-model="listQuery" :formList="formData" labelWidth="100px" ref="elform"
|
||||
<FormMessage :disabled="disabled" v-model="listQuery" :formList="formData" labelWidth="130px" ref="elform"
|
||||
:rules="rules">
|
||||
<template #ryzp>
|
||||
<div style="width: 100%; padding-left: 50px">
|
||||
<MOSTY.Upload :showBtn="false" :limit="1" v-model="listQuery.ryzp" />
|
||||
</div>
|
||||
</template>
|
||||
<template #ryLxdh>
|
||||
<div class="phone-input-container">
|
||||
<div class="inputGroup" v-for="(item, index) in listQuery.ryLxdh" :key="index">
|
||||
<el-input v-model="listQuery.ryLxdh[index]" class="group" placeholder="请输入电话号码" />
|
||||
<div class="flex align-center but">
|
||||
<el-button type="primary" :icon="Plus" circle @click="addPhone" title="添加电话号码"
|
||||
v-if="listQuery.ryLxdh.length - 1 == index" />
|
||||
<el-button type="success" :icon="Minus" circle @click="removePhone(index)" title="删除电话号码" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #gkmjxm>
|
||||
<template #gkMjXm>
|
||||
<div>
|
||||
<el-input v-model="listQuery.gkmjxm" class="group" placeholder="请输入管控民警姓名" readonly
|
||||
<el-input v-model="listQuery.gkMjXm" class="group" placeholder="请输入管控民警姓名" readonly
|
||||
@click="chooseMarksVisible = true" />
|
||||
</div>
|
||||
</template>
|
||||
<template #gkmjsfzh>
|
||||
<!-- <template #gkmjsfzh>
|
||||
<div>
|
||||
<el-input v-model="listQuery.gkmjsfzh" class="group" placeholder="请输入管控民警身份证号" readonly
|
||||
@click="chooseMarksVisible = true" />
|
||||
</div>
|
||||
</template>
|
||||
<!-- { label: "管控民警", prop: "gkmjxm", type: "slot" }, -->
|
||||
</template> -->
|
||||
<!-- { label: "管控民警", prop: "gkMjXm", type: "slot" }, -->
|
||||
<!-- { label: "管控民警身份证号", prop: "gkmjsfzh", type: "slot" }, -->
|
||||
</FormMessage>
|
||||
</div>
|
||||
@ -48,8 +36,8 @@
|
||||
|
||||
<script setup>
|
||||
import * as rule from "@/utils/rules.js";
|
||||
import { IdCard } from "@/utils/validate.js";
|
||||
import * as MOSTY from "@/components/MyComponents/index";
|
||||
import { Plus, Minus } from "@element-plus/icons-vue";
|
||||
import FormMessage from "@/components/aboutTable/FormMessage.vue";
|
||||
import ChooseUser from "@/components/ChooseList/ChooseUser/index.vue";
|
||||
import { ref, reactive, onMounted, getCurrentInstance, watch } from "vue";
|
||||
@ -73,57 +61,61 @@ const props = defineProps({
|
||||
const rules = reactive({
|
||||
ryXm: [{ required: true, message: "请输入姓名", trigger: "blur" }],
|
||||
...rule.identityCardRule({ validator: true }, 'rySfzh'), //身份证校验
|
||||
...rule.phoneRule({ validator: true }, "ryLxdh"), // 是否必填 是否进行校验,
|
||||
...rule.phoneRule({ validator: true }, "gkMjLxfs"), // 是否必填 是否进行校验,
|
||||
rySfzh: [{ required: true, message: "请输入身份证号", trigger: "blur" }],
|
||||
ryLxdh: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
|
||||
ryXb: [{ required: true, message: "请选择性别", trigger: "change" }],
|
||||
ryMz: [{ required: true, message: "请选择民族", trigger: "change" }],
|
||||
ryCsrq: [{ required: true, message: "请选择出生日期", trigger: "change" }],
|
||||
zdrRyjb: [{ required: true, message: "请选择人员级别", trigger: "change" }],
|
||||
zdrYjdj: [{ required: true, message: "请选择预警等级", trigger: "change" }],
|
||||
zrSsbmdm: [{ required: true, message: "请选择责任单位", trigger: "change" }],
|
||||
// gkmjxm: [{ required: true, message: "请选择管控民警", trigger: "change" }],
|
||||
gxSsbmdm: [{ required: true, message: "请选择协管单位", trigger: "change" }],
|
||||
zdrRkkssj: [{ required: true, message: "请选择入库开始时间", trigger: "change" }],
|
||||
zdrRkjssj: [{ required: true, message: "请选择入库结束时间", trigger: "change" }],
|
||||
gkMjLxfs: [{ required: true, message: "请输入民警联系方式", trigger: "blur" }],
|
||||
// gkMjXm: [{ required: true, message: "请选择管控民警", trigger: "change" }],
|
||||
// gkmjsfzh: [{ required: true, message: "请选择管控民警身份证号", trigger: "change" }],
|
||||
// rylx: [{ required: true, message: "请选择人员类型", trigger: "change" }]
|
||||
});
|
||||
const listQuery = ref({ ryLxdh: [""] }); //表单
|
||||
const listQuery = ref({}); //表单
|
||||
const chooseMarksVisible = ref(false); // 控制标签选择弹窗显示
|
||||
const roleIds = ref([]); // 已选择的标签ID
|
||||
const formData = ref([
|
||||
{ label: "人员照片", prop: "ryzp", type: "slot", width: "100%" },
|
||||
{ label: "姓名", prop: "ryXm", type: "input" },
|
||||
{ label: "性别", prop: "ryXb", type: "select", options: D_BZ_XB },
|
||||
{ label: "身份证号", prop: "rySfzh", type: "input" },
|
||||
{ label: "籍贯", prop: "ryJg", type: "select", options: D_BZ_XZQHDM },
|
||||
{ label: "曾用名", prop: "cym", type: "input" },
|
||||
{ label: "文化程度", prop: "whcdBm", type: "select", options: D_BZ_WHCD },
|
||||
{ label: "民族", prop: "ryMz", type: "select", options: D_BZ_MZ },
|
||||
{ label: "政治面貌", prop: "zzmm", type: "select", options: D_BZ_ZZMM },
|
||||
{ label: "职业", prop: "zyBm", type: "select", options: D_ZDRY_ZYLB },
|
||||
{ label: "人员级别", prop: "zdrRyjb", type: "select", options: D_GS_ZDR_RYJB },
|
||||
{ label: "预警等级", prop: "zdrYjdj", type: "select", options: D_GS_ZDR_YJDJ },
|
||||
{ label: "出生日期", prop: "ryCsrq", type: "date" },
|
||||
{ label: "户籍地区划", prop: "hjdQh", type: "select", options: D_BZ_XZQHDM },
|
||||
{ label: "户籍地详址", prop: "hjdXz", type: "input" },
|
||||
{ label: "户籍地派出所", prop: "hjdPcsdm", depMc: "hjdPcsmc", type: "department" },
|
||||
{ label: "现住地区划", prop: "xzdQh", type: "select", options: D_BZ_XZQHDM },
|
||||
{ label: "现住地详址", prop: "xzdXz", type: "input" },
|
||||
{ label: "现住地派出所", prop: "xzdPcsdm", depMc: "xzdPcsmc", type: "department" },
|
||||
{ label: "管控民警", prop: "gkmjxm", type: "slot" },
|
||||
{ label: "民警身份证", prop: "gkmjsfzh", type: "slot" },
|
||||
{ label: "管辖单位", prop: "gxSsbmdm", depMc: 'gxSsbmmc', type: "department" },
|
||||
{ label: "诉求单位", prop: "sqSsbmdm", depMc: 'sqSsbmmc', type: "department" },
|
||||
{ label: "责任单位", prop: "zrSsbmdm", depMc: 'zrSsbmmc', type: "department" },
|
||||
{ label: "所属警种", prop: "zdrSsjz", type: "select", options: D_GS_BK_SSJZ },
|
||||
{ label: "涉及警种", prop: "zdrSjjz", type: "select", options: D_GS_BK_SSJZ, multiple: true },
|
||||
{ label: "婚姻状态", prop: "hyzk", type: "select", options: D_BZ_HYZK },
|
||||
// { label: "处置状态", prop: "zdrCzzt", type: "select", options: D_GS_ZDR_CZZT },
|
||||
// { label: "布控状态", prop: "zdrBkZt", type: "select", options: D_BZ_RCBKZT },
|
||||
{ label: "姓名", prop: "ryXm", type: "input", width: "30%" },
|
||||
{ label: "身份证号", prop: "rySfzh", type: "input", width: "30%" },
|
||||
{ label: "性别", prop: "ryXb", type: "select", options: D_BZ_XB, width: "30%" },
|
||||
{ label: "出生日期", prop: "ryCsrq", type: "date", width: "30%" },
|
||||
{ label: "民族", prop: "ryMz", type: "select", options: D_BZ_MZ, width: "30%" },
|
||||
{ label: "协管单位", prop: "gxSsbmdm", depMc: 'gxSsbmmc', type: "department", width: "30%" },
|
||||
{ label: "预警等级", prop: "zdrYjdj", type: "select", options: D_GS_ZDR_YJDJ, width: "30%" },
|
||||
{ label: "管控民警", prop: "gkMjXm", type: "slot", width: "30%" },
|
||||
{ label: "民警联系方式", prop: "gkMjLxfs", type: "input", width: "30%" },
|
||||
{ label: "入库开始时间", prop: "zdrRkkssj", type: "datetime", width: "30%" },
|
||||
{ label: "入库结束时间", prop: "zdrRkjssj", type: "datetime", width: "30%" },
|
||||
{ label: "重点人联系电话", prop: "ryLxdh", type: "input", width: "30%" },
|
||||
{ label: "籍贯", prop: "ryJg", type: "input", width: "30%" },
|
||||
{ label: "曾用名", prop: "cym", type: "input", width: "30%" },
|
||||
{ label: "文化程度", prop: "whcdBm", type: "select", options: D_BZ_WHCD, width: "30%" },
|
||||
{ label: "政治面貌", prop: "zzmm", type: "select", options: D_BZ_ZZMM, width: "30%" },
|
||||
{ label: "职业", prop: "zyBm", type: "input", width: "30%" },
|
||||
{ label: "人员级别", prop: "zdrRyjb", type: "select", options: D_GS_ZDR_RYJB, width: "30%" },
|
||||
{ label: "户籍地区划", prop: "hjdQh", type: "input", width: "30%" },
|
||||
{ label: "户籍地详址", prop: "hjdXz", type: "input", width: "30%" },
|
||||
{ label: "户籍地派出所", prop: "hjdPcsmc", type: "input", width: "30%" },
|
||||
{ label: "现住地区划", prop: "xzdQh", type: "input", width: "30%" },
|
||||
{ label: "现住地详址", prop: "xzdXz", type: "input", width: "30%" },
|
||||
{ label: "现住地派出所", prop: "xzdPcsdm", depMc: "xzdPcsmc", type: "department", width: "30%" },
|
||||
|
||||
// { label: "民警身份证", prop: "gkmjsfzh", type: "slot" },
|
||||
{ label: "诉求单位", prop: "sqSsbmmc", type: "input", width: "30%" },
|
||||
{ label: "责任单位", prop: "zrSsbmmc", type: "input", width: "30%" },
|
||||
{ label: "所属警种", prop: "zdrSsjz", type: "select", options: D_GS_BK_SSJZ, width: "30%" },
|
||||
{ label: "涉及警种", prop: "zdrSjjz", type: "select", options: D_GS_BK_SSJZ, multiple: true, width: "30%" },
|
||||
{ label: "婚姻状态", prop: "hyzk", type: "select", options: D_BZ_HYZK, width: "30%" },
|
||||
{ label: "处置状态", prop: "zdrCzzt", type: "select", options: D_GS_ZDR_CZZT, width: "30%" },
|
||||
{ label: "布控状态", prop: "zdrBkZt", type: "select", options: D_BZ_RCBKZT, width: "30%" },
|
||||
// { label: "人员类型", prop: "rylx", type: "select", options: D_ZDRY_RYLX },
|
||||
{ label: "入库开始时间", prop: "zdrRkkssj", type: "datetime" },
|
||||
{ label: "入库结束时间", prop: "zdrRkjssj", type: "datetime" },
|
||||
{ label: "Mac地址", prop: "macDz", type: "input" },
|
||||
{ label: "联系电话", prop: "ryLxdh", type: "slot", width: "100%" },
|
||||
|
||||
{ label: "Mac地址", prop: "macDz", type: "input", width: "30%" },
|
||||
// { label: "标签选择", prop: "tags", type: "slot", width: "100%" },
|
||||
{ label: "管控原因", prop: "zdrLkyy", type: "textarea", width: "100%" },
|
||||
]);
|
||||
@ -150,9 +142,22 @@ const deepClone = (obj) => {
|
||||
}
|
||||
return clonedObj;
|
||||
};
|
||||
// 监听身份证号变化,自动填充性别、出生日期和民族
|
||||
watch(() => listQuery.value.rySfzh, (val) => {
|
||||
if (val && val.length === 18) {
|
||||
// 使用IdCard方法提取出生日期
|
||||
listQuery.value.ryCsrq = IdCard(val, 1);
|
||||
// 使用IdCard方法提取性别
|
||||
const genderText = IdCard(val, 2);
|
||||
listQuery.value.ryXb = D_BZ_XB.value.find(item => item.zdmc === genderText).dm;
|
||||
}
|
||||
});
|
||||
|
||||
// 监听props.dataList变化,处理初始化数据
|
||||
watch(() => props.dataList, (val) => {
|
||||
if (val) {
|
||||
console.log(val);
|
||||
|
||||
// 使用深拷贝避免直接引用同一个对象
|
||||
listQuery.value = deepClone(val);
|
||||
// 处理照片数据
|
||||
@ -175,14 +180,9 @@ const submit = () => {
|
||||
};
|
||||
//
|
||||
const gettbGsxtZdryUpdate = () => {
|
||||
|
||||
|
||||
|
||||
|
||||
const promes = {
|
||||
...listQuery.value,
|
||||
ryzp: listQuery.value.ryzp.length > 0 ? listQuery.value.ryzp.toString() : "",
|
||||
ryLxdh: listQuery.value.ryLxdh,
|
||||
zdrSjjz: JSON.stringify(listQuery.value.zdrSjjz),
|
||||
|
||||
}
|
||||
@ -200,28 +200,6 @@ const gettbGsxtZdryUpdate = () => {
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
// 添加电话号码
|
||||
const addPhone = () => {
|
||||
// 确保新添加的电话号码与现有数据结构一致
|
||||
// 创建深拷贝以避免响应式更新问题
|
||||
const newPhoneList = [...listQuery.value.ryLxdh];
|
||||
newPhoneList.push('');
|
||||
// 用全新数组替换现有数组,确保Vue正确检测到变化
|
||||
listQuery.value.ryLxdh = newPhoneList;
|
||||
}
|
||||
|
||||
// 删除电话号码
|
||||
const removePhone = (index) => {
|
||||
if (listQuery.value.ryLxdh.length > 1) {
|
||||
listQuery.value.ryLxdh.splice(index, 1);
|
||||
} else {
|
||||
// 清空输入但保留输入框
|
||||
listQuery.value.ryLxdh[0] = '';
|
||||
proxy.$message.warning('至少保留一个联系电话');
|
||||
}
|
||||
}
|
||||
|
||||
const throwData = () => {
|
||||
@ -229,32 +207,19 @@ const throwData = () => {
|
||||
if (elform.value && elform.value.validate) {
|
||||
elform.value.submit((data) => {
|
||||
// 过滤掉空的电话号码
|
||||
const validPhones = listQuery.value.ryLxdh.filter(phone => phone && phone.trim());
|
||||
if (validPhones.length === 0) {
|
||||
proxy.$message.warning('请至少输入一个有效的联系电话');
|
||||
reject(new Error('请至少输入一个有效的联系电话'));
|
||||
return;
|
||||
}
|
||||
resolve({
|
||||
...listQuery.value,
|
||||
ryzp: listQuery.value.ryzp && listQuery.value.ryzp.length > 0 ? listQuery.value.ryzp.toString() : '',
|
||||
ryLxdh: validPhones,
|
||||
zdrSjjz: JSON.stringify(listQuery.value.zdrSjjz),
|
||||
});
|
||||
})
|
||||
} else {
|
||||
elform.value.submit((data) => {
|
||||
// 如果没有验证方法,直接返回数据
|
||||
const validPhones = listQuery.value.ryLxdh.filter(phone => phone && phone.trim());
|
||||
if (validPhones.length === 0) {
|
||||
proxy.$message.warning('请至少输入一个有效的联系电话');
|
||||
reject(new Error('请至少输入一个有效的联系电话'));
|
||||
return;
|
||||
}
|
||||
|
||||
resolve({
|
||||
...listQuery.value,
|
||||
ryzp: listQuery.value.ryzp && listQuery.value.ryzp.length > 0 ? listQuery.value.ryzp.toString() : '',
|
||||
ryLxdh: validPhones,
|
||||
zdrSjjz: JSON.stringify(listQuery.value.zdrSjjz),
|
||||
});
|
||||
|
||||
@ -265,8 +230,9 @@ const throwData = () => {
|
||||
};
|
||||
const choosed = (val) => {
|
||||
roleIds.value = [val[0].id]
|
||||
listQuery.value.gkmjxm = val[0].userName
|
||||
listQuery.value.gkMjXm = val[0].userName
|
||||
listQuery.value.gkmjsfzh = val[0].idEntityCard
|
||||
listQuery.value.gkMjLxfs = val[0].mobile
|
||||
console.log(listQuery.value);
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user