From bd8c4d0191879275492ab70798b9be267dc9f5b8 Mon Sep 17 00:00:00 2001
From: lihang <lihang@vci-tech.com>
Date: 星期五, 12 五月 2023 17:00:53 +0800
Subject: [PATCH] 业务类型新增按钮

---
 Source/UBCS-WEB/src/views/modeling/Business.vue |   80 +++++++++++++++++-----------------------
 1 files changed, 34 insertions(+), 46 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/modeling/Business.vue b/Source/UBCS-WEB/src/views/modeling/Business.vue
index 40ccabe..87d1d21 100644
--- a/Source/UBCS-WEB/src/views/modeling/Business.vue
+++ b/Source/UBCS-WEB/src/views/modeling/Business.vue
@@ -26,28 +26,28 @@
             <el-descriptions class="margin-top" :column="3" :size="size" border>
               <el-descriptions-item>
                 <template slot="label">
-                  <i class="el-icon-finished"></i>
+                  <i :class="icons.key"></i>
                   鑻辨枃鍚嶇О
                 </template>
                 {{ obj.id }}
               </el-descriptions-item>
               <el-descriptions-item>
                 <template slot="label">
-                  <i class="el-icon-info"></i>
+                  <i :class="icons.name"></i>
                   涓枃鍚嶇О
                 </template>
                 {{ obj.name }}
               </el-descriptions-item>
               <el-descriptions-item>
                 <template slot="label">
-                  <i class="el-icon-date"></i>
+                  <i :class="icons.tableName"></i>
                   鏁版嵁搴撹〃鍚�
                 </template>
                 {{ obj.tableName }}
               </el-descriptions-item>
               <el-descriptions-item>
                 <template slot="label">
-                  <i class="el-icon-folder-opened"></i>
+                  <i :class="icons.domain"></i>
                   鎵�灞為鍩�
                 </template>
                 {{ obj.domain }}
@@ -68,21 +68,21 @@
           </el-descriptions-item> -->
               <el-descriptions-item>
                 <template slot="label">
-                  <i class="el-icon-s-check"></i>
+                  <i :class="icons.revisionRule"></i>
                   鐗堟湰瑙勫垯
                 </template>
                 {{ obj.versionRule }}
               </el-descriptions-item>
               <el-descriptions-item>
                 <template slot="label">
-                  <i class="el-icon-refresh-right"></i>
+                  <i :class="icons.lifeCycle"></i>
                   鐢熷懡鍛ㄦ湡
                 </template>
                 {{ obj.lifeCycleId }}
               </el-descriptions-item>
               <el-descriptions-item>
                 <template slot="label">
-                  <i class="el-icon-view"></i>
+                  <i :class="icons.view"></i>
                   瑙嗗浘
                 </template>
                 {{ obj.viewFlag }}
@@ -96,7 +96,7 @@
           </el-descriptions-item> -->
               <el-descriptions-item>
                 <template slot="label">
-                  <i class="el-icon-chat-line-square"></i>
+                  <i :class="icons.desc"></i>
                   鎻忚堪
                 </template>
                 {{ obj.description }}
@@ -106,7 +106,7 @@
           <!-- 灞炴�у垪琛�-->
           <basic-container>
             <p style="margin-top: 10px;font-weight: 570;font-size: 19px">灞炴�у垪琛�</p>
-            <avue-crud v-model="obj" :data="obj.attributes" :option="loadOption" @row-save="loadSave"></avue-crud>
+            <avue-crud class="attributeCrud" v-model="obj" :data="obj.attributes" :option="loadOption"></avue-crud>
           </basic-container>
         </el-main>
         <el-dialog :visible="ref.visible" title="浠庢暟鎹簱涓坊鍔�" width="700px" append-to-body @close="dialoghandelfalse">
@@ -117,14 +117,10 @@
           </el-select>
           <avue-crud class="businessCrud" v-model="ref.form" :option="ref.option" :data="ref.data" @selection-change="selectionChange">
           </avue-crud>
-          <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>
-    <business-add ref="btmAdd" :btmType="addOption.btmType" :domainOption="domainOptions">
+    <business-add ref="btmAdd" :btmType="addOption.btmType" :domainOption="domainOptions" :icons="icons" @refreshTable="initTreeOnLoad">
   </business-add>
   </el-container>
 </template>
@@ -164,6 +160,8 @@
         border: true,
         height: 466,
         editBtn: false,
+        index: true,
+        rowKey:'oid',
         addBtn: false,
         menu: false,
         highlightCurrentRow: true,
@@ -198,6 +196,16 @@
       },
       domain: null,
       domainOptions: [],
+      icons:{
+        key: 'el-icon-finished',
+        name: 'el-icon-info',
+        tableName: 'el-icon-date',
+        domain: 'el-icon-folder-opened',
+        revisionRule: 'el-icon-s-check',
+        lifeCycle: 'el-icon-refresh-right',
+        view: 'el-icon-view',
+        desc: 'el-icon-chat-line-square'
+      },
       ref: {
         // 浠庤〃涓�夋嫨dialog鐘舵��
         visible: false,
@@ -208,7 +216,7 @@
           headerAlign: 'center',
           border: true,
           index: true,
-          rowKey: 'id',
+          rowKey: 'oid',
           tabs: true,
           addBtn: false,
           menu: false,
@@ -273,36 +281,13 @@
       }
     },
     nodeClick(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()
-      })
+      if(data.oid){
+        getDetail(data.oid).then(res => {
+          this.obj = res.data.data;
+        })
+      }
     },
     selectFromTable() {
-      console.log('鑾峰彇');
       this.ref.visible = true;
     },
     refOnLoad(domain) {
@@ -339,6 +324,7 @@
     },
     businessAdd(){
       this.$refs.btmAdd.showSubmitDialog = true;
+      this.$refs.btmAdd.refreshAttrTable();
       console.log('娣诲姞');
     },
     businessEdit(){
@@ -356,8 +342,10 @@
   border-radius: 10px;
 }
 
-.businessCrud > .el-card > .el-card__body > .avue-crud_menu{
-  display: none!important;
+.businessCrud > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu{
+        display: none !important;
 }
-
+.attributeCrud > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu{
+        display: none !important;
+}
 </style>

--
Gitblit v1.9.3