From 248b724ac5dc62410076bab39476e61d8f7fcf41 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 04 八月 2023 15:03:19 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs

---
 Source/UBCS-WEB/src/components/template/Stage.vue |   38 ++++++++++++++++++++++++++------------
 1 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/template/Stage.vue b/Source/UBCS-WEB/src/components/template/Stage.vue
index 31ee7b5..e440f54 100644
--- a/Source/UBCS-WEB/src/components/template/Stage.vue
+++ b/Source/UBCS-WEB/src/components/template/Stage.vue
@@ -8,7 +8,7 @@
                     @click="handleMaintenance(row, index)">缁存姢</el-button>
             </template>
         </avue-crud>
-        <el-dialog title="妯℃澘闃舵" width="50%" append-to-body="true" :visible.sync="dialogNode">
+        <el-dialog title="妯℃澘闃舵" width="50%"  append-to-body="true" :visible.sync="dialogNode">
             <avue-crud ref="crud" :table-loading="loading" :data="stageData" :option="stageOption" @on-load="getStagelist"
                 @row-click="handleRowStageClick">
                 <template slot-scope="{type,size,row,index}" slot="menu">
@@ -38,7 +38,11 @@
         }
     },
     watch: {
-
+      code: {
+        handler(newval, oldval) {
+          this.getDataList()
+        }
+      }
     },
     data() {
         const options = {
@@ -98,6 +102,7 @@
             ],
             option: {
                 ...options,
+              height: 383,
                 column: [
                     { label: '妯℃澘缂栧彿', prop: 'modelKey' },
                     { label: '妯℃澘鍚嶇О', prop: 'modelName' },
@@ -106,6 +111,7 @@
             },
             stageOption: {
                 ...options,
+              height:620,
                 column: [
                     { label: '闃舵缂栧彿', prop: 'taskId' },
                     { label: '闃舵鍚嶇О', prop: 'taskName' },
@@ -126,17 +132,21 @@
         },
         // 鑾峰彇鍒楄〃
         async getDataList() {
-            this.loading = false
-            const { pageSize, currentPage } = this.page
-            let param = { size: pageSize, current: currentPage }
-            const response = await getFlowpathList({ ...param, ...{ templateId: this.code } })
+          this.loading = false
+          if (this.code) {
+            const {pageSize, currentPage} = this.page
+            let param = {size: pageSize, current: currentPage}
+            const response = await getFlowpathList({...param, ...{templateId: this.code}})
             if (response.status === 200) {
-                console.log(response)
-                this.loading = false
-                const data = response.data.data
-                this.data = data.records
-                this.page.total = data.total
+              console.log(response)
+              this.loading = false
+              const data = response.data.data
+              this.data = data.records
+              this.page.total = data.total
             } else this.loading = false
+          }else {
+            this.data=[]
+          }
         },
         // 鑾峰彇闃舵鍒楄〃
         async getStagelist() {
@@ -161,9 +171,10 @@
                     item = { oid, id, name, attributeGroup, ...{ checked: false } }
                     if (dataRight.length !== 0) {
                         dataRight.forEach(element => { if (item.id === element.attrId) item.checked = true });
-                        return item
                     }
+                    return item
                 })
+                console.log(datas)
                 let dataValue = datas.map(item => item.checked ? item.oid : undefined)
                 this.attributeValue = dataValue.filter(item => item)
                 this.attributeData = datas
@@ -186,8 +197,11 @@
         handleMaintenance(row) {
             console.log(row)
             this.dialogNode = true
+            this.modelKey = row.modelKey
             this.saveParam.modelKey = row.modelKey
+            this.getStagelist()
         },
+        // 缁存姢
         handleMaintenanceTransfer(row) {
             this.saveParam.taskId = row.taskId
             this.saveParam.taskName = row.taskName

--
Gitblit v1.9.3