Sfoglia il codice sorgente

部署中心页面提交

xujie 1 anno fa
parent
commit
db06b94ff5

+ 24 - 0
src/api/deploy/bering.js

@@ -25,3 +25,27 @@ export function beringPackageList(data) {
     params: data
   })
 }
+
+//删除白令海升级包
+export function deleteBeringPackage(id) {
+  return request({
+    url: '/api/deploy/agentPackage/delete/'+id,
+    method: 'delete',
+  })
+}
+//白令海升级包版本
+export function upgradePackageList() {
+  return request({
+    url: '/api/deploy/agentUpgrade/selectPackages',
+    method: 'get',
+  })
+}
+
+//白令海升级包版本
+export function upgradeBering(data) {
+  return request({
+    url: '/api/deploy/agentUpgrade/upload',
+    method: 'post',
+    params: data
+  })
+}

+ 10 - 0
src/api/deploy/log.js

@@ -0,0 +1,10 @@
+import request from "@/utils/request";
+
+//日志列表
+export function logList(data) {
+  return request({
+    url: '/api/deploy/log/list',
+    method: 'get',
+    params: data
+  })
+}

+ 40 - 2
src/views/deploy/bering/beringPackage.vue

@@ -37,6 +37,7 @@
               class="el-icon-delete"
               size="mini"
               type="danger"
+              @click="remove(row)"
             >删除
             </el-button
             >
@@ -88,7 +89,7 @@
 
 <script>
 import {
-  beringPackageList
+  beringPackageList,deleteBeringPackage
 } from "@/api/deploy/bering";
 import {getToken} from "@/utils/auth";
 
@@ -205,8 +206,28 @@ export default {
         { dangerouslyUseHTMLString: true }
       );
     },
-    handleBeforeUpload(){
+    handleBeforeUpload(file){
+      // 校检文件类型
+      if (this.fileType) {
+        const fileName = file.name.split('.');
+        const fileExt = fileName[fileName.length - 1];
+        const isTypeOk = this.fileType.indexOf(fileExt) >= 0;
+        if (!isTypeOk) {
+          this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
+          return false;
+        }
+      }
+      // 校检文件大小
+      if (this.fileSize) {
+        const isLt = file.size / 1024 / 1024 < this.fileSize;
+        if (!isLt) {
+          this.$modal.msgError(`上传文件大小不能超过 ${this.fileSize} MB!`);
+          return false;
+        }
+      }
 
+      //this.$modal.loading("正在上传文件,请稍候...");
+      return true;
     },
     // 文件上传中处理
     handleFileUploadProgress(event, file, fileList) {
@@ -221,6 +242,23 @@ export default {
       }
       this.$refs.upload.submit();
     },
+    remove(row){
+      this.$modal
+        .confirm("确定删除该升级包?")
+        .then(function () {
+        })
+        .then(() => {
+          deleteBeringPackage(row.id).then((res) => {
+            let {code, msg} = res;
+            if (code === 200) {
+              this.getList();
+              this.$modal.msgSuccess("删除成功!");
+            } else {
+              this.$modal.msgError(msg);
+            }
+          });
+        });
+    }
   }
 };
 </script>

+ 115 - 8
src/views/deploy/bering/index.vue

@@ -82,7 +82,7 @@
             </el-button>
           </el-col>
           <el-col :span="1.5">
-            <el-button icon="el-icon-position" size="mini" type="primary" @click="resetQuery"
+            <el-button icon="el-icon-position" size="mini" type="primary" @click="showUpgradeDialog('','batch')"
             >批量升级
             </el-button>
           </el-col>
@@ -100,11 +100,15 @@
             <span v-text="getPageIndex(scope.$index)"> </span>
           </template>
         </el-table-column>
-        <el-table-column align="center" label="所属机构" prop="orgName"/>
+        <el-table-column align="center" label="所属机构" prop="orgName" :show-overflow-tooltip="true" scoped-slot="hostIp" width="360"/>
         <el-table-column align="center" label="主机IP" prop="hostIp" :show-overflow-tooltip="true" scoped-slot="hostIp" width="320"/>
         <el-table-column align="center" label="白令海状态" prop="hostStatus">
-          <template slot-scope="scope">
+<!--          <template slot-scope="scope">
             <dict-tag :options="dict.type.deploy_bering_status" :value="scope.row.hostStatus"/>
+          </template>-->
+          <template v-slot:default="scope">
+            <span v-if="scope.row.hostStatus === 1" style="color: #00B83F">在线</span>
+            <span v-else style="color: red">离线</span>
           </template>
         </el-table-column>
         <el-table-column align="center" label="白令海当前版本号" prop="agentVersion"/>
@@ -116,11 +120,11 @@
           width="120"
         >
           <template slot-scope="{ row }">
-            <el-button v-if="row.upgradeFlag === 1 && row.hostStatus === 1"
+            <el-button v-if="row.upgradeFlag === '1' && row.hostStatus === 1"
               class="el-icon-position"
               size="mini"
               type="primary"
-              @click="onManageContent(row)"
+              @click="showUpgradeDialog(row.id,'single')"
             >升级
             </el-button
             >
@@ -140,15 +144,47 @@
       <pagination v-show="total > 0" :limit.sync="queryParams.pageSize" :page.sync="queryParams.pageNum" :total="total"
                   @pagination="getList"/>
 
+
+      <DialogCom :title="'白令海升级'" :visible.sync="open" append-to-body width="780px">
+        <div class="form-group" style="text-align: center;margin-top: 20px">
+          若主机当前版本号大于等于选中的升级包版本号,则不进行该主机白令海升级;且白令海状态离线的主机,不进行升级!
+        </div>
+
+        <el-form ref="form" :model="form" :rules="rules" label-width="180px" :style="{height:'500px',margin:'35px'}">
+
+          <el-form-item label="白令海升级包" prop="agentPackageId">
+            <el-select
+              style="width: 100%"
+              v-model="form.agentPackageId"
+              placeholder="请选择升级包"
+              @change="onUpgradePackageChange"
+              clearable
+            >
+              <el-option
+                v-for="item in upgradePackages"
+                :key="item.id"
+                :label="item.text"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="submitForm">确 定</el-button>
+          <el-button @click="cancel">取 消</el-button>
+        </div>
+      </DialogCom>
+
     </div>
   </div>
 </template>
 
 <script>
 import {
-  upgradeBeringList,beringVersionList
+  upgradeBeringList,beringVersionList,upgradePackageList,upgradeBering
 } from "@/api/deploy/bering";
 import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
+import {validateUpgradeHost} from "@/api/deploy/hostInfo";
 
 export default {
   name: "BeringStatus",
@@ -184,19 +220,36 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
+        checkSub: true,
         hostOrg: null,
         agentVersion: null,
         uploadVersion: null,
         hostIp: null,
-        hostStatus:null
+        hostStatus:null,
+        //升级需要参数
+        type: null,
+        hostId: null,
+        agentPackageId: null,
       },
       beringVersions:[],
+      upgradePackages: [],
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        agentPackageId: [
+          {required: true, message: "请选择白令海升级包", trigger: "blur"}
+        ],
+      },
     };
   },
   created() {
     beringVersionList().then((d) => {
       this.beringVersions = d.data;
     });
+    upgradePackageList().then((d) => {
+      this.upgradePackages = d.data;
+    });
     this.getList();
   },
   methods: {
@@ -225,7 +278,7 @@ export default {
     getList() {
       this.loading = true;
       console.log("123456")
-      this.queryParams.hostOrg = null;
+      //this.queryParams.hostOrg = null;
       upgradeBeringList(this.queryParams).then(response => {
           this.packageInfoList = response.rows;
           this.total = response.total;
@@ -244,6 +297,9 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.dateRange = [];
+      this.queryParams.type = null;
+      this.queryParams.hostId = null;
+      this.queryParams.agentPackageId = null;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -265,6 +321,57 @@ export default {
         this.queryParams.uploadVersion = data.text;
       }
     },
+    showUpgradeDialog(hostId,type){
+      if (type === 'batch'){
+        //为0代表升级所有主机
+        this.queryParams.hostId = null;
+        this.getList();
+      }else {
+        this.queryParams.hostId = hostId;
+      }
+      this.open = true;
+      this.queryParams.type = type;
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        agentPackageId: null,
+      };
+      this.resetForm("form");
+    },
+    onUpgradePackageChange(val){
+      this.$refs["form"].clearValidate(["agentPackageId"]);
+    },
+    submitForm(){
+      console.log("agentPackageId:"+this.form.agentPackageId);
+      console.log("queryParams:"+this.queryParams);
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          this.$modal
+            .confirm("是否确认升级查询结果列表中的主机?")
+            .then(function () {
+            })
+            .then(() => {
+              this.queryParams.agentPackageId = this.form.agentPackageId;
+              upgradeBering(this.queryParams).then((res) => {
+                let {code, msg} = res;
+                if (code == 200) {
+                  this.$modal.msgSuccess("升级任务下发成功!");
+                  this.resetQuery();
+                  this.cancel();
+                } else {
+                  this.$modal.msgError(msg);
+                }
+              });
+            });
+        }
+      });
+    }
   }
 };
 </script>

+ 44 - 5
src/views/deploy/hostInfo/index.vue

@@ -113,6 +113,11 @@
             </el-button>
           </el-col>
           <el-col :span="1.5">
+            <el-button icon="el-icon-upload2" size="mini" type="primary" @click="confirmExport"
+            >导出
+            </el-button>
+          </el-col>
+          <el-col :span="1.5">
             <el-button icon="el-icon-position" size="mini" type="primary" @click="handleUpgrade"
             >批量升级
             </el-button>
@@ -133,24 +138,38 @@
             <span v-text="getPageIndex(scope.$index)"> </span>
           </template>
         </el-table-column>
-        <el-table-column align="center" label="所属机构" prop="orgName"/>
+        <el-table-column align="center" label="所属机构" prop="hostOrgName" :show-overflow-tooltip="true" scoped-slot="hostOrgName" width="240"/>
         <el-table-column align="center" label="主机名称" prop="hostName"/>
-        <el-table-column align="center" label="主机IP" prop="hostIp"/>
+        <el-table-column align="center" label="主机IP" prop="hostIp" :show-overflow-tooltip="true" scoped-slot="hostIp" width="240"/>
         <el-table-column align="center" label="当前版本号" prop="zipVersion"/>
         <el-table-column align="center" label="目标版本号" prop="targetVersion"/>
         <el-table-column align="center" label="升级状态" prop="updateStatus">
-          <template slot-scope="scope">
+<!--          <template slot-scope="scope">
             <dict-tag :options="dict.type.deploy_upgrade_status" :value="scope.row.updateStatus"/>
+          </template>-->
+          <template v-slot:default="scope">
+            <span v-if="scope.row.updateStatus === 0" style="color: #000000">进行中</span>
+            <span v-else-if="scope.row.updateStatus === 1" style="color: #00B83F">成功</span>
+            <span v-else-if="scope.row.updateStatus === 2" style="color: red">失败</span>
+            <span v-else-if="scope.row.updateStatus === 3" style="color: #f0ad4e">重试中</span>
           </template>
         </el-table-column>
         <el-table-column align="center" label="服务状态" prop="serverStatus">
-          <template slot-scope="scope">
+<!--          <template slot-scope="scope">
             <dict-tag :options="dict.type.deploy_service_status" :value="scope.row.serverStatus"/>
+          </template>-->
+          <template v-slot:default="scope">
+            <span v-if="scope.row.serverStatus === 0" style="color: red">进行中</span>
+            <span v-else style="color: #00B83F">正常</span>
           </template>
         </el-table-column>
         <el-table-column align="center" label="白令海状态" prop="hostStatus">
-          <template slot-scope="scope">
+<!--          <template slot-scope="scope">
             <dict-tag :options="dict.type.deploy_bering_status" :value="scope.row.hostStatus"/>
+          </template>-->
+          <template v-slot:default="scope">
+            <span v-if="scope.row.hostStatus === 1" style="color: #00B83F">在线</span>
+            <span v-else style="color: red">离线</span>
           </template>
         </el-table-column>
         <el-table-column align="center" label="白令海版本号" prop="agentVersion"/>
@@ -237,6 +256,7 @@ import KFileUpload from "@/components/K-FileUpload/index.vue";
 import KTextarea from "@/components/common/textarea.vue";
 import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
 import hostServerPage from "./serverPage.vue"
+import dayjs from "dayjs";
 
 export default {
   name: "HostInfo",
@@ -273,6 +293,7 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
+        checkSub: true,
         hostOrg: null,
         zipVersion: null,
         targetVersion: null,
@@ -502,6 +523,24 @@ export default {
       };
       this.resetForm("form");
     },
+    confirmExport(){
+      this.$modal
+        .confirm("导出符合当前查询条件的信息记录,确定执行?")
+        .then(function () {
+        })
+        .then(() => {
+          this.handleExportHostInfo();
+        });
+    },
+    handleExportHostInfo() {
+      this.download(
+        "/api/deploy/hostInfo/export",
+        {
+          ...this.queryParams,
+        },
+        `主机管理列表_${new Date().getTime()}.xls`
+      );
+    },
   }
 };
 </script>

+ 226 - 0
src/views/deploy/log/index.vue

@@ -0,0 +1,226 @@
+<template>
+  <div class="app-container">
+    <div class="main-right-box">
+      <!--    搜索条件    -->
+      <div class="main-search-box">
+        <el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" size="small">
+
+
+          <el-form-item label="组织机构">
+            <org-tree
+              v-model="queryParams.orgId"
+              @defaultOrg="getDefaultOrg"
+              @checkChange="checkChange"
+              @click="clickTreeNode"
+              ref="orgTree"
+            ></org-tree>
+          </el-form-item>
+
+          <el-form-item label="主机IP" prop="hostIp">
+            <el-input v-model="queryParams.hostIp" :maxlength="50" clearable placeholder="请输入主机IP"/>
+          </el-form-item>
+
+          <el-form-item label="当前版本号" prop="hostIp">
+            <el-input v-model="queryParams.mirrorVersion" :maxlength="50" clearable placeholder="请输入当前版本号"/>
+          </el-form-item>
+
+          <el-form-item label="目标版本号" prop="hostIp">
+            <el-input v-model="queryParams.targetVersion" :maxlength="50" clearable placeholder="请输入目标版本号"/>
+          </el-form-item>
+
+          <el-form-item class="searchTitle" prop="dateRange" label="时间范围">
+            <DataRangePicker
+              v-model="dateRange"
+              key="daterange"
+              type="daterange"
+              :clearable="true"
+            />
+          </el-form-item>
+
+        </el-form>
+
+
+        <el-row :gutter="10">
+          <el-col :span="1.5">
+            <el-button icon="el-icon-search" size="mini" type="primary" @click="handleQuery"
+            >搜索
+            </el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button icon="el-icon-refresh" size="mini" type="primary" @click="resetQuery"
+            >重置
+            </el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button icon="el-icon-upload2" size="mini" type="primary" @click="confirmExport"
+            >导出
+            </el-button>
+          </el-col>
+          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+        </el-row>
+      </div>
+
+      <el-table
+        v-loading="loading"
+        :data="logInfoList"
+        border
+        height="646" size="small" >
+        <el-table-column align="center" label="序号" width="60">
+          <template v-slot:default="scope">
+            <span v-text="getPageIndex(scope.$index)"> </span>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="操作人" prop="userName"/>
+        <el-table-column align="center" label="所属机构" prop="organizeName" :show-overflow-tooltip="true" scoped-slot="hostIp" width="320"/>
+        <el-table-column align="center" label="主机名称" prop="hostName" :show-overflow-tooltip="true" scoped-slot="hostName"/>
+        <el-table-column align="center" label="主机IP" prop="hostIp" :show-overflow-tooltip="true" scoped-slot="hostIp" width="240"/>
+        <el-table-column align="center" label="当前版本号" prop="mirrorVersion"/>
+        <el-table-column align="center" label="目标版本号" prop="targetVersion"/>
+        <el-table-column align="center" label="操作描述" prop="remark" :show-overflow-tooltip="true" scoped-slot="remark"/>
+        <el-table-column align="center" label="操作时间" prop="operaTime" :show-overflow-tooltip="true" scoped-slot="operaTime"/>
+        <el-table-column align="center" label="操作结果" prop="operaResult"/>
+      </el-table>
+
+      <pagination v-show="total > 0" :limit.sync="queryParams.pageSize" :page.sync="queryParams.pageNum" :total="total"
+                  @pagination="getList"/>
+    </div>
+  </div>
+</template>
+
+<script>
+import {
+  logList
+} from "@/api/deploy/log";
+import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
+import DataRangePicker from "@/components/dateTime/daterange.picker.vue";
+import dayjs from "dayjs";
+
+export default {
+  name: "BeringLog",
+  computed: {
+  },
+  components: {DataRangePicker, OrgTree},
+  dicts: [],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个停用
+      single: true,
+      // 非多个停用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 表数据
+      logInfoList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        checkSub: true,
+        orgId: null,
+        hostIp: null,
+        mirrorVersion: null,
+        targetVersion: null,
+        startDate: null,
+        endDate: null,
+      },
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    getDefaultOrg(node) {
+      this.queryParams.orgId = node.id;
+      this.getList();
+    },
+    //单选框状态改变
+    checkChange(state) {
+      this.queryParams.checkSub = state;
+      this.getList();
+    },
+    // 节点单击事件
+    clickTreeNode(data) {
+      if(data==null){
+        return;
+      }
+      this.queryParams.orgId = data.id;
+      this.getList();
+    },
+    getPageIndex($index) {
+      //表格序号
+      return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
+    },
+    /** 查询升级包列表 */
+    getList() {
+      this.loading = true;
+      console.log("123456")
+      if (this.dateRange && this.dateRange.length > 0){
+        this.queryParams.startDate = dayjs(this.dateRange[0]).format('YYYY-MM-DD HH:mm:ss');
+        this.queryParams.endDate = dayjs(this.dateRange[1]).endOf('d').format('YYYY-MM-DD HH:mm:ss');
+      }else {
+        this.queryParams.startDate = null;
+        this.queryParams.endDate = null;
+      }
+      logList(this.queryParams).then(response => {
+          this.logInfoList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        }
+      ).catch((err) => {
+        this.loading = false;
+      });
+    },
+
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    confirmExport(){
+      this.$modal
+        .confirm("导出符合当前查询条件的信息记录,确定执行?")
+        .then(function () {
+        })
+        .then(() => {
+          this.handleExportLog();
+        });
+    },
+    handleExportLog() {
+      if (this.dateRange && this.dateRange.length > 0){
+        this.queryParams.startDate = dayjs(this.dateRange[0]).format('YYYY-MM-DD HH:mm:ss');
+        this.queryParams.endDate = dayjs(this.dateRange[1]).endOf('d').format('YYYY-MM-DD HH:mm:ss');
+      }else {
+        this.queryParams.startDate = null;
+        this.queryParams.endDate = null;
+      }
+      this.download(
+        "/api/deploy/log/export",
+        {
+          ...this.queryParams,
+        },
+        `日志管理列表_${new Date().getTime()}.xls`
+      );
+    },
+  }
+};
+</script>
+<style lang="scss" scoped>
+</style>
+

+ 21 - 1
src/views/deploy/package/index.vue

@@ -329,8 +329,28 @@ export default {
         { dangerouslyUseHTMLString: true }
       );
     },
-    handleBeforeUpload(){
+    handleBeforeUpload(file){
+      // 校检文件类型
+      if (this.fileType) {
+        const fileName = file.name.split('.');
+        const fileExt = fileName[fileName.length - 1];
+        const isTypeOk = this.fileType.indexOf(fileExt) >= 0;
+        if (!isTypeOk) {
+          this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
+          return false;
+        }
+      }
+      // 校检文件大小
+      if (this.fileSize) {
+        const isLt = file.size / 1024 / 1024 < this.fileSize;
+        if (!isLt) {
+          this.$modal.msgError(`上传文件大小不能超过 ${this.fileSize} MB!`);
+          return false;
+        }
+      }
 
+      //this.$modal.loading("正在上传文件,请稍候...");
+      return true;
     },
     // 文件上传中处理
     handleFileUploadProgress(event, file, fileList) {

+ 31 - 7
src/views/deploy/upgradeStatus/hostUpgrade.vue

@@ -31,6 +31,11 @@
             >重置
             </el-button>
           </el-col>
+          <el-col :span="1.5">
+            <el-button icon="el-icon-upload2" size="mini" type="primary" @click="confirmExport"
+            >导出
+            </el-button>
+          </el-col>
           <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
         </el-row>
       </div>
@@ -46,7 +51,7 @@
           </template>
         </el-table-column>
         <el-table-column align="center" label="批次号" prop="batchCode" :show-overflow-tooltip="true" scoped-slot="batchCode"/>
-        <el-table-column align="center" label="所属机构" prop="orgName"/>
+        <el-table-column align="center" label="所属机构" prop="orgName" :show-overflow-tooltip="true" scoped-slot="orgName" width="320"/>
         <el-table-column align="center" label="版本号" prop="zipVersion"/>
         <el-table-column align="center" label="状态" prop="status">
           <template v-slot:default="scope">
@@ -58,8 +63,8 @@
         </el-table-column>
         <el-table-column align="center" label="主机名称" prop="hostName"/>
         <el-table-column align="center" label="主机IP" prop="hostIp" :show-overflow-tooltip="true" scoped-slot="hostIp"/>
-        <el-table-column align="center" label="创建时间" prop="createTime"/>
-        <el-table-column align="center" label="结束时间" prop="finishTime"/>
+        <el-table-column align="center" label="创建时间" prop="createTime" :show-overflow-tooltip="true" scoped-slot="createTime"/>
+        <el-table-column align="center" label="结束时间" prop="finishTime" :show-overflow-tooltip="true" scoped-slot="finishTime"/>
         <el-table-column
           class-name="small-padding fixed-width"
           label="操作"
@@ -108,10 +113,10 @@
           <el-table-column align="center" label="进度描述" prop="deployDescription"/>
           <el-table-column align="center" label="状态" prop="taskStatus">
             <template v-slot:default="scope">
-              <span v-if="scope.row.status === 0" style="color: #000000">进行中</span>
-              <span v-else-if="scope.row.status === 1" style="color: #00B83F">成功</span>
-              <span v-else-if="scope.row.status === 2" style="color: red">失败</span>
-              <span v-else-if="scope.row.status === 3" style="color: #f0ad4e">重试中</span>
+              <span v-if="scope.row.taskStatus === 0" style="color: #000000">进行中</span>
+              <span v-else-if="scope.row.taskStatus === 1" style="color: #00B83F">成功</span>
+              <span v-else-if="scope.row.taskStatus === 2" style="color: red">失败</span>
+              <span v-else-if="scope.row.taskStatus === 3" style="color: #f0ad4e">重试中</span>
             </template>
           </el-table-column>
         </el-table>
@@ -127,6 +132,7 @@ import {
 } from "@/api/deploy/upgradeStatus";
 import DataRangePicker from "@/components/dateTime/daterange.picker.vue";
 import dayjs from "dayjs";
+import {deleteBeringPackage} from "@/api/deploy/bering";
 
 export default {
   name: "UpgradeStatus",
@@ -217,6 +223,24 @@ export default {
     onHide() {
       this.open = false;
     },
+    confirmExport(){
+      this.$modal
+        .confirm("导出符合当前查询条件的信息记录,确定执行?")
+        .then(function () {
+        })
+        .then(() => {
+          this.handleExportUpgradeInfo();
+        });
+    },
+    handleExportUpgradeInfo() {
+      this.download(
+        "/api/deploy/appUpgrade/detailExport",
+        {
+          ...this.queryParams,
+        },
+        `升级主机详情_${new Date().getTime()}.xls`
+      );
+    },
   }
 };
 </script>

+ 1 - 1
src/views/deploy/upgradeStatus/index.vue

@@ -172,7 +172,7 @@ export default {
       console.log("123456")
       if (this.dateRange && this.dateRange.length > 0){
         this.queryParams.startDate = dayjs(this.dateRange[0]).format('YYYY-MM-DD HH:mm:ss');
-        this.queryParams.endDate = dayjs(this.dateRange[1]).format('YYYY-MM-DD HH:mm:ss');
+        this.queryParams.endDate = dayjs(this.dateRange[1]).endOf('d').format('YYYY-MM-DD HH:mm:ss');
       }else {
         this.queryParams.startDate = null;
         this.queryParams.endDate = null;