new_naweigete/crmeb/public/admin/dist/system_static/js/chunk-cbcd62ce.d1437529.js

1 line
26 KiB
JavaScript
Raw Normal View History

2025-03-12 10:47:34 +08:00
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-cbcd62ce"],{"129f":function(e,t,a){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},4315:function(e,t,a){a.r(t),a("caad"),a("b0c0"),a("2532");var i=a("c7eb"),n=a("1da1"),o=a("5530"),s=(a("c740"),a("d81d"),a("14d9"),a("a434"),a("e9f5"),a("7d54"),a("ab43"),a("b64b"),a("d3b7"),a("25f0"),a("498a"),a("159b"),a("2f62")),r=a("46c47"),l=a("da05"),c=(a("4e82"),a("4de4"),a("fb6a"),a("910d"),a("ac1f"),a("5319"),a("5b81"),a("841c"),a("5bb2")),u={name:"menusFrom",props:{formValidate:{type:Object,default:null},titleFrom:{type:String,default:""}},data:function(){return{arrs:[],searchRule:"",iconVal:"",grid:{xl:24,lg:24,md:24,sm:24,xs:24},modals:!1,modal12:!1,FromData:[],valids:!1,list2:[],list:c.a,authType:!0,search:c.a,ruleModal:!1,ruleList:[],searchData:[]}},watch:{"formValidate.header":function(e){this.formValidate.is_header=e?1:0},"formValidate.auth_type":function(e){this.authType=1===(e=void 0===e?1:e)},"formValidate.data":function(e){}},computed:{optionsList:function(){var e=[];return this.FromData.map((function(t){"pid"===t.field&&(e=t.options)})),e},headerOptionsList:function(){var e=[];return this.FromData.map((function(t){"header"===t.field&&(e=t.options)})),e},optionsListmodule:function(){var e=[];return this.FromData.map((function(t){"module"===t.field&&(e=t.options)})),e},optionsRadio:function(){var e=[];return this.FromData.map((function(t){"auth_type"===t.field&&(e=t.options)})),e},isheaderRadio:function(){var e=[];return this.FromData.map((function(t){"is_header"===t.field&&(e=t.options)})),e},isShowRadio:function(){var e=[];return this.FromData.map((function(t){"is_show"===t.field&&(e=t.options)})),e},isShowPathRadio:function(){var e=[];return this.FromData.map((function(t){"is_show_path"===t.field&&(e=t.options)})),e},menuList:function(){var e=[];return this.FromData.map((function(t){"menu_list"===t.field&&(e=t.props.options)})),e}},methods:{getRuleList:function(){var e=this;Object(r.d)().then((function(t){e.ruleList=t.data,e.ruleModal=!0}))},modalchange:function(){this.arrs=[],this.ruleModal="",this.ruleModal=!1},changeUnique:function(e){e=this.$routeProStr+e.target.value,"/"===e.slice(0,1)&&(e=e.replace("/","")),this.formValidate.unique_auth=e.replaceAll("/","-")},visible:function(){this.authType=!0},selectRule:function(e){var t=this;this.$emit("selectRule",e),this.$nextTick((function(e){t.ruleModal=!1}))},changeRadio:function(e){this.authType=1===e},upIcon:function(e){var t=this;this.searchData=this.list.filter((function(e){return-1<e.indexOf(t.iconVal)}))},searchRules:function(){if(this.searchRule.trim()){this.arrs=[];for(var e=0;e<this.ruleList.length;e++)-1!==this.ruleList[e].real_name.indexOf(this.searchRule)&&this.arrs.push(e)}else this.arrs=[]},init:function(){this.searchRule="",this.arrs=[]},handleCreate1:function(e){this.headerOptionsList.push({value:e,label:e})},getAddFrom:function(){var e=this;Object(r.a)().then((()=>{var t=Object(n.a)(Object(i.a)().mark((function t(a){return Object(i.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.FromData=a.data.rules;case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}})()).catch((function(t){e.$message.error(t.msg)}))},iconClick:function(){this.modal12=!0},iconChange:function(e){this.formValidate.icon=e,this.modal12=!1},handleSubmit:function(e){var t=this,a=(this.formValidate.path&&(a=this.formValidate.path.length,this.formValidate.pid=this.formValidate.path[a-1]||0),{url:this.formValidate.id?"/setting/menus/".concat(this.formValidate.id):"/setting/menus",method:this.formValidate.id?"put":"post",datas:this.formValidate});if(this.authType){if(!this.formValidate.menu_name)return this.$message.warning("请填写按钮名称");if(!this.formValidate.menu_path)return this.$message.warning("请填写路由地址")}else{if(!this.formValidate.menu_name)return this.$message.warning("请填写接口名称");if(!this.formValidate.methods)return this.$message.warning("请选择请求方式");if(!this.formValidate.api_url)return this.$messag