(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-45162138"],{"1a9b":function(t,e,n){},"525e":function(t,e,n){},"5f4a":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"print"},[n("page-header",[t._v(" 打印机配置 ")]),n("el-tabs",{model:{value:t.activeTabName,callback:function(e){t.activeTabName=e},expression:"activeTabName"}},[n("el-tab-pane",{attrs:{label:"打印节点概况",name:"agent"}},[n("AgentList")],1),n("el-tab-pane",{attrs:{label:"已添加打印机",name:"print"}},[n("PrintList")],1)],1)],1)},s=[],r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"print-agent-list"},[n("el-row",{attrs:{gutter:20}},t._l(t.printAgents,(function(e){return n("el-col",{attrs:{span:8}},[n("el-card",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"agent.loading"}],staticClass:"yh-card",attrs:{shadow:"hover","body-style":"{padding: 10px;}","element-loading-text":"正在获取打印机列表"}},[n("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[n("span",[t._v(t._s(e.name)+" "),n("el-tag",{staticStyle:{"margin-left":"10px"},attrs:{type:t.state[e.state].type}},[t._v(t._s(t.state[e.state].label))])],1),n("el-button",{staticStyle:{float:"right",padding:"5px"},attrs:{type:"text",icon:"el-icon-refresh"},on:{click:function(n){return t.reload(e)}}})],1),n("ul",{staticClass:"print-list"},t._l(e.print,(function(e,a){return n("li",[n("span",[t._v(t._s(a+1)+". "+t._s(e.name))]),n("el-button",{attrs:{size:"mini",type:0==e.state?"default":"success"},on:{click:function(n){return t.addPrinter(e)}}},[t._v(t._s(0==e.state?"未添加":"已添加"))])],1)})),0)])],1)})),1)],1)},i=[],l={components:{},filter:{buttonType:function(t){console.log(t)}},data:function(){return{state:[{type:"success",label:"正常"},{type:"danger",label:"异常"},{type:"info",label:"离线"}]}},computed:{printAgents:function(){return this.$store.state.printer.agents}},watch:{},methods:{reload:function(t){t.loading=!0,this.$store.dispatch("printer/loadAgentPrint",t)},addPrinter:function(t){var e=this;0===t.state&&this.$store.dispatch("printer/addPrinter",t).then((function(n){0==n&&(e.$message.success("添加打印机成功!"),t.state=1)}))}},created:function(){this.$store.dispatch("printer/loadAgent")},mounted:function(){}},o=l,c=(n("6bd6"),n("2877")),u=Object(c["a"])(o,r,i,!1,null,"0ca611f0",null),d=u.exports,p=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-table",{staticStyle:{width:"100%"},attrs:{data:t.prints,"row-key":"name",border:"","tree-props":{children:"children",hasChildren:"hasChildren"}}},[n("el-table-column",{attrs:{type:"index",align:"center",width:"50"}}),n("el-table-column",{attrs:{prop:"name",label:"打印机名称"}}),n("el-table-column",{attrs:{prop:"_agent.ip",label:"打印机IP",width:"200"}}),n("el-table-column",{attrs:{prop:"_agent.port",label:"打印机端口",width:"150"}}),n("el-table-column",{attrs:{prop:"_agent.name",label:"所在节点",width:"250"}}),n("el-table-column",{attrs:{prop:"task",label:"任务数",width:"100"}}),n("el-table-column",{attrs:{prop:"state",label:"当前状态",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-tag",{attrs:{type:0===e.row._agent.state?"success":"danger","disable-transitions":""}},[t._v(t._s(0===e.row._agent.state?"正常":"离线"))])]}}])}),n("el-table-column",{attrs:{label:"操作",width:"350"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(n){return t.handleDelete(e.$index,e.row)}}},[t._v("移除")])]}}])})],1),n("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:10}})],1)},f=[],h=(n("69f8"),{components:{},data:function(){return{}},computed:{prints:function(){return this.$store.state.printer.parinter}},watch:{},methods:{handleAdd:function(){},handleDelete:function(t,e){var n=this;this.$store.dispatch("printer/removePrinter",e).then((function(t){0==t&&n.$message.success("移除打印机成功!")}))}},created:function(){},mounted:function(){}}),b=h,m=Object(c["a"])(b,p,f,!1,null,"095f2fe7",null),g=m.exports,v={components:{AgentList:d,PrintList:g},data:function(){return{activeTabName:"agent"}},computed:{},watch:{},methods:{},created:function(){},mounted:function(){}},_=v,w=(n("cf76"),Object(c["a"])(_,a,s,!1,null,"54b15906",null));e["default"]=w.exports},"6bd6":function(t,e,n){"use strict";n("525e")},cf76:function(t,e,n){"use strict";n("1a9b")}}]);
//# sourceMappingURL=chunk-45162138.84211cdb.js.map