From e36426b5999f9db7bd7d3c62ae90c15c8b67d3b4 Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期四, 12 十二月 2024 10:44:51 +0800 Subject: [PATCH] 修改自定义url取值 --- Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-tree.vue | 6 +++--- Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-form.vue | 4 ++-- Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue | 1 + Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table-form.vue | 12 ++++-------- Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table.vue | 4 ++-- 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue index dc51274..bd6df19 100644 --- a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue +++ b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue @@ -199,6 +199,7 @@ : this.span, value: item.value || item.defaultValue, display: item.display || !item.hidden, + suffixIcon: item.suffixIcon || item.prefix, labelSuffix: item.labelSuffix || item.suffix, tip: item.tip || item.tooltips, dictCode: item.dictCode || item.comboxKey, diff --git a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-form.vue b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-form.vue index 10ec422..b181b70 100644 --- a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-form.vue +++ b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-form.vue @@ -182,8 +182,8 @@ if (Object.keys(this.sourceData).length > 0 && this.isShow && this.actionType != "add") { this.loading = true; let url='' - if(this.componentVO.bsCustQueryCLsOrUrl && this.componentVO.bsCustQueryCLsOrUrl.indexOf('/')!=-1){ - url=this.componentVO.bsCustQueryCLsOrUrl + if(this.componentVO.bsDataModel && this.componentVO.bsDataModel.indexOf('/')!=-1){ + url=this.componentVO.bsDataModel } dataForm(this.params, this.paramVOS.getdataurl || url, this.paramVOS.getdatamethod).then(res => { this.form = res.data.obj.data; diff --git a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table-form.vue b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table-form.vue index 1fe34cf..79fd34d 100644 --- a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table-form.vue +++ b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table-form.vue @@ -95,19 +95,15 @@ const typeValue = item.type === 'text' ? 'input' : item.type === 'combox' ? 'select' : item.type; return { + ...item, label: item.text, - prop: item.field, + prop: item.prop || item.field, type: typeValue, value: item.defaultValue, dicData: item.type === 'combox' ? item.dicData : item.dicUrl, - readonly: item.readOnly, - disabled: item.disabled, - labelSuffix: item.suffix, - suffixIcon: item.prefix, - placeholder:item.placeholder, - clearable:item.clearable, + suffixIcon: item.suffixIcon || item.prefix, + labelSuffix: item.labelSuffix || item.suffix, tip: item.tooltips, - keyAttr: item.keyAttr, rules: [{ required: item.required, message: `璇疯緭鍏�${item.text}!`, diff --git a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table.vue b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table.vue index 551742c..36bbd88 100644 --- a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table.vue +++ b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table.vue @@ -357,8 +357,8 @@ this.tableList = []; this.loading = true; let url=''; - if(this.componentVO.bsCustQueryCLsOrUrl && this.componentVO.bsCustQueryCLsOrUrl.indexOf('/')!=-1){ - url=this.componentVO.bsCustQueryCLsOrUrl; + if(this.componentVO.bsDataModel && this.componentVO.bsDataModel.indexOf('/')!=-1){ + url=this.componentVO.bsDataModel; } getList(page.currentPage, page.pageSize, Object.assign({},this.params,this.query,params),url).then(res => { let data = []; diff --git a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-tree.vue b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-tree.vue index 90313c3..475998f 100644 --- a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-tree.vue +++ b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-tree.vue @@ -250,9 +250,9 @@ || (node.data.attributes && node.data.attributes.btmname) || ''; const params = this.params; - let url='';debugger; - if(this.componentVO.bsCustQueryCLsOrUrl && this.componentVO.bsCustQueryCLsOrUrl.indexOf('/')!=-1){ - url=this.componentVO.bsCustQueryCLsOrUrl; + let url=''; + if(this.componentVO.bsDataModel && this.componentVO.bsDataModel.indexOf('/')!=-1){ + url=this.componentVO.bsDataModel; } if (node.level === 0) { params.queryRoot = true; -- Gitblit v1.9.3