ソースを参照

Merge remote-tracking branch 'origin/master' into master

yejian 3 年 前
コミット
def9b91b38

+ 20 - 0
imcs-ui/src/api/lineSideLibrary/warnLog.js

@@ -45,6 +45,14 @@ const apiList = {
   import: {
     method: 'POST',
     url: `/authority/warnLog/import`
+  },
+  resend: {
+    method: 'POST',
+    url: `/authority/dispatchException/resend`
+  },
+  complete: {
+    method: 'POST',
+    url: `/authority/dispatchException/complete`
   }
 }
 
@@ -128,5 +136,17 @@ export default {
       ...apiList.import,
       data
     })
+  },
+  resend (data) {
+    return axiosApi({
+      ...apiList.resend,
+      data
+    })
+  },
+  complete (data) {
+    return axiosApi({
+      ...apiList.complete,
+      data
+    })
   }
 }

+ 1 - 1
imcs-ui/src/lang/zh/dispatch.js

@@ -19,7 +19,7 @@ export default {
                 status: '启用状态',
                 createTime: '创建时间',
                 updateTime: '修改时间',
-                distributeTime: '下发时间'
+                distributeTime: '下发时间',                
             },
             exception: {
                 operationTime: '操作时间',

+ 1 - 1
imcs-ui/src/layout/index.vue

@@ -84,7 +84,7 @@ export default {
               let datas = data.data.warnMap.warnData.records              
               datas.forEach((data)=>{
                   let msg = data.feedback ? data.feedback : " 响应超时 ";
-                  let content = "<a href='#/developer/warnLong'>"+(data.resourceName? "["+ data.resourceName +"] " : "" )+(data.procedureName? data.procedureName : "")
+                  let content = "<a href='#/dispatchMgr/exception'>"+(data.resourceName? "["+ data.resourceName +"] " : "" )+(data.procedureName? data.procedureName : "")
                    + (data.instructionName? "("+data.instructionName+")" : "") + msg+"</a>";                  
                   this.$notification.error(content, { messageIsHTML: true, timer:60, title:"异常警报", showCloseIcn:true });
               })

+ 4 - 4
imcs-ui/src/views/zuihou/dispatchMgr/dispatchRecord/Index.vue

@@ -72,7 +72,7 @@
       </el-table-column>
       <!-- 指令内容 -->
       <el-table-column
-        prop="name"
+        prop="instructionName"
         :label="$t('dispatch.table.record.name')"
         :show-overflow-tooltip="true"
         align="center"
@@ -80,7 +80,7 @@
 
       <!-- 下发时间 -->
       <el-table-column
-        prop="distributeTime"
+        prop="executeTime"
         :label="$t('dispatch.table.record.distributeTime')"
         width="200px"
       ></el-table-column>
@@ -171,8 +171,8 @@ export default {
     fetch(params = {}) {
       this.loading = true;
       if (this.queryParams.timeRange) {
-        this.queryParams.model.distributeTime_st = this.queryParams.timeRange[0];
-        this.queryParams.model.distributeTime_ed = this.queryParams.timeRange[1];
+        this.queryParams.model.executeTime_st = this.queryParams.timeRange[0];
+        this.queryParams.model.executeTime_ed = this.queryParams.timeRange[1];
       }
 
       this.queryParams.current = params.current

+ 34 - 12
imcs-ui/src/views/zuihou/dispatchMgr/exception/Index.vue

@@ -72,14 +72,14 @@
 
       <!-- 执行时间 -->
       <el-table-column
-        prop="operationTime"
+        prop="executeTime"
         :label="$t('dispatch.table.exception.operationTime')"
         width="150px"
       ></el-table-column>
 
        <!-- 设备 -->
       <el-table-column
-        prop="device"
+        prop="resourceName"
         :label="$t('dispatch.table.exception.device')"
         :show-overflow-tooltip="true"
         align="center"
@@ -87,7 +87,7 @@
 
       <!-- 指令内容 -->
       <el-table-column
-        prop="name"
+        prop="instructionName"
         :label="$t('dispatch.table.exception.name')"
         :show-overflow-tooltip="true"
         align="center"
@@ -96,14 +96,14 @@
 
        <!-- 状态 -->
       <el-table-column
-        prop="status"
+        prop="exeResult"
         :label="$t('dispatch.table.exception.status.normal')"
         width="100px"
         align="center"
       >
         <template slot-scope="{ row }">
-          <el-tag :type="row.status=='1' ? 'success' : 'danger'">
-          	{{ row.status=='1' ? $t('dispatch.table.exception.status.running') : (row.status=='2') ? $t("dispatch.table.exception.status.runFail") : $t('dispatch.table.exception.status.sendFail') }}
+          <el-tag :type="row.exeResult=='1' ? 'success' : 'danger'">
+          	{{ row.exeResult=='1' ? $t('dispatch.table.exception.status.running') : $t("dispatch.table.exception.status.runFail") }}
           </el-tag>
         </template>
       </el-table-column>
@@ -113,10 +113,10 @@
         :label="$t('dispatch.table.exception.operation')"
         width="300px"  align="center">
         <template slot-scope="{ row }">
-          <el-button plain type="primary" size="medium" @click="resend">
+          <el-button plain type="primary" size="medium" @click.native="resend(row)">
 	        {{ $t("dispatch.button.resend") }}
 	       </el-button>
-	        <el-button plain type="primary" size="medium" @click="marked">
+	        <el-button plain type="primary" size="medium" @click.native="marked(row)">
 	          {{ $t("dispatch.button.marked") }}
 	        </el-button>
         </template>
@@ -149,10 +149,12 @@
 <script>
 import Pagination from "@/components/Pagination";
 import dispatchMgrApi from "@/api/Dispatch";
+import qs from "qs";
 
 import elDragDialog from "@/directive/el-drag-dialog";
 import { initDicts, initQueryParams } from "@/utils/commons";
 import { convertEnum } from "@/utils/utils";
+import warnLogApi from "@/api/lineSideLibrary/warnLog"
 export default {
   name: "dispatchExceptionMgr",
   directives: { elDragDialog },
@@ -206,11 +208,31 @@ export default {
       this.$refs.table.clearFilter();
       this.search();
     },
-    resend(){
-
+    resend(row){
+      warnLogApi.resend({id: row.id}).then(response => {
+			const res = response.data
+			if (res.isSuccess) {
+				this.$message({
+					message: '重发成功',
+					type: "success"
+				})
+				this.fetch()
+			}
+     })
     },
-    marked(){
-
+    marked(row){
+      console.log(row);
+      console.log(row.id);
+     warnLogApi.complete({id: row.id}).then(response => {
+			const res = response.data
+			if (res.isSuccess) {
+				this.$message({
+					message: '标注成功',
+					type: "success"
+				})
+				this.fetch()
+			}
+     })
     },
     fetch(params = {}) {
       this.loading = true;