(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d36af4c0"],{"089a":function(e,t,l){"use strict";l.r(t);var a=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("div",{staticClass:"app-container"},[l("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,size:"small",inline:!0,"label-width":"68px"}},[l("el-form-item",{attrs:{label:"标签名称",prop:"name"}},[l("el-input",{attrs:{placeholder:"请输入标签名称",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.name,callback:function(t){e.$set(e.queryParams,"name",t)},expression:"queryParams.name"}})],1),l("el-form-item",{attrs:{label:"标签编码",prop:"labelCode"}},[l("el-input",{attrs:{placeholder:"请输入标签编码",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.labelCode,callback:function(t){e.$set(e.queryParams,"labelCode",t)},expression:"queryParams.labelCode"}})],1),l("el-form-item",[l("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),l("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),l("el-row",{staticClass:"mb8",attrs:{gutter:10}},[l("el-col",{attrs:{span:1.5}},[l("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["label:labelModel:add"],expression:"['label:labelModel:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增")])],1),l("el-col",{attrs:{span:1.5}},[l("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["label:labelModel:edit"],expression:"['label:labelModel:edit']"}],attrs:{type:"success",plain:"",icon:"el-icon-edit",size:"mini",disabled:e.single},on:{click:e.handleUpdate}},[e._v("修改")])],1),l("el-col",{attrs:{span:1.5}},[l("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["label:labelModel:remove"],expression:"['label:labelModel:remove']"}],attrs:{type:"danger",plain:"",icon:"el-icon-delete",size:"mini",disabled:e.multiple},on:{click:e.handleDelete}},[e._v("删除")])],1),l("el-col",{attrs:{span:1.5}},[l("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["label:labelModel:export"],expression:"['label:labelModel:export']"}],attrs:{type:"warning",plain:"",icon:"el-icon-download",size:"mini"},on:{click:e.handleExport}},[e._v("导出")])],1),l("right-toolbar",{attrs:{showSearch:e.showSearch},on:{"update:showSearch":function(t){e.showSearch=t},"update:show-search":function(t){e.showSearch=t},queryTable:e.getList}})],1),l("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.labelModelList},on:{"selection-change":e.handleSelectionChange}},[l("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),l("el-table-column",{attrs:{label:"ID",align:"center",prop:"id"}}),l("el-table-column",{attrs:{label:"标签名称",align:"center",prop:"name"}}),l("el-table-column",{attrs:{label:"标签编码",align:"center",prop:"labelCode"}}),l("el-table-column",{attrs:{label:"标签内容",align:"center",prop:"labelValue"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-button",{attrs:{type:"text",icon:"el-icon-search"},on:{click:function(l){return e.onShow(t.row.labelValue)}}},[e._v("查看")])]}}])}),l("el-table-column",{attrs:{label:"备注",align:"center",prop:"remark"}}),l("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["label:labelModel:edit"],expression:"['label:labelModel:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(l){return e.handleUpdate(t.row)}}},[e._v("修改")]),l("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["label:labelModel:remove"],expression:"['label:labelModel:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(l){return e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],1),l("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),l("el-dialog",{attrs:{title:e.title,visible:e.open,width:"850px","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[l("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"130px"}},[l("el-row",{attrs:{gutter:10}},[l("el-col",{attrs:{span:12}},[l("el-form-item",{attrs:{label:"标签名称",prop:"name"}},[l("el-input",{attrs:{placeholder:"请输入标签名称"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),l("el-col",{attrs:{span:12}},[l("el-form-item",{attrs:{label:"标签编码",prop:"labelCode"}},[l("el-input",{attrs:{placeholder:"请输入标签编码"},model:{value:e.form.labelCode,callback:function(t){e.$set(e.form,"labelCode",t)},expression:"form.labelCode"}})],1)],1),l("el-col",{attrs:{span:24}},[l("el-form-item",{attrs:{label:"标签内容"}},[e.open?l("b-code-editor",{attrs:{"auto-format":!0,"show-number":!1,height:"auto"},model:{value:e.form.labelValue,callback:function(t){e.$set(e.form,"labelValue",t)},expression:"form.labelValue"}}):e._e()],1)],1),l("el-col",{attrs:{span:12}},[l("el-form-item",{attrs:{label:"备注",prop:"remark"}},[l("el-input",{attrs:{type:"textarea",placeholder:"请输入备注"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1)],1)],1),l("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[l("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),l("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1),l("el-dialog",{attrs:{title:"标签信息",visible:e.isShow,width:"900px","append-to-body":""},on:{"update:visible":function(t){e.isShow=t}}},[l("json-viewer",{attrs:{value:e.labelInfo,"expand-depth":5,copyable:"",boxed:"",sort:""}})],1)],1)},n=[],r=l("5530"),o=(l("e9c4"),l("d81d"),l("0ff7")),i={name:"LabelModel",data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,labelModelList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,name:null,labelCode:null},form:{},rules:{name:[{required:!0,message:"标签名称不能为空",trigger:"blur"}],labelCode:[{required:!0,message:"标签编码不能为空",trigger:"blur"}],labelValue:[{required:!0,message:"标签内容不能为空",trigger:"blur"}]},isShow:!1,labelInfo:{}}},components:{},created:function(){this.getList()},methods:{onShow:function(e){var t=JSON.parse(e);this.isShow=!0,this.labelInfo=t},onJsonChange:function(e){},getList:function(){var e=this;this.loading=!0,Object(o["d"])(this.queryParams).then((function(t){e.labelModelList=t.rows,e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={id:null,name:null,labelCode:null,labelValue:null,remark:null,createBy:null,createTime:null,updateBy:null,updateTime:null};var e=JSON.stringify({connectType:0,printerName:"USB",connectIpAddress:null,connectPort:null,pid:300,isBold:!0,epc:"${number}",ptxLabelTexts:[{textType:1,printData:"资产编码:${number}",spaceBetween:28,tffFileName:"SIMHEI.TTF",xLineHeight:10,x:20,y:35,yLineHeight:10}],ptxLabelCodes:[{codeType:2,data:"${locationNumber}",spaceBetween:28,isShowText:!1,X:680,Y:35,width:8,height:8}]});this.form.labelValue=e,this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.id})),this.single=1!==e.length,this.multiple=!e.length},handleAdd:function(){this.reset(),this.open=!0,this.title="添加标签模板信息"},handleUpdate:function(e){var t=this;this.reset();var l=e.id||this.ids;Object(o["c"])(l).then((function(e){t.form=e.data,t.open=!0,t.title="修改标签模板信息"}))},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){t&&(null!=e.form.id?Object(o["f"])(e.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.open=!1,e.getList()})):Object(o["a"])(e.form).then((function(t){e.$modal.msgSuccess("新增成功"),e.open=!1,e.getList()})))}))},handleDelete:function(e){var t=this,l=e.id||this.ids;this.$modal.confirm('是否确认删除标签模板信息编号为"'+l+'"的数据项?').then((function(){return Object(o["b"])(l)})).then((function(){t.getList(),t.$modal.msgSuccess("删除成功")})).catch((function(){}))},handleExport:function(){this.download("label/labelModel/export",Object(r["a"])({},this.queryParams),"labelModel_".concat((new Date).getTime(),".xlsx"))}}},s=i,u=l("2877"),c=Object(u["a"])(s,a,n,!1,null,null,null);t["default"]=c.exports},"0ff7":function(e,t,l){"use strict";l.d(t,"d",(function(){return n})),l.d(t,"e",(function(){return r})),l.d(t,"c",(function(){return o})),l.d(t,"a",(function(){return i})),l.d(t,"f",(function(){return s})),l.d(t,"b",(function(){return u}));var a=l("b775");function n(e){return Object(a["a"])({url:"/label/labelModel/list",method:"get",params:e})}function r(){return Object(a["a"])({url:"/label/labelModel/select",method:"get"})}function o(e){return Object(a["a"])({url:"/label/labelModel/"+e,method:"get"})}function i(e){return Object(a["a"])({url:"/label/labelModel",method:"post",data:e})}function s(e){return Object(a["a"])({url:"/label/labelModel",method:"put",data:e})}function u(e){return Object(a["a"])({url:"/label/labelModel/"+e,method:"delete"})}}}]);