You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ocr-web/dist/js/chunk-f701cba4.5f1da518.js

1 line
16 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f701cba4","chunk-77daad07"],{"11cb":function(e,o,a){"use strict";a.r(o);var l=function(){var e=this,o=e.$createElement,a=e._self._c||o;return a("a-modal",{attrs:{width:900,keyboard:!1,closable:!1,centered:!0,maskClosable:!1,mask:!1,okText:"确认",cancelText:"取消"},on:{ok:e.ok,cancel:e.cancel},model:{value:e.show,callback:function(o){e.show=o},expression:"show"}},[a("a-tabs",[a("a-tab-pane",{key:"1",attrs:{tab:"方向性图标"}},[a("ul",e._l(e.icons.directionIcons,(function(o){return a("li",{key:o},[a("a-icon",{class:{active:e.activeIndex===o},attrs:{type:o,title:o},on:{click:function(a){return e.chooseIcon(o)}}})],1)})),0)]),a("a-tab-pane",{key:"2",attrs:{tab:"指示性图标"}},[a("ul",e._l(e.icons.suggestionIcons,(function(o){return a("li",{key:o},[a("a-icon",{class:{active:e.activeIndex===o},attrs:{type:o,title:o},on:{click:function(a){return e.chooseIcon(o)}}})],1)})),0)]),a("a-tab-pane",{key:"3",attrs:{tab:"编辑类图标"}},[a("ul",e._l(e.icons.editIcons,(function(o){return a("li",{key:o},[a("a-icon",{class:{active:e.activeIndex===o},attrs:{type:o,title:o},on:{click:function(a){return e.chooseIcon(o)}}})],1)})),0)]),a("a-tab-pane",{key:"4",attrs:{tab:"数据类图标"}},[a("ul",e._l(e.icons.dataIcons,(function(o){return a("li",{key:o},[a("a-icon",{class:{active:e.activeIndex===o},attrs:{type:o,title:o},on:{click:function(a){return e.chooseIcon(o)}}})],1)})),0)]),a("a-tab-pane",{key:"5",attrs:{tab:"网站通用图标"}},[a("ul",e._l(e.icons.webIcons,(function(o){return a("li",{key:o},[a("a-icon",{class:{active:e.activeIndex===o},attrs:{type:o,title:o},on:{click:function(a){return e.chooseIcon(o)}}})],1)})),0)]),a("a-tab-pane",{key:"6",attrs:{tab:"品牌和标识"}},[a("ul",e._l(e.icons.logoIcons,(function(o){return a("li",{key:o},[a("a-icon",{class:{active:e.activeIndex===o},attrs:{type:o,title:o},on:{click:function(a){return e.chooseIcon(o)}}})],1)})),0)])],1)],1)},t=[],r=["step-backward","step-forward","fast-backward","fast-forward","shrink","arrows-alt","down","up","left","right","caret-up","caret-down","caret-left","caret-right","up-circle","down-circle","left-circle","right-circle","up-circle-o","down-circle-o","right-circle-o","left-circle-o","double-right","double-left","vertical-left","vertical-right","forward","backward","rollback","enter","retweet","swap","swap-left","swap-right","arrow-up","arrow-down","arrow-left","arrow-right","play-circle","play-circle-o","up-square","down-square","left-square","right-square","up-square-o","down-square-o","left-square-o","right-square-o","login","logout","menu-fold","menu-unfold","border-bottom","border-horizontal","border-inner","border-left","border-right","border-top","border-verticle","pic-center","pic-left","pic-right","radius-bottomleft","radius-bottomright","radius-upleft","radius-upright","fullscreen","fullscreen-exit"],s=["question","question-circle","plus","plus-circle","pause","pause-circle","minus","minus-circle","plus-square","minus-square","info","info-circle","exclamation","exclamation-circle","close","close-circle","close-square","check","check-circle","check-square","clock-circle","warning","issues-close","stop"],i=["edit","form","copy","scissor","delete","snippets","diff","highlight","align-center","align-left","align-right","bg-colors","bold","italic","underline","strikethrough","redo","undo","zoom-in","zoom-out","font-colors","font-size","line-height","colum-height","dash","small-dash","sort-ascending","sort-descending","drag","ordered-list","radius-setting"],n=["area-chart","pie-chart","bar-chart","dot-chart","line-chart","radar-chart","heat-map","fall","rise","stock","box-plot","fund","sliders"],c=["lock","unlock","bars","book","calendar","cloud","cloud-download","code","copy","credit-card","delete","desktop","download","ellipsis","file","file-text","file-unknown","file-pdf","file-word","file-excel","file-jpg","file-ppt","file-markdown","file-add","folder","folder-open","folder-add","hdd","frown","meh","smile","inbox","laptop","appstore","link","mail","mobile","notification","paper-clip","picture","poweroff","reload","search","setting","share-alt","shopping-cart","tablet","tag","tags","to-top","upload","user","video-camera","home","loading","loading-3-quarters","cloud-upload","star","heart","environment","eye","camera","save","team","solution","phone","filter","exception","export","customer-service","qrcode","scan","like","dislike","message","pay-circle","calculator","pushpin","bulb","select","switcher","rocket","bell","disconnect","database","compass","barcode","hourglass","key","flag","layout","printer","sound","usb","skin","tool","sync","wifi","car","schedule","user-add","user-delete","usergroup-add","usergroup-delete","man","woman","shop","gift","idcard","medicine-box","red-envelope","coffee","copyright","trademark","safety","wallet","bank","trophy","contacts","global","shake","api","fork","dashboard","table","profile","alert","audit","branches","build","border","crown","experiment","fire","money-collect","property-safety","read","reconciliation","rest","security-scan","insurance","interation","safety-certificate","project","thunderbolt","block","cluster","deployment-unit","dollar","euro","pound","file-done","file-exclamation","file-protect","file-search","file-sync","gateway","gold","robot","shopping"],d=["android","apple","windows","ie","chrome","github","aliwangwang","dingding","weibo-square","weibo-circle","taobao-circle","html5","weibo","twitter","wechat","youtube","alipay-circle","taobao","skype","qq","medium-workmark","gitlab","medium","linkedin","google-plus","dropbox","facebook","codepen","amazon","google","codepen-circle","alipay","ant-design","aliyun","zhihu","slack","slack-square","behance","behance-square","dribbble","dribbble-square","instagram","yuque","alibaba","yahoo"],u={name:"Icons",props:{iconChooseVisible:{default:!1}},data:function(){return{icons:{directionIcons:r,suggestionIcons:s,editIcons:i,dataIcons:n,webIcons:c,logoIcons:d},choosedIcon:"",activeIndex:""}},computed:{show:{get:function(){return this.iconChooseVisible},set:function(){}}},methods:{reset:function(){this.activeIndex=""},chooseIcon:function(e){this.activeIndex=e,this.choosedIcon=e,this.$message.success("选中 ".concat(e))},ok:function(){""!==this.choosedIcon?(this.reset(),this.$emit("choose",this.choosedIcon)):this.$message.warning("尚未选择任何图标")},cancel:function(){this.reset(),this.$emit("close")}}},m=u,p=(a("3ab1"),a("2877")),h=Object(p["a"])(m,l,t,!1,null,"ea6fbdbc",null);o["default"]=h.exports},"3ab1":function(e,o,a){"use strict";a("d0769")},b90e:function(e,o,a){"use strict";a.r(o);var l=function(){var e=this,o=e.$createElement,a=e._self._c||o;return a("a-drawer",{attrs:{title:e.title,width:e.drawerWidth,visible:e.visible,confirmLoading:e.confirmLoading},on:{close:e.handleCancel}},[a("div",{style:{width:"100%",border:"1px solid #e9e9e9",padding:"10px 16px",background:"#fff"}},[a("a-spin",{attrs:{spinning:e.confirmLoading}},[a("a-form-model",{ref:"form",attrs:{model:e.model,rules:e.validatorRules}},[a("a-form-model-item",{attrs:{label:"菜单类型",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-radio-group",{on:{change:e.onChangeMenuType},model:{value:e.model.menuType,callback:function(o){e.$set(e.model,"menuType",o)},expression:"model.menuType"}},[a("a-radio",{attrs:{value:0}},[e._v("一级菜单")]),a("a-radio",{attrs:{value:1}},[e._v("子菜单")]),a("a-radio",{attrs:{value:2}},[e._v("按钮/权限")])],1)],1),a("a-form-model-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:e.menuLabel,prop:"name",hasFeedback:""}},[a("a-input",{attrs:{placeholder:"请输入菜单名称",readOnly:e.disableSubmit},model:{value:e.model.name,callback:function(o){e.$set(e.model,"name",o)},expression:"model.name"}})],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:0!=e.model.menuType,expression:"model.menuType!=0"}],attrs:{label:"上级菜单",labelCol:e.labelCol,wrapperCol:e.wrapperCol,"validate-status":e.validateStatus,hasFeedback:!0,required:!0}},[a("span",{attrs:{slot:"help"},slot:"help"},[e._v(e._s("error"==e.validateStatus?"请选择上级菜单":" "))]),a("a-tree-select",{staticStyle:{width:"100%"},attrs:{dropdownStyle:{maxHeight:"200px",overflow:"auto"},treeData:e.treeData,placeholder:"请选择父级菜单",disabled:e.disableSubmit},on:{change:e.handleParentIdChange},model:{value:e.model.parentId,callback:function(o){e.$set(e.model,"parentId",o)},expression:"model.parentId"}})],1),a("a-form-model-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"url",label:"菜单路径"}},[a("a-input",{attrs:{placeholder:"请输入菜单路径",readOnly:e.disableSubmit},model:{value:e.model.url,callback:function(o){e.$set(e.model,"url",o)},expression:"model.url"}})],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}],attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"component",label:"前端组件"}},[a("a-input",{attrs:{placeholder:"请输入前端组件",readOnly:e.disableSubmit},model:{value:e.model.component,callback:function(o){e.$set(e.model,"component",o)},expression:"model.component"}})],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:0==e.model.menuType,expression:"model.menuType==0"}],attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"默认跳转地址"}},[a("a-input",{attrs:{placeholder:"请输入路由参数 redirect",readOnly:e.disableSubmit},model:{value:e.model.redirect,callback:function(o){e.$set(e.model,"redirect",o)},expression:"model.redirect"}})],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:!e.show,expression:"!show"}],attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"perms",label:"授权标识"}},[a("a-input",{attrs:{placeholder:"请输入授权标识, 如: user:list",readOnly:e.disableSubmit},model:{value:e.model.perms,callback:function(o){e.$set(e.model,"perms",o)},expression:"model.perms"}})],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:!e.show,expression:"!show"}],attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"授权策略"}},[a("j-dict-select-tag",{attrs:{placeholder:"请选择授权策略",type:"radio",dictCode:"global_perms_type"},model:{value:e.model.permsType,callback:function(o){e.$set(e.model,"permsType",o)},expression:"model.permsType"}})],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:!e.show,expression:"!show"}],attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"状态"}},[a("j-dict-select-tag",{attrs:{placeholder:"请选择状态",type:"radio",dictCode:"valid_status"},model:{value:e.model.status,callback:function(o){e.$set(e.model,"status",o)},expression:"model.status"}})],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}],attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"菜单图标"}},[a("a-input",{attrs:{placeholder:"点击选择图标",readOnly:e.disableSubmit},model:{value:e.model.icon,callback:function(o){e.$set(e.model,"icon",o)},expression:"model.icon"}},[a("a-icon",{attrs:{slot:"addonAfter",type:"setting"},on:{click:e.selectIcons},slot:"addonAfter"})],1)],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}],attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,prop:"sortNo",label:"排序"}},[a("a-input-number",{staticStyle:{width:"200px"},attrs:{placeholder:"请输入菜单排序",readOnly:e.disableSubmit},model:{value:e.model.sortNo,callback:function(o){e.$set(e.model,"sortNo",o)},expression:"model.sortNo"}})],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}],attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"是否路由菜单"}},[a("a-switch",{attrs:{checkedChildren:"是",unCheckedChildren:"否"},model:{value:e.model.route,callback:function(o){e.$set(e.model,"route",o)},expression:"model.route"}})],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}],attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"隐藏路由"}},[a("a-switch",{attrs:{checkedChildren:"是",unCheckedChildren:"否"},model:{value:e.model.hidden,callback:function(o){e.$set(e.model,"hidden",o)},expression:"model.hidden"}})],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}],attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"是否缓存路由"}},[a("a-switch",{attrs:{checkedChildren:"是",unCheckedChildren:"否"},model:{value:e.model.keepAlive,callback:function(o){e.$set(e.model,"keepAlive",o)},expression:"model.keepAlive"}})],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}],attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"聚合路由"}},[a("a-switch",{attrs:{checkedChildren:"是",unCheckedChildren:"否"},model:{value:e.model.alwaysShow,callback:function(o){e.$set(e.model,"alwaysShow",o)},expression:"model.alwaysShow"}})],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}],attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"打开方式"}},[a("a-switch",{attrs:{checkedChildren:"外部",unCheckedChildren:"内部"},model:{value:e.model.internalOrExternal,callback:function(o){e.$set(e.model,"internalOrExternal",o)},expression:"model.internalOrExternal"}})],1)],1),a("icons",{attrs:{iconChooseVisible:e.iconChooseVisible},on:{choose:e.handleIconChoose,close:e.handleIconCancel}})],1),a("a-row",{style:{textAlign:"right"}},[a("a-button",{style:{marginRight:"8px"},on:{click:e.handleCancel}},[e._v(" 关闭 ")]),a("a-button",{attrs:{disabled:e.disableSubmit,type:"primary"},on:{click:e.handleOk}},[e._v("确定")])],1)],1)])},t=[],r=a("4ec3"),s=a("11cb"),i={name:"PermissionModal",components:{Icons:s["default"]},data:function(){return{drawerWidth:700,treeData:[],title:"操作",visible:!1,disableSubmit:!1,model:{},show:!0,menuLabel:"菜单名称",labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},confirmLoading:!1,iconChooseVisible:!1,validateStatus:""}},computed:{validatorRules:function(){return{name:[{required:!0,message:"请输入菜单标题!"}],component:[{required:this.show,message:"请输入前端组件!"}],url:[{required:this.show,message:"请输入菜单路径!"}],permsType:[{required:!0,message:"请输入授权策略!"}],perms:[{required:!1,message:"请输入授权标识!"},{validator:this.validatePerms}]}}},created:function(){},methods:{loadTree:function(){var e=this;Object(r["L"])().then((function(o){if(o.success){e.treeData=[];for(var a=o.result.treeList,l=0;l<a.length;l++){var t=a[l];t.isLeaf=t.leaf,e.treeData.push(t)}}}))},add:function(){this.edit({status:"1",permsType:"1",sortNo:1,route:!0,menuType:0,component:"layouts/RouteView"})},edit:function(e){this.resetScreenSize(),this.model=Object.assign({},e),this.show=2!=e.menuType,this.menuLabel=2==e.menuType?"按钮/权限":"菜单名称",this.visible=!0,this.loadTree()},close:function(){this.$emit("close"),this.disableSubmit=!1,this.visible=!1,this.$refs.form.resetFields()},handleOk:function(){var e=this,o=this;this.$refs.form.validate((function(a){return!!a&&(1!=e.model.menuType&&2!=e.model.menuType||e.model.parentId?(o.validateStatus="success",o.confirmLoading=!0,l=e.model.id?Object(r["p"])(e.model):Object(r["c"])(e.model),void l.then((function(e){e.success?(o.$message.success(e.message),o.$emit("ok")):o.$message.warning(e.message)})).finally((function(){o.confirmLoading=!1,o.close()}))):(o.validateStatus="error",void o.$message.error("请检查你填的类型以及信息是否正确!")));var l}))},handleCancel:function(){this.close()},validateNumber:function(e,o,a){!o||new RegExp(/^[0-9]*[1-9][0-9]*$/).test(o)?a():a("请输入正整数!")},validatePerms:function(e,o,a){if(o&&o.length>0){var l={tableName:"sys_permission",fieldName:"perms",fieldVal:o,dataId:this.model.id};Object(r["m"])(l).then((function(e){e.success?a():a("授权标识已存在!")}))}else a()},onChangeMenuType:function(e){var o=this;2==this.model.menuType?(this.show=!1,this.menuLabel="按钮/权限"):(this.show=!0,this.menuLabel="菜单名称"),this.model.id||1===this.model.menuType&&"layouts/RouteView"===this.model.component&&(this.model.component=""),this.$nextTick((function(){o.$refs.form.validateField(["url","component"])}))},selectIcons:function(){this.iconChooseVisible=!0},handleIconCancel:function(){this.iconChooseVisible=!1},handleIconChoose:function(e){this.model.icon=e,this.iconChooseVisible=!1},resetScreenSize:function(){var e=document.body.clientWidth;this.drawerWidth=e<500?e:700},handleParentIdChange:function(e){this.validateStatus=e?"success":"error"}}},n=i,c=a("2877"),d=Object(c["a"])(n,l,t,!1,null,"24fa42d4",null);o["default"]=d.exports},d0769:function(e,o,a){}}]);