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

@ -49,13 +49,13 @@
</MyTable>
</div>
<!-- 人员 -->
<AddPeo ref="showAdd" :dic="props.dic" ></AddPeo>
<AddPeo ref="showAdd" v-if="showPerson" v-model="showPerson" :dic="props.dic" ></AddPeo>
</div>
</template>
<script setup>
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 FormMessage from "@/components/aboutTable/FormMessage.vue";
import { qcckGet } from "@/api/qcckApi.js";
@ -111,6 +111,7 @@ const pageForm = reactive({
]
});
const showAdd = ref()
const showPerson = ref(false)
onMounted(()=>{
tabHeightFn()
})
@ -135,7 +136,10 @@ const getDataById = (id) => {
// 打开弹窗
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>