Selaa lähdekoodia

更新 BuildDeploy.vue 页面中构建部署列表的列

reghao 2 päivää sitten
vanhempi
commit
9c1315303c
1 muutettua tiedostoa jossa 30 lisäystä ja 23 poistoa
  1. 30 23
      src/views/devops/app/BuildDeploy.vue

+ 30 - 23
src/views/devops/app/BuildDeploy.vue

@@ -40,7 +40,6 @@
         <!--        <el-button type="success" icon="el-icon-search" style="margin-left: 5px" @click="onSearch">查询</el-button>-->
         <el-button type="text" style="margin-left: 5px" @click="onRefresh">刷新</el-button>
         <el-button type="text" style="margin-left: 5px" @click="handleBuildTask">构建任务</el-button>
-        <el-button type="text" style="margin-left: 5px" @click="handleResetStat">重置状态</el-button>
       </el-row>
     </el-header>
     <el-main>
@@ -55,14 +54,16 @@
           label="No"
           type="index"
         />
-        <el-table-column
-          prop="appName"
-          label="应用名"
-        />
         <el-table-column
           prop="appId"
           label="应用 ID"
-        />
+        >
+          <template slot-scope="scope">
+            <el-button type="text" @click="handleAppDetail(scope.row)">
+              {{ scope.row.appId }}
+            </el-button>
+          </template>
+        </el-table-column>
         <el-table-column
           prop="repoBranch"
           label="分支"
@@ -131,7 +132,7 @@
         </el-table-column>
         <el-table-column
           prop="buildBy"
-          label="用户"
+          label="操作用户"
         />
         <el-table-column
           fixed="right"
@@ -193,16 +194,12 @@
             label="应用"
           />
           <el-table-column
-            prop="appType"
-            label="类型"
-          />
-          <el-table-column
-            prop="env"
-            label="环境"
+            prop="status"
+            label="状态"
           />
           <el-table-column
-            prop="stat"
-            label="状态"
+            prop="waitTime"
+            label="等待时间(秒)"
           />
           <el-table-column
             fixed="right"
@@ -460,6 +457,16 @@
         />
       </template>
     </el-dialog>
+    <el-dialog
+      title="应用详情"
+      append-to-body
+      :visible.sync="showAppDialog"
+      width="100%"
+      center
+    >
+      <template>
+      </template>
+    </el-dialog>
     <el-dialog
       title="构建结果"
       append-to-body
@@ -598,7 +605,7 @@ import {
   getBuildTaskList,
   getDeployList,
   getEnvList,
-  resetBuildStat, updateApp
+  updateApp
 } from '@/api/devops'
 
 export default {
@@ -633,6 +640,7 @@ export default {
       pageSize1: 10,
       totalSize1: 0,
       dataList1: [],
+      showAppDialog: false,
       showResultDialog: false,
       buildResult: null,
       showSnapshotDialog: false,
@@ -728,13 +736,6 @@ export default {
         this.$message.error(error.message)
       })
     },
-    handleResetStat() {
-      resetBuildStat().then(resp => {
-        this.$message.info(resp.msg)
-      }).catch(error => {
-        this.$message.error(error.message)
-      })
-    },
     handleBuildLog(index, row) {
       this.queryInfo1.appId = row.appId
       this.queryInfo1.pn = 1
@@ -766,6 +767,12 @@ export default {
         this.$message.error(error.message)
       })
     },
+    handleAppDetail(row) {
+      this.$message.info('get ' + row.appId + ' detail')
+      const queryInfo = {}
+      queryInfo.appId = row.appId
+      this.showAppDialog = true
+    },
     handleBuildResult(row) {
       const queryInfo = {}
       queryInfo.buildLogId = row.buildLogId