更新
This commit is contained in:
@ -38,7 +38,7 @@ const formData = ref([
|
||||
{ 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: "hjdpcsdm",depMc:'hjdpcs', type: "department" ,width:'48%'},
|
||||
{ label: "特征描述", prop: "qtTzms", type: "input" ,width:'100%'},
|
||||
{ label: "人员标签", prop: "bqList", type: "slot" ,width:'100%'},
|
||||
{ label: "车牌号", prop: "clCph", type: "input" ,width:'45%'},
|
||||
|
@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
// 关闭
|
||||
|
@ -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>
|
@ -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})
|
||||
|
@ -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>
|
@ -57,7 +57,7 @@
|
||||
|
||||
<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, qcckPost, qcckPut } from "@/api/qcckApi.js";
|
||||
|
Reference in New Issue
Block a user