From 0accc5528a676e4dc85241439ed0068a72364237 Mon Sep 17 00:00:00 2001 From: herenshan112 Date: Fri, 21 Mar 2025 10:25:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A7=92=E8=89=B2=E5=92=8C?= =?UTF-8?q?=E5=B2=97=E4=BD=8D=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/api/api/index.ts | 16 + src/api/hr/org/index.ts | 20 + src/api/role/index.ts | 9 + src/components/DesignForm/app/index.vue | 51 + src/components/DesignForm/assembly/index.ts | 42 +- .../DesignForm/formControlPropertiNew.vue | 130 ++- .../DesignForm/public/expand/pickpost.vue | 232 +++++ .../DesignForm/public/expand/pickrole.vue | 51 + .../DesignForm/public/form/formItem.vue | 21 +- .../DesignForm/public/form/web/childTable.vue | 543 +++++----- .../DesignForm/tableListPage/index.vue | 61 +- src/components/WangEditor/Untitled-1.html | 39 + .../lowcodepage/appPage/MoveAppMenus.vue | 126 +++ .../lowcodepage/appPage/appMenus.vue | 34 +- .../appPage/appPageForm/openAppFormPage.vue | 958 +++++++++--------- .../appPage/appPageForm/pageForm.vue | 4 + .../appPage/appPageForm/pageList.vue | 197 +++- 18 files changed, 1694 insertions(+), 841 deletions(-) create mode 100644 src/components/DesignForm/public/expand/pickpost.vue create mode 100644 src/components/DesignForm/public/expand/pickrole.vue create mode 100644 src/components/WangEditor/Untitled-1.html create mode 100644 src/views/sysworkflow/lowcodepage/appPage/MoveAppMenus.vue diff --git a/package.json b/package.json index 87ba042..f833ca4 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "5.1.10", "@wecom/jssdk": "^1.3.2", + "appsys": "file:", "axios": "^1.4.0", "clipboard": "^2.0.11", "compressorjs": "^1.2.1", diff --git a/src/api/api/index.ts b/src/api/api/index.ts index b21a350..581df61 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -11,3 +11,19 @@ import request from '@/utils/request'; data: data }); } + + +export function gainAppGroupMenus(data?: any) { + return request({ + url: "/systemapi/app/gainAppGroupMenus", + method: "POST", + data: data + }); +} +export function moveAppMenus(data?: any) { + return request({ + url: "/systemapi/app/moveAppMenus", + method: "POST", + data: data + }); +} diff --git a/src/api/hr/org/index.ts b/src/api/hr/org/index.ts index 58ac199..581b309 100644 --- a/src/api/hr/org/index.ts +++ b/src/api/hr/org/index.ts @@ -275,3 +275,23 @@ export function getTeamListCont(data: searchTeamList): AxiosPromise { const transformOption = (val: string | number, type?: string) => { return formatNumber(val); }; + +const readerColumnSun = (column: any) => { + let labelLong = 0; // 表头label长度 + if (column) { + labelLong = column.length; + } + if (labelLong > 0) { + let countLenght = 3; + column.forEach((item: any) => { + if (item.label.length < 3) { + countLenght = countLenght + 90; + } else { + countLenght = countLenght + item.label.length * 40; + } + }); + console.log("表头label长度-->", countLenght); + return countLenght; + } else { + return 420; + } +}; + + + + + (), { formConfig: () => { @@ -59,6 +60,9 @@ const props = withDefaults( formField: () => { return []; }, + sunFormField: () => { + return []; + }, formOtherData: () => { // 其他不需要保存在formData里的数据 return {}; @@ -1110,12 +1114,20 @@ watch( const fileSignAry = reactive([]); const controlChange = (obj: any, val: any) => { - console.log("字段编辑--1--》", obj); - console.log("字段编辑--2--》", obj.eventName); - console.log("字段编辑--3--》", val); - console.log("字段编辑--4--》", controlData.value); - console.log("字段编辑--5--》", obj.path); - + // console.log("字段编辑--1--》", obj); + // console.log("字段编辑--2--》", obj.eventName); + // console.log("字段编辑--3--》", val); + // console.log("字段编辑--4--》", controlData.value); + // console.log("字段编辑--5--》", obj.path); + // console.log("字段编辑--6--》", props.formField); + // console.log("字段编辑--7--》", controlData.value.name); + // console.log("字段编辑--8--》", props.sunFormField); + + // console.log( + // "字段编辑--9--》", + // Array.isArray(props.sunFormField) && + // !props.sunFormField.includes(controlData.value.name) + // ); // select多选属性, switch (obj.eventName) { case "selectMultiple": @@ -1168,26 +1180,54 @@ const controlChange = (obj: any, val: any) => { Array.isArray(props.formField) && !props.formField.includes(controlData.value.name) ) { - chineseToPinyin({ - title: val, - types: 8, - connector: "", - formJson: JSON.stringify(props.formInfo), - }).then((data: any) => { - if (data.code == 0) { - if (data.data != "") { - if (!fileSignAry.includes(data.data)) { - if (controlData.value.type == "table") { - controlData.value.name = "table_" + data.data; + if ( + Array.isArray(props.sunFormField) && + !props.sunFormField.includes(controlData.value.name) + ) { + chineseToPinyin({ + title: val, + types: 8, + connector: "", + formJson: JSON.stringify(props.formInfo), + }).then((data: any) => { + if (data.code == 0) { + if (data.data != "") { + if (!fileSignAry.includes(data.data)) { + if (controlData.value.type == "table") { + controlData.value.name = "table_" + data.data; + } else { + controlData.value.name = data.data; + } + + fileSignAry.push(data.data); } else { - controlData.value.name = data.data; + let isEnd = true; + do { + let titleVal = data.data + Rand(10000000, 99999999); + if (!fileSignAry.includes(titleVal)) { + // controlData.value.name = titleVal; + if (controlData.value.type == "table") { + controlData.value.name = "table_" + titleVal; + } else { + controlData.value.name = titleVal; + } + + fileSignAry.push(titleVal); + isEnd = false; + } + } while (isEnd); } - - fileSignAry.push(data.data); } else { - let isEnd = true; - do { - let titleVal = data.data + Rand(10000000, 99999999); + if (!fileSignAry.includes(val)) { + if (controlData.value.type == "table") { + controlData.value.name = "table_" + val; + } else { + controlData.value.name = val; + } + // controlData.value.name = val; + fileSignAry.push(val); + } else { + let titleVal = val + Rand(10000000, 99999999); if (!fileSignAry.includes(titleVal)) { // controlData.value.name = titleVal; if (controlData.value.type == "table") { @@ -1195,36 +1235,13 @@ const controlChange = (obj: any, val: any) => { } else { controlData.value.name = titleVal; } - fileSignAry.push(titleVal); - isEnd = false; - } - } while (isEnd); - } - } else { - if (!fileSignAry.includes(val)) { - if (controlData.value.type == "table") { - controlData.value.name = "table_" + val; - } else { - controlData.value.name = val; - } - // controlData.value.name = val; - fileSignAry.push(val); - } else { - let titleVal = val + Rand(10000000, 99999999); - if (!fileSignAry.includes(titleVal)) { - // controlData.value.name = titleVal; - if (controlData.value.type == "table") { - controlData.value.name = "table_" + titleVal; - } else { - controlData.value.name = titleVal; } - fileSignAry.push(titleVal); } } } - } - }); + }); + } } } // chineseToPinyin({title:val,types:8,connector:"",formJson:JSON.stringify(props.formInfo)}) @@ -1749,6 +1766,7 @@ const eventClick = (type: string, tooltip?: string) => { }; getDataSource(); defineExpose({ getFormFieldBySource, saveRefreshFormControlAttr }); + //判断输入框是否可写 const isNotWrite = (val: any) => { // console.log("判断输入框是否可写--->",val,props.customerformid) @@ -1762,8 +1780,8 @@ const isNotWrite = (val: any) => { return false; }; const isNotWriteWord = (val: any) => { - // console.log("isNotWriteWord---->",val) - // console.log("isNotWriteWord--formField-->",props.formField) + // console.log("isNotWriteWord---->", val); + // console.log("isNotWriteWord--formField-->", props.formField); if ( val.eventName === "filedNameKey" && props.customerformid != "" && @@ -1771,9 +1789,15 @@ const isNotWriteWord = (val: any) => { Array.isArray(props.formField) && props.formField.includes(val.value) ) { - // if(props.formField.includes(val.value)){ - return true; - // } + if ( + props.sunFormField && + Array.isArray(props.sunFormField) && + props.sunFormField.includes(val.value) + ) { + return true; + } else { + return false; + } } return false; }; diff --git a/src/components/DesignForm/public/expand/pickpost.vue b/src/components/DesignForm/public/expand/pickpost.vue new file mode 100644 index 0000000..83e917b --- /dev/null +++ b/src/components/DesignForm/public/expand/pickpost.vue @@ -0,0 +1,232 @@ + + + + diff --git a/src/components/DesignForm/public/expand/pickrole.vue b/src/components/DesignForm/public/expand/pickrole.vue new file mode 100644 index 0000000..73ef0c2 --- /dev/null +++ b/src/components/DesignForm/public/expand/pickrole.vue @@ -0,0 +1,51 @@ + + + + diff --git a/src/components/DesignForm/public/form/formItem.vue b/src/components/DesignForm/public/form/formItem.vue index 6df8a90..898605f 100644 --- a/src/components/DesignForm/public/form/formItem.vue +++ b/src/components/DesignForm/public/form/formItem.vue @@ -35,6 +35,8 @@ import DatePickerPage from "@/components/DesignForm/public/expand/datePicker.vue import CascaderPage from "@/components/DesignForm/public/expand/cascader.vue"; import AssociatedForms from "@/widget/associatedforms/index.vue"; import TreeSelectPage from "@/components/DesignForm/public/expand/treeSelect.vue"; +import PickPost from "@/components/DesignForm/public/expand/pickpost.vue"; +import PickRole from "@/components/DesignForm/public/expand/pickrole.vue"; import AKSelect from "./select.vue"; import { uploadUrl, getRequest } from "@/api/DesignForm"; @@ -216,6 +218,13 @@ const currentComponent = computed(() => { return markRaw(TreeSelectPage); } + if (props.data.type === "pickpost") { + return markRaw(PickPost); + } + if (props.data.type === "pickrole") { + return markRaw(PickRole); + } + if (props.data.type === "switch") { if (typeof props.data.control.activeValue === "number") { props.data.control.activeValue = props.data.control.activeValue.toString(); @@ -994,6 +1003,7 @@ const diGuiJilian = (val: any, options: any[]) => { };