mt-ck-wms-ui/dist/static/js/chunk-d821855c.a5c58816.js
2022-06-21 14:03:26 +08:00

1 line
18 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d821855c"],{"09f4":function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a("2b0b"),r=a.n(n);Math.easeInOutQuad=function(e,t,a,n){return e/=n/2,e<1?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t)};var i=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){r()(e,1e3/60)}}();function o(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function s(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function l(e,t,a){var n=s(),r=e-n,l=20,c=0;t="undefined"===typeof t?500:t;var u=function e(){c+=l;var s=Math.easeInOutQuad(c,n,r,t);o(s),c<t?i(e):a&&"function"===typeof a&&a()};u()}},1:function(e,t){},"1f27":function(e,t,a){"use strict";a.d(t,"e",(function(){return r})),a.d(t,"d",(function(){return i})),a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return s})),a.d(t,"c",(function(){return l})),a.d(t,"g",(function(){return c})),a.d(t,"f",(function(){return u}));var n=a("b775");function r(e){return Object(n["a"])({url:"/api/upms/menu/list",method:"post",data:e})}function i(e){return Object(n["a"])({url:"/api/upms/menu/get",method:"post",data:{id:e}})}function o(e){return Object(n["a"])({url:"/api/upms/menu/add",method:"post",data:e})}function s(e){return Object(n["a"])({url:"/api/upms/menu/delete",method:"post",data:{id:e}})}function l(e){return Object(n["a"])({url:"/api/upms/menu/update",method:"post",data:e})}function c(e){return Object(n["a"])({url:"/api/upms/menu/saveRoleMenu",method:"post",data:e})}function u(e){return Object(n["a"])({url:"/api/upms/menu/listByRole",method:"post",data:{id:e}})}},2:function(e,t){},"546f":function(e,t,a){"use strict";var n=a("9923"),r={sex:{0:n["a"].t("basicDataFilter.sex.woman"),1:n["a"].t("basicDataFilter.sex.man")},onDuty:{0:n["a"].t("basicDataFilter.onDuty.no"),1:n["a"].t("basicDataFilter.onDuty.yes")},orderStatus:{1:n["a"].t("basicDataFilter.orderStatus.add"),2:n["a"].t("basicDataFilter.orderStatus.start"),3:n["a"].t("basicDataFilter.orderStatus.stop"),4:n["a"].t("basicDataFilter.orderStatus.issued"),9:n["a"].t("basicDataFilter.orderStatus.complete")},workOrderStatus:{1:n["a"].t("basicDataFilter.workOrderStatus.notactive"),2:n["a"].t("basicDataFilter.workOrderStatus.waiting"),3:n["a"].t("basicDataFilter.workOrderStatus.active"),4:n["a"].t("basicDataFilter.workOrderStatus.stop"),9:n["a"].t("basicDataFilter.workOrderStatus.complete")},source:{1:"MES",2:"ERP",3:"PID1",4:"00A",5:"00C"},priority:{1:n["a"].t("basicDataFilter.priority.low"),2:n["a"].t("basicDataFilter.priority.normal"),3:n["a"].t("basicDataFilter.priority.high")},workStatus:{0:n["a"].t("basicDataFilter.workStatus.fail"),1:n["a"].t("basicDataFilter.workStatus.success")},roleType:{1:"pc",2:"app",3:"wechat",4:"miniapp",5:"pda"},menuType:{0:n["a"].t("basicDataFilter.menuType.catalogue"),1:n["a"].t("basicDataFilter.menuType.menu"),2:n["a"].t("basicDataFilter.menuType.button")},enableState:{0:n["a"].t("basicDataFilter.enableState.disable"),1:n["a"].t("basicDataFilter.enableState.enable")},storage:{0:n["a"].t("basicDataFilter.storage.normal"),1:n["a"].t("basicDataFilter.storage.repairing"),2:n["a"].t("basicDataFilter.storage.scrap")}};t["a"]=function(e){return function(t){var a;return null===r||void 0===r||null===(a=r[e])||void 0===a?void 0:a[t]}}},"5e4c":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"usermanager-container"},[a("head-form",{attrs:{"placeholder-name":e.placeholderName,"key-name":e.keyName},on:{getDataList:e.getList,add:e.addNew}}),e._v(" "),a("base-table",{attrs:{"table-config":e.tableProps,"table-data":e.list,"is-loading":e.listLoading,page:e.listQuery.current,limit:e.listQuery.size}},[a("method-btn",{attrs:{slot:"handleBtn",width:e.trueWidth,"method-list":e.tableBtn},on:{clickBtn:e.handleClick},slot:"handleBtn"})],1),e._v(" "),a("pagination",{attrs:{total:e.total,page:e.listQuery.current,limit:e.listQuery.size},on:{"update:page":function(t){return e.$set(e.listQuery,"current",t)},"update:limit":function(t){return e.$set(e.listQuery,"size",t)},pagination:e.getList}}),e._v(" "),a("add-form",{attrs:{visible:e.showDialog},on:{"update:visible":function(t){e.showDialog=t},done:e.getList}}),e._v(" "),a("edit-form",{attrs:{visible:e.showEditDialog,"target-info":{id:e.curEditId}},on:{"update:visible":function(t){e.showEditDialog=t},done:e.getList}}),e._v(" "),a("menu-empower",{ref:"empowerRef",attrs:{visible:e.empowerDialog},on:{"update:visible":function(t){e.empowerDialog=t},done:e.getList}})],1)},r=[],i=(a("96cf"),a("1da1")),o=(a("7f7f"),a("6b47")),s=a.n(o),l=a("546f"),c=a("bb1e"),u=a("9923"),d=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-dialog",e._g(e._b({attrs:{title:e._f("i18nFilter")("formItem.role.add")},on:{open:e.onOpen,close:e.onClose}},"el-dialog",e.$attrs,!1),e.$listeners),[a("el-form",{ref:"formData",attrs:{model:e.formData,rules:e.rules,size:"medium","label-width":"125px"}},[a("el-form-item",{attrs:{label:e.$t("roleManage.roleCode"),prop:"code"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:e._f("i18nFilterForm")(["placeholder.input",e.$t("roleManage.roleCode")]),clearable:""},model:{value:e.formData.code,callback:function(t){e.$set(e.formData,"code",t)},expression:"formData.code"}})],1),e._v(" "),a("el-form-item",{attrs:{label:e.$t("roleManage.roleName"),prop:"name"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:e._f("i18nFilterForm")(["placeholder.input",e.$t("roleManage.roleName")]),clearable:""},model:{value:e.formData.name,callback:function(t){e.$set(e.formData,"name",t)},expression:"formData.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:e.$t("roleManage.remark"),prop:"remark"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:e._f("i18nFilterForm")(["placeholder.input",e.$t("roleManage.remark")]),clearable:""},model:{value:e.formData.remark,callback:function(t){e.$set(e.formData,"remark",t)},expression:"formData.remark"}})],1)],1),e._v(" "),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.close}},[e._v(e._s(e._f("i18nFilter")("btn.cancel")))]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.handelConfirm}},[e._v(e._s(e._f("i18nFilter")("btn.confirm")))])],1)],1)],1)},m=[],p=a("cc5e"),f={components:{},inheritAttrs:!1,props:[],data:function(){return{formData:{code:void 0,name:void 0,remark:void 0,category:1},categoryOptions:[{value:1,label:"pc"},{value:5,label:"pda"}],rules:{code:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("roleManage.roleCode")]),trigger:"blur"}],name:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("roleManage.roleName")]),trigger:"blur"}],category:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("roleManage.roleType")]),trigger:"change"}]}}},computed:{},watch:{},created:function(){},mounted:function(){},methods:{onOpen:function(){var e=this;this.$nextTick((function(){e.$refs["formData"].resetFields(),Object(p["a"])().then((function(t){e.formData.code=t.data}))}))},onClose:function(){this.$refs["formData"].resetFields()},close:function(){this.$emit("update:visible",!1)},handelConfirm:function(){var e=this;this.$refs["formData"].validate(function(){var t=Object(i["a"])(s.a.mark((function t(a){var n;return s.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,Object(p["b"])(e.formData);case 4:n=t.sent,0===n.code&&(e.$message({type:"success",message:"添加成功!"}),e.$emit("done"),e.close());case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}}},h=f,b=a("2877"),g=Object(b["a"])(h,d,m,!1,null,null,null),v=g.exports,w=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-dialog",e._g(e._b({attrs:{title:e._f("i18nFilter")("formItem.role.edit")},on:{open:e.onOpen,close:e.onClose}},"el-dialog",e.$attrs,!1),e.$listeners),[a("el-form",{ref:"编辑角色",attrs:{model:e.formData,rules:e.rules,size:"medium","label-width":"145px"}},[a("el-form-item",{attrs:{label:e.$t("roleManage.roleCode"),prop:"code"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:e._f("i18nFilterForm")(["placeholder.input",e.$t("roleManage.roleCode")]),clearable:""},model:{value:e.formData.code,callback:function(t){e.$set(e.formData,"code",t)},expression:"formData.code"}})],1),e._v(" "),a("el-form-item",{attrs:{label:e.$t("roleManage.roleName"),prop:"name"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:e._f("i18nFilterForm")(["placeholder.input",e.$t("roleManage.roleName")]),clearable:""},model:{value:e.formData.name,callback:function(t){e.$set(e.formData,"name",t)},expression:"formData.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:e.$t("roleManage.remark"),prop:"remark"}},[a("el-input",{style:{width:"100%"},attrs:{placeholder:e._f("i18nFilterForm")(["placeholder.input",e.$t("roleManage.remark")]),clearable:""},model:{value:e.formData.remark,callback:function(t){e.$set(e.formData,"remark",t)},expression:"formData.remark"}})],1),e._v(" "),a("el-form-item",{attrs:{label:e.$t("roleManage.rolestartstop"),prop:"enabled"}},[a("el-switch",{attrs:{"active-value":1,"inactive-value":0},on:{change:e.enableStateChange},model:{value:e.formData.enabled,callback:function(t){e.$set(e.formData,"enabled",t)},expression:"formData.enabled"}})],1)],1),e._v(" "),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.close}},[e._v(e._s(e._f("i18nFilter")("btn.cancel")))]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.handelConfirm}},[e._v(e._s(e._f("i18nFilter")("btn.confirm")))])],1)],1)],1)},D=[],y={components:{},inheritAttrs:!1,props:{targetInfo:{type:Object,default:function(){return{id:1}}}},data:function(){return{formData:{code:void 0,name:void 0,remark:void 0,category:1,enabled:!0},categoryOptions:[{value:1,label:"pc"},{value:5,label:"pda"}],rules:{code:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("roleManage.roleCode")]),trigger:"blur"}],name:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("roleManage.roleName")]),trigger:"blur"}],remark:[]}}},computed:{},watch:{},created:function(){},mounted:function(){},methods:{onOpen:function(){this.getInfo()},onClose:function(){this.$emit("done"),this.$refs["编辑角色"].resetFields()},close:function(){this.$emit("update:visible",!1)},enableStateChange:function(){var e=Object(i["a"])(s.a.mark((function e(t){var a,n;return s.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(p["d"])({id:null===(a=this.targetInfo)||void 0===a?void 0:a.id,enabled:t});case 2:n=e.sent,0===n.code&&this.$message({type:"success",message:"修改状态成功!"});case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),handelConfirm:function(){var e=this;this.$refs["编辑角色"].validate(function(){var t=Object(i["a"])(s.a.mark((function t(a){var n;return s.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,Object(p["i"])(e.formData);case 4:n=t.sent,0===n.code&&e.$message({type:"success",message:"修改成功!"}),e.close();case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},getInfo:function(){var e=Object(i["a"])(s.a.mark((function e(){var t,a;return s.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(p["e"])({id:null===(t=this.targetInfo)||void 0===t?void 0:t.id});case 2:a=e.sent,0===a.code&&(this.formData=a.data);case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}},k=y,$=Object(b["a"])(k,w,D,!1,null,null,null),F=$.exports,O=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{visible:e.visible},on:{"update:visible":function(t){e.visible=t}}},[a("el-card",{staticClass:"box-card"},[a("div",{staticStyle:{"font-size":"20px","text-align":"center"},attrs:{slot:"header"},slot:"header"},[a("span",{},[e._v(e._s(e.$t("roleManage.roleEmPower")))])]),e._v(" "),a("div",{staticStyle:{"max-height":"500px",overflow:"auto"}},[a("el-tree",{ref:"menuListTree",attrs:{data:e.menuList,props:{label:"en"===e.language?"enName":"name",children:"children"},"node-key":"id","show-checkbox":"","check-on-click-node":"","default-expand-all":!0,"highlight-current":!0,"expand-on-click-node":!1}})],1)]),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.visible=!1}}},[e._v(e._s(e._f("i18nFilter")("btn.cancel")))]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.RoleMenu()}}},[e._v(e._s(e._f("i18nFilter")("btn.confirm")))])],1)],1)},_=[],x=a("2909"),j=a("5530"),M=a("3393"),L=a.n(M),C=a("4573"),S=a.n(C),N=a("2f62"),E=a("1f27"),I={data:function(){return{visible:!1,dataList:[],menuList:[],id:"",listQuery:{current:1,size:550}}},computed:Object(j["a"])({},Object(N["b"])(["language"])),methods:{init:function(){var e=Object(i["a"])(s.a.mark((function e(t){var a,n,r,i,o,l=this;return s.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.id=t||"",this.visible=!0,L()(a=this.dataList).call(a,0,this.dataList.length),e.next=5,Object(E["e"])(this.listQuery);case 5:return n=e.sent,0===n.code&&(this.dataList=n.data),this.setMenuList(),e.next=10,Object(E["f"])(t);case 10:r=e.sent,0===r.code&&r.data&&(o=[],S()(i=r.data).call(i,(function(e){e.checked&&o.push(e.id),e.children&&(o.push.apply(o,Object(x["a"])(l.appendMenuId(e.children))),l.setCheckedNodes(o))})));case 12:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),appendMenuId:function(e){var t=this,a=[];return S()(e).call(e,(function(e){e.checked&&a.push(e.id),e.children&&a.push.apply(a,Object(x["a"])(t.appendMenuId(e.children)))})),a},setCheckedNodes:function(e){this.$refs.menuListTree.setCheckedKeys(e)},setMenuList:function(){var e,t,a=this;L()(e=this.menuList).call(e,0,this.menuList.length),S()(t=this.dataList).call(t,(function(e){"0"===e.parentId?a.menuList.push(e):a.append(e)}))},append:function(e){var t,a=this;S()(t=this.dataList).call(t,(function(t){e.parentId===t.id&&(t.children||a.$set(t,"children",[]),t.children.push(e))}))},RoleMenu:function(){var e=this,t=this.$refs.menuListTree.getCheckedNodes(!1,!0),a=[];S()(t).call(t,(function(e){a.push(e.id)}));var n={menuIds:a,roleId:this.id};Object(E["g"])(n).then((function(t){e.$message({message:e.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){e.visible=!1,e.$emit("done")}})}))}}},T=I,B=(a("c7d6"),Object(b["a"])(T,O,_,!1,null,"30783aa4",null)),Q=B.exports,R=a("c0ee"),z=a("333d"),P=a("ebe9"),q=[{type:"edit",btnName:"btn.edit"},{type:"delete",btnName:"btn.delete"},{type:"EmPower",btnName:u["a"].t("roleManage.roleEmPower")}],A=[{prop:"code",label:u["a"].t("roleManage.roleCode"),align:"center"},{prop:"name",label:u["a"].t("roleManage.roleName"),align:"center"},{prop:"enabled",label:u["a"].t("roleManage.status"),align:"center",filter:Object(l["a"])("enableState")},{prop:"remark",label:u["a"].t("roleManage.remark"),align:"center"}],J={name:"RoleManager",components:{Pagination:z["a"],BaseTable:R["a"],MethodBtn:P["a"],AddForm:v,EditForm:F,HeadForm:c["a"],menuEmpower:Q},props:{},data:function(){return{keyName:u["a"].t("module.basicData.visual.keyword"),placeholderName:this.$t("roleManage.roleName"),tableBtn:q,tableProps:A,list:[],total:0,trueWidth:250,listLoading:!0,showDialog:!1,curEditId:null,showEditDialog:!1,empowerDialog:!1,listQuery:{current:1,size:10}}},created:function(){this.getList()},mounted:function(){},methods:{handleClick:function(e){var t=this;switch(e.type){case"delete":this.$confirm(u["a"].t("deleteMsgBox.content"),u["a"].t("deleteMsgBox.hint"),{confirmButtonText:u["a"].t("btn.confirm"),cancelButtonText:u["a"].t("btn.cancel"),type:"warning"}).then(Object(i["a"])(s.a.mark((function a(){var n;return s.a.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(p["c"])({id:e.data.id});case 2:n=a.sent,0===n.code&&(t.$message({type:"success",message:u["a"].t("deleteMsgBox.doneMsg")}),t.getList());case 4:case"end":return a.stop()}}),a)}))));break;case"edit":this.showEditDialog=!0,this.curEditId=e.data.id;break;case"EmPower":this.empowerRole(e.data.id);break}},getList:function(){var e=Object(i["a"])(s.a.mark((function e(t){var a;return s.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.listLoading=!0,this.listQuery.name=t,e.next=4,Object(p["f"])(this.listQuery);case 4:a=e.sent,0===a.code&&(this.list=a.data,this.listLoading=!1);case 6:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),addNew:function(){this.showDialog=!0},empowerRole:function(e){var t=this;this.empowerDialog=!0,this.$nextTick((function(){t.$refs.empowerRef.init(e)}))}}},U=J,W=(a("b95b"),Object(b["a"])(U,n,r,!1,null,"05a26c04",null));t["default"]=W.exports},b838:function(e,t,a){},b95b:function(e,t,a){"use strict";a("c615")},c615:function(e,t,a){},c7d6:function(e,t,a){"use strict";a("b838")},cc5e:function(e,t,a){"use strict";a.d(t,"e",(function(){return r})),a.d(t,"a",(function(){return i})),a.d(t,"f",(function(){return o})),a.d(t,"b",(function(){return s})),a.d(t,"i",(function(){return l})),a.d(t,"c",(function(){return c})),a.d(t,"d",(function(){return u})),a.d(t,"h",(function(){return d})),a.d(t,"g",(function(){return m}));var n=a("b775");function r(e){return Object(n["a"])({url:"/api/upms/role/get",method:"post",data:e})}function i(){return Object(n["a"])({url:"/api/upms/role/get-code",method:"post"})}function o(e){return Object(n["a"])({url:"/api/upms/role/list",method:"post",data:e})}function s(e){return Object(n["a"])({url:"/api/upms/role/add",method:"post",data:e})}function l(e){return Object(n["a"])({url:"/api/upms/role/update",method:"post",data:e})}function c(e){return Object(n["a"])({url:"/api/upms/role/delete",method:"post",data:e})}function u(e){return Object(n["a"])({url:"/api/upms/role/enabled",method:"post",data:e})}function d(e){return Object(n["a"])({url:"/api/upms/role/saveUserRole",method:"post",data:e})}function m(e){return Object(n["a"])({url:"/api/upms/role/listByUser",method:"post",data:{id:e}})}}}]);