1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3e58"],{EKkn:function(e,t,i){"use strict";i.r(t);var n=i("RPEt"),r={data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,total:0,serviceMangerList:[],title:"",open:!1,queryParams:{page:1,limit:10,companyId:void 0,route:void 0,unitPrice:void 0,remark1:void 0,remark2:void 0,remark3:void 0,deleteFlag:void 0,gmtCreate:void 0,gmtUpdate:void 0,userId:void 0,adminId:void 0},form:{},rules:{deleteFlag:[{required:!0,message:"0:否(默认) 1:是不能为空",trigger:"blur"}]}}},created:function(){this.getList()},methods:{getList:function(){var e=this;this.loading=!0,Object(n.e)(this.queryParams).then(function(t){e.serviceMangerList=t.data.data.items,e.total=t.data.data.count,e.loading=!1})},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={id:void 0,companyId:void 0,route:void 0,unitPrice:void 0,remark1:void 0,remark2:void 0,remark3:void 0,deleteFlag:void 0,gmtCreate:void 0,gmtUpdate:void 0,userId:void 0,adminId:void 0},this.resetForm("form")},handleQuery:function(){this.queryParams.page=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 i=e.id||this.ids.join(",");Object(n.d)(i).then(function(e){t.form=e.data.data,t.open=!0,t.title="修改服务管理"})},submitForm:function(){var e=this;this.$refs.form.validate(function(t){t&&(void 0!=e.form.id?Object(n.f)(e.form).then(function(t){t.data?(e.msgSuccess("修改成功"),e.open=!1,e.getList()):e.msgError(t.msg)}):Object(n.a)(e.form).then(function(t){t.data?(e.msgSuccess("新增成功"),e.open=!1,e.getList()):e.msgError(t.msg)}))})},handleDelete:function(e){var t=this,i=e.id||this.ids.join(",");this.$confirm('是否确认删除服务管理编号为"'+i+'"的数据项?',"警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){return Object(n.b)(i)}).then(function(){t.getList(),t.msgSuccess("删除成功")}).catch(function(){})},handleExport:function(){var e=this,t=this.queryParams;this.$confirm("是否确认导出所有服务管理数据项?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){return Object(n.c)(t)}).then(function(t){e.download(t.data.data)}).catch(function(){})}}},a=i("KHd+"),o=Object(a.a)(r,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"app-container"},[i("el-form",{ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"68px"}},[i("el-form-item",{attrs:{label:"服务项目",prop:"route"}},[i("el-input",{attrs:{placeholder:"请输入服务项目",clearable:"",size:"small"},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleQuery(t):null}},model:{value:e.queryParams.route,callback:function(t){e.$set(e.queryParams,"route",t)},expression:"queryParams.route"}})],1),e._v(" "),i("el-form-item",[i("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),e._v(" "),i("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),e._v(" "),i("el-row",{staticClass:"mb8",attrs:{gutter:10}},[i("el-col",{attrs:{span:1.5}},[i("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["unimall:serviceManger:add"],expression:"['unimall:serviceManger:add']"}],attrs:{type:"primary",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增")])],1),e._v(" "),i("el-col",{attrs:{span:1.5}},[i("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["unimall:serviceManger:edit"],expression:"['unimall:serviceManger:edit']"}],attrs:{disabled:e.single,type:"success",icon:"el-icon-edit",size:"mini"},on:{click:e.handleUpdate}},[e._v("修改")])],1),e._v(" "),i("el-col",{attrs:{span:1.5}},[i("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["unimall:serviceManger:remove"],expression:"['unimall:serviceManger:remove']"}],attrs:{disabled:e.multiple,type:"danger",icon:"el-icon-delete",size:"mini"},on:{click:e.handleDelete}},[e._v("删除")])],1),e._v(" "),i("el-col",{attrs:{span:1.5}},[i("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["unimall:serviceManger:export"],expression:"['unimall:serviceManger:export']"}],attrs:{type:"warning",icon:"el-icon-download",size:"mini"},on:{click:e.handleExport}},[e._v("导出")])],1)],1),e._v(" "),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.serviceMangerList},on:{"selection-change":e.handleSelectionChange}},[i("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),i("el-table-column",{attrs:{label:"服务项目",align:"center",prop:"route"}}),e._v(" "),i("el-table-column",{attrs:{label:"价格",align:"center",prop:"unitPrice"}}),e._v(" "),i("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["unimall:serviceManger:edit"],expression:"['unimall:serviceManger:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(i){e.handleUpdate(t.row)}}},[e._v("修改")]),e._v(" "),i("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["unimall:serviceManger:remove"],expression:"['unimall:serviceManger:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(i){e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.queryParams.page,limit:e.queryParams.limit},on:{"update:page":function(t){e.$set(e.queryParams,"page",t)},"update:limit":function(t){e.$set(e.queryParams,"limit",t)},pagination:e.getList}}),e._v(" "),i("el-dialog",{attrs:{title:e.title,visible:e.open,width:"500px"},on:{"update:visible":function(t){e.open=t}}},[i("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"80px"}},[i("el-form-item",{attrs:{label:"服务项目",prop:"route"}},[i("el-input",{attrs:{placeholder:"请输入服务项目"},model:{value:e.form.route,callback:function(t){e.$set(e.form,"route",t)},expression:"form.route"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"价格",prop:"unitPrice"}},[i("el-input",{attrs:{placeholder:"请输入价格"},model:{value:e.form.unitPrice,callback:function(t){e.$set(e.form,"unitPrice",t)},expression:"form.unitPrice"}})],1)],1),e._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),e._v(" "),i("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},[],!1,null,null,null);o.options.__file="index.vue";t.default=o.exports},RPEt:function(e,t,i){"use strict";i.d(t,"e",function(){return o}),i.d(t,"d",function(){return s}),i.d(t,"a",function(){return l}),i.d(t,"f",function(){return c}),i.d(t,"b",function(){return u}),i.d(t,"c",function(){return m});var n=i("QbLZ"),r=i.n(n),a=i("t3Un");function o(e){return Object(a.a)({method:"get",params:r()({_gp:"admin.unimall.serviceManger",_mt:"list"},e)})}function s(e){return Object(a.a)({method:"get",params:{_gp:"admin.unimall.serviceManger",_mt:"get",id:e}})}function l(e){return Object(a.a)({method:"post",params:{_gp:"admin.unimall.serviceManger",_mt:"add",serviceManger:e}})}function c(e){return Object(a.a)({method:"post",params:{_gp:"admin.unimall.serviceManger",_mt:"update",serviceManger:e}})}function u(e){return Object(a.a)({method:"post",params:{_gp:"admin.unimall.serviceManger",_mt:"delete",id:e}})}function m(e){return Object(a.a)({method:"get",params:r()({_gp:"admin.unimall.serviceManger",_mt:"export"},e)})}}}]);
|