From c6a54f63df671de4592e336b9b8cd8406d4e3b51 Mon Sep 17 00:00:00 2001
From: fujunling <2984387807@qq.com>
Date: 星期五, 02 六月 2023 16:25:27 +0800
Subject: [PATCH] 解决动态模块冲突

---
 Source/UBCS-WEB/src/views/modeling/Business.vue |   87 +++++++++++++++++++++++++++++--------------
 1 files changed, 59 insertions(+), 28 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/modeling/Business.vue b/Source/UBCS-WEB/src/views/modeling/Business.vue
index 3b59829..476fe62 100644
--- a/Source/UBCS-WEB/src/views/modeling/Business.vue
+++ b/Source/UBCS-WEB/src/views/modeling/Business.vue
@@ -1,14 +1,17 @@
 <template>
   <el-container>
-    <el-header>
-      <el-button type="primary" @click="businessAdd">鏂板</el-button>
-      <el-button type="primary" @click="businessEdit">淇敼</el-button>
-      <el-button type="primary" @click="selectFromTable">浠庡凡鏈変腑鑾峰彇</el-button>
+    <el-header class="businessHeader" style="height: 40px;">
+      <el-button-group>
+        <el-button type="primary" @click="businessAdd" size="small"> <i class="el-icon-plus"></i>&nbsp; 鏂板</el-button>
+        <el-button type="primary" @click="businessEdit" size="small"><i class="el-icon-edit"></i>&nbsp; 淇敼</el-button>
+        <el-button type="primary" @click="selectFromTable" size="small"><i class="el-icon-thumb"></i>&nbsp; 浠庡凡鏈変腑鑾峰彇</el-button>
+      </el-button-group>
     </el-header>
     <el-container>
       <el-aside width="240px">
-        <basic-container>
-          <avue-tree id="basic" :data="treeData" :option="treeOption" @node-click="nodeClick">
+        <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 }">
               <span>
                 <i class="el-icon-star-on"></i>
@@ -26,28 +29,28 @@
             <el-descriptions class="margin-top" :column="3" :size="size" border>
               <el-descriptions-item>
                 <template slot="label">
-                  <i :class="icons.key"></i>
+                  <i class="el-icon-finished"></i>
                   鑻辨枃鍚嶇О
                 </template>
                 {{ obj.id }}
               </el-descriptions-item>
               <el-descriptions-item>
                 <template slot="label">
-                  <i :class="icons.name"></i>
+                  <i class="el-icon-info"></i>
                   涓枃鍚嶇О
                 </template>
                 {{ obj.name }}
               </el-descriptions-item>
               <el-descriptions-item>
                 <template slot="label">
-                  <i :class="icons.tableName"></i>
+                  <i class="el-icon-date"></i>
                   鏁版嵁搴撹〃鍚�
                 </template>
                 {{ obj.tableName }}
               </el-descriptions-item>
               <el-descriptions-item>
                 <template slot="label">
-                  <i :class="icons.domain"></i>
+                  <i class="el-icon-folder-opened"></i>
                   鎵�灞為鍩�
                 </template>
                   <el-tag size="small">
@@ -70,21 +73,21 @@
           </el-descriptions-item> -->
               <el-descriptions-item>
                 <template slot="label">
-                  <i :class="icons.revisionRule"></i>
+                  <i class="el-icon-s-check"></i>
                   鐗堟湰瑙勫垯
                 </template>
                 {{ obj.versionRule }}
               </el-descriptions-item>
               <el-descriptions-item>
                 <template slot="label">
-                  <i :class="icons.lifeCycle"></i>
+                  <i class="el-icon-refresh-right"></i>
                   鐢熷懡鍛ㄦ湡
                 </template>
                 {{ obj.lifeCycleId }}
               </el-descriptions-item>
               <el-descriptions-item>
                 <template slot="label">
-                  <i :class="icons.view"></i>
+                  <i class="el-icon-view"></i>
                   瑙嗗浘
                 </template>
                <el-tag size="small">
@@ -100,7 +103,7 @@
           </el-descriptions-item> -->
               <el-descriptions-item>
                 <template slot="label">
-                  <i :class="icons.desc"></i>
+                  <i class="el-icon-chat-line-square"></i>
                   鎻忚堪
                 </template>
                 {{ obj.description }}
@@ -119,16 +122,19 @@
         </el-main>
         <el-dialog :visible="ref.visible" title="浠庢暟鎹簱涓坊鍔�" width="700px" append-to-body @close="dialoghandelfalse">
           閫夋嫨棰嗗煙锛�
-          <el-select v-model="domain" placeholder="璇烽�夋嫨" @change="refOnLoad">
+          <el-select v-model="domain" placeholder="璇烽�夋嫨" @change="refOnLoad" size="small">
             <el-option v-for="item in domainOptions" :key="item.value" :label="item.label" :value="item.value">
             </el-option>
           </el-select>
+          <div class="sep" style="height:7px">
+
+          </div>
           <avue-crud class="businessCrud" v-model="ref.form" :option="ref.option" :data="ref.data" @selection-change="selectionChange">
           </avue-crud>
-          <div slot="footer" class="dialog-footer">
-                <el-button @click="dialoghandeltrue">纭畾</el-button>
-                <el-button @click="dialoghandelfalse">鍙栨秷</el-button>
-            </div>
+          <span slot="footer" class="dialog-footer">
+            <el-button @click="dialoghandelfalse">鍙� 娑�</el-button>
+            <el-button type="primary" @click="dialoghandeltrue">纭� 瀹�</el-button>
+          </span>
         </el-dialog>
       </el-container>
     </el-container>
@@ -158,6 +164,7 @@
       treeOption: {
         defaultExpandAll: true,
         title: '涓氬姟绫诲瀷鏍�',
+        addBtn: false,
         props: {
           labelText: '',
           label: 'name',
@@ -172,8 +179,6 @@
         border: true,
         height: 466,
         editBtn: false,
-        index: true,
-        rowKey:'oid',
         addBtn: false,
         menu: false,
         highlightCurrentRow: true,
@@ -229,7 +234,7 @@
           headerAlign: 'center',
           border: true,
           index: true,
-          rowKey: 'oid',
+          rowKey: 'id',
           tabs: true,
           addBtn: false,
           menu: false,
@@ -262,13 +267,36 @@
   },
   methods: {
     nodeClick(data) {
-      if(data.oid){
-        getDetail(data.oid).then(res => {
-          this.obj = res.data.data;
-        })
-      }
+      getDetail(data.oid).then(res => {
+        this.obj = res.data.data;
+      })
+    },
+    //  鍩烘湰淇℃伅娣诲姞
+    basicSave(row, done, loading) {
+      add(Object.assign({
+        createUser: this.userInfo.name
+      }, row)).then(() => {
+        this.$message.success('鏂板鎴愬姛')
+        done();
+        this.getList();
+      }).catch(() => {
+        loading()
+      })
+    },
+    //灞炴�ф坊鍔�
+    loadSave(row, done, loading) {
+      add(Object.assign({
+        createUser: this.userInfo.name
+      }, row)).then(() => {
+        this.$message.success('鏂板鎴愬姛')
+        done();
+        this.getList();
+      }).catch(() => {
+        loading()
+      })
     },
     selectFromTable() {
+      console.log('鑾峰彇');
       this.ref.visible = true;
     },
     refOnLoad(domain) {
@@ -311,7 +339,7 @@
       this.ifRefreshBtmAddRefresh();
     },
     ifRefreshBtmAddRefresh(){
-      this.$refs.btmAdd.refreshAttrTable();
+      // this.$refs.btmAdd.refreshAttrTable();
     }
   },
 }
@@ -329,4 +357,7 @@
 .attributeCrud > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu{
         display: none !important;
 }
+.businessTreeContainer > .el-card > .el-card__body {
+  height: 775px;
+}
 </style>

--
Gitblit v1.9.3