From a4a7426f1286c8d8afe512f155fb650e3e8b940c Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期一, 02 十二月 2024 17:57:43 +0800 Subject: [PATCH] 整合代码&&表单定义扩展属性添加提示文字&&显示类型修改默认值和绑定值 --- Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue | 118 ++++++++++++++++++++++++++++++++++++----------------------- 1 files changed, 72 insertions(+), 46 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue index e78aadb..b921caf 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue @@ -56,6 +56,29 @@ <span v-else-if="form.searchTarger === '1'">婧愬璞�</span> <span v-else-if="form.searchTarger === '2'">鐩爣瀵硅薄</span> </template> + + <template slot="extAttrLabel" slot-scope="{}"> + <el-tooltip placement="top"> + <div slot="content">绀轰緥:ext1:xx;ext2;ext3:xx;ext4:xxx;extn:xxx; + <br/>1銆佺敤鑻变氦鍗婅鍒嗗彿:鍒嗛殧鍚勭粍鍊�; + <br/>2銆佹瘡缁勭敤鑻变氦鍗婅鍐掑彿:鍒嗛殧鍗曚竴鎵╁睍灞炴�у悕绉板強灞炴�у��; + <br/>3銆佸彲浠ュ畾涔変换鎰忕粍锛屼絾鎬诲瓧绗﹂暱搴︿笉寰楄秴杩�4000; + <br/>4銆佽緭鍏ユ椂锛屼笉瑕佹暡鍥炶溅鎹㈣; + </div> + <span>鎵╁睍灞炴�� <i class="el-icon-warning" style="color:red;"></i> </span> + </el-tooltip> + </template> + + <template slot="templateIdForm" slot-scope="{}"> + <el-select v-model="form.templateId" filterable placeholder="璇烽�夋嫨"> + <el-option + v-for="item in templateIdList" + :key="item.viName" + :label="item.viName" + :value="item.viName"> + </el-option> + </el-select> + </template> </avue-crud> <el-dialog v-dialogDrag @@ -216,7 +239,8 @@ delPageDefination, joinBtn, exitBtn, - updatePageDefination + updatePageDefination, + getPortalVIDatasByPage } from "@/api/UI/uiDefine"; import actionDialog from '@/views/modelingMenu/ui/Aciton/components/dialog'; import cloneDialog from "@/views/modelingMenu/ui/uiDefine/rightRegion/cloneDialog"; @@ -240,6 +264,8 @@ name: "index", data() { return { + templateIdList: [], + searchTargerChangeFlag: false, formBtnOid: '', sourceBtnOid: '', sourceOId: '', @@ -397,7 +423,7 @@ hide: true, }, { - label: '鎵╁睍灞炴��', + label: '', prop: 'extAttr', hide: true, }, @@ -469,7 +495,7 @@ dicData: [ { label: '涓嶆樉绀�', - value: '3' + value: '1' }, { label: '鏄剧ず瑙掕壊', @@ -477,7 +503,7 @@ }, { label: '鏄剧ずFolder', - value: '1', + value: '3', }, ], }, @@ -507,11 +533,15 @@ const obj = this.option.group[0].column.find(item => item.prop === 'linkType'); obj.display = val.value !== '1'; } - // 鍒囨崲娓呯┖妯℃澘绫诲瀷 - const list = ['showType', 'linkType', 'templateId', 'SubUILayout', 'queryTemplateName', 'searchObjType']; - // list.forEach(item => { - // this.form[item] = ''; - // }) + if (this.searchTargerChangeFlag) { + // 鍒囨崲娓呯┖妯℃澘绫诲瀷 + const list = ['showType', 'linkType', 'templateId', 'SubUILayout', 'queryTemplateName', 'searchObjType', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']; + list.forEach(item => { + this.form[item] = ''; + }) + } else { + this.searchTargerChangeFlag = true; + } } }, { @@ -534,6 +564,17 @@ placeholder: "璇疯緭鍏ュ唴瀹�", dicUrl: '/api/uiManagerController/getBtmDatasByPage?page=1&limit=-1', filterable: true, + change: (val) => { + console.log('val', val); + if (val) { + let params = { + 'conditionMap[selectBtmType]': this.form.searchTarger === '1' ? this.form.showType : this.form.linkType + } + getPortalVIDatasByPage(1, -1, params).then(res => { + this.templateIdList = res.data.data; + }) + } + }, props: { label: 'name', value: 'name', @@ -564,9 +605,7 @@ label: '閫夋嫨妯℃澘', prop: 'templateId', display: false, - type: 'select', - filterable: true, - dicUrl: '/api/uiManagerController/getPortalVIDatasByPage?page=1&limit=-1&conditionMap[selectBtmType]={{key}}', + formslot: true, rules: [ { required: true, @@ -574,11 +613,6 @@ trigger: 'submit' } ], - props: { - label: 'viName', - value: 'viName', - desc: 'viType' - }, }, { label: 'UI瀹氫箟', @@ -692,6 +726,20 @@ labelWidth: 135, span: 12 }, + { + label: 'B/S鑷畾涔夋煡璇�', + prop: 'bsCustQueryCLsOrUrl', + display: false, + labelWidth: 115, + span: 12 + }, + { + label: 'C/S鑷畾涔夋煡璇�', + prop: 'csCustQueryCLsOrUrl', + display: false, + labelWidth: 115, + span: 12 + }, ] }, { @@ -779,21 +827,11 @@ // 澧炲姞 addClickHandler() { - console.log(this.sourceData); if (!this.sourceData || !this.sourceData.plOId) { this.$message.error('璇峰湪涓婃柟閫夋嫨涓�鏉℃暟鎹悗杩涜娣诲姞'); return; } this.$refs.crud.rowAdd(); - }, - - // 缂栬緫鎵撳紑琛ㄥ崟鍓� - beforeOpen(done, type) { - // if (type === 'edit') { - // console.log('edit'); - // this.form.showType = 'Ludc'; - // } - done(); }, // 澧炲姞鍏抽棴瀵硅瘽妗� 娓呯┖event鏁扮粍 @@ -819,12 +857,10 @@ }); } this.$refs.crud.rowEdit(row); - console.log(this.form); }, // 鍒犻櫎 rowDeleteHandler(row) { - console.log(row); this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎鎵�閫夋嫨鐨勬暟鎹悧锛�', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', @@ -853,13 +889,11 @@ row.SubUIObjType = row.showType; row.showType = ""; } - console.log(this.sourceData); const params = { ...row, tabPageOId: this.sourceData.plOId } addPageDefination(params).then(res => { - console.log(res); if (res.data.code === 200) { this.$message.success(res.data.obj); this.getTableList(); @@ -870,18 +904,16 @@ }) }, - rowUpdateHandler(row,index,done,loading){ + rowUpdateHandler(row, index, done, loading) { if (row.templateType === '6') { row.SubUIObjType = row.showType; row.showType = ""; } - console.log(this.sourceData); const params = { ...row, tabPageOId: this.sourceData.plOId } updatePageDefination(params).then(res => { - console.log(res); if (res.data.code === 200) { this.$message.success(res.data.obj); this.getTableList(); @@ -943,7 +975,7 @@ // 妯℃澘绫诲瀷涓鸿〃鏍� templateTypeTable(val) { if (!val) return; - this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName']); + this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']); }, // 妯℃澘绫诲瀷涓鸿嚜瀹氫箟妯℃澘 @@ -957,13 +989,13 @@ // 妯℃澘绫诲瀷涓烘爲琛� templateTypeTreeTable(val) { if (!val) return; - this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'expandCols', 'expandMode']); + this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'expandCols', 'expandMode', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']); }, // 妯℃澘绫诲瀷涓鸿〃鍗� templateTypeForm(val) { if (!val) return; - this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName']); + this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']); }, // 妯℃澘绫诲瀷涓烘爲 @@ -971,7 +1003,7 @@ if (!val) return; const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // 鑾峰彇鎼滅储绫诲瀷閰嶇疆椤� searchTarger.display = false; // 涓嶅睍绀烘悳绱㈢被鍨� - this.updateDisplay(val, ['showType', 'queryTemplateName', 'rootContent', 'showAbs', 'showLinkAbs', 'separator', 'expandMode', 'linkType']); + this.updateDisplay(val, ['showType', 'queryTemplateName', 'rootContent', 'showAbs', 'showLinkAbs', 'separator', 'expandMode', 'linkType', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']); }, // 妯℃澘绫诲瀷涓篣I瀹氫箟 @@ -979,7 +1011,7 @@ if (!val) return; const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // 鑾峰彇鎼滅储绫诲瀷閰嶇疆椤� searchTarger.display = false; // 涓嶅睍绀烘悳绱㈢被鍨� - this.updateDisplay(val, ['showType', 'SubUILayout', 'searchType', 'searchObjType', 'queryTemplateName']); + this.updateDisplay(val, ['showType', 'SubUILayout', 'searchType', 'searchObjType', 'queryTemplateName', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']); }, // 鏌ユ壘鏁扮粍涓璞$储寮� @@ -1013,7 +1045,6 @@ this.$message.error('璇烽�夋嫨涓�鏉℃暟鎹�'); return; } - console.log(this.selectList); this.btnDesignVisible = true; this.formBtnOid = this.selectList[0].id; this.getTabBtnTree(); @@ -1059,7 +1090,7 @@ // 鎸夐挳璁捐淇℃伅鍙傛暟淇℃伅淇敼 paramsRowEditHandler(row) { - this.$refs.paramsCrud.rowEdit(row,row.$index); + this.$refs.paramsCrud.rowEdit(row, row.$index); }, // 鎸夐挳璁捐鍙傛暟淇℃伅娣诲姞鎸夐挳 @@ -1069,7 +1100,6 @@ // 鎸夐挳璁捐鍙傛暟淇℃伅淇敼淇濆瓨 paramsRowUpdate(row, index, done, loading) { - console.log(row,index); this.paramsData.splice(index, 1, row); done(); }, @@ -1179,7 +1209,6 @@ type: 'warning' }).then(() => { deleteTabButton(this.nodeTreeRow).then(res => { - // console.log(res); if (res.data.code === 200) { this.$message.success('鍒犻櫎鎴愬姛'); this.getTabBtnTree(); @@ -1222,7 +1251,6 @@ // 鎵撳紑鍏嬮殕瀵硅瘽妗� rowCloneHandler(row) { - console.log(row); this.fromOid = this.sourceData.plOId; this.sourceOId = row.id; this.$refs.cloneDialog.openDialog(row); @@ -1240,7 +1268,6 @@ return; } joinBtn(this.nodeTreeRow).then(res => { - // console.log(res); if (res.data.code === 200) { this.$message.success(res.data.obj); this.getTabBtnTree(); @@ -1254,7 +1281,6 @@ this.$message.error('璇烽�夋嫨鑺傜偣杩涜淇敼'); return; } - if (this.nodeTreeRow.oId === "parentNode") { this.$message.error('椤跺眰鑺傜偣涓嶅厑璁歌皟鏁�'); return; -- Gitblit v1.9.3