From 71d982035cfe0620deff1434688c60fba6c69c9a Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Wed, 26 Jun 2024 16:59:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=AD=97=E6=AE=B5=E4=BD=9C?= =?UTF-8?q?=E4=B8=BA=E9=80=89=E9=A1=B9v0.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/DesignForm/requestapi.ts | 11 +++++++ src/components/DesignForm/app/index.vue | 2 +- .../DesignForm/public/form/formItem.vue | 13 ++------ .../DesignForm/tableListPage/index.vue | 3 +- .../sysworkflow/lowcodepage/appFormList.vue | 1 + .../appPage/appPageForm/openAppFormPage.vue | 30 ++++++++++++++++++- .../appPage/appPageForm/pageForm.vue | 4 +-- .../lowcodepage/pageFlow/appTableFlow.vue | 1 - .../lowcodepage/runApp/runAppForm.vue | 24 ++++++++++++++- 9 files changed, 72 insertions(+), 17 deletions(-) diff --git a/src/api/DesignForm/requestapi.ts b/src/api/DesignForm/requestapi.ts index 510901f56..8d6043d15 100644 --- a/src/api/DesignForm/requestapi.ts +++ b/src/api/DesignForm/requestapi.ts @@ -544,3 +544,14 @@ export function afreshAppSubmit(data: any) { data: data }); } + +//动态获取关联的系统字段数据作为单选下拉多选的选项 +export function getFieldRecord(param1: any) { + return request({ + url: '/javasys/lowCode/AssociatedForms/getFieldRecord', + method: 'post', + data: { + optionsValue3Field:param1 + }, + }); +} diff --git a/src/components/DesignForm/app/index.vue b/src/components/DesignForm/app/index.vue index 5a10c97cf..db0f59c70 100644 --- a/src/components/DesignForm/app/index.vue +++ b/src/components/DesignForm/app/index.vue @@ -322,7 +322,7 @@ onMounted(()=>{ */ const judjeRadio = (val: any, options: any[]) => { // console.log("判断单选值",val, options) - if(options.length > 0){ + if(options && options.length > 0){ options.forEach((item)=>{ if(item.value == val){ console.log("判断单选值",val, item.value,item.label) diff --git a/src/components/DesignForm/public/form/formItem.vue b/src/components/DesignForm/public/form/formItem.vue index 593f0902c..90e39b4ce 100644 --- a/src/components/DesignForm/public/form/formItem.vue +++ b/src/components/DesignForm/public/form/formItem.vue @@ -286,18 +286,11 @@ const getAxiosOptions = debounce((data?: any) => { 在这里请求后台获取字段 */ getFieldRecord(props.data.control.optionsValue3Field).then(({ data }) => { - //console.log(data) - //console.log(props.data.name) + let fieldName = props.data.name - //console.log(options.value) - //options.value = data - /* - - - */ + emits('optionsValue3Get1',data,fieldName) - //console.log(options.value) - //console.log() + }) diff --git a/src/components/DesignForm/tableListPage/index.vue b/src/components/DesignForm/tableListPage/index.vue index 9238dc605..be9061914 100644 --- a/src/components/DesignForm/tableListPage/index.vue +++ b/src/components/DesignForm/tableListPage/index.vue @@ -236,6 +236,7 @@ const selectionChange = (row: any) => { @ 功能: 获取表格头内容 */ const columnsFilter = computed(() => { + if (!state.columnsCheck?.length) { return props.data.columns } else { @@ -311,7 +312,7 @@ onMounted(()=>{ */ const judjeRadio = (val: any, options: any[]) => { // console.log("判断单选值",val, options) - if(options.length > 0){ + if(options && options.length > 0){ options.forEach((item)=>{ if(item.value == val){ console.log("判断单选值",val, item.value,item.label) diff --git a/src/views/sysworkflow/lowcodepage/appFormList.vue b/src/views/sysworkflow/lowcodepage/appFormList.vue index b7a402796..2463eb6aa 100644 --- a/src/views/sysworkflow/lowcodepage/appFormList.vue +++ b/src/views/sysworkflow/lowcodepage/appFormList.vue @@ -173,6 +173,7 @@ const lookFormList = (val:any) => { versionTitle.value = val.name let stateData = string2json(val.listjson) + console.log(val.listjson) console.log("查看表单列表---->",stateData) state.tableData = stateData.tableData state.searchData = stateData.searchData diff --git a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue index 53c5e7995..7edbc91fe 100644 --- a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue +++ b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue @@ -5,7 +5,7 @@ -->