From 6cfb1670e56aa394b7f668daf9adf01cc965ecc9 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期五, 08 十二月 2023 11:45:04 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS-WEB/src/views/modeling/LinkType.vue | 89 ++++++++++++++++++++++++++++++--------------
1 files changed, 61 insertions(+), 28 deletions(-)
diff --git a/Source/UBCS-WEB/src/views/modeling/LinkType.vue b/Source/UBCS-WEB/src/views/modeling/LinkType.vue
index afadda5..e0f13fd 100644
--- a/Source/UBCS-WEB/src/views/modeling/LinkType.vue
+++ b/Source/UBCS-WEB/src/views/modeling/LinkType.vue
@@ -1,32 +1,30 @@
<template>
<el-container>
<!-- 椤剁鎸夐挳 -->
- <el-header class="businessHeader" style="height: 40px;">
- <el-button-group>
- <el-button type="primary" @click="linkTypeAdd" size="small">
- <i class="el-icon-plus"></i>
- 鏂板
- </el-button>
- <el-button type="primary" @click="linkTypeEdit" size="small">
- <i class="el-icon-edit"></i>
- 淇敼
- </el-button>
- </el-button-group>
- </el-header>
+
<!-- 渚ц竟鏍忔爲 -->
<el-container>
- <el-aside width="240px">
+ <el-aside style="width: 20%;">
<basic-container class="businessTreeContainer">
- <p style="margin-top: 10px;font-weight: 570;font-size: 19px">{{ treeOption.title }}</p>
- <avue-tree id="basic" :data="treeData" :option="treeOption" @node-click="nodeClick"
- class="businessTree">
- <span class="el-tree-node__label" slot-scope="{ node, data }">
+ <div class="app">
+ <div style="display: flex;margin-bottom: 10px;">
+ <el-button type="primary" @click="linkTypeAdd" size="mini" v-if="permissionList.addBtn" plain>
+ 鏂板
+ </el-button>
+ <el-button type="primary" @click="linkTypeEdit" size="mini" v-if="permissionList.editBtn" plain>
+ 淇敼
+ </el-button>
+ </div>
+ <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"
+ class="businessTree">
+ <template class="el-tree-node__label" slot-scope="{ node, data }">
<span>
<i class="el-icon-star-on"></i>
{{ (node || {}).label }}
</span>
- </span>
+ </template>
</avue-tree>
+ </div>
</basic-container>
</el-aside>
<el-container>
@@ -64,7 +62,7 @@
<i :class="icons.domain"></i>
鎵�灞為鍩�
</template>
- <el-tag size="small">
+ <el-tag v-if="obj.domainText" size="small">
{{ obj.domainText }}
</el-tag>
</el-descriptions-item>
@@ -97,7 +95,7 @@
</el-descriptions>
<el-descriptions class="margin-top" :column="2" size="medium" border>
- <!--
+ <!--
<el-descriptions-item :labelStyle="descriptionOption.labelStyle"
:contentStyle="descriptionOption.contentStyle">
<template slot="label">
@@ -122,7 +120,7 @@
</template>
{{ obj.description }}
</el-descriptions-item>
- </el-descriptions>
+ </el-descriptions>
</basic-container>
<!-- 灞炴�у垪琛�-->
<basic-container>
@@ -136,13 +134,13 @@
</el-main>
</el-container>
</el-container>
- <link-type-add ref="linkAdd" :linkType="addOption.linkType" :domainOption="domainOptions" :icons="icons"
+ <link-type-add ref="linkAdd" :linkType="addOption.linkType" :domainOption="domainOptions" :icons="icons" :linkStatus="linkStatus"
@refreshTable="initTreeOnLoad">
</link-type-add>
</el-container>
</template>
-
+
<script>
import {
initTree,
@@ -151,10 +149,12 @@
saveFromTable,
getDetail
} from "@/api/omd/linkType"
+import {mapGetters} from "vuex";
export default {
name: "LinkType",
data() {
return {
+ linkStatus:'',
addOption: {
linkType: {
attributes:[]
@@ -179,7 +179,7 @@
},
loadOption: {
border: true,
- height: 360,
+ height: 'auto',
editBtn: false,
addBtn: false,
menu: false,
@@ -216,6 +216,7 @@
},
obj: {},
treeOption: {
+ height:'auto',
defaultExpandAll: true,
title: '閾炬帴绫诲瀷鏍�',
addBtn: false,
@@ -227,6 +228,15 @@
}
},
}
+ },
+ computed:{
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.modeling_LinkType.LinkType_add, false),
+ editBtn: this.vaildData(this.permission.modeling_LinkType.LinkType_edit, false),
+ }
+ }
},
created() {
this.initTreeOnLoad();
@@ -243,6 +253,7 @@
// 娣诲姞鎸夐挳鐐瑰嚮浜嬩欢
linkTypeAdd() {
this.$refs.linkAdd.linkType = {};
+ this.linkStatus = 'add';
this.$refs.linkAdd.showSubmitDialog = true;
},
// 缂栬緫鎸夐挳鐐瑰嚮浜嬩欢
@@ -254,8 +265,8 @@
var json = JSON.stringify(linktype);
this.addOption.linkType = JSON.parse(json);
this.$refs.linkAdd.linkType = this.addOption.linkType;
+ this.linkStatus = 'edit';
this.$refs.linkAdd.showSubmitDialog = true;
- console.log(this.obj);
},
// 浠庡凡鏈変腑鑾峰彇鎸夐挳鐐瑰嚮浜嬩欢
selectFromTable() {
@@ -277,10 +288,32 @@
}
}
</script>
-
-<style lang="scss">
+
+<style lang="scss" scoped>
.attributeCrud>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu {
display: none !important;
}
+.app {
+ overflow: auto;
+ height: 84.3vh;
+}
+
+.app::-webkit-scrollbar {
+ height: 15px; // 绾靛悜婊氬姩鏉� 蹇呭啓
+ background: white;
+ border: white;
+ width: 10px;
+
+}
+
+// 婊氬姩鏉$殑婊戝潡
+.app::-webkit-scrollbar-thumb {
+ width: 10px;
+ height: 10px;
+ background-color: #ececec;
+ border-radius: 20px;
+ border: #ececec;
+}
+
+
</style>
-
\ No newline at end of file
--
Gitblit v1.9.3