chunk-d399.c564434d.js 6.7 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-d399"],{"omp+":function(e,t,i){"use strict";i.r(t);var n=i("zxm2"),r={data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,total:0,serviceMangerTypeColorList:[],title:"",open:!1,queryParams:{page:1,limit:10,companyId:void 0,color: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.serviceMangerTypeColorList=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,color: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(){})}}},o=i("KHd+"),a=Object(o.a)(r,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"app-container"},[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:serviceMangerTypeColor:add"],expression:"['unimall:serviceMangerTypeColor: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:serviceMangerTypeColor:edit"],expression:"['unimall:serviceMangerTypeColor: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:serviceMangerTypeColor:remove"],expression:"['unimall:serviceMangerTypeColor:remove']"}],attrs:{disabled:e.multiple,type:"danger",icon:"el-icon-delete",size:"mini"},on:{click:e.handleDelete}},[e._v("删除")])],1)],1),e._v(" "),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.serviceMangerTypeColorList},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:"color"}}),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:serviceMangerTypeColor:edit"],expression:"['unimall:serviceMangerTypeColor: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:serviceMangerTypeColor:remove"],expression:"['unimall:serviceMangerTypeColor: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:"服务颜色"}},[i("el-input",{attrs:{placeholder:"请输入内容"},model:{value:e.form.color,callback:function(t){e.$set(e.form,"color",t)},expression:"form.color"}})],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);a.options.__file="index.vue";t.default=a.exports},zxm2:function(e,t,i){"use strict";i.d(t,"e",function(){return a}),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 d}),i.d(t,"c",function(){return m});var n=i("QbLZ"),r=i.n(n),o=i("t3Un");function a(e){return Object(o.a)({method:"get",params:r()({_gp:"admin.unimall.serviceMangerTypeColor",_mt:"list"},e)})}function s(e){return Object(o.a)({method:"get",params:{_gp:"admin.unimall.serviceMangerTypeColor",_mt:"get",id:e}})}function l(e){return Object(o.a)({method:"post",params:{_gp:"admin.unimall.serviceMangerTypeColor",_mt:"add",serviceMangerTypeColor:e}})}function c(e){return Object(o.a)({method:"post",params:{_gp:"admin.unimall.serviceMangerTypeColor",_mt:"update",serviceMangerTypeColor:e}})}function d(e){return Object(o.a)({method:"post",params:{_gp:"admin.unimall.serviceMangerTypeColor",_mt:"delete",id:e}})}function m(e){return Object(o.a)({method:"get",params:r()({_gp:"admin.unimall.serviceMangerTypeColor",_mt:"export"},e)})}}}]);