Jelajahi Sumber

工控机页面数据展示改成动态真实数据展示

yejian016332 3 tahun lalu
induk
melakukan
abcde72053

+ 37 - 14
imcs-ui/src/api/runManageCenter/taskMgr.js

@@ -44,7 +44,7 @@ const apiList = {
   	getTaskCount: {
     	method: 'POST',
     	url: `/authority/task/getTaskCount`
-  	},  
+  	},
   	list: {
     	method: 'POST',
     	url: `/authority/task/query`
@@ -53,25 +53,25 @@ const apiList = {
     	method: 'POST',
     	url: `/authority/task/preview`
   	},
-  	
+
   	// 根据生产资源获取当前执行任务信息
   	getTaskByResourceId: {
     	method: 'POST',
     	url: `/authority/task/getTaskByResourceId`
   	},
-  	
+
   	// 检测当前设备是否有正在执行的任务
   	checkExeTask: {
     	method: 'POST',
     	url: `/authority/task/checkExeTask`
   	},
-  	
+
   	// 查询生产资源上的任务节点
   	taskAutoNodeListByResource: {
     	method: 'POST',
     	url: `/authority/autoNode/taskAutoNodeListByResource`
   	},
-  	
+
   	export: {
     	method: 'POST',
     	url: `/authority/task/export`
@@ -79,7 +79,15 @@ const apiList = {
   	import: {
     	method: 'POST',
     	url: `/authority/task/import`
-  	}
+  	},
+    getStationTasks: {
+      method: 'POST',
+      url: `/authority/task/getStationTasks`
+    },
+  updateTaskStatus: {
+      method: 'POST',
+      url: `/authority/task/updateTaskStatus`
+    }
 }
 
 export default {
@@ -119,14 +127,14 @@ export default {
       data
     })
   },
-  // 任务-甘特图 
+  // 任务-甘特图
   scheduleTaskpageList (data) {
     return axiosApi({
       ...apiList.scheduleTaskpageList,
       data
     })
   },
-  // 任务-甘特图 
+  // 任务-甘特图
   scheduleTaskDaypageList (data) {
     return axiosApi({
       ...apiList.scheduleTaskDaypageList,
@@ -157,7 +165,7 @@ export default {
       url: `/authority/task/check/${code}`
     })
   },
-  	
+
   	// 根据生产资源获取当前执行任务信息
   	getTaskByResourceId (data) {
 	    return axiosApi({
@@ -165,7 +173,7 @@ export default {
 	      	data
 	    })
   	},
-  	
+
   	// 检测当前设备是否有正在执行的任务
   	checkExeTask (data) {
 	    return axiosApi({
@@ -173,7 +181,7 @@ export default {
 	      	data
 	    })
   	},
-  	
+
   	// 查询生产资源上的任务节点
   	taskAutoNodeListByResource (data) {
 	    return axiosApi({
@@ -181,8 +189,8 @@ export default {
 	      	data
 	    })
   	},
-  	
-  	
+
+
   checkField (data) {
     return axiosApi({
       method: 'POST',
@@ -208,5 +216,20 @@ export default {
       ...apiList.import,
       data
     })
-  }
+  },
+  // 查询生产资源上的任务节点
+  getStationTasks (data) {
+    return axiosApi({
+      ...apiList.getStationTasks,
+      data
+    })
+  },
+
+  // 更新任务人工开始时间
+  updateTaskStatus (data) {
+    return axiosApi({
+      ...apiList.updateTaskStatus,
+      data
+    })
+  },
 }

+ 88 - 115
imcs-ui/src/views/zuihou/machiningClient/touchScreen/Index.vue

@@ -43,16 +43,16 @@
       <!-- 搜索-部分 -->
       <div class="defaultRow noBorder">
         <el-select
-          v-model="opValue"
+          v-model="currentStationId"
           :span="2"
           @change="selectChange"
           :placeholder="$t('common.pleaseSelect')"
         >
           <el-option
             v-for="item in options"
-            :key="item.value"
+            :key="item.id"
             :label="item.name"
-            :value="item.value"
+            :value="item.id"
           >
           </el-option>
         </el-select>
@@ -94,7 +94,7 @@
             v-for="(item, index) in taskData.slice(0, 3)"
             :key="item.id"
             :offset="index == 0 ? 0 : 1"
-            v-show="item.status < 2 ? true : false"
+            v-show="item.status < 3 ? true : false"
             :style="
               index == 0
                 ? 'zoom:1;min-width:300px;'
@@ -130,7 +130,7 @@
                   </el-form-item>
                   <el-form-item label="额定时间:">
                     <span>{{ item.time }}分钟</span>
-                    <div class="timeprogress">
+                    <!--<div class="timeprogress">
                       <el-progress
                         :text-inside="true"
                         :stroke-width="15"
@@ -138,22 +138,22 @@
                         color="#FF3366"
                         :format="setItemText(item.time, item.left)"
                       ></el-progress>
-                    </div>
-                  </el-form-item>
-                  <el-form-item>
-                    <span style="margin: 2% 0; float: right">
-                      <el-button
-                        plain
-                        type="primary"
-                        icon="el-icon-view"
-                        size="medium"
-                        :disabled="index == 0 ? false : true"
-                        @click.native="finishTask(item)"
-                      >
-                        完成
-                      </el-button>
-                    </span>
+                    </div>-->
                   </el-form-item>
+<!--                  <el-form-item>-->
+<!--                    <span style="margin: 2% 0; float: right">-->
+<!--                      <el-button-->
+<!--                        plain-->
+<!--                        type="primary"-->
+<!--                        icon="el-icon-view"-->
+<!--                        size="medium"-->
+<!--                        :disabled="index == 0 ? false : true"-->
+<!--                        @click.native="finishTask(item)"-->
+<!--                      >-->
+<!--                        完成-->
+<!--                      </el-button>-->
+<!--                    </span>-->
+<!--                  </el-form-item>-->
                 </el-form>
               </div>
             </el-card>
@@ -222,11 +222,13 @@
 	      	ref="view1"
 	      	:dialog-visible="view1Visible"
 	      	@close="viewClose"
+          @success="editSuccess"
 	    />
 	    <task-view2
 	      	ref="view2"
 	      	:dialog-visible="view2Visible"
 	      	@close="viewClose"
+          @success="editSuccess"
 	    />
 
       <!-- 【查看】组件 -->
@@ -234,6 +236,7 @@
 	      	ref="view3"
 	      	:dialog-visible="view3Visible"
 	      	@close="viewClose"
+          @success="editSuccess"
 	    />
   </div>
 </template>
@@ -247,6 +250,7 @@ import TaskView2 from "./components/View2";
 import TaskView3 from "./components/View3";
 import { fullScreen, exitFullScreen, initQueryParams } from "@/utils/commons";
 import stationMgrApi from "@/api/machiningClient/stationMgr";
+import taskMgrApi from "@/api/runManageCenter/taskMgr";
 export default {
   name: "TouchScreen",
   components: { TaskView,TaskView1,TaskView2,TaskView3 },
@@ -255,66 +259,10 @@ export default {
     return {
       queryParams: initQueryParams({}),
       options: [
-        { name: "上下料站1", value: 1 },
-        { name: "上下料站2", value: 2 },
-        { name: "上下料站2", value: 3 },
-        { name: "上下料站4", value: 4 },
       ],
-      opValue: 1,
+      currentStationId: "",
       taskCount: 6,
       taskData: [
-        {
-          id: 1,
-          taskName: "上料",
-          no: "12235566",
-          name: "框体",
-          taskNo: "OP10",
-          trayNo: "TP7788",
-          time: 15,
-          left: 2,
-          status: 1,
-          content: "完成装夹,rfid读写",
-          step: 1,
-        },
-        {
-          id: 2,
-          taskName: "翻面",
-          no: "12235566",
-          name: "框体",
-          taskNo: "OP50",
-          trayNo: "TP7788",
-          time: 25,
-          left: 6,
-          status: 1,
-          content: "",
-          step: 2,
-        },
-        {
-          id: 3,
-          taskName: "下料",
-          no: "12235566",
-          name: "框体",
-          taskNo: "OP90",
-          trayNo: "TP7788",
-          time: 5,
-          left: 1,
-          status: 0,
-          content: "",
-          step: 3,
-        },
-        {
-          id: 4,
-          taskName: "下料",
-          no: "12235566",
-          name: "框体",
-          taskNo: "OP90",
-          trayNo: "TP7788",
-          time: 5,
-          left: 1,
-          status: 0,
-          content: "",
-          step: 3
-        },
       ],
       finishData: [],
       current: 1,
@@ -328,7 +276,7 @@ export default {
   },
   // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
   created() {
-    this.fetch();
+    this.getStation();
   },
   computed: {
     currentUser() {
@@ -362,7 +310,7 @@ export default {
     selectChange(value) {
       console.log(value);
     },
-    fetch() {
+    getStation() {
       stationMgrApi
         .getStation({ userId: this.$store.state.account.user.id })
         .then((res) => {
@@ -370,10 +318,20 @@ export default {
           if (res.isSuccess) {
             if (res.data.length > 0) {
               this.options = res.data;
+              this.currentStationId = this.options[0].id
+              taskMgrApi.getStationTasks({ resourceId : this.currentStationId }).then((res) => {
+                res = res.data;
+                if (res.isSuccess) {
+                    if (res.data.length > 0) {
+                        this.taskData = res.data;
+                    }
+                }
+              });
             }
           }
         });
     },
+
     readView() {
       //this.tenantViewVisible = true
       this.$refs.view.read(null);
@@ -385,23 +343,25 @@ export default {
       return require(`@/assets/yunMap/${logo}`);
     },
     view (item) {
-        let that = this;
-        let current = that.options.filter(function (c, i, a) {
-          if (c.value == that.opValue) {
-             return c
-          }
-        })
-        item.procedurePosition = current[0].name;
-        let index = item.step;
-        if(index % 3 == 1){
-           this.$refs.view1.setTenant(item)
-           this.view1Visible = true
-        }else if(index % 3 == 2){
-           this.$refs.view2.setTenant(item)
-           this.view2Visible = true
-        }else if(index % 3 == 0){
-           this.$refs.view3.setTenant(item)
-           this.view3Visible = true
+        // let that = this;
+        // let current = that.options.filter(function (c, i, a) {
+        //   if (c.value == that.currentStationId) {
+        //      return c
+        //   }
+        // })
+        // item.procedurePosition = current[0].name;
+        // 只有开始中的页面可以点击进入详情页面操作
+        if(item.status === '2'){
+            if(item.taskName == '上料'){
+                this.$refs.view1.setTenant(item)
+                this.view1Visible = true
+            }else if(item.taskName == '翻面'){
+                this.$refs.view2.setTenant(item)
+                this.view2Visible = true
+            }else if(item.taskName == '下料'){
+                this.$refs.view3.setTenant(item)
+                this.view3Visible = true
+            }
         }
 	  },
     viewClose() {
@@ -409,6 +369,9 @@ export default {
       this.view2Visible = false
       this.view3Visible = false
     },
+    editSuccess(item){
+        this.finishTask(item)
+    },
     setPercentage(time, left) {
       return this.formatGap(time, left)[0] > 100
         ? 100
@@ -424,25 +387,35 @@ export default {
     formatGap(time, left) {
       return [Number(parseInt((100 * left) / time)), "剩余" + left + "分钟"];
     },
-    finishTask(item) {
-      item.status = 1;
-      this.taskCount = this.taskCount - 1;
-      let planTime = Math.ceil(Math.random() * 30);
-      let activeTime = Math.ceil(Math.random() * 30);
-      let currentTime = new Date();
-      //let currentTime2 = new Date(currentTime.valueOf() + activeTime * 60);
-	  currentTime.setMinutes(currentTime.getMinutes() + activeTime);
-      let finishParams = {
-        planTime: planTime,
-        activeTime: activeTime,
-        startTime: this.getFullTime(new Date()),
-        endTime: this.getFullTime(currentTime),
-        overTime: planTime < activeTime ? true : false,
-      };
-      let result = Object.assign(item, finishParams);
-      this.finishData.push(result);
-      console.log(this.finishData);
-      this.taskData.shift();
+    finishTask() {
+    //   item.status = 1;
+    //   this.taskCount = this.taskCount - 1;
+    //   let planTime = Math.ceil(Math.random() * 30);
+    //   let activeTime = Math.ceil(Math.random() * 30);
+    //   let currentTime = new Date();
+    //   //let currentTime2 = new Date(currentTime.valueOf() + activeTime * 60);
+	  // currentTime.setMinutes(currentTime.getMinutes() + activeTime);
+    //   let finishParams = {
+    //     planTime: planTime,
+    //     activeTime: activeTime,
+    //     startTime: this.getFullTime(new Date()),
+    //     endTime: this.getFullTime(currentTime),
+    //     overTime: planTime < activeTime ? true : false,
+    //   };
+    //   let result = Object.assign(item, finishParams);
+    //   this.finishData.push(result);
+    //   console.log(this.finishData);
+    //   this.taskData.shift();
+        // 查询最新的任务
+        taskMgrApi.getStationTasks({ resourceId : this.currentStationId }).then((res) => {
+            res = res.data;
+            if (res.isSuccess) {
+                if (res.data.length > 0) {
+                    this.taskData = res.data;
+                }
+            }
+        });
+
     },
     getFullTime(date) {
       var yy = date.getFullYear(); //年

+ 10 - 10
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View.vue

@@ -10,7 +10,7 @@
     	<!-- 任务信息 -->
         <el-steps :active="1" finish-status="success" simple style="margin-top: 20px">
   				<el-step title="夹具安装" >1111</el-step>
-  				<el-step title="物料装夹" >2222</el-step>  				
+  				<el-step title="物料装夹" >2222</el-step>
 		</el-steps>
 
 
@@ -71,7 +71,7 @@
     			</tr>
     		</table>
     	</el-row>
-    	
+
     	<!-- 自动化执行流程 -->
     	<el-row>
     		<p class="titleP">{{$t("runCenter.form.viewSched.autoLiuc")}}</p>
@@ -167,7 +167,7 @@
 		      	</template>
 		      </el-table-column>
 		    </el-table>
-    	</el-row>	
+    	</el-row>
     	<!-- 托盘夹具组 -->
     	<el-row>
     		<p class="titleP">{{$t("prepare.common.tpJgroup")}}</p>
@@ -209,9 +209,9 @@
 		      <el-table-column prop="armorPic" :label='$t("prepare.table.toolGroup.armorPic")' align="center" width="180px">
 		      	<template slot-scope="{ row }" v-if="row.category.key == '02'">
 		      		<div v-if="row.jjImgList && row.jjImgList.length > 0" class="demo-image__preview">
-							  <el-image 
+							  <el-image
 							    style="width: 100px; height: 60px"
-							    :src="row.jjImgList[0]" 
+							    :src="row.jjImgList[0]"
 							    :preview-src-list="row.jjImgList">
 							  </el-image>
 							</div>
@@ -228,7 +228,7 @@
 		      </el-table-column>
 		    </el-table>
     	</el-row>
-    		
+
     	<div slot="footer" class="dialog-footer">
 	      <el-button plain type="info" @click="isVisible = false">{{ $t('machining.buttons.noFinished') }}</el-button>
 	      <el-button type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('machining.buttons.finished') }}</el-button>
@@ -272,7 +272,7 @@ export default {
 	  	tableData1: [],
 	  	tableData2: [],
 	  	currentRow: null, // 当前选择的行
-	  	
+
 	  	spanArr: [],  // 【组序】合并单元格
 	    spanArr2: [],  // 【优先级】合并单元格
     }
@@ -370,7 +370,7 @@ export default {
         }
         // eslint-disable-next-line no-return-assign
       }).finally(() => this.loading = false)
-     
+
     },
     //获得数据相同的行数
  		rowspanFiled(data, filed) {
@@ -432,7 +432,7 @@ export default {
     // 根据【工艺id】查询详情信息
     getDetail(obj){
     	machiningClientApi.getTaskNodeProcessAnalysis(obj).then(res => {
-    		res = res.data 
+    		res = res.data
     		if(res.isSuccess){
     			console.log("详情信息:", res.data)
     			// 给各个组件赋值
@@ -515,4 +515,4 @@ export default {
 		background: #EEEEEE;
 		color: #333333;
 	}
-</style>
+</style>

+ 69 - 204
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View1.vue

@@ -1,6 +1,6 @@
 <template>
   <el-dialog
-    :title="$t(&quot;common.view&quot;)"
+    :title='$t("common.view")'
     width="80%"
     :append-to-body="true"
     :visible.sync="isVisible"
@@ -10,7 +10,7 @@
     	<!-- 任务信息 -->
         <el-steps :active="active" finish-status="success" simple style="margin:20px 0;">
   				<el-step title="夹具安装" ></el-step>
-  				<el-step title="物料装夹" ></el-step>  				
+  				<el-step title="物料装夹" ></el-step>
 		</el-steps>
 
     	<el-row v-show="this.active==1">
@@ -25,33 +25,33 @@
     				<td width="120">
                          <el-tag v-if="tenant.status == 0" type="info">{{$t("runCenter.common.schedulStatus.noStart")}}</el-tag>
 							<el-tag v-if="tenant.status == 1" type="">{{$t("runCenter.common.schedulStatus.run")}}</el-tag>
-							<el-tag v-if="tenant.status == 2" type="success">{{$t("runCenter.common.schedulStatus.finished")}}</el-tag> 
-					</td>    				
+							<el-tag v-if="tenant.status == 2" type="success">{{$t("runCenter.common.schedulStatus.finished")}}</el-tag>
+					</td>
     			</tr>
     			<tr>
 					<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.procedureDesc")+":"}}</td>
     				<td>{{tenant.taskName}}</td>
 					<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.content")+":"}}</td>
-    				<td width="200">{{tenant.content}}</td>    				
+    				<td width="200">{{tenant.content}}</td>
     			</tr>
 				<tr>
                     <td class="blodTd" align="center">{{$t("runCenter.form.viewSched.prepareWorkHours")+":"}}</td>
     				<td>{{tenant.time}}分钟</td>
     				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.procedurePosition")+":"}}</td>
     				<td>{{tenant.procedurePosition}}</td>
-				</tr>	
+				</tr>
     			<tr>
     				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.startTime")+":"}}</td>
-    				<td>{{tenant.bomDesc}}</td>
+    				<td>{{tenant.startTime}}</td>
     				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.endTime")+":"}}</td>
     				<td>{{tenant.endTime}}</td>
     			</tr>
     		</table>
-    	</el-row>    	
-    	
+    	</el-row>
+
     	<!-- 安装夹具 -->
     	<el-row v-show="this.active==1">
-    		<p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >ST1: 请安装夹具 <span style="color:red;margin-left:5px;font-size:14px;">系统检测夹具不足</span></p>
+    		<p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >ST1: 请安装夹具 <span style="color:red;margin-left:5px;font-size:14px;"></span></p>
     		<!-- Table数据 -->
 			<el-table
 		      ref="table"
@@ -67,9 +67,9 @@
 		      <el-table-column prop="type" :label='$t("prepare.table.tools.type")' align="center" ></el-table-column>
 			  <!-- 名称 -->
 		      <el-table-column prop="name" :label='$t("prepare.table.tools.name")' align="center"></el-table-column>
-		     
+
 		    </el-table>
-    	</el-row>	
+    	</el-row>
 
 		<!-- 装夹物料 -->
     	<el-row v-show="this.active>1">
@@ -83,26 +83,23 @@
 		      fit
 		      style="width: 100%;"
 		    >
-		      <!-- 编号 -->
-		      <el-table-column prop="no" :label='$t("prepare.table.tools.no")' align="center" ></el-table-column>
-		       <!-- 号 -->
-		      <el-table-column prop="type" :label='$t("prepare.table.tools.type")' align="center" ></el-table-column>
-			  <!-- 名称 -->
-		      <el-table-column prop="name" :label='$t("prepare.table.tools.name")' align="center"></el-table-column>
+		      <!-- 材料编码 -->
+		      <el-table-column prop="meterialCode" :label='$t("prepare.table.tools.no")' align="center" ></el-table-column>
+		       <!-- 材料牌号 -->
+		      <el-table-column prop="tradeMark" :label='$t("prepare.table.tools.type")' align="center" ></el-table-column>
+			  <!-- 材料名称 -->
+		      <el-table-column prop="equipmentName" :label='$t("prepare.table.tools.name")' align="center"></el-table-column>
               <!-- 装夹方式 -->
 		      <el-table-column prop="clampImg" :label='$t("prepare.table.tools.clampImg")' align="center">
                     <template slot-scope="{ row }">
                          <div class="block">
                              <el-image
       							style="width: 60px; height: 60px"
-      							:src="row.clampImg"
+      							:src="row.armorPic"
       							fit="fill"></el-image>
-						 </div>	 
+						 </div>
 					</template>
 			  </el-table-column>
-			  <!-- 备注 -->
-		      <el-table-column prop="remark" :label='$t("prepare.table.tools.name")' align="center"></el-table-column>		     
- 
 		    </el-table>
     	</el-row>
 
@@ -111,10 +108,10 @@
           <p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >输入零件编码    <el-button size="small" type="primary" @click.native="generate" round>系统生成</el-button></p>
           <el-input v-model="uniqueCode" placeholder="输入零件编码"></el-input>
 
-	    </el-row>		
-    	    		
+	    </el-row>
+
     	<div slot="footer" class="dialog-footer">
-		  <el-button plain type="info" @click.native="prev" v-show="this.active>1"  >返回上一步</el-button>		     
+		  <el-button plain type="info" @click.native="prev" v-show="this.active>1"  >返回上一步</el-button>
 	      <el-button type="primary" :disabled="confirmDisabled" @click.native="next" v-show="this.active==1">已完成,下一步</el-button>
 		  <el-button type="primary" :disabled="confirmDisabled" @click.native="submitForm" v-show="this.active>1">上料完成</el-button>
 	    </div>
@@ -123,18 +120,12 @@
 </template>
 <script>
 	// 【分页】组件
-	import Pagination from "@/components/Pagination"
-	// 【自动化程序管理】-API
-	import automatedProcessesApi from "@/api/prepareProductMgr/automatedProcesses"
-	// 【产品工艺版本管理】-API
-	import technologyVersionApi from "@/api/prepareProductMgr/technologyVersion"
-	// 【机加工人端】-API
-	import machiningClientApi from "@/api/machiningClient/machiningClient"
+  import taskMgrApi from "@/api/runManageCenter/taskMgr";
 	// 列表查询的共通参数
 	import { initQueryParams } from '@/utils/commons'
 export default {
   name: 'TaskView',
-  components: { Pagination },
+  components: { },
   props: {
     dialogVisible: {
       type: Boolean,
@@ -150,7 +141,7 @@ export default {
       tenant: {},
       queryParams: initQueryParams({}),
       loading: false,
-	  uniqueCode: '',	  
+	  uniqueCode: '',
     	tenantViewVisible: false,
     	tableKey: 0,
 	  	tableData: {
@@ -161,15 +152,13 @@ export default {
 		},
 	  	tableData2: [],
 	  	currentRow: null, // 当前选择的行
-	  	
+
 	  	spanArr: [],  // 【组序】合并单元格
 	    spanArr2: [],  // 【优先级】合并单元格
     }
   },
   // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
   created() {
-  	// 加载列表数据
-  	// this.fetch()
 	},
   computed: {
     isVisible: {
@@ -191,35 +180,23 @@ export default {
   methods: {
 	prev(){
       if (this.active-- < 0) this.active = 0;
-	},  
+	},
 	next(){
-       if (this.active++ > 1) this.active = 0;
-	},  
+	    // TODO 写入rfid内容(子盘信息和夹具信息)
+      if (this.active++ > 1) this.active = 0;
+	},
   	submitForm(){
-		/*  
-  		let obj = {
-  			taskNode: this.tenant,
-  			meterialList: this.tableData1,
-  			procedureTrayList: this.tableData2
-  		}
-  		console.log("表单数据:", obj)
-  		// return false
-  		machiningClientApi.finishTaskNode(obj).then((response) => {
-	      const res = response.data
-	      if (res.isSuccess) {
-	        this.isVisible = false
-	        this.$message({
-	          message: this.$t('tips.updateSuccess'),
-	          type: 'success'
-	        })
-	        // 通知列表
-	        this.$emit("success");
-	      }
-	    }).finally(() => {
-	      this.confirmDisabled = false
-	      return true
-	    }) */
-		this.isVisible = false;
+      // 更新改任务的开始时间
+      // TODO 写入rfid内容,工件信息、原材料
+      taskMgrApi.updateTaskStatus({ "id" : this.tenant.id, "updateType" : "end"}).then((res) => {
+          res = res.data;
+          if (res.isSuccess) {
+              // 通知列表
+              this.$emit("success");
+              // 通知列表-并关闭弹出框
+              this.$emit("close");
+          }
+      });
   	},
   	// table的当前行值变化后
   	handleCurrentChange(val) {
@@ -240,148 +217,36 @@ export default {
     },
     setTenant (val) {
       this.tenant = { ...val }
-      // 加载上部门2个数据
-  		this.fetch()
-  		// 加载下部分2个数据
-  		//this.getDetail(val)
-    },
-    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.taskId, procedureId: this.tenant.procedureId, orderId: this.tenant.orderId}).then(response => {
-        const res = response.data
+      // 添加数据
+      this.tableData.records = []
+      // 添加数据
+      this.tableData.records.push({
+          no: this.tenant.clampNo,
+          name: this.tenant.clampName
+      })
+
+      this.tableData1.records = []
+      // 添加数据
+      this.tableData1.records.push({
+          meterialCode: this.tenant.meterialCode,
+          equipmentName: this.tenant.equipmentName,
+          tradeMark: this.tenant.tradeMark,
+          armorPic: this.tenant.armorPic,
+      })
+
+      // 更新改任务的开始时间
+      taskMgrApi.updateTaskStatus({ "id" : this.tenant.id, "updateType" : "begin"}).then((res) => {
+        res = res.data;
         if (res.isSuccess) {
-          this.tableData.records = res.data
-        }
-        // eslint-disable-next-line no-return-assign
-      }).finally(() => this.loading = false) */
-	  this.tableData.records = [{'no':'龙威夹','type':'&230','name':'龙威'}];
-	  this.tableData1.records = [{'no':'龙威夹','type':'&230','name':'龙威','clampImg':require(`@/assets/yunMap/clampImg.png`),'remark':'备注'}];
-	  this.loading = false;
-     
-    },
-    //获得数据相同的行数
- 	rowspanFiled(data, filed) {
- 			let spanArr5 = [];
-	    data.forEach((item,index) => {
-        if( index === 0){
-            spanArr5.push(1);
-            this.position = 0;
-        }else{
-            if(data[index].groupSort === data[index-1].groupSort && data[index][filed] === data[index-1][filed]){
-                spanArr5[this.position] += 1;
-                spanArr5.push(0);
-            }else{
-                spanArr5.push(1);
-                this.position = index;
-            }
+          console.log("update task startTime success");
         }
-	    })
-	    return spanArr5;
-    },
-    //合并
- 		objectSpanMethod({ row, column, rowIndex, columnIndex }) {  //表格合并行
-	    if (columnIndex === 0) {
-	        let _row = this.spanArr[rowIndex];
-	        let _col = _row > 0 ? 1 : 0;
-	        return {
-	            rowspan: _row,
-	            colspan: _col
-	        }
-	    }
-	    if(columnIndex === 1){
-	        let _row = this.spanArr2[rowIndex];
-	        let _col = _row > 0 ? 1 : 0;
-	        return {
-	            rowspan: _row,
-	            colspan: _col
-	        }
-	    }
-    },
-    //合并
- 		objectSpanMethod({ row, column, rowIndex, columnIndex }) {  //表格合并行
-	    if (columnIndex === 0) {
-	        let _row = this.spanArr[rowIndex];
-	        let _col = _row > 0 ? 1 : 0;
-	        return {
-	            rowspan: _row,
-	            colspan: _col
-	        }
-	    }
-	    if(columnIndex === 1){
-	        let _row = this.spanArr2[rowIndex];
-	        let _col = _row > 0 ? 1 : 0;
-	        return {
-	            rowspan: _row,
-	            colspan: _col
-	        }
-	    }
+      });
+
+
     },
-    // 根据【工艺id】查询详情信息
-    getDetail(obj){
-		/*		
-    	machiningClientApi.getTaskNodeProcessAnalysis(obj).then(res => {
-    		res = res.data 
-    		if(res.isSuccess){
-    			console.log("详情信息:", res.data)
-    			// 给各个组件赋值
-		    	// 把【设备】的数据,给【程序】使用
-		    	// this.setProgram(eqList)
-		    	// 获取【所需原材料】数据
-		    	this.tableData1 = this.setKeyList(res.data.meterialList)
-		    	// 获取【托盘夹具组】数据
-		    	this.tableData2 = this.setKeyList(res.data.procedureTrayList, 'tray')
-		    	// 要合并列的准备数据
-		    	if(this.tableData2.length > 0){
-		    		this.spanArr = this.rowspanFiled(this.tableData2, "groupSort")
-				  	this.spanArr2 = this.rowspanFiled(this.tableData2, "groupPrority")
-		    	}
-    		}
-    	}) */		
+    close () {
+      this.$emit('close')
     },
-    // 赋值前处理-添加key数据健
-    setKeyList(list, flag){
-    	if(list.length > 0){
-    		let arr = []
-    		list.forEach(item => {
-    			// 添加唯一键
-	    		item.key = ''+ Math.random()
-	    		// 如果是托盘夹具的时候,组装分类
-	    		if(flag == 'tray'){
-	    			// 把【组序】和【优先级】改成字符串
-	    			//item.groupSort = ''+ item.groupSort
-	    			//item.groupPrority = ''+ item.groupPrority
-	    			// 给图片一个列表数据,jjImgList
-	    			item.jjImgList = []
-	    			if(!!item.armorPic){
-	    				item.jjImgList.push(item.armorPic)
-	    			}
-	    			// 添加类型
-	    			if(item.bizType == '1'){
-	    				item.category = {key: '03',data: '托盘'}
-	    			}else{
-	    				item.category = {key: '02',data: '夹具'}
-	    			}
-	    		}
-	    		arr.push(item)
-	    	})
-    		list = arr
-    	}
-    	return list
-    }
   }
 }
 </script>
@@ -417,4 +282,4 @@ export default {
 		background: #EEEEEE;
 		color: #333333;
 	}
-</style>
+</style>

+ 48 - 210
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View2.vue

@@ -20,29 +20,29 @@
     				<td width="120">
                          <el-tag v-if="tenant.status == 0" type="info">{{$t("runCenter.common.schedulStatus.noStart")}}</el-tag>
 							<el-tag v-if="tenant.status == 1" type="">{{$t("runCenter.common.schedulStatus.run")}}</el-tag>
-							<el-tag v-if="tenant.status == 2" type="success">{{$t("runCenter.common.schedulStatus.finished")}}</el-tag> 
-					</td>    				
+							<el-tag v-if="tenant.status == 2" type="success">{{$t("runCenter.common.schedulStatus.finished")}}</el-tag>
+					</td>
     			</tr>
     			<tr>
 					<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.procedureDesc")+":"}}</td>
     				<td>{{tenant.taskName}}</td>
 					<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.content")+":"}}</td>
-    				<td width="200">{{tenant.content}}</td>    				
+    				<td width="200">{{tenant.content}}</td>
     			</tr>
 				<tr>
                     <td class="blodTd" align="center">{{$t("runCenter.form.viewSched.prepareWorkHours")+":"}}</td>
     				<td>{{tenant.time}}分钟</td>
     				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.procedurePosition")+":"}}</td>
     				<td>{{tenant.procedurePosition}}</td>
-				</tr>	
+				</tr>
     			<tr>
     				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.startTime")+":"}}</td>
-    				<td>{{tenant.bomDesc}}</td>
+    				<td>{{tenant.startTime}}</td>
     				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.endTime")+":"}}</td>
     				<td>{{tenant.endTime}}</td>
     			</tr>
     		</table>
-    	</el-row> 
+    	</el-row>
 
     	<!-- 装夹物料 -->
     	<el-row>
@@ -56,49 +56,42 @@
 		      fit
 		      style="width: 100%;"
 		    >
-		      <!-- 编号 -->
-		      <el-table-column prop="no" :label='$t("prepare.table.tools.no")' align="center" ></el-table-column>
-		       <!-- 编号 -->
-		      <el-table-column prop="type" :label='$t("prepare.table.tools.type")' align="center" ></el-table-column>
-			  <!-- 名称 -->
-		      <el-table-column prop="name" :label='$t("prepare.table.tools.name")' align="center"></el-table-column>
-              <!-- 装夹方式 -->
-		      <el-table-column prop="clampImg" :label='$t("prepare.table.tools.clampImg")' align="center">
-                    <template slot-scope="{ row }">
-                         <div class="block">
-                             <el-image
-      							style="width: 60px; height: 60px"
-      							:src="row.clampImg"
-      							fit="fill"></el-image>
-						 </div>	 
-					</template>
-			  </el-table-column>
+        <!-- 材料编码 -->
+        <el-table-column prop="meterialCode" :label='$t("prepare.table.tools.no")' align="center" ></el-table-column>
+        <!-- 材料牌号 -->
+        <el-table-column prop="tradeMark" :label='$t("prepare.table.tools.type")' align="center" ></el-table-column>
+        <!-- 材料名称 -->
+        <el-table-column prop="equipmentName" :label='$t("prepare.table.tools.name")' align="center"></el-table-column>
+        <!-- 装夹方式 -->
+        <el-table-column prop="clampImg" :label='$t("prepare.table.tools.clampImg")' align="center">
+          <template slot-scope="{ row }">
+            <div class="block">
+              <el-image
+                style="width: 60px; height: 60px"
+                :src="row.armorPic"
+                fit="fill"></el-image>
+            </div>
+          </template>
+        </el-table-column>
 			  <!-- 备注 -->
-		      <el-table-column prop="remark" :label='$t("prepare.table.tools.name")' align="center"></el-table-column>		     
- 
+		      <el-table-column prop="remark" :label='$t("prepare.table.tools.name")' align="center"></el-table-column>
+
 		    </el-table>
     	</el-row>
-    		
-    	<div slot="footer" class="dialog-footer">	     
+
+    	<div slot="footer" class="dialog-footer">
 	      <el-button type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('machining.buttons.finished') }}</el-button>
 	    </div>
     </div>
   </el-dialog>
 </template>
 <script>
-	// 【分页】组件
-	import Pagination from "@/components/Pagination"
-	// 【自动化程序管理】-API
-	import automatedProcessesApi from "@/api/prepareProductMgr/automatedProcesses"
-	// 【产品工艺版本管理】-API
-	import technologyVersionApi from "@/api/prepareProductMgr/technologyVersion"
-	// 【机加工人端】-API
-	import machiningClientApi from "@/api/machiningClient/machiningClient"
 	// 列表查询的共通参数
 	import { initQueryParams } from '@/utils/commons'
+  import taskMgrApi from "@/api/runManageCenter/taskMgr";
 export default {
   name: 'TaskView',
-  components: { Pagination },
+  components: { },
   props: {
     dialogVisible: {
       type: Boolean,
@@ -118,18 +111,10 @@ export default {
 	  	tableData: {
 	    	total: 0
 	  	},
-	  	tableData1: [],
-	  	tableData2: [],
-	  	currentRow: null, // 当前选择的行
-	  	
-	  	spanArr: [],  // 【组序】合并单元格
-	    spanArr2: [],  // 【优先级】合并单元格
     }
   },
   // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
   created() {
-  	// 加载列表数据
-  	// this.fetch()
 	},
   computed: {
     isVisible: {
@@ -150,36 +135,17 @@ export default {
   },
   methods: {
   	submitForm(){
-	  /*
-  		let obj ={
-  			taskNode: this.tenant,
-  			meterialList: this.tableData1,
-  			procedureTrayList: this.tableData2
-  		}
-  		console.log("表单数据:", obj)
-  		// return false
-  		machiningClientApi.finishTaskNode(obj).then((response) => {
-	      const res = response.data
-	      if (res.isSuccess) {
-	        this.isVisible = false
-	        this.$message({
-	          message: this.$t('tips.updateSuccess'),
-	          type: 'success'
-	        })
-	        // 通知列表
-	        this.$emit("success");
-	      }
-	    }).finally(() => {
-	      this.confirmDisabled = false
-	      return true
-	    }) */
-		this.isVisible = false;
-  	},
-  	// table的当前行值变化后
-  	handleCurrentChange(val) {
-			// 设置当前行
-    	this.currentRow = val;
+      taskMgrApi.updateTaskStatus({ "id" : this.tenant.id, "updateType" : "end"}).then((res) => {
+          res = res.data;
+          if (res.isSuccess) {
+              // 通知列表
+              this.$emit("success");
+              // 通知列表-并关闭弹出框
+              this.$emit("close");
+          }
+      });
   	},
+  	// table的当前行值变
     initWidth () {
       this.screenWidth = document.body.clientWidth
       if (this.screenWidth < 550) {
@@ -194,146 +160,18 @@ export default {
     },
     setTenant (val) {
       this.tenant = { ...val }
-      // 加载上部门2个数据
-  		this.fetch()
-  		// 加载下部分2个数据
-  		this.getDetail(val)
+      // 添加数据
+      this.tableData.records = []
+      this.tableData.records.push({
+          meterialCode: this.tenant.meterialCode,
+          equipmentName: this.tenant.equipmentName,
+          tradeMark: this.tenant.tradeMark,
+          armorPic: this.tenant.armorPic,
+      })
     },
     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.taskId, 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) */
-	  this.tableData.records = [{'no':'龙威夹','type':'&230','name':'龙威','clampImg':require(`@/assets/yunMap/clampImg.png`),'remark':'备注'}];
-	  this.loading = false;     
-    },
-    //获得数据相同的行数
- 		rowspanFiled(data, filed) {
- 			let spanArr5 = [];
-	    data.forEach((item,index) => {
-        if( index === 0){
-            spanArr5.push(1);
-            this.position = 0;
-        }else{
-            if(data[index].groupSort === data[index-1].groupSort && data[index][filed] === data[index-1][filed]){
-                spanArr5[this.position] += 1;
-                spanArr5.push(0);
-            }else{
-                spanArr5.push(1);
-                this.position = index;
-            }
-        }
-	    })
-	    return spanArr5;
-    },
-    //合并
- 		objectSpanMethod({ row, column, rowIndex, columnIndex }) {  //表格合并行
-	    if (columnIndex === 0) {
-	        let _row = this.spanArr[rowIndex];
-	        let _col = _row > 0 ? 1 : 0;
-	        return {
-	            rowspan: _row,
-	            colspan: _col
-	        }
-	    }
-	    if(columnIndex === 1){
-	        let _row = this.spanArr2[rowIndex];
-	        let _col = _row > 0 ? 1 : 0;
-	        return {
-	            rowspan: _row,
-	            colspan: _col
-	        }
-	    }
-    },
-    //合并
- 		objectSpanMethod({ row, column, rowIndex, columnIndex }) {  //表格合并行
-	    if (columnIndex === 0) {
-	        let _row = this.spanArr[rowIndex];
-	        let _col = _row > 0 ? 1 : 0;
-	        return {
-	            rowspan: _row,
-	            colspan: _col
-	        }
-	    }
-	    if(columnIndex === 1){
-	        let _row = this.spanArr2[rowIndex];
-	        let _col = _row > 0 ? 1 : 0;
-	        return {
-	            rowspan: _row,
-	            colspan: _col
-	        }
-	    }
-    },
-    // 根据【工艺id】查询详情信息
-    getDetail(obj){
-		/*
-    	machiningClientApi.getTaskNodeProcessAnalysis(obj).then(res => {
-    		res = res.data 
-    		if(res.isSuccess){
-    			console.log("详情信息:", res.data)
-    			// 给各个组件赋值
-		    	// 把【设备】的数据,给【程序】使用
-		    	// this.setProgram(eqList)
-		    	// 获取【所需原材料】数据
-		    	this.tableData1 = this.setKeyList(res.data.meterialList)
-		    	// 获取【托盘夹具组】数据
-		    	this.tableData2 = this.setKeyList(res.data.procedureTrayList, 'tray')
-		    	// 要合并列的准备数据
-		    	if(this.tableData2.length > 0){
-		    		this.spanArr = this.rowspanFiled(this.tableData2, "groupSort")
-				  	this.spanArr2 = this.rowspanFiled(this.tableData2, "groupPrority")
-		    	}
-    		}
-    	}) */
-    },
-    // 赋值前处理-添加key数据健
-    setKeyList(list, flag){
-    	if(list.length > 0){
-    		let arr = []
-    		list.forEach(item => {
-    			// 添加唯一键
-	    		item.key = ''+ Math.random()
-	    		// 如果是托盘夹具的时候,组装分类
-	    		if(flag == 'tray'){
-	    			// 把【组序】和【优先级】改成字符串
-	    			//item.groupSort = ''+ item.groupSort
-	    			//item.groupPrority = ''+ item.groupPrority
-	    			// 给图片一个列表数据,jjImgList
-	    			item.jjImgList = []
-	    			if(!!item.armorPic){
-	    				item.jjImgList.push(item.armorPic)
-	    			}
-	    			// 添加类型
-	    			if(item.bizType == '1'){
-	    				item.category = {key: '03',data: '托盘'}
-	    			}else{
-	    				item.category = {key: '02',data: '夹具'}
-	    			}
-	    		}
-	    		arr.push(item)
-	    	})
-    		list = arr
-    	}
-    	return list
-    }
   }
 }
 </script>
@@ -369,4 +207,4 @@ export default {
 		background: #EEEEEE;
 		color: #333333;
 	}
-</style>
+</style>

+ 43 - 200
imcs-ui/src/views/zuihou/machiningClient/touchScreen/components/View3.vue

@@ -1,6 +1,6 @@
 <template>
   <el-dialog
-    :title="$t(&quot;common.view&quot;)"
+    :title='$t("common.view")'
     width="80%"
     :append-to-body="true"
     :visible.sync="isVisible"
@@ -20,30 +20,30 @@
     				<td width="120">
                          <el-tag v-if="tenant.status == 0" type="info">{{$t("runCenter.common.schedulStatus.noStart")}}</el-tag>
 							<el-tag v-if="tenant.status == 1" type="">{{$t("runCenter.common.schedulStatus.run")}}</el-tag>
-							<el-tag v-if="tenant.status == 2" type="success">{{$t("runCenter.common.schedulStatus.finished")}}</el-tag> 
-					</td>    				
+							<el-tag v-if="tenant.status == 2" type="success">{{$t("runCenter.common.schedulStatus.finished")}}</el-tag>
+					</td>
     			</tr>
     			<tr>
 					<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.procedureDesc")+":"}}</td>
     				<td>{{tenant.taskName}}</td>
 					<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.content")+":"}}</td>
-    				<td width="200">{{tenant.content}}</td>    				
+    				<td width="200">{{tenant.content}}</td>
     			</tr>
 				<tr>
                     <td class="blodTd" align="center">{{$t("runCenter.form.viewSched.prepareWorkHours")+":"}}</td>
     				<td>{{tenant.time}}分钟</td>
     				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.procedurePosition")+":"}}</td>
     				<td>{{tenant.procedurePosition}}</td>
-				</tr>	
+				</tr>
     			<tr>
     				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.startTime")+":"}}</td>
-    				<td>{{tenant.bomDesc}}</td>
+    				<td>{{tenant.startTime}}</td>
     				<td class="blodTd" align="center">{{$t("runCenter.form.viewSched.endTime")+":"}}</td>
     				<td>{{tenant.endTime}}</td>
     			</tr>
     		</table>
-    	</el-row> 	
-    	
+    	</el-row>
+
     	<!-- 拆除零件 -->
     	<el-row>
     		<p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >ST1 拆除零件   <el-button size="small" type="primary" @click.native="release" round>拆除夹具</el-button></p>
@@ -56,47 +56,40 @@
 		      fit
 		      style="width: 100%;"
 		    >
-		      <!-- 编号 -->
-		      <el-table-column prop="no" :label='$t("prepare.table.tools.no")' align="center" ></el-table-column>
-		       <!-- 编号 -->
-		      <el-table-column prop="type" :label='$t("prepare.table.tools.type")' align="center" ></el-table-column>
-			  <!-- 名称 -->
-		      <el-table-column prop="name" :label='$t("prepare.table.tools.name")' align="center"></el-table-column>
-		       
+        <!-- 材料编码 -->
+        <el-table-column prop="meterialCode" :label='$t("prepare.table.tools.no")' align="center" ></el-table-column>
+        <!-- 材料牌号 -->
+        <el-table-column prop="tradeMark" :label='$t("prepare.table.tools.type")' align="center" ></el-table-column>
+        <!-- 材料名称 -->
+        <el-table-column prop="equipmentName" :label='$t("prepare.table.tools.name")' align="center"></el-table-column>
+
 			  <el-table-column prop="name" :label='$t("prepare.table.tools.name")' align="center">
 				   <template slot-scope="{ row }">
                        <el-button  size="small"  type="primary" @click.native="print(row)" round >打印零件编码</el-button>
-				   </template>	   
-			  </el-table-column> 
-		    
+				   </template>
+			  </el-table-column>
+
 			</el-table>
     	</el-row>
     	<!-- 拆除夹具 -->
     	<el-row>
     		<p class="titleP" style="margin-top:15px;color:#000;font-size:18px;">ST2 拆除夹具</p>
-    		<el-tag size="medium" style="margin:10px;font-size:15px;"> 人工拆除夹具并放入夹具库</el-tag>			
+    		<el-tag size="medium" style="margin:10px;font-size:15px;"> 人工拆除夹具并放入夹具库</el-tag>
     	</el-row>
-    		
-    	<div slot="footer" class="dialog-footer">	      
+
+    	<div slot="footer" class="dialog-footer">
 	      <el-button type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('machining.buttons.finished') }}</el-button>
 	    </div>
     </div>
   </el-dialog>
 </template>
 <script>
-	// 【分页】组件
-	import Pagination from "@/components/Pagination"
-	// 【自动化程序管理】-API
-	import automatedProcessesApi from "@/api/prepareProductMgr/automatedProcesses"
-	// 【产品工艺版本管理】-API
-	import technologyVersionApi from "@/api/prepareProductMgr/technologyVersion"
-	// 【机加工人端】-API
-	import machiningClientApi from "@/api/machiningClient/machiningClient"
 	// 列表查询的共通参数
 	import { initQueryParams } from '@/utils/commons'
+  import taskMgrApi from "@/api/runManageCenter/taskMgr";
 export default {
   name: 'TaskView',
-  components: { Pagination },
+  components: { },
   props: {
     dialogVisible: {
       type: Boolean,
@@ -119,7 +112,7 @@ export default {
 	  	tableData1: [],
 	  	tableData2: [],
 	  	currentRow: null, // 当前选择的行
-	  	
+
 	  	spanArr: [],  // 【组序】合并单元格
 	    spanArr2: [],  // 【优先级】合并单元格
     }
@@ -149,40 +142,20 @@ export default {
   methods: {
 	release(){
 
-	},  
+	},
 	print(row){
 
 	},
   	submitForm(){
-		  /*
-  		let obj ={
-  			taskNode: this.tenant,
-  			meterialList: this.tableData1,
-  			procedureTrayList: this.tableData2
-  		}
-  		console.log("表单数据:", obj)
-  		// return false
-  		machiningClientApi.finishTaskNode(obj).then((response) => {
-	      const res = response.data
-	      if (res.isSuccess) {
-	        this.isVisible = false
-	        this.$message({
-	          message: this.$t('tips.updateSuccess'),
-	          type: 'success'
-	        })
-	        // 通知列表
-	        this.$emit("success");
-	      }
-	    }).finally(() => {
-	      this.confirmDisabled = false
-	      return true
-	    }) */
-		this.isVisible = false;
-  	},
-  	// table的当前行值变化后
-  	handleCurrentChange(val) {
-			// 设置当前行
-    	this.currentRow = val;
+        taskMgrApi.updateTaskStatus({ "id" : this.tenant.id, "updateType" : "end"}).then((res) => {
+            res = res.data;
+            if (res.isSuccess) {
+                // 通知列表
+                this.$emit("success");
+                // 通知列表-并关闭弹出框
+                this.$emit("close");
+            }
+        });
   	},
     initWidth () {
       this.screenWidth = document.body.clientWidth
@@ -198,148 +171,18 @@ export default {
     },
     setTenant (val) {
       this.tenant = { ...val }
-      // 加载上部门2个数据
-  		this.fetch()
-  		// 加载下部分2个数据
-  		this.getDetail(val)
+      // 添加数据
+      this.tableData.records = []
+      this.tableData.records.push({
+          meterialCode: this.tenant.meterialCode,
+          equipmentName: this.tenant.equipmentName,
+          tradeMark: this.tenant.tradeMark,
+          armorPic: this.tenant.armorPic,
+      })
     },
     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.taskId, 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) */
-	  this.tableData.records = [{'no':'龙威夹','type':'&230','name':'龙威'}];
-	  this.loading = false;
-
-     
-    },
-    //获得数据相同的行数
- 		rowspanFiled(data, filed) {
- 			let spanArr5 = [];
-	    data.forEach((item,index) => {
-        if( index === 0){
-            spanArr5.push(1);
-            this.position = 0;
-        }else{
-            if(data[index].groupSort === data[index-1].groupSort && data[index][filed] === data[index-1][filed]){
-                spanArr5[this.position] += 1;
-                spanArr5.push(0);
-            }else{
-                spanArr5.push(1);
-                this.position = index;
-            }
-        }
-	    })
-	    return spanArr5;
-    },
-    //合并
- 		objectSpanMethod({ row, column, rowIndex, columnIndex }) {  //表格合并行
-	    if (columnIndex === 0) {
-	        let _row = this.spanArr[rowIndex];
-	        let _col = _row > 0 ? 1 : 0;
-	        return {
-	            rowspan: _row,
-	            colspan: _col
-	        }
-	    }
-	    if(columnIndex === 1){
-	        let _row = this.spanArr2[rowIndex];
-	        let _col = _row > 0 ? 1 : 0;
-	        return {
-	            rowspan: _row,
-	            colspan: _col
-	        }
-	    }
-    },
-    //合并
- 		objectSpanMethod({ row, column, rowIndex, columnIndex }) {  //表格合并行
-	    if (columnIndex === 0) {
-	        let _row = this.spanArr[rowIndex];
-	        let _col = _row > 0 ? 1 : 0;
-	        return {
-	            rowspan: _row,
-	            colspan: _col
-	        }
-	    }
-	    if(columnIndex === 1){
-	        let _row = this.spanArr2[rowIndex];
-	        let _col = _row > 0 ? 1 : 0;
-	        return {
-	            rowspan: _row,
-	            colspan: _col
-	        }
-	    }
-    },
-    // 根据【工艺id】查询详情信息
-    getDetail(obj){
-		/*
-    	machiningClientApi.getTaskNodeProcessAnalysis(obj).then(res => {
-    		res = res.data 
-    		if(res.isSuccess){
-    			console.log("详情信息:", res.data)
-    			// 给各个组件赋值
-		    	// 把【设备】的数据,给【程序】使用
-		    	// this.setProgram(eqList)
-		    	// 获取【所需原材料】数据
-		    	this.tableData1 = this.setKeyList(res.data.meterialList)
-		    	// 获取【托盘夹具组】数据
-		    	this.tableData2 = this.setKeyList(res.data.procedureTrayList, 'tray')
-		    	// 要合并列的准备数据
-		    	if(this.tableData2.length > 0){
-		    		this.spanArr = this.rowspanFiled(this.tableData2, "groupSort")
-				  	this.spanArr2 = this.rowspanFiled(this.tableData2, "groupPrority")
-		    	}
-    		}
-    	}) */
-    },
-    // 赋值前处理-添加key数据健
-    setKeyList(list, flag){
-    	if(list.length > 0){
-    		let arr = []
-    		list.forEach(item => {
-    			// 添加唯一键
-	    		item.key = ''+ Math.random()
-	    		// 如果是托盘夹具的时候,组装分类
-	    		if(flag == 'tray'){
-	    			// 把【组序】和【优先级】改成字符串
-	    			//item.groupSort = ''+ item.groupSort
-	    			//item.groupPrority = ''+ item.groupPrority
-	    			// 给图片一个列表数据,jjImgList
-	    			item.jjImgList = []
-	    			if(!!item.armorPic){
-	    				item.jjImgList.push(item.armorPic)
-	    			}
-	    			// 添加类型
-	    			if(item.bizType == '1'){
-	    				item.category = {key: '03',data: '托盘'}
-	    			}else{
-	    				item.category = {key: '02',data: '夹具'}
-	    			}
-	    		}
-	    		arr.push(item)
-	    	})
-    		list = arr
-    	}
-    	return list
-    }
   }
 }
 </script>
@@ -375,4 +218,4 @@ export default {
 		background: #EEEEEE;
 		color: #333333;
 	}
-</style>
+</style>