1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2e90b68a"],{"0e3d":function(e,t,n){"use strict";n.d(t,"e",(function(){return s})),n.d(t,"d",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"f",(function(){return l})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return u}));var a=n("b775");function s(e){return Object(a["a"])({url:"/system/tenantpackage/list",method:"get",params:e})}function r(e){return Object(a["a"])({url:"/system/tenantpackage/"+e,method:"get"})}function i(e){return Object(a["a"])({url:"/system/tenantpackage",method:"post",data:e})}function l(e){return Object(a["a"])({url:"/system/tenantpackage",method:"put",data:e})}function o(e){return Object(a["a"])({url:"/system/tenantpackage/"+e,method:"delete"})}function u(){return Object(a["a"])({url:"/system/tenantpackage/get-simple-list",method:"get"})}},a6dc:function(e,t,n){"use strict";n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"g",(function(){return l})),n.d(t,"f",(function(){return o})),n.d(t,"a",(function(){return u})),n.d(t,"h",(function(){return c})),n.d(t,"b",(function(){return m}));var a=n("b775");function s(e){return Object(a["a"])({url:"/system/menu/list",method:"get",params:e})}function r(){return Object(a["a"])({url:"/system/menu/list-all-simple",method:"get"})}function i(e){return Object(a["a"])({url:"/system/menu/"+e,method:"get"})}function l(){return Object(a["a"])({url:"/system/menu/treeselect",method:"get"})}function o(e){return Object(a["a"])({url:"/system/menu/roleMenuTreeselect/"+e,method:"get"})}function u(e){return Object(a["a"])({url:"/system/menu",method:"post",data:e})}function c(e){return Object(a["a"])({url:"/system/menu",method:"put",data:e})}function m(e){return Object(a["a"])({url:"/system/menu/"+e,method:"delete"})}},f53f:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"app-container"},[n("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":"90px"}},[n("el-form-item",{attrs:{label:"套餐名",prop:"name"}},[n("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),n("el-form-item",{attrs:{label:"套餐状态",prop:"status"}},[n("el-select",{attrs:{placeholder:"请选择租户套餐状态",clearable:""},model:{value:e.queryParams.status,callback:function(t){e.$set(e.queryParams,"status",t)},expression:"queryParams.status"}},e._l(e.dict.type.sys_tenant_status,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),n("el-form-item",[n("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),n("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),n("el-row",{staticClass:"mb8",attrs:{gutter:10}},[n("el-col",{attrs:{span:1.5}},[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:tenantpackage:add"],expression:"['system:tenantpackage:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增")])],1),n("el-col",{attrs:{span:1.5}},[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:tenantpackage:edit"],expression:"['system:tenantpackage:edit']"}],attrs:{type:"success",plain:"",icon:"el-icon-edit",size:"mini",disabled:e.single},on:{click:e.handleUpdate}},[e._v("修改")])],1),n("el-col",{attrs:{span:1.5}},[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:tenantpackage:remove"],expression:"['system:tenantpackage:remove']"}],attrs:{type:"danger",plain:"",icon:"el-icon-delete",size:"mini",disabled:e.multiple},on:{click:e.handleDelete}},[e._v("删除")])],1),n("el-col",{attrs:{span:1.5}},[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:tenantpackage:export"],expression:"['system:tenantpackage:export']"}],attrs:{type:"warning",plain:"",icon:"el-icon-download",size:"mini"},on:{click:e.handleExport}},[e._v("导出")])],1),n("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),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.tenantpackageList},on:{"selection-change":e.handleSelectionChange}},[n("el-table-column",{attrs:{fixed:"",label:"序号","min-width":"20%",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("span",[e._v(e._s((e.queryParams.pageNum-1)*e.queryParams.pageSize+(t.$index+1))+" ")])]}}])}),e._e(),n("el-table-column",{attrs:{label:"套餐名",align:"center",prop:"name"}}),n("el-table-column",{attrs:{label:"创建时间",align:"center",prop:"createTime",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("span",[e._v(e._s(e.parseTime(t.row.createTime,"{y}-{m}-{d}")))])]}}])}),n("el-table-column",{attrs:{label:"租户套餐状态",align:"center",prop:"status"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("dict-tag",{attrs:{options:e.dict.type.sys_tenant_status,value:t.row.status}})]}}])}),n("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:tenantpackage:edit"],expression:"['system:tenantpackage:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(n){return e.handleUpdate(t.row)}}},[e._v("修改")]),n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:tenantpackage:remove"],expression:"['system:tenantpackage:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(n){return e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],1),n("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}}),n("el-dialog",{attrs:{title:e.title,visible:e.open,width:"550px","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[n("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"80px"}},[n("el-form-item",{attrs:{label:"套餐名",prop:"name"}},[n("el-input",{attrs:{placeholder:"请输入套餐名"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),n("el-form-item",{attrs:{label:"菜单权限"}},[n("el-checkbox",{on:{change:function(t){return e.handleCheckedTreeExpand(t)}},model:{value:e.menuExpand,callback:function(t){e.menuExpand=t},expression:"menuExpand"}},[e._v("展开/折叠")]),n("el-checkbox",{on:{change:function(t){return e.handleCheckedTreeNodeAll(t)}},model:{value:e.menuNodeAll,callback:function(t){e.menuNodeAll=t},expression:"menuNodeAll"}},[e._v("全选/全不选")]),n("el-tree",{ref:"menu",staticClass:"tree-border",attrs:{data:e.menuOptions,"show-checkbox":"","node-key":"id","check-strictly":e.menuCheckStrictly,"empty-text":"加载中,请稍后",props:e.defaultProps}})],1),n("el-form-item",{attrs:{label:"套餐状态"}},[n("el-radio-group",{model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},e._l(e.dict.type.sys_tenant_status,(function(t){return n("el-radio",{key:t.value,attrs:{label:parseInt(t.value)}},[e._v(e._s(t.label))])})),1)],1)],1),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),n("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},s=[],r=n("5530"),i=n("2909"),l=(n("d81d"),n("ac1f"),n("1276"),n("d3b7"),n("25f0"),n("99af"),n("0e3d")),o=n("a6dc"),u=n("2da1"),c={name:"Tenantpackage",dicts:["sys_tenant_status"],data:function(){return{defaultProps:{label:"name",children:"children"},menuOptions:[],menuExpand:!1,menuNodeAll:!1,menuCheckStrictly:!0,loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,tenantpackageList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,name:null,status:null},form:{},rules:{name:[{required:!0,message:"套餐名不能为空",trigger:"blur"}],status:[{required:!0,message:"状态不能为空",trigger:"blur"}],menuIds:[{required:!0,message:"关联的菜单编号不能为空",trigger:"blur"}]}}},created:function(){this.getList(),this.getMenus()},methods:{getList:function(){var e=this;this.loading=!0,Object(l["e"])(this.queryParams).then((function(t){e.tenantpackageList=t.data,e.total=t.total,e.loading=!1}))},getMenus:function(){var e=this;Object(o["e"])().then((function(t){var n;e.menuOptions=[],(n=e.menuOptions).push.apply(n,Object(i["a"])(e.handleTree(t.data,"id")))}))},cancel:function(){this.open=!1,this.reset()},reset:function(){void 0!==this.$refs.menu&&this.$refs.menu.setCheckedKeys([]),this.menuExpand=!1,this.menuNodeAll=!1,this.menuCheckStrictly=!0,this.form={id:null,name:null,menuIds:null,createBy:null,createTime:null,updateBy:null,updateTime:null,status:0},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="添加租户套餐",this.menuCheckStrictly=!1},handleUpdate:function(e){var t=this;this.reset();var n=e.id;this.open=!0,this.title="修改租户套餐",Object(l["d"])(n).then((function(e){t.form=e.data,t.menuCheckStrictly=!0,t.$refs.menu.setCheckedKeys(e.data.menuIds.split(",")),t.menuCheckStrictly=!1}))},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){t&&(null!=e.form.id?Object(l["f"])(Object(r["a"])(Object(r["a"])({},e.form),{},{menuIds:[].concat(Object(i["a"])(e.$refs.menu.getCheckedKeys()),Object(i["a"])(e.$refs.menu.getHalfCheckedKeys())).toString()})).then((function(t){e.$modal.msgSuccess("修改成功"),e.open=!1,e.getList()})):Object(l["a"])(Object(r["a"])(Object(r["a"])({},e.form),{},{menuIds:[].concat(Object(i["a"])(e.$refs.menu.getCheckedKeys()),Object(i["a"])(e.$refs.menu.getHalfCheckedKeys())).toString()})).then((function(t){e.$modal.msgSuccess("新增成功"),e.open=!1,e.getList()})))}))},handleDelete:function(e){var t=this,n=e.id||this.ids;this.$modal.confirm("是否确认删除当前租户套餐数据项?").then((function(){return Object(l["b"])(n)})).then((function(){t.getList(),t.$modal.msgSuccess("删除成功")})).catch((function(){}))},handleExport:function(){this.download("system/tenantpackage/export",Object(r["a"])({},this.queryParams),"租户套餐_".concat(Object(u["f"])((new Date).getTime(),"{y}-{m}-{d}"),".xlsx"))},handleCheckedTreeExpand:function(e,t){for(var n=this.menuOptions,a=0;a<n.length;a++)this.$refs.menu.store.nodesMap[n[a].id].expanded=e},handleCheckedTreeNodeAll:function(e){this.$refs.menu.setCheckedNodes(e?this.menuOptions:[])},handleCheckedTreeConnect:function(e){this.form.menuCheckStrictly=e}}},m=c,d=n("2877"),p=Object(d["a"])(m,a,s,!1,null,null,null);t["default"]=p.exports}}]);
|