(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4aa0796e"],{"3a81":function(t,e,a){},"5cb3":function(t,e,a){"use strict";a("3a81")},"7b85":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-card",{staticClass:"product-setting-card"},[a("a-descriptions",{attrs:{title:"基本信息",column:6}},[a("a-descriptions-item",{attrs:{label:"车间"}},[a("a-select",{staticClass:"selectWidth",attrs:{placeholder:"车间",allowClear:""},model:{value:t.searchData.AreaCode,callback:function(e){t.$set(t.searchData,"AreaCode",e)},expression:"searchData.AreaCode"}},t._l(t.workshopData,(function(e,s){return a("a-select-option",{key:s,attrs:{value:e.area_code,title:e.descriptions}},[t._v(" "+t._s(e.descriptions))])})),1)],1),a("a-descriptions-item",{attrs:{label:"线别"}},[a("a-select",{staticClass:"selectWidth",attrs:{placeholder:"线别",allowClear:""},model:{value:t.searchData.LineId,callback:function(e){t.$set(t.searchData,"LineId",e)},expression:"searchData.LineId"}},t._l(t.LineTypeData,(function(e,s){return a("a-select-option",{key:s,attrs:{value:e.line_id}},[t._v(t._s(e.descriptions))])})),1)],1),a("a-descriptions-item",[a("div",{staticStyle:{width:"200px","margin-top":"-3px"}},[a("a-button",{staticClass:"btn",attrs:{type:"primary"},on:{click:t.getData}},[t._v("查询")]),a("a-button",{staticClass:"btn",attrs:{type:""},on:{click:function(){t.searchData={},t.getThrottle()}}},[t._v("重置")])],1)])],1),a("div",{staticClass:"content"},t._l(t.data,(function(e,s){return a("div",{key:s,staticClass:"contentBox"},[a("h2",{staticClass:"title"},[t._v(t._s(e.descriptions))]),a("div",{staticClass:"btnContent"},t._l(e.workstationList,(function(s,i){return a("div",{key:i,staticStyle:{width:"160px",padding:"1%"},on:{click:function(a){return t.callMaterial(s,e.descriptions)}}},[a("div",{staticClass:"machine",style:4==s.status?"background:#bbbbbb;color:#000":""},[a("a-tooltip",{scopedSlots:t._u([{key:"title",fn:function(){return[t._v(" "+t._s(s.wksId)+" ")]},proxy:!0}],null,!0)},[t._v(" "+t._s(s.wksId)+" ")])],1),a("div",{staticClass:"titleMachine"},[1==s.status?a("a-button",{staticClass:"btnGroup",staticStyle:{color:"#31a030"}},[t._v("叫料")]):2==s.status?a("a-button",{staticClass:"btnGroup",staticStyle:{color:"red"},attrs:{type:""}},[t._v("叫料中")]):3==s.status?a("a-button",{staticClass:"btnGroup",attrs:{type:""}},[t._v("已叫料")]):4==s.status?a("strong",[t._v("系统会自动叫料")]):t._e()],1)])})),0)])})),0),a("div",{staticClass:"message"},[a("fieldset",{staticClass:"message-info"},[a("legend",[t._v("讯息：")]),t.messageList.length?a("div",t._l(t.messageList,(function(e,s){return a("p",{key:s},[t._v(" 当前"+t._s(e.descriptions)+" 已呼叫上料，请耐心等待! 呼叫时间: "+t._s(e.time)+" ")])})),0):t._e(),a("a-button",{directives:[{name:"show",rawName:"v-show",value:t.messageList.length,expression:"messageList.length"}],staticClass:"clear",attrs:{size:"small"},on:{click:function(){t.messageList=[]}}},[t._v("清空")])],1)])],1)],1)},i=[],n=(a("99af"),a("b775")),o=a("c1df"),c=a.n(o),r={data:function(){return{searchData:{AreaCode:void 0,LineId:void 0},workshopData:[],LineTypeData:[],data:[],messageList:[],cTimer:null}},methods:{getData:function(){var t=this;n["b"].get("api/materialIssue/getWorkStationList?areaCode="+this.searchData.AreaCode+"&lineId="+this.searchData.LineId).then((function(e){1==e.status?e.data.length&&(t.data=e.data):t.$message.error(e.msg)})).catch((function(e){t.$message.error(e)}))},callMaterial:function(t,e){var a=this;return 4==t.status?this.$message.info("系统自动叫料，无法进行手动操作!!"):1!=t.status?this.$message.info("已经叫料， 请勿重复操作"):void n["b"].get("api/materialIssue/callAgv?areaCode=".concat(t.areaCode,"&wksId=").concat(t.wksId,"&lineId=").concat(t.lineId,"&agvCode=").concat(t.agvCode,"&workOrder=").concat(t.workOrder)).then((function(s){1==s.status?(a.getData(),a.$message.success("已叫料"),1==t.status&&a.messageList.push({descriptions:e,time:c()(Date.now()).format("YYYY/MM/DD hh:mm:ss")})):a.$message.error(s.msg)})).catch((function(t){a.$message.error(t)}))},getWorkOrder:function(){var t=this;n["b"].get("/api/option/getAreaOption").then((function(e){1===e.status?t.workshopData=e.data:t.$message.error(e.msg)}))},getLineType:function(){var t=this;n["b"].get("api/option/getLineOption").then((function(e){1==e.status&&(t.LineTypeData=e.data)}))},getThrottle:function(){var t=this;this.toggle?(this.toggle=!1,this.$message.info("已重置"),setTimeout((function(){t.toggle=!0}),1e4)):this.$message.info("不能重复点击")}},mounted:function(){this.getWorkOrder(),this.getLineType()},activated:function(){var t=this;this.cTimer=setInterval((function(){t.getData()}),8e3),this.$message.info("请选择车间和线别查询数据")},deactivated:function(){clearInterval(this.cTimer)}},l=r,d=(a("5cb3"),a("2877")),u=Object(d["a"])(l,s,i,!1,null,"7c07aef8",null);e["default"]=u.exports}}]);