diff --git a/src/components/DesignForm/aceDrawer.vue b/src/components/DesignForm/aceDrawer.vue index 6eb6e27..b57d9f2 100644 --- a/src/components/DesignForm/aceDrawer.vue +++ b/src/components/DesignForm/aceDrawer.vue @@ -3,347 +3,390 @@ @ 时间: 2023-07-19 08:39:34 @ 备注: 抽屉 --> - - diff --git a/src/components/DesignForm/app/index.vue b/src/components/DesignForm/app/index.vue index 248f952..f75a530 100644 --- a/src/components/DesignForm/app/index.vue +++ b/src/components/DesignForm/app/index.vue @@ -113,6 +113,7 @@ const emits = defineEmits<{ (e: "selectionChange", row: any): void; (e: "btnClick", btn: any, row?: any): void; // 列表上面及表格列表里添加删除按钮事件 }>(); +const loadData = ref(false); const operState = ref(1); //操作状态 1:新增;2:重新发起;3:申请修改;4:提交审批;5:普通表单修改 const idList = ref([]); const designStore = useDesignFormStore(); @@ -271,7 +272,7 @@ const selectionChange = (row: any) => { @ 功能: 获取表格头内容 */ const columnsFilter = computed(() => { - // console.log("props.data判断是否有标题",props.data) + console.log("props.data判断是否有标题", props.data); if (!state.columnsCheck?.length) { // console.log("props.data判断是否有标题",props.data) return props.data.columns; @@ -631,6 +632,60 @@ const judjeRadio = (val: any, options: any[]) => { } return val; }; + +/** +@ 作者: 秦东 +@ 时间: 2024-11-29 13:46:36 +@ 功能: 获取级联选择值 +*/ +const judjeCascader = (val: any[], options: any[]) => { + if (val.length < 0) return ""; + let valAry = stringToObj(val); + console.log("获取级联选择值", stringToObj(val), val.length, options); + if (!Array.isArray(valAry)) return ""; + let title = ""; + valAry.forEach((item: any) => { + // console.log("item", item); + + console.log(item + "=============:", item, diGuiJilian(item, options)); + if (title == "") { + title = title + diGuiJilian(item, options); + } else { + title = title + " / " + diGuiJilian(item, options); + } + }); + return title; +}; +/** +@ 作者: 秦东 +@ 时间: 2024-11-29 13:57:04 +@ 功能: 递归查询数据 +*/ +const diGuiJilian = (val: any, options: any[]) => { + if (!Array.isArray(options)) return ""; + let dataVal = ""; + options.forEach((item: any) => { + if (item.value == val) { + // console.log(val + "=======递归查询数据======:", item.value, item.label); + dataVal = item.label; + // return dataVal; + // return item.label; + } + + if (item.children && item.children.length > 0) { + // console.log( + // val + "=======递归查询数据====1==:", + // item.children, + // item.children.length + // ); + let gdVal = diGuiJilian(val, item.children); + if (gdVal != "") { + dataVal = gdVal; + } + } + }); + return dataVal; +}; /** @ 作者: 秦东 @ 时间: 2024-04-02 14:49:40 @@ -1091,6 +1146,7 @@ const transformOption = (val: string | number, type?: string) => { :data="tableDataList" @selection-change="selectionChange" table-layout="fixed" + v-loading="state.loading" > +