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

View File

@ -9,9 +9,9 @@
<!-- 数值 number--> <!-- 数值 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" /> <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--> <!--选择 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 --> <!-- 部门department -->
<template v-else-if="item.showType === 'department'"> <template v-else-if="item.type === 'department'">
<MOSTY.Department clearable v-model="listQuery[item.prop]" /> <MOSTY.Department clearable v-model="listQuery[item.prop]" />
</template> </template>
@ -27,8 +27,8 @@
<!-- 时间选择 --> <!-- 时间选择 -->
<el-time-picker v-else-if="item.type == 'time'" v-model="listQuery[item.prop]" placeholder="选择时间" style="width:100%;" /> <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 == '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 == '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 == '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%;" /> <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 searchBox = ref();
const pageData = reactive({ const pageData = reactive({
tableData: [ tableData: [],
{nrbh:'测试内容',lx:'1',nr:'测试内容'},
{nrbh:'测试内容',lx:'1',nr:'测试内容'},
],
tableData2: [], tableData2: [],
keyCount: 0, keyCount: 0,
tableConfiger: { tableConfiger: {

View File

@ -221,22 +221,4 @@ const tabHeightFn = () => {
} }
</style> </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> </div>
<div class="form_cnt"> <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>
</div> </div>
</template> </template>
<script setup> <script setup>
import { IdCard } from "@/utils/validate.js";
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";
import * as rule from "@/utils/rules.js"; import * as rule from "@/utils/rules.js";
import { ref, defineExpose, reactive, onMounted, defineEmits, getCurrentInstance, nextTick } from "vue"; import { ref, defineExpose, reactive, onMounted, defineEmits, getCurrentInstance, nextTick } from "vue";
const emit = defineEmits(["updateDate"]); const emit = defineEmits(["updateDate"]);
const props = defineProps({ 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 { proxy } = getCurrentInstance();
const dialogForm = ref(false); //弹窗 const dialogForm = ref(false); //弹窗
const formData = ref([ const formData = ref([
{ label: "管线部门", prop: "gxbm", type: "input" }, { label: "管部门", prop: "gxbmDm", type: "department" },
{ label: "所属辖区", prop: "ssxq", type: "input", }, { label: "姓名", prop: "ryXm", type: "input" },
{ label: "信息员姓名", prop: "xm", type: "input" }, { label: "联系电话", prop: "ryLxdh", type: "input" },
{ label: "身份证号", prop: "sfzh", type: "input" }, { label: "身份证号", prop: "rySfzh", type: "input" },
{ label: "性别", prop: "xb", type: "select", options: [] }, { label: "出生日期", prop: "ryCsrq", type: "date" },
{ label: "年龄", prop: "age", type: "input" }, { label: "性别", prop: "ryXb", type: "select", options:props.dic.D_BZ_XB },
{ label: "联系方式", prop: "lxfs", type: "input" }, { label: "民族", prop: "ryMz", type: "select", options:props.dic.D_BZ_MZ },
{ label: "考核得分", prop: "kgdf", type: "input" }, { 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({ const listQuery = ref({}); //表单
sfbqdj: []
}); //表单
const loading = ref(false); const loading = ref(false);
const elform = ref(); const elform = ref();
const title = ref(""); const title = ref("");
const rules = reactive({ 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(() => {}); onMounted(() => {});
// 初始化数据 // 初始化数据
const init = (type, row,) => { const init = (type, row,) => {
dialogForm.value = true; dialogForm.value = true;
@ -53,21 +102,21 @@ const init = (type, row,) => {
}; };
// 根据id查询详情 // 根据id查询详情
const getDataById = (id) => { const getDataById = (id) => {
// qcckGet({}, '/mosty-gsxt/tbGsxtBqgl/'+id).then((res) => { qcckGet({}, '/mosty-gsxt/tbGsxtJwry/'+id).then((res) => {
// listQuery.value = res; listQuery.value = res;
// }); });
}; };
// 提交 // 提交
const submit = () => { const submit = () => {
elform.value.submit((data)=>{ elform.value.submit((data)=>{
// let url = title.value == "新增" ? '/mosty-gsxt/tbGsxtBqgl/save':'/mosty-gsxt/tbGsxtBqgl/update'; let url = title.value == "新增" ? '/mosty-gsxt/tbGsxtJwry/save':'/mosty-gsxt/tbGsxtJwry/update';
// let params = { ...data } let params = { ...data,ryLx: '01' }
// qcckPost(params, url).then((res) => { qcckPost(params, url).then((res) => {
// proxy.$message({ type: "success", message: title.value + "成功" }); proxy.$message({ type: "success", message: title.value + "成功" });
// emit("updateDate"); emit("updateDate");
// close(); close();
// }).catch(() => {}); }).catch(() => {});
}); });
}; };

View File

@ -18,7 +18,7 @@
</div> </div>
<!-- 搜索 --> <!-- 搜索 -->
<div ref="searchBox"> <div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" @reset="onReset" :key="pageData.keyCount"/> <Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"/>
</div> </div>
<!-- 表格 --> <!-- 表格 -->
<div class="tabBox"> <div class="tabBox">
@ -30,11 +30,13 @@
:tableConfiger="pageData.tableConfiger" :tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth" :controlsWidth="pageData.controlsWidth"
@chooseData="chooseData"> @chooseData="chooseData">
<template #ryMz="{ row }">
<DictTag :tag="false" :value="row.ryMz" :options="D_BZ_MZ" />
</template>
<!-- 操作 --> <!-- 操作 -->
<template #controls="{ row }"> <template #controls="{ row }">
<el-link size="small" type="success" @click="addEdit('edit', row)">编辑</el-link> <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="danger" @click="deleteRow(row.id)">删除</el-link>
<el-link size="small" type="primary" @click="viewDetails(row)">查看</el-link>
</template> </template>
</MyTable> </MyTable>
<Pages <Pages
@ -48,7 +50,7 @@
></Pages> ></Pages>
</div> </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> </div>
</template> </template>
@ -59,18 +61,17 @@ import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue"; import Search from "@/components/aboutTable/Search.vue";
import DetailForm from "./components/addForm.vue"; import DetailForm from "./components/addForm.vue";
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js"; 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 { CirclePlus, Upload, Download } from '@element-plus/icons-vue';
import { ElMessage } from 'element-plus'; import { ElMessage } from 'element-plus';
const { proxy } = getCurrentInstance(); 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 detailDiloag = ref();
const searchBox = ref(); //搜索框 const searchBox = ref(); //搜索框
const show = ref(false)
const searchConfiger = ref([ const searchConfiger = ref([
{ label: "管辖部门", prop: 'department', placeholder: "请选择管辖部门", showType: "select" }, { label: "姓名", prop: 'ryXm', placeholder: "请输入姓名", showType: "input" },
{ label: "所属辖区", prop: 'area', placeholder: "请选择所属辖区", showType: "select" }, { label: "身份证号", prop: 'rySfzh', placeholder: "请输入身份证号", showType: "input" },
{ label: "姓名", prop: 'name', placeholder: "请输入姓名", showType: "input" },
{ label: "身份证号", prop: 'idCard', placeholder: "请输入身份证号", showType: "input" },
]); ]);
const pageData = reactive({ const pageData = reactive({
@ -78,7 +79,7 @@ const pageData = reactive({
keyCount: 0, keyCount: 0,
tableConfiger: { tableConfiger: {
rowHieght: 61, rowHieght: 61,
showSelectType: "checkBox", showSelectType: "null",
loading: false loading: false
}, },
total: 0, total: 0,
@ -86,21 +87,13 @@ const pageData = reactive({
pageSize: 20, pageSize: 20,
pageCurrent: 1 pageCurrent: 1
}, },
controlsWidth: 120, controlsWidth: 200,
tableColumn: [ tableColumn: [
{ label: "序号", type: "index", width: 60 }, { label: "姓名", prop: "ryXm" },
{ label: "所属辖区", prop: "area" }, { label: "联系电话", prop: "ryLxdh" },
{ label: "信息员姓名", prop: "name" }, { label: "身份证号", prop: "rySfzh" },
{ label: "身份证号", prop: "idCard" }, { label: "民族", prop: "ryMz",showSolt: true },
{ label: "性别", prop: "gender" }, { label: "居住地址", prop: "jzdDz" },
{ 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" },
] ]
}) })
@ -111,12 +104,6 @@ onMounted(() => {
tabHeightFn(); tabHeightFn();
}); });
//选择类型
const handleType = (val) => {
pageData.keyCount++;
pageData.pageConfiger.pageCurrent = 1;
getList()
}
// 搜索 // 搜索
const onSearch = (val) =>{ const onSearch = (val) =>{
queryFrom.value = {...val} queryFrom.value = {...val}
@ -124,12 +111,6 @@ const onSearch = (val) =>{
getList() getList()
} }
const onReset = () => {
queryFrom.value = {}
pageData.pageConfiger.pageCurrent = 1;
getList()
}
const changeNo = (val) =>{ const changeNo = (val) =>{
pageData.pageConfiger.pageNum = val; pageData.pageConfiger.pageNum = val;
getList() getList()
@ -140,20 +121,32 @@ const changeSize = (val) =>{
} }
// 获取列表 // 获取列表
const getList = (val) =>{ const getList = () =>{
// pageData.tableConfiger.loading = true; pageData.tableConfiger.loading = true;
let data = { ...pageData.pageConfiger, ...queryFrom.value }; let data = { ...pageData.pageConfiger, ...queryFrom.value };
// let url = '/mosty-lzcj/tbDwMbkf/queryList'; qcckGet(data,'/mosty-gsxt/tbGsxtJwry/selectPage').then(res=>{
// qcckPost(data,url).then(res=>{ pageData.tableData = res.records || [];
// pageData.tableData = res.records || []; pageData.total = res.total;
// pageData.total = res.total; pageData.tableConfiger.loading = false;
// pageData.tableConfiger.loading = false; }).catch(()=>{ 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) => { 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> </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> </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 DialogList from '@/views/backOfficeSystem/fourColorManage/components/dialogList.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";
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 emit = defineEmits(["updateDate"]);
const props = defineProps({ const props = defineProps({
type:String, type:String,
@ -39,8 +39,8 @@ const dialogForm = ref(false); //弹窗
const formData = reactive([ const formData = reactive([
{ label: "标签名称", prop: "bqMc", type: "input" }, { label: "标签名称", prop: "bqMc", type: "input" },
{ label: "标签代码", prop: "bqDm", type: "input" }, { label: "标签代码", prop: "bqDm", type: "input" },
{ label: "标签等级", prop: "bqDj", type: "select", options: [] }, { label: "标签等级", prop: "bqDj", type: "select", options: props.dic.D_GS_BQ_DJ },
{ label: "标签颜色", prop: "bqYs", type: "select", options: [] }, { label: "标签颜色", prop: "bqYs", type: "select", options: props.dic.D_GS_SSYJ },
{ label: "标签分值", prop: "bqFz", type: "number" ,max:100}, { label: "标签分值", prop: "bqFz", type: "number" ,max:100},
{ label: "标签说明", prop: "bqSm", type: "textarea",width: '100%' }, { label: "标签说明", prop: "bqSm", type: "textarea",width: '100%' },
]); ]);
@ -53,12 +53,6 @@ const rules = reactive({
bqFz: [{ required: true, message: "请输入标签分值", trigger: ['blur','change'] }], 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,) => { const init = (type, row,) => {

View File

@ -51,7 +51,7 @@
></Pages> ></Pages>
</div> </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> </div>
</template> </template>
@ -62,14 +62,14 @@ import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue"; import Search from "@/components/aboutTable/Search.vue";
import EditAddForm from "./components/editAddForm.vue"; import EditAddForm from "./components/editAddForm.vue";
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js"; 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"; import { da } from "element-plus/es/locale.mjs";
const { proxy } = getCurrentInstance(); 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 { 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 detailDiloag = ref();
const searchBox = ref(); //搜索框 const searchBox = ref(); //搜索框
const type = ref('标签大类') const type = ref('标签大类')
const show = ref(false)
const searchConfiger = ref([ const searchConfiger = ref([
{ label: "标签名称",prop:'bqMc',placeholder: "请输入标签名称", showType: "input"}, { label: "标签名称",prop:'bqMc',placeholder: "请输入标签名称", showType: "input"},
{ label: "标签等级",prop:'bqDj' ,placeholder: "请选择标签等级", showType: "select",options:D_GS_BQ_DJ }, { label: "标签等级",prop:'bqDj' ,placeholder: "请选择标签等级", showType: "select",options:D_GS_BQ_DJ },
@ -160,7 +160,10 @@ const delDictItem = (id) =>{
// 新增 // 新增
const addEdit = (type, row) => { 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 DialogList from '@/views/backOfficeSystem/fourColorManage/components/dialogList.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";
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 emit = defineEmits(["updateDate"]);
const props = defineProps({ const props = defineProps({
type:String, type:String,
@ -39,8 +39,8 @@ const dialogForm = ref(false); //弹窗
const formData = reactive([ const formData = reactive([
{ label: "标签名称", prop: "bqMc", type: "input" }, { label: "标签名称", prop: "bqMc", type: "input" },
{ label: "标签代码", prop: "bqDm", type: "input" }, { label: "标签代码", prop: "bqDm", type: "input" },
{ label: "标签等级", prop: "bqDj", type: "select", options: [] }, { label: "标签等级", prop: "bqDj", type: "select", options: props.dic.D_GS_BQ_DJ },
{ label: "标签颜色", prop: "bqYs", type: "select", options: [] }, { label: "标签颜色", prop: "bqYs", type: "select", options: props.dic.D_GS_SSYJ },
{ label: "标签分值", prop: "bqFz", type: "number" ,max:100}, { label: "标签分值", prop: "bqFz", type: "number" ,max:100},
{ label: "标签说明", prop: "bqSm", type: "textarea",width: '100%' }, { label: "标签说明", prop: "bqSm", type: "textarea",width: '100%' },
]); ]);
@ -53,13 +53,6 @@ const rules = reactive({
bqFz: [{ required: true, message: "请输入标签分值", trigger: ['blur','change'] }], 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,) => { const init = (type, row,) => {
title.value = type == 'add' ? "新增" : "编辑"; title.value = type == 'add' ? "新增" : "编辑";

View File

@ -51,7 +51,7 @@
></Pages> ></Pages>
</div> </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> </div>
</template> </template>
@ -62,13 +62,13 @@ import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue"; import Search from "@/components/aboutTable/Search.vue";
import EditAddForm from "./components/editAddForm.vue"; import EditAddForm from "./components/editAddForm.vue";
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js"; 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 { 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 { 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 detailDiloag = ref();
const searchBox = ref(); //搜索框 const searchBox = ref(); //搜索框
const type = ref('标签大类') const type = ref('标签大类')
const show = ref(false)
const searchConfiger = ref([ const searchConfiger = ref([
{ label: "标签名称",prop:'bqMc',placeholder: "请输入标签名称", showType: "input"}, { label: "标签名称",prop:'bqMc',placeholder: "请输入标签名称", showType: "input"},
{ label: "标签等级",prop:'bqDj' ,placeholder: "请选择标签等级", showType: "select",options:D_GS_BQ_DJ }, { label: "标签等级",prop:'bqDj' ,placeholder: "请选择标签等级", showType: "select",options:D_GS_BQ_DJ },
@ -159,7 +159,10 @@ const delDictItem = (id) =>{
// 新增 // 新增
const addEdit = (type, row) => { 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 DialogList from '@/views/backOfficeSystem/fourColorManage/components/dialogList.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";
import { ref, defineExpose,defineProps, reactive, defineEmits, getCurrentInstance, watchEffect } from "vue"; import { ref, defineExpose,defineProps, reactive, defineEmits, getCurrentInstance } from "vue";
const emit = defineEmits(["updateDate"]); const emit = defineEmits(["updateDate"]);
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const props = defineProps({ const props = defineProps({
@ -97,8 +97,8 @@ const dialogForm = ref(false); //弹窗
const formData = reactive([ const formData = reactive([
{ label: "组合标签名称", prop: "bqMc", type: "input"}, { label: "组合标签名称", prop: "bqMc", type: "input"},
{ label: "组合标签代码", prop: "bqDm", type: "input"}, { label: "组合标签代码", prop: "bqDm", type: "input"},
{ label: "标签等级", prop: "bqDj", type: "select", options: [] }, { label: "标签等级", prop: "bqDj", type: "select", options: props.dic.D_GS_BQ_DJ },
{ label: "标签颜色", prop: "bqYs", type: "select", options: [] }, { label: "标签颜色", prop: "bqYs", type: "select", options: props.dic.D_GS_SSYJ },
{ label: "组合标签分值", prop: "bqFz", type: "input"}, { label: "组合标签分值", prop: "bqFz", type: "input"},
{ label: "组合标签说明", prop: "bqSm", type: "input"}, { label: "组合标签说明", prop: "bqSm", type: "input"},
{ label: "身份标签细类", prop: "sfbqIdList", type: "slot",width: '100%', }, { label: "身份标签细类", prop: "sfbqIdList", type: "slot",width: '100%', },
@ -112,13 +112,6 @@ const rules = reactive({
xwbqIdList : [{ required: true, message: "请选择行为标签细类", trigger: "change" }], 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({ const tableDate = reactive({
sfbqIdList: [], //表格数据 sfbqIdList: [], //表格数据
xwbqIdList: [], //表格数据 xwbqIdList: [], //表格数据

View File

@ -54,7 +54,7 @@
></Pages> ></Pages>
</div> </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> </div>
</template> </template>
@ -65,10 +65,11 @@ import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue"; import Search from "@/components/aboutTable/Search.vue";
import EditAddForm from "./components/editAddForm.vue"; import EditAddForm from "./components/editAddForm.vue";
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js"; 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 { 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 { 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 detailDiloag = ref();
const show = ref(false)
const searchBox = ref(); //搜索框 const searchBox = ref(); //搜索框
const searchConfiger = ref( const searchConfiger = ref(
[ [
@ -144,7 +145,10 @@ const delDictItem = (id) =>{
// 新增 // 新增
const addEdit = (type, row) => { const addEdit = (type, row) => {
detailDiloag.value.init(type, row,); show.value = true;
nextTick(()=>{
detailDiloag.value.init(type, row,);
})
}; };