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.
1 lines
27 KiB
1 lines
27 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-4373703a"],{"90e7":function(t,e,n){"use strict";n.d(e,"u",(function(){return o})),n.d(e,"i",(function(){return i})),n.d(e,"wb",(function(){return a})),n.d(e,"vb",(function(){return c})),n.d(e,"X",(function(){return u})),n.d(e,"c",(function(){return s})),n.d(e,"ab",(function(){return l})),n.d(e,"P",(function(){return f})),n.d(e,"kb",(function(){return d})),n.d(e,"H",(function(){return h})),n.d(e,"jb",(function(){return m})),n.d(e,"p",(function(){return p})),n.d(e,"n",(function(){return g})),n.d(e,"o",(function(){return b})),n.d(e,"q",(function(){return v})),n.d(e,"r",(function(){return y})),n.d(e,"S",(function(){return O})),n.d(e,"T",(function(){return w})),n.d(e,"Q",(function(){return j})),n.d(e,"R",(function(){return _})),n.d(e,"I",(function(){return k})),n.d(e,"B",(function(){return x})),n.d(e,"F",(function(){return I})),n.d(e,"E",(function(){return L})),n.d(e,"w",(function(){return S})),n.d(e,"G",(function(){return E})),n.d(e,"y",(function(){return P})),n.d(e,"D",(function(){return T})),n.d(e,"x",(function(){return V})),n.d(e,"v",(function(){return F})),n.d(e,"h",(function(){return $})),n.d(e,"d",(function(){return C})),n.d(e,"e",(function(){return M})),n.d(e,"xb",(function(){return G})),n.d(e,"yb",(function(){return N})),n.d(e,"zb",(function(){return D})),n.d(e,"Z",(function(){return R})),n.d(e,"lb",(function(){return z})),n.d(e,"J",(function(){return W})),n.d(e,"nb",(function(){return A})),n.d(e,"mb",(function(){return B})),n.d(e,"ob",(function(){return U})),n.d(e,"pb",(function(){return q})),n.d(e,"qb",(function(){return J})),n.d(e,"rb",(function(){return Y})),n.d(e,"Ab",(function(){return Q})),n.d(e,"Bb",(function(){return H})),n.d(e,"K",(function(){return K})),n.d(e,"f",(function(){return X})),n.d(e,"Cb",(function(){return Z})),n.d(e,"bb",(function(){return tt})),n.d(e,"cb",(function(){return et})),n.d(e,"C",(function(){return nt})),n.d(e,"z",(function(){return rt})),n.d(e,"Y",(function(){return ot})),n.d(e,"db",(function(){return it})),n.d(e,"eb",(function(){return at})),n.d(e,"fb",(function(){return ct})),n.d(e,"A",(function(){return ut})),n.d(e,"L",(function(){return st})),n.d(e,"O",(function(){return lt})),n.d(e,"M",(function(){return ft})),n.d(e,"N",(function(){return dt})),n.d(e,"g",(function(){return ht})),n.d(e,"t",(function(){return mt})),n.d(e,"s",(function(){return pt})),n.d(e,"U",(function(){return gt})),n.d(e,"gb",(function(){return bt})),n.d(e,"ib",(function(){return vt})),n.d(e,"b",(function(){return yt})),n.d(e,"hb",(function(){return Ot})),n.d(e,"l",(function(){return wt})),n.d(e,"a",(function(){return jt})),n.d(e,"k",(function(){return _t})),n.d(e,"j",(function(){return kt})),n.d(e,"sb",(function(){return xt})),n.d(e,"tb",(function(){return It})),n.d(e,"ub",(function(){return Lt})),n.d(e,"m",(function(){return St})),n.d(e,"V",(function(){return Et})),n.d(e,"W",(function(){return Pt}));var r=n("b6bd");function o(t){return Object(r.a)({url:"setting/config/header_basics",method:"get",params:t})}function i(t,e){return Object(r.a)({url:e,method:"get",params:t})}function a(t){return Object(r.a)({url:t.url,method:"get",params:t.data})}function c(){return Object(r.a)({url:"notify/sms/temp/create",method:"get"})}function u(){return Object(r.a)({url:"serve/info",method:"get"})}function s(t){return Object(r.a)({url:"serve/captcha",method:"post",data:t})}function l(t){return Object(r.a)({url:"serve/meal_list",method:"get",params:t})}function f(t){return Object(r.a)({url:"serve/pay_meal",method:"post",data:t})}function d(){return Object(r.a)({url:"merchant/store",method:"GET"})}function h(){return Object(r.a)({url:"merchant/store/address",method:"GET"})}function m(t){return Object(r.a)({url:"merchant/store/".concat(t.id),method:"POST",data:t})}function p(t){return Object(r.a)({url:"freight/express",method:"get",params:t})}function g(){return Object(r.a)({url:"/freight/express/create",method:"get"})}function b(t){return Object(r.a)({url:"freight/express/".concat(t,"/edit"),method:"get"})}function v(t){return Object(r.a)({url:"freight/express/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function y(){return Object(r.a)({url:"freight/express/sync_express",method:"get"})}function O(t){return Object(r.a)({url:"setting/role",method:"GET",params:t})}function w(t){return Object(r.a)({url:"setting/role/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function j(t){return Object(r.a)({url:"setting/role/".concat(t.id),method:"post",data:t})}function _(t){return Object(r.a)({url:"setting/role/".concat(t,"/edit"),method:"get"})}function k(){return Object(r.a)({url:"setting/role/create",method:"get"})}function x(t){return Object(r.a)({url:"app/wechat/kefu",method:"get",params:t})}function I(t){return Object(r.a)({url:"app/wechat/kefu/create",method:"get",params:t})}function L(){return Object(r.a)({url:"app/wechat/kefu/add",method:"get"})}function S(t){return Object(r.a)({url:"app/wechat/kefu",method:"post",data:t})}function E(t){return Object(r.a)({url:"app/wechat/kefu/set_status/".concat(t.id,"/").concat(t.account_status),method:"PUT"})}function P(t){return Object(r.a)({url:"app/wechat/kefu/".concat(t,"/edit"),method:"GET"})}function T(t,e){return Object(r.a)({url:"app/wechat/kefu/record/".concat(e),method:"GET",params:t})}function V(t){return Object(r.a)({url:"app/wechat/kefu/chat_list",method:"GET",params:t})}function F(){return Object(r.a)({url:"notify/sms/is_login",method:"GET"})}function $(t){return Object(r.a)({url:"setting/city/list/".concat(t),method:"get"})}function C(t){return Object(r.a)({url:"setting/city/add/".concat(t),method:"get"})}function M(t){return Object(r.a)({url:"setting/city/".concat(t,"/edit"),method:"get"})}function G(t){return Object(r.a)({url:"setting/shipping_templates/list",method:"get",params:t})}function N(t){return Object(r.a)({url:"setting/shipping_templates/city_list",method:"get"})}function D(t,e){return Object(r.a)({url:"setting/shipping_templates/save/".concat(t),method:"post",data:e})}function R(t){return Object(r.a)({url:"setting/shipping_templates/".concat(t,"/edit"),method:"get"})}function z(){return Object(r.a)({url:"merchant/store/get_header",method:"get"})}function W(t){return Object(r.a)({url:"merchant/store",method:"get",params:t})}function A(t,e){return Object(r.a)({url:"merchant/store/set_show/".concat(t,"/").concat(e),method:"put"})}function B(t){return Object(r.a)({url:"merchant/store/get_info/".concat(t),method:"get"})}function U(t){return Object(r.a)({url:"merchant/store_staff",method:"get",params:t})}function q(){return Object(r.a)({url:"merchant/store_staff/create",method:"get"})}function J(t){return Object(r.a)({url:"merchant/store_staff/".concat(t,"/edit"),method:"get"})}function Y(t,e){return Object(r.a)({url:"merchant/store_staff/set_show/".concat(t,"/").concat(e),method:"put"})}function Q(t){return Object(r.a)({url:"merchant/verify_order",method:"get",params:t})}function H(t){return Object(r.a)({url:"merchant/verify/spread_info/".concat(t),method:"get"})}function K(){return Object(r.a)({url:"merchant/store_list",method:"get"})}function X(){return Object(r.a)({url:"setting/city/clean_cache",method:"get"})}function Z(t){return Object(r.a)({url:"app/wechat/speechcraft",method:"get",params:t})}function tt(t){return Object(r.a)({url:"app/wechat/speechcraft/create",method:"get",params:t})}function et(t){return Object(r.a)({url:"app/wechat/speechcraft/".concat(t,"/edit"),method:"get"})}function nt(t){return Object(r.a)({url:"app/wechat/kefu/login/".concat(t),method:"get"})}function rt(t){return Object(r.a)({url:"app/feedback",method:"get",params:t})}function ot(t){return Object(r.a)({url:"serve/sms/sign",method:"PUT",data:t})}function it(){return Object(r.a)({url:"app/wechat/speechcraftcate",method:"get"})}function at(){return Object(r.a)({url:"app/wechat/speechcraftcate/create",method:"get"})}function ct(t){return Object(r.a)({url:"app/wechat/speechcraftcate/".concat(t,"/edit"),method:"get"})}function ut(t){return Object(r.a)({url:"app/feedback/".concat(t,"/edit"),method:"get"})}function st(t){return Object(r.a)({url:"setting/system_out/index",method:"get",params:t})}function lt(t,e){return Object(r.a)({url:"setting/system_out/set_status/".concat(t,"/").concat(e),method:"put"})}function ft(t){return Object(r.a)({url:"setting/system_out/save",method:"post",params:t})}function dt(t,e){return Object(r.a)({url:"setting/system_out/update/".concat(t),method:"post",params:e})}function ht(t){return Object(r.a)({url:"city",method:"get",params:t})}function mt(t){return Object(r.a)({url:"setting/config/edit_new_build/"+t,method:"get"})}function pt(){return Object(r.a)({url:"/setting/config/image",method:"get"})}function gt(t){return Object(r.a)({url:"setting/config/save_basics",method:"post",data:t})}function bt(t){return Object(r.a)({url:"/setting/config/storage",method:"get",params:t})}function vt(t){return Object(r.a)({url:"/setting/config/storage/synch/".concat(t),method:"put"})}function yt(t){return Object(r.a)({url:"/setting/config/storage/create/".concat(t),method:"get"})}function Ot(t){return Object(r.a)({url:"/setting/config/storage/status/".concat(t),method:"put"})}function wt(t){return Object(r.a)({url:"/setting/config/storage/domain/".concat(t),method:"get"})}function jt(t){return Object(r.a)({url:"/setting/config/storage/form/".concat(t),method:"get"})}function _t(t){return Object(r.a)({url:"/order/delivery_order/list",method:"get",params:t})}function kt(t){return Object(r.a)({url:"/order/delivery_order/cancelForm/".concat(t),method:"get"})}function xt(t,e){return Object(r.a)({url:"/system/form/save/".concat(t),method:"post",data:e})}function It(t,e){return Object(r.a)({url:"/system/form/info/".concat(t),method:"get",params:e})}function Lt(t){return Object(r.a)({url:"/system/form/index",method:"get",params:t})}function St(t,e){return Object(r.a)({url:"system/form/update_name/"+t,method:"post",data:e})}function Et(t){return Object(r.a)({url:"setting/config/storage/save_type/".concat(t),method:"get"})}function Pt(t){return Object(r.a)({url:"/file/scan/upload",method:"post",headers:{"content-type":"multipart/form-data;"},data:t})}},acd2:function(t,e,n){},dcc3:function(t,e,n){"use strict";n("acd2")},ffd0:function(t,e,n){"use strict";n.r(e);var r=n("2f62"),o=n("90e7");function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */a=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,n){return t[e]=n}}function d(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new V(r||[]);return o(a,"_invoke",{value:S(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=d;var m="suspendedStart",p="suspendedYield",g="executing",b="completed",v={};function y(){}function O(){}function w(){}var j={};f(j,u,(function(){return this}));var _=Object.getPrototypeOf,k=_&&_(_(F([])));k&&k!==n&&r.call(k,u)&&(j=k);var x=w.prototype=y.prototype=Object.create(j);function I(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function n(o,a,c,u){var s=h(t[o],t,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):e.resolve(f).then((function(t){l.value=t,c(l)}),(function(t){return n("throw",t,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return a=a?a.then(o,o):o()}})}function S(e,n,r){var o=m;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var u=E(c,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=b,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=g;var s=h(e,n,r);if("normal"===s.type){if(o=r.done?b:p,s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=b,r.method="throw",r.arg=s.arg)}}}function E(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function V(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function F(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(i(e)+" is not iterable")}return O.prototype=w,o(x,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:O,configurable:!0}),O.displayName=f(w,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===O||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},I(L.prototype),f(L.prototype,s,(function(){return this})),e.AsyncIterator=L,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new L(d(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},I(x),f(x,l,"Generator"),f(x,u,(function(){return this})),f(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=F,V.prototype={constructor:V,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function c(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function u(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){c(i,r,o,a,u,"next",t)}function u(t){c(i,r,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){f(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function f(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==i(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var d={name:"systemrRole",data:function(){return{spinShow:!1,modals:!1,total:0,grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,formValidate:{status:"",role_name:"",page:1,limit:20},columns1:[{title:"ID",key:"id",width:80},{title:"身份昵称",key:"role_name",minWidth:120},{title:"权限",key:"rules",tooltip:!0,width:1e3},{title:"状态",slot:"is_shows",minWidth:120},{title:"操作",slot:"action",fixed:"right",minWidth:120}],tableList:[],formInline:{role_name:"",status:0,checked_menus:[],id:0},menusList:[],modelTit:"",ruleValidate:{role_name:[{required:!0,message:"请输入身份昵称",trigger:"blur"}],status:[{required:!0,type:"number",message:"请选择是否开启",trigger:"change"}]}}},computed:l(l({},Object(r.e)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"},labelPosition2:function(){return this.isMobile?"top":"right"}}),created:function(){this.getList()},methods:{add:function(t){this.formInline.id=0,this.modelTit=t,this.modals=!0,this.getmenusList()},del:function(t,e,n){var r=this,o={title:e,num:n,url:"setting/role/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(o).then((function(t){r.$Message.success(t.msg),r.tableList.splice(n,1),r.tableList.length||(r.formValidate.page=1==r.formValidate.page?1:r.formValidate.page-1),r.getList()})).catch((function(t){r.$Message.error(t.msg)}))},onchangeIsShow:function(t){var e=this,n={id:t.id,status:t.status};Object(o.T)(n).then(function(){var t=u(a().mark((function t(n){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(n.msg);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},getList:function(){var t=this;this.loading=!0,this.formValidate.status=this.formValidate.status||"",Object(o.S)(this.formValidate).then(function(){var e=u(a().mark((function e(n){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.data,t.tableList=r.list,t.total=n.data.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.formValidate.page=t,this.getList()},userSearchs:function(){this.formValidate.page=1,this.getList()},edit:function(t,e){this.modelTit=e,this.formInline.id=t.id,this.modals=!0,this.rows=t,this.getIofo(t)},checkedFun:function(t){for(var e=0;e<t.length&&"运营"==t[e].title;e++)for(var n=0;n<t[e].children.length&&"首页"==t[e].children[n].title;n++){"string"==typeof this.formInline.checked_menus&&(this.formInline.checked_menus=this.formInline.checked_menus.split(",")),this.formInline.checked_menus.push(t[e].children[n].id),this.formInline.checked_menus=this.formInline.checked_menus.join(),t[e].children[n].disabled=!0,t[e].children[n].checked=!0;for(var r=0;r<t[e].children[n].children.length;r++)t[e].children[n].children[r].disabled=!0,t[e].children[n].children[r].checked=!0}},getmenusList:function(){var t=this;this.spinShow=!0,Object(o.I)().then(function(){var e=u(a().mark((function e(n){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.data,t.menusList=r.menus,t.checkedFun(n.data.menus),t.spinShow=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.spinShow=!1,t.$Message.error(e.msg)}))},getIofo:function(t){var e=this;this.spinShow=!0,Object(o.R)(t.id).then(function(){var t=u(a().mark((function t(n){var r;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=n.data,e.formInline=r.role||e.formInline,e.formInline.checked_menus=e.formInline.rules,e.tidyRes(r.menus),e.spinShow=!1;case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.spinShow=!1,e.$Message.error(t.msg)}))},tidyRes:function(t){var e=this,n=[];t.map((function(t){n.push(e.initMenu(t))})),this.checkedFun(n),this.$set(this,"menusList",n)},initMenu:function(t){var e=this,n={},r=","+this.formInline.checked_menus+",";return n.title=t.title,n.id=t.id,t.children&&t.children.length>0?(n.children=[],t.children.map((function(t){n.children.push(e.initMenu(t))}))):(n.checked=-1!==r.indexOf(String(","+n.id+",")),n.expand=!n.checked),n},handleSubmit:function(t){var e=this;this.$refs[t].validate((function(n){return!!n&&(e.formInline.checked_menus=[],e.$refs.tree.getCheckedAndIndeterminateNodes().map((function(t){e.formInline.checked_menus.push(t.id)})),0===e.formInline.checked_menus.length?e.$Message.warning("请至少选择一个权限"):void Object(o.Q)(e.formInline).then(function(){var n=u(a().mark((function n(r){return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:e.$Message.success(r.msg),e.modals=!1,e.getList(),e.$refs[t].resetFields(),e.formInline.checked_menus=[];case 5:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)})))}))},onCancel:function(){this.$refs.formInline.resetFields(),this.formInline.checked_menus=[]}}},h=(n("dcc3"),n("2877")),m=Object(h.a)(d,(function(){var t=this,e=t._self._c;return e("div",[e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[e("div",{staticClass:"new_card_pd"},[e("Form",{ref:"formValidate",attrs:{model:t.formValidate,inline:"","label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:"状态:","label-for":"status"}},[e("Select",{staticClass:"input-add",attrs:{placeholder:"请选择",clearable:""},on:{"on-change":t.userSearchs},model:{value:t.formValidate.status,callback:function(e){t.$set(t.formValidate,"status",e)},expression:"formValidate.status"}},[e("Option",{attrs:{value:"1"}},[t._v("显示")]),e("Option",{attrs:{value:"0"}},[t._v("不显示")])],1)],1),e("FormItem",{attrs:{label:"身份昵称:","label-for":"role_name"}},[e("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入身份昵称"},model:{value:t.formValidate.role_name,callback:function(e){t.$set(t.formValidate,"role_name",e)},expression:"formValidate.role_name"}}),e("Button",{attrs:{type:"primary"},on:{click:function(e){return t.userSearchs()}}},[t._v("查询")])],1)],1)],1)]),e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("Button",{directives:[{name:"auth",rawName:"v-auth",value:["setting-system_role-add"],expression:"['setting-system_role-add']"}],attrs:{type:"primary"},on:{click:function(e){return t.add("添加")}}},[t._v("添加身份")]),e("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns1,data:t.tableList,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"is_shows",fn:function(n){var r=n.row;return n.index,[e("i-switch",{attrs:{value:r.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(r)}},model:{value:r.status,callback:function(e){t.$set(r,"status",e)},expression:"row.status"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}},{key:"action",fn:function(n){var r=n.row,o=n.index;return[e("a",{on:{click:function(e){return t.edit(r,"编辑")}}},[t._v("编辑")]),e("Divider",{attrs:{type:"vertical"}}),e("a",{on:{click:function(e){return t.del(r,"删除",o)}}},[t._v("删除")])]}}])}),e("div",{staticClass:"acea-row row-right page"},[e("Page",{attrs:{total:t.total,current:t.formValidate.page,"show-elevator":"","show-total":"","page-size":t.formValidate.limit},on:{"on-change":t.pageChange}})],1)],1),e("Modal",{attrs:{scrollable:"","footer-hide":"",closable:"",title:"".concat(t.modelTit,"身份"),"mask-closable":!1,width:"600"},on:{"on-cancel":t.onCancel},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[e("Form",{ref:"formInline",attrs:{model:t.formInline,rules:t.ruleValidate,"label-width":100,"label-position":t.labelPosition2},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:"身份名称:","label-for":"role_name",prop:"role_name"}},[e("Input",{attrs:{placeholder:"请输入身份昵称"},model:{value:t.formInline.role_name,callback:function(e){t.$set(t.formInline,"role_name",e)},expression:"formInline.role_name"}})],1),e("FormItem",{attrs:{label:"是否开启:",prop:"status"}},[e("RadioGroup",{model:{value:t.formInline.status,callback:function(e){t.$set(t.formInline,"status",e)},expression:"formInline.status"}},[e("Radio",{attrs:{label:1}},[t._v("开启")]),e("Radio",{attrs:{label:0}},[t._v("关闭")])],1)],1),e("FormItem",{attrs:{label:"权限:"}},[e("div",{staticClass:"trees-coadd"},[e("div",{staticClass:"scollhide"},[e("div",{staticClass:"iconlist"},[e("Tree",{ref:"tree",attrs:{data:t.menusList,"show-checkbox":""}})],1)])])]),t.spinShow?e("Spin",{attrs:{size:"large",fix:""}}):t._e(),e("Button",{attrs:{type:"primary",size:"large",long:""},on:{click:function(e){return t.handleSubmit("formInline")}}},[t._v("提交")])],1)],1)],1)}),[],!1,null,"925e696e",null);e.default=m.exports}}]); |