From f63cf1dec06613c395b69fa19553396a5c99b434 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期四, 26 十月 2023 17:31:37 +0800
Subject: [PATCH] 对象建模 文件管理 研发工具 主题库-按钮权限

---
 Source/UBCS-WEB/src/views/modeling/LinkType.vue |   53 ++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 34 insertions(+), 19 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/modeling/LinkType.vue b/Source/UBCS-WEB/src/views/modeling/LinkType.vue
index eec03bf..23417ee 100644
--- a/Source/UBCS-WEB/src/views/modeling/LinkType.vue
+++ b/Source/UBCS-WEB/src/views/modeling/LinkType.vue
@@ -2,16 +2,14 @@
     <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>&nbsp;
-                        鏂板
-                    </el-button>
-                    <el-button type="primary" @click="linkTypeEdit" size="small">
-                        <i class="el-icon-edit"></i>&nbsp;
-                        淇敼
-                    </el-button>
-                </el-button-group>
+          <div>
+            <el-button type="primary" @click="linkTypeAdd" size="small" icon="el-icon-plus" v-if="permissionList.addBtn">
+              鏂板
+            </el-button>
+            <el-button type="primary" @click="linkTypeEdit" size="small" icon="el-icon-edit" v-if="permissionList.editBtn">
+              淇敼
+            </el-button>
+          </div>
             </el-header>
         <!-- 渚ц竟鏍忔爲 -->
         <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>
@@ -142,7 +140,7 @@
 
     </el-container>
 </template>
-  
+
 <script>
 import {
     initTree,
@@ -151,12 +149,15 @@
     saveFromTable,
     getDetail
 } from "@/api/omd/linkType"
+import {mapGetters} from "vuex";
 export default {
     name: "LinkType",
     data() {
         return {
             addOption: {
-                linkType: {},
+                linkType: {
+                    attributes:[]
+                },
             },
             domain: null,
             domainOptions: [],
@@ -177,7 +178,7 @@
             },
             loadOption: {
                 border: true,
-                height: 360,
+                height: 395,
                 editBtn: false,
                 addBtn: false,
                 menu: false,
@@ -226,6 +227,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();
         this.initDomainOption();
@@ -240,11 +250,17 @@
         },
         // 娣诲姞鎸夐挳鐐瑰嚮浜嬩欢
         linkTypeAdd() {
+            this.$refs.linkAdd.linkType = {};
             this.$refs.linkAdd.showSubmitDialog = true;
         },
         // 缂栬緫鎸夐挳鐐瑰嚮浜嬩欢
         linkTypeEdit() {
-            this.addOption.linkType = this.obj;
+            var linktype = this.obj;
+            linktype.fromBtmValues = this.obj.fromBtmTypes;
+            linktype.toBtmValues = this.obj.toBtmTypes;
+            linktype.attributes = this.obj.attributes;
+            var json = JSON.stringify(linktype);
+            this.addOption.linkType = JSON.parse(json);
             this.$refs.linkAdd.linkType = this.addOption.linkType;
             this.$refs.linkAdd.showSubmitDialog = true;
         },
@@ -268,10 +284,9 @@
     }
 }
 </script>
-  
+
 <style lang="scss">
 .attributeCrud>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu {
     display: none !important;
 }
 </style>
-  
\ No newline at end of file

--
Gitblit v1.9.3