ソースを参照

前端页面功能处理

oyq28 3 ヶ月 前
コミット
8ba44e3c63

+ 543 - 0
imcs-ui/src/views/zuihou/machiningClient/jbwTasks/Index.vue

@@ -0,0 +1,543 @@
+<template>
+  <div
+    id="playerMap"
+    ref="playerMap"
+    class="app-container yunMapDiv"
+    style="height: 200%"
+  >
+    <!-- 全屏 -->
+    <el-row :gutter="20" class="rowCls">
+      <div class="headerBg">
+        <h2>现场工控端</h2>
+        <div class="battonDiv">
+          <el-tooltip
+            v-if="!isFullSreen"
+            class="item"
+            effect="dark"
+            :content="$t('largeScreen.common.screening')"
+            placement="top-start"
+          >
+            <a @click="fullPing()"><i class="el-icon-full-screen"></i></a>
+          </el-tooltip>
+          <el-tooltip
+            v-else
+            class="item"
+            effect="dark"
+            :content="$t('largeScreen.common.cancel')"
+            placement="top-start"
+          >
+            <a @click="exitFullPing()"><i class="el-icon-switch-button"></i></a>
+          </el-tooltip>
+        </div>
+      </div>     
+    </el-row>
+
+    <!-- 区域模块 -->
+    <div style="text-align: left; margin-left: 5%">
+      <!-- 搜索-部分 -->
+      <div class="defaultRow noBorder" style="margin-left: 2%;z-index:9999;">
+        <el-select
+          v-model="currentStationId"
+          :span="2"
+          @change="selectChange"
+          :placeholder="$t('common.pleaseSelect')"
+        >
+          <el-option
+            v-for="item in options"
+            :key="item.id"
+            :label="item.name"
+            :value="item.id"
+          >
+          </el-option>
+        </el-select>
+
+        <span :span="2" style="margin-left: 2%" v-if="false">
+          <el-button
+            plain
+            type="primary"
+            icon="el-icon-view"
+            size="medium"
+            @click="readView"            
+          >
+            读RFID
+          </el-button>
+        </span>
+        <span :span="2" style="margin-right: 5%; float: right">
+          <el-button
+            plain
+            type="primary"
+            icon="el-icon-view"
+            size="medium"
+            @click="navigator"
+          >
+            我的班表
+          </el-button>
+        </span>
+      </div>
+
+      <el-tabs style="text-align: left; margin-top: 25px;z-index:10;" @tab-click="tabClick">
+        <el-tab-pane label="未完成">
+          <span class="tabTitle" slot="label"
+            ><el-badge :value="taskCount" class="badge"
+              ><i class="el-icon-date"></i> 未完成</el-badge
+            >
+          </span>
+          <el-col
+            :span="11"
+            :gutter="24"
+            v-for="(item, index) in taskData.slice(0, 2)"
+            :key="item.id"
+            :offset="index == 0 ? 0 : 1"
+            v-show="item.status < 3 ? true : false"
+            style="zoom:1;min-width:300px;"            
+          >
+            <el-card :gutter="24" class="box-card" style="margin: 5px" >
+              <div class="card_content" >
+                <el-tag effect="dark" style="float:right;" v-if="item.deviceName" >{{ item.deviceName }}</el-tag>
+                <div class="block card_header" @click="view(item)">
+                  <el-image
+                    style="
+                      width: 90px;
+                      height: 80px;
+                      max-width: 200%;
+                      max-height: 200%;
+                    "
+                    :src="resolveLogo('status' + (index + 1) + '.png')"
+                    fit="fill"
+                  >
+                  </el-image>
+                  
+                  <span style="text-align: center;"><h2>{{ item.name }}</h2></span>
+                  <div class="itemNo" style="margin-top: 10px" >编号: {{ item.code }}</div>
+                </div>
+                <el-form style="margin-top: 10px">
+                  <el-form-item label="产线名称:">
+                    <span>{{ currentStationName }}</span>
+                  </el-form-item>                 
+                  <el-form-item label="设备在线:">
+                    <span>{{ item.onlineStatus=="1"? "在线":"不在线" }}</span>
+                  </el-form-item>
+                  <el-form-item label="设备可用:">
+                    <span>{{ item.status=="1"? "可用":"不可用" }}</span>
+                  </el-form-item>                 
+                </el-form>
+              </div>
+            </el-card>
+          </el-col>
+        </el-tab-pane>
+        <el-tab-pane label="已完成">
+          <span class="tabTitle" slot="label">
+            <i class="el-icon-date"></i> 已完成
+          </span>
+          <div class="tableTransparent">
+            <el-table
+			        style="height:100%;min-height:80px;"
+              :header-cell-style="{ background: '#1890ff', color: '#fff' }"
+              :key="tableKey"
+              ref="table"
+              v-loading="loading"
+              :data="tableData.records"
+              border
+              fit
+              row-key="id"
+            >
+              <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="name" label="零件名称" align="center">
+              </el-table-column>
+              <el-table-column prop="procedureNo" label="工序号" width="80" align="center">
+              </el-table-column>
+              <el-table-column prop="procedureName" label="工序名称" align="center">
+              </el-table-column>
+              <el-table-column prop="ratedWorkHours" label="额定时间" width="100" align="center">
+              </el-table-column>
+              <el-table-column prop="activeTime" label="实际时间" width="100" align="center">
+              </el-table-column>
+              <el-table-column prop="startTime" label="开始时间" width="150" align="center">
+              </el-table-column>
+              <el-table-column prop="endTime" label="结束时间" width="150" align="center">
+              </el-table-column>
+              <el-table-column prop="completeBatchNo" label="零件批次" width="120" align="center">
+              </el-table-column>
+              <el-table-column prop="overTime" label="是否超时" width="100" align="center">
+				          <template slot-scope="{ row }">                      
+                      {{ row.overTime>0 ? "是" : "否" }}
+                  </template>
+              </el-table-column>
+              <el-table-column prop="preResourceName" label="前序加工设备" width="150" align="center">
+              </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"
+            />
+          </div>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+   
+    <!-- 【查看】组件 -->
+      <task-view1
+	      	ref="view1"
+	      	:dialog-visible="view1Visible"
+	      	@close="viewClose"
+          @success="editSuccess"
+	    />	    
+  </div>
+</template>
+
+
+<script>
+// 【查看】组件
+import TaskView1 from "./components/View1";
+import { fullScreen, exitFullScreen, initQueryParams } from "@/utils/commons";
+import areaMgrApi from "@/api/resourceProductMgr/areaMgr"
+import stationMgrApi from "@/api/machiningClient/stationMgr";
+import taskMgrApi from "@/api/runManageCenter/taskMgr";
+import machiningClientApi from "@/api/machiningClient/machiningClient"
+import Pagination from "@/components/Pagination"
+export default {
+  name: "TouchScreen",
+  components: {Pagination, TaskView1},
+  props: {},
+  data() {
+    return {
+      tableKey: 0,
+      queryParams: initQueryParams({}),      
+      options: [
+      ],
+      currentStationId: "",
+      currentStationName: "舱体类加工单元",
+      currentStationCode: "CT",
+      taskCount: "",
+      taskData: [
+      ],
+      current: 1,
+      timer: null,
+      confirmDisabled: true,
+      tenantViewVisible: false,
+      view1Visible: false,      
+      isFullSreen: false, // 默认不全屏
+      loading: false,
+      uniqueCode: "",
+      tableData: {
+        total: 0
+      }
+    };
+  },
+  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+  created() {
+    this.getAreaList();    
+    this.getStation()
+  },
+  watch: {
+    'taskData': {
+        handler(val, oldVal) {
+          // 加载列表数据
+          if(oldVal.length>0 && val.length>0 && val[0].id!=oldVal[0].id){            
+            //window.location.reload()            
+          }                
+        },
+        deep: true
+      }
+  },
+  computed: {
+    currentUser() {
+      return this.$store.state.account.user;
+    },
+  },
+  mounted() {
+    //setInterval(this.getStation, 2000);
+    //this.timerTask()   
+  },
+  methods: {
+    tabClick(e){
+      console.log("被选择的tab:", e.index)
+      // 待执行-tab
+      if(e.index == 0){
+        this.getStation()
+        //this.timerTask()
+      }
+      // 已完成-tab
+      if(e.index == 1){
+        //this.clearTimer()
+        this.fetch()
+      }
+    },
+
+    // 全屏
+    fullPing() {
+      this.$nextTick(() => {
+        // 显示【退出全屏】
+        this.isFullSreen = true;
+        // 如果是退出全屏
+        let $playerMap = this.$refs.playerMap;
+        if ($playerMap) {
+          fullScreen($playerMap);
+        }
+      });
+    },
+    //定时器处理
+    timerTask(){
+       let that = this
+       that.timer = setInterval(()=>{
+          this.getStation();
+       }, 10000)
+    },
+    clearTimer(){
+       if(this.timer){
+          clearInterval(this.timer)
+          this.timer = null
+       }
+    },
+    // 退出全屏
+    exitFullPing() {
+      this.$nextTick(() => {
+        // 显示【全屏】
+        this.isFullSreen = false;
+        // 如果是全屏
+        exitFullScreen(document.getElementById("playerMap"));
+      });
+    },
+    selectChange(value) {      
+      this.currentStationId = value
+      let current = this.options.filter(item=>item.id==value)[0]
+      this.currentStationName = current.name
+      this.currentStationCode = current.aka
+      this.getStation()
+    },
+    getStation() {            
+      stationMgrApi.getJbwStation({ zoneCode:this.currentStationCode })
+        .then((res) => {          
+          res = res.data;
+          if (res.isSuccess) {
+            if (res.data.length > 0) {
+              this.taskData = res.data;
+            }
+          }
+        }).catch(()=>{});
+    },
+
+    readView() {
+      //this.tenantViewVisible = true
+      //this.$refs.view2.read(null)
+      let currentNode = this.taskData[0]      
+      this.RFIDParams.taskId =  currentNode.id
+      this.RFIDParams.taskNodeId =  currentNode.taskNodeId
+      this.RFIDParams.data.positionIndex = this.currentStationName.substr(-1)
+      let that = this
+      machiningClientApi.read(this.RFIDParams).then(res => {         
+         if(res.data.result!="false"){
+           this.$message({
+		          	 message: "RFID: "+res.data.result,
+		          	 type: "success"
+		      })
+           that.uniqueCode = res.data.result
+         }else {
+           this.$message({
+		          	message: "获取RFID数据失败",
+		          	type: "warning"
+		      })
+         }
+      });
+
+    },
+    showRFID(code) {
+      console.log(code);
+    },
+    resolveLogo(logo) {
+      return require(`@/assets/yunMap/${logo}`);
+    },
+    view (item) {
+        item.currentStationName = this.currentStationName
+        item.zoneId = this.currentStationId  
+        this.$refs.view1.setTenant(item)
+        this.view1Visible = true
+        
+	  },
+    viewClose() {
+      this.view1Visible = false      
+    },
+    editSuccess(){     
+       this.$nextTick(() => {
+          this.getStation()
+      });
+    },
+    setPercentage(time, left) {
+      return this.formatGap(time, left)[0] > 100
+        ? 100
+        : this.formatGap(time, left)[0];
+    },
+    // 设置进度文本内容
+    setItemText(time, left) {
+      return () => {
+        return this.formatGap(time, left)[1];
+      };
+    },
+    //时间差转换
+    formatGap(time, left) {
+      return [Number(parseInt((100 * left) / time)), "剩余" + left + "分钟"];
+    },
+    getAreaList(){
+	    	areaMgrApi.getList().then(res => {
+	    		res =  res.data	    	
+	    		if(res.isSuccess){
+	    			this.options = res.data.filter(item=>item.no!='safeguard')
+            this.currentStationId = this.options[0].id
+            this.currentStationCode = this.options[0].aka
+            
+	    		}
+	    	})        
+	  },
+
+    fetch(params = {}) {
+      this.loading = true
+      if (this.queryParams.timeRange) {
+        this.queryParams.map.deliveryTime_st = this.queryParams.timeRange[0]
+        this.queryParams.map.deliveryTime_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.updateUser = this.$store.state.account.user.id
+      this.queryParams.model.resourceId = this.currentStationId
+      
+      taskMgrApi.getFinishList(this.queryParams).then(response => {
+        const res = response.data
+        if (res.isSuccess) {
+          this.tableData = res.data
+          console.log(this.tableData)
+          // 给列表设置条数
+          this.$emit('setTabNums', res.data.total, 'tab2')
+        }
+        // eslint-disable-next-line no-return-assign
+      }).finally(() => this.loading = false)
+    },
+    getFullTime(date) {
+      var yy = date.getFullYear(); //年
+      var mm = date.getMonth() + 1; //月
+      var dd = date.getDate(); //日
+      var hh = date.getHours(); //时
+      var ii = date.getMinutes(); //分
+      var ss = date.getSeconds(); //秒
+      var clock = yy + "-";
+      if (mm < 10) clock += "0";
+      clock += mm + "-";
+      if (dd < 10) clock += "0";
+      clock += dd + " ";
+      if (hh < 10) clock += "0";
+      clock += hh + ":";
+      if (ii < 10) clock += "0";
+      clock += ii + ":";
+      if (ss < 10) clock += "0";
+      clock += ss;
+	  return clock;
+    },
+    navigator() {
+      this.$router.push("/classScheduleMgr/classScheduleMgr");
+    },
+  },
+};
+</script>
+
+
+<style lang="scss" scoped>
+.tabDiv {
+  position: relative;
+  overflow: hidden;
+  width: 100%;
+  height: 100%;
+  .battonDiv {
+    z-index: 9;
+  }
+}
+.tabTitle {
+  font-size: 24px;
+  height: 24px;
+  line-height: 24px;
+}
+.card_content {
+  padding: 8px;
+  width: 100%;
+  text-align: left;
+  color: #fff;
+}
+.card_header {
+  position: relative;
+  border-bottom: 1px solid #fff;
+  margin: 10px 0;
+}
+.indexNo {
+  position: absolute;
+  top: 25%;
+  left: 9%;
+  font-size: 24px;
+  line-height: 24px;
+  height: 24px;
+  color: #fff;
+  z-index: 999;
+}
+.indexNo2 {
+  position: absolute;
+  top: 25%;
+  left: 6%;
+  font-size: 24px;
+  line-height: 24px;
+  height: 24px;
+  color: #fff;
+  z-index: 999;
+}
+.itemNo {
+  font-size: 12px;
+  line-height: 12px;
+  height: 12px;
+  text-align: right;
+  color: #fff;
+  margin-left: 20%;
+  margin-bottom: 10px;
+}
+.timeprogress >>> .el-progress-bar__outer {
+  background-color: #1890ff;
+}
+.timeprogress .el-progress-bar__inner {
+  text-align: center;
+}
+.el-form-item >>> .el-form-item__label {
+  color: #fff;
+}
+.el-form-item {
+  margin-bottom: 0;
+}
+
+.tabTitle >>> .el-badge {
+  position: relative;
+  display: inline-block;
+  vertical-align: baseline;
+}
+.badge {
+  margin-top: 10px;
+  margin-right: 20px;
+}
+
+.tableTransparent >>> .el-table,
+.el-table__expanded-cell {
+  background-color: transparent;
+}
+</style>

+ 455 - 0
imcs-ui/src/views/zuihou/machiningClient/jbwTasks/components/View1.vue

@@ -0,0 +1,455 @@
+<template>
+  <el-dialog
+    :title='$t("common.view")'
+    width="80%"
+    :append-to-body="true"
+    :visible.sync="isVisible"
+    class="tenant-view"
+  >
+    <div class="boxDiv">
+    	<!-- 任务信息 -->
+        <el-steps :active="active" finish-status="success" simple style="margin:20px 0;">
+  				<el-step title="工装信息" ></el-step>
+  				<el-step title="零件装夹" ></el-step>
+		</el-steps>
+
+    	<el-row v-show="this.active==1">
+    		<p style="margin-top:0;text-align:center;font-size:18px;">工装信息
+				<span style="float:right;margin-right:20px;font-size:14px;">库位编号:{{tenant.code}}</span>
+			</p>
+    		<table class="comtable" border="0" cellspacing="0" cellpadding="6" style="margin:10px 0;"  v-for="(item, index) in tableData2" :key="item.id">
+				<tr>
+    				<td class="blodTd" align="center" width="100">产品名称</td>
+    				<td width="60">{{item.brandName}}</td>
+    				<td class="blodTd" align="center" width="100">产品类型</td>
+    				<td width="60">{{item.categoryDesc}}</td>
+					<td class="blodTd" align="center" width="100">产品ID</td>
+    				<td width="120">{{item.goodsId}}</td>
+    			</tr>
+				<tr>
+    				<td class="blodTd" align="center" width="100">是否锁定</td>
+    				<td width="60">{{item.lockStatus=="0" ? "是" : "否" }}</td>
+    				<td class="blodTd" align="center" width="100">是否冻结</td>
+    				<td width="60">{{item.status=="0" ? "是" : "否"}}</td>
+					<td class="blodTd" align="center" width="100">唯一编码</td>
+    				<td width="120">{{item.uniqueCode}}</td>
+    			</tr>
+    		</table>
+    	</el-row>
+
+    	<!-- 安装零件 -->
+    	<el-row v-show="this.active==1 && this.existed==3 && this.matched">
+    		<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数据 -->
+			<p style="margin-top:15px;color:#000;font-size:18px;width:350px;"><el-select
+          			v-model="bBomId"
+           			:placeholder='$t("common.pleaseSelect")'
+					filterable 
+		   			clearable
+         		 	style="width: 50%"
+					@change="selectBom"
+        	 	>
+          			<el-option
+            			v-for="(item, index) in bBomList"
+            			:key="index"
+            			:label="item.name"
+            			:value="item.id"
+          			/>
+        	</el-select>
+			</p>
+			
+			<el-table
+		      ref="table"
+		      v-loading="loading"
+			  :data = tableData.records		      
+		      border
+		      fit
+		      style="width: 100%;"
+			  :key = "timeStamp"
+			  
+		    >
+		      <!-- 编号 -->
+		      <el-table-column prop="name" :label='$t("prepare.table.tools.name")' align="center" >
+				
+			  </el-table-column>
+		       <!-- 编号 -->
+		      <el-table-column prop="batchNo" label='批次号' align="center" ></el-table-column>
+			  <el-table-column prop="meterialId" label='原材料ID' align="center"></el-table-column>
+
+		    </el-table>
+    	</el-row>
+
+		<el-row v-show="this.active==1">
+			<p v-if="this.existed==0" class="titleP" style="margin-top:15px;color:#000;font-size:18px;"> 
+				ST1: 当前接驳位托板为空
+			</p>
+			<p v-if="this.existed>0 && this.existed!=3" class="titleP" style="margin-top:15px;color:#000;font-size:18px;"> 
+				ST1: 当前接驳位工装条件不满足
+			</p>			
+		</el-row>
+		
+
+		<!-- 装夹物料 -->
+    	<el-row v-show="this.active>1 && this.existed==3 && this.matched">
+    		<p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >ST2: 装夹物料</p>
+    		<!-- Table数据 -->
+			<el-table
+		      ref="table1"
+		      v-loading="loading"
+		      :data="tableData1.records"
+		      border
+		      fit
+		      style="width: 100%;"
+		    >
+		      <!-- 材料编码 -->
+		      <el-table-column prop="name" :label='$t("prepare.table.tools.name")' align="center" ></el-table-column>
+		       <!-- 材料牌号 -->
+		      <el-table-column prop="batchNo" label='批次号' align="center" ></el-table-column>
+			  <!-- 材料名称 -->
+		      <el-table-column prop="meterialId" label='原材料ID' 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"
+								:preview-src-list="[row.armorPic]"
+      							fit="fill"></el-image>
+						 </div>
+					</template>
+			  </el-table-column>
+		    </el-table>
+    	</el-row>
+
+		<!-- 输入唯一码 -->
+    	<el-row v-show="this.active>1 && this.existed==3">
+          <p class="titleP" style="margin-top:15px;color:#000;font-size:18px;" >输入订单名称 
+		  </p>
+          <el-input v-model="orderName" placeholder="输入订单名称"></el-input>
+	    </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 type="primary" :disabled="confirmDisabled" @click.native="next" v-show="this.active==1 && this.existed==3 && this.matched && !this.locked && bBomId!='' ">已完成,下一步</el-button>
+		  <el-button type="primary" :disabled="confirmDisabled" @click.native="submitForm"  v-loading.fullscreen.lock="loading" v-show="this.active>1 && !this.locked">上料完成</el-button>
+	    </div>
+    </div>
+  </el-dialog>
+</template>
+<script>
+	// 【分页】组件
+  import taskMgrApi from "@/api/runManageCenter/taskMgr";
+  import machiningClientApi from "@/api/machiningClient/machiningClient"
+  import stationMgrApi from "@/api/machiningClient/stationMgr"
+  import bomMgrApi from "@/api/prepareProductMgr/bomMgr"
+	// 列表查询的共通参数
+  import { initQueryParams } from '@/utils/commons'
+export default {
+  name: 'TaskView',
+  components: { },
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      active: 1,
+      screenWidth: 0,
+      confirmDisabled: false,
+	  callRobotFlag: false,	  
+      width: this.initWidth(),
+      tenant: {},
+      queryParams: initQueryParams({}),	  
+      loading: false,
+	    uniqueCode: '',
+		isReload: 0,
+    	tenantViewVisible: false,		
+		xbkValid: true,
+		locked: true,
+      	existed: 0,
+        matched: true,  //工装是否匹配       
+    	tableKey: 0,
+	  	tableData: {
+	    	total: 0
+	  	},
+	  	tableData1: {
+           total: 0
+		},
+	  	tableData2: [],
+		bBomList: [],
+		bBomId: "",
+		orderName: "",
+		materialId: "",
+		timeStamp: "",
+	  	currentRow: null, // 当前选择的行
+		currentIndex: 0,  //上下料站默认序号
+	  	spanArr: [],  // 【组序】合并单元格
+	    spanArr2: [],  // 【优先级】合并单元格
+    }
+  },
+  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+  created() {
+	},
+  computed: {
+    isVisible: {
+      get () {
+        return this.dialogVisible
+      },
+      set () {
+        this.close()
+      }
+    }
+  },
+  watch:{
+	'tableData.records': {
+       handler(newVal, oldVal){
+		 this.timeStamp = new Date() + ''
+	   },
+	   deep: true,
+
+	}
+  },
+  mounted () {
+    window.onresize = () => {
+      return (() => {
+        this.width = this.initWidth()
+      })()
+    }
+  },
+  methods: {
+	getBomList(){
+		bomMgrApi.list({}).then(res => {
+    		res = res.data 
+    		if(res.isSuccess){
+    			this.bBomList = res.data
+    		}
+    	})	
+		
+	},
+	selectBom(value){	  
+        let data = this.bBomList.filter(item=>item.id==value)[0]
+		if(data!=null){
+		this.materialId = data.meterialId	
+		this.tableData.records = []
+		this.tableData.records.push({
+			id:data.id,
+			name:data.name,
+			batchNo: data.batchNo,
+			meterialId: data.meterialId
+		})
+		this.tableData1.records = []		
+		stationMgrApi.getJbwClampInfo({ bomId: data.id })
+        .then((res) => {          
+          res = res.data;
+          if (res.isSuccess) {
+			  let clampInfo = res.data;			  
+			  this.tableData1.records.push({
+					id:data.id,
+					name:data.name,
+					batchNo: data.batchNo,
+					meterialId: data.meterialId,
+					clampImg: clampInfo.armorPic
+			 })
+			 console.log(this.tableData1)
+          }
+        }).catch(()=>{});
+	  }
+		
+	  	
+	},
+	confirmProcedure(){
+		let valid = this.tenant.taskNodeId!=''? true: false;
+	    if(!valid){
+          this.$message({
+	          message: "任务ID" + this.$t("rules.require"),
+	          type: "warning"
+	      })		  
+		  return false
+	    }
+      console.log(this.tenant)
+      taskMgrApi.confirmProcedure({ "taskNodeId":this.tenant.taskNodeId, "trayId": this.tenant.trayId, "clampNo": this.tenant.clampNo}).then((res) => {
+          res = res.data         
+          if (res.isSuccess) {
+            this.existed = res.data.existed
+			this.matched = res.data.matched
+            this.confirmDisabled = false
+			this.xbkValid = res.data.xbkValid
+			this.locked = res.data.locked
+          }
+        });        
+      },	  
+	prev(){
+      if (this.active-- < 0) this.active = 0;
+	},
+	next(){
+	    // TODO 写入rfid内容(子盘信息和夹具信息)
+		/*
+      taskMgrApi.procesRfid({ "id" : this.tenant.id, "clampId" : this.tenant.clampId,rfidType: "write" }).then((res) => {
+        res = res.data;        
+      }); */
+      if (this.active++ > 1) this.active = 0;
+      /*
+	  taskMgrApi.getReloadStatus({ "taskNodeId" : this.tenant.taskNodeId}).then((res) => {
+          res = res.data;
+          if (res.isSuccess) {            
+            this.isReload = res.data.isReload
+          }
+     }); */
+
+	},
+  	submitForm(){
+      // 更新改任务的开始时间
+      // TODO 写入rfid内容,工件信息、原材料R
+	    this.confirmDisabled = true			
+      	let valid = this.bBomId != '' && this.orderName != '' ? true: false;
+	    if(!valid){
+          this.$message({
+	          message: "零件编码" + this.$t("rules.require"),
+	          type: "warning"
+	      })		 
+		  this.confirmDisabled = false
+		  return false
+	    }
+		
+		let that = this
+		this.$confirm(
+        '确定上料已准备完成?',
+        this.$t("common.tips"),
+        {
+          distinguishCancelAndClose: true,
+          confirmButtonText: this.$t("common.confirm"),
+          cancelButtonText: this.$t("common.cancel"),
+          type: "warning",
+        }).then(() => {
+			//上料处理
+			this.loading = true
+			this.addMaterial(that)
+		}).catch(()=>{
+			this.$message({
+	          message: "上料操作取消,请重新确认",
+	          type: "warning"
+	        })			
+			setTimeout(function(){
+			     that.loading = false
+                 that.$emit("close");
+            }, 500);
+		})
+  	},
+	addMaterial(that){		
+        let params = {"orderName":that.orderName,"zoneId":that.tenant.zoneId,"bomId":that.bBomId,"materialId": that.materialId, "start":that.tenant.code}
+        stationMgrApi.addJbwTask(params).then((res) => {
+          res = res.data;
+          if (res.isSuccess) {
+			 //写入RFID			  
+              that.loading = false		  
+              that.$emit("success");
+              //通知列表-并关闭弹出框
+              that.$emit("close");
+          }
+      }).finally(()=>{
+		  that.confirmDisabled = false
+	  });
+	},
+  	// 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 }
+	  console.log(this.tenant)
+	  stationMgrApi.getJbwStockInfo({storgeCode:val.code}).then((res)=>{
+			res = res.data
+			console.log(res.data)
+			if(res.isSuccess){
+				this.tableData2 = res.data
+				//console.log(this.tableData2.length)
+				this.existed = this.tableData2.length
+				this.matched = true
+           		this.confirmDisabled = false
+			    this.xbkValid = true			   
+				if(this.tableData2.length>0){
+                   this.locked = this.tableData2[0].lockStatus=='1'? false:true
+				}else{
+					this.locked = false;
+				}
+			}
+	  });
+
+	  this.getBomList();
+
+	  this.tableData.records = []
+	  this.tableData.records.push({
+		    id: '',			
+			batchNo:'',
+			meterialId :'',	
+      })
+
+	  //this.confirmProcedure()
+    },
+    close () {
+      this.$emit('close')
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+    .el-image-viewer__wrapper {
+        /deep/  .el-image-viewer__canvas {        
+          transform: scale(5) rotate(0deg);
+        }
+    }
+	.dialog-footer{
+		text-align: center;
+		padding: 30px;
+	}
+	.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;
+	}
+	.el-image-viewer__img {
+		transform: scale(5) rotate(0deg); 
+		margin-left: 0px; 
+		margin-top: 0px; 
+		max-height: 100%; 
+		max-width: 100%;
+	}
+</style>

+ 190 - 0
imcs-ui/src/views/zuihou/statisticalAnalysis/deviceIndicator/components/View2.vue

@@ -0,0 +1,190 @@
+<template>
+  <el-dialog
+    :title="$t(&quot;common.view&quot;)"
+    :width="width"
+    :append-to-body="true"
+    :visible.sync="isVisible"
+    class="tenant-view"
+  >
+    <el-row :gutter="10">
+      <el-col :xs="24" :sm="3">
+        <div class="view-item">  
+          <span></span>
+        </div>     
+      </el-col>  
+      <el-col :xs="24" :sm="5">
+        <div class="view-item">  
+          <span>名称</span>
+        </div>     
+      </el-col> 
+      <el-col :xs="24" :sm="3">
+        <div class="view-item">  
+          <span>编号</span>
+        </div>     
+      </el-col> 
+      <el-col :xs="24" :sm="4">
+        <div class="view-item">
+          <span>设备</span>  
+        </div>     
+      </el-col> 
+      <el-col :xs="24" :sm="5">
+        <div class="view-item">  
+          <span>开始时间</span>
+        </div>     
+      </el-col>
+      <el-col :xs="24" :sm="4">
+        <div class="view-item">  
+          <span>完成时间</span>
+        </div>     
+      </el-col>
+      <el-col :xs="24" :sm="5">
+        <div class="view-item">  
+          <span>批次号</span>
+        </div>     
+      </el-col>  
+    </el-row>
+    <el-row :gutter="10" v-for="task in dataList " :key="task.id"  >
+      <el-col :xs="24" :sm="3">
+        <div class="view-item">          
+          <span v-if="task.status == '2'" style="color: #f50" >{{ task.id }}</span>
+          <span v-else >{{ task.id }}</span>           
+        </div>
+      </el-col>
+      <el-col :xs="24" :sm="5">
+        <div class="view-item">         
+          <span>{{task.procedure_name}}-{{task.nodeName}}</span>
+        </div>
+      </el-col>
+      <el-col :xs="24" :sm="3">
+        <div class="view-item">          
+          <span>{{task.procedure_no}}</span>          
+        </div>
+      </el-col>
+      <el-col :xs="24" :sm="4">
+        <div class="view-item">          
+          <span>{{ task.resource_name}}</span>         
+        </div>
+      </el-col>
+      <el-col :xs="24" :sm="5">
+        <div class="view-item">          
+          <span>{{task.start_time }}</span>          
+        </div>
+      </el-col>
+      <el-col :xs="24" :sm="4">
+        <div class="view-item">          
+          <span>{{ task.complete_time}}</span>         
+        </div>
+      </el-col>
+      <el-col :xs="24" :sm="4">
+        <div class="view-item">          
+          <span>{{ task.complete_batch_no}}</span>         
+        </div>
+      </el-col>      
+    </el-row>    
+  </el-dialog>
+</template>
+<script>
+import productlineAvailabilityApi from "@/api/statisticalAnalysis/productlineAvailability"
+export default {
+  name: 'TenantView',
+  filters: {
+    passwordErrorLockTimeFilter (time) {
+      if (time === '0') {
+        return '当天23点59分'
+      }
+      return time
+    }
+  },
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      screenWidth: 0,
+      width: this.initWidth(),
+      dataList:[],
+      taskList:[],
+      agvList:[],
+      data: {},
+      tenant: {}
+    }
+  },
+  computed: {
+    isVisible: {
+      get () {
+        return this.dialogVisible
+      },
+      set () {
+        this.close()
+      }
+    }
+  },
+  mounted () {
+    window.onresize = () => {
+      return (() => {
+        this.width = this.initWidth()
+      })()
+    }
+  },
+  methods: {
+    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 '1050px'
+      }
+    },
+    setTenant (val) {
+      this.data = val
+      this.tenant = { ...val }      
+      productlineAvailabilityApi.unFinishedBiz(this.tenant).then(response=>{
+						const res = response.data
+						if(res.isSuccess){              
+							this.dataList = res.data.records
+							console.log(this.dataList)
+						}else{
+							this.$message({
+              					message: res.msg,
+              					type: 'warning'
+            	})
+						}
+				}).finally(()=>{
+					return true		
+			})
+    },
+    close () {
+      this.$emit('close')
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.tenant-view {
+  .img-wrapper {
+    text-align: center;
+    margin-top: -1.5rem;
+    margin-bottom: 10px;
+    img {
+      width: 4rem;
+      border-radius: 50%;
+    }
+  }
+  .view-item {
+    margin: 7px;
+    i {
+      font-size: 0.97rem;
+    }
+    span {
+      margin-left: 5px;
+    }
+  }
+}
+</style>