From 322b236f53f9aa8e12c6e019c861e2ea1bc4ab16 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期五, 27 九月 2024 11:27:05 +0800
Subject: [PATCH] 整合代码
---
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue | 40 ++
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action.vue | 416 ++++++++++++++++++++++++++
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/plShow.vue | 116 +++---
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue | 261 +++++++--------
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue | 30 +
Source/plt-web/plt-web-ui/src/api/UI/uiDefine/api.js | 67 ++++
6 files changed, 729 insertions(+), 201 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/api/UI/uiDefine/api.js b/Source/plt-web/plt-web-ui/src/api/UI/uiDefine/api.js
new file mode 100644
index 0000000..8d494a1
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/api/UI/uiDefine/api.js
@@ -0,0 +1,67 @@
+import request from '@/router/axios';
+
+// 涓氬姟绫诲瀷涓嬫媺鏌ヨ
+export function getBtmDatasByPage(page, limit, params) {
+ return request({
+ url: "/api/uiManagerController/getBtmDatasByPage",
+ method: "get",
+ params: {
+ page,
+ limit,
+ ...params
+ }
+ });
+}
+
+// 閫夋嫨妯℃澘涓嬫媺鏌ヨ
+export function getPortalVIDatasByPage(page, limit, params) {
+ return request({
+ url: "/api/uiManagerController/getPortalVIDatasByPage",
+ method: "get",
+ params: {
+ page,
+ limit,
+ ...params
+ }
+ });
+}
+
+// 鏌ヨ妯℃澘涓嬫媺鏌ヨ
+export function getQTInfoDatasByPage(page, limit, params) {
+ return request({
+ url: "/api/uiManagerController/getQTInfoDatasByPage",
+ method: "get",
+ params: {
+ page,
+ limit,
+ ...params
+ }
+ });
+}
+
+// 鎸夐挳璁捐瀵硅瘽妗嗗乏渚ф爲鏌ヨ
+export function getTabButtons(params) {
+ return request({
+ url: "/api/uiManagerController/getTabButtons",
+ method: "get",
+ params
+ });
+}
+
+// 鎸夐挳璁捐瀵硅瘽妗嗘坊鍔�
+export function addTapButton(params) {
+ return request({
+ url: "/api/uiManagerController/addTapButton",
+ method: "post",
+ data:params
+ });
+}
+
+// 鎸夐挳璁捐瀵硅瘽妗嗘坊鍔�
+export function updateTapButton(params) {
+ return request({
+ url: "/api/uiManagerController/updateTapButton",
+ method: "put",
+ data:params
+ });
+}
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
index e2a9494..befcded 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
@@ -44,19 +44,25 @@
<template slot="label">
鍚嶇О
</template>
- {{ lastItem.id }}
+ <div style="width: 330px">
+ {{ lastItem.id }}
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
鏍囩
</template>
+ <div style="width: 330px">
{{ lastItem.name }}
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
鎻忚堪
</template>
+ <div style="width: 330px">
{{ lastItem.description }}
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
@@ -74,9 +80,11 @@
<template slot="label">
鍏佽涓虹┖
</template>
+ <div style="width: 330px">
<el-tag :type="lastItem.nullableFlag ? 'success' : 'danger'">
{{ lastItem.nullableFlag ? '鏄�' : '鍚�' }}
</el-tag>
+ </div>
</el-descriptions-item>
<el-descriptions-item v-if="accuracy">
<template slot="label">
@@ -88,13 +96,17 @@
<template slot="label">
闀垮害
</template>
+ <div style="width: 330px">
{{ lastItem.attrLength }}
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
榛樿鍊�
</template>
+ <div style="width: 330px">
{{ lastItem.defaultValue }}
+ </div>
</el-descriptions-item>
</el-descriptions>
@@ -105,33 +117,43 @@
<template slot="label">
褰撳墠绫诲瀷
</template>
+ <div style="width: 345px">
{{ lastItem.version ? '閾炬帴绫诲瀷' : '涓氬姟绫诲瀷' }}
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
褰撳墠绫诲瀷鍊�
</template>
+ <div style="width: 345px">
{{ lastItem.version ? lastItem.linkTypeName : lastItem.btmTypeId }}
+ </div>
</el-descriptions-item>
<el-descriptions-item v-if="lastItem.version">
<template slot="label">
褰撳墠鐗堟湰娆�
</template>
+ <div style="width: 345px">
{{ lastItem.version }}
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
浣跨敤鏋氫妇
</template>
+ <div style="width: 345px">
<el-tag :type="lastItem.enumId ? 'success' : 'danger'">
{{ lastItem.enumId ? '鏄�' : '鍚�' }}
</el-tag>
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
褰撳墠鏋氫妇绫诲瀷
</template>
+ <div style="width: 345px">
{{ lastItem.enumId }}
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
@@ -152,21 +174,25 @@
<template slot="label">
浣跨敤鏋氫妇
</template>
+ <div style="width: 330px">
<el-tag :type="lastItem.enumFlag ? 'success' : 'danger'">
{{ lastItem.enumFlag ? '鏄�' : '鍚�' }}
</el-tag>
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
鏋氫妇绫诲瀷
</template>
+ <div style="width: 330px">
{{ lastItem.enumFlag }}
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
鍙栧�艰寖鍥�
</template>
- <div style="width: 330px; height: 80px;overflow: auto">
+ <div style="width: 345px; height: 80px;overflow: auto">
<el-tag v-for="item in rangeList" plain style="margin: 5px">{{ item }}</el-tag>
</div>
</el-descriptions-item>
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue
index 5e6ad14..cfbe5d6 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue
@@ -1,109 +1,30 @@
<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 style="height: calc(100vh - 260px);">
- <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>
- </avue-tree>
- </div>
- </div>
- </basic-container>
- </el-aside>
-
- <el-main>
- <basic-container>
- <el-descriptions :column="1" border class="margin-top" size="medium" title="灞炴�т俊鎭�">
- <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
- :labelStyle="descriptionOption.labelStyle">
- <template slot="label">
- <i :class="icons.id"></i>
- 鍚嶇О
- </template>
- <el-tag v-if="nodeRow.id">{{ nodeRow.id }}</el-tag>
- </el-descriptions-item>
- <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
- :labelStyle="descriptionOption.labelStyle">
- <template slot="label">
- <i :class="icons.name"></i>
- 鏍囩
- </template>
- <el-tag v-if="nodeRow.name">{{ nodeRow.name }}</el-tag>
- </el-descriptions-item>
- <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
- :labelStyle="descriptionOption.labelStyle">
- <template slot="label">
- <i :class="icons.jump"></i>
- 璺宠穬瀛楃
- </template>
- <el-tag v-if="nodeRow.jumpCharacter">{{ nodeRow.jumpCharacter }}</el-tag>
- </el-descriptions-item>
- <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
- :labelStyle="descriptionOption.labelStyle">
- <template slot="label">
- <i :class="icons.init"></i>
- 鍒濆鍊�
- </template>
- <el-tag v-if="nodeRow.initialValue">{{ nodeRow.initialValue }}</el-tag>
- </el-descriptions-item>
- <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
- :labelStyle="descriptionOption.labelStyle">
- <template slot="label">
- <i :class="icons.length"></i>
- 姝ラ暱
- </template>
- <el-tag v-if="nodeRow.stepLength">{{ nodeRow.stepLength }}</el-tag>
- </el-descriptions-item>
- <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
- :labelStyle="descriptionOption.labelStyle">
- <template slot="label">
- <i :class="icons.left"></i>
- 鍓嶇紑
- </template>
- <el-tag v-if="nodeRow.prefixion">{{ nodeRow.prefixion }}</el-tag>
- </el-descriptions-item>
- <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
- :labelStyle="descriptionOption.labelStyle">
- <template slot="label">
- <i :class="icons.right"></i>
- 鍚庣紑
- </template>
- <el-tag v-if="nodeRow.suffix">{{ nodeRow.suffix }}</el-tag>
- </el-descriptions-item>
- <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
- :labelStyle="descriptionOption.labelStyle">
- <template slot="label">
- <i :class="icons.desc"></i>
- 鎻忚堪
- </template>
- <el-tag v-if="nodeRow.description">{{ nodeRow.description }}</el-tag>
- </el-descriptions-item>
- </el-descriptions>
- </basic-container>
- </el-main>
-
+ <basic-container>
+ <avue-crud
+ ref="crud"
+ :data="data"
+ :option="option"
+ :table-loading="loading"
+ @refresh-change="getTableList"
+ @selection-change="selectChange"
+ @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-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-view" plain size="small" type="primary"
+ @click="checkViewClickHandler">鏌ョ湅浣跨敤鑼冨洿
+ </el-button>
+ </template>
+ <template slot="menu" slot-scope="scope">
+ <el-button icon="el-icon-edit" size="small" type="text" @click="editClickHandler(scope.row)">缂栬緫
+ </el-button>
+ <el-button icon="el-icon-delete" size="small" type="text" @click="delClickHandler(scope.row)">鍒犻櫎
+ </el-button>
+ </template>
+ </avue-crud>
<!-- 鏂板 淇敼 -->
<el-dialog
v-dialogDrag
@@ -166,7 +87,7 @@
<!-- 瀵煎叆 -->
<upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="瀵煎叆"
- @updata="getTreeList"></upload-file>
+ @updata="getTableList"></upload-file>
<!-- 鏌ョ湅浣跨敤鑼冨洿 -->
<el-dialog
@@ -187,7 +108,7 @@
>
</avue-crud>
</el-dialog>
- </el-container>
+ </basic-container>
</template>
<script>
@@ -206,6 +127,57 @@
name: "index",
data() {
return {
+ loading: false,
+ data: [],
+ option: {
+ ...basicOption,
+ addBtn: false,
+ editBtn: false,
+ delBtn: false,
+ calcHeight: -30,
+ column: [
+ {
+ label: '鍚嶇О',
+ prop: 'id',
+ sortable: true,
+ },
+ {
+ label: '鏍囩',
+ prop: 'name',
+ sortable: true,
+ },
+ {
+ label: '璺宠穬瀛楃',
+ prop: 'jumpCharacter',
+ sortable: true,
+ },
+ {
+ label: '鍒濆鍊�',
+ prop: 'initialValue',
+ sortable: true,
+ },
+ {
+ label: '姝ラ暱',
+ prop: 'stepLength',
+ sortable: true,
+ },
+ {
+ label: '鍓嶇紑',
+ prop: 'prefixion',
+ sortable: true,
+ },
+ {
+ label: '鍚庣紑',
+ prop: 'suffix',
+ sortable: true,
+ },
+ {
+ label: '鎻忚堪',
+ prop: 'description',
+ sortable: true,
+ },
+ ]
+ },
checkViewVisible: false,
checkViewData: [],
checkViewDataSearch: [],
@@ -296,25 +268,24 @@
right: 'el-icon-caret-right',
desc: 'el-icon-chat-line-square'
},
+ selectList: [],
+ lastIndex: null,
}
},
created() {
- this.getTreeList();
+ this.getTableList();
},
methods: {
// 宸︿晶鏍戞煡璇�
- getTreeList() {
+ getTableList() {
+ this.loading = true;
getVersionRuleAllList().then(res => {
const data = res.data.data;
- this.treeData = data;
+ this.data = data;
+ this.loading = false;
}).catch(err => {
this.$message.error(err)
});
- },
-
- // 宸︿晶鏍戣鐐瑰嚮
- nodeClick(row) {
- this.nodeRow = row;
},
// 鍒涘缓鎸夐挳
@@ -324,14 +295,10 @@
},
// 淇敼鎸夐挳
- editClickHandler() {
- if (func.isEmptyObject(this.nodeRow)) {
- this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒');
- return;
- }
+ editClickHandler(row) {
+ this.form = {...row};
this.visible = true;
this.dialogTitle = 'edit';
- this.form = this.nodeRow;
},
// 鏂板淇敼瀵硅瘽妗嗗叧闂�
@@ -359,7 +326,7 @@
saveFunction(this.form).then(res => {
if (res.data.code === 200) {
this.$message.success(res.data.obj);
- this.getTreeList();
+ this.getTableList();
this.visible = false;
} else {
this.$message.error(res.data.obj);
@@ -374,22 +341,17 @@
},
// 鍒犻櫎鎸夐挳
- delClickHandler() {
- if (func.isEmptyObject(this.nodeRow)) {
- this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒');
- return;
- }
+ delClickHandler(row) {
this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎鎵�閫夋嫨鐨勬暟鎹悧锛�', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- const list = [this.nodeRow];
+ const list = [row];
deleteVersionRule(list).then(res => {
if (res.data.code === 200) {
this.$message.success(res.data.obj);
- this.getTreeList();
- this.nodeRow = {};
+ this.getTableList();
}
})
}).catch(() => {
@@ -402,12 +364,17 @@
// 瀵煎嚭
exportClickHandler() {
- if (func.isEmptyObject(this.nodeRow)) {
+ if (this.selectList.length <= 0) {
this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒');
return;
}
- exportVersionRule({vrNames: this.nodeRow.id}).then(res => {
+ if (this.selectList.length > 1) {
+ this.$message.error('鍙兘閫夋嫨涓�鏉℃暟鎹紒');
+ return;
+ }
+
+ exportVersionRule({vrNames: this.selectList[0].id}).then(res => {
func.downloadFileByBlobHandler(res);
this.$message.success('瀵煎嚭鎴愬姛');
}).catch(err => {
@@ -422,11 +389,16 @@
// 鏌ョ湅浣跨敤鑼冨洿
checkViewClickHandler() {
- if (func.isEmptyObject(this.nodeRow)) {
+ if (this.selectList.length <= 0) {
this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒');
return;
}
- getUsedVersionRuleList({vrName: this.nodeRow.id}).then(res => {
+
+ if (this.selectList.length > 1) {
+ this.$message.error('鍙兘閫夋嫨涓�鏉℃暟鎹紒');
+ return;
+ }
+ getUsedVersionRuleList({vrName: this.selectList[0].id}).then(res => {
if (res.data.code === 200) {
this.checkViewVisible = true;
const data = res.data.data;
@@ -458,6 +430,27 @@
checkHandleReset() {
this.checkViewData = this.checkViewDataSearch;
},
+
+ // 閫夋嫨妗�
+ selectChange(row) {
+ this.selectList = row;
+ },
+
+ // 鐐瑰嚮琛�
+ rowClickHandler(row) {
+ func.rowClickHandler(
+ row,
+ this.$refs.crud,
+ this.lastIndex,
+ (newIndex) => {
+ this.lastIndex = newIndex;
+ },
+ () => {
+ this.selectList = [];
+ }
+ );
+ },
+
}
}
</script>
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action.vue
new file mode 100644
index 0000000..5d66a6e
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action.vue
@@ -0,0 +1,416 @@
+<template>
+ <el-container>
+
+ <el-aside>
+ <basic-container>
+ <!-- 宸︿晶鏍� -->
+ <div style="height:580px">
+ <avue-tree
+ ref="tree"
+ v-model="treeForm"
+ :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>
+ </avue-tree>
+ </div>
+ </basic-container>
+ </el-aside>
+
+ <el-main>
+ <basic-container>
+ <div>
+ <avue-crud
+ ref="crud"
+ v-model="form"
+ :data="data"
+ :option="option"
+ :page.sync="page"
+ :table-loading="tableLoading"
+ @search-change="handleSearch"
+ @search-reset="handleReset"
+ @refresh-change="handleRefresh"
+ @selection-change="selectChangeHandler"
+ @row-click="rowClickHandler">
+ <template slot="plTypeType" slot-scope="{row}">
+ <el-tag :type="row.plTypeType === 'business' ? '' : 'success'">
+ {{ row.plTypeType === 'business' ? '涓氬姟绫诲瀷' : '閾炬帴绫诲瀷' }}
+ </el-tag>
+ </template>
+
+ </avue-crud>
+ </div>
+ </basic-container>
+ </el-main>
+
+
+ </el-container>
+</template>
+
+<script>
+import {
+ getActionTree,
+ getActionTableData,
+ saveAction,
+ updateAction,
+ exportAction,
+ deleteAction,
+ getPLActionParam,
+ savePLActionParam,
+ updatePLActionParam,
+ deletePLActionParam,
+ saveActionCls,
+ updateActionCls,
+ deleteActionCls
+} from '@/api/UI/Action/api'
+import func from "@/util/func";
+import basicOption from "@/util/basic-option";
+
+export default {
+ name: "index",
+ data() {
+ return {
+ currenRow: {}, // action褰撳墠琛屼俊鎭�
+ topMethodsObj: {
+ select: true,
+ all: true,
+ page: false
+ },
+ transferTitle: ['鏈�夋嫨', '宸查�夋嫨'],
+ leftRoleData: [],
+ rightRoleData: [],
+ form: {},
+ bottomTableLoading: false,
+ bottomData: [],
+ bottomOption: {
+ ...basicOption,
+ addBtn: false,
+ calcHeight: -30,
+ selection: false,
+ refreshBtn: false,
+ // height:'auto',
+ column: [
+ {
+ label: '鍙傛暟鍚嶇О',
+ prop: 'name',
+ rules: [
+ {
+ required: true,
+ message: '璇疯緭鍏ュ弬鏁板悕绉�',
+ trigger: 'blur'
+ }
+ ]
+ },
+ {
+ label: '榛樿鍊�',
+ prop: 'defaultValue',
+ },
+ {
+ label: '鎻愮ず淇℃伅',
+ prop: 'description',
+ span: 24,
+ type: 'textarea',
+ rows: 4
+ },
+ ],
+ },
+ tableLoading: false,
+ lastIndex: null,
+ selectList: [],
+ data: [],
+ option: {
+ ...basicOption,
+ addBtn: false,
+ height: 'auto',
+ highlightCurrentRow: true,
+ column: [
+ {
+ label: '缂栧彿',
+ prop: 'plCode',
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: '璇疯緭鍏ョ紪鍙�',
+ trigger: 'blur'
+ }
+ ]
+ },
+ {
+ label: '鍚嶇О',
+ prop: 'plName',
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: '璇疯緭鍏ュ悕绉�',
+ trigger: 'blur'
+ }
+ ]
+ },
+ {
+ label: '绫昏矾寰�',
+ prop: 'plCSClass',
+ search: true,
+ overHidden: true,
+ },
+ {
+ label: '鍒嗙被',
+ prop: 'plActionCls',
+ type: 'tree',
+ hide: true,
+ props: {
+ label: 'name',
+ value: 'id',
+ children: 'childs'
+ },
+ rules: [
+ {
+ required: true,
+ message: '璇烽�夋嫨鍒嗙被',
+ trigger: 'blur'
+ }
+ ],
+ dicData: []
+ },
+ {
+ label: '閾炬帴鍦板潃',
+ prop: 'plBSUrl',
+ search: true,
+ },
+ {
+ label: '绫诲瀷',
+ prop: 'plTypeType',
+ search: true,
+ type: 'select',
+ dicData: [{
+ label: '涓氬姟绫诲瀷',
+ value: 'business'
+ }, {
+ label: '閾炬帴绫诲瀷',
+ value: 'link'
+ }],
+ rules: [
+ {
+ required: true,
+ message: '璇烽�夋嫨绫诲瀷',
+ trigger: 'blur'
+ }
+ ]
+ },
+ {
+ label: '鎻忚堪',
+ prop: 'plDesc',
+ search: true,
+ overHidden: true,
+ },
+ ]
+ },
+ treeNodeRow: {},
+ treeForm: {},
+ treeOption: {
+ addBtn: false,
+ defaultExpandedKeys: ['root'],
+ props: {
+ label: 'name',
+ value: 'id',
+ children: 'childs'
+ },
+ formOption: {
+ column: [
+ {
+ label: '鍒嗙被鍚嶇О',
+ prop: 'name',
+ rules: [
+ {
+ required: true,
+ message: '璇疯緭鍏ュ垎绫诲悕绉�',
+ trigger: 'blur'
+ }
+ ]
+ },
+ {
+ label: '鍒嗙被搴忓彿',
+ prop: 'serialno',
+ rules: [
+ {
+ required: true,
+ message: '璇疯緭鍏ュ垎绫诲簭鍙�',
+ trigger: 'blur'
+ }
+ ]
+ },
+ {
+ label: '鍒涘缓鑰�',
+ prop: 'creator',
+ readonly: true,
+ },
+ {
+ label: '鍒涘缓鏃堕棿',
+ prop: 'createTime',
+ readonly: true,
+ },
+ {
+ label: '鐖朵富绫�',
+ prop: 'pidName',
+ readonly: true,
+ },
+ {
+ label: '澶囨敞',
+ prop: 'description'
+ },
+ ],
+ }
+ },
+ treeData: [],
+ }
+ },
+ created() {
+ this.getTreeList();
+ },
+ methods: {
+ // 宸︿晶鏍戣姹�
+ getTreeList(status) {
+ const params = {
+ isExp: status ? true : false
+ }
+ getActionTree(params).then(res => {
+ const data = res.data.obj;
+ this.treeData = [data];
+ const selectTreeData = this.option.column.find(item => item.prop === 'plActionCls'); // 鎵惧埌action娣诲姞鍒嗙被鏍�
+ selectTreeData.dicData = [data];
+ })
+ },
+
+ // 宸︿晶鏍戣鐐瑰嚮
+ nodeClick(row) {
+ this.treeNodeRow = row;
+ this.getRightTableList(row);
+ this.bottomData = [];
+ },
+
+ // 澶撮儴鍒锋柊鎸夐挳
+ handleRefresh() {
+ if (func.isEmptyObject(this.treeNodeRow)) {
+ return;
+ }
+ this.getRightTableList(this.treeNodeRow);
+ },
+
+ // 鍙充晶琛ㄦ牸淇℃伅
+ getRightTableList(row) {
+ this.tableLoading = true;
+ const params = {
+ plactioncls: row.id
+ }
+ getActionTableData(params).then(res => {
+ const data = res.data.data;
+ this.data = data;
+ this.tableLoading = false;
+ })
+ },
+
+ // 琛ㄦ牸澶氶��
+ selectChangeHandler(row) {
+ this.selectList = row;
+ },
+
+ // 琛岀偣鍑�
+ rowClickHandler(row) {
+ this.currenRow = row;
+ func.rowClickHandler(
+ row,
+ this.$refs.crud,
+ this.lastIndex,
+ (newIndex) => {
+ this.lastIndex = newIndex;
+ },
+ () => {
+ this.selectList = [];
+ }
+ );
+
+ // 璇锋眰action涓嬫柟鍙傛暟鍒楄〃鏁版嵁
+ this.getBottomList(row);
+ },
+
+ // 鎼滅储
+ handleSearch(params, done) {
+ if (func.isEmptyObject(this.treeNodeRow)) {
+ this.$message.error('璇峰厛鍦ㄥ乏渚ч�夋嫨鑺傜偣鍚庢搷浣�');
+ return done();
+ }
+ this.tableLoading = true;
+ const apiParams = {
+ plactioncls: this.treeNodeRow.id === 'root' ? '' : this.treeNodeRow.id,
+ ...params
+ }
+
+ getActionTableData(apiParams).then(res => {
+ const data = res.data.data;
+ this.data = data;
+ this.tableLoading = false;
+ })
+ done();
+ },
+
+ // 閲嶇疆鎼滅储鏉′欢
+ handleReset() {
+ if (func.isEmptyObject(this.treeNodeRow)) {
+ this.$message.error('璇峰厛鍦ㄥ乏渚ч�夋嫨鑺傜偣鍚庢搷浣�');
+ return;
+ }
+ this.getRightTableList(this.treeNodeRow);
+ },
+
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+::v-deep {
+ .el-scrollbar__wrap {
+ overflow: auto !important;
+ }
+
+ .headerCon {
+ .el-button {
+ width: 82px;
+ }
+ }
+}
+
+.headerCon {
+ display: flex;
+ flex-wrap: wrap;
+ margin-bottom: 5px;
+
+ .el-button + .el-button {
+ margin-left: 5px;
+ }
+
+ .el-button {
+ margin-top: 5px;
+ }
+}
+
+.headerCon > .el-button:nth-child(4) {
+ margin-left: 0;
+}
+
+.headerCon > .el-button:nth-child(7) {
+ margin-left: 0;
+}
+
+.smallBtn {
+ width: 82px;
+ text-align: center;
+ padding-left: 4.5px;
+}
+
+</style>
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 27f89a3..40f329d 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
@@ -1,5 +1,5 @@
<template>
- <div>
+ <basic-container>
<avue-crud
ref="crud"
v-model="form"
@@ -68,9 +68,9 @@
append-to-body="true"
class="avue-dialog"
title="閰嶇疆鎸夐挳"
- width="70%"
+ width="75%"
@close="dialogClose">
- <el-container>
+ <el-container v-loading="dialogLoading">
<el-header style="height: 40px !important;">
<div style="display: flex">
<el-button :disabled="!disabledBtn" plain size="mini" type="primary" @click="addClickBtnHandler">娣诲姞
@@ -129,7 +129,7 @@
<el-form-item label="Action锛�" prop="Action">
<el-col :span="14">
- <el-input v-model="basicForm.actionOId" :readonly="disabledBtn"></el-input>
+ <el-input v-model="basicForm.actionName" :readonly="disabledBtn" @focus="actionFoucus"></el-input>
</el-col>
</el-form-item>
@@ -190,7 +190,16 @@
</el-container>
</el-container>
</el-dialog>
- </div>
+ <el-dialog
+ v-dialogDrag
+ :visible.sync="btnActionVisible"
+ append-to-body="true"
+ class="avue-dialog"
+ title="閫夋嫨Action"
+ width="70%">
+ <action-dialog></action-dialog>
+ </el-dialog>
+ </basic-container>
</template>
<script>
@@ -205,6 +214,7 @@
addTapButton,
updateTapButton, getTabByContextIdAndType
} from "@/api/UI/uiDefine";
+import actionDialog from '@/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action';
export default {
props: {
@@ -217,9 +227,14 @@
default: () => "auto"
}
},
+ components: {
+ actionDialog
+ },
name: "index",
data() {
return {
+ btnActionVisible: false,
+ dialogLoading: false,
saveType: '',
disabledBtn: true,
paramsData: [],
@@ -933,8 +948,8 @@
moveUp() {
const index = this.findIndexByEventValue(this.FormData, this.formDataRow.eventValue);
if (index > 0) {
- // 浣跨敤 splice 鏂规硶鏉ユā鎷熶氦鎹�
- const temp = this.FormData.splice(index - 1, 1, this.FormData[index])[0]; // 绉婚櫎 index-1 鐨勫厓绱狅紝骞跺湪鐩稿悓浣嶇疆鎻掑叆 index 鐨勫厓绱狅紝杩斿洖琚Щ闄ょ殑鍏冪礌
+ // 浣跨敤 splice 鏉ユā鎷熶氦鎹�
+ const temp = this.FormData.splice(index - 1, 1, this.FormData[index])[0]; // 绉婚櫎 index-1 鐨勫厓绱� 骞跺湪鐩稿悓浣嶇疆鎻掑叆 index 鐨勫厓绱� 杩斿洖琚Щ闄ょ殑鍏冪礌
this.FormData.splice(index, 1, temp); // 鍦� index 浣嶇疆鎻掑叆涔嬪墠琚Щ闄ょ殑鍏冪礌
}
},
@@ -1037,7 +1052,7 @@
// 鎸夐挳璁捐淇敼
editClickBtnHandler() {
if (func.isEmptyObject(this.nodeTreeRow)) {
- this.$message.error('璇烽�夋嫨鑺傜偣杩涜娣诲姞');
+ this.$message.error('璇烽�夋嫨鑺傜偣杩涜淇敼');
return;
}
@@ -1060,6 +1075,7 @@
// 鎸夐挳璁捐淇濆瓨
saveClickBtnHandler() {
+ this.dialogLoading = true;
const saveFunction = this.saveType === 'add' ? addTapButton : updateTapButton;
const bottomParams = {};
if (this.paramsData.length > 0) {
@@ -1085,7 +1101,10 @@
this.getTabBtnTree();
this.basicForm = {};
this.paramsData = [];
+ this.dialogLoading = false;
}
+ }).catch(err => {
+ this.dialogLoading = false;
})
},
@@ -1114,6 +1133,11 @@
});
});
},
+
+ // 閫夋嫨action
+ actionFoucus() {
+ this.btnActionVisible = true;
+ }
}
}
</script>
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/plShow.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/plShow.vue
index b33819d..ec8e858 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/plShow.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/plShow.vue
@@ -28,16 +28,16 @@
<el-tag v-else type="danger">鏈惎鐢�</el-tag>
</template>
</avue-crud>
- <bottom-table :sourceData="selectList[0]" :height="'280px'" style="margin-top: 15px;"></bottom-table>
+ <bottom-table :height="'280px'" :sourceData="selectList[0]" style="margin-top: 15px;"></bottom-table>
<!-- 鍒涘缓缂栬緫鑷畾涔夊璇濇 -->
<el-dialog
v-dialogDrag
v-loading="dialogLoading"
+ :close-on-click-modal="false"
:title="dialogType === 'add' ? ' 鍒涘缓 椤电' : '缂栬緫 椤电'"
:visible.sync="dialogVisible"
append-to-body="true"
class="avue-dialog"
- :close-on-click-modal="false"
width="800px"
@close="dialogClose"
>
@@ -60,31 +60,33 @@
</el-col>
<el-col :span="12">
<el-form-item label="鏄惁鍚敤" prop="plIsOpen">
- <el-switch v-model="form.plIsOpen" :active-value="1" :inactive-value="0" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
+ <el-switch v-model="form.plIsOpen" :active-value="1" :inactive-value="0" active-color="#13ce66"
+ inactive-color="#ff4949"></el-switch>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="鏄剧ず琛ㄨ揪寮忥細" prop="plOpenExpression">
- <el-input type="textarea" :rows="3" v-model="form.plOpenExpression"></el-input>
+ <el-input v-model="form.plOpenExpression" :rows="3" type="textarea"></el-input>
</el-form-item>
<el-form-item label="鍥介檯鍖栨爣鍑嗭細" prop="plLabel">
- <el-input type="textarea" :rows="1" v-model="form.plLabel"></el-input>
+ <el-input v-model="form.plLabel" :rows="1" type="textarea"></el-input>
</el-form-item>
<el-form-item label="鎻忚堪锛�" prop="plDesc">
- <el-input type="textarea" :rows="1" v-model="form.plDesc"></el-input>
+ <el-input v-model="form.plDesc" :rows="1" type="textarea"></el-input>
</el-form-item>
<el-form-item label="UI瑙f瀽绫伙細" prop="plUIParser">
- <el-input type="textarea" :rows="2" v-model="form.plUIParser"></el-input>
+ <el-input v-model="form.plUIParser" :rows="2" type="textarea"></el-input>
</el-form-item>
<div class="tip">
- <div style="color: #D40000">绀轰緥锛歫ava_cs:xxx;java_bs:xxx;net_cs:xxx;net_bs:xxx;mobile_cs:xxx;mobile_bs:xxx;</div>
+ <div style="color: #D40000">绀轰緥锛歫ava_cs:xxx;java_bs:xxx;net_cs:xxx;net_bs:xxx;mobile_cs:xxx;mobile_bs:xxx;
+ </div>
<div>1銆佺敤鑻辨枃鍗婅鍒嗗彿;鍒嗛殧鍚勭粍鍊笺��</div>
<div>2銆佹瘡缁勭敤鑻辨枃鍗婅鍐掑彿:鍒嗛殧鍗曚竴鎷撳睍灞炴�у悕绉板強灞炴�у�笺��</div>
<div>3銆佸叾涓殑xxx鏄悇绉嶈В鏋愮被鐨勫畬鏁寸被鍨嬪悕绉帮紙瀹屽叏闄愬畾鍚嶏級銆�</div>
<div>4銆佽緭鍏ユ椂锛屼笉瑕佹暡鍥炶溅鎹㈣銆�</div>
</div>
<el-form-item label="鎷撳睍灞炴�э細" prop="plExtAttr">
- <el-input type="textarea" :rows="2" v-model="form.plExtAttr"></el-input>
+ <el-input v-model="form.plExtAttr" :rows="2" type="textarea"></el-input>
</el-form-item>
<div class="tip">
<div style="color: #D40000">绀轰緥锛歟xt1:xx;ext2:xx;ext3:xxx;ext4:xxx;extn:xxx</div>
@@ -114,51 +116,51 @@
import bottomTable from "./bottomTable/index";
export default {
-name: "plShow",
+ name: "plShow",
props: {
uiDefineData: {
type: Object,
default: {}
},
},
- components:{bottomTable},
+ components: {bottomTable},
data() {
return {
- uiDefineOid:'',
+ uiDefineOid: '',
areaType: '',
tableLoading: false,
selectList: [],
option: {
...basicOption,
- height:'300px',
+ height: '300px',
addBtn: false,
editBtn: false,
delBtn: false,
- index:false,
- menuWidth:160,
- align:'left',
+ index: false,
+ menuWidth: 160,
+ align: 'left',
column: [{
label: '搴忓彿',
prop: 'plSeq',
- width:60
+ width: 60
}, {
label: '缂栫爜',
prop: 'plCode',
- width:180
+ width: 180
}, {
label: '鍚嶇О',
prop: 'plName',
- width:200
+ width: 200
}, {
label: '鏄惁鍚敤',
prop: 'plIsOpen',
- align:'center',
+ align: 'center',
width: 90
}, {
label: '鏄剧ず琛ㄨ揪寮�',
prop: 'plOpenExpression',
- overHidden:true,
- width:300
+ overHidden: true,
+ width: 300
}, {
label: 'UI瑙f瀽绫�',
prop: 'plUIParser'
@@ -178,12 +180,12 @@
plSeq: '',
plCode: '',
plName: '',
- plIsOpen:0,
- plOpenExpression:'',
- plLabel:'',
- plUIParser:'',
- plExtAttr:'',
- plDesc:''
+ plIsOpen: 0,
+ plOpenExpression: '',
+ plLabel: '',
+ plUIParser: '',
+ plExtAttr: '',
+ plDesc: ''
},
rules: {
plName: [{
@@ -205,38 +207,38 @@
}
},
watch: {
- uiDefineData:{
+ uiDefineData: {
handler(val) {
- if(val && val.plOId) {
+ if (val && val.plOId) {
if (val.plIsShowNavigator) {
this.areaType = '1';
- }else if(val.plIsShowForm){
+ } else if (val.plIsShowForm) {
this.areaType = '2'
- }else{
+ } else {
this.areaType = '3'
}
this.getTableList()
}
},
immediate: true,
- deep:true
+ deep: true
}
},
created() {
- this.uiDefineOid=this.$route.params.uiDefineOid;
+ this.uiDefineOid = this.$route.params.uiDefineOid;
},
methods: {
handleClick(tab, event) {
this.getTableList()
},
- getTableList(){
+ getTableList() {
const params = {
- contextId:this.uiDefineData.plOId,
- areaType:this.areaType
+ contextId: this.uiDefineData.plOId,
+ areaType: this.areaType
}
- getTabByContextIdAndType( params).then(res => {
+ getTabByContextIdAndType(params).then(res => {
this.data = res.data.data;
- this.selectList=[];
+ this.selectList = [];
this.$refs.crud.clearSelection();
this.tableLoading = false;
})
@@ -259,29 +261,29 @@
);
},
//鍒涘缓
- addHandler(){
- this.form={
+ addHandler() {
+ this.form = {
plSeq: '',
plCode: '',
plName: '',
- plIsOpen:0,
- plOpenExpression:'',
- plLabel:'',
- plUIParser:'',
- plExtAttr:'',
- plDesc:''
+ plIsOpen: 0,
+ plOpenExpression: '',
+ plLabel: '',
+ plUIParser: '',
+ plExtAttr: '',
+ plDesc: ''
};
this.dialogType = 'add';
this.dialogVisible = true;
},
- editHandler(){
- if(this.selectList.length!=0){
+ editHandler() {
+ if (this.selectList.length != 0) {
this.rowEditBtnClick(this.selectList[0]);
- }else {
+ } else {
this.$message.error('璇烽�夋嫨涓�鏉℃暟鎹繘琛岀紪杈�');
}
},
- delHandler(){
+ delHandler() {
if (this.selectList.length <= 0) {
this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
return;
@@ -309,7 +311,7 @@
},
// 缂栬緫鎸夐挳
rowEditBtnClick(row) {
- this.form=row;
+ this.form = row;
this.dialogType = 'edit';
this.dialogVisible = true;
},
@@ -340,17 +342,17 @@
this.form = {
plName: '',
plCode: '',
- plDesc:'',
+ plDesc: '',
plIsShow: [],
}
},
// 淇濆瓨椤电
saveHandler() {
- this.$refs.form.validate((valid,done) => {
+ this.$refs.form.validate((valid, done) => {
if (valid) {
const params = {
- plAreaType:parseInt(this.areaType),
- plContextOId:this.uiDefineData.plOId,
+ plAreaType: parseInt(this.areaType),
+ plContextOId: this.uiDefineData.plOId,
...this.form
}
if (this.dialogType === 'add') {
@@ -380,7 +382,7 @@
</script>
<style scoped>
-.tip{
+.tip {
font-size: 12px;
color: #909399;
margin: -13px 0 10px 100px;
--
Gitblit v1.9.3