This commit is contained in:
2025-07-19 18:53:41 +08:00
parent f4bd352162
commit 8b92e91215
7 changed files with 23 additions and 199 deletions

View File

@ -38,7 +38,7 @@ const formData = ref([
{ label: "身份证号", prop: "rySfzh", type: "input" ,width:'45%'}, { label: "身份证号", prop: "rySfzh", type: "input" ,width:'45%'},
{ label: "手机号码", prop: "ryLxdh", type: "input",width:'45%' }, { label: "手机号码", prop: "ryLxdh", type: "input",width:'45%' },
{ label: "户籍地址", prop: "hjdXz", type: "input",width:'100%'}, { label: "户籍地址", prop: "hjdXz", type: "input",width:'100%'},
{ label: "现居住地址", prop: "xzdXz", type: "input",width:'100%'}, { label: "户籍地派出所", prop: "hjdpcsdm",depMc:'hjdpcs', type: "department" ,width:'48%'},
{ label: "特征描述", prop: "qtTzms", type: "input" ,width:'100%'}, { label: "特征描述", prop: "qtTzms", type: "input" ,width:'100%'},
{ label: "人员标签", prop: "bqList", type: "slot" ,width:'100%'}, { label: "人员标签", prop: "bqList", type: "slot" ,width:'100%'},
{ label: "车牌号", prop: "clCph", type: "input" ,width:'45%'}, { label: "车牌号", prop: "clCph", type: "input" ,width:'45%'},

View File

@ -49,13 +49,13 @@
</MyTable> </MyTable>
</div> </div>
<!-- 人员 --> <!-- 人员 -->
<AddPeo ref="showAdd" :dic="props.dic" ></AddPeo> <AddPeo ref="showAdd" v-if="showPerson" v-model="showPerson" :dic="props.dic" ></AddPeo>
</div> </div>
</template> </template>
<script setup> <script setup>
import * as MOSTY from "@/components/MyComponents/index"; import * as MOSTY from "@/components/MyComponents/index";
import AddPeo from './addPeo.vue' import AddPeo from '@/components/addPerson/index.vue'
import MyTable from "@/components/aboutTable/MyTable.vue"; import MyTable from "@/components/aboutTable/MyTable.vue";
import FormMessage from "@/components/aboutTable/FormMessage.vue"; import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { qcckGet } from "@/api/qcckApi.js"; import { qcckGet } from "@/api/qcckApi.js";
@ -111,6 +111,7 @@ const pageForm = reactive({
] ]
}); });
const showAdd = ref() const showAdd = ref()
const showPerson = ref(false)
onMounted(()=>{ onMounted(()=>{
tabHeightFn() tabHeightFn()
}) })
@ -135,7 +136,10 @@ const getDataById = (id) => {
// 打开弹窗 // 打开弹窗
const addEdit = (type,row,index) =>{ const addEdit = (type,row,index) =>{
showAdd.value.init(type,row,index) showPerson.value = true;
nextTick(()=>{
showAdd.value.init(type,row,index)
})
} }
// 关闭 // 关闭

View File

@ -1,78 +0,0 @@
<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 #bqList>
<div class="marks pointer" >
<span style="color: rgb(175 178 184);padding-left: 10px;" v-if="!listQuery.bqList || listQuery.bqList.length == 0 ">请选择标签</span>
<span v-else >
<el-tag type="success" v-for="(it,idx) in listQuery.bqList" :key="idx">{{ it.bqMc }}</el-tag >
</span>
</div>
</template>
</FormMessage>
<template #footer>
<div class="flex just-center">
<el-button @click="close">取消</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { reactive, ref } from 'vue';
const props = defineProps({
dic:{
type:Object,
default:{}
},
})
const roleIds = ref([])
const elform = ref()
const showDialog = ref(false)
const emit = defineEmits(['change'])
const listQuery = ref({})
const formData = ref([
{ label: "姓名", prop: "xm", type: "input" ,width:'48%'},
{ label: "性别", prop: "xb", type: "select",options:props.dic.D_BZ_XB ,width:'48%'},
{ label: "身份证号", prop: "sfzh", type: "input" ,width:'48%'},
{ label: "户籍地", prop: "hjdz", type: "input",width:'48%' },
{ label: "户籍地派出所", prop: "hjdpcsdm", type: "department" ,width:'48%'},
{ label: "标签", prop: "bqList", type: "slot",width:'100%' },
{ label: "是否挑头人", prop: "sfttr", type: "select",options:props.dic.D_BZ_SF ,width:'48%'},
{ label: "是否响应人", prop: "sfxyr", type: "select" ,options:props.dic.D_BZ_SF,width:'48%' },
{ label: "所属群体", prop: "ssqt", type: "input" ,width:'48%'},
{ label: "微信号", prop: "wx", type: "input" ,width:'48%'},
{ label: "QQ", prop: "qq", type: "input" ,width:'48%'},
])
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" }],
})
const title = ref('')
const init = (type,row,index) =>{
title.value = type == 'add' ? '新增' :'编辑';
showDialog.value = true;
if(row) listQuery.value = {...row};
}
const close = () =>{
elform.value.reset();
showDialog.value = false;
}
defineExpose({init})
</script>
<style lang="scss" scoped>
.marks{
width: 100%;
width: 100%;
min-height: 32px;
border: 1px solid #e9e9e9;
border-radius: 4px;
}
</style>

View File

@ -51,7 +51,7 @@
</MyTable> </MyTable>
</div> </div>
<!-- 人员 --> <!-- 人员 -->
<AddPeo ref="showAdd" :dic="props.dic" @change="getPeo"></AddPeo> <AddPeo ref="showAdd" v-model="showPeo" v-if="showPeo" :dic="props.dic" @change="getPeo"></AddPeo>
</div> </div>
</template> </template>
@ -110,6 +110,7 @@ const pageForm = reactive({
] ]
}); });
const showAdd = ref() const showAdd = ref()
const showPeo = ref(false)
onMounted(()=>{ onMounted(()=>{
tabHeightFn() tabHeightFn()
}) })
@ -135,7 +136,10 @@ const getDataById = (id) => {
// 打开弹窗 // 打开弹窗
const addEdit = (type,row,index) =>{ const addEdit = (type,row,index) =>{
showAdd.value.init(type,row,index) showPeo.value = true;
nextTick(()=>{
showAdd.value.init(type,row,index)
})
} }
// 新增人员 // 新增人员

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog v-model="showDialog" :destroy-on-close="true" :title="title+'人员'" @close="close" :close-on-click-modal="false"> <el-dialog v-model="modelValue" :destroy-on-close="true" :title="title+'人员'" @close="close" :close-on-click-modal="false">
<FormMessage v-model="listQuery" :formList="formData" labelWidth="120px" ref="elform" :rules="rules"> <FormMessage v-model="listQuery" :formList="formData" labelWidth="120px" ref="elform" :rules="rules">
<template #bqList> <template #bqList>
<div class="marks pointer" @click="chooseMarksVisible = true"> <div class="marks pointer" @click="chooseMarksVisible = true">
@ -29,11 +29,14 @@ const props = defineProps({
type:Object, type:Object,
default:{} default:{}
}, },
modelValue:{
type:Boolean,
default:false
}
}) })
const chooseMarksVisible = ref(false) const chooseMarksVisible = ref(false)
const roleIds = ref([]) const roleIds = ref([])
const elform = ref() const elform = ref()
const showDialog = ref(false)
const emit = defineEmits(['change']) const emit = defineEmits(['change'])
const listQuery = ref({}) const listQuery = ref({})
const formData = ref([ const formData = ref([
@ -41,7 +44,7 @@ const formData = ref([
{ label: "性别", prop: "xb", type: "select",options:props.dic.D_BZ_XB ,width:'48%'}, { label: "性别", prop: "xb", type: "select",options:props.dic.D_BZ_XB ,width:'48%'},
{ label: "身份证号", prop: "sfzh", type: "input" ,width:'48%'}, { label: "身份证号", prop: "sfzh", type: "input" ,width:'48%'},
{ label: "户籍地", prop: "hjdz", type: "input",width:'48%' }, { label: "户籍地", prop: "hjdz", type: "input",width:'48%' },
{ label: "户籍地派出所", prop: "hjdpcsdm", type: "department" ,width:'48%'}, { label: "户籍地派出所", prop: "hjdpcsdm",depMc:'hjdpcs', type: "department" ,width:'48%'},
{ label: "标签", prop: "bqList", type: "slot",width:'100%' }, { label: "标签", prop: "bqList", type: "slot",width:'100%' },
{ label: "是否挑头人", prop: "sfttr", type: "select",options:props.dic.D_BZ_SF ,width:'48%'}, { label: "是否挑头人", prop: "sfttr", type: "select",options:props.dic.D_BZ_SF ,width:'48%'},
{ label: "是否响应人", prop: "sfxyr", type: "select" ,options:props.dic.D_BZ_SF,width:'48%' }, { label: "是否响应人", prop: "sfxyr", type: "select" ,options:props.dic.D_BZ_SF,width:'48%' },
@ -60,7 +63,6 @@ const order = ref(null)
const init = (type,row,index) =>{ const init = (type,row,index) =>{
title.value = type == 'add' ? '新增' :'编辑'; title.value = type == 'add' ? '新增' :'编辑';
order.value = index; order.value = index;
showDialog.value = true;
if(row) listQuery.value = {...row}; if(row) listQuery.value = {...row};
} }
@ -82,13 +84,13 @@ const submitForm = () =>{
elform.value.submit((val)=>{ elform.value.submit((val)=>{
let obj = { data:val,type:title.value ,index:order.value} let obj = { data:val,type:title.value ,index:order.value}
emit('change',obj) emit('change',obj)
showDialog.value = false; emit('update:modelValue',false)
}) })
} }
const close = () =>{ const close = () =>{
elform.value.reset(); elform.value.reset();
showDialog.value = false; emit('update:modelValue',false)
} }
defineExpose({init}) defineExpose({init})

View File

@ -1,108 +0,0 @@
<template>
<el-dialog v-model="modelValue" :destroy-on-close="true" :title="title+'人员'" @close="close" :close-on-click-modal="false">
<FormMessage v-model="listQuery" :formList="formData" labelWidth="120px" ref="elform" :rules="rules">
<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 >
<el-tag @close.stop="closeTag(idx)" type="success" closable v-for="(it,idx) in listQuery.bqList" :key="idx">{{ it.bqMc }}</el-tag >
</span>
</div>
</template>
</FormMessage>
<template #footer>
<div class="flex just-center">
<el-button @click="close">取消</el-button>
<el-button type="primary" @click="submitForm">确认</el-button>
</div>
</template>
</el-dialog>
<ChooseMarks v-model="chooseMarksVisible" @choosed="choosed" :roleIds="roleIds" />
</template>
<script setup>
import ChooseMarks from "@/components/ChooseList/ChooseMarks/index.vue";
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { reactive, ref } from 'vue';
const props = defineProps({
dic:{
type:Object,
default:{}
},
modelValue:{
type:Boolean,
default:false
}
})
const chooseMarksVisible = ref(false)
const roleIds = ref([])
const elform = ref()
const emit = defineEmits(['change','update:modelValue'])
const listQuery = ref({})
const formData = ref([
{ label: "姓名", prop: "xm", type: "input" ,width:'48%'},
{ label: "性别", prop: "xb", type: "select",options:props.dic.D_BZ_XB ,width:'48%'},
{ label: "身份证号", prop: "sfzh", type: "input" ,width:'48%'},
{ label: "户籍地", prop: "hjdz", type: "input",width:'48%' },
{ label: "户籍地派出所", prop: "hjdpcsdm",depMc:'hjdpcs', type: "department" ,width:'48%'},
{ label: "标签", prop: "bqList", type: "slot",width:'100%' },
{ label: "是否挑头人", prop: "sfttr", type: "select",options:props.dic.D_BZ_SF ,width:'48%'},
{ label: "是否响应人", prop: "sfxyr", type: "select" ,options:props.dic.D_BZ_SF,width:'48%' },
{ label: "所属群体", prop: "ssqt", type: "input" ,width:'48%'},
{ label: "微信号", prop: "wx", type: "input" ,width:'48%'},
{ label: "QQ", prop: "qq", type: "input" ,width:'48%'},
])
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" }],
})
const title = ref('')
const order = ref(null)
const init = (type,row,index) =>{
title.value = type == 'add' ? '新增' :'编辑';
order.value = index;
if(type == 'edit') listQuery.value = JSON.parse(JSON.stringify(row))
}
// 选择标签
const choosed = (val) => {
listQuery.value.bqList = val.map(v=>{
return { bqDm:v.bqDm, bqId:v.id, bqLb:v.bqLb, bqLx:v.bqLx, bqMc:v.bqMc }
});
roleIds.value = val.map(v=>v.id)
}
// 删除数据
const closeTag = (idx) =>{
listQuery.value.bqList.splice(idx,1)
roleIds.value.splice(idx,1)
}
const submitForm = () =>{
elform.value.submit((val)=>{
let obj = { data:val,type:title.value ,index:order.value}
emit('change',obj);
emit('update:modelValue',false);
})
}
const close = () =>{
elform.value.reset();
showDialog.value = false;
}
defineExpose({init})
</script>
<style lang="scss" scoped>
.marks{
width: 100%;
width: 100%;
min-height: 32px;
border: 1px solid #e9e9e9;
border-radius: 4px;
}
</style>

View File

@ -57,7 +57,7 @@
<script setup> <script setup>
import * as MOSTY from "@/components/MyComponents/index"; import * as MOSTY from "@/components/MyComponents/index";
import AddPeo from './addPeo.vue' import AddPeo from '@/components/addPerson/index.vue'
import MyTable from "@/components/aboutTable/MyTable.vue"; import MyTable from "@/components/aboutTable/MyTable.vue";
import FormMessage from "@/components/aboutTable/FormMessage.vue"; import FormMessage from "@/components/aboutTable/FormMessage.vue";
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js"; import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";