From 4659799564fd6b85a7e59372c1827b1d1484c73c Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期二, 08 十月 2024 10:23:16 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/plt-web/plt-web-ui/src/views/authority/ui/uiAuthorization/UIDialog.vue | 201 ++++++++++++++++++
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue | 172 +++++++++++---
Source/plt-web/plt-web-ui/src/api/authority/ui/uiAuthor.js | 19 +
Source/plt-web/plt-web-ui/src/views/authority/ui/uiAuthorization/index.vue | 225 ++++++++++++++++++--
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue | 16 +
Source/plt-web/plt-web-ui/src/api/UI/uiDefine.js | 22 ++
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue | 4
7 files changed, 587 insertions(+), 72 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/api/UI/uiDefine.js b/Source/plt-web/plt-web-ui/src/api/UI/uiDefine.js
index 47bfd5d..2986312 100644
--- a/Source/plt-web/plt-web-ui/src/api/UI/uiDefine.js
+++ b/Source/plt-web/plt-web-ui/src/api/UI/uiDefine.js
@@ -138,6 +138,19 @@
});
}
+// 閾炬帴绫诲瀷涓嬫媺鏌ヨ
+export function getLinkDatasByPage(page, limit, params) {
+ return request({
+ url: "/api/uiManagerController/getLinkDatasByPage",
+ method: "get",
+ params: {
+ page,
+ limit,
+ ...params
+ }
+ });
+}
+
// 鏌ヨ妯℃澘涓嬫媺鏌ヨ
export function getQTInfoDatasByPage(page, limit, params) {
return request({
@@ -178,3 +191,12 @@
});
}
+// 淇濆瓨鎺ュ彛
+export function addPageDefination(params) {
+ return request({
+ url: "/api/uiManagerController/addPageDefination",
+ method: "post",
+ data:params
+ });
+}
+
diff --git a/Source/plt-web/plt-web-ui/src/api/authority/ui/uiAuthor.js b/Source/plt-web/plt-web-ui/src/api/authority/ui/uiAuthor.js
new file mode 100644
index 0000000..9d3b1dc
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/api/authority/ui/uiAuthor.js
@@ -0,0 +1,19 @@
+import request from '@/router/axios';
+
+// 鍔熻兘妯″潡鏌ヨ
+export function getUIAuthor(params) {
+ return request({
+ url: "/api/uiManagerController/getUIAuthor",
+ method: "get",
+ params
+ });
+}
+
+//鎺堟潈
+export const authorizedUI = (params) => {
+ return request({
+ url: '/api/uiManagerController/authorizedUI',
+ method: 'post',
+ data: params
+ })
+}
diff --git a/Source/plt-web/plt-web-ui/src/views/authority/ui/uiAuthorization/UIDialog.vue b/Source/plt-web/plt-web-ui/src/views/authority/ui/uiAuthorization/UIDialog.vue
new file mode 100644
index 0000000..4b92d8d
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/views/authority/ui/uiAuthorization/UIDialog.vue
@@ -0,0 +1,201 @@
+<template>
+ <el-dialog v-dialogDrag
+ :title="dialog.title"
+ :visible.sync="dialog.showDialog"
+ width="1000px"
+ :append-to-body="true"
+ class="avue-dialog"
+ :destroy-on-close="true"
+ :close-on-click-modal="false"
+ @close="cancelDialog">
+ <el-container style="height: 550px">
+ <el-aside>
+ <basic-container style="height: 500px">
+ <avue-tree ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick">
+ <span slot-scope="{ node, data }" class="el-tree-node__label">
+ <span style="font-size: 15px">
+ <i class="el-icon-user-solid"></i>
+ {{ (node || {}).label }}
+ </span>
+ </span>
+ </avue-tree>
+ </basic-container>
+ </el-aside>
+
+ <el-main>
+ <basic-container style="height: 500px">
+ <h3 style="margin: 0">妯″潡鏉冮檺閰嶇疆</h3>
+ <div style="height: 445px;">
+ <avue-tree ref="uiTree" :data="uiTreeData" :option="uiTreeOption">
+ <span slot-scope="{ node, data }" class="el-tree-node__label">
+ <span style="font-size: 15px">
+ <i :class="data.icon"></i>
+ {{ (node || {}).label }}
+ </span>
+ </span>
+ </avue-tree>
+ </div>
+ </basic-container>
+ </el-main>
+ </el-container>
+ <div class="dialog-footer avue-dialog__footer">
+ <el-button type="primary" plain size="small" @click="submitDialog" >鎺堟潈</el-button>
+ <el-button type="primary" plain size="small" @click="clearValue" >閲嶇疆</el-button>
+ <el-button size="small" @click="cancelDialog">鍙� 娑�</el-button>
+ </div>
+ </el-dialog>
+</template>
+
+<script>
+import {gridRoles} from '@/api/system/role/api'
+import {getUIAuthor,authorizedUI} from "@/api/authority/ui/uiAuthor";
+
+export default {
+name: "UIDialog",
+ data() {
+ return {
+ dialog: {
+ showDialog: false,
+ title: "UI鎺堟潈",
+ loading: false,
+ type: "add",
+ },
+ type:'',//涓氬姟绫诲瀷
+ context:'',//UI涓婁笅鏂嘽ode
+ treeOption: {
+ menu: false,
+ addBtn: false,
+ props: {
+ label: 'name',
+ value: 'oid',
+ children: 'children'
+ }
+ },
+ nodeRow: {},
+ treeData: [],
+ defaultExpandKeys:[],
+ uiTreeOption: {
+ nodeKey:'oid',
+ checkOnClickNode:true,
+ defaultExpandedKeys:this.defaultExpandKeys,
+ multiple: true,
+ menu: false,
+ addBtn: false,
+ filter:false,
+ props: {
+ label: 'label',
+ value: 'oid',
+ children: 'children'
+ }
+ },
+ uiTreeData: [],
+ }
+ },
+ methods:{
+ openDialog(type,context) {
+ this.type=type;
+ this.context=context;
+ this.dialog.showDialog = true;
+ this.getTreeList()
+ this.uiTreeData=[];
+ },
+ cancelDialog() {
+ this.dialog.loading = false;
+ this.dialog.showDialog = false;
+ },
+ getTreeList() {
+ const loading = this.$loading({});
+ gridRoles().then(res => {
+ this.treeData = res.data.data;
+ loading.close();
+ }).catch(error=>{
+ loading.close();
+ })
+ },
+ // 瑙掕壊鐐瑰嚮
+ nodeClick(row,node) {
+ this.nodeRow = row;
+ const loading = this.$loading({});
+ const params = {
+ 'conditionMap[roleId]': this.nodeRow.oid,
+ 'conditionMap[type]': this.type,
+ 'conditionMap[context]': this.context
+ }
+ this.defaultExpandKeys=['root'];
+ getUIAuthor(params).then(res => {
+ this.processChildren(res.data.data[0]); // 澶勭悊姣忎釜鑺傜偣
+ this.uiTreeOption.defaultExpandedKeys=this.defaultExpandKeys;
+ this.uiTreeData = [{
+ attributes: {},
+ checked: false,
+ expanded: true,
+ data: "root",
+ level: 0,
+ icon: 'el-icon-s-home',
+ oid: res.data.data[0].oid,
+ label: res.data.data[0].text,
+ children: res.data.data[0].children
+ }];
+ loading.close();
+ }).catch(error => {
+ loading.close();
+ })
+ },
+ //澶勭悊鏍�
+ processChildren(item) {
+ if (item.children && item.children.length > 0) {
+ item.children = item.children.map(child => {
+ if(child.level<4){
+ this.defaultExpandKeys.push(child.oid)
+ }
+ if(child.level==1){
+ child.icon='el-icon-s-promotion';
+ child.label=child.data.label+'('+child.data.name+')'
+ }else if(child.level==2){
+ child.icon='el-icon-s-order';
+ child.label=child.text
+ }else if(child.level==3){
+ child.icon='el-icon-office-building';
+ child.label=child.text
+ }else if(child.level==4){
+ child.icon='el-icon-document';
+ child.label=child.text
+ }else if(child.level==5){
+ child.icon='el-icon-s-tools';
+ child.label=child.text
+ }
+ this.processChildren(child); // 閫掑綊澶勭悊姣忎釜瀛愯妭鐐�
+ return child; // 鍙繑鍥炲瓙鑺傜偣鐨� attributes
+ });
+ }
+ },
+ submitDialog() {
+ const selectTreeList = this.$refs.uiTree.getCheckedNodes();
+ if (selectTreeList.length == 0) {
+ this.$message.error("璇烽�夋嫨鍔熻兘妯″潡");
+ return;
+ }
+ const formData = {
+ roleId: this.nodeRow.oid,
+ type: this.type,
+ context: this.context,
+ selectTreeList: selectTreeList
+ }
+ authorizedUI(formData).then(res => {
+ if (res.data.success) {
+ this.$message.success("鎺堟潈鎴愬姛");
+ this.cancelDialog();
+ }
+ });
+
+ },
+ clearValue(){
+ this.$refs.uiTree.setCheckedNodes([])
+ }
+ }
+}
+</script>
+
+<style scoped>
+
+</style>
diff --git a/Source/plt-web/plt-web-ui/src/views/authority/ui/uiAuthorization/index.vue b/Source/plt-web/plt-web-ui/src/views/authority/ui/uiAuthorization/index.vue
index 308c333..a1d02f2 100644
--- a/Source/plt-web/plt-web-ui/src/views/authority/ui/uiAuthorization/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/authority/ui/uiAuthorization/index.vue
@@ -1,33 +1,17 @@
<template>
<el-container>
-
<el-aside>
<basic-container>
- <div ref="TreeBox" style="height: calc(100vh - 144px);!important;">
- <div class="headerCon">
- <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">鍒涘缓
- </el-button>
- <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">淇敼
- </el-button>
- <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">鍒犻櫎
- </el-button>
- <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭
- </el-button>
- <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">瀵煎叆
- </el-button>
- <el-button class="smallBtn" plain size="small" type="primary"
- @click="checkViewClickHandler">鏌ョ湅浣跨敤鑼冨洿
- </el-button>
- </div>
+ <div ref="TreeBox" style="height: calc(100vh - 154px);!important;">
<!-- 宸︿晶鏍� -->
- <div style="height: calc(100vh - 280px);">
+ <div style="height: calc(100vh - 195px);">
<avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick">
- <span slot-scope="{ node, data }" class="el-tree-node__label">
- <span style="font-size: 15px">
- <i class="el-icon-s-promotion"></i>
- {{ (node || {}).label }}
- </span>
- </span>
+ <span slot-scope="{ node, data }" class="el-tree-node__label">
+ <span style="font-size: 15px">
+ <i class="el-icon-user-solid"></i>
+ {{ (node || {}).label }}
+ </span>
+ </span>
</avue-tree>
</div>
</div>
@@ -36,6 +20,37 @@
<el-main>
<basic-container>
+ <h3 style="margin: 0 0 10px 0">UI鏉冮檺閰嶇疆</h3>
+ <div>
+ <el-button icon="el-icon-place" plain size="small" type="primary" @click="saveHandler">鎺堟潈</el-button>
+ <el-button icon="el-icon-close" plain size="small" type="primary" @click="clearValue" style="margin-right: 40px;">閲嶇疆</el-button>
+ 涓氬姟绫诲瀷锛�<el-select v-model="type" placeholder="璇烽�夋嫨" size="small" :clearable="true" @change="typeChange" style="width: 300px;margin-right: 20px;">
+ <el-option
+ v-for="item in typeData"
+ :key="item.oid"
+ :label="item.text"
+ :value="item.attributes.name">
+ </el-option>
+ </el-select>
+ UI涓婁笅鏂囷細<el-select v-model="context" placeholder="璇烽�夋嫨" size="small" :clearable="true" @change="contextChange" style="width: 350px;">
+ <el-option
+ v-for="item in contextData"
+ :key="item.oid"
+ :label="item.plCode+' '+item.plName"
+ :value="item.plCode">
+ </el-option>
+ </el-select>
+ </div>
+ <div style="height: calc(100vh - 232px);margin-top: 10px;">
+ <avue-tree ref="uiTree" :data="uiTreeData" :option="uiTreeOption">
+ <span slot-scope="{ node, data }" class="el-tree-node__label">
+ <span style="font-size: 15px">
+ <i :class="data.icon"></i>
+ {{ (node || {}).label }}
+ </span>
+ </span>
+ </avue-tree>
+ </div>
</basic-container>
</el-main>
@@ -43,8 +58,168 @@
</template>
<script>
+import {gridRoles} from "@/api/system/role/api";
+import {getUIAuthor,authorizedUI} from "@/api/authority/ui/uiAuthor";
+import {getBizTree, gridUIContextData} from "@/api/UI/uiDefine";
+
export default {
- name: "index"
+ name: "index",
+ data() {
+ return {
+ type:'',//涓氬姟绫诲瀷
+ context:'',//UI涓婁笅鏂嘽ode
+ treeOption: {
+ menu: false,
+ addBtn: false,
+ props: {
+ label: 'name',
+ value: 'oid',
+ children: 'children'
+ }
+ },
+ nodeRow: {},
+ treeData: [],
+ defaultExpandKeys:[],
+ uiTreeOption: {
+ defaultExpandedKeys:this.defaultExpandKeys,
+ multiple: true,
+ menu: false,
+ addBtn: false,
+ filter:false,
+ props: {
+ label: 'label',
+ value: 'oid',
+ children: 'children'
+ }
+ },
+ uiTreeData: [],
+ typeData:[],
+ contextData:[]
+ }
+ },
+ created() {
+ this.getTreeList();
+ this.getTypeList()
+ },
+ methods:{
+ getTreeList() {
+ const loading = this.$loading({});
+ gridRoles().then(res => {
+ this.treeData = res.data.data;
+ loading.close();
+ }).catch(error=>{
+ loading.close();
+ })
+ },
+ // 瑙掕壊鐐瑰嚮
+ nodeClick(row) {
+ this.nodeRow = row;
+ this.getUITree();
+ },
+ getUITree() {
+ if (this.nodeRow && this.nodeRow.oid) {
+ const loading = this.$loading({});
+ const params = {
+ 'conditionMap[roleId]': this.nodeRow.oid,
+ 'conditionMap[type]': this.type,
+ 'conditionMap[context]': this.context
+ }
+ this.defaultExpandKeys=['root'];
+ getUIAuthor(params).then(res => {
+ this.processChildren(res.data.data[0]); // 澶勭悊姣忎釜鑺傜偣
+ this.uiTreeOption.defaultExpandedKeys=this.defaultExpandKeys;
+ this.uiTreeData = [{
+ attributes: {},
+ checked: false,
+ expanded: true,
+ data: "root",
+ level: 0,
+ icon: 'el-icon-s-home',
+ oid: res.data.data[0].oid,
+ label: res.data.data[0].text,
+ children: res.data.data[0].children
+ }];
+ loading.close();
+ }).catch(error => {
+ loading.close();
+ })
+ }
+ },
+ //澶勭悊鏍�
+ processChildren(item) {
+ if (item.children && item.children.length > 0) {
+ item.children = item.children.map(child => {
+ if(child.level<4){
+ this.defaultExpandKeys.push(child.oid)
+ }
+ if(child.level==1){
+ child.icon='el-icon-s-promotion';
+ child.label=child.data.label+'锛�'+child.data.name+'锛�'
+ }else if(child.level==2){
+ child.icon='el-icon-s-order';
+ child.label=child.text
+ }else if(child.level==3){
+ child.icon='el-icon-office-building';
+ child.label=child.text
+ }else if(child.level==4){
+ child.icon='el-icon-document';
+ child.label=child.text
+ }else if(child.level==5){
+ child.icon='el-icon-s-tools';
+ child.label=child.text
+ }
+ this.processChildren(child); // 閫掑綊澶勭悊姣忎釜瀛愯妭鐐�
+ return child; // 鍙繑鍥炲瓙鑺傜偣鐨� attributes
+ });
+ }
+ },
+ getTypeList() {
+ getBizTree().then(res => {
+ this.typeData=res.data.obj.children;
+ })
+ },
+ typeChange(data){
+ this.contextData=[];
+ this.type=data;
+ if(data){
+ const params = {
+ 'conditionMap[btmName]': data,
+ }
+ gridUIContextData(1, 500, params).then(res => {
+ this.contextData = res.data.data;
+ })
+ }else {
+ this.contextData = [];
+ }
+ this.getUITree();
+ },
+ contextChange(data){
+ this.context=data;
+ this.getUITree();
+ },
+ saveHandler() {
+ const selectTreeList = this.$refs.uiTree.getCheckedNodes();
+ if (selectTreeList.length == 0) {
+ this.$message.error("璇烽�夋嫨鍔熻兘妯″潡");
+ return;
+ }
+ const formData = {
+ roleId: this.nodeRow.oid,
+ type: this.type,
+ context: this.context,
+ selectTreeList: selectTreeList
+ }
+ authorizedUI(formData).then(res => {
+ if (res.data.success) {
+ this.$message.success("鎺堟潈鎴愬姛");
+ this.cancelDialog();
+ }
+ });
+ },
+ clearValue(){
+ this.$refs.uiTree.setCheckedNodes([])
+ }
+ }
}
</script>
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue
index 3490a9d..23931d1 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue
@@ -98,15 +98,11 @@
dialog: {
showDialog: false,
title: "鍒涘缓",
- submitTxt: "淇濆瓨",
- submitIcon: "el-icon-check",
loading: false,
type: "add",
},
crudDialog: {
showDialog: false,
- submitTxt: "淇濆瓨",
- submitIcon: "el-icon-check",
},
formItems:[{
label: '鏌ヨ妯℃澘鍚嶇О',
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue
index 4870af7..9a6bc20 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/index.vue
@@ -38,7 +38,7 @@
<el-button icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">鍒犻櫎</el-button>-->
<el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭</el-button>
<el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">瀵煎叆</el-button>
- <el-button icon="el-icon-place" plain size="small" type="primary" @click="">鎺堟潈</el-button>
+ <el-button icon="el-icon-place" plain size="small" type="primary" @click="uiAuthorHandler">鎺堟潈</el-button>
</template>
<template slot="menu" slot-scope="scope">
<el-button icon="el-icon-edit" size="small" type="text" @click="rowEditBtnClick(scope.row)">缂栬緫
@@ -126,6 +126,7 @@
<!-- 瀵煎叆 -->
<upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" :fileData="fileData" title="瀵煎叆"
@updata="getTableList" @upfaildata="upFail"></upload-file>
+ <!--椤电绐楀彛-->
<el-dialog v-dialogDrag
:title="dialog.title"
:visible.sync="dialog.showDialog"
@@ -137,6 +138,8 @@
@close="dialog.showDialog=false">
<pl-show :uiDefineData="dialog.uiDefineData"></pl-show>
</el-dialog>
+ <!--ui鎺堟潈-->
+ <ui-author ref="uiAuthor"></ui-author>
</el-main>
</el-container>
@@ -147,9 +150,10 @@
import basicOption from "@/util/basic-option";
import func from "@/util/func";
import plShow from "@/views/modelingMenu/ui/uiDefine/rightRegion/plShow";
+import uiAuthor from "@/views/authority/ui/uiAuthorization/UIDialog"
export default {
name: "index",
- components:{plShow},
+ components:{plShow,uiAuthor},
data() {
return {
dialog: {
@@ -581,6 +585,14 @@
upFail(response){
},
+ //ui鎺堟潈
+ uiAuthorHandler(){
+ if (this.selectList.length!=1) {
+ this.$message.error('璇烽�夋嫨涓�鏉℃暟鎹�');
+ return;
+ }
+ this.$refs.uiAuthor.openDialog(this.nodeRow.attributes.name,this.selectList[0].plCode);
+ },
// 缂栬緫鎸夐挳
rowEditBtnClick(row) {
this.form={
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 bba8a82..37e2e11 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
@@ -21,6 +21,13 @@
</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>
+ <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">鍒犻櫎
+ </el-button>
+ </template>
+
<!-- eventKey浠ュ強eventValue鏄剧ず鍖哄煙 -->
<template slot="bottomValueForm" slot-scope="scope">
<avue-crud
@@ -201,7 +208,9 @@
getQTInfoDatasByPage,
getTabButtons,
addTapButton,
- updateTapButton, getTabByContextIdAndType
+ updateTapButton,
+ getLinkDatasByPage,
+ addPageDefination
} from "@/api/UI/uiDefine";
import actionDialog from '@/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action';
@@ -223,7 +232,7 @@
name: "index",
data() {
return {
- paramsForm:{},
+ paramsForm: {},
eventOption: {
...basicOption,
addBtn: false,
@@ -344,6 +353,8 @@
addBtn: false,
index: true,
calcHeight: -30,
+ editBtn: false,
+ delBtn: false,
column: [
{
label: '鍚嶇О',
@@ -415,7 +426,10 @@
return val;
},
change: (val) => {
- console.log(val);
+ const list = ['showType' ,'linkType' ,'templateId', 'SubUILayout' , 'searchObjType' ,'queryTemplateName', 'controlPath' ,'expandCols', 'rootContent', 'showAbs' ,'showLinkAbs' ,'separator']
+ list.forEach(item => {
+ this.form[item] = "";
+ })
const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // 鑾峰彇鎼滅储绫诲瀷閰嶇疆椤�
searchTarger.display = true; // 鍒囨崲榛樿灞曠ず鎼滅储绫诲瀷
// 妯℃澘绫诲瀷涓鸿〃鏍�
@@ -442,7 +456,7 @@
dicData: [
{
label: '涓嶆樉绀�',
- value: '1'
+ value: '3'
},
{
label: '鏄剧ず瑙掕壊',
@@ -450,7 +464,7 @@
},
{
label: '鏄剧ずFolder',
- value: '3',
+ value: '1',
},
],
},
@@ -480,6 +494,11 @@
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] = '';
+ })
}
},
{
@@ -504,6 +523,13 @@
label: 'name',
value: 'name'
},
+ rules: [
+ {
+ required: true,
+ message: '璇烽�夋嫨鍐呭',
+ trigger: 'change'
+ }
+ ],
children: {
border: true,
column: [{
@@ -516,12 +542,18 @@
prop: 'label'
}],
},
+ change: (val) => {
+ const list = ['linkType', 'templateId', 'SubUILayout', 'queryTemplateName', 'searchObjType'];
+ list.forEach(item => {
+ this.form[item] = '';
+ })
+ },
onLoad: ({page, value, data}, callback) => {
//page鍒嗛〉
// 涓嶇鏄悳绱� 杩樻槸棣栨鍔犺浇閮戒細瑙﹀彂page 鎵�浠ュ彧闇�瑕佹嬁page瀛樺湪涓庡惁杩涜璇锋眰灏卞彲浠� 濡傛灉鍐嶅幓鍒ゆ柇data鎼滅储 鎴栬�卾alue鍒濇鍔犺浇灏变細閲嶅璇锋眰
if (page) {
const params = {
- "conditionMap[filterInputValue]": value ? value.name : ''
+ "conditionMap[filterInputValue]": data ? data.name : ''
};
getBtmDatasByPage(page.currentPage, page.pageSize, params).then(res => {
callback({
@@ -538,8 +570,8 @@
type: 'table',
display: false,
props: {
- label: 'viName',
- value: 'viName'
+ label: 'name',
+ value: 'name'
},
children: {
border: true,
@@ -547,19 +579,18 @@
label: '鍚嶇О',
search: true,
searchSpan: 24,
- prop: 'viName'
+ prop: 'name'
}, {
- label: '绫诲瀷',
- prop: 'viType'
+ label: '鏍囩',
+ prop: 'tag'
}],
},
onLoad: ({page, value, data}, callback) => {
if (page) {
const params = {
"conditionMap[selectBtmType]": this.form.showType,
- "conditionMap[filterInputValue]": data ? data.viName : '',
};
- getPortalVIDatasByPage(page.currentPage, page.pageSize, params).then(res => {
+ getLinkDatasByPage(page.currentPage, page.pageSize, params).then(res => {
console.log(res);
callback({
total: res.data.total,
@@ -571,9 +602,16 @@
},
{
label: '閫夋嫨妯℃澘',
- prop: 'showTypea',
+ prop: 'templateId',
display: false,
type: 'table',
+ rules: [
+ {
+ required: true,
+ message: '璇烽�夋嫨妯℃澘',
+ trigger: 'submit'
+ }
+ ],
props: {
label: 'viName',
value: 'viName'
@@ -608,7 +646,7 @@
},
{
label: 'UI瀹氫箟',
- prop: 'UI',
+ prop: 'SubUILayout',
type: 'table',
display: false,
props: {
@@ -646,6 +684,7 @@
label: '鏌ヨ绫诲瀷',
prop: 'searchType',
display: false,
+ value: '1',
type: 'radio',
span: 24,
dicData: [
@@ -684,10 +723,10 @@
onLoad: ({page, value, data}, callback) => {
if (page) {
const params = {
- "conditionMap[selectBtmType]": this.form.showType,
- "conditionMap[filterInputValue]": data ? data.qtName : '',
+ "conditionMap[selectBtmType]": null, // cs绔湁闂 鏆傛椂涓嶅睍绀哄唴瀹�
};
- getQTInfoDatasByPage(page.currentPage, page.pageSize, params).then(res => {
+ getLinkDatasByPage(page.currentPage, page.pageSize, params).then(res => {
+ console.log(res);
callback({
total: res.data.total,
data: res.data.data
@@ -698,7 +737,7 @@
},
{
label: '鏌ヨ妯℃澘',
- prop: 'showTypes',
+ prop: 'queryTemplateName',
type: 'table',
display: false,
props: {
@@ -734,40 +773,35 @@
},
{
label: '鎺у埗璺緞',
- prop: 'kzlj',
+ prop: 'controlPath',
display: false,
type: 'textarea',
+ span: 24,
rows: 3
},
{
- label: '鏍硅妭鐐规樉绀鸿〃杈惧紡',
- prop: 'genjiedian',
+ label: '鏍戠粨鏋勫睍寮�鍒�',
+ prop: 'expandCols',
+ labelWidth: 110,
display: false,
- labelWidth: 135,
- span: 24
- },
- {
- label: '鏍戣妭鐐规樉绀鸿〃杈惧紡',
- prop: 'shujiedian',
- display: false,
- labelWidth: 135,
- span: 24
+ span: 12
},
{
label: '鍙傜収鏍戣缃�',
- prop: 'canzhaoshu',
+ prop: 'showLinkAbs',
display: false,
},
{
label: '鍒嗛殧绗�',
- prop: 'fgf',
+ prop: 'separator',
display: false,
},
{
label: '灞曞紑鏂瑰紡',
- prop: 'zkfs',
+ prop: 'expandMode',
display: false,
type: 'radio',
+ value:'1',
dicData: [
{
label: '閫愮骇灞曞紑',
@@ -775,9 +809,23 @@
},
{
label: '鍏ㄩ儴灞曞紑',
- value: '2'
+ value: '0'
}
]
+ },
+ {
+ label: '鏍硅妭鐐规樉绀鸿〃杈惧紡',
+ prop: 'rootContent',
+ display: false,
+ labelWidth: 135,
+ span: 12
+ },
+ {
+ label: '鏍戣妭鐐规樉绀鸿〃杈惧紡',
+ prop: 'showAbs',
+ display: false,
+ labelWidth: 135,
+ span: 12
},
]
},
@@ -873,6 +921,48 @@
this.$refs.crud.rowAdd();
},
+ // 淇敼
+ editBtnClick(row) {
+ console.log(row);
+ this.eventData = [];
+ if (row.eventKey && row.eventValue) {
+ let keys = row.eventKey.split(',');
+ let values = row.eventValue.split(',');
+
+ this.eventData = keys.map((key, index) => {
+ return {
+ index: this.eventData.length,
+ eventKey: key.trim(),
+ eventValue: values[index],
+ $cellEdit: true
+ };
+ });
+ }
+ this.$refs.crud.rowEdit(row);
+ },
+
+ // 淇濆瓨
+ rowSaveHandler(row,done,loading){
+ if(row.templateType === '6'){
+ 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()
+ }
+ }).catch(err=> {
+ loading();
+ })
+ },
+
// 瀵硅瘽妗嗚〃鏍艰鐐瑰嚮
formDataRowClick(row) {
this.formDataRow = row;
@@ -924,7 +1014,7 @@
// 妯℃澘绫诲瀷涓鸿〃鏍�
templateTypeTable(val) {
if (!val) return;
- this.updateDisplay(val, ['showType', 'showTypea', 'showTypes']);
+ this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName']);
},
// 妯℃澘绫诲瀷涓鸿嚜瀹氫箟妯℃澘
@@ -932,19 +1022,19 @@
if (!val) return;
const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // 鑾峰彇鎼滅储绫诲瀷閰嶇疆椤�
searchTarger.display = false; // 涓嶅睍绀烘悳绱㈢被鍨�
- this.updateDisplay(val, ['kzlj']);
+ this.updateDisplay(val, ['controlPath']);
},
// 妯℃澘绫诲瀷涓烘爲琛�
templateTypeTreeTable(val) {
if (!val) return;
- this.updateDisplay(val, ['showType', 'showTypea', 'showTypes', 'zkl', 'zkfs']);
+ this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'expandCols', 'zkfs']);
},
// 妯℃澘绫诲瀷涓鸿〃鍗�
templateTypeForm(val) {
if (!val) return;
- this.updateDisplay(val, ['showType', 'showTypea', 'showTypes']);
+ this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName']);
},
// 妯℃澘绫诲瀷涓烘爲
@@ -952,7 +1042,7 @@
if (!val) return;
const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // 鑾峰彇鎼滅储绫诲瀷閰嶇疆椤�
searchTarger.display = false; // 涓嶅睍绀烘悳绱㈢被鍨�
- this.updateDisplay(val, ['showType', 'showTypes', 'genjiedian', 'shujiedian', 'canzhaoshu', 'fgf', 'zkfs', 'linkType']);
+ this.updateDisplay(val, ['showType', 'queryTemplateName', 'rootContent', 'showAbs', 'showLinkAbs', 'separator', 'expandMode', 'linkType']);
},
// 妯℃澘绫诲瀷涓篣I瀹氫箟
@@ -960,7 +1050,7 @@
if (!val) return;
const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // 鑾峰彇鎼滅储绫诲瀷閰嶇疆椤�
searchTarger.display = false; // 涓嶅睍绀烘悳绱㈢被鍨�
- this.updateDisplay(val, ['showType', 'UI', 'searchType', 'searchObjType', 'showTypes']);
+ this.updateDisplay(val, ['showType', 'SubUILayout', 'searchType', 'searchObjType', 'queryTemplateName']);
},
// 鏌ユ壘鏁扮粍涓璞$储寮�
--
Gitblit v1.9.3