From 4ead3f1a8571b3536daedbd4a0268aebdfb86517 Mon Sep 17 00:00:00 2001
From: yuxc <653031404@qq.com>
Date: 星期三, 31 五月 2023 10:31:14 +0800
Subject: [PATCH] 1、对MDM服务的Feign进行改动
---
Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue | 799 +++++++++++++++++++++++++++++++++-----------------------
1 files changed, 472 insertions(+), 327 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..24293a2 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="codeShowFieldConfigVOS">
+ <!-- 琛ㄦ牸鍐呮搷浣滄寜閽� -->
+ <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 codeShowFieldConfigVOS"
+ 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="form.codeSrchCondConfigVOS">
+ <!-- 琛ㄦ牸鍐呮搷浣滄寜閽� -->
+ <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,
@@ -252,6 +276,11 @@
paramForFormKey: '',
isMuti: false,
mapFields: '',
+ isOpenGlobal: true, //鏄惁寮�鍚叏灞�
+ codeSrchCondConfigVOS: [],
+ isPersistence: true, // 鏄惁鎸佷箙鍖�
+ id: '',
+ name: '',
// 鏌ヨ鏉′欢鍒楄〃
// limit: '15',
// sortField: '',
@@ -264,7 +293,21 @@
// loadType: 'all',
// onlyLeaf: false,
},
- attrData: [],
+ // type鍒囨崲鏃跺form琛ㄥ崟灞炴�ц繘琛岀Щ闄�
+ removeFormAttr: [
+ 'limit',
+ 'sortField',
+ 'sortType',
+ 'parentFieldName',
+ 'parentUsedField',
+ 'parentValue',
+ 'loadType',
+ 'onlyLeaf',
+ 'sortType',
+ 'referContent',
+ 'displayTable',
+ ],
+ codeShowFieldConfigVOS: [],
attrOption: {
height:'180',
tip: false,
@@ -282,6 +325,8 @@
columnBtn: false,
dialogClickModal: false,
highlightCurrentRow: true,
+ indexFixed: false,
+ menuFixed: false,
column: [
{
label: "鍒楀瓧娈�(*)",
@@ -327,7 +372,7 @@
blur: (value) => this.updateAttrBlur(value),
},{
label: "鎺掑簭瀛楁",
- prop: "sortField",
+ prop: "attrSortField",
cell: true,
clearable: false,
blur: (value) => this.updateAttrBlur(value),
@@ -339,7 +384,7 @@
blur: (value) => this.updateAttrBlur(value),
},{
label: "鍒楀浐瀹氫綅缃�",
- prop: "fixedText",
+ prop: "fixedPosition",
cell: true,
type:"select",
clearable: false,
@@ -355,7 +400,7 @@
},
]
},
- addSearchCondtionData: [],
+ // addSearchCondtionData: [],
addSearchCondtionOption: {
height:'150',
tip: false,
@@ -408,6 +453,13 @@
}
]
},
+ // 涓や釜琛ㄥ崟鐨剅ef
+ formRefs: ['form','otherForm'],
+
+ // tabs鎺у埗
+ isDisabledTabs: false,
+ activeName: 'first', //褰撳墠娲诲姩鐨則abs
+
//涓恒�愬弬鐓х殑涓氬姟绫诲瀷銆戦�夊彇鍊煎璇濇
selectionReferBtmTypeOption: {
@@ -638,205 +690,280 @@
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: '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',
+ tip: 'true:寮�鍚寔涔呭寲锛屽褰撳墠瀹氫箟鐨勫弬鐓ч厤缃繘琛屾寔涔呭寲瀛樺偍锛屼笅娆″彲鐩存帴閫夊彇锛沠alse:浠呭褰撳墠娆$爜娈垫柊澧炵敓鏁堛��',
+ tipPlacement: 'bottom',
+ span: 6,
+ type: 'switch',
+ },{
+ display: this.form.isPersistence | this.form.isPersistence=='true',
+ label: '缂栧彿',
+ prop: 'id',
+ rules: [{
+ required: true,
+ message: "(寮�濮嬫寔涔呭寲鏃剁紪鍙�)蹇呭~椤逛笉鑳戒负绌�",
+ trigger: "blur",
+ }],
+ span: 6,
+ },{
+ display: this.form.isPersistence | this.form.isPersistence=='true',
+ label: '鍚嶇О',
+ prop: 'name',
+ rules: [{
+ required: true,
+ message: "(寮�濮嬫寔涔呭寲鏃跺悕绉�)蹇呭~椤逛笉鑳戒负绌�",
+ trigger: "blur",
+ }],
+ span: 6,
}
- // 鍚堝苟涓や釜琛ㄥ崟
- 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"
- },{
- 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: '鏄惁澶氶��',
- type: 'switch',
- prop: 'isMuti',
- value: false,
- span: 7,
- row: true,
- },{
- label: '鏄犲皠鍏朵粬灞炴��',
- prop: 'mapFields',
- tip: '閫夋嫨鏁版嵁鍚庯紝灏嗛�夋嫨鐨勬暟鎹嫹璐濆埌琛ㄥ崟閲岀殑鍏朵粬灞炴�э紝涔﹀啓鏍煎紡涓簕褰撳墠琛ㄥ崟涓婄殑灞炴��:閫夋嫨鏁版嵁閲岀殑灞炴��,XXXXx:yyyy}',
- tipPlacement: 'right',
- span: 18,
- }
- ],
+
+ ]
+ },
+ {
+ 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<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',
@@ -848,21 +975,21 @@
{
label: '姣忛〉鏄剧ず鏉℃暟',
prop: 'limit',
- span: 7,
+ span: 8,
tip: '鍒嗛〉鏃舵瘡椤垫樉绀虹殑鏁伴噺锛屼笉鍒嗛〉濉�-1',
//value: 15,
tipPlacement: 'right',
},{
label: '鎺掑簭瀛楁',
prop: 'sortField',
- span: 7,
+ span: 8,
tip: '鏌ヨ鏁版嵁鏃剁殑鎺掑簭瀛楁',
//clearable: false,
tipPlacement: 'right',
},{
label: '鎺掑簭绫诲瀷',
prop: 'sortType',
- span: 7,
+ span: 8,
dicData: [{
label: '鍗囧簭', value: 'asc'
}, {
@@ -885,14 +1012,14 @@
{
label: '鍙傝�冪殑UI涓婁笅鏂�',
prop: 'referContent',
- span: 7,
+ span: 8,
tip: '鍙湁鍙傜収绐楀彛绫诲瀷鏄痵tand鏃舵墠蹇呴』璁剧疆,涓斿湪stand绫诲瀷涓嬫墠鑳界敓鏁�',
tipPlacement: 'right',
},
{
label: '骞冲彴鐨勮〃鏍肩紪鍙�',
prop: 'displayTable',
- span: 7,
+ span: 8,
tip: '涓庡弬鐓х殑UI涓婁笅鏂囦簰鏂ワ紝鍙湁鍙傜収绐楀彛绫诲瀷鏄痵tand鏃舵墠蹇呴』璁剧疆锛屼笖鍦╯tand绫诲瀷涓嬫墠鑳界敓鏁�',
tipPlacement: 'right',
},
@@ -942,12 +1069,6 @@
}],
type: 'select',
},{
- label: '鏄惁鍙兘閫夋嫨鍙跺瓙鑺傜偣',
- prop: 'onlyLeaf',
- span: 7,
- value: false,
- type: 'switch',
- },{
label: '鎺掑簭瀛楁',
prop: 'sortField',
span: 7,
@@ -965,10 +1086,16 @@
}, {
label: '闄嶅簭', value: 'desc'
}],
- },
+ },{
+ label: '鏄惁鍙兘閫夋嫨鍙跺瓙鑺傜偣',
+ prop: 'onlyLeaf',
+ span: 7,
+ value: false,
+ type: 'switch',
+ }
]
},
- ]
+ ],
}
},
},
@@ -993,8 +1120,7 @@
},
watch: {
// 璐煎潙锛屽垏鎹㈢被鍨嬫椂琛ㄦ牸锛岄殣钘忓啀鏄剧ず灏变細鍑虹幇琛ㄦ牸閿欎綅闂锛�
- 'form.type'(val) {
- //console.log(val);
+ 'form.type'(value) {
this.onloadAttrData();
}
},
@@ -1003,22 +1129,23 @@
// 鍗曞嚮琛ㄦ牸瀹炵幇琛ㄦ牸琛岀紪杈�
clickAttrEdit(row, column, event){
if(this.preClickAttrRow && this.preClickAttrRow != row){
- //console.log(this.attrData[this.preClickAttrRow.$index]);
- this.attrData[this.preClickAttrRow.$index].$cellEdit = false;
+ //console.log(this.codeShowFieldConfigVOS[this.preClickAttrRow.$index]);
+ this.codeShowFieldConfigVOS[this.preClickAttrRow.$index].$cellEdit = false;
}
row.$cellEdit = true;
this.preClickAttrRow = row;
},
// 灞炴�ц〃鏍艰缂栬緫澶卞幓鐒︾偣鏃朵繚瀛樻柟娉�
// updateAttrBlur(value){
- //console.log(this.attrData[0]);
+ //console.log(this.codeShowFieldConfigVOS[0]);
// },
+
// 鍗曞嚮琛ㄦ牸瀹炵幇琛ㄦ牸琛岀紪杈�
clickAddSearchCondtionEdit(row, column, event){
if(this.preClickAddSearchConditionRow && this.preClickAddSearchConditionRow != row){
- //console.log(this.attrData[this.preClickAttrRow.$index]);
- this.addSearchCondtionData[this.preClickAddSearchConditionRow.$index].$cellEdit = false;
+ //console.log(this.codeShowFieldConfigVOS[this.preClickAttrRow.$index]);
+ this.form.codeSrchCondConfigVOS[this.preClickAddSearchConditionRow.$index].$cellEdit = false;
}
row.$cellEdit = true;
this.preClickAddSearchConditionRow = row;
@@ -1028,8 +1155,13 @@
//console.log(val);
if(func.notEmpty(val.referConfig)){
this.form = JSON.parse(val.referConfig);
- //console.log(val);
+ // console.log(this.form);
+ this.form.isPersistence = this.form.isPersistence == 'true' ? true:false;
+ // 鍙傜収寮曠敤鐨勪笟鍔$被鍨嬩笉鍙��
this.referTypeIsReadOnly = true;
+ if((this.form.type == 'default' || this.form.type == 'grid') && (this.form.codeShowFieldConfigVOS != undefined && this.form.codeShowFieldConfigVOS.length > 0)){
+ this.codeShowFieldConfigVOS = this.form.codeShowFieldConfigVOS;
+ }
return;
}
if(func.notEmpty(val.referType)){
@@ -1041,37 +1173,43 @@
//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鏂规硶*/
onloadAttrData(){
- this.attrData = [
+ this.codeShowFieldConfigVOS = [
{
field: 'id',
title: '缂栧彿',
fieldType: 'text',
fieldTypeText: '鏂囨湰妗�',
sort: true,
- sortField: 'id',
+ attrSortField: 'id',
width: '150',
isquery: true,
$cellEdit: false
@@ -1081,7 +1219,7 @@
fieldType: 'text',
fieldTypeText: '鏂囨湰妗�',
sort: true,
- sortField: 'name',
+ attrSortField: 'name',
width: '180',
isquery: true,
$cellEdit: false
@@ -1094,10 +1232,10 @@
// 灞炴�ч�夋嫨琛ㄦ牸涓殑绉婚櫎鎸夐挳鍔熻兘
removeCurrentRow(row,condition){
if(condition=='removeAttr'){
- this.$delete(this.attrData, row.$index);
+ this.$delete(this.codeShowFieldConfigVOS, row.$index);
return;
}
- this.$delete(this.addSearchCondtionData, row.$index);
+ this.$delete(this.form.codeSrchCondConfigVOS, row.$index);
},
// 璇ョ晫闈㈢殑鏁版嵁杩涜鍒濆鍖栧鍘�
recoveryDataAndForm(condition){
@@ -1133,7 +1271,9 @@
'paramForFormKey',
'isMuti',
'mapFields',
- 'searchCondition',
+ 'codeSrchCondConfigVOS',
+ 'isOpenGlobal', //鏄惁寮�鍚叏灞�
+ 'isPersistence',
];
let addArray = [];
let newForm ={};
@@ -1153,14 +1293,18 @@
'sortType'
];
}
+ // 寮�鍚寔涔呭寲鍙傜収閰嶇疆
+ if(oldForm.isPersistence=='true' | oldForm.isPersistence){
+ submittDefaultForm = submittDefaultForm.concat(['id','name'])
+ }
submittDefaultForm = submittDefaultForm.concat(addArray);
- if(!this.checkArrayIsUndefined(this.addSearchCondtionData)){
+ if(!this.checkArrayIsUndefined(this.form.codeSrchCondConfigVOS)){
newForm = {
- searchCondition: this.addSearchCondtionData,
+ codeSrchCondConfigVOS: this.form.codeSrchCondConfigVOS,
}
}
- if((oldForm.type == 'default' || oldForm.type == 'grid') && (this.attrData.length >= 0 && !this.checkArrayIsUndefined(this.addSearchCondtionData))){
- newForm = Object.assign(newForm,{attrData:this.attrData});
+ if((oldForm.type == 'default' || oldForm.type == 'grid') && (this.codeShowFieldConfigVOS.length >= 0 && !this.checkArrayIsUndefined(this.codeShowFieldConfigVOS))){
+ newForm = Object.assign(newForm,{codeShowFieldConfigVOS:this.codeShowFieldConfigVOS});
}
// 杩囨护鍑虹┖鍊煎睘鎬у拰涓嶉渶瑕佺殑灞炴��
submittDefaultForm.forEach(item=>{
@@ -1170,7 +1314,7 @@
newForm = Object.assign(newForm,{[item]:oldForm[item]});
}
});
- // console.log(newForm);
+ //console.log(newForm);
return newForm;
},
/**
@@ -1397,14 +1541,14 @@
}
//this.showFieldSelectList;
this.showFieldSelectList.forEach(item => {
- this.attrData.push(
+ this.codeShowFieldConfigVOS.push(
{
field: item.id,
title: item.id,
fieldType: item.attrType,
fieldTypeText: item.attrTypeText,
sort: false,
- sortField: item.id,
+ attrSortField: item.id,
width: item.attrLength,
isquery: false,
$cellEdit: false
@@ -1459,16 +1603,17 @@
this.sortFieldOnLoad();
},
selectedSearchCondition(){
- console.log(this.searchConditionSelectList);
+ // console.log(this.searchConditionSelectList);
if(this.searchConditionSelectList.length <= 0) {
this.$message.warning("璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�");
return;
}
this.searchConditionSelectList.forEach(item => {
- this.addSearchCondtionData.push(
+ this.form.codeSrchCondConfigVOS.push(
{
filterField: item.id,
filterType: '=',
+ filterTypeText: item.name,
filterValue: '',
$cellEdit: false
}
--
Gitblit v1.9.3