Bläddra i källkod

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

yejian016332 3 år sedan
förälder
incheckning
facc3782b6
1 ändrade filer med 54 tillägg och 21 borttagningar
  1. 54 21
      imcs-ui/src/views/zuihou/developer/warnLong/Index.vue

+ 54 - 21
imcs-ui/src/views/zuihou/developer/warnLong/Index.vue

@@ -77,35 +77,41 @@
       </el-table-column>
       <!-- CheckBox -->
       <el-table-column align="center" type="selection" width="50" :reserve-selection="true" />
-      <!-- 编 -->
-      <el-table-column prop="no" :label='$t("developer.table.warnLong.no")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 编 -->
+      <el-table-column prop="nodeNo" :label='$t("developer.table.warnLong.no")' :show-overflow-tooltip="true" width="180"></el-table-column>
       <!-- 设备 -->
-      <el-table-column prop="name" :label='$t("developer.table.warnLong.name")' width="180px"></el-table-column>
+      <el-table-column prop="resourceName" :label='$t("developer.table.warnLong.name")' width="100"></el-table-column>
       <!-- 报警内容 -->
-      <el-table-column prop="shelvesDesc" :label='$t("developer.table.warnLong.storgeId")' width="180px"></el-table-column>
+      <el-table-column prop="shelvesDesc" :label='$t("developer.table.warnLong.storgeId")' width="180px">
+	      <template slot-scope="{ row }">
+			<span> {{row.resourceName}}-{{row.procedureName}}-{{row.instructionName}}-</span>
+			<span v-if="row.feedback">{{row.feedback}}</span>
+			<span else="">任务超时</span>
+		  </template>
+	  </el-table-column>
       <!-- 报警时间 -->
-      <el-table-column prop="updateTime" :label='$t("developer.table.warnLong.updateTime")' width="180px"></el-table-column>
+      <el-table-column prop="createTime" :label='$t("developer.table.warnLong.updateTime")' width="180px"></el-table-column>
       <!-- 是否需要人员处理 -->
       <el-table-column prop="num" :label='$t("developer.table.warnLong.num")' align="center" width="150px">
       	<template slot-scope="{ row }">
-      		<el-tag v-if="row.num == '1'" type="success">{{$t("common.yes")}}</el-tag>
+      		<el-tag v-if="row.feedback" type="success">{{$t("common.yes")}}</el-tag>
 	      	<el-tag v-else type="">{{$t("common.no")}}</el-tag>
-				</template>
+		</template>
       </el-table-column>
       <!-- 处理状态 -->
       <el-table-column prop="optType" :label='$t("developer.table.warnLong.goodsType")' align="center" width="120px">
       	<template slot-scope="{ row }">
-      		<el-tag v-if="row.optType == '1'" type="success">{{$t("developer.common.status.start")}}</el-tag>
-	      	<el-tag v-if="row.optType == '2'" type="success">{{$t("developer.common.status.end")}}</el-tag>
-					<el-tag v-if="row.optType == '3'" type="success">{{$t("developer.common.status.start")}}</el-tag>
-					<el-tag v-if="row.optType == '4'" type="">{{$t("developer.common.status.end")}}</el-tag>
-					<el-tag v-if="row.optType == '5'" type="">{{$t("developer.common.status.start")}}</el-tag>
-					<el-tag v-if="row.optType == '6'" type="">{{$t("developer.common.status.end")}}</el-tag>
-					<el-tag v-if="row.optType == '7'" type="">{{$t("developer.common.status.start")}}</el-tag>
-				</template>
+      		    <el-tag v-if="row.status == '0'" type="success">{{$t("developer.common.status.start")}}</el-tag>
+	      	    <el-tag v-if="row.status == '1'" type="success">{{$t("developer.common.status.end")}}</el-tag>
+					
+		</template>
       </el-table-column>
-      <!-- 报警时间 -->
-      <el-table-column prop="updateTime" :label='$t("developer.table.warnLong.chuliTime")' width="180px"></el-table-column>
+      <!-- 处理时间 -->
+      <el-table-column prop="updateTime" :label='$t("developer.table.warnLong.chuliTime")' width="180px">
+	     <template slot-scope="{ row }">
+	         <span v-if="row.status == '1'">{{row.updateTime}}</span>
+	     </template>
+	  </el-table-column>        
     </el-table>
     <pagination
       v-show="tableData.total > 0"
@@ -147,7 +153,8 @@
 	import TenantEdit from "./components/Edit"
 	import TenantView from "./components/View"
 	// 【锁定记录、出入库记录】-API
-	import lockingRecordApi from "@/api/lineSideLibrary/lockingRecord"
+	//import lockingRecordApi from "@/api/lineSideLibrary/lockingRecord"
+	import warnLogApi from "@/api/lineSideLibrary/warnLog"
 	import elDragDialog from '@/directive/el-drag-dialog'
 	import { downloadFile, initEnums, initDicts, initQueryParams } from '@/utils/commons'
 	import axios from 'axios'
@@ -292,8 +299,34 @@
 	    clearSelections () {
 	      this.$refs.table.clearSelection()
 	    },
+		marking(){
+		   if (!this.selection.length) {
+	        this.$message({
+	          message: this.$t("tips.noDataSelected"),
+	          type: "warning"
+	        })
+	        return false
+	      }
+		    const ids = []
+		    this.selection.forEach(item => {
+		        ids.push(item.id)
+		    })
+		    this.updateStatus(ids)	      		
+		},
+		updateStatus(ids){		   
+		   warnLogApi.updateStatus({ids: ids}).then(response => {
+			const res = response.data
+			if (res.isSuccess) {
+				this.$message({
+					message: '标注成功',
+					type: "success"
+				})
+				this.search()
+			}
+         })
+		},
 	    delete (ids) {
-	      lockingRecordApi.remove({ ids: ids }).then(response => {
+	      warnLogApi.remove({ ids: ids }).then(response => {
 	        const res = response.data
 	        if (res.isSuccess) {
 	          this.$message({
@@ -344,8 +377,8 @@
 	      this.queryParams.current = params.current ? params.current : this.queryParams.current
 	      this.queryParams.size = params.size ? params.size : this.queryParams.size
 	      // 固定参数:dataStatus = 1-入库/出库,2-解锁/锁定
-	      this.queryParams.model.dataStatus = '1'
-	      lockingRecordApi.page(this.queryParams).then(response => {
+	      //this.queryParams.model.dataStatus = '1'
+	      warnLogApi.page(this.queryParams).then(response => {
 	        const res = response.data
 	        if (res.isSuccess) {
 	          this.tableData = res.data