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
26 KiB
1 lines
26 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-1f6ec5ba"],{"33b8":function(t,e,r){"use strict";r.r(e);var n=r("2f62"),o=r("8593");function a(t){return(a="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 i(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},l="function"==typeof Symbol?Symbol:{},s=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",c=l.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var a=e&&e.prototype instanceof b?e:b,i=Object.create(a.prototype),l=new S(n||[]);return o(i,"_invoke",{value:V(t,r,l)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var d="suspendedStart",m="suspendedYield",v="executing",y="completed",g={};function b(){}function w(){}function x(){}var _={};f(_,s,(function(){return this}));var L=Object.getPrototypeOf,E=L&&L(L(C([])));E&&E!==r&&n.call(E,s)&&(_=E);var O=x.prototype=b.prototype=Object.create(_);function k(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,i,l,s){var u=h(t[o],t,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==a(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,l,s)}),(function(t){r("throw",t,l,s)})):e.resolve(f).then((function(t){c.value=t,l(c)}),(function(t){return r("throw",t,l,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function V(e,r,n){var o=d;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var l=n.delegate;if(l){var s=I(l,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var u=h(e,r,n);if("normal"===u.type){if(o=n.done?y:m,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function I(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,I(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function F(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(F,this),this.reset(!0)}function C(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(a(e)+" is not iterable")}return w.prototype=x,o(O,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,c,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},k(j.prototype),f(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(p(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(O),f(O,c,"Generator"),f(O,s,(function(){return this})),f(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=C,S.prototype={constructor:S,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(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function o(n,o){return l.type="throw",l.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},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),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function l(t,e,r,n,o,a,i){try{var l=t[a](i),s=l.value}catch(t){return void r(t)}l.done?e(s):Promise.resolve(s).then(n,o)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){l(a,n,o,i,s,"next",t)}function s(t){l(a,n,o,i,s,"throw",t)}i(void 0)}))}}var u={name:"menusFrom",props:{groupId:{type:Number,default:0},titleFrom:{type:String,default:""},addId:{type:String,default:""}},data:function(){return{iconVal:"",grid:{xl:7,lg:7,md:12,sm:24,xs:24},modals:!1,modal12:!1,ruleValidate:{name:[{required:!0,message:"请输入数据组名称",trigger:"blur"}],config_name:[{required:!0,message:"请输入数据字段",trigger:"blur"}],info:[{required:!0,message:"请输入数据简介",trigger:"blur"}],names:[{required:!0,message:"请输入字段名称",trigger:"blur"}]},FromData:[],valids:!1,list2:[],formValidate:{name:"",config_name:"",info:"",typelist:[],cate_id:0}}},watch:{addId:function(t){"addId"===t&&(this.formValidate.typelist=[])}},methods:{addType:function(){this.formValidate.typelist.push({name:{value:""},title:{value:""},type:{value:""},param:{placeholder:"参数方式例如:\n1=>白色\n2=>红色\n3=>黑色",value:""}})},delGroup:function(t){this.formValidate.typelist.splice(t,1)},fromData:function(t){var e=this;Object(o.F)(t).then(function(){var t=s(i().mark((function t(r){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.formValidate=r.data.info;case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},handleSubmit:function(t){var e=this,r={url:this.groupId?"/setting/group/".concat(this.groupId):"setting/group",method:this.groupId?"put":"post",datas:this.formValidate};this.$refs[t].validate((function(n){if(n){if(0===e.formValidate.typelist.length)return e.$Message.error("请添加字段名称:姓名!");Object(o.y)(r).then(function(){var r=s(i().mark((function r(n){return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:e.$Message.success(n.msg),e.modals=!1,e.$refs[t].resetFields(),e.formValidate.typelist=[],e.$emit("getList");case 5:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))}else{if(!e.formValidate.name)return e.$Message.error("请添加数据组名称!");if(!e.formValidate.config_name)return e.$Message.error("请添加数据字段!");if(!e.formValidate.info)return e.$Message.error("请添加数据简介!")}}))},handleReset:function(){this.modals=!1,this.$refs.formValidate.resetFields(),this.$emit("clearFrom")}},created:function(){},mounted:function(){}},c=(r("9659"),r("2877")),f=Object(c.a)(u,(function(){var t=this,e=t._self._c;return e("div",[e("Modal",{attrs:{width:"850","class-name":"vertical-center-modal",scrollable:"","footer-hide":"",closable:"",title:t.titleFrom,"mask-closable":!1,"z-index":1},on:{"on-cancel":t.handleReset},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[e("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":100,rules:t.ruleValidate},nativeOn:{submit:function(t){t.preventDefault()}}},[e("Row",{staticClass:"maxH",attrs:{type:"flex",gutter:24}},[e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"数据组名称:",prop:"name"}},[e("Input",{staticClass:"input-add",attrs:{placeholder:"请输入数据组名称"},model:{value:t.formValidate.name,callback:function(e){t.$set(t.formValidate,"name",e)},expression:"formValidate.name"}})],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"数据字段:",prop:"config_name"}},[e("Input",{staticClass:"input-add",attrs:{placeholder:"请输入数据字段"},model:{value:t.formValidate.config_name,callback:function(e){t.$set(t.formValidate,"config_name",e)},expression:"formValidate.config_name"}})],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"数据简介:",prop:"info"}},[e("Input",{staticClass:"input-add",attrs:{placeholder:"请输入数据简介"},model:{value:t.formValidate.info,callback:function(e){t.$set(t.formValidate,"info",e)},expression:"formValidate.info"}})],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"数类型:",prop:"cate_id"}},[e("RadioGroup",{model:{value:t.formValidate.cate_id,callback:function(e){t.$set(t.formValidate,"cate_id",e)},expression:"formValidate.cate_id"}},[e("Radio",{attrs:{label:0}},[t._v("默认")]),e("Radio",{attrs:{label:1}},[t._v("数据")])],1)],1)],1),t._l(t.formValidate.typelist,(function(r,n){return e("Col",{key:n,attrs:{span:"24"}},[e("Col",t._b({},"Col",t.grid,!1),[e("FormItem",{attrs:{label:"字段"+(n+1)+":",prop:"typelist."+n+".name.value",rules:{required:!0,message:"请输入字段名称:姓名",trigger:"blur"}}},[e("Input",{attrs:{placeholder:"字段名称:姓名"},model:{value:r.name.value,callback:function(e){t.$set(r.name,"value",e)},expression:"item.name.value"}})],1)],1),e("Col",t._b({staticClass:"goupBox"},"Col",t.grid,!1),[e("FormItem",{attrs:{prop:"typelist."+n+".title.value",rules:{required:!0,message:"请输入字段配置名",trigger:"blur"}}},[e("Input",{attrs:{placeholder:"字段配置名:name"},model:{value:r.title.value,callback:function(e){t.$set(r.title,"value",e)},expression:"item.title.value"}})],1)],1),e("Col",t._b({staticClass:"goupBox mr15",attrs:{prop:"type"}},"Col",t.grid,!1),[e("FormItem",{attrs:{prop:"typelist."+n+".type.value",rules:{required:!0,message:"请选择字段类型",trigger:"change"}}},[e("i-select",{attrs:{placeholder:"字段类型"},model:{value:r.type.value,callback:function(e){t.$set(r.type,"value",e)},expression:"item.type.value"}},[e("i-option",{attrs:{value:"input"}},[t._v("文本框")]),e("i-option",{attrs:{value:"textarea"}},[t._v("多行文本框")]),e("i-option",{attrs:{value:"radio"}},[t._v("单选框")]),e("i-option",{attrs:{value:"checkbox"}},[t._v("多选框")]),e("i-option",{attrs:{value:"select"}},[t._v("下拉选择")]),e("i-option",{attrs:{value:"upload"}},[t._v("单图")]),e("i-option",{attrs:{value:"uploads"}},[t._v("多图")])],1)],1)],1),e("Col",{attrs:{span:"1"}},[e("Icon",{staticClass:"cur",attrs:{type:"ios-close-circle-outline"},on:{click:function(e){return t.delGroup(n)}}})],1),"radio"===r.type.value||"checkbox"===r.type.value||"select"===r.type.value?e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{prop:"typelist."+n+".param.value",rules:{required:!0,message:"请输入参数方式",trigger:"blur"}}},[e("Input",{staticClass:"input-add",attrs:{type:"textarea",rows:4,placeholder:r.param.placeholder},model:{value:r.param.value,callback:function(e){t.$set(r.param,"value",e)},expression:"item.param.value"}})],1)],1):t._e()],1)})),e("Col",[e("FormItem",[e("Button",{attrs:{type:"primary"},on:{click:t.addType}},[t._v("添加字段")])],1)],1)],2),e("div",[e("Button",{attrs:{type:"primary",long:"",disabled:t.valids},on:{click:function(e){return t.handleSubmit("formValidate")}}},[t._v("提交")])],1)],1)],1)],1)}),[],!1,null,"58a24c68",null).exports,p=r("d708");function h(t){return(h="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 d(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */d=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var a=e&&e.prototype instanceof b?e:b,i=Object.create(a.prototype),l=new S(n||[]);return o(i,"_invoke",{value:V(t,r,l)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var p="suspendedStart",m="suspendedYield",v="executing",y="completed",g={};function b(){}function w(){}function x(){}var _={};u(_,i,(function(){return this}));var L=Object.getPrototypeOf,E=L&&L(L(C([])));E&&E!==r&&n.call(E,i)&&(_=E);var O=x.prototype=b.prototype=Object.create(_);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,l){var s=f(t[o],t,a);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==h(c)&&n.call(c,"__await")?e.resolve(c.__await).then((function(t){r("next",t,i,l)}),(function(t){r("throw",t,i,l)})):e.resolve(c).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,l)}))}l(s.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function V(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var l=n.delegate;if(l){var s=I(l,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?y:m,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function I(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,I(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function F(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(F,this),this.reset(!0)}function C(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(h(e)+" is not iterable")}return w.prototype=x,o(O,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=u(x,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},k(j.prototype),u(j.prototype,l,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(c(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(O),u(O,s,"Generator"),u(O,i,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=C,S.prototype={constructor:S,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(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function o(n,o){return l.type="throw",l.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},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),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function m(t,e,r,n,o,a,i){try{var l=t[a](i),s=l.value}catch(t){return void r(t)}l.done?e(s):Promise.resolve(s).then(n,o)}function v(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?v(Object(r),!0).forEach((function(e){g(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function g(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=h(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==h(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var b={name:"group",components:{groupFrom:f},data:function(){return{roterPre:p.a.roterPre,grid:{xl:7,lg:7,md:12,sm:24,xs:24},formValidate:{page:1,limit:20,title:""},loading:!1,tabList:[],total:0,columns1:[{title:"ID",key:"id",width:80},{title:"KEY",key:"config_name",minWidth:130},{title:"数据组名称",key:"name",minWidth:130},{title:"简介",key:"info",minWidth:130},{title:"操作",slot:"action",fixed:"right",width:180}],FromData:null,titleFrom:"",groupId:0,addId:""}},computed:y(y({},Object(n.e)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:75},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){this.getList()},methods:{goList:function(t){this.$router.push({path:this.roterPre+"/system/config/system_group/list/"+t.id})},getList:function(){var t=this;this.loading=!0,Object(o.G)(this.formValidate).then(function(){var e,r=(e=d().mark((function e(r){var n;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.tabList=n.list,t.total=n.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(t){m(a,n,o,i,l,"next",t)}function l(t){m(a,n,o,i,l,"throw",t)}i(void 0)}))});return function(t){return r.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()},groupAdd:function(t){this.$refs.groupfroms.modals=!0,this.titleFrom=t,this.addId="addId"},del:function(t,e,r){var n=this,o={title:e,num:r,url:"setting/group/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(o).then((function(t){n.$Message.success(t.msg),n.tabList.splice(r,1),n.tabList.length||(n.formValidate.page=1==n.formValidate.page?1:n.formValidate.page-1),n.getList()})).catch((function(t){n.$Message.error(t.msg)}))},edit:function(t,e){this.titleFrom=e,this.groupId=t.id,this.$refs.groupfroms.fromData(t.id),this.$refs.groupfroms.modals=!0,this.addId=""}}},w=Object(c.a)(b,(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":"status2"}},[e("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入ID,KEY,数据组名称,简介"},model:{value:t.formValidate.title,callback:function(e){t.$set(t.formValidate,"title",e)},expression:"formValidate.title"}}),e("Button",{attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("查询")])],1)],1)],1)]),e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("Button",{staticClass:"mr20",attrs:{type:"primary"},on:{click:function(e){return t.groupAdd("添加数据组")}}},[t._v("添加数据组")]),e("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns1,data:t.tabList,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"statuss",fn:function(r){var n=r.row;return r.index,[e("i-switch",{attrs:{value:n.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(n)}},model:{value:n.status,callback:function(e){t.$set(n,"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(r){var n=r.row,o=r.index;return[e("a",{on:{click:function(e){return t.goList(n)}}},[t._v("数据列表")]),e("Divider",{attrs:{type:"vertical"}}),e("a",{on:{click:function(e){return t.edit(n,"编辑")}}},[t._v("编辑")]),e("Divider",{attrs:{type:"vertical"}}),e("a",{on:{click:function(e){return t.del(n,"删除数据组",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("group-from",{ref:"groupfroms",attrs:{titleFrom:t.titleFrom,groupId:t.groupId,addId:t.addId},on:{getList:t.getList}})],1)}),[],!1,null,"f3779702",null);e.default=w.exports},9659:function(t,e,r){"use strict";r("b2a9")},b2a9:function(t,e,r){}}]); |