chunk-46a69e16.4356deb2.js 6.4 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-46a69e16"],{3567:function(t,e,s){},d1e1:function(t,e,s){s("3567")},d89c:function(t,e,s){s.r(e);var i=s("c14f"),a=s("1da1"),n=s("5530"),o=(s("14d9"),s("a434"),s("2f62")),l=s("90e7");n={name:"specs",data:function(){return{grid:{xl:10,lg:10,md:12,sm:24,xs:24},loading:!1,optionsList:[{value:"0",label:"全部"},{value:"1",label:"易联云"},{value:"2",label:"飞鹅云"}],columns:[{title:"ID",key:"id",width:80},{title:"打印机名称",key:"print_name",minWidth:100},{title:"平台",slot:"type",minWidth:100},{title:"应用账号",slot:"account",minWidth:100},{title:"打印联数",key:"times",width:200},{title:"创建时间",key:"add_time",width:200},{title:"打印开关",slot:"status",width:200},{title:"操作",slot:"action",fixed:"right",width:140}],specsFrom:{page:1,limit:15,keyword:"",type:"0"},list:[],total:0}},computed:Object(n.a)(Object(n.a)({},Object(o.d)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:"96"},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getList()},methods:{specsSearchs:function(){this.specsFrom.page=1,this.list=[],this.getList()},getList:function(){var t=this;this.loading=!0,Object(l.ib)(this.specsFrom).then((function(e){e=e.data,t.list=e.list,t.total=e.count,t.loading=!1})).catch((function(e){t.loading=!1,t.$message.error(e.msg)}))},pageChange:function(t){this.specsFrom.page=t,this.getList()},onchangeIsShow:function(t){var e=this;t={id:t.id,status:t.status};Object(l.kb)(t).then((()=>{var t=Object(a.a)(Object(i.a)().m((function t(s){return Object(i.a)().w((function(t){for(;;)switch(t.n){case 0:e.$message.success(s.msg);case 1:return t.a(2)}}),t)})));return function(e){return t.apply(this,arguments)}})()).catch((function(t){e.$message.error(t.msg)}))},add:function(){var t=this;this.$modalForm(Object(l.hb)(0)).then((function(){t.getList()}))},edit:function(t){var e=this;this.$modalForm(Object(l.hb)(t)).then((function(){e.getList()}))},setting:function(t){this.$router.push({path:this.$routeProStr+"/setting/ticket/content",query:{id:t}})},del:function(t,e,s){var i=this;e={title:e,num:s,url:"system/ticket/del/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){i.$message.success(t.msg),i.list.splice(s,1),i.list.length||(i.specsFrom.page=1==i.specsFrom.page?1:i.specsFrom.page-1),i.getList()})).catch((function(t){i.$message.error(t.msg)}))}}},s("d1e1"),o=s("2877"),s=Object(o.a)(n,(function(){var t=this,e=t._self._c;return e("div",[e("el-card",{staticClass:"ivu-mt",attrs:{bordered:!1,shadow:"never","body-style":{padding:0}}},[e("div",{staticClass:"padding-add"},[e("el-form",{ref:"specsFrom",attrs:{inline:"",model:t.specsFrom,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[e("el-form-item",{attrs:{label:"打印机名称:"}},[e("el-input",{staticClass:"form_content_width",attrs:{placeholder:"请输入打印机名称",clearable:""},on:{clear:t.specsSearchs,change:t.specsSearchs},model:{value:t.specsFrom.keyword,callback:function(e){t.$set(t.specsFrom,"keyword",e)},expression:"specsFrom.keyword"}})],1),e("el-form-item",{attrs:{label:"平台选择:"}},[e("el-select",{staticClass:"form_content_width mr10",attrs:{clearable:""},on:{clear:t.specsSearchs,change:t.specsSearchs},model:{value:t.specsFrom.type,callback:function(e){t.$set(t.specsFrom,"type",e)},expression:"specsFrom.type"}},t._l(t.optionsList,(function(t,s){return e("el-option",{key:s,attrs:{value:t.value,label:t.label}})})),1),e("el-button",{attrs:{type:"primary"},on:{click:t.specsSearchs}},[t._v("查询")])],1)],1)],1)]),e("el-card",{staticClass:"ivu-mt mt16",attrs:{bordered:!1,shadow:"never"}},[e("el-button",{directives:[{name:"db-click",rawName:"v-db-click"}],attrs:{type:"primary"},on:{click:t.add}},[t._v("添加打印机")]),e("el-table",{ref:"table",staticClass:"mt25",attrs:{data:t.list,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"}},[e("el-table-column",{attrs:{label:"ID","min-width":"50"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",[t._v(t._s(s.row.id))])]}}])}),e("el-table-column",{attrs:{label:"打印机名称","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",[t._v(t._s(s.row.print_name))])]}}])}),e("el-table-column",{attrs:{label:"平台","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(s){return[1==s.row.type?e("span",[t._v("易联云")]):t._e(),2==s.row.type?e("span",[t._v("飞鹅云")]):t._e()]}}])}),e("el-table-column",{attrs:{label:"应用账号","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(s){return[1==s.row.type?e("span",[t._v(t._s(s.row.yly_app_id))]):t._e(),2==s.row.type?e("span",[t._v(t._s(s.row.fey_user))]):t._e()]}}])}),e("el-table-column",{attrs:{label:"打印联数","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",[t._v(t._s(s.row.times))])]}}])}),e("el-table-column",{attrs:{label:"创建时间","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",[t._v(t._s(s.row.add_time))])]}}])}),e("el-table-column",{attrs:{label:"打印开关","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-switch",{staticClass:"defineSwitch",attrs:{"active-value":1,"inactive-value":0,value:s.row.status,size:"large","active-text":"开启","inactive-text":"关闭"},on:{change:function(e){return t.onchangeIsShow(s.row)}},model:{value:s.row.status,callback:function(e){t.$set(s.row,"status",e)},expression:"scope.row.status"}})]}}])}),e("el-table-column",{attrs:{label:"操作",fixed:"right",width:"170"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("a",{on:{click:function(e){return t.setting(s.row.id)}}},[t._v("设计")]),e("el-divider",{attrs:{direction:"vertical"}}),e("a",{on:{click:function(e){return t.edit(s.row.id)}}},[t._v("编辑")]),e("el-divider",{attrs:{direction:"vertical"}}),e("a",{on:{click:function(e){return t.del(s.row,"删除打印机",s.$index)}}},[t._v("删除")])]}}])})],1),e("div",{staticClass:"acea-row row-right page"},[t.total?e("pagination",{attrs:{total:t.total,page:t.specsFrom.page,limit:t.specsFrom.limit},on:{"update:page":function(e){return t.$set(t.specsFrom,"page",e)},"update:limit":function(e){return t.$set(t.specsFrom,"limit",e)},pagination:t.getList}}):t._e()],1)],1)],1)}),[],!1,null,"6648f4aa",null);e.default=s.exports}}]);