From fdf13539b4ef7f5fddb3b7335015fb3c34915a8b Mon Sep 17 00:00:00 2001
From: wangting <wangting@vci-tech.com>
Date: 星期二, 14 一月 2025 11:50:40 +0800
Subject: [PATCH] 调整查询模板添加窗口各下拉数据的获取
---
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue | 314 ++++++++++++++++++++++++++++++++--------------------
1 files changed, 192 insertions(+), 122 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 c1df775..00fc35a 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
@@ -13,20 +13,34 @@
@selection-change="selectChangeHandler"
@row-click="rowClickHandler">
<template slot="menuLeft" slot-scope="scope">
- <el-button icon="el-icon-plus" plain size="small" type="primary"
- @click="addClickHandler">澧炲姞
- </el-button>
- <el-button icon="el-icon-edit-outline" plain size="small" type="primary"
- @click="btnDesignClickHandler">鎸夐挳璁捐
+ <el-button v-if="permissionChildrenList.UiPageLayoutAddBtn" class="button-custom-icon" plain size="small"
+ type="primary"
+ @click="addClickHandler">
+ <icon-show :name="permissionChildrenList.UiPageLayoutAddBtn.source"></icon-show>
+ 澧炲姞
</el-button>
</template>
<template slot="menu" slot-scope="scope">
- <el-button icon="el-icon-edit" size="small" type="text" @click="editBtnClick(scope.row)">缂栬緫
+ <el-button v-if="permissionChildrenList.UiPageLayoutDesignBtn" size="small" type="text"
+ @click="btnDesignClickHandler(scope.row)">
+ <icon-show :name="permissionChildrenList.UiPageLayoutDesignBtn.source"></icon-show>
+ 鎸夐挳璁捐
</el-button>
- <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">鍒犻櫎
+ <el-button v-if="permissionChildrenList.UiPageLayoutEditBtn" size="small" type="text"
+ @click="editBtnClick(scope.row)">
+ <icon-show :name="permissionChildrenList.UiPageLayoutEditBtn.source"></icon-show>
+ 缂栬緫
</el-button>
- <el-button icon="el-icon-document-copy" size="small" type="text" @click="rowCloneHandler(scope.row)">鍏嬮殕
+ <el-button v-if="permissionChildrenList.UiPageLayoutDelBtn" size="small" type="text"
+ @click="rowDeleteHandler(scope.row)">
+ <icon-show :name="permissionChildrenList.UiPageLayoutDelBtn.source"></icon-show>
+ 鍒犻櫎
+ </el-button>
+ <el-button v-if="permissionChildrenList.UiPageLayoutCloneBtn" size="small" type="text"
+ @click="rowCloneHandler(scope.row)">
+ <icon-show :name="permissionChildrenList.UiPageLayoutCloneBtn.source"></icon-show>
+ 鍏嬮殕
</el-button>
</template>
@@ -109,28 +123,36 @@
append-to-body="true"
class="avue-dialog"
title="閰嶇疆鎸夐挳"
- width="75%"
- @close="dialogClose">
+ width="1200px"
+ @close="$refs.form.clearValidate();disabledBtn=true;">
<el-container v-loading="dialogLoading">
- <el-header style="height: 40px !important;">
+ <el-header style="height: 40px !important;padding-left: 5px;">
<div style="display: flex">
- <el-button :disabled="!disabledBtn" plain size="mini" type="primary" @click="addClickBtnHandler">娣诲姞
+ <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="primary"
+ @click="addClickBtnHandler">娣诲姞
</el-button>
- <el-button :disabled="!disabledBtn" plain size="mini" type="primary" @click="editClickBtnHandler">淇敼
+ <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="primary"
+ @click="editClickBtnHandler">淇敼
</el-button>
- <el-button :disabled="!disabledBtn" plain size="mini" type="danger" @click="delClickBtnHandler">鍒犻櫎
+ <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="danger"
+ @click="delClickBtnHandler">鍒犻櫎
</el-button>
- <el-button :disabled="disabledBtn" plain size="mini" type="primary" @click="saveClickBtnHandler">淇濆瓨
+ <el-button v-show="!disabledBtn" :disabled="disabledBtn" icon="el-icon-check" plain size="mini"
+ type="success" @click="saveClickBtnHandler">淇濆瓨
</el-button>
- <el-button :disabled="disabledBtn" plain size="mini" type="primary" @click="escClickBtnHandler">鍙栨秷
+ <el-button v-show="!disabledBtn" :disabled="disabledBtn" icon="el-icon-close" plain size="mini"
+ type="danger" @click="escClickBtnHandler">鍙栨秷
</el-button>
- <el-button plain size="mini" type="primary" @click="changeBottomBtnHandler">璋冩暣涓轰笅绾ф寜閽�</el-button>
- <el-button plain size="mini" type="primary" @click="changeTopBtnHandler">璋冩暣涓轰笂绾ф寜閽�</el-button>
- <el-button plain size="mini" type="primary" @click="cloneClickBtnHandler">澶嶅埗鍒板叾浠栫粍浠�</el-button>
+ <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="changeBottomBtnHandler">璋冩暣涓轰笅绾ф寜閽�
+ </el-button>
+ <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="changeTopBtnHandler">璋冩暣涓轰笂绾ф寜閽�
+ </el-button>
+ <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="cloneClickBtnHandler">澶嶅埗鍒板叾浠栫粍浠�
+ </el-button>
</div>
</el-header>
<el-container>
- <el-aside width="20%">
+ <el-aside width="25%">
<basic-container>
<div style="height:650px;">
<avue-tree
@@ -141,9 +163,10 @@
node-key="value"
@node-click="nodeTreeClick">
<span slot-scope="{ node, data }" class="el-tree-node__label">
- <span style="font-size: 14px">
- <i class="el-icon-s-promotion"></i>
- {{ (node || {}).label }}
+ <span style="display: flex">
+ <i v-if="data.oId=='parentNode'" class="iconShow el-icon-s-home"></i>
+ <icon-show v-else :name="data.iconPath"></icon-show>
+ {{ (node || {}).label }}
</span>
</span>
</avue-tree>
@@ -154,30 +177,31 @@
<el-main>
<basic-container>
<el-divider content-position="left">鍩虹淇℃伅</el-divider>
- <el-form ref="form" :model="basicForm" :rules="rules" label-width="90px" size="small"
+ <el-form ref="form" :model="basicForm" :rules="rules" label-width="100px" size="small"
style="margin-top: 20px">
<el-row>
- <el-form-item :inline-message='true' label="缂栧彿锛�" prop="seq">
- <el-input-number v-model="basicForm.seq" :disabled="disabledBtn" :max="9999" :min="1"
- controls-position="right"></el-input-number>
- </el-form-item>
+ <el-col :span="12">
+ <el-form-item :inline-message='true' label="缂栧彿锛�" prop="seq">
+ <el-input-number v-model="basicForm.seq" :disabled="disabledBtn" :max="9999" :min="1"
+ controls-position="right"></el-input-number>
+ </el-form-item>
+ </el-col>
- <el-form-item :inline-message='true' label="鍚嶇О锛�" prop="label">
- <el-col :span="14">
- <el-input v-model="basicForm.label" :readonly="disabledBtn"></el-input>
- </el-col>
- </el-form-item>
+ <el-col :span="12">
+ <el-form-item label="鍚嶇О锛�" prop="label">
+ <el-input v-model="basicForm.label" :disabled="disabledBtn"></el-input>
+ </el-form-item>
+ </el-col>
- <el-form-item label="Action锛�" prop="Action">
- <el-col :span="14">
- <div style="display: flex">
- <el-input v-model="basicForm.actionName" :readonly="disabledBtn"></el-input>
- <el-button :disabled="disabledBtn" size="mini" style="margin-left: 10px" type="success"
- @click="actionFoucus">閫夋嫨
- </el-button>
- </div>
- </el-col>
- </el-form-item>
+ <el-col :span="12">
+ <el-form-item label="Action锛�" prop="actionName">
+ <el-input v-model="basicForm.actionName" :clearable="true" :disabled="disabledBtn"
+ @clear="clearActionValue" @focus="actionFoucus">
+ <i slot="suffix" class="el-input__icon el-icon-search" style="cursor: pointer"
+ @click="actionFoucus"></i>
+ </el-input>
+ </el-form-item>
+ </el-col>
<el-col :span="12">
<el-form-item label="鏄惁鎺堟潈锛�" prop="authorization">
@@ -185,7 +209,8 @@
<el-radio v-model="basicForm.authorization" :disabled="disabledBtn" label="1">鍚�</el-radio>
</el-form-item>
</el-col>
-
+ <el-col :span="24">
+ </el-col>
<el-col :span="12">
<el-form-item label="鏄惁鏄剧ず锛�" prop="show">
<el-radio v-model="basicForm.show" :disabled="disabledBtn" label="0">鏄�</el-radio>
@@ -193,7 +218,7 @@
</el-form-item>
</el-col>
- <el-col :span="12">
+ <el-col v-show="basicForm.show=='0'" :span="12">
<el-form-item label="鏄剧ず鏂瑰紡锛�" prop="showType">
<el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="text">鏂囧瓧</el-radio>
<el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="image">鍥炬爣</el-radio>
@@ -201,10 +226,15 @@
</el-radio>
</el-form-item>
</el-col>
+ <el-col :span="24" v-show="basicForm.show=='0' && (basicForm.displayMode=='image'||basicForm.displayMode=='textandimage')">
+ <el-form-item :class="basicForm.displayMode==='image'?'is-required':''" label="鍥炬爣锛�" prop="iconPath">
+ <input-icon v-model="basicForm.iconPath" :disabled="disabledBtn"></input-icon>
+ </el-form-item>
+ </el-col>
- <el-col :span="12">
+ <el-col :span="24">
<el-form-item label="鎻愮ず淇℃伅锛�" prop="desc">
- <el-input v-model="basicForm.desc" :readonly="disabledBtn" type="textarea"></el-input>
+ <el-input v-model="basicForm.desc" :disabled="disabledBtn" type="textarea"></el-input>
</el-form-item>
</el-col>
@@ -241,7 +271,8 @@
</el-container>
</el-container>
</el-dialog>
- <action-dialog ref="actionDialog" @updataAction="actionSaveHandler"></action-dialog>
+ <action-dialog ref="actionDialog" @cancelAction="actionCancelHandler"
+ @updataAction="actionSaveHandler"></action-dialog>
<clone-dialog ref="cloneDialog" :fromOid="fromOid" :sourceOId="sourceOId" paramsType="tab"
type="pageDef"></clone-dialog>
<clone-dialog ref="cloneBtnDialog" :fromOid="formBtnOid" :sourceOId="sourceBtnOid" paramsType="pageDef"
@@ -268,6 +299,7 @@
} from "@/api/UI/uiDefine";
import actionDialog from '@/views/modelingMenu/ui/Aciton/components/dialog';
import cloneDialog from "@/views/modelingMenu/ui/uiDefine/rightRegion/cloneDialog";
+import {mapGetters} from "vuex";
export default {
props: {
@@ -357,11 +389,15 @@
editBtn: false,
delBtn: false,
refreshBtn: false,
+ dialogWidth: '600',
+ menuWidth: '140',
column: [
{
label: '鍚嶇О',
prop: 'name',
+ width: 180,
span: 24,
+ overHidden: true,
rules: [
{
required: true,
@@ -373,7 +409,9 @@
{
label: '鍊�',
prop: 'value',
+ type: 'textarea',
span: 24,
+ overHidden: true,
rules: [
{
required: true,
@@ -391,11 +429,12 @@
label: [
{required: true, message: '璇疯緭鍏ュ悕绉�', trigger: 'blur'},
],
+ actionName: [
+ {required: true, message: '璇烽�夋嫨Action', trigger: 'change'},
+ ],
},
// 鎸夐挳璁捐 鍩虹淇℃伅
- basicForm: {
- seq: 1
- },
+ basicForm: {},
treeData: [],
treeOption: {
menu: false,
@@ -414,17 +453,19 @@
data: [],
option: {
...basicOption,
- size:'mini',
+ size: 'mini',
height: this.height,
addBtn: false,
index: true,
calcHeight: -30,
editBtn: false,
delBtn: false,
+ menuWidth: 300,
column: [
{
label: '鍚嶇О',
prop: 'name',
+ width: 220,
labelWidth: 110,
rules: [
{
@@ -437,6 +478,7 @@
{
label: '缂栧彿',
prop: 'seq',
+ width: 100,
labelWidth: 110,
hide: false,
rules: [
@@ -448,13 +490,13 @@
],
},
{
- label: '',
+ label: 'UI瑙f瀽绫诲瀷',
prop: 'uiParser',
hide: true,
labelWidth: 110,
},
{
- label: '',
+ label: '鎵╁睍灞炴��',
prop: 'extAttr',
hide: true,
labelWidth: 110,
@@ -577,7 +619,7 @@
if (this.searchTargerChangeFlag) {
// 鍒囨崲娓呯┖妯℃澘绫诲瀷
- const list = ['showType', 'linkType', 'templateId', 'SubUILayout', 'queryTemplateName', 'searchObjType', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl'];
+ const list = ['showType', 'linkType', 'templateId', 'SubUILayout', 'queryTemplateName', 'searchObjType', 'bsDataModel', 'csDataModel'];
list.forEach(item => {
this.form[item] = '';
})
@@ -589,8 +631,8 @@
],
group: [
{
- icon:'el-icon-info',
- label:'',
+ icon: 'el-icon-info',
+ label: '',
arrow: true,
prop: 'group1',
column: [
@@ -606,7 +648,7 @@
change: (val) => {
if (val.value) {
let params = {
- 'conditionMap[selectBtmType]': this.form.searchTarger === '1' ? this.form.showType : this.form.linkType
+ 'conditionMap[selectBtmType]': this.form.searchTarger === '1' ? val.value : this.form.linkType
}
getPortalVIDatasByPage(1, -1, params).then(res => {
this.templateIdList = res.data.data;
@@ -793,14 +835,14 @@
},
{
label: 'B/S鑷畾涔夋煡璇�',
- prop: 'bsCustQueryCLsOrUrl',
+ prop: 'bsDataModel',
display: false,
labelWidth: 115,
span: 12
},
{
label: 'C/S鑷畾涔夋煡璇�',
- prop: 'csCustQueryCLsOrUrl',
+ prop: 'csDataModel',
display: false,
labelWidth: 115,
span: 12
@@ -840,6 +882,19 @@
lastIndex: null,
selectList: [],
formDataRow: {},
+ defaultForm: {},
+ }
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionChildrenList() {
+ return {
+ UiPageLayoutAddBtn: this.vaildData(this.permission[this.$route.query.id].CLSRIGHT, false),
+ UiPageLayoutEditBtn: this.vaildData(this.permission[this.$route.query.id].DATARIGHT, false),
+ UiPageLayoutDelBtn: this.vaildData(this.permission[this.$route.query.id].ATTRRIGHT, false),
+ UiPageLayoutCloneBtn: this.vaildData(this.permission[this.$route.query.id].CLONE, false),
+ UiPageLayoutDesignBtn: this.vaildData(this.permission[this.$route.query.id].UPLOAD, false),
+ }
}
},
watch: {
@@ -855,7 +910,6 @@
deep: true
}
},
- computed: {},
methods: {
//鑾峰彇鍒楄〃鏁版嵁
getTableList() {
@@ -899,7 +953,7 @@
this.lastIndex = newIndex;
},
() => {
- this.selectList = [];
+ this.selectList = [row];
}
);
},
@@ -916,6 +970,8 @@
// 澧炲姞鍏抽棴瀵硅瘽妗� 娓呯┖event鏁扮粍
beforeClose(done) {
this.eventData = [];
+ this.showTypeChangeFlag = false;
+ this.linkTypeChangeFlag = false;
done();
},
@@ -969,6 +1025,10 @@
row.SubUIObjType = row.showType;
row.showType = "";
}
+ if (row.templateType === '5' && this.form.linkType && !this.form.showLinkAbs) {
+ this.$message.error('璇烽�夋嫨鍙傜収鏍戣缃�');
+ return loading();
+ }
const params = {
...row,
tabPageOId: this.sourceData.plOId
@@ -1011,24 +1071,6 @@
// 瀵硅瘽妗嗚〃鏍兼坊鍔�
formDataAddClickHandler() {
- // if (!this.form.eventKey) {
- // this.$message.error('璇烽�夋嫨EventKey');
- // return;
- // }
- //
- // if (!this.form.eventValue) {
- // this.$message.error('璇疯緭鍏ventValue');
- // return;
- // }
- //
- // if (this.eventData.length >= 1) {
- // const eventValueStatus = this.eventData.some(item => item.eventValue === this.form.eventValue);
- //
- // if (eventValueStatus) {
- // this.$message.error('宸插瓨鍦ㄧ浉鍚岀殑 EventValue锛屼笉鑳介噸澶嶆坊鍔�');
- // return;
- // }
- // }
const obj = {
index: this.eventData.length,
eventKey: this.form.eventKey || 'SelectionEvent',
@@ -1055,7 +1097,7 @@
// 妯℃澘绫诲瀷涓鸿〃鏍�
templateTypeTable(val) {
if (!val) return;
- this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']);
+ this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'bsDataModel', 'csDataModel']);
},
// 妯℃澘绫诲瀷涓鸿嚜瀹氫箟妯℃澘
@@ -1069,13 +1111,13 @@
// 妯℃澘绫诲瀷涓烘爲琛�
templateTypeTreeTable(val) {
if (!val) return;
- this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'expandCols', 'expandMode', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']);
+ this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'expandCols', 'expandMode', 'bsDataModel', 'csDataModel']);
},
// 妯℃澘绫诲瀷涓鸿〃鍗�
templateTypeForm(val) {
if (!val) return;
- this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']);
+ this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'bsDataModel', 'csDataModel']);
},
// 妯℃澘绫诲瀷涓烘爲
@@ -1083,7 +1125,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', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']);
+ this.updateDisplay(val, ['showType', 'queryTemplateName', 'rootContent', 'showAbs', 'showLinkAbs', 'separator', 'expandMode', 'linkType', 'bsDataModel', 'csDataModel']);
},
// 妯℃澘绫诲瀷涓篣I瀹氫箟
@@ -1091,7 +1133,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', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']);
+ this.updateDisplay(val, ['showType', 'SubUILayout', 'searchType', 'searchObjType', 'queryTemplateName', 'bsDataModel', 'csDataModel']);
},
// 鏌ユ壘鏁扮粍涓璞$储寮�
@@ -1120,34 +1162,34 @@
},
// 鎸夐挳璁捐
- btnDesignClickHandler() {
- if (this.selectList.length != 1) {
+ btnDesignClickHandler(row) {
+ /*if (this.selectList.length != 1) {
this.$message.error('璇烽�夋嫨涓�鏉℃暟鎹�');
return;
- }
+ }*/
this.btnDesignVisible = true;
- this.formBtnOid = this.selectList[0].id;
- this.getTabBtnTree();
+ this.formBtnOid = row.id;
+ this.getTabBtnTree(row);
},
// 宸︿晶鏍戣姹�
- getTabBtnTree() {
+ getTabBtnTree(row) {
const params = {
- pageDefinationOid: this.selectList[0].id
+ pageDefinationOid: row && row.id ? row.id : this.selectList[0].id
}
this.treeLoading = true;
getTabButtons(params).then(res => {
if (res.data.code === 200) {
const data = res.data.data;
this.treeData = [{
- label: this.selectList[0].name,
+ label: row && row.id ? row.name : this.selectList[0].name,
oId: 'parentNode',
disabled: true,
children: data
}];
this.treeLoading = false;
} else {
- this.$message.error('璇锋鏌ユ帶鍒跺彴閿欒');
+ this.$message.error(res.data.msg);
}
})
},
@@ -1155,12 +1197,14 @@
// 鎸夐挳璁捐琛岀偣鍑�
nodeTreeClick(row) {
this.nodeTreeRow = row;
+ this.defaultForm = {...row};
this.basicForm = {...row};
this.paramsData = row.buttonParams ? Object.entries(row.buttonParams).map(([key, value]) => ({
name: key,
value: value
})) : [];
this.disabledBtn = true;
+ this.$refs.form.clearValidate();
},
// 鎸夐挳璁捐鍙傛暟淇℃伅鍒犻櫎
@@ -1233,42 +1277,55 @@
this.disabledBtn = true;
if (this.saveType === 'add') {
this.$refs.Tree.setCurrentKey(null);
+ this.$refs.form.resetFields();
+ } else {
+ this.basicForm = {...this.defaultForm};
}
},
// 鎸夐挳璁捐淇濆瓨
saveClickBtnHandler() {
- this.dialogLoading = true;
- const saveFunction = this.saveType === 'add' ? addTapButton : updateTapButton;
- const bottomParams = {};
- if (this.paramsData.length > 0) {
- this.paramsData.forEach(item => {
- bottomParams[item.name] = item.value
- })
+ if (this.basicForm.show == '0' && this.basicForm.displayMode == 'image' && this.basicForm.iconPath == '') {
+ this.$message.error('璇烽�夋嫨鍥炬爣');
+ return;
}
+ this.$refs.form.validate((valid, done) => {
+ if (valid) {
+ this.dialogLoading = true;
+ const saveFunction = this.saveType === 'add' ? addTapButton : updateTapButton;
+ const bottomParams = {};
+ if (this.paramsData.length > 0) {
+ this.paramsData.forEach(item => {
+ bottomParams[item.name] = item.value
+ })
+ }
+ const params = this.saveType === 'add' ? {
+ ...this.basicForm,
+ parentId: this.nodeTreeRow.oId === 'parentNode' ? '' : this.nodeTreeRow.parentId,
+ buttonParams: bottomParams,
+ tableOId: this.selectList[0].id
+ } : {
+ ...this.basicForm,
+ buttonParams: bottomParams
+ }
- const params = this.saveType === 'add' ? {
- ...this.basicForm,
- parentId: this.nodeTreeRow.oId === 'parentNode' ? '' : this.nodeTreeRow.parentId,
- buttonParams: bottomParams,
- tableOId: this.selectList[0].id
- } : {
- ...this.basicForm,
- buttonParams: bottomParams
- }
-
- saveFunction(params).then(res => {
- if (res.data.code === 200) {
- this.$message.success(res.data.obj);
- this.disabledBtn = true;
- this.getTabBtnTree();
- this.basicForm = {};
- this.paramsData = [];
- this.dialogLoading = false;
+ saveFunction(params).then(res => {
+ if (res.data.code === 200) {
+ this.$message.success(res.data.obj);
+ this.disabledBtn = true;
+ this.getTabBtnTree();
+ this.paramsData = [];
+ this.dialogLoading = false;
+ this.$refs.form.resetFields();
+ }
+ }).catch(err => {
+ this.dialogLoading = false;
+ })
+ } else {
+ return false;
}
- }).catch(err => {
- this.dialogLoading = false;
- })
+ done();
+ });
},
// 鎸夐挳璁捐鍒犻櫎
@@ -1327,8 +1384,21 @@
actionSaveHandler(val) {
this.$set(this.basicForm, 'actionName', val.plName);
this.$set(this.basicForm, 'actionOId', val.plOId);
+ this.$set(this.basicForm, 'iconPath', val.plImage);//鍥炬爣
+ this.$refs.form.clearValidate('Action')
+ },
+ // action閫夋嫨寮圭獥鐩存帴鍏抽棴
+ actionCancelHandler() {
+ if (this.basicForm.actionOId) {
+ this.$refs.form.clearValidate('Action')
+ }
},
+ //娓呴櫎action
+ clearActionValue() {
+ this.$set(this.basicForm, 'actionName', '');
+ this.$set(this.basicForm, 'actionOId', '');
+ },
// 鎵撳紑鍏嬮殕瀵硅瘽妗�
rowCloneHandler(row) {
this.fromOid = this.sourceData.plOId;
--
Gitblit v1.9.3