更新页面

This commit is contained in:
2025-07-10 17:59:39 +08:00
parent 5f6f37a166
commit b2880cd82c
7 changed files with 475 additions and 131 deletions

View File

@ -1,7 +1,7 @@
<template>
<el-dialog v-model="showDialog" :destroy-on-close="true" title="新增人员" @close="close" :close-on-click-modal="false">
<FormMessage v-model="listQuery" :formList="formData" labelWidth="120px" ref="elform" :rules="rules">
<template #rybq>
<template #bqList>
<div class="marks pointer" @click="chooseMarksVisible = true">
<span style="color: rgb(175 178 184);padding-left: 10px;" v-if="!listQuery.bqList || listQuery.bqList.length == 0 ">请选择标签</span>
<span v-else >
@ -25,7 +25,7 @@ import ChooseMarks from "@/components/MyComponents/ChooseMarks/index.vue";
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { reactive, ref,getCurrentInstance } from 'vue';
const { proxy } = getCurrentInstance();
const { D_BZ_MZ } = proxy.$dict("D_BZ_MZ"); // 获取字典数据
const { D_BZ_XB } = proxy.$dict("D_BZ_XB"); // 获取字典数据
const elform = ref()
const roleIds = ref([])
const showDialog = ref(false)
@ -33,26 +33,28 @@ const chooseMarksVisible = ref(false)
const emit = defineEmits(['change'])
const listQuery = ref({})
const formData = ref([
{ label: "人员姓名", prop: "xm", type: "input" ,width:'45%'},
{ label: "身份证号", prop: "sfzh", type: "input" ,width:'45%'},
{ label: "手机号码", prop: "hjdz", type: "input",width:'45%' },
{ label: "人员民族", prop: "hjdpcsdm", type: "select" ,options:D_BZ_MZ,width:'45%'},
{ label: "户籍地址", prop: "bqList", type: "input",width:'100%',disabled:true },
{ label: "现居住地址", prop: "sfttr", type: "input",width:'100%'},
{ label: "特征描述", prop: "sfxyr", type: "input" ,width:'100%'},
{ label: "人员标签", prop: "rybq", type: "slot" ,width:'45%'},
{ label: "车牌号", prop: "wx", type: "input" ,width:'45%'},
{ label: "人员照片", prop: "qq", type: "upload" ,width:'45%'},
{ label: "人员姓名", prop: "ryXm", type: "input" ,width:'45%'},
{ label: "性别", prop: "ryXb", type: "select" ,width:'45%',options:D_BZ_XB},
{ label: "身份证号", prop: "rySfzh", type: "input" ,width:'45%'},
{ label: "手机号码", prop: "ryLxdh", type: "input",width:'45%' },
{ label: "户籍地址", prop: "hjdXz", type: "input",width:'100%'},
{ label: "现居住地址", prop: "xzdXz", type: "input",width:'100%'},
{ label: "特征描述", prop: "qtTzms", type: "input" ,width:'100%'},
{ label: "人员标签", prop: "bqList", type: "slot" ,width:'100%'},
{ label: "车牌号", prop: "clCph", type: "input" ,width:'45%'},
{ label: "车架号", prop: "clCjh", type: "input" ,width:'45%'},
{ label: "人员照片", prop: "fjZp", type: "upload" ,width:'100%'},
])
const rules = reactive({
xm: [{ required: true, message: "请输入姓名", trigger: "blur" }],
xb: [{ required: true, message: "请选择性别", trigger: "change" }],
sfzh: [{ required: true, message: "请输入身份证号", trigger: "blur" }],
hjd: [{ required: true, message: "请输入户籍地", trigger: "blur" }],
ryXm: [{ required: true, message: "请输入姓名", trigger: "blur" }],
rySfzh: [{ required: true, message: "请输入身份证号", trigger: "blur" }],
ryXb: [{ required: true, message: "请选择性别", trigger: "change" }],
ryLxdh: [{ required: true, message: "请输入手机号码", trigger: "blur" }],
hjdXz: [{ required: true, message: "请输入户籍地", trigger: "blur" }],
xzdXz: [{ required: true, message: "请输入现居住地址", trigger: "blur" }],
})
const title = ref('')
const order = ref(null)
const init = () =>{
showDialog.value = true;
}
@ -72,13 +74,14 @@ const closeTag = (idx) =>{
const submitForm = () =>{
elform.value.submit((val)=>{
emit('change',[val])
emit('change',val)
showDialog.value = false;
})
}
const close = () =>{
elform.value.reset();
listQuery.value.bqList = []
showDialog.value = false;
}
@ -88,7 +91,6 @@ defineExpose({init})
<style lang="scss" scoped>
.marks{
width: 100%;
width: 100%;
min-height: 32px;
border: 1px solid #e9e9e9;