From 96df9c12a94474ddd567fab1f255d3721b6cf03c Mon Sep 17 00:00:00 2001
From: wangting <wangting@vci-tech.com>
Date: 星期四, 02 一月 2025 16:28:38 +0800
Subject: [PATCH] 调整UI引擎页面按钮图标
---
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue | 540 +++++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 355 insertions(+), 185 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 6c8a6f5..efa462c 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
@@ -8,27 +8,25 @@
:data="data"
:option="option"
:table-loading="tableLoading"
- @row-del="rowDelHandler"
@row-save="rowSaveHandler"
@row-update="rowUpdateHandler"
- @refresh-change="handleRefresh"
@selection-change="selectChangeHandler"
@row-click="rowClickHandler">
<template slot="menuLeft" slot-scope="scope">
- <el-button icon="el-icon-plus" plain size="small" type="primary"
+ <el-button v-if="permissionChildrenList.UiPageLayoutAddBtn" 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>
</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" icon="el-icon-edit-outline" size="small" type="text"
+ @click="btnDesignClickHandler(scope.row)">鎸夐挳璁捐
</el-button>
- <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">鍒犻櫎
+ <el-button v-if="permissionChildrenList.UiPageLayoutEditBtn" icon="el-icon-edit" size="small" type="text" @click="editBtnClick(scope.row)">缂栬緫
</el-button>
- <el-button icon="el-icon-document-copy" size="small" type="text" @click="rowCloneHandler(scope.row)">鍏嬮殕
+ <el-button v-if="permissionChildrenList.UiPageLayoutDelBtn" icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">鍒犻櫎
+ </el-button>
+ <el-button v-if="permissionChildrenList.UiPageLayoutCloneBtn" icon="el-icon-document-copy" size="small" type="text" @click="rowCloneHandler(scope.row)">鍏嬮殕
</el-button>
</template>
@@ -58,6 +56,52 @@
<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="uiParserLabel" slot-scope="{}">
+ <el-tooltip placement="top">
+ <div slot="content">绀轰緥锛歫ava_cs;xxx.java_bs;xxx.net_cs;xxxx.net_bs;xxx.mobile_cs;xx.mobile_bs;xxx;
+ <br/>1銆佺敤鑻辨枃鍗婅鍒嗗彿;鍒嗗壊鍚勭粍鍊硷紱锛堣繖閲岀粨灏剧殑鏄腑鏂囧瓧绗︾殑鍒嗗彿锛�
+ <br/>2銆佹瘡缁勭敤鑻辨枃鍗婅鍐掑彿:鍒嗛殧鍗曚竴鎵╁睍灞炴�у悕绉板強灞炴�у�硷紱
+ <br/>3銆佸叾涓殑xxx鏄悇绉嶈В鏋愮被鐨勫畬鏁寸被鍨嬪悕绉帮紙瀹屽叏闄愬畾鍚�)锛�
+ <br/>4銆佽緭鍏ユ椂锛屼笉瑕佹暡鍥炶溅鎹㈣;
+ </div>
+ <span>UI瑙f瀽绫诲瀷 <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>
+
+ <template slot="queryTemplateNameForm" slot-scope="{}">
+ <el-select v-model="form.queryTemplateName" filterable placeholder="璇烽�夋嫨">
+ <el-option
+ v-for="item in queryTemplateNameList"
+ :key="item.qtName"
+ :label="item.qtName"
+ :value="item.qtName">
+ </el-option>
+ </el-select>
+ </template>
</avue-crud>
<el-dialog
v-dialogDrag
@@ -65,28 +109,28 @@
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" plain size="mini" icon="el-icon-check" type="success" @click="saveClickBtnHandler">淇濆瓨
</el-button>
- <el-button :disabled="disabledBtn" plain size="mini" type="primary" @click="escClickBtnHandler">鍙栨秷
+ <el-button v-show="!disabledBtn" :disabled="disabledBtn" plain size="mini" icon="el-icon-close" 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
@@ -97,9 +141,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>
@@ -110,38 +155,38 @@
<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-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-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 :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-col :span="12">
- <el-form-item label="鏄惁鎺堟潈锛�" prop="resource">
+ <el-form-item :inline-message='true' label="鍚嶇О锛�" prop="label">
+ <el-input v-model="basicForm.label" :disabled="disabledBtn"></el-input>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="12">
+ <el-form-item label="Action锛�" prop="actionName">
+ <el-input v-model="basicForm.actionName" :disabled="disabledBtn" :clearable="true" @focus="actionFoucus" @clear="clearActionValue">
+ <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">
<el-radio v-model="basicForm.authorization" :disabled="disabledBtn" label="0">鏄�</el-radio>
<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>
@@ -149,18 +194,22 @@
</el-form-item>
</el-col>
- <el-col :span="12">
+ <el-col :span="12" v-show="basicForm.show=='0'">
<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>
- <el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="textandimage">鏂囧瓧鍜屽浘鏍�
- </el-radio>
+ <el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="textandimage">鏂囧瓧鍜屽浘鏍�</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 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>
@@ -197,8 +246,11 @@
</el-container>
</el-container>
</el-dialog>
- <action-dialog ref="actionDialog" @updataAction="actionSaveHandler"></action-dialog>
- <clone-dialog ref="cloneDialog"></clone-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"
+ type="tabButton"></clone-dialog>
</div>
</template>
@@ -207,21 +259,21 @@
import func from "@/util/func";
import {
getPLPageDefinations,
- getBtmDatasByPage,
- getPortalVIDatasByPage,
- getQTInfoDatasByPage,
getTabButtons,
addTapButton,
updateTapButton,
- getLinkDatasByPage,
addPageDefination,
deleteTabButton,
delPageDefination,
joinBtn,
- exitBtn
+ exitBtn,
+ updatePageDefination,
+ getPortalVIDatasByPage,
+ getQTInfoDatasByPage
} from "@/api/UI/uiDefine";
-import actionDialog from '@/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action';
+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: {
@@ -242,6 +294,15 @@
name: "index",
data() {
return {
+ queryTemplateNameList: [],
+ templateIdList: [],
+ searchTargerChangeFlag: false,
+ showTypeChangeFlag: false,
+ linkTypeChangeFlag: false,
+ formBtnOid: '',
+ sourceBtnOid: '',
+ sourceOId: '',
+ fromOid: '',
paramsForm: {},
eventOption: {
...basicOption,
@@ -302,10 +363,13 @@
editBtn: false,
delBtn: false,
refreshBtn: false,
+ dialogWidth:'600',
+ menuWidth:'150',
column: [
{
label: '鍚嶇О',
prop: 'name',
+ width:180,
span: 24,
rules: [
{
@@ -318,6 +382,7 @@
{
label: '鍊�',
prop: 'value',
+ type:'textarea',
span: 24,
rules: [
{
@@ -335,6 +400,9 @@
],
label: [
{required: true, message: '璇疯緭鍏ュ悕绉�', trigger: 'blur'},
+ ],
+ actionName: [
+ {required: true, message: '璇烽�夋嫨Action', trigger: 'blur'},
],
},
// 鎸夐挳璁捐 鍩虹淇℃伅
@@ -359,16 +427,20 @@
data: [],
option: {
...basicOption,
+ 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: [
{
required: true,
@@ -380,6 +452,8 @@
{
label: '缂栧彿',
prop: 'seq',
+ width:100,
+ labelWidth: 110,
hide: false,
rules: [
{
@@ -393,16 +467,25 @@
label: 'UI瑙f瀽绫诲瀷',
prop: 'uiParser',
hide: true,
+ labelWidth: 110,
},
{
label: '鎵╁睍灞炴��',
prop: 'extAttr',
hide: true,
+ labelWidth: 110,
+ },
+ {
+ label: '鎻忚堪',
+ prop: 'description',
+ labelWidth: 110,
+ hide: false,
},
{
label: '妯℃澘绫诲瀷',
prop: 'templateType',
type: 'radio',
+ labelWidth: 110,
span: 24,
value: '1',
dicData: [
@@ -437,9 +520,10 @@
},
change: (val) => {
const list = ['showType', 'linkType', 'templateId', 'SubUILayout', 'searchObjType', 'queryTemplateName', 'controlPath', 'expandCols', 'rootContent', 'showAbs', 'showLinkAbs', 'separator']
- list.forEach(item => {
- this.form[item] = "";
- })
+ // list.forEach(item => {
+ // this.form[item] = "";
+ // })
+ // this.form.searchTarger = '1'
const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // 鑾峰彇鎼滅储绫诲瀷閰嶇疆椤�
searchTarger.display = true; // 鍒囨崲榛樿灞曠ず鎼滅储绫诲瀷
// 妯℃澘绫诲瀷涓鸿〃鏍�
@@ -460,13 +544,14 @@
label: '鏄剧ず绫诲瀷',
prop: 'navigatorType',
type: 'radio',
+ labelWidth: 110,
span: 24,
value: '1',
hide: true,
dicData: [
{
label: '涓嶆樉绀�',
- value: '3'
+ value: '1'
},
{
label: '鏄剧ず瑙掕壊',
@@ -474,7 +559,7 @@
},
{
label: '鏄剧ずFolder',
- value: '1',
+ value: '3',
},
],
},
@@ -482,6 +567,7 @@
label: '鎼滅储绫诲瀷',
prop: 'searchTarger',
display: true,
+ labelWidth: 110,
type: 'radio',
value: '1',
span: 24,
@@ -504,33 +590,62 @@
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', 'bsDataModel', 'csDataModel'];
+ list.forEach(item => {
+ this.form[item] = '';
+ })
+ } else {
+ this.searchTargerChangeFlag = true;
+ }
}
- },
- {
- label: '鎻忚堪',
- prop: 'description',
- display: false
},
],
group: [
{
- label: '',
- arrow: false,
+ icon:'el-icon-info',
+ label:'',
+ arrow: true,
prop: 'group1',
column: [
{
label: '婧愬璞�',
prop: 'showType',
type: 'select',
- cascader: ['linkType', 'templateId', 'SubUILayout', 'searchObjType', 'queryTemplateName'],
+ labelWidth: 115,
+ cascader: ['linkType', 'SubUILayout', 'searchObjType'],
placeholder: "璇疯緭鍏ュ唴瀹�",
dicUrl: '/api/uiManagerController/getBtmDatasByPage?page=1&limit=-1',
filterable: true,
+ change: (val) => {
+ if (val.value) {
+ let params = {
+ 'conditionMap[selectBtmType]': this.form.searchTarger === '1' ? val.value : this.form.linkType
+ }
+ getPortalVIDatasByPage(1, -1, params).then(res => {
+ this.templateIdList = res.data.data;
+ })
+ getQTInfoDatasByPage(1, -1, params).then(res => {
+ this.queryTemplateNameList = res.data.data;
+ })
+ }
+ if (this.showTypeChangeFlag) {
+ if (val.value) {
+ if (this.form.searchTarger === '1') {
+ this.form.templateId = "";
+ this.form.queryTemplateName = "";
+ } else {
+ this.form.linkType = "";
+ this.form.templateId = "";
+ this.form.queryTemplateName = "";
+ }
+ }
+ } else {
+ this.showTypeChangeFlag = true;
+ }
+ },
props: {
label: 'name',
value: 'name',
@@ -549,6 +664,7 @@
prop: 'linkType',
type: 'select',
display: false,
+ labelWidth: 115,
filterable: true,
props: {
label: 'name',
@@ -556,14 +672,34 @@
desc: 'tag'
},
dicUrl: '/api/uiManagerController/getLinkDatasByPage?page=1&limit=-1&conditionMap[selectBtmType]={{key}}',
+ change: (val) => {
+ if (val.value) {
+ let params = {
+ 'conditionMap[selectBtmType]': val.value
+ }
+ getPortalVIDatasByPage(1, -1, params).then(res => {
+ this.templateIdList = res.data.data;
+ })
+ getQTInfoDatasByPage(1, -1, params).then(res => {
+ this.queryTemplateNameList = res.data.data;
+ })
+ }
+ if (this.linkTypeChangeFlag) {
+ if (val.value) {
+ this.form.templateId = "";
+ this.form.queryTemplateName = "";
+ }
+ } else {
+ this.linkTypeChangeFlag = true;
+ }
+ }
},
{
label: '閫夋嫨妯℃澘',
prop: 'templateId',
+ labelWidth: 115,
display: false,
- type: 'select',
- filterable: true,
- dicUrl: '/api/uiManagerController/getPortalVIDatasByPage?page=1&limit=-1&conditionMap[selectBtmType]={{key}}',
+ formslot: true,
rules: [
{
required: true,
@@ -571,22 +707,17 @@
trigger: 'submit'
}
],
- props: {
- label: 'viName',
- value: 'viName',
- desc: 'viType'
- },
},
{
label: 'UI瀹氫箟',
prop: 'SubUILayout',
type: 'select',
+ labelWidth: 115,
filterable: true,
display: false,
props: {
- label: 'qtName',
- value: 'qtName',
- desc: 'btmName'
+ label: 'plName',
+ value: 'plCode',
},
dicUrl: '/api/uiManagerController/getUILayoutDatasByPage?page=1&limit=-1&conditionMap[selectBtmType]={{key}}',
},
@@ -596,6 +727,7 @@
display: false,
value: '1',
type: 'radio',
+ labelWidth: 115,
span: 24,
dicData: [
{
@@ -613,7 +745,7 @@
prop: 'searchObjType',
type: 'select',
display: false,
- labelWidth: 100,
+ labelWidth: 115,
props: {
label: 'qtName',
value: 'qtName',
@@ -624,19 +756,15 @@
{
label: '鏌ヨ妯℃澘',
prop: 'queryTemplateName',
+ labelWidth: 115,
type: 'select',
- filterable: true,
display: false,
- props: {
- label: 'qtName',
- value: 'qtName',
- desc: 'btmName'
- },
- dicUrl: '/api/uiManagerController/getQTInfoDatasByPage?page=1&limit=-1&conditionMap[selectBtmType]={{key}}',
+ formslot: true,
},
{
label: '鎺у埗璺緞',
prop: 'controlPath',
+ labelWidth: 115,
display: false,
type: 'textarea',
span: 24,
@@ -645,18 +773,20 @@
{
label: '鏍戠粨鏋勫睍寮�鍒�',
prop: 'expandCols',
- labelWidth: 110,
+ labelWidth: 115,
display: false,
span: 12
},
{
label: '鍙傜収鏍戣缃�',
prop: 'showLinkAbs',
+ labelWidth: 115,
display: false,
},
{
label: '鍒嗛殧绗�',
prop: 'separator',
+ labelWidth: 115,
display: false,
},
{
@@ -664,6 +794,7 @@
prop: 'expandMode',
display: false,
type: 'radio',
+ labelWidth: 115,
value: '1',
dicData: [
{
@@ -675,6 +806,20 @@
value: '0'
}
]
+ },
+ {
+ label: 'B/S鑷畾涔夋煡璇�',
+ prop: 'bsDataModel',
+ display: false,
+ labelWidth: 115,
+ span: 12
+ },
+ {
+ label: 'C/S鑷畾涔夋煡璇�',
+ prop: 'csDataModel',
+ display: false,
+ labelWidth: 115,
+ span: 12
},
{
label: '鏍硅妭鐐规樉绀鸿〃杈惧紡',
@@ -713,11 +858,23 @@
formDataRow: {},
}
},
+ computed:{
+ ...mapGetters(["permission"]),
+ permissionChildrenList() {
+ return {
+ UiPageLayoutAddBtn: this.vaildData(this.permission[this.$route.query.id].UiPageLayoutAdd, false),
+ UiPageLayoutEditBtn: this.vaildData(this.permission[this.$route.query.id].UiPageLayoutEdit, false),
+ UiPageLayoutDelBtn: this.vaildData(this.permission[this.$route.query.id].UiPageLayoutDel, false),
+ UiPageLayoutCloneBtn: this.vaildData(this.permission[this.$route.query.id].UiPageLayoutClone, false),
+ UiPageLayoutDesignBtn: this.vaildData(this.permission[this.$route.query.id].UiPageLayoutDesign, false),
+ }
+ }
+ },
watch: {
sourceData: {
handler(val) {
if (val && val.plOId) {
- this.getTableList()
+ this.getTableList();
} else {
this.data = [];
}
@@ -726,7 +883,6 @@
deep: true
}
},
- computed: {},
methods: {
//鑾峰彇鍒楄〃鏁版嵁
getTableList() {
@@ -770,14 +926,13 @@
this.lastIndex = newIndex;
},
() => {
- this.selectList = [];
+ this.selectList = [row];
}
);
},
// 澧炲姞
addClickHandler() {
- console.log(this.sourceData);
if (!this.sourceData || !this.sourceData.plOId) {
this.$message.error('璇峰湪涓婃柟閫夋嫨涓�鏉℃暟鎹悗杩涜娣诲姞');
return;
@@ -785,22 +940,11 @@
this.$refs.crud.rowAdd();
},
- // 缂栬緫鎵撳紑琛ㄥ崟鍓�
- beforeOpen(done, type) {
- if (type === 'edit') {
- this.form.showType = 'Ludc';
- this.$set(this.form, 'showType', 'Ludc');
- // this.$set(this.option.group[0].column[0],'value','Ludc');
- // this.option.group[0].column[0].value = 'Ludc';
- done();
- } else {
- done();
- }
- },
-
// 澧炲姞鍏抽棴瀵硅瘽妗� 娓呯┖event鏁扮粍
beforeClose(done) {
this.eventData = [];
+ this.showTypeChangeFlag = false;
+ this.linkTypeChangeFlag = false;
done();
},
@@ -820,13 +964,12 @@
};
});
}
+ this.searchTargerChangeFlag = false;
this.$refs.crud.rowEdit(row);
- console.log(this.form);
},
// 鍒犻櫎
rowDeleteHandler(row) {
- console.log(row);
this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎鎵�閫夋嫨鐨勬暟鎹悧锛�', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
@@ -855,16 +998,35 @@
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);
- done()
+ this.getTableList();
+ done();
+ }
+ }).catch(err => {
+ loading();
+ })
+ },
+
+ rowUpdateHandler(row, index, done, loading) {
+ if (row.templateType === '6') {
+ row.SubUIObjType = row.showType;
+ row.showType = "";
+ }
+ const params = {
+ ...row,
+ tabPageOId: this.sourceData.plOId
+ }
+ updatePageDefination(params).then(res => {
+ if (res.data.code === 200) {
+ this.$message.success(res.data.obj);
+ this.getTableList();
+ done();
}
}).catch(err => {
loading();
@@ -878,24 +1040,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',
@@ -922,7 +1066,7 @@
// 妯℃澘绫诲瀷涓鸿〃鏍�
templateTypeTable(val) {
if (!val) return;
- this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName']);
+ this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'bsDataModel', 'csDataModel']);
},
// 妯℃澘绫诲瀷涓鸿嚜瀹氫箟妯℃澘
@@ -936,13 +1080,13 @@
// 妯℃澘绫诲瀷涓烘爲琛�
templateTypeTreeTable(val) {
if (!val) return;
- this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'expandCols', 'zkfs']);
+ this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'expandCols', 'expandMode', 'bsDataModel', 'csDataModel']);
},
// 妯℃澘绫诲瀷涓鸿〃鍗�
templateTypeForm(val) {
if (!val) return;
- this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName']);
+ this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'bsDataModel', 'csDataModel']);
},
// 妯℃澘绫诲瀷涓烘爲
@@ -950,7 +1094,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', 'bsDataModel', 'csDataModel']);
},
// 妯℃澘绫诲瀷涓篣I瀹氫箟
@@ -958,7 +1102,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', 'bsDataModel', 'csDataModel']);
},
// 鏌ユ壘鏁扮粍涓璞$储寮�
@@ -987,33 +1131,34 @@
},
// 鎸夐挳璁捐
- btnDesignClickHandler() {
- if (this.selectList.length != 1) {
+ btnDesignClickHandler(row) {
+ /*if (this.selectList.length != 1) {
this.$message.error('璇烽�夋嫨涓�鏉℃暟鎹�');
return;
- }
+ }*/
this.btnDesignVisible = true;
- 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);
}
})
},
@@ -1027,6 +1172,7 @@
value: value
})) : [];
this.disabledBtn = true;
+ this.$refs.form.clearValidate()
},
// 鎸夐挳璁捐鍙傛暟淇℃伅鍒犻櫎
@@ -1036,7 +1182,7 @@
// 鎸夐挳璁捐淇℃伅鍙傛暟淇℃伅淇敼
paramsRowEditHandler(row) {
- this.$refs.paramsCrud.rowEdit(row);
+ this.$refs.paramsCrud.rowEdit(row, row.$index);
},
// 鎸夐挳璁捐鍙傛暟淇℃伅娣诲姞鎸夐挳
@@ -1104,36 +1250,47 @@
// 鎸夐挳璁捐淇濆瓨
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.displayMode == 'textandimage') && 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
- } : {
- ...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.basicForm = {};
+ this.paramsData = [];
+ this.dialogLoading = false;
+ }
+ }).catch(err => {
+ this.dialogLoading = false;
+ })
+ } else {
+ return false;
}
- }).catch(err => {
- this.dialogLoading = false;
- })
+ done();
+ });
},
// 鎸夐挳璁捐鍒犻櫎
@@ -1154,7 +1311,6 @@
type: 'warning'
}).then(() => {
deleteTabButton(this.nodeTreeRow).then(res => {
- // console.log(res);
if (res.data.code === 200) {
this.$message.success('鍒犻櫎鎴愬姛');
this.getTabBtnTree();
@@ -1180,22 +1336,38 @@
this.$message.error('椤跺眰鑺傜偣涓嶅厑璁稿鍒�');
return;
}
- this.$refs.cloneDialog.openDialog(this.nodeTreeRow);
+ this.sourceBtnOid = this.nodeTreeRow.oId;
+ this.$refs.cloneBtnDialog.openDialog(this.nodeTreeRow);
},
// 閫夋嫨action
actionFoucus() {
- this.$refs.actionDialog.btnActionVisible = true;
+ this.$refs.actionDialog.openDialog();
},
// 淇濆瓨action
actionSaveHandler(val) {
this.$set(this.basicForm, 'actionName', val.plName);
this.$set(this.basicForm, 'actionOId', val.plOId);
+ this.$set(this.basicForm, 'iconPath', val.plCSClass);//鍥炬爣
+ 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;
+ this.sourceOId = row.id;
this.$refs.cloneDialog.openDialog(row);
},
@@ -1211,7 +1383,6 @@
return;
}
joinBtn(this.nodeTreeRow).then(res => {
- // console.log(res);
if (res.data.code === 200) {
this.$message.success(res.data.obj);
this.getTabBtnTree();
@@ -1225,7 +1396,6 @@
this.$message.error('璇烽�夋嫨鑺傜偣杩涜淇敼');
return;
}
-
if (this.nodeTreeRow.oId === "parentNode") {
this.$message.error('椤跺眰鑺傜偣涓嶅厑璁歌皟鏁�');
return;
--
Gitblit v1.9.3