UNPKG

beehole-store-server

Version:

www.bee-hole.com

1 lines 24.5 kB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e81dde36","chunk-18004190","chunk-1bccde7d","chunk-3f12c38a","chunk-78e0bdc8","chunk-2bb397ad"],{"12db":function(e,t,n){"use strict";n("9499")},1400:function(e,t,n){"use strict";n.r(t);n("b0c0"),n("4e82");var o=function(){var e=this,t=e._self._c;return t("ant-modal",{attrs:{visible:e.open,"modal-title":e.formTitle,"adjust-size":!0,modalWidth:"640",modalHeight:"420"},on:{cancel:e.cancel}},[t("a-form-model",{ref:"form",attrs:{slot:"content",model:e.form,rules:e.rules,layout:"vertical"},slot:"content"},[t("a-row",{staticClass:"form-row",attrs:{gutter:32}},[t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:e.$t("view.gangwei.post.post_code"),prop:"code"}},[t("a-input",{attrs:{placeholder:e.$t("view.gangwei.post.input.post_code")},model:{value:e.form.code,callback:function(t){e.$set(e.form,"code",t)},expression:"form.code"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:e.$t("view.gangwei.post.post_name"),prop:"name"}},[t("a-input",{attrs:{placeholder:e.$t("view.gangwei.post.input.post_name")},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:e.$t("view.gangwei.post.sort"),prop:"sort"}},[t("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0},model:{value:e.form.sort,callback:function(t){e.$set(e.form,"sort",t)},expression:"form.sort"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:e.$t("view.gangwei.post.status"),prop:"status"}},[t("a-radio-group",{attrs:{"button-style":"solid"},model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},e._l(e.statusOptions,(function(n,o){return t("a-radio-button",{key:o,attrs:{value:n.value}},[e._v(e._s(n.label))])})),1)],1)],1),t("a-col",{attrs:{lg:24,md:24,sm:24}},[t("a-form-model-item",{attrs:{label:e.$t("component.gangwei.post.remark"),prop:"remark"}},[t("a-input",{attrs:{placeholder:e.$t("component.gangwei.post.input.remark"),type:"textarea","allow-clear":"",rows:2},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1)],1)],1),t("template",{slot:"footer"},[t("a-button",{on:{click:e.cancel}},[e._v(" "+e._s(e.$t("component.gangwei.post.cancle.btn"))+" ")]),t("a-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(" "+e._s(e.$t("component.gangwei.post.save.btn"))+" ")])],1)],2)},a=[],r=n("5530"),s=n("f930"),i=Object(r["a"])({},s["default"]),u=i,c=n("2877"),l=Object(c["a"])(u,o,a,!1,null,null,null);t["default"]=l.exports},1542:function(e,t,n){"use strict";n.r(t);n("b0c0");var o=function(){var e=this,t=e._self._c;return t("div",[t("a-card",{staticStyle:{"margin-bottom":"10px"},attrs:{bordered:!1}},[t("div",{staticClass:"table-page-search-wrapper"},[t("a-form",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-row",{attrs:{gutter:48}},[t("a-col",{attrs:{md:6,sm:24}},[t("a-form-item",{attrs:{label:e.$t("view.gangwei.post.post_name")}},[t("a-input",{attrs:{placeholder:e.$t("view.gangwei.post.input.post_name"),"allow-clear":""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery.apply(null,arguments)}},model:{value:e.queryParam.name,callback:function(t){e.$set(e.queryParam,"name",t)},expression:"queryParam.name"}})],1)],1),t("a-col",{attrs:{md:6,sm:24}},[t("a-form-item",{attrs:{label:e.$t("view.gangwei.post.post_code")}},[t("a-input",{attrs:{placeholder:e.$t("view.gangwei.post.input.post_code"),"allow-clear":""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery.apply(null,arguments)}},model:{value:e.queryParam.code,callback:function(t){e.$set(e.queryParam,"code",t)},expression:"queryParam.code"}})],1)],1),t("a-col",{attrs:{md:6,sm:24}},[t("a-form-item",{attrs:{label:e.$t("view.gangwei.post.status")}},[t("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("view.gangwei.post.input.status"),"allow-clear":""},model:{value:e.queryParam.status,callback:function(t){e.$set(e.queryParam,"status",t)},expression:"queryParam.status"}},e._l(e.statusOptions,(function(n,o){return t("a-select-option",{key:o,attrs:{value:n.value}},[e._v(e._s(n.label))])})),1)],1)],1),t("a-col",[t("span",{staticClass:"table-page-search-submitButtons",staticStyle:{float:"right"}},[t("a-button",{attrs:{type:"primary"},on:{click:e.handleQuery}},[t("a-icon",{attrs:{type:"search"}}),e._v(" "+e._s(e.$t("view.gangwei.post.query.btn"))+" ")],1),t("a-button",{staticStyle:{"margin-left":"8px"},on:{click:e.resetQuery}},[t("a-icon",{attrs:{type:"redo"}}),e._v(" "+e._s(e.$t("view.gangwei.post.cancle.btn"))+" ")],1)],1)])],1)],1)],1)]),t("a-card",{staticClass:"table-card",attrs:{bordered:!1}},[e.showAddModal?t("post-add-form",{ref:"postAddForm",attrs:{statusOptions:e.statusOptions},on:{ok:e.getList,close:function(t){e.showAddModal=!1}}}):e._e(),e.showEditModal?t("post-edit-form",{ref:"postEditForm",attrs:{statusOptions:e.statusOptions},on:{ok:e.getList,close:function(t){e.showEditModal=!1}}}):e._e(),e.showMenuModal?t("sub-role-menu",{ref:"SubRoleMenu",attrs:{statusOptions:e.statusOptions},on:{close:function(t){e.showMenuModal=!1}}}):e._e(),t("advance-table",{attrs:{columns:e.columns,"data-source":e.list,title:e.$t("view.gangwei.post.post.management"),loading:e.loading,rowKey:"id",size:"middle",tableKey:"system-post-PostIndex-table","format-conditions":!0,"row-selection":{selectedRowKeys:e.selectedRowKeys,onChange:e.onSelectChange},pagination:{current:e.queryParam.page,limit:e.queryParam.limit,total:e.total,showSizeChanger:!0,showLessItems:!0,showQuickJumper:!0,showTotal:function(t,n){return e.$t("view.order.list.table.total",{num:n[0]+"-"+n[1],total:t})},onChange:e.changeSize,customRow:e.onClickRow,onShowSizeChange:e.onSizeChange}},on:{refresh:e.getList},scopedSlots:e._u([{key:"status",fn:function(n){n.text;var o=n.record;return t("span",{},[t("a-badge",{attrs:{status:"1"==o.status?"processing":"error",text:e.statusFormat(o)}})],1)}},{key:"created_at",fn:function(n){n.text;var o=n.record;return t("span",{},[e._v(" "+e._s(e.parseTime(o.created_at))+" ")])}},{key:"operation",fn:function(n){n.text;var o=n.record;return t("span",{},[t("a",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:post:edit"],expression:"['system:post:edit']"}],on:{click:function(t){return e.handleUpdate(o,void 0)}}},[e._v(" "+e._s(e.$t("view.gangwei.post.update"))+" ")]),t("a-divider",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:post:remove"],expression:"['system:post:remove']"}],attrs:{type:"vertical"}}),t("a",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:post:remove"],expression:"['system:post:remove']"}],on:{click:function(t){return e.handleDelete(o)}}},[e._v(" "+e._s(e.$t("view.gangwei.post.delete"))+" ")]),t("a-divider",{attrs:{type:"vertical"}}),t("a",{on:{click:function(t){return e.handleMenu(o)}}},[e._v(" "+e._s(e.$t("view.gangwei.post.role_menu"))+" ")])],1)}}])},[t("div",{staticClass:"table-operations",attrs:{slot:"button"},slot:"button"},[t("a-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:config:add"],expression:"['system:config:add']"}],attrs:{type:"primary",size:"small"},on:{click:function(t){return e.handleAdd()}}},[t("a-icon",{attrs:{type:"plus"}}),e._v(e._s(e.$t("view.gangwei.post.new_add"))+" ")],1),t("a-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:config:remove"],expression:"['system:config:remove']"}],attrs:{type:"danger",disabled:e.multiple},on:{click:e.handleDelete}},[t("a-icon",{attrs:{type:"delete"}}),e._v(e._s(e.$t("view.gangwei.post.delete"))+" ")],1)],1)])],1)],1)},a=[],r=(n("d81d"),n("74b1")),s=n("452a"),i=n("1400"),u=n("5d9e"),c=n("8309"),l=n("1b6c"),d={name:"Post",components:{PostEditForm:s["default"],PostAddForm:i["default"],AdvanceTable:u["a"],SubRoleMenu:c["default"]},data:function(){return{showAddModal:!1,showEditModal:!1,showMenuModal:!1,list:[],selectedRowKeys:[],selectedRows:[],advanced:!1,single:!0,multiple:!0,ids:[],names:[],loading:!1,sunloading:!1,total:0,statusOptions:[],dateRange:[],labelCol:{span:6},wrapperCol:{span:18},queryParam:{page:1,limit:10,code:void 0,name:void 0,status:void 0},addModalRefName:"addModal",columns:[{title:Object(l["a"])("view.gangwei.post.post_code"),dataIndex:"code",ellipsis:!0,align:"center"},{title:Object(l["a"])("view.gangwei.post.post_name"),dataIndex:"name",ellipsis:!0,align:"center"},{title:Object(l["a"])("view.gangwei.post.sort"),dataIndex:"sort",align:"center"},{title:Object(l["a"])("view.gangwei.post.status"),dataIndex:"status",scopedSlots:{customRender:"status"},align:"center"},{title:Object(l["a"])("view.gangwei.post.create_time"),dataIndex:"created_at",ellipsis:!0,scopedSlots:{customRender:"created_at"},align:"center"},{title:Object(l["a"])("view.gangwei.post.operation"),dataIndex:"operation",width:"15%",scopedSlots:{customRender:"operation"},align:"center"}]}},filters:{},created:function(){var e=this;this.getList(),this.getDicts("sys_normal_disable").then((function(t){e.statusOptions=t}))},computed:{},watch:{},methods:{getList:function(){var e=this;this.showAddModal=!1,this.showEditModal=!1,this.loading=!0,Object(r["g"])(this.addDateRange(this.queryParam,this.dateRange)).then((function(t){e.list=t.list,t.total_count&&e.list.map((function(e){e.operation=e.remark})),e.total=t.total_count,e.loading=!1}))},statusFormat:function(e){return this.selectDictLabel(this.statusOptions,e.status)},handleQuery:function(){this.queryParam.page=1,this.getList()},handleAdd:function(e){var t=this;this.showAddModal=!0,this.$nextTick((function(){return t.$refs.postAddForm.handleAdd(e)}))},handleUpdate:function(e,t){var n=this;this.showEditModal=!0,this.$nextTick((function(){return n.$refs.postEditForm.handleUpdate(e,t)}))},resetQuery:function(){this.dateRange=[],this.queryParam={page:1,limit:10,code:void 0,name:void 0,status:void 0},this.handleQuery()},onShowSizeChange:function(e,t){this.queryParam.limit=t,this.getList()},onSizeChange:function(e,t){this.queryParam.page=1,this.queryParam.limit=t,this.getList()},changeSize:function(e,t){this.queryParam.page=e,this.queryParam.limit=t,this.getList()},onSelectChange:function(e,t){this.selectedRowKeys=e,this.selectedRows=t,this.ids=this.selectedRows.map((function(e){return e.id})),this.names=this.selectedRows.map((function(e){return e.name})),this.single=1!==e.length,this.multiple=!e.length},onClickRow:function(e){var t=this;return{on:{click:function(){var n=[];n.push(e.id),t.selectedRowKeys=n}}}},toggleAdvanced:function(){this.advanced=!this.advanced},handleDelete:function(e){var t=this,n=e.id||this.ids,o=e.name||this.names;this.$confirm({title:t.$t("确认删除所选中数据?"),content:'当前选中岗位名称为"'+o+'"的数据',onOk:function(){return Object(r["c"])(n).then((function(){t.onSelectChange([],[]),t.getList(),t.$message.success("删除成功",3)}))},onCancel:function(){}})},handleExport:function(){var e=this;this.$confirm({title:e.$t("是否确认导出?"),content:e.$t("此操作将导出当前条件下所有数据而非选中数据"),onOk:function(){return Object(r["d"])(e.queryParam).then((function(t){e.download(t.msg),e.$message.success("导出成功",3)}))},onCancel:function(){}})},handleMenu:function(e){var t=this;this.showMenuModal=!0,this.$nextTick((function(){return t.$refs.SubRoleMenu.handleMenu(e)}))}}},m=d,p=n("2877"),f=Object(p["a"])(m,o,a,!1,null,null,null);t["default"]=f.exports},"1b6c":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return s}));var o=n("5530"),a=n("bf0f");function r(e,t){return function(){return Object(a["b"])(e,Object(o["a"])({},t))}}function s(e,t){return Object(a["b"])(e,Object(o["a"])({},t))}},3528:function(e,t,n){"use strict";n.d(t,"l",(function(){return a})),n.d(t,"k",(function(){return r})),n.d(t,"a",(function(){return s})),n.d(t,"o",(function(){return i})),n.d(t,"n",(function(){return u})),n.d(t,"f",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"g",(function(){return d})),n.d(t,"i",(function(){return m})),n.d(t,"e",(function(){return p})),n.d(t,"d",(function(){return f})),n.d(t,"j",(function(){return h})),n.d(t,"b",(function(){return b})),n.d(t,"h",(function(){return g})),n.d(t,"m",(function(){return v}));var o=n("b775");function a(e){return Object(o["b"])({url:"/role/list",method:"get",params:e})}function r(e){return Object(o["b"])({url:"/role/view"+e,method:"get",params:{id:e}})}function s(e){return Object(o["b"])({url:"/role/edit",method:"post",data:e})}function i(e){return Object(o["b"])({url:"/role/edit",method:"post",data:e})}function u(e){return Object(o["b"])({url:"/role/post_edit",method:"post",data:e})}function c(e){return Object(o["b"])({url:"/role/dataScope",method:"post",data:e})}function l(e,t){var n={id:e,status:t};return Object(o["b"])({url:"/role/changeStatus",method:"post",data:n})}function d(e){return Object(o["b"])({url:"/role/delete",method:"post",params:{id:e}})}function m(e){return Object(o["b"])({url:"/role/export",method:"get",params:e})}function p(e){return Object(o["b"])({url:"/system/role/checkRoleNameUnique",method:"get",params:e})}function f(e){return Object(o["b"])({url:"/system/role/checkRoleKeyUnique",method:"get",params:e})}function h(){return Object(o["b"])({url:"/system/role/findMaxSort",method:"get"})}function b(e){return Object(o["b"])({url:"/system/role/batchSave",method:"post",data:e})}function g(e,t){return Object(o["b"])({url:"/system/role/delete_role_user/",method:"post",params:{id:e,member_id:t}})}function v(e){return Object(o["b"])({url:"/role/saveRolePortlet",method:"post",data:e})}},"452a":function(e,t,n){"use strict";n.r(t);n("b0c0"),n("4e82");var o=function(){var e=this,t=e._self._c;return t("a-drawer",{attrs:{width:"35%",title:e.formTitle,"label-col":4,"wrapper-col":14,visible:e.open,"body-style":{height:"calc(100vh - 100px)",overflow:"auto"}},on:{close:e.cancel}},[t("a-form-model",{ref:"form",attrs:{model:e.form,rules:e.rules}},[t("a-form-model-item",{attrs:{label:e.$t("view.gangwei.post.post_name"),prop:"name"}},[t("a-input",{attrs:{placeholder:e.$t("view.gangwei.post.input.post_name")},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),t("a-form-model-item",{attrs:{label:e.$t("view.gangwei.post.post_code"),prop:"code"}},[t("a-input",{attrs:{placeholder:e.$t("view.gangwei.post.input.post_code")},model:{value:e.form.code,callback:function(t){e.$set(e.form,"code",t)},expression:"form.code"}})],1),t("a-form-model-item",{attrs:{label:e.$t("view.gangwei.post.sort"),prop:"sort"}},[t("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0},model:{value:e.form.sort,callback:function(t){e.$set(e.form,"sort",t)},expression:"form.sort"}})],1),t("a-form-model-item",{attrs:{label:e.$t("view.gangwei.post.status"),prop:"status"}},[t("a-radio-group",{attrs:{"button-style":"solid"},model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},e._l(e.statusOptions,(function(n,o){return t("a-radio-button",{key:o,attrs:{value:n.value}},[e._v(" "+e._s(n.label)+" ")])})),1)],1),t("a-form-model-item",{attrs:{label:e.$t("component.gangwei.post.remark"),prop:"remark"}},[t("a-input",{attrs:{placeholder:e.$t("component.gangwei.post.input.remark"),type:"textarea",rows:2,"allow-clear":""},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1),t("div",{staticClass:"bottom-control"},[t("a-space",[t("a-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(" "+e._s(e.$t("component.gangwei.post.save.btn"))+" ")]),t("a-button",{on:{click:e.cancel}},[e._v(" "+e._s(e.$t("component.gangwei.post.cancle.btn"))+" ")])],1)],1)],1)],1)},a=[],r=n("5530"),s=n("f930"),i=Object(r["a"])({},s["default"]),u=i,c=n("2877"),l=Object(c["a"])(u,o,a,!1,null,null,null);t["default"]=l.exports},"74b1":function(e,t,n){"use strict";n.d(t,"g",(function(){return a})),n.d(t,"f",(function(){return r})),n.d(t,"h",(function(){return s})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return u})),n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"e",(function(){return d}));var o=n("b775");function a(e){return Object(o["b"])({url:"/post/list",method:"get",params:e})}function r(e){return Object(o["b"])({url:"/post/view",method:"get",params:{id:e}})}function s(e){return Object(o["b"])({url:"/post/edit",method:"post",data:e})}function i(e){return Object(o["b"])({url:"/post/delete",method:"post",data:{id:e}})}function u(e){return Object(o["b"])({url:"/system/post/export",method:"get",params:e})}function c(e){return Object(o["b"])({url:"/post/code_unique",method:"get",params:e})}function l(e){return Object(o["b"])({url:"/post/name_unique",method:"get",params:e})}function d(){return Object(o["b"])({url:"/post/max_sort",method:"get"})}},8309:function(e,t,n){"use strict";n.r(t);var o=function(){var e=this,t=e._self._c;return t("ant-modal",{attrs:{visible:e.open,"modal-title":e.formTitle,"adjust-size":!0,modalWidth:"800",modalHeight:"550"},on:{cancel:e.cancel}},[t("template",{slot:"content"},[t("a-form-model",{ref:"form",staticStyle:{height:"calc(100vh - 265px)","overflow-y":"auto","overflow-x":"hidden","padding-left":"20px"},attrs:{model:e.form}},[t("a-form-model-item",[t("a-tree",{attrs:{checkable:"",checkStrictly:!e.form.menuCheckStrictly,"expanded-keys":e.menuExpandedKeys,"auto-expand-parent":e.autoExpandParent,"tree-data":e.menuOptions,replaceFields:e.defaultProps},on:{check:e.onCheck,expand:e.onExpandMenu},model:{value:e.menuCheckedKeys,callback:function(t){e.menuCheckedKeys=t},expression:"menuCheckedKeys"}})],1)],1)],1),t("template",{slot:"footer"},[t("a-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(" "+e._s(e.$t("component.gangwei.post.save.btn"))+" ")]),t("a-button",{on:{click:e.cancel}},[e._v(" "+e._s(e.$t("component.gangwei.post.cancle.btn"))+" ")])],1)],2)},a=[],r=n("5530"),s=n("91ac"),i=Object(r["a"])({},s["default"]),u=i,c=(n("12db"),n("2877")),l=Object(c["a"])(u,o,a,!1,null,null,null);t["default"]=l.exports},"91ac":function(e,t,n){"use strict";n.r(t);n("b0c0"),n("d3b7"),n("159b"),n("a630"),n("3ca3"),n("6062"),n("ddb0"),n("99af");var o=n("2dd7"),a=n("a6dc"),r=n("3528");t["default"]={name:"SubRoleMenu",props:{statusOptions:{type:Array,required:!0}},components:{AntModal:o["a"]},data:function(){return{loading:!1,formTitle:"",form:{},form1:{},menuExpandedKeys:[],autoExpandParent:!1,menuCheckedKeys:[],halfCheckedKeys:[],menuOptions:[],menuExpand:!1,menuNodeAll:!1,defaultProps:{children:"children",title:"label",key:"id"},open:!1}},filters:{},created:function(){},computed:{},watch:{},methods:{cancel:function(){this.open=!1,this.reset(),this.$emit("close")},reset:function(){},getRoleMenuTreeselect:function(e,t){return Object(a["j"])(e,t).then((function(e){return e}))},handleMenu:function(e){var t=this,n=this.getRoleMenuTreeselect(e.member_id,e.id);this.form=e,this.form1.post_id=e.id,this.open=!0,this.formTitle="权限菜单设置",n.then((function(e){for(var n in e.menus)if(e.menus[n].label=t.$t(e.menus[n].label),e.menus[n].name=t.$t(e.menus[n].name),e.menus[n].children)for(var o in e.menus[n].children)e.menus[n].children[o].label=t.$t(e.menus[n].children[o].label),e.menus[n].children[o].name=t.$t(e.menus[n].children[o].name);t.menuOptions=null!==e.menus?e.menus:[],t.menuCheckedKeys=e.checkedKeys,t.form.menuCheckStrictly&&t.selectNodefilter(t.menuOptions,[]),t.treeExpandWithLevel(t.menuOptions,1),t.spinning=!1}))},selectNodefilter:function(e,t){var n=this;if(!e||0===e.length)return[];e.forEach((function(e){var o=n.menuCheckedKeys.indexOf(e.id);e.label=n.$t(e.label),e.name=n.$t(e.name),-1!==o&&(t.forEach((function(e){-1===n.halfCheckedKeys.indexOf(e)&&n.halfCheckedKeys.push(e)})),t=[]);var a=n.halfCheckedKeys.indexOf(e.id),r=t.indexOf(e.id);return-1===a&&-1===r&&-1===o&&t.push(e.id),n.selectNodefilter(e.children,t)}))},treeExpandWithLevel:function(e,t){var n=this;t--,0!==t&&e.forEach((function(e){e.label=n.$t(e.label),e.name=n.$t(e.name),n.menuExpandedKeys.push(e.id),e.children&&n.treeExpandWithLevel(e.children,t)}))},onExpandMenu:function(e){this.menuExpandedKeys=e,this.autoExpandParent=!1},onCheck:function(e,t){if(this.form.menuCheckStrictly)this.halfCheckedKeys=t.halfCheckedKeys,this.menuCheckedKeys=e;else{var n=[];this.menuCheckedKeys.checked&&(n=Array.from(new Set(n.concat(this.menuCheckedKeys.checked)))),this.menuCheckedKeys.halfChecked&&(n=Array.from(new Set(n.concat(this.menuCheckedKeys.halfChecked)))),this.menuCheckedKeys=n}},getMenuAllCheckedKeys:function(){return Array.from(new Set(this.menuCheckedKeys.concat(this.halfCheckedKeys)))},submitForm:function(){var e=this;this.$refs.form.validate((function(t){void 0!==e.form1.post_id&&(e.form1.menuIds=e.getMenuAllCheckedKeys(),Object(r["n"])(e.form1).then((function(t){e.$message.success("修改成功",3),e.open=!1,e.$emit("ok")})))}))}}}},9499:function(e,t,n){},a6dc:function(e,t,n){"use strict";n.d(t,"f",(function(){return a})),n.d(t,"e",(function(){return r})),n.d(t,"k",(function(){return s})),n.d(t,"g",(function(){return i})),n.d(t,"j",(function(){return u})),n.d(t,"h",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"i",(function(){return d})),n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return p})),n.d(t,"d",(function(){return f}));var o=n("b775");function a(e,t,n){return null!=t&&""!==t||(t=0),null!=n&&""!==n||(n="2"),void 0===e&&(e={}),e.pid=t,Object(o["b"])({url:"/menu/list",method:"get",params:e})}function r(e){return Object(o["b"])({url:"/menu/view",method:"get",params:{id:e}})}function s(e,t){return null!=e&&""!==e||(e="0"),null!=t&&""!==t||(t="2"),Object(o["b"])({url:"/system/menu/treeselect/"+t+"/"+e,method:"get"})}function i(e){return Object(o["b"])({url:"/menu/role_list",method:"get",params:{role_id:e}})}function u(e,t){return Object(o["b"])({url:"/menu/sub_role_list",method:"get",params:{member_id:e,post_id:t}})}function c(e){return Object(o["b"])({url:"/menu/edit",method:"post",data:e})}function l(e){return Object(o["b"])({url:"/menu/delete",method:"post",params:{id:e}})}function d(e){return Object(o["b"])({url:"/menu/search_list",method:"get",params:e})}function m(e){return Object(o["b"])({url:"/menu/name_unique",method:"get",params:e})}function p(e){return Object(o["b"])({url:"/menu/code_unique",method:"get",params:e})}function f(e){return Object(o["b"])({url:"/menu/max_sort",method:"get",params:{id:e}})}},f930:function(e,t,n){"use strict";n.r(t);n("4e82");var o=n("74b1"),a=n("2dd7");t["default"]={name:"CreateForm",props:{statusOptions:{type:Array,required:!0}},components:{AntModal:a["a"]},data:function(){return{loading:!1,formTitle:"",form:{id:void 0,postCode:void 0,postName:void 0,sort:0,status:"1",remark:void 0},open:!1,rules:{name:[{required:!0,message:"岗位名称不能为空",trigger:"blur"},{validator:this.checkPostNameUnique}],code:[{required:!0,message:"岗位编码不能为空",trigger:"blur"},{validator:this.checkPostCodeUnique}],sort:[{required:!0,message:"显示顺序不能为空",trigger:"blur"}]}}},filters:{},created:function(){},computed:{},watch:{},methods:{cancel:function(){this.open=!1,this.reset(),this.$emit("close")},reset:function(){},handleAdd:function(){var e=this;this.reset(),Object(o["e"])().then((function(t){e.form.sort=t.sort,e.open=!0,e.formTitle=e.$t("component.gangwei.post.add.post")}))},handleUpdate:function(e,t){var n=this;this.reset();var a=e?e.id:t;Object(o["f"])(a).then((function(e){n.form=e,n.open=!0,n.formTitle=n.$t("component.gangwei.post.update.post")}))},submitForm:function(){var e=this;this.$refs.form.validate((function(t){if(!t)return!1;void 0!==e.form.id?Object(o["h"])(e.form).then((function(t){e.$message.success("修改成功",3),e.open=!1,e.$emit("ok")})):Object(o["h"])(e.form).then((function(t){e.$message.success("新增成功",3),e.open=!1,e.$emit("ok")}))}))},checkPostCodeUnique:function(e,t,n){var a="岗位编码已存在";if(""===t)n();else{var r={code:t,id:void 0!==this.form.id?this.form.id:""};Object(o["a"])(r).then((function(e){e.is_unique?n():n(a)}))}},checkPostNameUnique:function(e,t,n){var a="岗位名称已存在";if(""===t)n();else{var r={name:t,id:void 0!==this.form.id?this.form.id:""};Object(o["b"])(r).then((function(e){e.is_unique?n():n(a)}))}}}}}}]);