Explorar o código

Merge branch 'master' of http://106.14.142.95:3000/oyq28/imcs_331_web

wang.sq@aliyun.com hai 3 meses
pai
achega
dff407d7f7

+ 3 - 2
imcs-ui/.env.production

@@ -2,14 +2,15 @@
 ENV = 'production'
 
 # webSocket的推送URL
-VUE_APP_WS_URL = 'ws://127.0.0.1:8764/ws/'
+VUE_APP_WS_URL = 'ws://192.168.0.106:8764/ws/'
+
 
 VUE_APP_PROJECT_NAME = 'imcs-ui'
 # 开发环境请求域名前缀, 该变量仅仅开发环境需要设置
 #VUE_APP_DEV_REQUEST_DOMAIN_PREFIX = 'http://192.168.170.32/'
 # 请求域名前缀, 该变量仅仅生产环境需要设置
 #VUE_APP_PROD_REQUEST_DOMAIN_PREFIX = 'http://localhost:8764'
-VUE_APP_PROD_REQUEST_DOMAIN_PREFIX = ''
+VUE_APP_PROD_REQUEST_DOMAIN_PREFIX = 'http://192.168.0.106/'
 # 本地打包测试需要,
 #VUE_APP_PROD_REQUEST_DOMAIN_LOCAL = 'http://localhost:8764'
 

+ 2 - 2
imcs-ui/package.json

@@ -55,8 +55,8 @@
     "showdown": "^1.9.1",
     "sortablejs": "1.8.4",
     "spark-md5": "^3.0.1",
-    "tui-editor": "1.3.3",
     "vue": "^2.6.10",
+    "vue-cli": "^2.9.6",
     "vue-count-to": "^1.0.13",
     "vue-echarts": "^6.0.0-rc.5",
     "vue-fullscreen": "^2.6.1",
@@ -97,7 +97,7 @@
     "less-loader": "^5.0.0",
     "lint-staged": "8.1.5",
     "mockjs": "1.0.1-beta3",
-    "node-sass": "6.0.1",
+    "node-sass": "^6.0.1",
     "sass-loader": "^10.0.1",
     "plop": "2.3.0",
     "pug": "^3.0.2",

+ 10 - 0
imcs-ui/src/api/systemMgr/toolbar.js

@@ -41,6 +41,10 @@ const apiList = {
     method: 'POST',
     url: `/authority/toolbar/refreshXbk`
   },
+  addCutToolTask:{
+    method: 'POST',
+    url: `/authority/toolbar/addCutToolTask`
+  },
   manualTask: {
     method: 'POST',
     url: `/authority/toolbar/manualTask`
@@ -118,6 +122,12 @@ export default {
       data
     })
   },
+  addCutToolTask (data) {
+    return axiosApi({
+      ...apiList.addCutToolTask,
+      data
+    })
+  },
   manualXbk (data) {
     return axiosApi({
       ...apiList.manualXbk,

+ 65 - 0
imcs-ui/src/views/zuihou/dispatchMgr/tools/Index.vue

@@ -268,6 +268,41 @@
   			</el-form-item>
 	  </el-form>
 	</el-card>
+
+	<el-card class="box-card">
+        <div slot="header" class="clearfix">刀具取放处理</div>
+		<el-form ref="form10" :model="form11" :rules="rules4" label-width="80px">
+			<el-row :gutter="12" >
+				<el-col :xs="6" :sm="5">
+					<el-form-item label="起始位:" prop="start">
+						<el-tooltip content="例如:CT_361" placement="top">
+                    		<el-input v-model="form11.start" placeholder="起始库位"></el-input>
+					   </el-tooltip>
+					</el-form-item>
+				</el-col>
+				<el-col :xs="6" :sm="5">
+					<el-form-item label="目的位:" prop="goal">
+						<el-tooltip content="例如:CT_130" placement="top">
+                    		<el-input  v-model="form11.goal" placeholder="目的库位"></el-input>
+						</el-tooltip>
+					</el-form-item>
+				</el-col>
+				<el-col :xs="6" :sm="5">
+					<el-form-item label="起始刀位号:" prop="cutNo">
+                    	<el-input-number v-model="form11.cutStartNo" :min="0" :max="40"></el-input-number>
+					</el-form-item>
+				</el-col>
+				<el-col :xs="6" :sm="5">
+					<el-form-item label="目的刀位号:" prop="cutNo">
+                    	<el-input-number v-model="form11.cutGoalNo" :min="0" :max="40"></el-input-number>
+					</el-form-item>
+				</el-col>															
+			</el-row>
+			<el-form-item>
+    			<el-button type="primary" @click="addCutToolTask" >发送</el-button>    		
+  			</el-form-item>
+	  </el-form>
+	</el-card>
   </div>
 </template>
 
@@ -333,6 +368,12 @@
 		  form10:{
 			deviceType: "0"
 		  },
+		  form11:{
+			start: "",
+			goal: "",
+			cutStartNo: "",
+			cutGoalNo: ""			
+		  },
 		  lineList: [],
 		  typeList: [{"name":"全部","value":"0"},{"name":"FANUC","value":"1"},{"name":"HEIDENHAIN","value":"2"},{"name":"DMG","value":"3"},{"name":"HELLER","value":"4"}],
 	      tenantViewVisible: false,
@@ -663,6 +704,30 @@
 				}				
 			}); 
 		},
+		addCutToolTask(){
+			this.$refs.form11.validate((valid) => {
+				if(valid){
+					toolbarApi.addCutToolTask(this.form11).then(response=>{
+						const res = response.data
+						if(res.isSuccess){
+							this.$message({
+              					message: this.$t('tips.updateSuccess'),
+              					type: 'success'
+            				})
+						}else{
+							this.$message({
+              					message: res.msg,
+              					type: 'warning'
+            				})
+						}
+					}).finally(()=>{
+					   return true		
+					})					
+				}else{
+					return false
+				}				
+			});
+		},
 		manualTask(){			
 			this.$refs.form7.validate((valid) => {
 				if(valid){

+ 543 - 0
imcs-ui/src/views/zuihou/machiningClient/cutToolTasks/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/cutToolTasks/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>

+ 1 - 1
imcs-ui/src/views/zuihou/resourceProductMgr/resourcesMgr/components/AutoCodeEdit.vue

@@ -196,7 +196,7 @@ export default {
       parentIds: [],
       machineNodes:[{label:'上传程序',value:"1"},{label:'执行程序',value:"2"},{label:'坐标系校验',value:"3"}],
       agvNodes:[{label:'舱体线接驳位',value:"1"},{label:'框体线接驳位',value:"2"},{label:'保障中心线接驳位',value:"3"}],
-      robotNodes:[{label:'舱体线机器人',value:"1"},{label:'伺服舵机',value:"2"},{label:'框体线机器人',value:"3"}],      
+      robotNodes:[{label:'舱体线机器人',value:"1"},{label:'伺服舵机',value:"2"},{label:'框体线机器人',value:"3"},{label:'天轨机器人',value:"4"}],      
       robotAction:[{label:'取',value:"1"},{label:'放',value:"2"}],
       otherActon:[{label:'默认执行程序', value:"1"}],
       actionTarget: [{label:'本设备',value:"1"},{label:'接驳位',value:"2"}],

+ 2 - 2
imcs-ui/src/views/zuihou/resourceProductMgr/resourcesMgr/components/TenantCodeEdit.vue

@@ -56,10 +56,10 @@
               </el-tag>
               <el-tag  v-if="row.category == '3'">
                     <span v-if="isLine"> 
-                     {{ row.resourceId == 1 ? '质量中心机器人':(row.resourceId == 2 ? '柔性线机器人': '智能单元机器人' )  }}
+                     {{ row.resourceId == 1 ? '质量中心机器人':(row.resourceId == 2 ? '柔性线机器人':( row.resourceId == 3 ? '智能单元机器人' : '天轨机器人' ))  }}
                     </span>
                     <span v-else>
-                      {{ row.resourceId == 1 ? '舱体线机器人':(row.resourceId == 2 ? '伺服舵机': '框体线机器人' )  }} 
+                      {{ row.resourceId == 1 ? '舱体线机器人':(row.resourceId == 2 ? '伺服舵机': (row.resourceId == 3 ?'框体线机器人':'天轨机器人' ))  }} 
                     </span>  
               </el-tag>
               <el-tag  v-if="row.category == '4'"> 

+ 7 - 48
imcs-ui/src/views/zuihou/resourceProductMgr/resourcesMgr/components/ToolAutoCodeEdit.vue

@@ -46,51 +46,9 @@
             <!--隐藏切换项-->
             <div style="width:80%;margin-left:15%;" v-show="isShow">
                     <el-tabs v-model="tenant.category" type="card" @tab-click="handleClick('')">
-                        <el-tab-pane label="生产设备" name="1" >
-                          <div v-if=" tenant.category=='1' " >
-                            <el-form-item label='设备:'>
-                                 <template>
-                                      <span>{{ this.rowData.productionResourceName }}</span>
-                                 </template>
-                            </el-form-item>
-                            <el-form-item label='指令:'>
-                                <template>
-                                    <el-select v-model="tenant.command" :placeholder='$t("common.pleaseSelect")'>
-                                        <el-option
-                                                v-for="item in machineNodes"
-                                                :key="item.value"
-                                                :label="item.label"
-                                                :value="item.value">
-                                        </el-option>
-                                    </el-select>
-                                </template>
-                            </el-form-item>
-                          </div>
-                        </el-tab-pane>
-                        <el-tab-pane label="AGV" name="2"  >
-                          <div v-if=" tenant.category=='2' " >
-                           <el-form-item label='起点:'>
-                                 <template>
-                                      <span>物料位置接驳位</span>
-                                 </template>
-                            </el-form-item>
-                            <el-form-item label='终点:'>
-                                <template>
-                                    <el-select v-model="tenant.targetId" :placeholder='$t("common.pleaseSelect")'>
-                                        <el-option
-                                                v-for="item in agvNodes"
-                                                :key="item.value"
-                                                :label="item.label"
-                                                :value="item.value">
-                                        </el-option>
-                                    </el-select>
-                                </template>
-                            </el-form-item>
-                          </div>
-                        </el-tab-pane>
                         <el-tab-pane label="机械手" name="3" >
                           <div v-if=" tenant.category=='3' " >
-                            <el-form-item label='机械手搬运设备:'>
+                            <el-form-item label='天轨机器人:'>
                                 <template>
                                     <el-select v-model="tenant.resourceId" :placeholder='$t("common.pleaseSelect")'>
                                         <el-option
@@ -116,7 +74,7 @@
                             </el-form-item>
                             <el-form-item label='取目标:' v-show="actionShow">
                                  <template>
-                                      <span>物料位置</span>
+                                      <span>取刀位置</span>
                                  </template>
                             </el-form-item>
                             <el-form-item label='放目标:' v-show="!actionShow">
@@ -196,10 +154,10 @@ export default {
       parentIds: [],
       machineNodes:[{label:'上传程序',value:"1"},{label:'执行程序',value:"2"},{label:'坐标系校验',value:"3"}],
       agvNodes:[{label:'舱体线接驳位',value:"1"},{label:'框体线接驳位',value:"2"},{label:'保障中心线接驳位',value:"3"}],
-      robotNodes:[{label:'舱体线机器人',value:"1"},{label:'伺服舵机',value:"2"},{label:'框体线机器人',value:"3"}],
+      robotNodes:[{label:'天轨机器人',value:"1"}],
       robotAction:[{label:'取',value:"1"},{label:'放',value:"2"}],
       otherActon:[{label:'默认执行程序', value:"1"}],
-      actionTarget: [{label:'本设备',value:"1"},{label:'接驳位',value:"2"}],
+      actionTarget: [{label:'本设备',value:"1"}],
       dicts:{
         NATION: {}
       },
@@ -255,7 +213,7 @@ export default {
         status: '1',
         type:'0',
         weight:1,
-        category: '',
+        category: '3',
         command:'',
         resourceId:'',
         parentId: '',
@@ -285,6 +243,7 @@ export default {
     	console.log("aa:{}",JSON.stringify(this.tenant))
       // 字典表
       this.rowData = rowData
+      this.tenant.category = '3'
     },
     close () {
       this.$emit('close')
@@ -311,7 +270,7 @@ export default {
     },
     switcher(value){
        this.isShow = (value == '0') ? false : true
-       this.tenant.category = (value == '0') ? '' : '1'
+       this.tenant.category = (value == '0') ? '' : '3'
        this.getPidCode()
        //this.tenant.resourceId = (value == '0') ? '0' : ''
 

+ 2 - 2
imcs-ui/src/views/zuihou/resourceProductMgr/resourcesMgr/components/ToolTenantCodeEdit.vue

@@ -59,11 +59,11 @@
                      {{ row.resourceId == 1 ? '质量中心机器人':(row.resourceId == 2 ? '柔性线机器人': '智能单元机器人' )  }}
                     </span>
                     <span v-else>
-                      {{ row.resourceId == 1 ? '舱体线机器人':(row.resourceId == 2 ? '伺服舵机': '框体线机器人' )  }}
+                      {{ row.resourceId == 1 ? '天轨机器人':(row.resourceId == 2 ? '伺服舵机': '框体线机器人' )  }}
                     </span>
               </el-tag>
               <el-tag  v-if="row.category == '4'">
-                     其它设备
+                     中央刀库
               </el-tag>
           </template>
       </el-table-column>

+ 0 - 6
package-lock.json

@@ -1,6 +0,0 @@
-{
-  "name": "imcs-yj-fe",
-  "lockfileVersion": 2,
-  "requires": true,
-  "packages": {}
-}