瀏覽代碼

Merge branch 'dev' into 'purchaseDev'

Dev

See merge request new-business/drp-web!242
黄梓星 1 年之前
父節點
當前提交
1c9e8786d5

+ 10 - 0
src/api/monitor/service.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+//查询服务列表
+export function listService(query) {
+    return request({
+      url: 'serviceScan/list',
+      method: 'get',
+      params: query
+    })
+  }

+ 266 - 83
src/views/material/basicFile/details.vue

@@ -494,8 +494,9 @@
       :close-on-press-escape="false"
       :close-on-click-modal="false"
       class="otherDialog"
+     
     >
-      <div v-loading="otherDeatils.loading">
+      <div  v-loading="otherDeatils.loading">
         <!-- 其他标签页操作  修改、删除 -->
         <el-row :gutter="10" class="mb10">
           <el-col :span="1.5" v-if="!otherDeatils.isEdit">
@@ -1190,7 +1191,6 @@
         console.log(type, id, '查询其他标签页列表详情');
         this.otherDeatils.form = this.mainMsg.form;
         console.log(this.otherDeatils.form, 'this.otherDeatils.form');
-        this.otherDeatils.loading = true;
         switch (type) {
           // 财物信息
           case 'material_finance':
@@ -1221,82 +1221,146 @@
         }
       },
       // 查询财务信息详情
-      getFinanceDetails(id) {
-        materialApi.financeDetails(id).then(res => {
-          this.otherDeatils.loading = false;
-          let _this = this;
-          console.log('查询财务信息详情', res);
-          if (res.code == 200) {
-            this.otherDeatils.value = res.data.data;
-            // _this.handleAddReferLabel('otherDeatils');
+      async getFinanceDetails(id) {
+        
+        try {
+
+          this.otherDeatils.loading = true;
+
+          let {code,data} = await materialApi.financeDetails(id);
+
+            if (code == 200) {
+
+            this.otherDeatils.value = data.data;
+
           }
-        })
+
+        } catch (error) {}
+        finally{
+          setTimeout(()=>{
+
+            this.otherDeatils.loading = false;
+          },200)
+        }
       },
       // 获取利润中心详情
-      getCenterDetails(id) {
-        let _this = this;
-        materialApi.centerDetails(id).then(res => {
-          this.otherDeatils.loading = false;
-          console.log(res, '获取利润中心详情');
-          if (res.code == 200) {
-            this.otherDeatils.value = res.data.data;
-            // _this.handleAddReferLabel('otherDeatils');
+      async getCenterDetails(id) {
+        try {
+
+          this.otherDeatils.loading = true;
+
+          let {code,data} = await materialApi.centerDetails(id);
+
+            if (code == 200) {
+
+            this.otherDeatils.value = data.data;
+
           }
-        })
+
+        } catch (error) {}
+        finally{
+          setTimeout(()=>{
+
+            this.otherDeatils.loading = false;
+          },200)
+        }
       },
       // 获取采购详细信息详情
-      getPurchaseDetails(id) {
-        let _this = this;
-        materialApi.purchaseDetails(id).then(res => {
-          this.otherDeatils.loading = false;
-          console.log(res, '获取采购详细信息详情');
-          if (res.code == 200) {
-            this.otherDeatils.value = res.data.data;
-            // _this.handleAddReferLabel('otherDeatils');
+      async getPurchaseDetails(id) {
+       
+        try {
+
+          this.otherDeatils.loading = true;
+
+          let {code,data} = await materialApi.purchaseDetails(id);
+
+            if (code == 200) {
+
+            this.otherDeatils.value = data.data;
+
           }
-        })
+
+        } catch (error) {}
+        finally{
+          setTimeout(()=>{
+
+            this.otherDeatils.loading = false;
+          },200)
+        }
       },
       // 获取成本信息详情
-      getCostDetails(id) {
-        let _this = this;
-        materialApi.costDetails(id).then(res => {
-          this.otherDeatils.loading = false;
-          console.log(res, '获取成本信息详情');
-          if (res.code == 200) {
-            this.otherDeatils.value = res.data.data;
-            // _this.handleAddReferLabel('otherDeatils');
+      async getCostDetails(id) {
+        try {
+
+          this.otherDeatils.loading = true;
+
+          let {code,data} = await materialApi.costDetails(id);
+
+            if (code == 200) {
+
+            this.otherDeatils.value = data.data;
+
           }
-        })
+
+        } catch (error) {}
+        finally{
+        setTimeout(()=>{
+
+          this.otherDeatils.loading = false;
+        },200)
+        }
       },
       // 获取计划信息详情
-      getPlanDetails(id) {
-        let _this = this;
-        materialApi.planDetails(id).then(res => {
-          this.otherDeatils.loading = false;
-          console.log(res, '获取计划信息详情');
-          if (res.code == 200) {
-            this.otherDeatils.value = res.data.data;
-            // _this.handleAddReferLabel('otherDeatils');
+      async getPlanDetails(id) {
+
+        try {
+
+          this.otherDeatils.loading = true;
+
+          let {code,data} = await materialApi.planDetails(id);
+
+            if (code == 200) {
+
+            this.otherDeatils.value = data.data;
+
           }
-        })
-      },
-      // 获取库存详细信息详情
-      getInventoryDetails(id) {
-        let _this = this;
-        materialApi.inventoryDetails(id).then(res => {
+
+        } catch (error) {}
+        finally{
+          setTimeout(()=>{
+
           this.otherDeatils.loading = false;
-          console.log(res, '获取库存详细信息详情');
-          if (res.code == 200) {
-            this.otherDeatils.value = res.data.data;
-            // _this.handleAddReferLabel('otherDeatils');
+        },200)
+        }
+
+      },
+      //  
+      async getInventoryDetails(id) {
+        try {
+
+          this.otherDeatils.loading = true;
+
+          let {code,data} = await materialApi.inventoryDetails(id);
+
+            if (code == 200) {
+
+            this.otherDeatils.value = data.data;
+
           }
-        })
+
+        } catch (error) {}
+        finally{
+          setTimeout(()=>{
+
+          this.otherDeatils.loading = false;
+          },200)
+        }
       },
 
 
       /* 二级标签页 */
       // 根据物料id获取医药行业信息详细信息
-      getMedcineDetails(id) {
+      async getMedcineDetails(id) {
         let _this = this;
         console.log(id);
         materialApi.medcineDetailsInfo(id).then((res) => {
@@ -1409,7 +1473,7 @@
       },
       // 除基本信息之后的修改
       handleOtherEdit(type) {
-        debugger
+        // debugger
         console.log('除基本信息之后的修改', type);
         if ('table' === type) {
           if (this.mainMsg.checkedList.length == 1) {
@@ -2088,64 +2152,183 @@
         })
       },
       // 保存财务信息——单个数据
-      handleSaveFinance(data) {
+      async handleSaveFinance(data) {
+
         console.log(data, '保存财务信息——单个数据');
-        materialApi.financeEdit(data).then(res => {
-          if (res.code == 200) {
+        try {
+
+          this.otherDeatils.loading = true;
+
+          let {code,msg} = await materialApi.financeEdit(data);
+
+          if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
+            this.$message({
+              message: msg,
+              type: 'success'
+            });
           }
-        })
+        } catch (error) {
+        }finally{
+          this.otherDeatils.loading = false;
+        }
+
+
+        // this.otherDeatils.loading = true;
+        // materialApi.financeEdit(data).then(res => {
+        //   if (res.code == 200) {
+        //     this.otherDeatils.isEdit = false;
+        //     this.handleOtherRefresh();
+        //   }
+        //   this.otherDeatils.loading = false;
+        // })
       },
       // 保存利润中心信息
-      handleSaveCenter(data) {
+      async handleSaveCenter(data) {
         console.log(data, '保存利润中心信息');
-        materialApi.centerEdit(data).then(res => {
-          if (res.code == 200) {
+        try {
+          
+          this.otherDeatils.loading = true;
+          
+          let {code,msg} = await materialApi.centerEdit(data);
+
+          if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
+            this.$message({
+              message: msg,
+              type: 'success'
+            });
           }
-        })
+
+        } catch (error) {}
+        finally{
+          this.otherDeatils.loading = false;
+        }
+        // materialApi.centerEdit(data).then(res => {
+        //   if (res.code == 200) {
+        //     this.otherDeatils.isEdit = false;
+        //     this.handleOtherRefresh();
+        //   }
+        // })
       },
       // 保存采购信息
-      handleSavePurchase(data) {
+      async handleSavePurchase(data) {
         console.log(data, '保存采购信息');
-        materialApi.purchaseEdit(data).then(res => {
-          if (res.code == 200) {
+        try {
+          
+          this.otherDeatils.loading = true;
+          
+          let {code,msg} = await materialApi.purchaseEdit(data);
+
+          if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
+            this.$message({
+              message: msg,
+              type: 'success'
+            });
           }
-        })
+
+        } catch (error) {}
+        finally{
+          this.otherDeatils.loading = false;
+        }
+        // materialApi.purchaseEdit(data).then(res => {
+        //   if (res.code == 200) {
+        //     this.otherDeatils.isEdit = false;
+        //     this.handleOtherRefresh();
+        //   }
+        // })
       },
       // 保存库存信息
-      handleSaveInventoryEdit(data) {
+      async handleSaveInventoryEdit(data) {
         console.log(data, '保存库存信息');
-        materialApi.inventoryEdit(data).then(res => {
-          if (res.code == 200) {
+        try {
+          
+          this.otherDeatils.loading = true;
+          
+          let {code,msg} = await materialApi.inventoryEdit(data);
+
+          if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
+            this.$message({
+              message: msg,
+              type: 'success'
+            });
           }
-        })
+
+        } catch (error) {}
+        finally{
+          this.otherDeatils.loading = false;
+        }
+       
+        // materialApi.inventoryEdit(data).then(res => {
+        //   if (res.code == 200) {
+        //     this.otherDeatils.isEdit = false;
+        //     this.handleOtherRefresh();
+        //   }
+        // })
       },
       // 保存计划信息
-      handleSavePlan(data) {
+      async handleSavePlan(data) {
         console.log(data, '保存计划信息');
-        materialApi.planEdit(data).then(res => {
-          if (res.code == 200) {
+        try {
+          
+          this.otherDeatils.loading = true;
+          
+          let {code,msg} = await materialApi.planEdit(data);
+
+          if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
+            this.$message({
+              message: msg,
+              type: 'success'
+            });
           }
-        })
+
+        } catch (error) {}
+        finally{
+          this.otherDeatils.loading = false;
+        }
+        // materialApi.planEdit(data).then(res => {
+        //   if (res.code == 200) {
+        //     this.otherDeatils.isEdit = false;
+        //     this.handleOtherRefresh();
+        //   }
+        // })
       },
       // 保存成本信息
-      handleSaveCost(data) {
+      async handleSaveCost(data) {
         console.log(data, '保存成本信息');
-        materialApi.costEdit(data).then(res => {
-          if (res.code == 200) {
+        try {
+          
+          this.otherDeatils.loading = true;
+          
+          let {code,msg} = await materialApi.costEdit(data);
+
+          if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
+            this.$message({
+              message: msg,
+              type: 'success'
+            });
           }
-        })
+
+        } catch (error) {}
+        finally{
+          this.otherDeatils.loading = false;
+        }
+        // materialApi.costEdit(data).then(res => {
+        //   if (res.code == 200) {
+        //     this.otherDeatils.isEdit = false;
+        //     this.handleOtherRefresh();
+        //   }
+        // })
       },
 
       judgeIsRequriedByProps(message){

+ 0 - 31
src/views/monitor/job/index.vue

@@ -29,34 +29,6 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="任务员工" prop="empno">
-        <el-input
-          v-model="queryParams.empno"
-          placeholder="请输入员工工号"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="任务大类" prop="jobType">
-        <el-select v-model="queryParams.status" placeholder="请选择任务大类" clearable>
-          <el-option
-            v-for="dict in dict.type.sys_job_type"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
-      <el-form-item label="任务小类" prop="jobTypeS">
-        <el-select v-model="queryParams.status" placeholder="请选择任务小类" clearable>
-          <el-option
-            v-for="dict in dict.type.sys_job_types"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -134,7 +106,6 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="任务编号" width="100" align="center" prop="jobId" />
       <el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" />
-      <el-table-column label="员工工号" align="center" prop="empno" :show-overflow-tooltip="true" />
       <el-table-column label="任务组名" align="center" prop="jobGroup">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.sys_job_group" :value="scope.row.jobGroup"/>
@@ -536,7 +507,6 @@ export default {
         this.total = response.total;
         this.loading = false;
       });
-      console.log(this.queryParams,'this.queryParams')
     },
     // 任务组名字典翻译
     jobGroupFormat(row, column) {
@@ -552,7 +522,6 @@ export default {
       this.form = {
         jobId: undefined,
         jobName: undefined,
-        empno:undefined,
         jobGroup: undefined,
         invokeTarget: undefined,
         cronExpression: undefined,

+ 70 - 27
src/views/monitor/job/log.vue

@@ -58,6 +58,43 @@
           end-placeholder="结束日期"
         ></el-date-picker>
       </el-form-item>
+      <el-form-item label="是否完成" prop="whetherComplete">
+        <el-select v-model="queryParams.whetherComplete" placeholder="请选择任务是否完成" clearable>
+          <el-option
+            v-for="dict in dict.type.sys_job_complete"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="任务员工" prop="empno">
+        <el-input
+          v-model="queryParams.empno"
+          placeholder="请输入员工工号"
+          clearable
+        />
+      </el-form-item>
+      <el-form-item label="任务大类" prop="jobType">
+        <el-select v-model="queryParams.jobType" placeholder="请选择任务大类" clearable>
+          <el-option
+            v-for="dict in dict.type.sys_oa"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="任务小类" prop="jobTypeS">
+        <el-select v-model="queryParams.jobTypeS" placeholder="请选择任务小类" clearable>
+          <el-option
+            v-for="dict in dict.type.sys_oa_s"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
       <el-form-item>
         <el-button
           type="primary"
@@ -131,6 +168,31 @@
     >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="编号" width="80" align="center" prop="jobLogId" />
+      <el-table-column label="任务执行状态" align="center" prop="status">
+        <template slot-scope="scope">
+          <dict-tag
+            :options="dict.type.sys_common_status"
+            :value="scope.row.status"
+          />
+        </template>
+      </el-table-column>
+      <!--      <el-table-column label="执行时间" align="center" prop="createTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.createTime) }}</span>
+        </template>
+      </el-table-column>-->
+      <el-table-column
+        label="完成时长"
+        width="180"
+        align="center"
+        prop="tqaaaa"
+      />
+      <el-table-column
+        label="超时时长"
+        width="180"
+        align="center"
+        prop="tqbbbb"
+      />
       <el-table-column
         label="任务名称"
         width="180"
@@ -180,28 +242,17 @@
         align="center"
         prop="executionTime"
       />
-      <el-table-column
-        label="完成时长"
-        width="180"
-        align="center"
-        prop="tqaaaa"
-      />
+
       <el-table-column
         label="预计时长"
         width="80"
         align="center"
         prop="durations"
       />
-      <el-table-column
-        label="超时时长"
-        width="180"
-        align="center"
-        prop="tqbbbb"
-      />
 
       <el-table-column
         label="oa执行状态"
-        width="80"
+        width="90"
         align="center"
         prop="completionStatus"
       >
@@ -233,19 +284,6 @@
         prop="jobMessage"
         :show-overflow-tooltip="true"
       />
-      <el-table-column label="任务执行状态" align="center" prop="status">
-        <template slot-scope="scope">
-          <dict-tag
-            :options="dict.type.sys_common_status"
-            :value="scope.row.status"
-          />
-        </template>
-      </el-table-column>
-      <!--      <el-table-column label="执行时间" align="center" prop="createTime" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createTime) }}</span>
-        </template>
-      </el-table-column>-->
 
       <el-table-column
         label="操作"
@@ -329,7 +367,7 @@ import { listJobLog, delJobLog, cleanJobLog } from "@/api/monitor/jobLog";
 
 export default {
   name: "JobLog",
-  dicts: ["sys_common_status", "sys_job_group","sys_oa_back_state"],
+  dicts: ["sys_job_complete", "sys_oa", "sys_oa_s", "sys_common_status", "sys_job_group","sys_oa_back_state"],
   data() {
     return {
       // 遮罩层
@@ -357,6 +395,10 @@ export default {
         jobName: undefined,
         jobGroup: undefined,
         status: undefined,
+        jobType: undefined,
+        jobTypeS: undefined,
+        empno:undefined,
+        whetherComplete:undefined
       },
     };
   },
@@ -385,6 +427,7 @@ export default {
       this.loading = true;
       listJobLog(this.addDateRange(this.queryParams, this.dateRange)).then(
         (response) => {
+          // console.log(response, 'response')
           this.jobLogList = response.rows.map((item) => {
             const { executionTime, createTime, duration } = item;
 

+ 113 - 0
src/views/monitor/service/index.vue

@@ -0,0 +1,113 @@
+<template>
+    <div class="app-container">
+        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+            <el-form-item label="任务名称" prop="taskName">
+                <el-input 
+                    v-model="queryParams.taskName"
+                    placeholder="请输入任务名称"
+                    clearable
+                    @keyup.enter.native="handleQuery"
+                />
+            </el-form-item>
+
+            <el-form-item label="来源系统" prop="baseId">
+                <el-input 
+                    v-model="queryParams.baseId"
+                    placeholder="请输入来源系统名称"
+                    clearable
+                    @keyup.enter.native="handleQuery"
+                />
+            </el-form-item>
+
+            <el-form-item>
+                <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+                <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+            </el-form-item>
+            
+        </el-form>
+
+        <el-table v-loading="loading" :data="serviceList">
+            <el-table-column label="任务名称" min-width="120" align="center" prop="taskName" />
+            <el-table-column label="任务路径" min-width="120" align="center" prop="taskUrl" :show-overflow-tooltip="true"/>
+            <el-table-column label="来源系统" min-width="80" align="center" prop="baseId" />
+            <el-table-column label="任务信息" min-width="120" align="center" prop="taskMessage" :show-overflow-tooltip="true"/>
+            <el-table-column label="任务时间" min-width="60" align="center" prop="taskTime" :show-overflow-tooltip="true" :formatter="rounding"/>
+            <el-table-column label="任务返回信息" min-width="150" align="center" prop="taskResult" :show-overflow-tooltip="true"/>
+            <el-table-column label="异常信息" min-width="120" align="center" prop="taskAlarmSend" :show-overflow-tooltip="true"/>
+            <el-table-column label="请求超时时间" align="center" prop="timeOutSecs" :show-overflow-tooltip="true"/>
+            <el-table-column label="创建时间" min-width="120" align="center" prop="insertDate" :show-overflow-tooltip="true"/>
+            <el-table-column label="修改时间" min-width="120" align="center" prop="modifyDate" :show-overflow-tooltip="true"/>
+        </el-table>
+
+        <pagination
+        v-show="total>0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+        />
+    </div>
+</template>
+
+<script>
+import { listService } from "@/api/monitor/service";
+
+export default {
+    data() {
+        return {
+            //遮罩层
+            loading: true,
+            //服务数据表
+            serviceList: [],
+            //显示搜索条件
+            showSearch: true,
+            //总条数
+            total: 0,
+            //查询参数
+            queryParams: {
+                pageNum: 1,
+                pageSize: 10,
+                taskName: undefined,
+                baseId: undefined
+            }
+        }
+    },
+    updated() {},
+    mounted() {
+
+    },
+    created() {
+        this.getList()
+    },
+    methods: {
+        //保留两位小数点
+        rounding(row,column) {
+            return parseFloat(row[column.property]).toFixed(2);
+        },
+        //获取数据列表
+        getList(){
+            this.loading = true;
+            listService(this.queryParams).then(response => {
+                // console.log(response,'response')
+                this.serviceList = response.rows;
+                this.total = response.total;
+                this.loading = false;
+            });
+        },
+        //查询
+        handleQuery(){
+            this.queryParams.pageNum = 1;
+            this.getList();
+        },
+        //重置
+        resetQuery(){
+            this.resetForm("queryForm");
+            this.handleQuery();
+        }
+    }
+}
+</script>
+
+<style>
+
+</style>