(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["editMenu"],{"0cb2":function(e,t,r){var n=r("7b0b"),a=Math.floor,o="".replace,i=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,r,c,l,u){var d=r+e.length,f=c.length,p=s;return void 0!==l&&(l=n(l),p=i),o.call(u,p,(function(n,o){var i;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(d);case"<":i=l[o.slice(1,-1)];break;default:var s=+o;if(0===s)return n;if(s>f){var u=a(s/10);return 0===u?n:u<=f?void 0===c[u-1]?o.charAt(1):c[u-1]+o.charAt(1):n}i=c[s-1]}return void 0===i?"":i}))}},"14c3":function(e,t,r){var n=r("c6b6"),a=r("9263");e.exports=function(e,t){var r=e.exec;if("function"===typeof r){var o=r.call(e,t);if("object"!==typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==n(e))throw TypeError("RegExp#exec called on incompatible receiver");return a.call(e,t)}},"250c":function(e,t,r){"use strict";r.d(t,"d",(function(){return a})),r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i})),r.d(t,"e",(function(){return s})),r.d(t,"c",(function(){return c}));var n=r("284b"),a=function(){return n["a"].post("/agent/admin/menu/menulist")},o=function(e){return n["a"].post("/agent/admin/menu/addmenu",e)},i=function(e){return n["a"].post("/agent/admin/menu/deletemenu",e)},s=function(e){return n["a"].post("/agent/admin/menu/editmenu",e)},c=function(e){return n["a"].post("/agent/admin/menu/menuinfo",e)}},"432b":function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));r("b64b"),r("a4d3"),r("4de4"),r("e439"),r("159b"),r("dbb4");var n=r("ade3");function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t1?arguments[1]:void 0)}})},5319:function(e,t,r){"use strict";var n=r("d784"),a=r("825a"),o=r("50c4"),i=r("a691"),s=r("1d80"),c=r("8aa5"),l=r("0cb2"),u=r("14c3"),d=Math.max,f=Math.min,p=function(e){return void 0===e?e:String(e)};n("replace",2,(function(e,t,r,n){var m=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,b=n.REPLACE_KEEPS_$0,h=m?"$":"$0";return[function(r,n){var a=s(this),o=void 0==r?void 0:r[e];return void 0!==o?o.call(r,a,n):t.call(String(a),r,n)},function(e,n){if(!m&&b||"string"===typeof n&&-1===n.indexOf(h)){var s=r(t,e,this,n);if(s.done)return s.value}var g=a(e),v=String(this),y="function"===typeof n;y||(n=String(n));var x=g.global;if(x){var S=g.unicode;g.lastIndex=0}var k=[];while(1){var E=u(g,v);if(null===E)break;if(k.push(E),!x)break;var w=String(E[0]);""===w&&(g.lastIndex=c(v,o(g.lastIndex),S))}for(var I="",O=0,_=0;_=O&&(I+=v.slice(O,T)+D,O=T+N.length)}return I+v.slice(O)}]}))},5899:function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},"58a8":function(e,t,r){var n=r("1d80"),a=r("5899"),o="["+a+"]",i=RegExp("^"+o+o+"*"),s=RegExp(o+o+"*$"),c=function(e){return function(t){var r=String(n(t));return 1&e&&(r=r.replace(i,"")),2&e&&(r=r.replace(s,"")),r}};e.exports={start:c(1),end:c(2),trim:c(3)}},"5a70":function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"ant-pro-footer-toolbar",style:{width:e.barWidth,transition:"0.3s all"}},[r("div",{staticClass:"btn-group flexbox middle center"},[e._t("default")],2)])},a=[],o=(r("a9e3"),{name:"FooterToolBar",props:{collapsed:{type:Boolean,default:!1},siderWidth:{type:Number,default:void 0}},computed:{barWidth:function(){return"calc(100% - ".concat(this.collapsed?80:this.siderWidth||200,"px)")}}}),i=o,s=(r("e481"),r("2877")),c=Object(s["a"])(i,n,a,!1,null,"1b9685aa",null),l=c.exports;t["a"]=l},"668b":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"positionT0L0"},[r("a-form-model",{ref:"ruleForm",attrs:{model:e.form,rules:e.rules,labelAlign:"right","label-col":{span:3},"wrapper-col":{span:6}}},[r("a-form-model-item",{ref:"title",attrs:{label:"菜单名称",prop:"title"}},[r("a-input",{model:{value:e.form.title,callback:function(t){e.$set(e.form,"title",t)},expression:"form.title"}})],1),r("a-form-model-item",{attrs:{label:"上级菜单"}},[r("span",{directives:[{name:"show",rawName:"v-show",value:e.selectTree,expression:"selectTree"}],staticClass:"margin_right10"},[e._v(e._s(e.selectTreeLable))]),r("a-button",{attrs:{type:"primary"},on:{click:function(){return e.isShowModal=!0}}},[e._v("选择上级菜单")]),r("a-modal",{attrs:{title:"选择上级菜单",cancelText:"取消",okText:"确定",centered:""},on:{ok:function(){return e.isShowModal=!1}},model:{value:e.isShowModal,callback:function(t){e.isShowModal=t},expression:"isShowModal"}},[r("a-tree",{attrs:{"tree-data":e.treeData},on:{select:e.onSelect}})],1)],1),r("a-form-model-item",{ref:"url",attrs:{label:"跳转链接",prop:"url"}},[r("a-input",{model:{value:e.form.url,callback:function(t){e.$set(e.form,"url",t)},expression:"form.url"}})],1),r("a-form-model-item",{ref:"sequence",attrs:{type:"number",label:"排列序号",prop:"sequence"}},[r("a-input",{model:{value:e.form.sequence,callback:function(t){e.$set(e.form,"sequence",t)},expression:"form.sequence"}})],1),r("a-form-model-item",{attrs:{label:"是否显示"}},[r("a-radio-group",{attrs:{name:"radioGroup","default-value":1},model:{value:e.displayStatus,callback:function(t){e.displayStatus=t},expression:"displayStatus"}},[r("a-radio",{attrs:{value:1}},[e._v(" 是 ")]),r("a-radio",{attrs:{value:2}},[e._v(" 否 ")])],1)],1),r("a-form-model-item",{ref:"code",attrs:{label:"唯一标识key",prop:"code"}},[r("a-input",{model:{value:e.form.code,callback:function(t){e.$set(e.form,"code",t)},expression:"form.code"}})],1),r("a-form-model-item",{attrs:{label:"菜单功能","wrapper-col":{span:20}}},[r("a-table",{attrs:{columns:e.columns,"data-source":e.tableData,"row-key":function(e){return e.menuNo},bordered:"",pagination:!1},scopedSlots:e._u([{key:"myIndex",fn:function(t,n,a){return r("span",{},[r("span",[e._v(e._s(a+1))])])}},{key:"name",fn:function(t,n){return r("span",{},[r("a-input",{staticClass:"width150",model:{value:n.name,callback:function(t){e.$set(n,"name",t)},expression:"record.name"}})],1)}},{key:"url",fn:function(t,n){return r("span",{},[r("a-input",{staticClass:"width250",model:{value:n.url,callback:function(t){e.$set(n,"url",t)},expression:"record.url"}})],1)}},{key:"displayStatus",fn:function(t,n,a){return r("span",{},[r("a-switch",{attrs:{"default-checked":1==n.displayStatus},on:{change:function(t){return e.onChange(t,n,a)}}})],1)}},{key:"code",fn:function(t,n){return r("span",{},[r("a-input",{staticClass:"width250",model:{value:n.code,callback:function(t){e.$set(n,"code",t)},expression:"record.code"}})],1)}},{key:"remark",fn:function(t,n){return r("span",{},[r("a-input",{staticClass:"width250",model:{value:n.remark,callback:function(t){e.$set(n,"remark",t)},expression:"record.remark"}})],1)}},{key:"sort",fn:function(t,n){return r("span",{},[r("a-input",{staticClass:"width250",model:{value:n.sort,callback:function(t){e.$set(n,"sort",t)},expression:"record.sort"}})],1)}},{key:"operation",fn:function(t,n,a){return r("span",{},[r("a",{on:{click:function(t){return e.delClick(a)}}},[e._v("删除")])])}}])}),r("a-button",{staticClass:"marginT20",attrs:{disabled:e.isAddDisabled,type:"primary",size:"large"},on:{click:e.addFun}},[e._v("增加功能")])],1)],1),r("footer-tool-bar",{attrs:{collapsed:e.sideCollapsed}},[r("a-button",{staticClass:"margin_right60",on:{click:function(){return e.$router.go(-1)}}},[e._v("返回")]),r("a-button",{attrs:{type:"primary",disabled:e.isDisabled},on:{click:e.keepClick}},[e._v("保存")])],1)],1)},a=[],o=(r("b0c0"),r("d81d"),r("ac1f"),r("5319"),r("a434"),r("f64c")),i=r("250c"),s=r("5a70"),c=r("432b"),l=1,u={mixins:[c["a"]],components:{FooterToolBar:s["a"]},created:function(){var e=this,t=this.$route.params.id;this.menuNo=this.$route.params.id,"0"!==t&&Object(i["c"])({menuNo:t}).then((function(t){var r=t.code,n=t.data;200===r&&(e.form.title=n.detail.name,e.displayStatus=n.detail.displayStatus,e.form.url=n.detail.url,e.form.sequence=n.detail.sort,e.form.code=n.detail.code,e.tableData=n.functions)})),Object(i["d"])().then((function(t){var r=t.code,n=t.data;if(200==r){var a=n.map((function(e){return JSON.parse(JSON.stringify(e).replace(/menuNo/g,"key").replace(/name/g,"title"))}));e.treeData=a}}))},data:function(){return{menuNo:"",isDisabled:!1,isShowModal:!1,isAddDisabled:!1,selectTree:"",selectTreeLable:"",displayStatus:1,form:{title:"",url:"",sequence:"",code:""},rules:{title:[{required:!0,message:"输入的内容不能为空",trigger:"blur"},{max:32,message:"最长为32个",trigger:"blur"}],url:[{required:!0,message:"输入的内容不能为空",trigger:"blur"},{max:32,message:"最长为32个",trigger:"blur"}],sequence:[{required:!0,message:"输入的内容不能为空",trigger:"blur"},{max:32,message:"最长为32个",trigger:"blur"}],code:[{required:!0,message:"输入的内容不能为空",trigger:"blur"}]},treeData:[],columns:[{title:"序号",dataIndex:"myIndex",key:"myIndex",scopedSlots:{customRender:"myIndex"}},{title:"操作名称",dataIndex:"name",key:"name",width:"20%",scopedSlots:{customRender:"name"}},{title:"跳转链接",dataIndex:"url",key:"url",width:"20%",scopedSlots:{customRender:"url"}},{title:"是否显示",dataIndex:"displayStatus",key:"displayStatus",width:"7%",scopedSlots:{customRender:"displayStatus"}},{title:"唯一标识key",dataIndex:"code",key:"code",width:"20%",scopedSlots:{customRender:"code"}},{title:"备注",dataIndex:"remark",key:"remark",width:"15%",scopedSlots:{customRender:"remark"}},{title:"排序",dataIndex:"sort",key:"sort",width:"8%",scopedSlots:{customRender:"sort"}},{title:"操作",dataIndex:"operation",key:"operation",scopedSlots:{customRender:"operation"}}],tableData:[]}},methods:{onSelect:function(e,t){this.selectTree=e[0],this.selectTreeLable=t.node.title},delClick:function(e){this.tableData.splice(e,1)},addFun:function(){var e=this;this.isAddDisabled=!0,setTimeout((function(){e.isAddDisabled=!1}),3e3);var t=l++;this.tableData.push({key1:t,name:"",url:"",displayStatus:1,code:"",remark:"",sort:0,operation:"删除"})},onChange:function(e,t,r){this.tableData[r].displayStatus=1==t.displayStatus?2:1},keepClick:function(){var e=this;this.isDisabled=!0,setTimeout((function(){e.isDisabled=!1}),2e3);var t=this.$route.params.id;"0"==t?Object(i["a"])({name:this.form.title,url:this.form.url,parentNo:this.selectTree,displayStatus:this.displayStatus,sort:1*this.form.sequence,code:this.form.code,functions:this.tableData}).then((function(t){var r=t.code;t.data;200==r&&(o["a"].info("新增成功"),e.$router.push("/systemManage/menuManage"))})):Object(i["e"])({menuNo:this.menuNo,name:this.form.title,url:this.form.url,parentNo:this.selectTree,displayStatus:this.displayStatus,sort:1*this.form.sequence,code:this.form.code,functions:this.tableData}).then((function(t){var r=t.code;200==r&&(o["a"].info("保存成功"),e.$router.push("/systemManage/menuManage"))}))}}},d=u,f=r("2877"),p=Object(f["a"])(d,n,a,!1,null,"6f764a04",null);t["default"]=p.exports},7156:function(e,t,r){var n=r("861d"),a=r("d2bb");e.exports=function(e,t,r){var o,i;return a&&"function"==typeof(o=t.constructor)&&o!==r&&n(i=o.prototype)&&i!==r.prototype&&a(e,i),e}},"8aa5":function(e,t,r){"use strict";var n=r("6547").charAt;e.exports=function(e,t,r){return t+(r?n(e,t).length:1)}},9263:function(e,t,r){"use strict";var n=r("ad6d"),a=r("9f7f"),o=r("5692"),i=RegExp.prototype.exec,s=o("native-string-replace",String.prototype.replace),c=i,l=function(){var e=/a/,t=/b*/g;return i.call(e,"a"),i.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),u=a.UNSUPPORTED_Y||a.BROKEN_CARET,d=void 0!==/()??/.exec("")[1],f=l||d||u;f&&(c=function(e){var t,r,a,o,c=this,f=u&&c.sticky,p=n.call(c),m=c.source,b=0,h=e;return f&&(p=p.replace("y",""),-1===p.indexOf("g")&&(p+="g"),h=String(e).slice(c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==e[c.lastIndex-1])&&(m="(?: "+m+")",h=" "+h,b++),r=new RegExp("^(?:"+m+")",p)),d&&(r=new RegExp("^"+m+"$(?!\\s)",p)),l&&(t=c.lastIndex),a=i.call(f?r:c,h),f?a?(a.input=a.input.slice(b),a[0]=a[0].slice(b),a.index=c.lastIndex,c.lastIndex+=a[0].length):c.lastIndex=0:l&&a&&(c.lastIndex=c.global?a.index+a[0].length:t),d&&a&&a.length>1&&s.call(a[0],r,(function(){for(o=1;om)throw TypeError(b);for(u=c(v,n),d=0;dy-n+r;d--)delete v[d-1]}else if(r>n)for(d=y-n;d>x;d--)h=d+n-1,g=d+r-1,h in v?v[g]=v[h]:delete v[g];for(d=0;d2)if(l=h(l),t=l.charCodeAt(0),43===t||45===t){if(r=l.charCodeAt(2),88===r||120===r)return NaN}else if(48===t){switch(l.charCodeAt(1)){case 66:case 98:n=2,a=49;break;case 79:case 111:n=8,a=55;break;default:return+l}for(o=l.slice(2),i=o.length,s=0;sa)return NaN;return parseInt(o,n)}return+l};if(o(g,!v(" 0o1")||!v("0b1")||v("+0x1"))){for(var k,E=function(e){var t=arguments.length<1?0:e,r=this;return r instanceof E&&(x?d((function(){y.valueOf.call(r)})):c(r)!=g)?l(new v(S(t)),r,E):S(t)},w=n?p(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),I=0;w.length>I;I++)s(v,k=w[I])&&!s(E,k)&&b(E,k,m(v,k));E.prototype=y,y.constructor=E,i(a,g,E)}},ac1f:function(e,t,r){"use strict";var n=r("23e7"),a=r("9263");n({target:"RegExp",proto:!0,forced:/./.exec!==a},{exec:a})},ad6d:function(e,t,r){"use strict";var n=r("825a");e.exports=function(){var e=n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},ade3:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},b64b:function(e,t,r){var n=r("23e7"),a=r("7b0b"),o=r("df75"),i=r("d039"),s=i((function(){o(1)}));n({target:"Object",stat:!0,forced:s},{keys:function(e){return o(a(e))}})},d784:function(e,t,r){"use strict";r("ac1f");var n=r("6eeb"),a=r("d039"),o=r("b622"),i=r("9112"),s=o("species"),c=!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})),l=function(){return"$0"==="a".replace(/./,"$0")}(),u=o("replace"),d=function(){return!!/./[u]&&""===/./[u]("a","$0")}(),f=!a((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));e.exports=function(e,t,r,u){var p=o(e),m=!a((function(){var t={};return t[p]=function(){return 7},7!=""[e](t)})),b=m&&!a((function(){var t=!1,r=/a/;return"split"===e&&(r={},r.constructor={},r.constructor[s]=function(){return r},r.flags="",r[p]=/./[p]),r.exec=function(){return t=!0,null},r[p](""),!t}));if(!m||!b||"replace"===e&&(!c||!l||d)||"split"===e&&!f){var h=/./[p],g=r(p,""[e],(function(e,t,r,n,a){return t.exec===RegExp.prototype.exec?m&&!a?{done:!0,value:h.call(t,r,n)}:{done:!0,value:e.call(r,t,n)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:d}),v=g[0],y=g[1];n(String.prototype,e,v),n(RegExp.prototype,p,2==t?function(e,t){return y.call(e,this,t)}:function(e){return y.call(e,this)})}u&&i(RegExp.prototype[p],"sham",!0)}},dbb4:function(e,t,r){var n=r("23e7"),a=r("83ab"),o=r("56ef"),i=r("fc6a"),s=r("06cf"),c=r("8418");n({target:"Object",stat:!0,sham:!a},{getOwnPropertyDescriptors:function(e){var t,r,n=i(e),a=s.f,l=o(n),u={},d=0;while(l.length>d)r=a(n,t=l[d++]),void 0!==r&&c(u,t,r);return u}})},e439:function(e,t,r){var n=r("23e7"),a=r("d039"),o=r("fc6a"),i=r("06cf").f,s=r("83ab"),c=a((function(){i(1)})),l=!s||c;n({target:"Object",stat:!0,forced:l,sham:!s},{getOwnPropertyDescriptor:function(e,t){return i(o(e),t)}})},e481:function(e,t,r){"use strict";r("9940")}}]); //# sourceMappingURL=editMenu.485696ad.js.map