From f09e05514d9a9e2623cfa73c4de1ffa98bb30bf8 Mon Sep 17 00:00:00 2001 From: xiejun <xiejun@vci-tech.com> Date: 星期二, 23 一月 2024 10:09:07 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue | 1018 ++++++++++++++++++++++++++++++++--------------------------- 1 files changed, 557 insertions(+), 461 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 9e75512..295ca05 100644 --- a/Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue +++ b/Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue @@ -189,54 +189,36 @@ @echoSelectedAttr="echoSelectedAttr"> </refer-select-btm-attr-dialog> - <el-dialog title="閫夋嫨鏄剧ず瀛楁" + <el-dialog title="閫夊彇IN鎴朜OTIN鏉′欢" append-to-body - :visible.sync="isShowShowField" + :visible.sync="isShowInOrNotInCondition" width="70%" destroy-on-close style="height: 110vh; margin-top: -12vh; overflow-y: hidden"> - <avue-crud :option="selectionShowFieldOption" - :table-loading="selectShowFieldLoading" - :data="selectShowFieldData" - ref="selectShowFieldCrud" - @row-click="showFieldRowClick" - @selection-change="selectionShowFieldDataChange" - @search-change="showFieldSearchChange" - @search-reset="showFieldSearchReset"> + <avue-crud :option="selectInOrNotInCondOption" + :page.sync="inOrNotInPage" + @current-change="inOrNotInCurrentChange" + @size-change="inOrNotInSizeChange" + @selection-change="selectionInOrNotInChange" + @row-click="rowInOrNotInClick" + @search-change="selectInOrNotInSearchChange" + @search-reset="searchInOrNotInReset" + :data="selectInOrNotInCondData" + ref="inOrNotInConditionCrud"> </avue-crud> <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="selectedShowField">纭� 瀹�</el-button> - <el-button @click="isShowShowField = false">鍙� 娑�</el-button> - </div> - </el-dialog> - - <el-dialog title="閫夋嫨鏌ヨ鏉′欢" - append-to-body - :visible.sync="isShowSearchCondition" - width="70%" - destroy-on-close - style="height: 110vh; margin-top: -12vh; overflow-y: hidden"> - <avue-crud :option="selectionSearchConditionOption" - :table-loading="selectSearchConditionLoading" - :data="selectSearchConditionData" - ref="selectSearchConditionCrud" - @row-click="searchConditionRowClick" - @selection-change="searchConditionDataChange" - @search-change="searchConditionSearchChange" - @search-reset="searchConditionSearchReset"> - </avue-crud> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="selectedSearchCondition">纭� 瀹�</el-button> - <el-button @click="isShowSearchCondition = false">鍙� 娑�</el-button> + <!-- <div class="avue-dialog__footer--left valueInfo">{{ valueInfo }}</div> --> + <el-button type="primary" @click="selectedInOrNotInCond">纭� 瀹�</el-button> + <el-button @click="isShowInOrNotInCondition = false">鍙� 娑�</el-button> </div> </el-dialog> </el-dialog> - </template> <script> import func from "@/util/func"; + import {getList} from "@/api/refer/table"; export default { name: "referConfigFormDialog", props: { @@ -420,7 +402,11 @@ cell: true, clearable: false, dicData: [ - { + { + value: '_in', label: '瀛樺湪浜�' + },{ + value: '_notin', label: '涓嶅瓨鍦ㄤ簬' + },{ value: '_like', label: '鍖呭惈' },{ value: "_notlike", label: "涓嶅寘鍚�", @@ -470,435 +456,471 @@ preClickAttrRow: '', preClickAddSearchConditionRow: '', + //鐐瑰嚮琛屽脊鍑篿n鎴杗otin鐨勫�� + isShowInOrNotInCondition: false, + selectInOrNotInCondData: [], + selectInOrNotInCondOption: { + height:'220', + tip: false, + addBtn: false, + editBtn: false, + searchShow: true, + searchMenuSpan: 6, + border: false, + index: true, + viewBtn: false, + delBtn: false, + selection: true, + disablePage: false, + refreshBtn: false, + columnBtn: false, + menu: false, + dialogClickModal: false, + highlightCurrentRow: true, + column: [] + }, + inOrNotInPage: { + pageSize: 10, + currentPage: 1, + total: 0, + }, + selectionInOrNotInList: [], + inOrNotInParam: {}, + }; }, // 琛ㄥ崟鐣岄潰鏄剧ず鍐呭閰嶇疆 computed: { - formOption() { - /** 妫�楠屾槸鍚︿负鏁板瓧 */ - let validateNumber = ""; - validateNumber = (rule, value,callback) => { - if(/[^\d]/g.test(value)){ - callback(new Error('绐楀彛鏄剧ず鐨勯珮搴﹀繀椤讳负鏁板�肩被鍨�')); - }else { - callback(); + formOption() { + /** 妫�楠屾槸鍚︿负鏁板瓧 */ + let validateNumber = ""; + validateNumber = (rule, value, callback) => { + if (/[^\d]/g.test(value)) { + callback(new Error('绐楀彛鏄剧ず鐨勯珮搴﹀繀椤讳负鏁板�肩被鍨�')); + } else { + callback(); + } + }; + return { + submitBtn: false, + emptyBtn: false, + labelWidth: '145', //榛樿鏍囩瀹藉害 + group: [ + { + // 鍩虹琛ㄥ崟淇℃伅灞曠ず鍖哄煙 + //display: this.form.type=='default'||this.form.type=='grid', + icon: 'el-icon-info', + label: '蹇呭~鐨勫弬鐓ч厤缃�', + collapse: true, + labelWidth: '115', + 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}) => { + // console.log("start",value); + // 澶嶅師琛ㄥ崟,鍥犱负鍏朵粬鍒嗙粍涓鏋滃瓨鍦ㄥ�硷紝鍦ㄥ垏鎹㈡椂,浼氫繚鐣欒緭鍏ョ殑瀛楁鍊兼墍浠ラ渶瑕佽繕鍘� + let addFrom = {}; + this.activeName = 'first'; // 榛樿鍒囨崲鑷崇涓�涓猼ab + //鏍规嵁绫诲瀷瀵筬orm琛ㄥ崟灞炴�ц繘琛岃皟鏁� + 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', + }; + // 涓嶇煡閬撲负浠�涔坱ype涓簍ree鐨勬椂鍊欎細瑙﹀彂涓ゆchange浜嬩欢 + // 瀵艰嚧type鍒囨崲澶辫触 + this.form.type = 'tree'; + this.isDisabledTabs = false; + } else { + this.isDisabledTabs = true; + this.activeName = 'second'; + } + // 绫诲瀷鍒囨崲鏃讹紝瀵逛笉闇�瑕佺殑灞炴�ц繘琛岀瓫闄� + this.removeFormAttr.forEach(attr => { + // console.log(attr); + this.$delete(this.form, attr) + }) + // 鍚堝苟涓や釜琛ㄥ崟 + this.form = Object.assign(addFrom, this.form); + // console.log("endFilter",this.form.type); + // console.log(this.form); + }, + }, { + label: '鏄惁鎸佷箙鍖栧弬鐓ч厤缃�', + prop: 'isPersistence', + labelWidth: '142', + tip: 'true:寮�鍚寔涔呭寲锛屽褰撳墠瀹氫箟鐨勫弬鐓ч厤缃繘琛屾寔涔呭寲瀛樺偍锛屼笅娆″彲鐩存帴閫夊彇锛沠alse:浠呭褰撳墠娆$爜娈垫柊澧炵敓鏁堛��', + tipPlacement: 'bottom', + span: 6, + type: 'switch', + }, { + display: this.form.isPersistence || this.form.isPersistence == 'true', + label: '鍙傜収閰嶇疆缂栧彿', + prop: 'id', + tip: '璁剧疆璇ュ弬鐓ч厤缃寔涔呭寲瀛樺偍鏃剁殑缂栧彿銆�', + rules: [{ + required: true, + message: "(寮�鍚寔涔呭寲鏃剁紪鍙�)蹇呭~椤逛笉鑳戒负绌�", + trigger: "blur", + }], + span: 6, + }, { + display: this.form.isPersistence || this.form.isPersistence == 'true', + label: '鍙傜収閰嶇疆鍚嶇О', + prop: 'name', + tip: '璁剧疆璇ュ弬鐓ч厤缃寔涔呭寲瀛樺偍鏃剁殑鍚嶇О銆�', + rules: [{ + required: true, + message: "(寮�鍚寔涔呭寲鏃跺悕绉�)蹇呭~椤逛笉鑳戒负绌�", + trigger: "blur", + }], + span: 6, } - }; - return { - submitBtn: false, - emptyBtn: false, - labelWidth: '145', //榛樿鏍囩瀹藉害 - group: [ - { - // 鍩虹琛ㄥ崟淇℃伅灞曠ず鍖哄煙 - //display: this.form.type=='default'||this.form.type=='grid', - icon: 'el-icon-info', - label: '蹇呭~鐨勫弬鐓ч厤缃�', - collapse: true, - labelWidth: '115', - 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 }) => { - // console.log("start",value); - // 澶嶅師琛ㄥ崟,鍥犱负鍏朵粬鍒嗙粍涓鏋滃瓨鍦ㄥ�硷紝鍦ㄥ垏鎹㈡椂,浼氫繚鐣欒緭鍏ョ殑瀛楁鍊兼墍浠ラ渶瑕佽繕鍘� - let addFrom = {}; - this.activeName = 'first'; // 榛樿鍒囨崲鑷崇涓�涓猼ab - //鏍规嵁绫诲瀷瀵筬orm琛ㄥ崟灞炴�ц繘琛岃皟鏁� - 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', - }; - // 涓嶇煡閬撲负浠�涔坱ype涓簍ree鐨勬椂鍊欎細瑙﹀彂涓ゆchange浜嬩欢 - // 瀵艰嚧type鍒囨崲澶辫触 - this.form.type = 'tree'; - this.isDisabledTabs = false; - }else { - this.isDisabledTabs = true; - this.activeName = 'second'; - } - // 绫诲瀷鍒囨崲鏃讹紝瀵逛笉闇�瑕佺殑灞炴�ц繘琛岀瓫闄� - this.removeFormAttr.forEach(attr=>{ - // console.log(attr); - this.$delete(this.form,attr) - }) - // 鍚堝苟涓や釜琛ㄥ崟 - this.form = Object.assign(addFrom,this.form); - // console.log("endFilter",this.form.type); - // console.log(this.form); - }, - },{ - label: '鏄惁鎸佷箙鍖栧弬鐓ч厤缃�', - prop: 'isPersistence', - labelWidth: '142', - tip: 'true:寮�鍚寔涔呭寲锛屽褰撳墠瀹氫箟鐨勫弬鐓ч厤缃繘琛屾寔涔呭寲瀛樺偍锛屼笅娆″彲鐩存帴閫夊彇锛沠alse:浠呭褰撳墠娆$爜娈垫柊澧炵敓鏁堛��', - tipPlacement: 'bottom', - span: 6, - type: 'switch', - },{ - display: this.form.isPersistence || this.form.isPersistence=='true', - label: '鍙傜収閰嶇疆缂栧彿', - prop: 'id', - tip: '璁剧疆璇ュ弬鐓ч厤缃寔涔呭寲瀛樺偍鏃剁殑缂栧彿銆�', - rules: [{ - required: true, - message: "(寮�鍚寔涔呭寲鏃剁紪鍙�)蹇呭~椤逛笉鑳戒负绌�", - trigger: "blur", - }], - span: 6, - },{ - display: this.form.isPersistence || this.form.isPersistence=='true', - label: '鍙傜収閰嶇疆鍚嶇О', - prop: 'name', - tip: '璁剧疆璇ュ弬鐓ч厤缃寔涔呭寲瀛樺偍鏃剁殑鍚嶇О銆�', - rules: [{ - required: true, - message: "(寮�鍚寔涔呭寲鏃跺悕绉�)蹇呭~椤逛笉鑳戒负绌�", - trigger: "blur", - }], - span: 6, - } - ] - }, + ] + }, + { + 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: '杩囨护(绾ц仈)灞炴��', + 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, + } + ] + }, + { + icon: 'el-icon-info', + label: '鍚庡彴鍙傛暟閰嶇疆', + collapse: false, + prop: 'backstageConfig', + column: [ + { + label: '鑷畾涔夌殑鍚庡彴璺緞', + prop: 'url', + tip: '閫氬父涓虹┖;濡傛灉鏄垪琛紝鍚庡彴蹇呴』杩斿洖DataGrid锛屽鏋滄槸鏍戯紝鍚庡彴蹇呴』杩斿洖List<Theme>', + 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" + }, { - 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: '杩囨护(绾ц仈)灞炴��', - 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, - } - ] - }, - { - icon: 'el-icon-info', - label: '鍚庡彴鍙傛暟閰嶇疆', - collapse: false, - prop: 'backstageConfig', - column: [ - { - label: '鑷畾涔夌殑鍚庡彴璺緞', - prop: 'url', - tip: '閫氬父涓虹┖;濡傛灉鏄垪琛紝鍚庡彴蹇呴』杩斿洖DataGrid锛屽鏋滄槸鏍戯紝鍚庡彴蹇呴』杩斿洖List<Theme>', - 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', - icon: 'el-icon-info', - label: this.form.type=='default' ? '榛樿鍙傜収鐨勯厤缃�(涓嬫柟鍒楄〃)':'鍒楄〃鍙傜収鐨勯厤缃紙涓嬫柟鍒楄〃)', - collapse: true, - prop: 'groupDdefaultOrGrid', - column: [ - { - label: '姣忛〉鏄剧ず鏉℃暟', - prop: 'limit', - span: 8, - tip: '鍒嗛〉鏃舵瘡椤垫樉绀虹殑鏁伴噺锛屼笉鍒嗛〉濉�-1', - value: 15, - tipPlacement: 'right', - },{ - label: '鎺掑簭瀛楁', - prop: 'sortField', - span: 8, - tip: '鏌ヨ鏁版嵁鏃剁殑鎺掑簭瀛楁', - //clearable: false, - tipPlacement: 'right', - },{ - label: '鎺掑簭绫诲瀷', - prop: 'sortType', - span: 8, - dicData: [{ - label: '鍗囧簭', value: 'asc' - }, { - label: '闄嶅簭', value: 'desc' - }], - //value: 'asc', - type: 'select', - tip: '鏌ヨ鏁版嵁鏃剁殑鎺掑簭绫诲瀷', - tipPlacement: 'right', - } - ] - }, - { - display: this.form.type=='stand', - icon: 'el-icon-info', - label: 'stand(骞冲彴閰嶇疆)鍙傜収', - collapse: true, - prop: 'groupStand', - column: [ - { - label: '鍙傝�冪殑UI涓婁笅鏂�', - prop: 'referContent', - span: 8, - tip: '鍙湁鍙傜収绐楀彛绫诲瀷鏄痵tand鏃舵墠蹇呴』璁剧疆,涓斿湪stand绫诲瀷涓嬫墠鑳界敓鏁�', - tipPlacement: 'right', - }, - { - label: '骞冲彴鐨勮〃鏍肩紪鍙�', - prop: 'displayTable', - span: 8, - tip: '涓庡弬鐓х殑UI涓婁笅鏂囦簰鏂ワ紝鍙湁鍙傜収绐楀彛绫诲瀷鏄痵tand鏃舵墠蹇呴』璁剧疆锛屼笖鍦╯tand绫诲瀷涓嬫墠鑳界敓鏁�', - tipPlacement: 'right', - }, - ] - }, - { - display: this.form.type=='tree', - icon: 'el-icon-info', - label: '鏍戝舰鍙傜収淇℃伅', - collapse: true, - prop: 'groupTree', - labelWidth: '158', - column: [ - { - label: '鏍戝舰鐨勪笂绾у睘鎬�', - prop: 'parentFieldName', - span: 7, - tip: '鏍戝舰灞曠ず鐨勬椂鍊欙紝涓婁笅绾у叧绯绘煡鎵剧殑灞炴�с��', - tipPlacement: 'right', - rules: [{ - required: true, - message: "(鏍戝舰鐨勪笂绾у睘鎬�)蹇呭~椤逛笉鑳戒负绌�", - trigger: "blur", - }], - },{ - label: '涓婄骇灞炴�у�煎搴斿睘鎬�', - prop: 'parentUsedField', - span: 7, - tip: '涓婄骇灞炴�у瓨鍌ㄧ殑鍊�,鏄笂绾ф暟鎹殑浠�涔堝睘鎬с�備竴鑸兘鏄痮id銆�', - value: 'oid', - tipPlacement: 'right', - },{ - label: '鏍硅妭鐐圭殑鍊�', - prop: 'parentValue', - span: 7, - tip: '鏍戝舰灞曠ず鐨勬椂鍊欙紝涓婄骇鐨勫�笺��', - tipPlacement: 'right', - },{ - label: '鏍戝姞杞芥柟寮�', - prop: 'loadType', - span: 7, - value: 'all', - dicData: [{ - label: '鍏ㄩ儴', value: 'all' - }, { - label: '閫愮骇鍔犺浇', value: 'node' - }], - type: 'select', - },{ - label: '鎺掑簭瀛楁', - prop: 'sortField', - span: 7, - //type: 'table', - tip: '鏌ヨ鏁版嵁鏃剁殑鎺掑簭瀛楁', - tipPlacement: 'right', - },{ - label: '鎺掑簭绫诲瀷', - prop: 'sortType', - span: 7, - type: 'select', - value: 'asc', - dicData: [{ - label: '鍗囧簭', value: 'asc' - }, { - label: '闄嶅簭', value: 'desc' - }], - },{ - label: '鏄惁鍙兘閫夋嫨鍙跺瓙鑺傜偣', - prop: 'onlyLeaf', - span: 7, - value: false, - type: 'switch', - } - ] - }, - ], - } - }, + label: 'POST', value: "POST" + }], + }, + ] + }, + ] + } + }, + formOtherOption() { + return { + // 鍙樺姩鐨勮〃鍗曞尯鍩� + submitBtn: false, + emptyBtn: false, + labelWidth: '145', //榛樿鏍囩瀹藉害 + group: [ + { + display: this.form.type == 'default' || this.form.type == 'grid', + icon: 'el-icon-info', + label: this.form.type == 'default' ? '榛樿鍙傜収鐨勯厤缃�(涓嬫柟鍒楄〃)' : '鍒楄〃鍙傜収鐨勯厤缃紙涓嬫柟鍒楄〃)', + collapse: true, + prop: 'groupDdefaultOrGrid', + column: [ + { + label: '姣忛〉鏄剧ず鏉℃暟', + prop: 'limit', + span: 8, + tip: '鍒嗛〉鏃舵瘡椤垫樉绀虹殑鏁伴噺锛屼笉鍒嗛〉濉�-1', + value: 15, + rules: [{ + required: true, + message: "蹇呭~椤逛笉鑳戒负绌�", + trigger: "blur", + }], + tipPlacement: 'right', + }, { + label: '鎺掑簭瀛楁', + prop: 'sortField', + span: 8, + tip: '鏌ヨ鏁版嵁鏃剁殑鎺掑簭瀛楁', + //clearable: false, + tipPlacement: 'right', + }, { + label: '鎺掑簭绫诲瀷', + prop: 'sortType', + span: 8, + dicData: [{ + label: '鍗囧簭', value: 'asc' + }, { + label: '闄嶅簭', value: 'desc' + }], + //value: 'asc', + type: 'select', + tip: '鏌ヨ鏁版嵁鏃剁殑鎺掑簭绫诲瀷', + tipPlacement: 'right', + } + ] + }, + { + display: this.form.type == 'stand', + icon: 'el-icon-info', + label: 'stand(骞冲彴閰嶇疆)鍙傜収', + collapse: true, + prop: 'groupStand', + column: [ + { + label: '鍙傝�冪殑UI涓婁笅鏂�', + prop: 'referContent', + span: 8, + tip: '鍙湁鍙傜収绐楀彛绫诲瀷鏄痵tand鏃舵墠蹇呴』璁剧疆,涓斿湪stand绫诲瀷涓嬫墠鑳界敓鏁�', + tipPlacement: 'right', + }, + { + label: '骞冲彴鐨勮〃鏍肩紪鍙�', + prop: 'displayTable', + span: 8, + tip: '涓庡弬鐓х殑UI涓婁笅鏂囦簰鏂ワ紝鍙湁鍙傜収绐楀彛绫诲瀷鏄痵tand鏃舵墠蹇呴』璁剧疆锛屼笖鍦╯tand绫诲瀷涓嬫墠鑳界敓鏁�', + tipPlacement: 'right', + }, + ] + }, + { + display: this.form.type == 'tree', + icon: 'el-icon-info', + label: '鏍戝舰鍙傜収淇℃伅', + collapse: true, + prop: 'groupTree', + labelWidth: '158', + column: [ + { + label: '鏍戝舰鐨勪笂绾у睘鎬�', + prop: 'parentFieldName', + span: 7, + tip: '鏍戝舰灞曠ず鐨勬椂鍊欙紝涓婁笅绾у叧绯绘煡鎵剧殑灞炴�с��', + tipPlacement: 'right', + rules: [{ + required: true, + message: "(鏍戝舰鐨勪笂绾у睘鎬�)蹇呭~椤逛笉鑳戒负绌�", + trigger: "blur", + }], + }, { + label: '涓婄骇灞炴�у�煎搴斿睘鎬�', + prop: 'parentUsedField', + span: 7, + tip: '涓婄骇灞炴�у瓨鍌ㄧ殑鍊�,鏄笂绾ф暟鎹殑浠�涔堝睘鎬с�備竴鑸兘鏄痮id銆�', + value: 'oid', + tipPlacement: 'right', + }, { + label: '鏍硅妭鐐圭殑鍊�', + prop: 'parentValue', + span: 7, + tip: '鏍戝舰灞曠ず鐨勬椂鍊欙紝涓婄骇鐨勫�笺��', + tipPlacement: 'right', + }, { + label: '鏍戝姞杞芥柟寮�', + prop: 'loadType', + span: 7, + value: 'all', + dicData: [{ + label: '鍏ㄩ儴', value: 'all' + }, { + label: '閫愮骇鍔犺浇', value: 'node' + }], + type: 'select', + }, { + label: '鎺掑簭瀛楁', + prop: 'sortField', + span: 7, + //type: 'table', + tip: '鏌ヨ鏁版嵁鏃剁殑鎺掑簭瀛楁', + tipPlacement: 'right', + }, { + label: '鎺掑簭绫诲瀷', + prop: 'sortType', + span: 7, + type: 'select', + value: 'asc', + dicData: [{ + label: '鍗囧簭', value: 'asc' + }, { + label: '闄嶅簭', value: 'desc' + }], + }, { + label: '鏄惁鍙兘閫夋嫨鍙跺瓙鑺傜偣', + prop: 'onlyLeaf', + span: 7, + value: false, + type: 'switch', + } + ] + }, + ], + } + }, }, mounted() { // 浜嬩欢鐩戝惉锛屽疄鐜拌〃鏍艰缂栬緫鐐瑰嚮琛ㄦ牸鍖哄煙澶栧唴瀹规椂閫�鍑虹紪杈戠姸鎬� @@ -928,7 +950,6 @@ } }, methods: { - // 閫夋嫨瀹屽弬鐓ч厤缃箣鍚庣偣鍑讳繚瀛樻寜閽Е鍙� async selectedListReferConfig(){ // 鏍囪鎵�鏈夎〃鍗曟槸鍚﹂�氳繃鏍¢獙鐨勫彉閲� @@ -942,7 +963,6 @@ break; } isValid = false; - //console.log(valid); } done(); }) @@ -951,7 +971,6 @@ if (isValid) { // 鏍规嵁绫诲瀷瀵筬orm琛ㄥ崟涓殑鍙傛暟杩涜杩囨护锛屽彧淇濈暀闈炵┖涓旈渶瑕佺殑灞炴�� let submitForm = this.filterForm(); - // console.log(submitForm); this.$emit('echoReferConfig', submitForm) // 瑙﹀彂update:data灏嗗瓙缁勪欢鍊间紶閫掔粰鐖剁粍浠� this.isShowReferConfigForm = false; } @@ -959,7 +978,6 @@ // 鍗曞嚮琛ㄦ牸瀹炵幇琛ㄦ牸琛岀紪杈� clickAttrEdit(row, column, event){ if(this.preClickAttrRow && this.preClickAttrRow != row){ - //console.log(this.codeShowFieldConfigVOS[this.preClickAttrRow.$index]); this.codeShowFieldConfigVOS[this.preClickAttrRow.$index].$cellEdit = false; } row.$cellEdit = true; @@ -977,9 +995,78 @@ //console.log(this.codeShowFieldConfigVOS[this.preClickAttrRow.$index]); this.form.codeSrchCondConfigVOS[this.preClickAddSearchConditionRow.$index].$cellEdit = false; } + if(row.filterType === '_in' || row.filterType === '_notin'){ + //console.log(row); + this.selectInOrNotInCondOption.column = [{ + prop: row.filterField, + label: row.filterTypeText, + search: true, + searchLabelWidth: 45, + searchSpan: 8, + sortable: true, + }] + this.initPageData.pageSize = 10; + this.initPageData.currentPage = 1; + this.loadInOrNotInConditionData(this.initPageData); + this.isShowInOrNotInCondition = true; + } row.$cellEdit = true; this.preClickAddSearchConditionRow = row; }, + loadInOrNotInConditionData(page, params = {}){ + let mustParams = { + referType: this.form.referType, + referBo: this.form.referType, + }; + getList(Object.assign(mustParams,params),page.currentPage,page.pageSize,'/api/ubcs-code/mdmEngineController/defaultReferDataGrid','GET').then(res=>{ + //console.log(res.data); + this.selectInOrNotInCondData = res.data.records; + this.inOrNotInPage.total = res.data.total; + }); + }, + inOrNotInCurrentChange(currentPage) { + this.inOrNotInPage.currentPage = currentPage; + }, + inOrNotInSizeChange(pageSize) { + this.inOrNotInPage.pageSize = pageSize; + }, + rowInOrNotInClick(row){ + this.$refs.inOrNotInConditionCrud.toggleSelection(); + this.$refs.inOrNotInConditionCrud.toggleRowSelection(row); //閫変腑褰撳墠琛� + }, + selectionInOrNotInChange(list){ + if (this.isMuti && list.length > 1) { + const nowVal = list.shift(); + this.$refs.inOrNotInConditionCrud.toggleRowSelection(nowVal, false); + } + this.selectionInOrNotInList = list + }, + selectedInOrNotInCond(){ + if(this.selectionInOrNotInList && this.selectionInOrNotInList.length > 0){ + // console.log(this.selectionInOrNotInList) + this.preClickAddSearchConditionRow.filterValue = this.selectionInOrNotInList.map(item => item[this.selectInOrNotInCondOption.column[0].prop]).join(','); + this.isShowInOrNotInCondition = false; + } + }, + /** 鐐瑰嚮鎼滅储鍚庤Е鍙戣浜嬩欢 */ + selectInOrNotInSearchChange(params, done) { + this.initPageData.currentPage = 1; + let requestData = {}; + if(params) { + Object.keys(params).forEach((key)=>{ + requestData["conditionMap" + "["+ key +"_like]"] = params[key].trim(); + }) + } + this.inOrNotInParam = requestData; + this.loadInOrNotInConditionData(this.initPageData,this.inOrNotInParam); + done(); + }, + /** 閲嶇疆浣嶅睘鎬ч�夊彇鍊艰〃鏍肩殑鎼滅储妗嗕箣鍚庣殑鍥炶皟 */ + searchInOrNotInReset() { + this.inOrNotInParam = {}; + this.loadInOrNotInConditionData(this.initPageData); + }, + //涓婁竴涓〉闈㈠凡缁忛�変腑鍙傜収搴旂敤鐨勪笟鍔$被鍨嬬殑鎯呭喌锛屽拰涓婁竴娆″凡缁忛厤缃繃鍙傜収閰嶇疆鐨勬儏鍐典笅杩涜椤甸潰鍒濆鍖栨覆鏌� initPageData(val){ // console.log(val.referConfig); @@ -1259,4 +1346,13 @@ transition:opacity .0s !important; } + /* .valueInfo { + float: left; + border: 1px solid #E9E7E7; + display: inline-block; + vertical-align: middle; + padding: 9px 15px; + line-height: 1; + } */ + </style> -- Gitblit v1.9.3