This commit is contained in:
zy_zr 2025-04-29 15:45:52 +08:00
parent fcf9fa5420
commit 1fafd27208
14 changed files with 149 additions and 176 deletions

View File

@ -74,6 +74,7 @@ const endProps = {
const tableData = ref([]);
const getSysMenuTree = async () => {
const res = await selectDeptPage(listQuery.value);
debugger
tableData.value = res;
depList.value = res
};
@ -91,7 +92,6 @@ watch(
);
const emits = defineEmits(["update:modelValue",'getDepValue']);
const handleChange = (e) => {
console.log(e,'e');
if (props.multiple === true) {
const data = e.map((item) => {return item[item.length - 1];});
emits("update:modelValue", data);

View File

@ -9,9 +9,9 @@
<!-- 数值 number-->
<el-input-number v-model="listQuery[item.prop]" v-else-if="item.type == 'number'" style="width:100%" :min="item.min || 0" :max="item.max || 1000" />
<!--选择 select-->
<MOSTY.Select v-else-if="item.type == 'select'" :multiple="item.multiple" v-model="listQuery[item.prop]" :dictEnum="item.options" width="100%" clearable :placeholder="`请选择${item.label}`"/>
<MOSTY.Select v-else-if="item.type == 'select'" filterable :multiple="item.multiple" v-model="listQuery[item.prop]" :dictEnum="item.options" width="100%" clearable :placeholder="`请选择${item.label}`"/>
<!-- 部门department -->
<template v-else-if="item.showType === 'department'">
<template v-else-if="item.type === 'department'">
<MOSTY.Department clearable v-model="listQuery[item.prop]" />
</template>
@ -27,8 +27,8 @@
<!-- 时间选择 -->
<el-time-picker v-else-if="item.type == 'time'" v-model="listQuery[item.prop]" placeholder="选择时间" style="width:100%;" />
<el-date-picker v-else-if="item.type == 'date'" v-model="listQuery[item.prop]" type="date" value-format="YYYY-MM-DD" :placeholder="请选择时间" style="width:100%;" />
<el-date-picker v-else-if="item.type == 'datetime'" v-model="listQuery[item.prop]" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" :placeholder="请选择时间" style="width:100%;" />
<el-date-picker v-else-if="item.type == 'date'" v-model="listQuery[item.prop]" type="date" value-format="YYYY-MM-DD" placeholder="请选择日期" style="width:100%;" />
<el-date-picker v-else-if="item.type == 'datetime'" v-model="listQuery[item.prop]" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择时间" style="width:100%;" />
<el-date-picker v-else-if="item.type == 'datetimerange'" v-model="listQuery[item.prop]" type="datetimerange" :shortcuts="shortcuts" range-separator="To" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="选择开始时间" end-placeholder="选择结束时间" style="width:100%;" />
<el-date-picker v-else-if="item.type == 'daterange'" v-model="listQuery[item.prop]" type="daterange" range-separator="To" value-format="YYYY-MM-DD" start-placeholder="选择开始日期" end-placeholder="选择开始日期" style="width:100%;" />

View File

@ -153,10 +153,7 @@ const checkData = reactive({
});
const searchBox = ref();
const pageData = reactive({
tableData: [
{nrbh:'测试内容',lx:'1',nr:'测试内容'},
{nrbh:'测试内容',lx:'1',nr:'测试内容'},
],
tableData: [],
tableData2: [],
keyCount: 0,
tableConfiger: {

View File

@ -221,22 +221,4 @@ const tabHeightFn = () => {
}
</style>
//
const downloadAttachment = (row) => {
// TODO:
};
//
const previewAttachment = (row) => {
// TODO:
};
//
const deleteRow = (row) => {
// TODO:
};
// 线
const transferClue = (row) => {
// TODO: 线
};

View File

@ -8,43 +8,92 @@
</div>
</div>
<div class="form_cnt">
<FormMessage :formList="formData" ref="elform" :rules="rules"></FormMessage>
<FormMessage v-model="listQuery" :formList="formData" ref="elform" :rules="rules"></FormMessage>
</div>
</div>
</template>
<script setup>
import { IdCard } from "@/utils/validate.js";
import FormMessage from '@/components/aboutTable/FormMessage.vue'
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
import * as rule from "@/utils/rules.js";
import { ref, defineExpose, reactive, onMounted, defineEmits, getCurrentInstance, nextTick } from "vue";
const emit = defineEmits(["updateDate"]);
const props = defineProps({
dic: Object
dic: Object,
});
const validateIdentity = () => {
return (rule, value, callback) => {
if (!value) {
return callback(new Error('身份证号不能为空'));
} else if (!/(^\d{15}$)|(^\d{17}(\d|X|x)$)/.test(value)) {
callback(new Error("输入的身份证长度或格式错误"));
}
//
var aCity = {11: "北京",12: "天津",13: "河北",14: "山西",15: "内蒙古",21: "辽宁",22: "吉林",23: "黑龙江",31: "上海",32: "江苏",33: "浙江",34: "安徽",35: "福建",36: "江西",37: "山东",41: "河南",42: "湖北",43: "湖南",44: "广东",45: "广西",46: "海南",50: "重庆",51: "四川",52: "贵州",53: "云南",54: "西藏",61: "陕西",62: "甘肃",63: "青海",64: "宁夏",65: "新疆",71: "台湾",81: "香港",82: "澳门",91: "国外"};
if (!aCity[parseInt(value?.substr(0, 2))]) callback(new Error("身份证地区非法"));
//
var sBirthday = ( value.substr(6, 4) + "-" + Number(value.substr(10, 2)) + "-" + Number(value.substr(12, 2))).replace(/-/g, "-"),
d = new Date(sBirthday);
let yyyy = d.getFullYear();
let mm = d.getMonth() + 1;
let dd = d.getDate();
if (sBirthday !== yyyy + "-" + mm + "-" + dd) {
listQuery.value.ryCsrq= "";
callback(new Error("身份证上的出生日期非法"));
} else {
let month = mm < 10 ? "0" + mm : mm;
listQuery.value.ryCsrq= yyyy + "-" + month + "-" + dd;
}
//
var sum = 0, weights = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2], codes = "10X98765432";
for (var i = 0; i < value.length - 1; i++) {
sum += value[i] * weights[i];
}
var last = codes[sum % 11]; //
if (value[value.length - 1] !== last) {
listQuery.value.ryXb = ''
callback(new Error("输入的身份证号非法"));
} else {
if(value.length === 18){
listQuery.value.ryCsrq= IdCard(value,1)
listQuery.value.ryXb = parseInt(value.substr(16, 1)) % 2 === 1 ? "1" : "2";
}
}
callback();
};
};
const { proxy } = getCurrentInstance();
const dialogForm = ref(false); //
const formData = ref([
{ label: "管线部门", prop: "gxbm", type: "input" },
{ label: "所属辖区", prop: "ssxq", type: "input", },
{ label: "信息员姓名", prop: "xm", type: "input" },
{ label: "身份证号", prop: "sfzh", type: "input" },
{ label: "性别", prop: "xb", type: "select", options: [] },
{ label: "年龄", prop: "age", type: "input" },
{ label: "联系方式", prop: "lxfs", type: "input" },
{ label: "考核得分", prop: "kgdf", type: "input" },
{ label: "管辖部门", prop: "gxbmDm", type: "department" },
{ label: "姓名", prop: "ryXm", type: "input" },
{ label: "联系电话", prop: "ryLxdh", type: "input" },
{ label: "身份证号", prop: "rySfzh", type: "input" },
{ label: "出生日期", prop: "ryCsrq", type: "date" },
{ label: "性别", prop: "ryXb", type: "select", options:props.dic.D_BZ_XB },
{ label: "民族", prop: "ryMz", type: "select", options:props.dic.D_BZ_MZ },
{ label: "学历", prop: "ryXl", type: "select", options: props.dic.D_BZ_WHCD },
{ label: "政治面貌", prop: "ryZzmm", type: "select", options: props.dic.D_BZ_ZZMM },
{ label: "所在单位", prop: "rySzdw", type: "input" },
{ label: "居住地地址", prop: "jzdDz", type: "textarea",width:'100%' },
]);
const listQuery = ref({
sfbqdj: []
}); //
const listQuery = ref({}); //
const loading = ref(false);
const elform = ref();
const title = ref("");
const rules = reactive({
rwbt: [{ required: true, message: "请输入任务标题", trigger: "blur" }]
gxbmDm: [{ required: true, message: "请选择管辖部门", trigger: "change" }],
ryXm: [{ required: true, message: "请输入人员姓名", trigger: "blur" }],
rySfzh: [
{ required: true, message: "请输入人员身份证号", trigger: ["blur",'change'] },
{ trigger: ["blur",'change'], validator: validateIdentity()}
],
...rule.phoneRule({ require: true, validator: true }, "ryLxdh"), //
});
const editpeo = ref();
onMounted(() => {});
//
const init = (type, row,) => {
dialogForm.value = true;
@ -53,21 +102,21 @@ const init = (type, row,) => {
};
// id
const getDataById = (id) => {
// qcckGet({}, '/mosty-gsxt/tbGsxtBqgl/'+id).then((res) => {
// listQuery.value = res;
// });
qcckGet({}, '/mosty-gsxt/tbGsxtJwry/'+id).then((res) => {
listQuery.value = res;
});
};
//
const submit = () => {
elform.value.submit((data)=>{
// let url = title.value == "" ? '/mosty-gsxt/tbGsxtBqgl/save':'/mosty-gsxt/tbGsxtBqgl/update';
// let params = { ...data }
// qcckPost(params, url).then((res) => {
// proxy.$message({ type: "success", message: title.value + "" });
// emit("updateDate");
// close();
// }).catch(() => {});
let url = title.value == "新增" ? '/mosty-gsxt/tbGsxtJwry/save':'/mosty-gsxt/tbGsxtJwry/update';
let params = { ...data,ryLx: '01' }
qcckPost(params, url).then((res) => {
proxy.$message({ type: "success", message: title.value + "成功" });
emit("updateDate");
close();
}).catch(() => {});
});
};

View File

@ -18,7 +18,7 @@
</div>
<!-- 搜索 -->
<div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" @reset="onReset" :key="pageData.keyCount"/>
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"/>
</div>
<!-- 表格 -->
<div class="tabBox">
@ -30,11 +30,13 @@
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
@chooseData="chooseData">
<template #ryMz="{ row }">
<DictTag :tag="false" :value="row.ryMz" :options="D_BZ_MZ" />
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-link size="small" type="success" @click="addEdit('edit', row)">编辑</el-link>
<el-link size="small" type="danger" @click="deleteRow(row)">删除</el-link>
<el-link size="small" type="primary" @click="viewDetails(row)">查看</el-link>
<el-link size="small" type="danger" @click="deleteRow(row.id)">删除</el-link>
</template>
</MyTable>
<Pages
@ -48,7 +50,7 @@
></Pages>
</div>
<!-- 详情 -->
<DetailForm ref="detailDiloag" />
<DetailForm v-if="show" @updateDate="getList" ref="detailDiloag" :dic="{D_BZ_WHCD,D_BZ_MZ, D_BZ_XB,D_BZ_ZZMM}" />
</div>
</template>
@ -59,18 +61,17 @@ import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
import DetailForm from "./components/addForm.vue";
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
import { CirclePlus, Upload, Download } from '@element-plus/icons-vue';
import { ElMessage } from 'element-plus';
const { proxy } = getCurrentInstance();
const { D_BZ_WHCD,D_BZ_MZ, D_BZ_XB,D_BZ_ZZMM } = proxy.$dict("D_BZ_WHCD",'D_BZ_MZ','D_BZ_XB','D_BZ_ZZMM'); //
const detailDiloag = ref();
const searchBox = ref(); //
const show = ref(false)
const searchConfiger = ref([
{ label: "管辖部门", prop: 'department', placeholder: "请选择管辖部门", showType: "select" },
{ label: "所属辖区", prop: 'area', placeholder: "请选择所属辖区", showType: "select" },
{ label: "姓名", prop: 'name', placeholder: "请输入姓名", showType: "input" },
{ label: "身份证号", prop: 'idCard', placeholder: "请输入身份证号", showType: "input" },
{ label: "姓名", prop: 'ryXm', placeholder: "请输入姓名", showType: "input" },
{ label: "身份证号", prop: 'rySfzh', placeholder: "请输入身份证号", showType: "input" },
]);
const pageData = reactive({
@ -78,7 +79,7 @@ const pageData = reactive({
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "checkBox",
showSelectType: "null",
loading: false
},
total: 0,
@ -86,21 +87,13 @@ const pageData = reactive({
pageSize: 20,
pageCurrent: 1
},
controlsWidth: 120,
controlsWidth: 200,
tableColumn: [
{ label: "序号", type: "index", width: 60 },
{ label: "所属辖区", prop: "area" },
{ label: "信息员姓名", prop: "name" },
{ label: "身份证号", prop: "idCard" },
{ label: "性别", prop: "gender" },
{ label: "年龄", prop: "age" },
{ label: "民族", prop: "nation" },
{ label: "居住地址", prop: "address", width: 200 },
{ label: "居住地派出所", prop: "policeStation" },
{ label: "联系方式", prop: "contact" },
{ label: "考核得分", prop: "khdf" },
{ label: "奖惩说明", prop: "jcsm" },
{ label: "审批状态", prop: "spzt" },
{ label: "姓名", prop: "ryXm" },
{ label: "联系电话", prop: "ryLxdh" },
{ label: "身份证号", prop: "rySfzh" },
{ label: "民族", prop: "ryMz",showSolt: true },
{ label: "居住地址", prop: "jzdDz" },
]
})
@ -111,12 +104,6 @@ onMounted(() => {
tabHeightFn();
});
//
const handleType = (val) => {
pageData.keyCount++;
pageData.pageConfiger.pageCurrent = 1;
getList()
}
//
const onSearch = (val) =>{
queryFrom.value = {...val}
@ -124,12 +111,6 @@ const onSearch = (val) =>{
getList()
}
const onReset = () => {
queryFrom.value = {}
pageData.pageConfiger.pageCurrent = 1;
getList()
}
const changeNo = (val) =>{
pageData.pageConfiger.pageNum = val;
getList()
@ -140,20 +121,32 @@ const changeSize = (val) =>{
}
//
const getList = (val) =>{
// pageData.tableConfiger.loading = true;
const getList = () =>{
pageData.tableConfiger.loading = true;
let data = { ...pageData.pageConfiger, ...queryFrom.value };
// let url = '/mosty-lzcj/tbDwMbkf/queryList';
// qcckPost(data,url).then(res=>{
// pageData.tableData = res.records || [];
// pageData.total = res.total;
// pageData.tableConfiger.loading = false;
// }).catch(()=>{ pageData.tableConfiger.loading = false; })
qcckGet(data,'/mosty-gsxt/tbGsxtJwry/selectPage').then(res=>{
pageData.tableData = res.records || [];
pageData.total = res.total;
pageData.tableConfiger.loading = false;
}).catch(()=>{ pageData.tableConfiger.loading = false; })
}
//
const deleteRow = (id) =>{
proxy.$confirm("确定要删除", "警告", {type: "warning"}).then(() => {
qcckDelete({}, '/mosty-gsxt/tbGsxtJwry/'+id).then(()=>{
proxy.$message({ type: "success", message: "删除成功" });
getList();
})
}).catch(() => {});
}
//
const addEdit = (type, row) => {
detailDiloag.value.init(type, row);
show.value = true;
nextTick(()=>{
detailDiloag.value.init(type, row);
})
};
//

View File

@ -162,22 +162,3 @@ const tabHeightFn = () => {
}
</style>
//
const downloadAttachment = (row) => {
// TODO:
};
//
const previewAttachment = (row) => {
// TODO:
};
//
const deleteRow = (row) => {
// TODO:
};
// 线
const transferClue = (row) => {
// TODO: 线
};

View File

@ -195,22 +195,3 @@ const tabHeightFn = () => {
}
</style>
//
const downloadAttachment = (row) => {
// TODO:
};
//
const previewAttachment = (row) => {
// TODO:
};
//
const deleteRow = (row) => {
// TODO:
};
// 线
const transferClue = (row) => {
// TODO: 线
};

View File

@ -23,7 +23,7 @@
import DialogList from '@/views/backOfficeSystem/fourColorManage/components/dialogList.vue'
import FormMessage from '@/components/aboutTable/FormMessage.vue'
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
import { ref,defineProps, defineExpose, reactive, onMounted, defineEmits, getCurrentInstance, watchEffect } from "vue";
import { ref,defineProps, defineExpose, reactive, defineEmits, getCurrentInstance, } from "vue";
const emit = defineEmits(["updateDate"]);
const props = defineProps({
type:String,
@ -39,8 +39,8 @@ const dialogForm = ref(false); //弹窗
const formData = reactive([
{ label: "标签名称", prop: "bqMc", type: "input" },
{ label: "标签代码", prop: "bqDm", type: "input" },
{ label: "标签等级", prop: "bqDj", type: "select", options: [] },
{ label: "标签颜色", prop: "bqYs", type: "select", options: [] },
{ label: "标签等级", prop: "bqDj", type: "select", options: props.dic.D_GS_BQ_DJ },
{ label: "标签颜色", prop: "bqYs", type: "select", options: props.dic.D_GS_SSYJ },
{ label: "标签分值", prop: "bqFz", type: "number" ,max:100},
{ label: "标签说明", prop: "bqSm", type: "textarea",width: '100%' },
]);
@ -53,12 +53,6 @@ const rules = reactive({
bqFz: [{ required: true, message: "请输入标签分值", trigger: ['blur','change'] }],
});
watchEffect(()=>{
if(props.dic){
formData[2].options = props.dic.D_GS_BQ_DJ;
formData[3].options = props.dic.D_GS_SSYJ;
}
})
//
const init = (type, row,) => {

View File

@ -51,7 +51,7 @@
></Pages>
</div>
<!-- 编辑详情 -->
<EditAddForm ref="detailDiloag" :type="type" :dic="{D_GS_BQ_LX,D_GS_BQ_DJ,D_GS_SSYJ,D_GS_BQ_LB}" @updateDate="getList" />
<EditAddForm v-if="show" ref="detailDiloag" :type="type" :dic="{D_GS_BQ_LX,D_GS_BQ_DJ,D_GS_SSYJ,D_GS_BQ_LB}" @updateDate="getList" />
</div>
</template>
@ -62,14 +62,14 @@ import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
import EditAddForm from "./components/editAddForm.vue";
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
import { da } from "element-plus/es/locale.mjs";
const { proxy } = getCurrentInstance();
const { D_GS_BQ_DJ,D_GS_SSYJ,D_GS_BQ_LB,D_GS_BQ_LX } = proxy.$dict("D_GS_BQ_DJ","D_GS_SSYJ","D_GS_BQ_LB","D_GS_BQ_LX"); //
const detailDiloag = ref();
const searchBox = ref(); //
const type = ref('标签大类')
const show = ref(false)
const searchConfiger = ref([
{ label: "标签名称",prop:'bqMc',placeholder: "请输入标签名称", showType: "input"},
{ label: "标签等级",prop:'bqDj' ,placeholder: "请选择标签等级", showType: "select",options:D_GS_BQ_DJ },
@ -160,7 +160,10 @@ const delDictItem = (id) =>{
//
const addEdit = (type, row) => {
detailDiloag.value.init(type, row);
show.value = true;
nextTick(()=>{
detailDiloag.value.init(type, row);
})
};
//

View File

@ -23,7 +23,7 @@
import DialogList from '@/views/backOfficeSystem/fourColorManage/components/dialogList.vue'
import FormMessage from '@/components/aboutTable/FormMessage.vue'
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
import { ref,defineProps, defineExpose, reactive, onMounted, defineEmits, getCurrentInstance, watchEffect } from "vue";
import { ref,defineProps, defineExpose, reactive, onMounted, defineEmits, getCurrentInstance } from "vue";
const emit = defineEmits(["updateDate"]);
const props = defineProps({
type:String,
@ -39,8 +39,8 @@ const dialogForm = ref(false); //弹窗
const formData = reactive([
{ label: "标签名称", prop: "bqMc", type: "input" },
{ label: "标签代码", prop: "bqDm", type: "input" },
{ label: "标签等级", prop: "bqDj", type: "select", options: [] },
{ label: "标签颜色", prop: "bqYs", type: "select", options: [] },
{ label: "标签等级", prop: "bqDj", type: "select", options: props.dic.D_GS_BQ_DJ },
{ label: "标签颜色", prop: "bqYs", type: "select", options: props.dic.D_GS_SSYJ },
{ label: "标签分值", prop: "bqFz", type: "number" ,max:100},
{ label: "标签说明", prop: "bqSm", type: "textarea",width: '100%' },
]);
@ -53,13 +53,6 @@ const rules = reactive({
bqFz: [{ required: true, message: "请输入标签分值", trigger: ['blur','change'] }],
});
watchEffect(()=>{
if(props.dic){
formData[2].options = props.dic.D_GS_BQ_DJ;
formData[3].options = props.dic.D_GS_SSYJ;
}
})
//
const init = (type, row,) => {
title.value = type == 'add' ? "新增" : "编辑";

View File

@ -51,7 +51,7 @@
></Pages>
</div>
<!-- 编辑详情 -->
<EditAddForm ref="detailDiloag" :type="type" :dic="{D_GS_BQ_LX,D_GS_BQ_DJ,D_GS_SSYJ,D_GS_BQ_LB}" @updateDate="getList" />
<EditAddForm v-if="show" ref="detailDiloag" :type="type" :dic="{D_GS_BQ_LX,D_GS_BQ_DJ,D_GS_SSYJ,D_GS_BQ_LB}" @updateDate="getList" />
</div>
</template>
@ -62,13 +62,13 @@ import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
import EditAddForm from "./components/editAddForm.vue";
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
const { proxy } = getCurrentInstance();
const { D_GS_BQ_DJ,D_GS_SSYJ,D_GS_BQ_LB,D_GS_BQ_LX } = proxy.$dict("D_GS_BQ_DJ","D_GS_SSYJ","D_GS_BQ_LB","D_GS_BQ_LX"); //
const detailDiloag = ref();
const searchBox = ref(); //
const type = ref('标签大类')
const show = ref(false)
const searchConfiger = ref([
{ label: "标签名称",prop:'bqMc',placeholder: "请输入标签名称", showType: "input"},
{ label: "标签等级",prop:'bqDj' ,placeholder: "请选择标签等级", showType: "select",options:D_GS_BQ_DJ },
@ -159,7 +159,10 @@ const delDictItem = (id) =>{
//
const addEdit = (type, row) => {
detailDiloag.value.init(type, row);
show.value = true;
nextTick(()=>{
detailDiloag.value.init(type, row);
})
};
//

View File

@ -83,7 +83,7 @@ import MyTable from "@/components/aboutTable/MyTable.vue";
import DialogList from '@/views/backOfficeSystem/fourColorManage/components/dialogList.vue'
import FormMessage from '@/components/aboutTable/FormMessage.vue'
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
import { ref, defineExpose,defineProps, reactive, defineEmits, getCurrentInstance, watchEffect } from "vue";
import { ref, defineExpose,defineProps, reactive, defineEmits, getCurrentInstance } from "vue";
const emit = defineEmits(["updateDate"]);
const { proxy } = getCurrentInstance();
const props = defineProps({
@ -97,8 +97,8 @@ const dialogForm = ref(false); //弹窗
const formData = reactive([
{ label: "组合标签名称", prop: "bqMc", type: "input"},
{ label: "组合标签代码", prop: "bqDm", type: "input"},
{ label: "标签等级", prop: "bqDj", type: "select", options: [] },
{ label: "标签颜色", prop: "bqYs", type: "select", options: [] },
{ label: "标签等级", prop: "bqDj", type: "select", options: props.dic.D_GS_BQ_DJ },
{ label: "标签颜色", prop: "bqYs", type: "select", options: props.dic.D_GS_SSYJ },
{ label: "组合标签分值", prop: "bqFz", type: "input"},
{ label: "组合标签说明", prop: "bqSm", type: "input"},
{ label: "身份标签细类", prop: "sfbqIdList", type: "slot",width: '100%', },
@ -112,13 +112,6 @@ const rules = reactive({
xwbqIdList : [{ required: true, message: "请选择行为标签细类", trigger: "change" }],
});
watchEffect(()=>{
if(props.dic){
formData[2].options = props.dic.D_GS_BQ_DJ;
formData[3].options = props.dic.D_GS_SSYJ;
}
})
const tableDate = reactive({
sfbqIdList: [], //
xwbqIdList: [], //

View File

@ -54,7 +54,7 @@
></Pages>
</div>
<!-- 编辑详情 -->
<EditAddForm ref="detailDiloag" :dic="{D_GS_BQ_LX,D_GS_BQ_DJ,D_GS_SSYJ,D_GS_BQ_LB}" @updateDate="getList" />
<EditAddForm v-if="show" ref="detailDiloag" :dic="{D_GS_BQ_LX,D_GS_BQ_DJ,D_GS_SSYJ,D_GS_BQ_LB}" @updateDate="getList" />
</div>
</template>
@ -65,10 +65,11 @@ import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
import EditAddForm from "./components/editAddForm.vue";
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
const { proxy } = getCurrentInstance();
const { D_GS_BQ_DJ,D_GS_SSYJ,D_GS_BQ_LB,D_GS_BQ_LX } = proxy.$dict("D_GS_BQ_DJ","D_GS_SSYJ","D_GS_BQ_LB","D_GS_BQ_LX"); //
const detailDiloag = ref();
const show = ref(false)
const searchBox = ref(); //
const searchConfiger = ref(
[
@ -144,7 +145,10 @@ const delDictItem = (id) =>{
//
const addEdit = (type, row) => {
detailDiloag.value.init(type, row,);
show.value = true;
nextTick(()=>{
detailDiloag.value.init(type, row,);
})
};