更新
This commit is contained in:
@ -51,7 +51,7 @@
|
||||
</MyTable>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@ -110,6 +110,7 @@ const pageForm = reactive({
|
||||
]
|
||||
});
|
||||
const showAdd = ref()
|
||||
const showPeo = ref(false)
|
||||
onMounted(()=>{
|
||||
tabHeightFn()
|
||||
})
|
||||
@ -135,7 +136,10 @@ const getDataById = (id) => {
|
||||
|
||||
// 打开弹窗
|
||||
const addEdit = (type,row,index) =>{
|
||||
showAdd.value.init(type,row,index)
|
||||
showPeo.value = true;
|
||||
nextTick(()=>{
|
||||
showAdd.value.init(type,row,index)
|
||||
})
|
||||
}
|
||||
|
||||
// 新增人员
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<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">
|
||||
<template #bqList>
|
||||
<div class="marks pointer" @click="chooseMarksVisible = true">
|
||||
@ -29,11 +29,14 @@ const props = defineProps({
|
||||
type:Object,
|
||||
default:{}
|
||||
},
|
||||
modelValue:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
}
|
||||
})
|
||||
const chooseMarksVisible = ref(false)
|
||||
const roleIds = ref([])
|
||||
const elform = ref()
|
||||
const showDialog = ref(false)
|
||||
const emit = defineEmits(['change'])
|
||||
const listQuery = 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: "sfzh", 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: "sfttr", 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) =>{
|
||||
title.value = type == 'add' ? '新增' :'编辑';
|
||||
order.value = index;
|
||||
showDialog.value = true;
|
||||
if(row) listQuery.value = {...row};
|
||||
}
|
||||
|
||||
@ -82,13 +84,13 @@ const submitForm = () =>{
|
||||
elform.value.submit((val)=>{
|
||||
let obj = { data:val,type:title.value ,index:order.value}
|
||||
emit('change',obj)
|
||||
showDialog.value = false;
|
||||
emit('update:modelValue',false)
|
||||
})
|
||||
}
|
||||
|
||||
const close = () =>{
|
||||
elform.value.reset();
|
||||
showDialog.value = false;
|
||||
emit('update:modelValue',false)
|
||||
}
|
||||
|
||||
defineExpose({init})
|
||||
|
||||
Reference in New Issue
Block a user