Explorar o código

Merge branch 'master' of http://106.15.38.8:3000/yaoyq/imcs-yj-fe

zhuhao %!s(int64=3) %!d(string=hai) anos
pai
achega
ae57f420f9

+ 59 - 54
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/runningOrder/index.vue

@@ -538,29 +538,35 @@
 
         // 如果是:【暂停】
         if(command == "stop"){
-          const produceStatus = this.selection[0].produceStatus
-          console.log("produceStatus="+produceStatus)
-          if (produceStatus === '1' || produceStatus === '4') {
-            this.$message({
-              message: this.$t("订单未开始生产或已经生产完成,无需暂停"),
-              type: "warning"
-            })
-            return false
+          // 验证是否选中数据-函数
+          if(this.checkData()){
+          	const produceStatus = this.selection[0].produceStatus
+          	// console.log("produceStatus="+produceStatus)
+          	if (produceStatus === '1' || produceStatus === '4') {
+	            this.$message({
+	              message: this.$t("订单未开始生产或已经生产完成,无需暂停"),
+	              type: "warning"
+	            })
+	            return false
+	          }
+	        	this.panseBtn('0', this.selection[0])
           }
-        	this.panseBtn('0')
         }
 
         // 如果是:【启用】
         if(command == "start"){
-          const produceStatus = this.selection[0].produceStatus
-          if (produceStatus != '3') {
-            this.$message({
-              message: this.$t("订单未暂停,无需启用"),
-              type: "warning"
-            })
-            return false
-          }
-        	this.panseBtn('1')
+        	// 验证是否选中数据-函数
+          if(this.checkData()){ 
+	          const produceStatus = this.selection[0].produceStatus
+	          if (produceStatus != '3') {
+	            this.$message({
+	              message: this.$t("订单未暂停,无需启用"),
+	              type: "warning"
+	            })
+	            return false
+	          }
+	        	this.panseBtn('1', this.selection[0])
+        	}
         }
 
         // 如果是:【删除】
@@ -581,7 +587,7 @@
                 })
                 return false
             }
-            this.panseBtn('0')
+            this.panseBtn('0', row)
         }
 
         // 如果是:【启用】
@@ -594,7 +600,7 @@
                 })
                 return false
             }
-            this.panseBtn('1')
+            this.panseBtn('1', row)
         }
       },
 
@@ -611,38 +617,36 @@
       	}
       },
       // 【暂停/启用】按钮-事件
-      panseBtn(val){
-      	if(this.checkData()){
-      		let obj = {
-		    		id: this.selection[0].id,
-		    		status: val
-		    	}
-      		if(val == '1'){
-      			orderMgrApi.orderEnable(obj).then(res => {
-			    		res = res.data
-		          if (res.isSuccess) {
-		            this.$message({
-		              message: this.$t('tips.optionSuccess'),
-		              type: 'success'
-		            })
-		            // 更新列表
-		            this.search()
-		          }
-			    	})
-      		}else{
-      			orderMgrApi.orderSuspend(obj).then(res => {
-			    		res = res.data
-		          if (res.isSuccess) {
-		            this.$message({
-		              message: this.$t('tips.optionSuccess'),
-		              type: 'success'
-		            })
-		            // 更新列表
-		            this.search()
-		          }
-			    	})
-      		}
-      	}
+      panseBtn(val, data){
+      	let obj = { status: val }
+      	if(data) {
+      		obj.id  = data.id;
+		  		if(val == '1'){
+		  			orderMgrApi.orderEnable(obj).then(res => {
+				    		res = res.data
+			          if (res.isSuccess) {
+			            this.$message({
+			              message: this.$t('tips.optionSuccess'),
+			              type: 'success'
+			            })
+			            // 更新列表
+			            this.search()
+			          }
+				    	})
+		  		}else{
+		  			orderMgrApi.orderSuspend(obj).then(res => {
+				    		res = res.data
+			          if (res.isSuccess) {
+			            this.$message({
+			              message: this.$t('tips.optionSuccess'),
+			              type: 'success'
+			            })
+			            // 更新列表
+			            this.search()
+			          }
+				    	})
+		  		}
+	  		}
       },
       // 【删除】按钮-事件
       orderDelete(){
@@ -944,6 +948,7 @@
 	    		this.loadingDom = false;
         })
 	    },
+	    
 	    viewPgRow(row){
 	    	// this.$refs.prodProg.setTenant(row)
 	      // this.$refs.prodProg.type = "view"
@@ -951,11 +956,11 @@
 	      // this.dialogPP.isVisible = true
         const orderList = []
         orderList.push(row)
-        console.log(orderList)
+        // console.log("1234344 === ", orderList)
         // 把选择的数据,给后台,
         orderMgrApi.oneTouchSchedule({orderList: orderList}).then(res => {
             res = res.data
-            console.log("【查看排产方案】按钮: ", res)
+            // console.log("【查看排产方案】按钮: ", res)
             if(res.isSuccess){
                 this.$message({
                     message: this.$t('tips.optionSuccess'),

+ 421 - 410
imcs-ui/src/views/zuihou/runManageCenter/productionScheduling/components/SchedTask.vue

@@ -1,410 +1,421 @@
-<template>
-	<div class="tabDiv">
-		<!-- 搜索模块 -->
-	    <!--<div class="filter-container">
-	    	<span>
-	    		<span>{{$t("runCenter.searchForm.runStatus")}}:</span>
-	    		<el-radio-group v-model="status" size="medium">
-			      <el-radio-button label="1,2">进行中</el-radio-button>
-			      <el-radio-button label="3">已完成</el-radio-button>
-			    </el-radio-group>
-	    	</span>
-	    	<span style="margin-left: 15px;">
-	    		<span>{{$t("runCenter.searchForm.order")}}:</span>
-	    		<el-input v-model="queryParams.model.orderNo" :placeholder='$t("common.pleaseEnter")' style="width: 160px;" size="medium"/>
-	    	</span>
-	    	<span style="margin-left: 15px;">
-	    		<span>{{$t("runCenter.searchForm.plan")}}:</span>
-	    		<el-input v-model="queryParams.model.planNo" :placeholder='$t("common.pleaseEnter")' style="width: 160px;" size="medium"/>
-	    	</span>
-	    </div>-->
-	    <div class="filter-container">
-	    	<!--<span>
-	    		<span>{{$t("runCenter.searchForm.yujStatus")}}:</span>
-	    		<el-radio-group v-model="queryParams.model.name4" size="medium">
-			      <el-radio-button label="" >全部</el-radio-button>
-			      <el-radio-button label="1">正常</el-radio-button>
-			      <el-radio-button label="0">异常</el-radio-button>
-			    </el-radio-group>
-	    	</span>
-	    	<span style="margin-left: 15px;">
-	    		<span>{{$t("runCenter.searchForm.taskFinished")}}:</span>
-	    		<el-date-picker
-			      v-model="queryParams.timeRange"
-			      type="daterange"
-			      :picker-options="pickerOptions"
-			      :range-separator='$t("common.separator")'
-			      :start-placeholder='$t("common.startTime")'
-			      :end-placeholder='$t("common.endTime")'
-			      format="yyyy-MM-dd"
-				  value-format="yyyy-MM-dd"
-			      align="right"
-			      style="width: 260px;"
-			    >
-			    </el-date-picker>
-	    	</span>-->
-	    	<span>
-	    		<span>零件名称:</span>
-	    		<el-input v-model="queryParams.model.orderNo" :placeholder='$t("common.pleaseEnter")' style="width: 160px;" size="medium"/>
-	    	</span>
-	      	<span style="margin-left: 15px;">
-		      <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
-		        {{ $t("table.search") }}
-		      </el-button>
-		      <el-button plain type="warning" icon="el-icon-refresh" size="medium" @click="reset">
-		        {{ $t("table.reset") }}
-		      </el-button>
-	      	</span>
-	    </div>
-
-	    <!-- 功能按钮 -->
-	    <!--<el-row class="filter-container">
-	    	<el-col>
-	    		<el-button type="primary" icon="el-icon-refresh" size="medium" @click="changeBtn">{{$t("runCenter.buttons.changeBtn")}}</el-button>
-	    		<el-button type="primary" icon="el-icon-video-pause" size="medium" @click="">{{$t("common.status.stop")}}</el-button>
-		      	<el-button type="success" icon="el-icon-video-play" size="medium" @click="">{{$t("common.status.start")}}</el-button>
-		      	<el-button type="danger" icon="el-icon-delete" size="medium" @click="">{{$t("common.toViod")}}</el-button>
-	    	</el-col>
-	    </el-row>-->
-
-	    <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="bomDesc" label='零件' :show-overflow-tooltip="true" width="120px"></el-table-column>
-	      	<!-- 工序号 -->
-	      	<el-table-column prop="procedureNo" label='工序号' align="center" width="90px"></el-table-column>
-		    <!-- 工序名称 -->
-		    <el-table-column prop="procedureDesc" label='工序名称' :show-overflow-tooltip="true" width="120px"></el-table-column>
-		    <!-- 任务状态 -->
-		    <el-table-column prop="status" :label='$t("runCenter.table.schedul.status")' :show-overflow-tooltip="true" width="120px">
-		    	<template slot-scope="{ row }">
-		          	<el-tag v-if="row.status == '1'" type="info">{{$t("runCenter.common.schedulStatus.noStart")}}</el-tag>
-					<el-tag v-if="row.status == '2'" type="">{{$t("runCenter.common.schedulStatus.run")}}</el-tag>
-					<el-tag v-if="row.status == '3'" type="success">{{$t("runCenter.common.schedulStatus.finished")}}</el-tag>
-		        </template>
-		    </el-table-column>
-		    <!-- 执行位置 -->
-		    <el-table-column prop="resourceDesc" label='执行位置' :show-overflow-tooltip="true"></el-table-column>
-		   	<!-- 执行者 -->
-		   	<el-table-column prop="executorName" label='执行者' :show-overflow-tooltip="true" width="120px"></el-table-column>
-		   	<!-- 计划时间 -->
-	      	<el-table-column prop="expectStartTime" :label='$t("runCenter.table.schedul.planTime")' :show-overflow-tooltip="true" width="150px"></el-table-column>
-		   	<!-- 额定工时 -->
-		   	<el-table-column prop="procedureName" label='额定工时' :show-overflow-tooltip="true" width="120px"></el-table-column>
-	     	<!-- 开始时间 -->
-	      	<el-table-column prop="startTime" :label='$t("runCenter.table.schedul.actualTime")' width="150px"></el-table-column>
-	     	<!-- 订单名称 -->
-	      	<el-table-column prop="orderName" label='订单名称' :show-overflow-tooltip="true" width="150px"></el-table-column>
-	      	<!-- 操作 -->
-	      	<el-table-column
-		        :label="$t('table.operation')"
-		        fixed="right"
-		        align="center"
-		        column-key="operation"
-		        width="75px"
-		    >
-		        <template slot-scope="{ row }">
-		        	<el-tooltip class="item" :content='$t("runCenter.common.viewTask")' effect="dark" placement="top-start">
-			          <i
-			            class="el-icon-view table-operation"
-			            style="color: #87d068;"
-			            @click="view(row)"
-			          />
-		          </el-tooltip>
-              <el-tooltip class="item" :content='$t("runCenter.common.viewTaskNode")' effect="dark" placement="top-start">
-                <i
-                  class="el-icon-view table-operation"
-                  style="color: #87d068;"
-                  @click="viewTaskNode(row)"
-                />
-              </el-tooltip>
-		        </template>
-		    </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"
-	    />
-
-	    <!-- 【查看】组件 -->
-	    <task-view
-	      	ref="view"
-	      	:dialog-visible="tenantViewVisible"
-	      	@close="viewClose"
-	    />
-  	</div>
-</template>
-
-
-<script>
-// 【分页】组件
-import Pagination from "@/components/Pagination"
-// 【查看】组件
-import TaskView from "./View"
-// 【任务管理】-API
-import taskMgrApi from "@/api/runManageCenter/taskMgr"
-// 列表查询的共通参数
-import { initQueryParams } from '@/utils/commons'
-export default {
-  name: 'PprogTask',
-  components: { Pagination, TaskView },
-  props: {
-  },
-  data () {
-    return {
-    	status:'1,2',
-    	titleData: [],  // table的动态表头数据
-    	qiyongStatus: [], //状态
-    	queryParams: initQueryParams({}),
-    	loading: false,
-    	tenantViewVisible: false,
-      showTaskNode: false,
-    	tableKey: 0,
-      	tableData: {
-        	total: 0,
-        	records: []
-      	},
-      	currentRow: null, // 当前选择的行
-      	pickerOptions: {
-          shortcuts: [{
-            text: '最近一周',
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-              picker.$emit('pick', [start, end]);
-            }
-          }, {
-            text: '最近一个月',
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit('pick', [start, end]);
-            }
-          }, {
-            text: '最近三个月',
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-              picker.$emit('pick', [start, end]);
-            }
-          }]
-        }
-    }
-  },
-  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
-  	created() {
-	  	// 加载列表数据
-	  	this.fetch()
-	},
-	// 每次进入,都加载
-	activated(){
-	  	// 加载列表数据
-	  	this.fetch()
-	},
-  computed: {
-  },
-  mounted () {
-  },
-  methods: {
-  	view (row) {
-      	this.$refs.view.setTenant(row)
-      	this.tenantViewVisible = true
-        this.showTaskNode = false;
-    },
-    viewTaskNode (row) {
-      this.$refs.view.setTenant(row)
-      this.tenantViewVisible = true
-      this.showTaskNode = true;
-    },
-  	viewClose () {
-      	this.tenantViewVisible = false
-    },
-  	// table的当前行值变化后
-  	handleCurrentChange(val) {
-		// 设置当前行
-    	this.currentRow = val;
-  	},
-  	// 【切换列表样式】按钮-事件
-  	changeBtn(){
-  		this.$emit("success")
-  	},
-  	// 生产表头数据-函数
-  	creatTestData(){
-  		/*this.titleData = [
-    		{id: '100', text: '2020-10',
-    			children: [
-    				{id: '10001' text: '1', weekObj: {id: '100001', field: 'week', text: '日'}},
-    				{id: '10002', text: '2', weekObj: {id: '100002', field: 'week2', text: '一'}},
-    				{id: '10003', text: '3', weekObj: {id: '100003', field: 'week3', text: '二'}},
-    				{id: '10004', text: '4', weekObj: {id: '100004', field: 'week4', text: '三'}},
-    				{id: '10005', text: '5', weekObj: {id: '100005', field: 'week5', text: '四'}},
-    				{id: '10006', text: '6', weekObj: {id: '100006', field: 'week6', text: '五'}},
-    				{id: '10007', text: '7', weekObj: {id: '100007', field: 'week7', text: '六'}},
-    				{id: '10008', text: '8', weekObj: {id: '100008', field: 'week8', text: '一'}},
-    				{id: '10009', text: '9', weekObj: {id: '100009', field: 'week9', text: '二'}},
-    				{id: '100010', text: '10', weekObj: {id: '1000010', field: 'week10', text: '三'}},
-    				{id: '100011', text: '11', weekObj: {id: '1000011', field: 'week11', text: '四'}},
-    				{id: '100012', text: '12', weekObj: {id: '1000012', field: 'week12', text: '五'}}
-    			]
-    		},
-    		{id: '102', text: '2020-11',
-    			children: [
-    				{id: '10201' text: '1', weekObj: {id: '102001', field: 'week', text: '日'}},
-    				{id: '10202', text: '2', weekObj: {id: '102002', field: 'week2', text: '一'}},
-    				{id: '10203', text: '3', weekObj: {id: '102003', field: 'week3', text: '二'}},
-    				{id: '10204', text: '4', weekObj: {id: '102004', field: 'week4', text: '三'}},
-    				{id: '10205', text: '5', weekObj: {id: '102005', field: 'week5', text: '四'}},
-    				{id: '10206', text: '6', weekObj: {id: '102006', field: 'week6', text: '五'}},
-    				{id: '10207', text: '7', weekObj: {id: '102007', field: 'week7', text: '六'}},
-    				{id: '10208', text: '8', weekObj: {id: '102008', field: 'week8', text: '一'}},
-    				{id: '10209', text: '9', weekObj: {id: '102009', field: 'week9', text: '二'}},
-    				{id: '102010', text: '10', weekObj: {id: '1020010', field: 'week10', text: '三'}},
-    				{id: '102011', text: '11', weekObj: {id: '1020011', field: 'week11', text: '四'}},
-    				{id: '102012', text: '12', weekObj: {id: '1020012', field: 'week12', text: '五'}}
-    			]
-    		},
-    		{id: '103', text: '2020-12',
-    			children: [
-    				{id: '10301' text: '1', weekObj: {id: '103001', field: 'week', text: '日'}},
-    				{id: '10302', text: '2', weekObj: {id: '103002', field: 'week2', text: '一'}},
-    				{id: '10303', text: '3', weekObj: {id: '103003', field: 'week3', text: '二'}},
-    				{id: '10304', text: '4', weekObj: {id: '103004', field: 'week4', text: '三'}},
-    				{id: '10305', text: '5', weekObj: {id: '103005', field: 'week5', text: '四'}},
-    				{id: '10306', text: '6', weekObj: {id: '103006', field: 'week6', text: '五'}},
-    				{id: '10307', text: '7', weekObj: {id: '103007', field: 'week7', text: '六'}},
-    				{id: '10308', text: '8', weekObj: {id: '103008', field: 'week8', text: '一'}},
-    				{id: '10309', text: '9', weekObj: {id: '103009', field: 'week9', text: '二'}},
-    				{id: '103010', text: '10', weekObj: {id: '1030010', field: 'week10', text: '三'}},
-    				{id: '103011', text: '11', weekObj: {id: '1030011', field: 'week11', text: '四'}},
-    				{id: '103012', text: '12', weekObj: {id: '1030012', field: 'week12', text: '五'}}
-    			]
-    		},
-    	],*/
-    	// 生产30条数据
-    	let list = []
-  		for(let i = 0; i < 3; i++){
-  			list.push({
-  				id: '100' + i,
-  				text: "2020-1" + i,
-  				children: []
-  			})
-  			for(let j = 1; j < 25; j++){
-  				let week = ""
-  				if(j == 1 || j%7 == 0){
-  					week = "日"
-  				}
-  				if(j == 2 || j%7 == 1){
-  					week = "一"
-  				}
-  				if(j == 3 || j%7 == 2){
-  					week = "二"
-  				}
-  				if(j == 4 || j%7 == 3){
-  					week = "三"
-  				}
-  				if(j == 5 || j%7 == 4){
-  					week = "四"
-  				}
-  				if(j == 6 || j%7 == 5){
-  					week = "五"
-  				}
-  				if(j == 7 || j%7 == 6){
-  					week = "六"
-  				}
-  				list[i].children.push({
-					id: '1000'+ j,
-					text: ''+ j,
-					weekObj: {
-						id: '10000'+ j,
-						field: 'week'+ j,
-						text: week
-					}
-  				})
-  			}
-  		}
-  		// 赋值
-  		this.titleData = list
-  		console.log("表头数据:", this.titleData)
-  	},
-  	// tab点击-事件
-  	tabClick(e){
-  		// console.log("被选择的tab:", e.index)
-  	},
-    setTenant (val) {
-    	if(val){
-    		this.tenant = { ...val }
-    	}
-    },
-    search () {
-      	this.fetch({
-        	...this.queryParams
-      	})
-    },
-    reset () {
-      	this.queryParams = initQueryParams({})
-      	this.$refs.table.clearSort()
-      	this.$refs.table.clearFilter()
-      	this.search()
-	},
-    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
-
-      this.queryParams.model.status = this.status
-      // 固定参数
-      this.queryParams.model.mulPlanStatus = '2';
-      taskMgrApi.page(this.queryParams).then(response => {
-        const res = response.data
-        console.log("查看列表数据122:", res)
-        if (res.isSuccess) {
-          this.tableData = res.data
-        }
-        // eslint-disable-next-line no-return-assign
-      }).finally(() => this.loading = false)
-
-    }
-  }
-}
-</script>
-<style type="text/css">
-	.el-date-editor .el-range-separator{
-		width: 10%;
-	}
-</style>
-<style lang="scss" scoped>
-	.tabDiv{
-		margin: 10px;
-	}
-</style>
+<template>
+	<div class="tabDiv">
+		<!-- 搜索模块 -->
+	    <!--<div class="filter-container">
+	    	<span>
+	    		<span>{{$t("runCenter.searchForm.runStatus")}}:</span>
+	    		<el-radio-group v-model="status" size="medium">
+			      <el-radio-button label="1,2">进行中</el-radio-button>
+			      <el-radio-button label="3">已完成</el-radio-button>
+			    </el-radio-group>
+	    	</span>
+	    	<span style="margin-left: 15px;">
+	    		<span>{{$t("runCenter.searchForm.order")}}:</span>
+	    		<el-input v-model="queryParams.model.orderNo" :placeholder='$t("common.pleaseEnter")' style="width: 160px;" size="medium"/>
+	    	</span>
+	    	<span style="margin-left: 15px;">
+	    		<span>{{$t("runCenter.searchForm.plan")}}:</span>
+	    		<el-input v-model="queryParams.model.planNo" :placeholder='$t("common.pleaseEnter")' style="width: 160px;" size="medium"/>
+	    	</span>
+	    </div>-->
+	    <div class="filter-container">
+	    	<!--<span>
+	    		<span>{{$t("runCenter.searchForm.yujStatus")}}:</span>
+	    		<el-radio-group v-model="queryParams.model.name4" size="medium">
+			      <el-radio-button label="" >全部</el-radio-button>
+			      <el-radio-button label="1">正常</el-radio-button>
+			      <el-radio-button label="0">异常</el-radio-button>
+			    </el-radio-group>
+	    	</span>
+	    	<span style="margin-left: 15px;">
+	    		<span>{{$t("runCenter.searchForm.taskFinished")}}:</span>
+	    		<el-date-picker
+			      v-model="queryParams.timeRange"
+			      type="daterange"
+			      :picker-options="pickerOptions"
+			      :range-separator='$t("common.separator")'
+			      :start-placeholder='$t("common.startTime")'
+			      :end-placeholder='$t("common.endTime")'
+			      format="yyyy-MM-dd"
+				  value-format="yyyy-MM-dd"
+			      align="right"
+			      style="width: 260px;"
+			    >
+			    </el-date-picker>
+	    	</span>-->
+	    	<span>
+	    		<span>零件名称:</span>
+	    		<el-input v-model="queryParams.model.orderNo" :placeholder='$t("common.pleaseEnter")' style="width: 160px;" size="medium"/>
+	    	</span>
+	      	<span style="margin-left: 15px;">
+		      <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
+		        {{ $t("table.search") }}
+		      </el-button>
+		      <el-button plain type="warning" icon="el-icon-refresh" size="medium" @click="reset">
+		        {{ $t("table.reset") }}
+		      </el-button>
+	      	</span>
+	    </div>
+
+	    <!-- 功能按钮 -->
+	    <!--<el-row class="filter-container">
+	    	<el-col>
+	    		<el-button type="primary" icon="el-icon-refresh" size="medium" @click="changeBtn">{{$t("runCenter.buttons.changeBtn")}}</el-button>
+	    		<el-button type="primary" icon="el-icon-video-pause" size="medium" @click="">{{$t("common.status.stop")}}</el-button>
+		      	<el-button type="success" icon="el-icon-video-play" size="medium" @click="">{{$t("common.status.start")}}</el-button>
+		      	<el-button type="danger" icon="el-icon-delete" size="medium" @click="">{{$t("common.toViod")}}</el-button>
+	    	</el-col>
+	    </el-row>-->
+
+	    <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="bomDesc" label='零件' :show-overflow-tooltip="true" width="120px"></el-table-column>
+	      	<!-- 工序号 -->
+	      	<el-table-column prop="procedureNo" label='工序号' align="center" width="90px"></el-table-column>
+		    <!-- 工序名称 -->
+		    <el-table-column prop="procedureDesc" label='工序名称' :show-overflow-tooltip="true" width="120px"></el-table-column>
+		    <!-- 任务状态 -->
+		    <el-table-column prop="status" :label='$t("runCenter.table.schedul.status")' :show-overflow-tooltip="true" width="120px">
+		    	<template slot-scope="{ row }">
+		          	<el-tag v-if="row.status == '1'" type="info">{{$t("runCenter.common.schedulStatus.noStart")}}</el-tag>
+					<el-tag v-if="row.status == '2'" type="">{{$t("runCenter.common.schedulStatus.run")}}</el-tag>
+					<el-tag v-if="row.status == '3'" type="success">{{$t("runCenter.common.schedulStatus.finished")}}</el-tag>
+		        </template>
+		    </el-table-column>
+		    <!-- 执行位置 -->
+		    <el-table-column prop="resourceDesc" label='执行位置' :show-overflow-tooltip="true"></el-table-column>
+		   	<!-- 执行者 -->
+		   	<el-table-column prop="executorName" label='执行者' :show-overflow-tooltip="true" width="120px"></el-table-column>
+		   	<!-- 计划时间 -->
+	      	<el-table-column prop="expectStartTime" :label='$t("runCenter.table.schedul.planTime")' :show-overflow-tooltip="true" width="150px"></el-table-column>
+		   	<!-- 额定工时 -->
+		   	<el-table-column prop="procedureName" label='额定工时' :show-overflow-tooltip="true" width="120px"></el-table-column>
+	     	<!-- 开始时间 -->
+	      	<el-table-column prop="startTime" :label='$t("runCenter.table.schedul.actualTime")' width="150px"></el-table-column>
+	     	<!-- 订单名称 -->
+	      	<el-table-column prop="orderName" label='订单名称' :show-overflow-tooltip="true" width="150px"></el-table-column>
+	      	<!-- 操作 -->
+	      	<el-table-column
+		        :label="$t('table.operation')"
+		        fixed="right"
+		        align="center"
+		        column-key="operation"
+		        width="85px"
+		    >
+		        <template slot-scope="{ row }">
+		        	<el-tooltip class="item" :content='$t("runCenter.common.viewTask")' effect="dark" placement="top-start">
+			          <i
+			            class="el-icon-view table-operation"
+			            style="color: #87d068;"
+			            @click="view(row)"
+			          />
+		          </el-tooltip>
+              <el-tooltip class="item" :content='$t("runCenter.common.viewTaskNode")' effect="dark" placement="top-start">
+                <i
+                  class="el-icon-view table-operation"
+                  style="color: #87d068;"
+                  @click="viewTaskNode(row)"
+                />
+              </el-tooltip>
+		        </template>
+		    </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"
+	    />
+
+	    <!-- 【任务详情】组件 -->
+	    <task-view
+	      	ref="view"
+	      	:dialog-visible="tenantViewVisible"
+	      	@close="viewClose"
+	    />
+	    
+	    <!-- 【节点详情】组件 -->
+	    <task-node-view
+	      	ref="viewNode"
+	      	:dialog-visible="tenantViewNodeVisible"
+	      	@close="viewNodeClose"
+	    />
+  	</div>
+</template>
+
+
+<script>
+// 【分页】组件
+import Pagination from "@/components/Pagination"
+// 【任务详情】组件
+import TaskView from "./View"
+// 【节点详情】组件
+import TaskNodeView from "./ViewNode"
+// 【任务管理】-API
+import taskMgrApi from "@/api/runManageCenter/taskMgr"
+// 列表查询的共通参数
+import { initQueryParams } from '@/utils/commons'
+export default {
+  name: 'PprogTask',
+  components: { Pagination, TaskView, TaskNodeView },
+  props: {
+  },
+  data () {
+    return {
+    	status:'1,2',
+    	titleData: [],  // table的动态表头数据
+    	qiyongStatus: [], //状态
+    	queryParams: initQueryParams({}),
+    	loading: false,
+    	tenantViewVisible: false,
+    	tenantViewNodeVisible: false,
+     	showTaskNode: false,
+    	tableKey: 0,
+      	tableData: {
+        	total: 0,
+        	records: []
+      	},
+      	currentRow: null, // 当前选择的行
+      	pickerOptions: {
+          shortcuts: [{
+            text: '最近一周',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '最近一个月',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '最近三个月',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit('pick', [start, end]);
+            }
+          }]
+        }
+    }
+  },
+  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+  	created() {
+	  	// 加载列表数据
+	  	this.fetch()
+	},
+	// 每次进入,都加载
+	activated(){
+	  	// 加载列表数据
+	  	this.fetch()
+	},
+  computed: {
+  },
+  mounted () {
+  },
+  methods: {
+  	view (row) {
+      	this.$refs.view.setTenant(row)
+      	this.tenantViewVisible = true
+    },
+  	viewClose () {
+      	this.tenantViewVisible = false
+    },
+    viewTaskNode (row) {
+      this.$refs.viewNode.setTenant(row)
+      this.tenantViewNodeVisible = true
+    },
+    viewNodeClose () {
+      	this.tenantViewNodeVisible = false
+    },
+  	// table的当前行值变化后
+  	handleCurrentChange(val) {
+		// 设置当前行
+    	this.currentRow = val;
+  	},
+  	// 【切换列表样式】按钮-事件
+  	changeBtn(){
+  		this.$emit("success")
+  	},
+  	// 生产表头数据-函数
+  	creatTestData(){
+  		/*this.titleData = [
+    		{id: '100', text: '2020-10',
+    			children: [
+    				{id: '10001' text: '1', weekObj: {id: '100001', field: 'week', text: '日'}},
+    				{id: '10002', text: '2', weekObj: {id: '100002', field: 'week2', text: '一'}},
+    				{id: '10003', text: '3', weekObj: {id: '100003', field: 'week3', text: '二'}},
+    				{id: '10004', text: '4', weekObj: {id: '100004', field: 'week4', text: '三'}},
+    				{id: '10005', text: '5', weekObj: {id: '100005', field: 'week5', text: '四'}},
+    				{id: '10006', text: '6', weekObj: {id: '100006', field: 'week6', text: '五'}},
+    				{id: '10007', text: '7', weekObj: {id: '100007', field: 'week7', text: '六'}},
+    				{id: '10008', text: '8', weekObj: {id: '100008', field: 'week8', text: '一'}},
+    				{id: '10009', text: '9', weekObj: {id: '100009', field: 'week9', text: '二'}},
+    				{id: '100010', text: '10', weekObj: {id: '1000010', field: 'week10', text: '三'}},
+    				{id: '100011', text: '11', weekObj: {id: '1000011', field: 'week11', text: '四'}},
+    				{id: '100012', text: '12', weekObj: {id: '1000012', field: 'week12', text: '五'}}
+    			]
+    		},
+    		{id: '102', text: '2020-11',
+    			children: [
+    				{id: '10201' text: '1', weekObj: {id: '102001', field: 'week', text: '日'}},
+    				{id: '10202', text: '2', weekObj: {id: '102002', field: 'week2', text: '一'}},
+    				{id: '10203', text: '3', weekObj: {id: '102003', field: 'week3', text: '二'}},
+    				{id: '10204', text: '4', weekObj: {id: '102004', field: 'week4', text: '三'}},
+    				{id: '10205', text: '5', weekObj: {id: '102005', field: 'week5', text: '四'}},
+    				{id: '10206', text: '6', weekObj: {id: '102006', field: 'week6', text: '五'}},
+    				{id: '10207', text: '7', weekObj: {id: '102007', field: 'week7', text: '六'}},
+    				{id: '10208', text: '8', weekObj: {id: '102008', field: 'week8', text: '一'}},
+    				{id: '10209', text: '9', weekObj: {id: '102009', field: 'week9', text: '二'}},
+    				{id: '102010', text: '10', weekObj: {id: '1020010', field: 'week10', text: '三'}},
+    				{id: '102011', text: '11', weekObj: {id: '1020011', field: 'week11', text: '四'}},
+    				{id: '102012', text: '12', weekObj: {id: '1020012', field: 'week12', text: '五'}}
+    			]
+    		},
+    		{id: '103', text: '2020-12',
+    			children: [
+    				{id: '10301' text: '1', weekObj: {id: '103001', field: 'week', text: '日'}},
+    				{id: '10302', text: '2', weekObj: {id: '103002', field: 'week2', text: '一'}},
+    				{id: '10303', text: '3', weekObj: {id: '103003', field: 'week3', text: '二'}},
+    				{id: '10304', text: '4', weekObj: {id: '103004', field: 'week4', text: '三'}},
+    				{id: '10305', text: '5', weekObj: {id: '103005', field: 'week5', text: '四'}},
+    				{id: '10306', text: '6', weekObj: {id: '103006', field: 'week6', text: '五'}},
+    				{id: '10307', text: '7', weekObj: {id: '103007', field: 'week7', text: '六'}},
+    				{id: '10308', text: '8', weekObj: {id: '103008', field: 'week8', text: '一'}},
+    				{id: '10309', text: '9', weekObj: {id: '103009', field: 'week9', text: '二'}},
+    				{id: '103010', text: '10', weekObj: {id: '1030010', field: 'week10', text: '三'}},
+    				{id: '103011', text: '11', weekObj: {id: '1030011', field: 'week11', text: '四'}},
+    				{id: '103012', text: '12', weekObj: {id: '1030012', field: 'week12', text: '五'}}
+    			]
+    		},
+    	],*/
+    	// 生产30条数据
+    	let list = []
+  		for(let i = 0; i < 3; i++){
+  			list.push({
+  				id: '100' + i,
+  				text: "2020-1" + i,
+  				children: []
+  			})
+  			for(let j = 1; j < 25; j++){
+  				let week = ""
+  				if(j == 1 || j%7 == 0){
+  					week = "日"
+  				}
+  				if(j == 2 || j%7 == 1){
+  					week = "一"
+  				}
+  				if(j == 3 || j%7 == 2){
+  					week = "二"
+  				}
+  				if(j == 4 || j%7 == 3){
+  					week = "三"
+  				}
+  				if(j == 5 || j%7 == 4){
+  					week = "四"
+  				}
+  				if(j == 6 || j%7 == 5){
+  					week = "五"
+  				}
+  				if(j == 7 || j%7 == 6){
+  					week = "六"
+  				}
+  				list[i].children.push({
+					id: '1000'+ j,
+					text: ''+ j,
+					weekObj: {
+						id: '10000'+ j,
+						field: 'week'+ j,
+						text: week
+					}
+  				})
+  			}
+  		}
+  		// 赋值
+  		this.titleData = list
+  		console.log("表头数据:", this.titleData)
+  	},
+  	// tab点击-事件
+  	tabClick(e){
+  		// console.log("被选择的tab:", e.index)
+  	},
+    setTenant (val) {
+    	if(val){
+    		this.tenant = { ...val }
+    	}
+    },
+    search () {
+      	this.fetch({
+        	...this.queryParams
+      	})
+    },
+    reset () {
+      	this.queryParams = initQueryParams({})
+      	this.$refs.table.clearSort()
+      	this.$refs.table.clearFilter()
+      	this.search()
+	},
+    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
+
+      this.queryParams.model.status = this.status
+      // 固定参数
+      this.queryParams.model.mulPlanStatus = '2';
+      taskMgrApi.page(this.queryParams).then(response => {
+        const res = response.data
+        console.log("查看列表数据122:", res)
+        if (res.isSuccess) {
+          this.tableData = res.data
+        }
+        // eslint-disable-next-line no-return-assign
+      }).finally(() => this.loading = false)
+
+    }
+  }
+}
+</script>
+<style type="text/css">
+	.el-date-editor .el-range-separator{
+		width: 10%;
+	}
+</style>
+<style lang="scss" scoped>
+	.tabDiv{
+		margin: 10px;
+	}
+</style>

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

@@ -1,270 +1,202 @@
-<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>
+    </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>

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

@@ -0,0 +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>