From fb218fd3540f5efe0be1da8f27bf72a85e35678a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BB=95=E5=B5=A9?= <17854119262@163.com> Date: Thu, 16 May 2024 18:00:29 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=A1=A8=E6=A0=BC=E9=A1=B5=E9=9D=A2=E6=A0=91?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E4=BF=AE=E6=AD=A3=E3=80=812.=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=9F=BA=E7=A1=80=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E5=92=8C=E6=8E=A7=E4=BB=B6=E8=AE=BE=E7=BD=AE=E7=9A=84?= =?UTF-8?q?bug=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/demo/formScheme.ts | 2 +- .../VFormDesign/components/ComponentProps.vue | 4 +- .../components/VFormDesign/index.vue | 57 +++++++++++-------- .../components/VFormItem/index.vue | 1 - .../demo/form-design/core/formItemConfig.ts | 45 +++++++-------- .../demo/onlineform/formModule/FormModal.vue | 1 - .../onlineform/formModule/config/columns.vue | 2 +- .../demo/onlineform/formModule/index.vue | 15 ++++- .../onlineform/formModule/modalDesign.vue | 51 ++++++++++------- .../onlineform/formModule/modalForm-Modal.vue | 3 +- .../demo/onlineform/formModule/modalForm.vue | 5 +- .../demo/onlineform/formdesign/index.vue | 15 ++++- .../formdesign/modal/AutomaticModal.vue | 3 +- 13 files changed, 123 insertions(+), 81 deletions(-) diff --git a/src/api/demo/formScheme.ts b/src/api/demo/formScheme.ts index 47324c86..aeb8dea0 100644 --- a/src/api/demo/formScheme.ts +++ b/src/api/demo/formScheme.ts @@ -88,7 +88,7 @@ export function functionLoadFormSort(params: AccountParams) { export function functionAddFormSort(params: FromSortModel) { return defHttp.post({ - url: Api.AddFormSort, + url: Api.AddFormSort + '?code=FormSort', params, }); } diff --git a/src/views/demo/form-design/components/VFormDesign/components/ComponentProps.vue b/src/views/demo/form-design/components/VFormDesign/components/ComponentProps.vue index 945dafed..9b4feff5 100644 --- a/src/views/demo/form-design/components/VFormDesign/components/ComponentProps.vue +++ b/src/views/demo/form-design/components/VFormDesign/components/ComponentProps.vue @@ -171,7 +171,7 @@ }); }; const handleFieldTableChange = (e) => { - console.log('cccccc', e); + // console.log('cccccc', e); fieldTableValue.value = e; fetch(); inputOptions.value.forEach((item) => { @@ -289,6 +289,8 @@ if (func) { func(formConfig.value.currentItem!.componentProps, allOptions.value); } + fieldTableValue.value = formConfig.value?.currentItem?.componentProps?.dataTable; + handleFieldTableChange(formConfig.value?.currentItem?.componentProps?.dataTable); }, { immediate: true, diff --git a/src/views/demo/form-design/components/VFormDesign/index.vue b/src/views/demo/form-design/components/VFormDesign/index.vue index 6e757ee7..b1e9405e 100644 --- a/src/views/demo/form-design/components/VFormDesign/index.vue +++ b/src/views/demo/form-design/components/VFormDesign/index.vue @@ -4,37 +4,39 @@ :class="`left ${prefixCls}-sider`" collapsible collapsedWidth="0" - width="270" + width="300" :zeroWidthTriggerStyle="{ 'margin-top': '-70px', 'background-color': 'gray', }" breakpoint="md" > - - - - - - - - - +
+ + + + + + + + + +
diff --git a/src/views/demo/form-design/components/VFormItem/index.vue b/src/views/demo/form-design/components/VFormItem/index.vue index 70290d97..e8844fec 100644 --- a/src/views/demo/form-design/components/VFormItem/index.vue +++ b/src/views/demo/form-design/components/VFormItem/index.vue @@ -23,7 +23,6 @@ v-else-if="schema.component == 'Divider' && schema.label && !formItemProps.hiddenLabel" >{{ schema.label }} -
123
diff --git a/src/views/demo/form-design/core/formItemConfig.ts b/src/views/demo/form-design/core/formItemConfig.ts index 305d086a..d3d23f6c 100644 --- a/src/views/demo/form-design/core/formItemConfig.ts +++ b/src/views/demo/form-design/core/formItemConfig.ts @@ -8,43 +8,42 @@ import { ComponentType } from '@/components/Form/src/types'; import { componentMap as Cmp } from '../components'; import { Component } from 'vue'; -import { getDeptList,getAccountList,getPosGroupList } from '@/api/demo/system'; +import { getDeptList, getAccountList, getPosGroupList } from '@/api/demo/system'; //获取部门列表数据 -const deptTreeData = await Promise.all([getDeptListData()]) -function getDeptListData(){ +const deptTreeData = await Promise.all([getDeptListData()]); +function getDeptListData() { let param = { page: 1, - limit: 9999 + limit: 9999, }; - return getDeptList( param ).then( data => { - return data - }) + return getDeptList(param).then((data) => { + return data; + }); } - //获取职级列表数据 -const positionTreeData = await Promise.all([getPositionListData()]) -function getPositionListData(){ +const positionTreeData = await Promise.all([getPositionListData()]); +function getPositionListData() { let param = { page: 1, - limit: 9999 + limit: 9999, }; - return getPosGroupList( param ).then( data => { - return data - }) + return getPosGroupList(param).then((data) => { + return data; + }); } //获取人员选择列表数据 -const userTreeData = await Promise.all([getUserListData()]) -function getUserListData(){ +const userTreeData = await Promise.all([getUserListData()]); +function getUserListData() { let param = { page: 1, - limit: 9999 + limit: 9999, }; - return getAccountList( param ).then( data => { - return data.items - }) + return getAccountList(param).then((data) => { + return data.items; + }); } - + const componentMap = new Map(); //如果有其它控件,可以在这里初始化 @@ -98,7 +97,7 @@ export const customComponents: IVFormComponent[] = [ field: '', colProps: { span: 24 }, componentProps: { - fieldNames:{ + fieldNames: { children: 'children', label: 'name', value: 'id', @@ -113,7 +112,7 @@ export const customComponents: IVFormComponent[] = [ field: '', colProps: { span: 24 }, componentProps: { - fieldNames:{ + fieldNames: { children: 'children', label: 'name', value: 'id', diff --git a/src/views/demo/onlineform/formModule/FormModal.vue b/src/views/demo/onlineform/formModule/FormModal.vue index cc207e56..f369b62c 100644 --- a/src/views/demo/onlineform/formModule/FormModal.vue +++ b/src/views/demo/onlineform/formModule/FormModal.vue @@ -181,7 +181,6 @@ let sysModuleElement: any = []; if (config.table.btns) { config.table.btns.forEach((t) => { - console.log(t); let temp: any = {}; temp.id = ''; temp.domId = t.prop; diff --git a/src/views/demo/onlineform/formModule/config/columns.vue b/src/views/demo/onlineform/formModule/config/columns.vue index f4628528..750f72de 100644 --- a/src/views/demo/onlineform/formModule/config/columns.vue +++ b/src/views/demo/onlineform/formModule/config/columns.vue @@ -73,7 +73,7 @@ }); // config - const config = inject('formConfig'); + const config: any = inject('formConfig'); const columnsData = ref(config.table.columns); // 展开全部 const columnsTreeRef = ref>(null); diff --git a/src/views/demo/onlineform/formModule/index.vue b/src/views/demo/onlineform/formModule/index.vue index 1cb1958c..e8ca4d76 100644 --- a/src/views/demo/onlineform/formModule/index.vue +++ b/src/views/demo/onlineform/formModule/index.vue @@ -8,7 +8,8 @@ :searchInfo="searchInfo" >