From 404966637eda6881a0f17683c5aacc7c1c34aed8 Mon Sep 17 00:00:00 2001
From: 田源 <tianyuan@vci-tech.com>
Date: 星期四, 16 一月 2025 16:18:34 +0800
Subject: [PATCH] 增加操作类型

---
 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/lifeCycle/index.vue |   86 ++++++++++++++++++++-----------------------
 1 files changed, 40 insertions(+), 46 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/lifeCycle/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/lifeCycle/index.vue
index 719c75d..1a06e05 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/lifeCycle/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/lifeCycle/index.vue
@@ -1,28 +1,40 @@
 <template>
   <el-container>
-    <el-aside width="15.7%">
+    <el-aside style="width:333px;">
       <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 v-if="permissionList.addBtn" class="button-custom-icon" plain size="small" type="primary"
+                       @click="addClickHandler">
+              <icon-show :name="permissionList.addBtn.source"></icon-show>
+              鍒涘缓
             </el-button>
-            <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">淇敼
+            <el-button v-if="permissionList.editBtn" class="button-custom-icon" plain size="small" type="primary" @click="editClickHandler">
+              <icon-show :name="permissionList.editBtn.source"></icon-show>
+              淇敼
             </el-button>
-            <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">鍒犻櫎
+            <el-button v-if="permissionList.delBtn" class="button-custom-icon" plain size="small" type="danger" @click="delClickHandler">
+              <icon-show :name="permissionList.delBtn.source"></icon-show>
+              鍒犻櫎
             </el-button>
-            <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭
+            <el-button v-if="permissionList.importBtn" class="button-custom-icon" plain size="small" type="primary" @click="uploadClickHandler">
+              <icon-show :name="permissionList.importBtn.source"></icon-show>
+              瀵煎叆
             </el-button>
-            <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">瀵煎叆
+            <el-button v-if="permissionList.exportBtn" class="button-custom-icon" plain size="small" type="primary" @click="exportClickHandler">
+              <icon-show :name="permissionList.exportBtn.source"></icon-show>
+              瀵煎嚭
             </el-button>
-            <el-button class="smallBtn" plain size="small" type="primary"
-                       @click="checkViewClickHandler">鏌ョ湅浣跨敤鑼冨洿
+            <el-button v-if="permissionList.viewTheScopeBtn" class="button-custom-icon" plain size="small" type="primary" @click="checkViewClickHandler">
+              <icon-show :name="permissionList.viewTheScopeBtn.source"></icon-show>
+              鏌ョ湅浣跨敤鑼冨洿
             </el-button>
           </div>
           <!-- 宸︿晶鏍� -->
           <div style="height:  calc(100vh - 300px);">
             <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">
+           <span>
               <i class="el-icon-s-promotion"></i>
                 {{ (node || {}).label }}
             </span>
@@ -87,6 +99,7 @@
 import CycleFlow from "@/components/flow-cycle/flowchartEditor.vue";
 import func from "@/util/func";
 import basicOption from "@/util/basic-option";
+import {mapGetters} from "vuex";
 
 export default {
   name: "index",
@@ -100,6 +113,7 @@
         searchMenuSpan: 8,
         refreshBtn: false,
         selection: false,
+        header:false,
         column: [
           {
             label: '鍚嶇О',
@@ -149,6 +163,19 @@
         }
       },
     }
+  },
+  computed:{
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false),
+        delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false),
+        editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false),
+        exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false),
+        importBtn: this.vaildData(this.permission[this.$route.query.id].IMPORT, false),
+        viewTheScopeBtn: this.vaildData(this.permission[this.$route.query.id].SEARCH, false),
+      };
+    },
   },
   created() {
     this.createdHandler();
@@ -314,7 +341,6 @@
         this.checkViewData = this.checkViewDataSearch;
         return done();
       }
-      ;
 
       this.checkViewData = this.checkViewData.filter(item => {
         return item.source && item.source.includes(source);
@@ -374,6 +400,8 @@
         startStatus: params.startStatus,
         startStatusName: params.startStatusName,
         description: params.description,
+        ts:params.ts,
+        oid:params.oid,
         bounds: params.nodes.map(node => ({
           name: node.id,
           cellx: String(node.x),
@@ -392,10 +420,12 @@
         : () => addLifeCycle(transformedData);
 
       getFunction().then(res => {
+        console.log(res);
         if (res.data.code === 200) {
           this.$message.success(res.data.obj);
           this.createdHandler();
           // this.handleResetTree();
+          this.rowData = {};
           this.$store.dispatch('updateMethodBtn', Object.keys(this.rowData).length > 0);
         }
       });
@@ -417,42 +447,6 @@
   .el-scrollbar__wrap {
     overflow: auto !important;
   }
-  .headerCon{
-    .el-button {
-      width: 65px;
-      padding-left: 9.5px;
-    }
-  }
 }
-
-.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(6) {
-//  margin-left: 0;
-//}
-
-.smallBtn {
-  width: 77px !important;
-  //font-size: 11px !important;
-  text-align: center  !important;
-  padding-left: 1px  !important;
-}
-
 </style>
 

--
Gitblit v1.9.3