From 850dedca3754c8d29ce74bb4a850f9fc0e58d410 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期五, 26 五月 2023 19:09:43 +0800 Subject: [PATCH] 后端代码整合 --- Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue | 679 ++++++++++++++++++++++++++++++++------------------------ 1 files changed, 385 insertions(+), 294 deletions(-) diff --git a/Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue b/Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue index 40d4f9d..8fd0a67 100644 --- a/Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue +++ b/Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue @@ -10,7 +10,7 @@ style="height: 115vh; margin-top: -14vh; overflow-y: hidden"> <div style="width: 100%; overflow-y: auto; height: 70vh"> <el-row> - <avue-form ref="form" :option="formOption" v-model="form" class="referTypeForm"> + <avue-form :ref="formRefs[0]" :option="formOption" v-model="form" class="referTypeForm"> <template #referTypeName="{disabled,size}"> <el-input :disabled="disabled" :size="size" @@ -37,76 +37,101 @@ </template> </avue-form> </el-row> - <el-row v-show="form.type=='default' || form.type=='grid'"> - <avue-crud - ref="crudAttr" - class="crud-attr" - :option="attrOption" - @cell-click="clickAttrEdit" - :data="attrData"> - <!-- 琛ㄦ牸鍐呮搷浣滄寜閽� --> - <template slot="menu" slot-scope="scope"> - <el-button type="text" - size="small" - icon="el-icon-search" - plain - @click="scope.row.isquery=!scope.row.isquery"> - {{scope.row.isquery ? "鍙栨秷蹇�熸煡璇�":"蹇�熸煡璇�"}} - </el-button> - <el-button type="text" - size="small" - icon="el-icon-minus" - plain - @click="removeCurrentRow(scope.row,'removeAttr')">绉婚櫎 - </el-button> - </template> - <!-- 琛ㄦ牸宸︿笂鏂规寜閽尯鍩� --> - <template slot="menuLeft" slot-scope="scope"> - <el-button type="primary" - size="small" - icon="el-icon-plus" - @click="openSelectionTable('selectAttr')">閫夋嫨灞炴�� - </el-button> - <div class="tag-group" style="display: inline"> - <el-tag - v-for="item in attrData" - v-show="item.isquery && item.title!=''" - style="margin-left: 3px" - :key="item.title" - type="info" - size="small" - effect="dark"> - {{ item.title }} - </el-tag> - </div> - </template> - </avue-crud> - </el-row> - <el-row style="margin-top: 10px"> - <avue-crud - ref="crudAddCondition" - :option="addSearchCondtionOption" - @cell-click="clickAddSearchCondtionEdit" - :data="addSearchCondtionData"> - <!-- 琛ㄦ牸鍐呮搷浣滄寜閽� --> - <template slot="menu" slot-scope="scope"> - <el-button type="text" - size="small" - icon="el-icon-minus" - plain - @click="removeCurrentRow(scope.row,'removeaddSearchCondtion')">绉婚櫎 - </el-button> - </template> - <!-- 琛ㄦ牸宸︿笂鏂规寜閽尯鍩� --> - <template slot="menuLeft" slot-scope="scope"> - <el-button type="primary" - size="small" - icon="el-icon-plus" - @click="openSelectionTable('addSearchCondition')"> - 娣诲姞鏌ヨ鏉′欢 - </el-button> - </template> - </avue-crud> + <el-row> + <el-tabs type="border-card" v-model="activeName"> + <el-tab-pane name="first" :disabled="isDisabledTabs"> + <span slot="label"><i class="el-icon-monitor"></i>鏄剧ず鐨勫睘鎬т笌鍏朵粬閰嶇疆</span> + <el-row> + <avue-form :ref="formRefs[1]" :option="formOtherOption" v-model="form" class="referTypeForm"> + <template #sortField="{disabled,size}"> + <el-input :disabled="disabled" + :size="size" + v-model="form.sortField" + ref="sortField" + placeholder="璇烽�夋嫨 鎺掑簭瀛楁" + prefix-icon="el-icon-search" + readonly="true" + @focus="openSelectionTable('sortField')"> + <i slot="suffix" class="el-icon-circle-close" @click="clearSelectionTable('sortField')" style="margin-right: 5px;cursor: pointer;"></i> + </el-input> + </template> + </avue-form> + </el-row> + <el-row v-show="form.type=='default' || form.type=='grid'"> + <el-divider content-position="left" style="margin-bottom: -40px;">閰嶇疆鏄剧ず鐨勫睘鎬�</el-divider> + <avue-crud + ref="crudAttr" + class="crud-attr" + :option="attrOption" + @cell-click="clickAttrEdit" + :data="attrData"> + <!-- 琛ㄦ牸鍐呮搷浣滄寜閽� --> + <template slot="menu" slot-scope="scope"> + <el-button type="text" + size="small" + icon="el-icon-search" + plain + @click="scope.row.isquery=!scope.row.isquery"> + {{scope.row.isquery ? "鍙栨秷蹇�熸煡璇�":"蹇�熸煡璇�"}} + </el-button> + <el-button type="text" + size="small" + icon="el-icon-minus" + plain + @click="removeCurrentRow(scope.row,'removeAttr')">绉婚櫎 + </el-button> + </template> + <!-- 琛ㄦ牸宸︿笂鏂规寜閽尯鍩� --> + <template slot="menuLeft" slot-scope="scope"> + <el-button type="primary" + size="small" + icon="el-icon-plus" + @click="openSelectionTable('selectAttr')">閫夋嫨灞炴�� + </el-button> + <div class="tag-group" style="display: inline"> + <el-tag + v-for="item in attrData" + v-show="item.isquery && item.title!=''" + style="margin-left: 3px" + :key="item.title" + type="info" + size="small" + effect="dark"> + {{ item.title }} + </el-tag> + </div> + </template> + </avue-crud> + </el-row> + </el-tab-pane> + <el-tab-pane name="second"> + <span slot="label"><i class="el-icon-search"></i>鏌ヨ鏉′欢娣诲姞</span> + <avue-crud + ref="crudAddCondition" + :option="addSearchCondtionOption" + @cell-click="clickAddSearchCondtionEdit" + :data="addSearchCondtionData"> + <!-- 琛ㄦ牸鍐呮搷浣滄寜閽� --> + <template slot="menu" slot-scope="scope"> + <el-button type="text" + size="small" + icon="el-icon-minus" + plain + @click="removeCurrentRow(scope.row,'removeaddSearchCondtion')">绉婚櫎 + </el-button> + </template> + <!-- 琛ㄦ牸宸︿笂鏂规寜閽尯鍩� --> + <template slot="menuLeft" slot-scope="scope"> + <el-button type="primary" + size="small" + icon="el-icon-plus" + @click="openSelectionTable('addSearchCondition')"> + 娣诲姞鏌ヨ鏉′欢 + </el-button> + </template> + </avue-crud> + </el-tab-pane> + </el-tabs> </el-row> </div> @@ -233,7 +258,6 @@ let element = ''; return { - activeName: 'first', //褰撳墠娲诲姩鐨則abs labelWidth: '150', // 鏍囬瀹藉害 isShowReferConfigForm: false, // 绗竴灞傚璇濇鏄剧ず闅愯棌鎺у埗 referTypeIsReadOnly: false, @@ -282,6 +306,8 @@ columnBtn: false, dialogClickModal: false, highlightCurrentRow: true, + indexFixed: false, + menuFixed: false, column: [ { label: "鍒楀瓧娈�(*)", @@ -408,6 +434,12 @@ } ] }, + formRefs: ['form','otherForm'], + + // tabs鎺у埗 + isDisabledTabs: false, + activeName: 'first', //褰撳墠娲诲姩鐨則abs + //涓恒�愬弬鐓х殑涓氬姟绫诲瀷銆戦�夊彇鍊煎璇濇 selectionReferBtmTypeOption: { @@ -638,205 +670,256 @@ submitBtn: false, emptyBtn: false, labelWidth: '145', //榛樿鏍囩瀹藉害 - // 鍩虹琛ㄥ崟淇℃伅灞曠ず鍖哄煙 - column: [ - { - label: '鍙傜収鐨勪笟鍔$被鍨�', - prop: 'referTypeName', - span: 7, - disabled: this.referTypeIsReadOnly, - clearable: !this.referTypeIsReadOnly, - tip: '鍙傜収鏁版嵁鏌ヨ鐨勪笟鍔$被鍨嬨��', - tipPlacement: 'right', - rules: [{ - required: true, - message: "(鍙傜収鐨勪笟鍔$被鍨�)蹇呭~椤逛笉鑳戒负绌�", - trigger: ["blur","change"], - }], - },{ - label: '鏄剧ず鐨勫睘鎬�', - prop: 'textField', - tip: '閫夋嫨鏁版嵁鍚庯紝鏄剧ず鍒板瓧娈典笂鐨勪俊鎭墍灞炵殑灞炴�э紝涓�鑸兘鏄痭ame,濡傛灉鏄涓睘鎬т娇鐢ㄩ�楀彿鍒嗗壊锛屽id,name銆�', - tipPlacement: 'right', - span: 7, - value: 'name', - rules: [{ - required: true, - message: "(鏄剧ず鐨勫睘鎬�)蹇呭~椤逛笉鑳戒负绌�", - trigger: "blur", - }], - },{ - label: '瀛樺偍鍊肩殑灞炴��', - prop: 'valueField', - tip: '閫夋嫨鏁版嵁鍚庯紝淇濆瓨鍒版暟鎹簱閲岀殑灞炴�э紝涓�鑸兘鏄痮id鎴栬�卛d锛屽鏋滄槸澶氫釜灞炴�т娇鐢ㄩ�楀彿鍒嗗壊锛屽oid ,id', - value: 'oid', - tipPlacement: 'right', - span: 7, - rules: [{ - required: true, - message: "(瀛樺偍鍊肩殑灞炴��)蹇呭~椤逛笉鑳戒负绌�", - trigger: "blur", - }], - },{ - label: '鍙傜収绐楀彛绫诲瀷', - prop: 'type', - tip: 'default:榛樿鐨勫弬鐓х獥鍙f牱寮�; stand:UI涓婁笅鏂囬厤缃殑鏂瑰紡; classify:鍒嗙被+妗f鐨勬樉绀�; 鑷畾涔夌殑鍙傜収鐩存帴鍐檍s鐨勭粍浠惰矾寰勶紱tree:鏍戝舰灞曠ず;grid:鍒楄〃灞曠ず', - tipPlacement: 'right', - span: 7, - value: 'default', - type: 'select', - dicData: [{ - label: '榛樿鏍峰紡', - value: 'default' - }, { - label: '骞冲彴閰嶇疆', - value: 'stand' - }, { - label: '鏍戝舰', - value: 'tree' - }, { - label: '鍒楄〃', - value: 'grid' - }, { - label: '閮ㄩ棬鏍�', - value: 'refer/OrgDepartmentRefer' - }, { - label: '閮ㄩ棬鍒楄〃', - value: 'refer/OrgDepartmentGridRefers' - }, { - label: '鐢ㄦ埛', - value: 'refer/SmUserRefer' - }, { - label: '鐢ㄦ埛鍒楄〃', - value: 'refer/SmUserGridRefer' - }, { - label: '瑙掕壊鍒楄〃', - value: 'refer/SmRoleRefer' - }, { - label: '鑱屽姟', - value: 'refer/OrgDutyRefer' - }, { - label: '宸ョ', - value: 'refer/SmWorkTypeRefer' - }, { - label: '娴佺▼妯℃澘', - value: 'refer/WfProcessTemplateRefer' - }], - rules: [{ - required: true, - message: "(鍙傜収绐楀彛绫诲瀷)蹇呭~椤逛笉鑳戒负绌�", - trigger: "blur", - }], - change: ({ value, column }) => { - // 澶嶅師琛ㄥ崟,鍥犱负鍏朵粬鍒嗙粍涓鏋滃瓨鍦ㄥ�硷紝鍦ㄥ垏鎹㈡椂,浼氫繚鐣欒緭鍏ョ殑瀛楁鍊兼墍浠ラ渶瑕佽繕鍘� - let oldForm = this.form; - this.form = {}; // 琛ㄥ崟瀵硅薄璧嬬┖ - this.form.referType = oldForm.referType - this.form.textField = oldForm.textField - this.form.valueField = oldForm.valueField - this.form.type = oldForm.type //鍙傜収绐楀彛绫诲瀷 - this.form.url = oldForm.url - this.form.backPath = oldForm.backPath - this.form.method = oldForm.method - this.form.height = oldForm.height - this.form.useFormKey = oldForm.useFormKey - this.form.paramForFormKey = oldForm.paramForFormKey - this.form.isMuti = oldForm.isMuti - this.form.mapFields = oldForm.mapFields - let addFrom = {}; //鏍规嵁绫诲瀷闇�瑕佹坊鍔犵殑涓嶅悓灞炴�� - if(value == 'stand'){ - addFrom = { - referContent: '', - displayTable: '', - } - } else if(value == 'default' || value == 'grid'){ - addFrom = { - limit: '15', - sortField: '', - sortType: 'asc', - } - } else if(value == 'tree'){ - addFrom = { - parentFieldName: '', - parentUsedField: 'oid', - parentValue: '', - loadType: 'all', - onlyLeaf: false, - sortField: '', - sortType: 'asc', - } + group: [ + { + // 鍩虹琛ㄥ崟淇℃伅灞曠ず鍖哄煙 + //display: this.form.type=='default'||this.form.type=='grid', + icon: 'el-icon-info', + label: '蹇呭~鐨勫弬鐓ч厤缃�', + collapse: true, + labelWidth: '110', + prop: 'groupDdefaultOrGrid', + column: [ + { + label: '鍙傜収鐨勪笟鍔$被鍨�', + prop: 'referTypeName', + span: 6, + labelWidth: '130', + disabled: this.referTypeIsReadOnly, + clearable: !this.referTypeIsReadOnly, + tip: '鍙傜収鏁版嵁鏌ヨ鐨勪笟鍔$被鍨嬨��', + tipPlacement: 'bottom', + rules: [{ + required: true, + message: "(鍙傜収鐨勪笟鍔$被鍨�)蹇呭~椤逛笉鑳戒负绌�", + trigger: ["blur","change"], + }], + },{ + label: '鏄剧ず鐨勫睘鎬�', + prop: 'textField', + tip: '閫夋嫨鏁版嵁鍚庯紝鏄剧ず鍒板瓧娈典笂鐨勪俊鎭墍灞炵殑灞炴�э紝涓�鑸兘鏄痭ame,濡傛灉鏄涓睘鎬т娇鐢ㄩ�楀彿鍒嗗壊锛屽id,name銆�', + tipPlacement: 'bottom', + span: 6, + value: 'name', + rules: [{ + required: true, + message: "(鏄剧ず鐨勫睘鎬�)蹇呭~椤逛笉鑳戒负绌�", + trigger: "blur", + }], + },{ + label: '瀛樺偍鍊肩殑灞炴��', + prop: 'valueField', + tip: '閫夋嫨鏁版嵁鍚庯紝淇濆瓨鍒版暟鎹簱閲岀殑灞炴�э紝涓�鑸兘鏄痮id鎴栬�卛d锛屽鏋滄槸澶氫釜灞炴�т娇鐢ㄩ�楀彿鍒嗗壊锛屽oid ,id', + value: 'oid', + tipPlacement: 'bottom', + span: 6, + rules: [{ + required: true, + message: "(瀛樺偍鍊肩殑灞炴��)蹇呭~椤逛笉鑳戒负绌�", + trigger: "blur", + }], + },{ + label: '鍙傜収绐楀彛绫诲瀷', + prop: 'type', + tip: 'default:榛樿鐨勫弬鐓х獥鍙f牱寮�; stand:UI涓婁笅鏂囬厤缃殑鏂瑰紡; classify:鍒嗙被+妗f鐨勬樉绀�; 鑷畾涔夌殑鍙傜収鐩存帴鍐檍s鐨勭粍浠惰矾寰勶紱tree:鏍戝舰灞曠ず;grid:鍒楄〃灞曠ず', + tipPlacement: 'bottom', + span: 6, + value: 'default', + type: 'select', + dicData: [{ + label: '榛樿鏍峰紡', + value: 'default' + }, { + label: '骞冲彴閰嶇疆', + value: 'stand' + }, { + label: '鏍戝舰', + value: 'tree' + }, { + label: '鍒楄〃', + value: 'grid' + }, { + label: '閮ㄩ棬鏍�', + value: 'refer/OrgDepartmentRefer' + }, { + label: '閮ㄩ棬鍒楄〃', + value: 'refer/OrgDepartmentGridRefers' + }, { + label: '鐢ㄦ埛', + value: 'refer/SmUserRefer' + }, { + label: '鐢ㄦ埛鍒楄〃', + value: 'refer/SmUserGridRefer' + }, { + label: '瑙掕壊鍒楄〃', + value: 'refer/SmRoleRefer' + }, { + label: '鑱屽姟', + value: 'refer/OrgDutyRefer' + }, { + label: '宸ョ', + value: 'refer/SmWorkTypeRefer' + }, { + label: '娴佺▼妯℃澘', + value: 'refer/WfProcessTemplateRefer' + }], + rules: [{ + required: true, + message: "(鍙傜収绐楀彛绫诲瀷)蹇呭~椤逛笉鑳戒负绌�", + trigger: "blur", + }], + change: ({ value, column }) => { + // 澶嶅師琛ㄥ崟,鍥犱负鍏朵粬鍒嗙粍涓鏋滃瓨鍦ㄥ�硷紝鍦ㄥ垏鎹㈡椂,浼氫繚鐣欒緭鍏ョ殑瀛楁鍊兼墍浠ラ渶瑕佽繕鍘� + let oldForm = this.form; + this.form = {}; // 琛ㄥ崟瀵硅薄璧嬬┖ + this.form.referType = oldForm.referType + this.form.textField = oldForm.textField + this.form.valueField = oldForm.valueField + this.form.type = oldForm.type //鍙傜収绐楀彛绫诲瀷 + this.form.url = oldForm.url + this.form.backPath = oldForm.backPath + this.form.method = oldForm.method + this.form.height = oldForm.height + this.form.useFormKey = oldForm.useFormKey + this.form.paramForFormKey = oldForm.paramForFormKey + this.form.isMuti = oldForm.isMuti + this.form.mapFields = oldForm.mapFields + let addFrom = {}; //鏍规嵁绫诲瀷闇�瑕佹坊鍔犵殑涓嶅悓灞炴�� + this.activeName = 'first'; + if(value == 'stand'){ + addFrom = { + referContent: '', + displayTable: '', + }; + this.isDisabledTabs = false; + } else if(value == 'default' || value == 'grid'){ + addFrom = { + limit: '15', + sortField: '', + sortType: 'asc', + }; + this.isDisabledTabs = false; + } else if(value == 'tree'){ + addFrom = { + parentFieldName: '', + parentUsedField: 'oid', + parentValue: '', + loadType: 'all', + onlyLeaf: false, + sortField: '', + sortType: 'asc', + }; + console.log('tree'); + this.isDisabledTabs = false; + }else { + this.isDisabledTabs = true; + this.activeName = 'second'; + } + // 鍚堝苟涓や釜琛ㄥ崟 + this.form = Object.assign(addFrom,this.form); + //console.log(this.form); + }, } - // 鍚堝苟涓や釜琛ㄥ崟 - this.form = Object.assign(addFrom,this.form); - //console.log(this.form); - }, - },{ - label: '鑷畾涔夌殑鍚庡彴璺緞', - prop: 'url', - tip: '閫氬父涓虹┖;濡傛灉鏄垪琛紝鍚庡彴蹇呴』杩斿洖DataGrid锛屽鏋滄槸鏍戯紝鍚庡彴蹇呴』杩斿洖List<Tree>', - tipPlacement: 'right', - span: 7, - },{ - label: '鏈嶅姟鐨勫湴鍧�', - prop: 'backPath', - tip: '閫氬父涓虹┖锛屽湪鏀寔寰湇鍔℃垨鑰呭垎甯冨紡閮ㄧ讲鐨勬椂鍊欐墠閰嶇疆', - tipPlacement: 'right', - span: 7, - },{ - label: '璇锋眰鍚庡彴鐨勫崗璁柟寮�', - prop: 'method', - tip: 'HTTP鐨勫崗璁柟寮忥紝鏀寔POST,PUT,GET锛屼竴鑸兘鏄疓ET', - tipPlacement: 'right', - span: 7, - value: 'GET', - type: 'select', - dicData: [{ - label:'GET',value: "GET" + ] + }, + { + //display: this.form.type=='default'||this.form.type=='grid', + icon: 'el-icon-info', + label: '椤甸潰鍙傛暟閰嶇疆', + collapse: false, + prop: 'webConfig', + column: [{ + label: '绐楀彛鏄剧ず鐨勯珮搴�', + prop: 'height', + tip: '榛樿绌虹潃锛岃缃悗琛ㄧず寮哄埗鏄剧ず杩欐牱鐨勯珮搴�', + tipPlacement: 'right', + span: 7, + rules:[{ + validator: validateNumber, + message: "绐楀彛鏄剧ず鐨勯珮搴﹀繀椤讳负鏁板�肩被鍨�", + trigger: "blur", + }] },{ - label:'PUT',value: "PUT" - }, - { - label:'POST',value: "POST" - }], - },{ - label: '绐楀彛鏄剧ず鐨勯珮搴�', - prop: 'height', - tip: '榛樿绌虹潃锛岃缃悗琛ㄧず寮哄埗鏄剧ず杩欐牱鐨勯珮搴�', - tipPlacement: 'right', - span: 7, - rules:[{ - validator: validateNumber, - message: "绐楀彛鏄剧ず鐨勯珮搴﹀繀椤讳负鏁板�肩被鍨�", - trigger: "blur", + label: '杩囨护(绾ц仈)灞炴��', + prop: 'useFormKey', + tip: '鑾峰彇琛ㄥ崟涓婄殑鍏朵粬灞炴�х殑灞炴�х殑鍊兼潵杩囨护,鎴栬�呬娇鐢ㄦ煇涓睘鎬ф潵绾ц仈閫夋嫨', + tipPlacement: 'right', + span: 7, + },{ + label: '杩囨护灞炴�ц姹傚弬鏁�', + prop: 'paramForFormKey', + tip: '浣跨敤杩囨护灞炴�ф椂锛屽彂閫佺粰鍚庡彴鐨勮姹傚弬鏁�', + tipPlacement: 'right', + span: 7, + },{ + label: '鏄犲皠鍏朵粬灞炴��', + prop: 'mapFields', + tip: '閫夋嫨鏁版嵁鍚庯紝灏嗛�夋嫨鐨勬暟鎹嫹璐濆埌琛ㄥ崟閲岀殑鍏朵粬灞炴�э紝涔﹀啓鏍煎紡涓簕褰撳墠琛ㄥ崟涓婄殑灞炴��:閫夋嫨鏁版嵁閲岀殑灞炴��,XXXXx:yyyy}', + tipPlacement: 'right', + span: 7, + },{ + label: '鏄惁寮�鍚叏灞�', + prop: 'isOpenGlobal', + tip: '寮�鍚叏灞�涔嬪悗瀵瑰叏閮ㄥ弬鐓ч厤缃暟鎹繘琛屾煡璇紝榛樿鏍规嵁绉熸埛杩涜鏌ヨ銆�', + tipPlacement: 'right', + type: 'switch', + span: 7, + },{ + label: '鏄惁澶氶��', + type: 'switch', + prop: 'isMuti', + value: false, + span: 7, + row: true, }] - },{ - label: '杩囨护(绾ц仈)灞炴��', - prop: 'useFormKey', - tip: '鑾峰彇琛ㄥ崟涓婄殑鍏朵粬灞炴�х殑灞炴�х殑鍊兼潵杩囨护,鎴栬�呬娇鐢ㄦ煇涓睘鎬ф潵绾ц仈閫夋嫨', - tipPlacement: 'right', - span: 7, - },{ - label: '杩囨护灞炴�ц姹傚弬鏁�', - prop: 'paramForFormKey', - tip: '浣跨敤杩囨护灞炴�ф椂锛屽彂閫佺粰鍚庡彴鐨勮姹傚弬鏁�', - tipPlacement: 'right', - span: 7, - },{ - label: '鏄惁澶氶��', - type: 'switch', - prop: 'isMuti', - value: false, - span: 7, - row: true, - },{ - label: '鏄犲皠鍏朵粬灞炴��', - prop: 'mapFields', - tip: '閫夋嫨鏁版嵁鍚庯紝灏嗛�夋嫨鐨勬暟鎹嫹璐濆埌琛ㄥ崟閲岀殑鍏朵粬灞炴�э紝涔﹀啓鏍煎紡涓簕褰撳墠琛ㄥ崟涓婄殑灞炴��:閫夋嫨鏁版嵁閲岀殑灞炴��,XXXXx:yyyy}', - tipPlacement: 'right', - span: 18, - } - ], + }, + { + //display: this.form.type=='default'||this.form.type=='grid', + icon: 'el-icon-info', + label: '鍚庡彴鍙傛暟閰嶇疆', + collapse: false, + prop: 'backstageConfig', + column: [ + { + label: '鑷畾涔夌殑鍚庡彴璺緞', + prop: 'url', + tip: '閫氬父涓虹┖;濡傛灉鏄垪琛紝鍚庡彴蹇呴』杩斿洖DataGrid锛屽鏋滄槸鏍戯紝鍚庡彴蹇呴』杩斿洖List<Tree>', + tipPlacement: 'right', + span: 7, + },{ + label: '鏈嶅姟鐨勫湴鍧�', + prop: 'backPath', + tip: '閫氬父涓虹┖锛屽湪鏀寔寰湇鍔℃垨鑰呭垎甯冨紡閮ㄧ讲鐨勬椂鍊欐墠閰嶇疆', + tipPlacement: 'right', + span: 7, + },{ + label: '璇锋眰鍚庡彴鐨勫崗璁柟寮�', + prop: 'method', + tip: 'HTTP鐨勫崗璁柟寮忥紝鏀寔POST,PUT,GET锛屼竴鑸兘鏄疓ET', + tipPlacement: 'right', + span: 7, + value: 'GET', + type: 'select', + dicData: [{ + label:'GET',value: "GET" + },{ + label:'PUT',value: "PUT" + }, + { + label:'POST',value: "POST" + }], + }, + ] + }, + ] + } + }, + formOtherOption(){ + return { // 鍙樺姩鐨勮〃鍗曞尯鍩� + submitBtn: false, + emptyBtn: false, + labelWidth: '145', //榛樿鏍囩瀹藉害 group: [ { display: this.form.type=='default'||this.form.type=='grid', @@ -942,12 +1025,6 @@ }], type: 'select', },{ - label: '鏄惁鍙兘閫夋嫨鍙跺瓙鑺傜偣', - prop: 'onlyLeaf', - span: 7, - value: false, - type: 'switch', - },{ label: '鎺掑簭瀛楁', prop: 'sortField', span: 7, @@ -965,10 +1042,16 @@ }, { label: '闄嶅簭', value: 'desc' }], - }, + },{ + label: '鏄惁鍙兘閫夋嫨鍙跺瓙鑺傜偣', + prop: 'onlyLeaf', + span: 7, + value: false, + type: 'switch', + } ] }, - ] + ], } }, }, @@ -1025,7 +1108,7 @@ }, //涓婁竴涓〉闈㈠凡缁忛�変腑鍙傜収搴旂敤鐨勪笟鍔$被鍨嬬殑鎯呭喌锛屽拰涓婁竴娆″凡缁忛厤缃繃鍙傜収閰嶇疆鐨勬儏鍐典笅杩涜椤甸潰鍒濆鍖栨覆鏌� initPageData(val){ - //console.log(val); + console.log(val); if(func.notEmpty(val.referConfig)){ this.form = JSON.parse(val.referConfig); //console.log(val); @@ -1041,25 +1124,33 @@ //console.log(localStorage.getItem("userId")); }, // 閫夋嫨瀹屽弬鐓ч厤缃箣鍚庣偣鍑讳繚瀛樻寜閽Е鍙� - selectedListReferConfig(){ - //琛ㄥ崟楠岃瘉 - this.$refs.form.validate((valid, done, msg) => { - if (valid) { - // 鏍规嵁绫诲瀷瀵筬orm琛ㄥ崟涓殑鍙傛暟杩涜杩囨护锛屽彧淇濈暀闈炵┖涓旈渶瑕佺殑灞炴�� - let submitForm = this.filterForm(); - //console.log(submitForm); - this.$emit('echoReferConfig', submitForm) // 瑙﹀彂update:data灏嗗瓙缁勪欢鍊间紶閫掔粰鐖剁粍浠� - this.isShowReferConfigForm = false; - done() - } else { - for(let attr in msg) { - //console.log(msg[attr][0].message); - this.$message.warning(msg[attr][0].message); - break; - } - return false; - } + async selectedListReferConfig(){ + // 鏍囪鎵�鏈夎〃鍗曟槸鍚﹂�氳繃鏍¢獙鐨勫彉閲� + let isValid = true; + + // 閬嶅巻琛ㄥ崟鏁扮粍锛屼緷娆″姣忎釜琛ㄥ崟杩涜鏍¢獙 + await this.formRefs.forEach(ref => { + this.$refs[ref].validate((valid, done, msg) => { + if (!valid) { + for(let attr in msg) { + this.$message.warning(msg[attr][0].message); + break; + } + isValid = false; + //console.log(valid); + } + done(); + }) }) + + // 濡傛灉鎵�鏈夎〃鍗曢兘鏍¢獙閫氳繃锛屾墽琛屾彁浜ゆ搷浣� + if (isValid) { + // 鏍规嵁绫诲瀷瀵筬orm琛ㄥ崟涓殑鍙傛暟杩涜杩囨护锛屽彧淇濈暀闈炵┖涓旈渶瑕佺殑灞炴�� + let submitForm = this.filterForm(); + //console.log(submitForm); + this.$emit('echoReferConfig', submitForm) // 瑙﹀彂update:data灏嗗瓙缁勪欢鍊间紶閫掔粰鐖剁粍浠� + this.isShowReferConfigForm = false; + } }, /** 鍏跺疄閫夊彇灞炴�ц〃鏍肩殑榛樿鏁版嵁涓嶉渶瑕佸姞杞斤紝 浣嗘槸寮圭獥鎵撳紑浼氭湁琛ㄦ牸閿欒闂鎵�浠ラ渶瑕佸湪杩欒皟鐢╠oLayout鏂规硶*/ -- Gitblit v1.9.3