(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-4e3c371a"],{"0c6b":function(t,e,a){"use strict";a.r(e);var s=a("a34a"),n=a.n(s),r=a("8593"),o=a("9860"),i=a.n(o),c=a("31b4"),l=a("b6bd"),u=a("d708");function d(t,e,a,s,n,r,o){try{var i=t[r](o),c=i.value}catch(t){return void a(t)}i.done?e(c):Promise.resolve(c).then(s,n)}function m(t){return function(){var e=this,a=arguments;return new Promise((function(s,n){var r=t.apply(e,a);function o(t){d(r,s,n,o,i,"next",t)}function i(t){d(r,s,n,o,i,"throw",t)}o(void 0)}))}}var f={name:"list",components:{formCreate:i.a.$form(),editFrom:c.a},data:function(){return{roterPre:u.a.roterPre,modals2:!1,grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,formValidate:{tab_id:0,page:1,limit:20},total:0,columns1:[{title:"ID",key:"id",width:80},{title:"配置名称",key:"info",minWidth:130},{title:"字段变量",key:"menu_name",minWidth:140},{title:"字段类型",key:"type",minWidth:90},{title:"值",slot:"values",minWidth:230},{title:"是否显示",slot:"statuss",minWidth:90},{title:"操作",slot:"action",fixed:"right",minWidth:120}],FromData:null,FromRequestData:{},modalTitleSs:"",classList:[],num:0,typeFrom:{type:0,tab_id:this.$route.params.id},rules:[]}},watch:{$route:{handler:function(t,e){this.getList()},deep:!0}},mounted:function(){this.getList()},methods:{onhangeTab:function(t){this.typeFrom.type=t,this.classAdd()},classAdd:function(){var t=this;Object(r.k)(this.typeFrom).then(function(){var e=m(n.a.mark((function e(a){var s;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==a.data.status){e.next=2;break}return e.abrupt("return",t.$authLapse(a.data));case 2:s=a.data||{},t.FromRequestData={action:s.action,method:s.method},t.rules=s.rules,t.modals2=!0;case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)}))},edit:function(t){var e=this;Object(r.l)(t.id).then(function(){var t=m(n.a.mark((function t(a){var s;return n.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==a.data.status){t.next=2;break}return t.abrupt("return",e.$authLapse(a.data));case 2:s=a.data||{},e.FromRequestData={action:s.action,method:s.method},e.rules=s.rules,e.$refs.edits.modals=!0,e.modals2=!0;case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},onSubmit:function(t){var e=this;Object(l.a)({url:this.FromRequestData.action,method:this.FromRequestData.method,data:t}).then((function(t){e.$Message.success(t.msg),setTimeout((function(){e.modals2=!1}),1e3),setTimeout((function(){e.getList()}),1500)})).catch((function(t){e.$Message.error(t.msg)}))},submitFail:function(){this.getList()},configureAdd:function(){this.classAdd()},getList:function(){var t=this;this.loading=!0,this.formValidate.tab_id=this.$route.params.id,Object(r.m)(this.formValidate).then(function(){var e=m(n.a.mark((function e(a){var s;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=a.data,t.classList=s.list,t.total=s.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()},del:function(t,e,a){var s=this,n={title:e,num:a,url:"/setting/config/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(n).then((function(t){s.$Message.success(t.msg),s.classList.splice(a,1)})).catch((function(t){s.$Message.error(t.msg)}))},onchangeIsShow:function(t){var e=this;Object(r.j)(t.id,t.status).then(function(){var t=m(n.a.mark((function t(a){return n.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(a.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)}))}}},p=(a("c893"),a("2877")),h=Object(p.a)(f,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"i-layout-page-header"},[a("PageHeader",{staticClass:"product_tabs",attrs:{"hidden-breadcrumb":""}},[a("div",{staticClass:"acea-row row-middle",attrs:{slot:"title"},slot:"title"},[a("router-link",{attrs:{to:{path:t.roterPre+"/system/config/system_config_tab/index"}}},[a("div",{staticClass:"font-sm after-line"},[a("span",{staticClass:"iconfont iconfanhui"}),a("span",{staticClass:"pl10"},[t._v("返回")])])]),a("span",{staticClass:"mr20 ml16"},[t._v("配置列表")])],1)])],1),a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[a("Row",{attrs:{type:"flex"}},[a("Col",t._b({},"Col",t.grid,!1),[a("Button",{attrs:{type:"primary"},on:{click:t.configureAdd}},[t._v("添加配置")])],1)],1),a("Divider",{attrs:{dashed:""}}),a("Table",{ref:"table",attrs:{columns:t.columns1,data:t.classList,loading:t.loading,"no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"values",fn:function(e){var s=e.row;return e.index,["text"===s.type||"textarea"===s.type||"radio"===s.type||"checkbox"===s.type?a("span",[t._v(t._s(s.value))]):t._e(),"upload"===s.type&&3===s.upload_type?a("div",{staticClass:"valBox acea-row"},[s.value instanceof Array?a("div",t._l(s.value,(function(e,s){return a("div",{key:s,staticClass:"valPicbox acea-row row-column-around"},[a("div",{staticClass:"valPicbox_pic"},[a("Icon",{attrs:{type:"md-document"}})],1),a("span",{staticClass:"valPicbox_sp"},[t._v(t._s(e.filename))])])})),0):t._e()]):t._e(),"upload"===s.type&&3!==s.upload_type?a("div",{staticClass:"valBox acea-row"},[s.value instanceof Array?a("div",t._l(s.value,(function(e,s){return a("div",{key:s,staticClass:"valPicbox acea-row row-column-around"},[a("div",{staticClass:"valPicbox_pic"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.filepath,expression:"item.filepath"}]})]),a("span",{staticClass:"valPicbox_sp"},[t._v(t._s(e.filename))])])})),0):t._e()]):t._e()]}},{key:"statuss",fn:function(e){var s=e.row;return e.index,[a("i-switch",{attrs:{value:s.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(s)}},model:{value:s.status,callback:function(e){t.$set(s,"status",e)},expression:"row.status"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}},{key:"action",fn:function(e){var s=e.row,n=e.index;return[a("a",{on:{click:function(e){return t.edit(s)}}},[t._v("编辑")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.del(s,"删除分类",n)}}},[t._v("删除")])]}}])})],1),a("Modal",{attrs:{scrollable:"","footer-hide":"",closable:"",title:"添加配置字段","mask-closable":!1,"z-index":1,width:"700"},model:{value:t.modals2,callback:function(e){t.modals2=e},expression:"modals2"}},[a("div",{staticClass:"new_tab"},[a("Tabs",{on:{"on-click":t.onhangeTab},model:{value:t.typeFrom.type,callback:function(e){t.$set(t.typeFrom,"type",e)},expression:"typeFrom.type"}},[a("TabPane",{attrs:{label:"文本框 ",name:"0"}}),a("TabPane",{attrs:{label:"多行文本框",name:"1"}}),a("TabPane",{attrs:{label:"单选框",name:"2"}}),a("TabPane",{attrs:{label:"文件上传",name:"3"}}),a("TabPane",{attrs:{label:"多选框",name:"4"}}),a("TabPane",{attrs:{label:"下拉框",name:"5"}})],1)],1),0!=t.rules.length?a("form-create",{ref:"fc",staticClass:"formBox",attrs:{rule:t.rules,handleIcon:"false"},on:{"on-submit":t.onSubmit}}):t._e()],1),a("edit-from",{ref:"edits",attrs:{FromData:t.FromData},on:{submitFail:t.submitFail}})],1)}),[],!1,null,"fcf40d8c",null);e.default=h.exports},"191d":function(t,e,a){},"31b4":function(t,e,a){"use strict";var s=a("9860"),n=a.n(s),r=a("b6bd"),o=a("2f62");function i(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function c(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var l={name:"edit",components:{formCreate:n.a.$form()},computed:function(t){for(var e=1;e