姚云青 3 vuotta sitten
vanhempi
commit
5b9089923c

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

@@ -317,7 +317,7 @@ export default {
 			aotoProcess: {
 				prority: '权重',
 				resourceName: '设备',
-				code: '动作包指令(报文)',
+        nodeName: '节点名称',
 				instructionName: '执行动作',
 				remark: '操作说明',
 				exeStatus: '执行状态', //(1-待执行2-进行中3-已完成)

+ 270 - 270
imcs-ui/src/views/zuihou/runManageCenter/productionScheduling/components/ViewNode.vue

@@ -1,270 +1,270 @@
-<template>
-  <el-dialog
-    :title="$t(&quot;common.view&quot;)"
-    width="80%"
-    :append-to-body="true"
-    :visible.sync="isVisible"
-    class="tenant-view"
-  >
-    <div class="boxDiv">
-    	<!-- 任务信息 -->
-    	<el-row>
-    		<p class="titleP" style="margin-top: 0;">{{$t("runCenter.form.viewSched.name")+":"}}</p>
-    		<table class="comtable" border="0" cellspacing="0" cellpadding="6">
-    			<tr>
-    				<td class="blodTd" align="center" width="120">{{$t("runCenter.form.viewSched.procedureDesc")+":"}}</td>
-    				<td width="200">{{tenant.procedureDesc}}</td>
-    				<td class="blodTd" align="center" width="120">{{$t("runCenter.form.viewSched.content")+":"}}</td>
-    				<td width="300">{{tenant.content}}</td>
-    				<td class="blodTd" align="center" width="120">{{$t("runCenter.form.viewSched.status")+":"}}</td>
-    				<td width="200">
-		          <el-tag v-if="tenant.status == '1'" type="info">{{$t("runCenter.common.schedulStatus.noStart")}}</el-tag>
-							<el-tag v-if="tenant.status == '2'" type="">{{$t("runCenter.common.schedulStatus.run")}}</el-tag>
-							<el-tag v-if="tenant.status == '3'" type="success">{{$t("runCenter.common.schedulStatus.finished")}}</el-tag>
-    				</td>
-    			</tr>
-    			<tr>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.procedureNo")+":"}}</td>
-    				<td>{{tenant.procedureNo}}</td>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.prepareWorkHours")+":"}}</td>
-    				<td>{{tenant.prepareWorkHours}}</td>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.overtimeStatus")+":"}}</td>
-    				<td>{{tenant.overtimeStatus}}</td>
-    			</tr>
-    			<tr>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.bomDesc")+":"}}</td>
-    				<td>{{tenant.bomDesc}}</td>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.ratedWorkHours")+":"}}</td>
-    				<td>{{tenant.ratedWorkHours}}</td>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.resourceDesc")+":"}}</td>
-    				<td>{{tenant.resourceDesc}}</td>
-    			</tr>
-    			<tr>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.bomNo")+":"}}</td>
-    				<td>{{tenant.bomNo}}</td>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.planTime")+":"}}</td>
-    				<td>{{tenant.planTime}}</td>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.executorName")+":"}}</td>
-    				<td>{{tenant.executorName}}</td>
-    			</tr>
-    			<tr>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.planNo")+":"}}</td>
-    				<td>{{tenant.planNo}}</td>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.actualTime")+":"}}</td>
-    				<td>{{tenant.actualTime}}</td>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.taskResour")+":"}}</td>
-    				<td>查看任务资源</td>
-    			</tr>
-    			<tr>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.orderNo")+":"}}</td>
-    				<td>{{tenant.orderNo}}</td>
-    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.jindu")+":"}}</td>
-    				<td><el-progress :text-inside="true" :stroke-width="24" :percentage="tenant.process"></el-progress></td>
-    				<td class="blodTd" align="center"></td>
-    				<td></td>
-    			</tr>
-    		</table>
-    	</el-row>
-    	
-    	<!-- 自动化执行流程 -->
-    	<el-row>
-    		<p class="titleP">{{$t("runCenter.form.viewSched.autoLiuc")}}</p>
-    		<el-table
-	      	:key="tableKey"
-	      	ref="table"
-	      	v-loading="loading"
-	      	:data="tableData.records"
-	      	border
-	      	fit
-	      	row-key="id"
-	      	style="width: 100%;"
-	      	highlight-current-row
-    			@current-change="handleCurrentChange"
-		    >
-		    	<!-- 序号 -->
-		    	<el-table-column :label='$t("common.serialNo")' width="55px" align="center">
-			      <template slot-scope="scope">
-			        <div>
-			          {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
-			        </div>
-			      </template>
-		      	</el-table-column>
-		      	<!-- 权重 -->
-		      	<el-table-column prop="prority" :label='$t("runCenter.table.aotoProcess.prority")' :show-overflow-tooltip="true" width="120px"></el-table-column>
-				    <!-- 设备 -->
-				    <el-table-column prop="resourceName" :label='$t("runCenter.table.aotoProcess.resourceName")' :show-overflow-tooltip="true" width="120px"></el-table-column>
-				    <!-- 动作包指令(报文) -->
-				    <el-table-column prop="code" :label='$t("runCenter.table.aotoProcess.code")' :show-overflow-tooltip="true" width="160px"></el-table-column>
-				    <!-- 执行动作 -->
-				    <el-table-column prop="instructionName" :label='$t("runCenter.table.aotoProcess.instructionName")' :show-overflow-tooltip="true"></el-table-column>
-				    <!-- 操作说明 -->
-				    <el-table-column prop="remark" :label='$t("runCenter.table.aotoProcess.remark")' :show-overflow-tooltip="true" width="180px"></el-table-column>
-			     	<!-- 执行状态 -->
-			     	<el-table-column prop="exeStatus" :label='$t("runCenter.table.aotoProcess.exeStatus")' width="150px">
-			     		<template slot-scope="{ row }">
-				      	<el-tag v-if="row.exeStatus == '1'" type="info">{{$t("runCenter.common.exeStatus.noStart")}}</el-tag>
-								<el-tag v-if="row.exeStatus == '2'" type="">{{$t("runCenter.common.exeStatus.run")}}</el-tag>
-								<el-tag v-if="row.exeStatus == '3'" type="success">{{$t("runCenter.common.exeStatus.finished")}}</el-tag>
-							</template>
-			     	</el-table-column>
-			      <!-- 执行结果 -->
-			      <el-table-column prop="exeResult" :label='$t("runCenter.table.aotoProcess.exeResult")' width="150px">
-			      	<template slot-scope="{ row }">
-			      		<el-tag v-if="row.exeResult == '1'" type="success">{{$t("runCenter.common.exeResult.success")}}</el-tag>
-								<el-tag v-if="row.exeResult == '0'">{{$t("runCenter.common.exeResult.fail")}}</el-tag>
-							</template>
-			      </el-table-column>
-			      <!-- 开始时间 -->
-			      <el-table-column prop="startTime" :label='$t("runCenter.table.aotoProcess.startTime")' width="150px"></el-table-column>
-			      <!-- 结束时间 -->
-			      <el-table-column prop="endTime" :label='$t("runCenter.table.aotoProcess.endTime")' width="150px"></el-table-column>
-			      <!-- 反馈信息 -->
-			      <el-table-column prop="feedback" :label='$t("runCenter.table.aotoProcess.feedback")' width="150px"></el-table-column>
-			      <!-- 反馈附件 -->
-			      <el-table-column prop="feedbackFile" :label='$t("runCenter.table.aotoProcess.feedbackFile")' width="150px"></el-table-column>
-		    </el-table>
-		    <!-- 【分页】组件 -->
-		  	<pagination
-		      v-show="tableData.total > 0"
-		      :limit.sync="queryParams.size"
-		      :page.sync="queryParams.current"
-		      :total="Number(tableData.total)"
-		      @pagination="fetch"
-		    />
-	    
-    	</el-row>
-    </div>
-  </el-dialog>
-</template>
-<script>
-	// 【分页】组件
-	import Pagination from "@/components/Pagination"
-	// 【自动化程序管理】-API
-	import automatedProcessesApi from "@/api/prepareProductMgr/automatedProcesses"
-	// 列表查询的共通参数
-	import { initQueryParams } from '@/utils/commons'
-export default {
-  name: 'TaskView',
-  components: { Pagination },
-  props: {
-    dialogVisible: {
-      type: Boolean,
-      default: false
-    }
-  },
-  data () {
-    return {
-      screenWidth: 0,
-      width: this.initWidth(),
-      tenant: {},
-      queryParams: initQueryParams({}),
-      loading: false,
-    	tenantViewVisible: false,
-    	tableKey: 0,
-	  	tableData: {
-	    	total: 0
-	  	},
-	  	currentRow: null, // 当前选择的行
-    }
-  },
-  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
-  created() {
-  	// 加载列表数据
-  	// this.fetch()
-	},
-  computed: {
-    isVisible: {
-      get () {
-        return this.dialogVisible
-      },
-      set () {
-        this.close()
-      }
-    }
-  },
-  mounted () {
-    window.onresize = () => {
-      return (() => {
-        this.width = this.initWidth()
-      })()
-    }
-  },
-  methods: {
-  	// table的当前行值变化后
-  	handleCurrentChange(val) {
-			// 设置当前行
-    	this.currentRow = val;
-  	},
-    initWidth () {
-      this.screenWidth = document.body.clientWidth
-      if (this.screenWidth < 550) {
-        return '95%'
-      } else if (this.screenWidth < 990) {
-        return '580px'
-      } else if (this.screenWidth < 1400) {
-        return '600px'
-      } else {
-        return '650px'
-      }
-    },
-    setTenant (val) {
-      this.tenant = { ...val }
-      // 加载列表数据
-  		this.fetch()
-    },
-    close () {
-      this.$emit('close')
-    },
-    fetch (params = {}) {
-      this.loading = true
-      /*// 日期区间-参数
-      if (this.queryParams.timeRange) {
-        this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
-        this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
-      }
-			// 分页-参数
-      this.queryParams.current = params.current ? params.current : this.queryParams.current
-      this.queryParams.size = params.size ? params.size : this.queryParams.size
-      // 条件-参数*/
-      console.log("列表的row数据:", this.tenant)
-      automatedProcessesApi.taskAutoNodeList({taskId: this.tenant.id, procedureId: this.tenant.procedureId, orderId: this.tenant.orderId}).then(response => {
-        const res = response.data
-        if (res.isSuccess) {
-          this.tableData.records = res.data
-        }
-        // eslint-disable-next-line no-return-assign
-      }).finally(() => this.loading = false)
-     
-    }
-  }
-}
-</script>
-<style lang="scss" scoped>
-	.titleP{
-		position: relative;
-		font-size: 16px;
-		padding-left: 15px;
-	}
-	.titleP:before{
-		content: '';
-		position: absolute;
-		left: 0;
-		top: 3px;
-		width: 5px;
-		height: 80%;
-		background: #0F79DC;
-	}
-	.comtable{
-		width: 100%;
-		border-left: 1px solid #CCCCCC;
-		border-top: 1px solid #CCCCCC;
-	}
-	.comtable td{
-		border-right: 1px solid #CCCCCC;
-		border-bottom: 1px solid #CCCCCC;
-	}
-	.blodTd{
-		background: #EEEEEE;
-		color: #333333;
-	}
-</style>
+<template>
+  <el-dialog
+    :title="$t(&quot;common.view&quot;)"
+    width="80%"
+    :append-to-body="true"
+    :visible.sync="isVisible"
+    class="tenant-view"
+  >
+    <div class="boxDiv">
+    	<!-- 任务信息 -->
+    	<el-row>
+    		<p class="titleP" style="margin-top: 0;">{{$t("runCenter.form.viewSched.name")+":"}}</p>
+    		<table class="comtable" border="0" cellspacing="0" cellpadding="6">
+    			<tr>
+    				<td class="blodTd" align="center" width="120">{{$t("runCenter.form.viewSched.procedureDesc")+":"}}</td>
+    				<td width="200">{{tenant.procedureDesc}}</td>
+    				<td class="blodTd" align="center" width="120">{{$t("runCenter.form.viewSched.content")+":"}}</td>
+    				<td width="300">{{tenant.content}}</td>
+    				<td class="blodTd" align="center" width="120">{{$t("runCenter.form.viewSched.status")+":"}}</td>
+    				<td width="200">
+		          <el-tag v-if="tenant.status == '1'" type="info">{{$t("runCenter.common.schedulStatus.noStart")}}</el-tag>
+							<el-tag v-if="tenant.status == '2'" type="">{{$t("runCenter.common.schedulStatus.run")}}</el-tag>
+							<el-tag v-if="tenant.status == '3'" type="success">{{$t("runCenter.common.schedulStatus.finished")}}</el-tag>
+    				</td>
+    			</tr>
+    			<tr>
+    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.procedureNo")+":"}}</td>
+    				<td>{{tenant.procedureNo}}</td>
+    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.prepareWorkHours")+":"}}</td>
+    				<td>{{tenant.prepareWorkHours}}</td>
+    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.overtimeStatus")+":"}}</td>
+    				<td>{{tenant.overtimeStatus}}</td>
+    			</tr>
+    			<tr>
+    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.bomDesc")+":"}}</td>
+    				<td>{{tenant.bomDesc}}</td>
+    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.ratedWorkHours")+":"}}</td>
+    				<td>{{tenant.ratedWorkHours}}</td>
+    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.resourceDesc")+":"}}</td>
+    				<td>{{tenant.resourceDesc}}</td>
+    			</tr>
+    			<tr>
+    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.bomNo")+":"}}</td>
+    				<td>{{tenant.bomNo}}</td>
+    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.planTime")+":"}}</td>
+    				<td>{{tenant.planTime}}</td>
+    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.executorName")+":"}}</td>
+    				<td>{{tenant.executorName}}</td>
+    			</tr>
+    			<tr>
+    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.planNo")+":"}}</td>
+    				<td>{{tenant.planNo}}</td>
+    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.actualTime")+":"}}</td>
+    				<td>{{tenant.actualTime}}</td>
+    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.taskResour")+":"}}</td>
+    				<td>查看任务资源</td>
+    			</tr>
+    			<tr>
+    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.orderNo")+":"}}</td>
+    				<td>{{tenant.orderNo}}</td>
+    				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.jindu")+":"}}</td>
+    				<td><el-progress :text-inside="true" :stroke-width="24" :percentage="tenant.process"></el-progress></td>
+    				<td class="blodTd" align="center"></td>
+    				<td></td>
+    			</tr>
+    		</table>
+    	</el-row>
+
+    	<!-- 自动化执行流程 -->
+    	<el-row>
+    		<p class="titleP">{{$t("runCenter.form.viewSched.autoLiuc")}}</p>
+    		<el-table
+	      	:key="tableKey"
+	      	ref="table"
+	      	v-loading="loading"
+	      	:data="tableData.records"
+	      	border
+	      	fit
+	      	row-key="id"
+	      	style="width: 100%;"
+	      	highlight-current-row
+    			@current-change="handleCurrentChange"
+		    >
+		    	<!-- 序号 -->
+		    	<el-table-column :label='$t("common.serialNo")' width="55px" align="center">
+			      <template slot-scope="scope">
+			        <div>
+			          {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
+			        </div>
+			      </template>
+		      	</el-table-column>
+		      	<!-- 权重 -->
+		      	<el-table-column prop="completeBatchSort" :label='$t("runCenter.table.aotoProcess.prority")' :show-overflow-tooltip="true" width="120px"></el-table-column>
+				    <!-- 设备 -->
+				    <el-table-column prop="resourceName" :label='$t("runCenter.table.aotoProcess.resourceName")' :show-overflow-tooltip="true" width="120px"></el-table-column>
+				    <!-- 动作包指令(报文) -->
+				    <el-table-column prop="nodeName" :label='$t("runCenter.table.aotoProcess.nodeName")' :show-overflow-tooltip="true" width="160px"></el-table-column>
+				    <!-- 执行动作 -->
+				    <el-table-column prop="instructionName" :label='$t("runCenter.table.aotoProcess.instructionName")' :show-overflow-tooltip="true"></el-table-column>
+				    <!-- 操作说明 -->
+				    <el-table-column prop="remark" :label='$t("runCenter.table.aotoProcess.remark")' :show-overflow-tooltip="true" width="180px"></el-table-column>
+			     	<!-- 执行状态 -->
+			     	<el-table-column prop="exeStatus" :label='$t("runCenter.table.aotoProcess.exeStatus")' width="150px">
+			     		<template slot-scope="{ row }">
+				      	<el-tag v-if="row.exeStatus == '1'" type="info">{{$t("runCenter.common.exeStatus.noStart")}}</el-tag>
+								<el-tag v-if="row.exeStatus == '2'" type="">{{$t("runCenter.common.exeStatus.run")}}</el-tag>
+								<el-tag v-if="row.exeStatus == '3'" type="success">{{$t("runCenter.common.exeStatus.finished")}}</el-tag>
+							</template>
+			     	</el-table-column>
+			      <!-- 执行结果 -->
+			      <el-table-column prop="exeResult" :label='$t("runCenter.table.aotoProcess.exeResult")' width="150px">
+			      	<template slot-scope="{ row }">
+			      		<el-tag v-if="row.exeResult == '1'" type="success">{{$t("runCenter.common.exeResult.success")}}</el-tag>
+								<el-tag v-if="row.exeResult == '0'">{{$t("runCenter.common.exeResult.fail")}}</el-tag>
+							</template>
+			      </el-table-column>
+			      <!-- 开始时间 -->
+			      <el-table-column prop="startTime" :label='$t("runCenter.table.aotoProcess.startTime")' width="150px"></el-table-column>
+			      <!-- 结束时间 -->
+			      <el-table-column prop="endTime" :label='$t("runCenter.table.aotoProcess.endTime")' width="150px"></el-table-column>
+			      <!-- 反馈信息 -->
+			      <el-table-column prop="feedback" :label='$t("runCenter.table.aotoProcess.feedback")' width="150px"></el-table-column>
+			      <!-- 反馈附件 -->
+			      <el-table-column prop="feedbackFile" :label='$t("runCenter.table.aotoProcess.feedbackFile")' width="150px"></el-table-column>
+		    </el-table>
+		    <!-- 【分页】组件 -->
+		  	<pagination
+		      v-show="tableData.total > 0"
+		      :limit.sync="queryParams.size"
+		      :page.sync="queryParams.current"
+		      :total="Number(tableData.total)"
+		      @pagination="fetch"
+		    />
+
+    	</el-row>
+    </div>
+  </el-dialog>
+</template>
+<script>
+	// 【分页】组件
+	import Pagination from "@/components/Pagination"
+	// 【自动化程序管理】-API
+	import automatedProcessesApi from "@/api/prepareProductMgr/automatedProcesses"
+	// 列表查询的共通参数
+	import { initQueryParams } from '@/utils/commons'
+export default {
+  name: 'TaskView',
+  components: { Pagination },
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      screenWidth: 0,
+      width: this.initWidth(),
+      tenant: {},
+      queryParams: initQueryParams({}),
+      loading: false,
+    	tenantViewVisible: false,
+    	tableKey: 0,
+	  	tableData: {
+	    	total: 0
+	  	},
+	  	currentRow: null, // 当前选择的行
+    }
+  },
+  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+  created() {
+  	// 加载列表数据
+  	// this.fetch()
+	},
+  computed: {
+    isVisible: {
+      get () {
+        return this.dialogVisible
+      },
+      set () {
+        this.close()
+      }
+    }
+  },
+  mounted () {
+    window.onresize = () => {
+      return (() => {
+        this.width = this.initWidth()
+      })()
+    }
+  },
+  methods: {
+  	// table的当前行值变化后
+  	handleCurrentChange(val) {
+			// 设置当前行
+    	this.currentRow = val;
+  	},
+    initWidth () {
+      this.screenWidth = document.body.clientWidth
+      if (this.screenWidth < 550) {
+        return '95%'
+      } else if (this.screenWidth < 990) {
+        return '580px'
+      } else if (this.screenWidth < 1400) {
+        return '600px'
+      } else {
+        return '650px'
+      }
+    },
+    setTenant (val) {
+      this.tenant = { ...val }
+      // 加载列表数据
+  		this.fetch()
+    },
+    close () {
+      this.$emit('close')
+    },
+    fetch (params = {}) {
+      this.loading = true
+      /*// 日期区间-参数
+      if (this.queryParams.timeRange) {
+        this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
+        this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
+      }
+			// 分页-参数
+      this.queryParams.current = params.current ? params.current : this.queryParams.current
+      this.queryParams.size = params.size ? params.size : this.queryParams.size
+      // 条件-参数*/
+      console.log("列表的row数据:", this.tenant)
+      automatedProcessesApi.taskAutoNodeList({taskId: this.tenant.id, procedureId: this.tenant.procedureId, orderId: this.tenant.orderId}).then(response => {
+        const res = response.data
+        if (res.isSuccess) {
+          this.tableData.records = res.data
+        }
+        // eslint-disable-next-line no-return-assign
+      }).finally(() => this.loading = false)
+
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+	.titleP{
+		position: relative;
+		font-size: 16px;
+		padding-left: 15px;
+	}
+	.titleP:before{
+		content: '';
+		position: absolute;
+		left: 0;
+		top: 3px;
+		width: 5px;
+		height: 80%;
+		background: #0F79DC;
+	}
+	.comtable{
+		width: 100%;
+		border-left: 1px solid #CCCCCC;
+		border-top: 1px solid #CCCCCC;
+	}
+	.comtable td{
+		border-right: 1px solid #CCCCCC;
+		border-bottom: 1px solid #CCCCCC;
+	}
+	.blodTd{
+		background: #EEEEEE;
+		color: #333333;
+	}
+</style>