mt-ck-wms-ui/dist/static/js/chunk-38a3fd8e.a59b0504.js
2022-06-07 15:13:51 +08:00

1 line
15 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-38a3fd8e"],{"009a":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{margin:"20px"}},[a("div",{staticStyle:{margin:"20px"}},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.addOrUpdateHandle()}}},[t._v(t._s(t._f("i18nFilter")("btn.add")))])],1),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.menuList,"header-cell-style":{background:"#eef1f6",color:"#606266",height:"56px"},stripe:!0,"highlight-current-row":"","row-key":"id",border:""}},[a("el-table-column",{attrs:{prop:"name","header-align":"center",align:"left",width:"200px",label:t.$t("menuManage.menuName")}}),t._v(" "),a("el-table-column",{attrs:{prop:"code","header-align":"center",align:"center",label:t.$t("menuManage.menuCode")}}),t._v(" "),a("el-table-column",{attrs:{prop:"enName","header-align":"center",align:"center",label:t.$t("menuManage.enName")}}),t._v(" "),a("el-table-column",{attrs:{prop:"category","header-align":"center",align:"center",label:t.$t("menuManage.menuClassify")},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("commonFilter")(e.row.category,t.basicData("roleType")))+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"type","header-align":"center",align:"center",label:t.$t("menuManage.type")},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("commonFilter")(e.row.type,t.basicData("menuType")))+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"parentName","header-align":"center",align:"center",label:t.$t("menuManage.parentName")}}),t._v(" "),a("el-table-column",{attrs:{prop:"sortNo","header-align":"center",align:"center",label:t.$t("menuManage.sortNumber")}}),t._v(" "),a("el-table-column",{attrs:{prop:"icon","header-align":"center",align:"center",label:t.$t("menuManage.icon")},scopedSlots:t._u([{key:"default",fn:function(t){return[a("svg-icon",{attrs:{"icon-class":t.row.icon||""}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"href","header-align":"center",align:"center","show-overflow-tooltip":!0,label:t.$t("menuManage.menuURL")}}),t._v(" "),a("el-table-column",{attrs:{fixed:"right","header-align":"center",align:"center",label:t._f("i18nFilter")("tableHeader.operation")},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.addOrUpdateHandle(e.row.id)}}},[t._v(t._s(t._f("i18nFilter")("btn.edit")))]),t._v(" "),a("span",{staticStyle:{margin:"0 3px"}},[t._v("|")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.deleteHandle(e.row)}}},[t._v(t._s(t._f("i18nFilter")("btn.delete")))])]}}])})],1),t._v(" "),t.addOrUpdateVisible?a("add-or-update",{ref:"addOrUpdate",on:{refreshDataList:t.getDataList}}):t._e()],1)},r=[],i=(a("7f7f"),a("96cf"),a("1da1")),o=a("6b47"),s=a.n(o),l=a("3393"),c=a.n(l),u=a("a3e3"),d=a.n(u),m=a("4573"),p=a.n(m),f=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{attrs:{title:t._f("i18nFilter")(t.dataForm.id?"btn.edit":"btn.add"),"close-on-click-modal":!1,visible:t.visible},on:{"update:visible":function(e){t.visible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.dataForm,rules:t.dataRule,"label-width":"80px"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.dataFormSubmit()}}},[a("el-form-item",{attrs:{label:t.$t("menuManage.type"),prop:"type"}},[a("el-radio-group",{model:{value:t.dataForm.type,callback:function(e){t.$set(t.dataForm,"type",e)},expression:"dataForm.type"}},t._l(t.typeList,(function(e,n){return a("el-radio",{key:n,attrs:{label:n}},[t._v(t._s(e))])})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:t.typeList[t.dataForm.type]+t.$t("menuManage.name"),prop:"name"}},[a("el-input",{attrs:{placeholder:t.typeList[t.dataForm.type]+t.$t("menuManage.name")},model:{value:t.dataForm.name,callback:function(e){t.$set(t.dataForm,"name",e)},expression:"dataForm.name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$t("menuManage.parentName"),prop:"parentName"}},[a("el-popover",{ref:"menuListPopover",attrs:{placement:"bottom-start",disabled:Boolean(t.dataForm.id),trigger:"click"}},[a("el-tree",{ref:"menuListTree",attrs:{data:t.menuList,props:t.menuListTreeProps,"node-key":"id","highlight-current":!0,"expand-on-click-node":!1},on:{"current-change":t.menuListTreeCurrentChangeHandle}})],1),t._v(" "),a("el-input",{directives:[{name:"popover",rawName:"v-popover:menuListPopover",arg:"menuListPopover"}],staticClass:"menu-list__input",attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("menuManage.parentName")]),readonly:""},model:{value:t.dataForm.parentName,callback:function(e){t.$set(t.dataForm,"parentName",e)},expression:"dataForm.parentName"}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$t("menuManage.menuCode"),prop:"code"}},[a("el-input",{attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("menuManage.menuCode")]),clearable:""},model:{value:t.dataForm.code,callback:function(e){t.$set(t.dataForm,"code",e)},expression:"dataForm.code"}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$t("menuManage.enName"),prop:"enName"}},[a("el-input",{attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("menuManage.enName")]),clearable:""},model:{value:t.dataForm.enName,callback:function(e){t.$set(t.dataForm,"enName",e)},expression:"dataForm.enName"}})],1),t._v(" "),1===t.dataForm.type?a("el-form-item",{attrs:{label:t.$t("menuManage.menuURL"),prop:"href"}},[a("el-input",{attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("menuManage.menuURL")])},model:{value:t.dataForm.href,callback:function(e){t.$set(t.dataForm,"href",e)},expression:"dataForm.href"}})],1):t._e(),t._v(" "),0!==t.dataForm.type?a("el-form-item",{attrs:{label:t.$t("menuManage.authorizationMark"),prop:"permission"}},[a("el-input",{attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("menuManage.permissionText")])},model:{value:t.dataForm.permission,callback:function(e){t.$set(t.dataForm,"permission",e)},expression:"dataForm.permission"}})],1):t._e(),t._v(" "),2!==t.dataForm.type?a("el-form-item",{attrs:{label:t.$t("menuManage.sortNumber"),prop:"sortNo"}},[a("el-input-number",{attrs:{"controls-position":"right",min:0},model:{value:t.dataForm.sortNo,callback:function(e){t.$set(t.dataForm,"sortNo",e)},expression:"dataForm.sortNo"}})],1):t._e(),t._v(" "),2!==t.dataForm.type?a("el-form-item",{attrs:{label:t.$t("menuManage.icon"),prop:"icon"}},[a("el-row",[a("el-col",{attrs:{span:22}},[a("el-popover",{ref:"iconListPopover",attrs:{placement:"bottom-start",trigger:"click","popper-class":"mod-menu__icon-popover"}},[a("div",{staticClass:"mod-menu__icon-inner"},[a("div",{staticClass:"mod-menu__icon-list"},t._l(t.iconList,(function(e,n){return a("el-button",{key:n,class:{"is-active":e===t.dataForm.icon},on:{click:function(a){return t.iconActiveHandle(e)}}},[a("svg-icon",{attrs:{"icon-class":e}})],1)})),1)])]),t._v(" "),a("el-input",{directives:[{name:"popover",rawName:"v-popover:iconListPopover",arg:"iconListPopover"}],staticClass:"icon-list__input",attrs:{readonly:"",placeholder:t.$t("menuManage.icon")},on:{change:function(e){return t.$forceUpdate()}},model:{value:t.dataForm.icon,callback:function(e){t.$set(t.dataForm,"icon",e)},expression:"dataForm.icon"}})],1)],1)],1):t._e()],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.visible=!1}}},[t._v(t._s(t._f("i18nFilter")("btn.cancel")))]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.dataFormSubmit()}}},[t._v(t._s(t._f("i18nFilter")("btn.confirm")))])],1)],1)},h=[],b=a("1f27"),v=a("985d"),g={data:function(){var t=this,e=function(e,a,n){1!==t.dataForm.type||/\S/.test(a)?n():n(new Error("菜单URL不能为空"))};return{visible:!1,typeList:["目录","菜单","按钮"],dataForm:{id:"",type:1,name:"",code:"",parentId:0,category:"1",parentName:"",icon:"",enName:"",href:"",permission:"",sortNo:0},dataRule:{name:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("menuManage.menuName")]),trigger:"blur"}],parentName:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("menuManage.parentName")]),trigger:"change"}],href:[{validator:e,trigger:"blur"}]},menuList:[],dataList:[],menuListTreeProps:{label:"name",children:"children"},listQuery:{current:1,size:550},iconList:[]}},created:function(){this.iconList=v["a"].getNameList()},methods:{init:function(){var t=Object(i["a"])(s.a.mark((function t(e){var a,n,r=this;return s.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.visible=!0,this.dataForm.id=e||"",c()(a=this.dataList).call(a,0,this.dataList.length),t.next=5,Object(b["e"])(this.listQuery);case 5:n=t.sent,0===n.code&&(this.dataList=n.data),this.setMenuList(),this.$nextTick((function(){r.$refs["dataForm"].resetFields(),r.dataForm.id&&Object(b["d"])(r.dataForm.id).then((function(t){r.dataForm=t.data}))}));case 9:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),menuListTreeCurrentChangeHandle:function(t,e){this.dataForm.parentId=t.id,this.dataForm.parentName=t.name},menuListTreeSetCurrentNode:function(){this.$refs.menuListTree.setCurrentKey(this.dataForm.parentId),this.dataForm.parentName=(this.$refs.menuListTree.getCurrentNode()||{})["name"]},iconActiveHandle:function(t){this.dataForm.icon=t},dataFormSubmit:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){var a=t.dataForm;t.dataForm.id?Object(b["c"])(a).then((function(e){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){t.visible=!1,t.$emit("refreshDataList")}})})):Object(b["a"])(a).then((function(e){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){t.visible=!1,t.$emit("refreshDataList")}})}))}}))},setMenuList:function(){var t,e,a=this;c()(t=this.menuList).call(t,0,this.menuList.length),p()(e=this.dataList).call(e,(function(t){"0"===t.parentId?a.menuList.push(t):a.append(t)}))},append:function(t){var e,a=this;p()(e=this.dataList).call(e,(function(e){t.parentId===e.id&&(e.children||a.$set(e,"children",[]),e.children.push(t))}))}}},F=g,y=(a("5fde"),a("2877")),_=Object(y["a"])(F,f,h,!1,null,null,null),$=_.exports,L=a("546f"),k={components:{AddOrUpdate:$},filters:{commonFilter:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return t};return e(t)}},data:function(){return{menuList:[],dataList:[],basicData:L["a"],dataListLoading:!1,addOrUpdateVisible:!1,listQuery:{current:1,size:550}}},created:function(){this.getDataList()},methods:{getDataList:function(){var t=Object(i["a"])(s.a.mark((function t(){var e,a;return s.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.dataListLoading=!1,c()(e=this.dataList).call(e,0,this.dataList.length),t.next=4,Object(b["e"])(this.listQuery);case 4:a=t.sent,0===a.code&&(this.dataList=a.data,this.dataListLoading=!1),this.setMenuList();case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),addOrUpdateHandle:function(t){var e=this;this.addOrUpdateVisible=!0,this.$nextTick((function(){e.$refs.addOrUpdate.init(t)}))},deleteHandle:function(t){var e,a=this;this.$confirm(d()(e="".concat(this.$t("module.basicData.visual.TipsBefore"),"[")).call(e,t.name,"]?"),this.$t("module.basicData.visual.Tips"),{confirmButtonText:this.$t("module.basicData.visual.confirmButtonText"),cancelButtonText:this.$t("module.basicData.visual.cancelButtonText"),type:"warning"}).then((function(){Object(b["b"])(t.id).then((function(t){a.$message({message:a.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){a.getDataList()}})}))}))["catch"]((function(){}))},setMenuList:function(){var t,e,a=this;c()(t=this.menuList).call(t,0,this.menuList.length),p()(e=this.dataList).call(e,(function(t){"0"===t.parentId?a.menuList.push(t):a.append(t)}))},append:function(t){var e,a=this;p()(e=this.dataList).call(e,(function(e){t.parentId===e.id&&(t.parentName=e.name,e.children||a.$set(e,"children",[]),e.children.push(t))}))}}},D=k,w=Object(y["a"])(D,n,r,!1,null,null,null);e["default"]=w.exports},"1f27":function(t,e,a){"use strict";a.d(e,"e",(function(){return r})),a.d(e,"d",(function(){return i})),a.d(e,"a",(function(){return o})),a.d(e,"b",(function(){return s})),a.d(e,"c",(function(){return l})),a.d(e,"g",(function(){return c})),a.d(e,"f",(function(){return u}));var n=a("b775");function r(t){return Object(n["a"])({url:"/api/upms/menu/list",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/api/upms/menu/get",method:"post",data:{id:t}})}function o(t){return Object(n["a"])({url:"/api/upms/menu/add",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/api/upms/menu/delete",method:"post",data:{id:t}})}function l(t){return Object(n["a"])({url:"/api/upms/menu/update",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/api/upms/menu/saveRoleMenu",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/api/upms/menu/listByRole",method:"post",data:{id:t}})}},"546f":function(t,e,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")}};e["a"]=function(t){return function(e){var a;return null===r||void 0===r||null===(a=r[t])||void 0===a?void 0:a[e]}}},"5fde":function(t,e,a){"use strict";a("d3e5")},d3e5:function(t,e,a){}}]);