mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-27 14:10:35 +00:00
1 line
17 KiB
JavaScript
1 line
17 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4b8ede9f"],{"33b8":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"i-layout-page-header"},[r("div",{staticClass:"i-layout-page-header"},[r("span",{staticClass:"ivu-page-header-title"},[t._v(t._s(t.$route.meta.title))])])]),r("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[r("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[r("Row",{attrs:{type:"flex",gutter:24}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"数据搜索:","label-for":"status2"}},[r("Input",{attrs:{search:"","enter-button":"",placeholder:"请输入ID,KEY,数据组名称,简介"},on:{"on-search":t.userSearchs},model:{value:t.formValidate.title,callback:function(e){t.$set(t.formValidate,"title",e)},expression:"formValidate.title"}})],1)],1)],1),r("Row",{attrs:{type:"flex"}},[r("Col",t._b({},"Col",t.grid,!1),[r("Button",{staticClass:"mr20",attrs:{type:"primary",icon:"md-add"},on:{click:function(e){return t.groupAdd("添加数据组")}}},[t._v("添加数据组")])],1)],1)],1),r("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(e){var n=e.row;e.index;return[r("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"}},[r("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),r("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}},{key:"action",fn:function(e){var n=e.row,a=e.index;return[r("a",{on:{click:function(e){return t.goList(n)}}},[t._v("数据列表")]),r("Divider",{attrs:{type:"vertical"}}),r("a",{on:{click:function(e){return t.edit(n,"编辑")}}},[t._v("编辑")]),r("Divider",{attrs:{type:"vertical"}}),r("a",{on:{click:function(e){return t.del(n,"删除数据组",a)}}},[t._v("删除")])]}}])}),r("div",{staticClass:"acea-row row-right page"},[r("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),r("group-from",{ref:"groupfroms",attrs:{titleFrom:t.titleFrom,groupId:t.groupId,addId:t.addId},on:{getList:t.getList}})],1)},a=[],o=(r("8e6e"),r("ac6a"),r("456d"),r("96cf"),r("3b8d")),i=r("bd86"),u=r("2f62"),s=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("Modal",{attrs:{width:"850",scrollable:"","footer-hide":"",closable:"",title:t.titleFrom,"mask-closable":!1},on:{"on-cancel":t.handleReset},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[r("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":100,rules:t.ruleValidate},nativeOn:{submit:function(t){t.preventDefault()}}},[r("Row",{attrs:{type:"flex",gutter:24}},[r("Col",{attrs:{span:"24"}},[r("FormItem",{attrs:{label:"数据组名称:",prop:"name"}},[r("Input",{staticStyle:{width:"90%"},attrs:{placeholder:"请输入数据组名称"},model:{value:t.formValidate.name,callback:function(e){t.$set(t.formValidate,"name",e)},expression:"formValidate.name"}})],1)],1),r("Col",{attrs:{span:"24"}},[r("FormItem",{attrs:{label:"数据字段:",prop:"config_name"}},[r("Input",{staticStyle:{width:"90%"},attrs:{placeholder:"请输入数据字段"},model:{value:t.formValidate.config_name,callback:function(e){t.$set(t.formValidate,"config_name",e)},expression:"formValidate.config_name"}})],1)],1),r("Col",{attrs:{span:"24"}},[r("FormItem",{attrs:{label:"数据简介:",prop:"info"}},[r("Input",{staticStyle:{width:"90%"},attrs:{placeholder:"请输入数据简介"},model:{value:t.formValidate.info,callback:function(e){t.$set(t.formValidate,"info",e)},expression:"formValidate.info"}})],1)],1),r("Col",{attrs:{span:"24"}},[r("FormItem",{attrs:{label:"数类型:",prop:"cate_id"}},[r("RadioGroup",{model:{value:t.formValidate.cate_id,callback:function(e){t.$set(t.formValidate,"cate_id",e)},expression:"formValidate.cate_id"}},[r("Radio",{attrs:{label:0}},[t._v("默认")]),r("Radio",{attrs:{label:1}},[t._v("数据")])],1)],1)],1),t._l(t.formValidate.typelist,(function(e,n){return r("Col",{key:n,attrs:{span:"24"}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"字段"+(n+1)+":",prop:"typelist."+n+".name.value",rules:{required:!0,message:"请输入字段名称:姓名",trigger:"blur"}}},[r("Input",{attrs:{placeholder:"字段名称:姓名"},model:{value:e.name.value,callback:function(r){t.$set(e.name,"value",r)},expression:"item.name.value"}})],1)],1),r("Col",t._b({staticClass:"goupBox"},"Col",t.grid,!1),[r("FormItem",{attrs:{prop:"typelist."+n+".title.value",rules:{required:!0,message:"请输入字段配置名",trigger:"blur"}}},[r("Input",{attrs:{placeholder:"字段配置名:name"},model:{value:e.title.value,callback:function(r){t.$set(e.title,"value",r)},expression:"item.title.value"}})],1)],1),r("Col",t._b({staticClass:"goupBox mr15",attrs:{prop:"type"}},"Col",t.grid,!1),[r("FormItem",{attrs:{prop:"typelist."+n+".type.value",rules:{required:!0,message:"请选择字段类型",trigger:"change"}}},[r("i-select",{attrs:{placeholder:"字段类型"},model:{value:e.type.value,callback:function(r){t.$set(e.type,"value",r)},expression:"item.type.value"}},[r("i-option",{attrs:{value:"input"}},[t._v("文本框")]),r("i-option",{attrs:{value:"textarea"}},[t._v("多行文本框")]),r("i-option",{attrs:{value:"radio"}},[t._v("单选框")]),r("i-option",{attrs:{value:"checkbox"}},[t._v("多选框")]),r("i-option",{attrs:{value:"select"}},[t._v("下拉选择")]),r("i-option",{attrs:{value:"upload"}},[t._v("单图")]),r("i-option",{attrs:{value:"uploads"}},[t._v("多图")])],1)],1)],1),r("Col",{attrs:{span:"1"}},[r("Icon",{staticClass:"cur",attrs:{type:"ios-close-circle-outline"},on:{click:function(e){return t.delGroup(n)}}})],1),"radio"===e.type.value||"checkbox"===e.type.value||"select"===e.type.value?r("Col",{attrs:{span:"24"}},[r("FormItem",{attrs:{prop:"typelist."+n+".param.value",rules:{required:!0,message:"请输入参数方式",trigger:"blur"}}},[r("Input",{staticStyle:{width:"90%"},attrs:{type:"textarea",rows:4,placeholder:e.param.placeholder},model:{value:e.param.value,callback:function(r){t.$set(e.param,"value",r)},expression:"item.param.value"}})],1)],1):t._e()],1)})),r("Col",[r("FormItem",[r("Button",{attrs:{type:"primary"},on:{click:t.addType}},[t._v("添加字段")])],1)],1),r("Col",{attrs:{span:"24"}},[r("Button",{attrs:{type:"primary",long:"",disabled:t.valids},on:{click:function(e){return t.handleSubmit("formValidate")}}},[t._v("提交")])],1)],2)],1)],1)],1)},l=[],c=(r("7f7f"),r("c5f6"),r("8593")),d={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(c["C"])(t).then(function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(r){return regeneratorRuntime.wrap((function(t){while(1)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(c["v"])(r).then(function(){var r=Object(o["a"])(regeneratorRuntime.mark((function r(n){return regeneratorRuntime.wrap((function(r){while(1)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(){}},f=d,m=(r("f9f6"),r("2877")),p=Object(m["a"])(f,s,l,!1,null,"4bb80e78",null),g=p.exports;function h(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 b(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(Object(r),!0).forEach((function(e){Object(i["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var v={name:"group",components:{groupFrom:g},data:function(){return{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",minWidth:150}],FromData:null,titleFrom:"",groupId:0,addId:""}},computed:b(b({},Object(u["e"])("media",["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:"/admin/system/config/system_group/list/"+t.id})},getList:function(){var t=this;this.loading=!0,Object(c["D"])(this.formValidate).then(function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(r){var n;return regeneratorRuntime.wrap((function(e){while(1)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)})));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()},groupAdd:function(t){this.$refs.groupfroms.modals=!0,this.titleFrom=t,this.addId="addId",this.groupId=0},del:function(t,e,r){var n=this,a={title:e,num:r,url:"setting/group/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(a).then((function(t){n.$Message.success(t.msg),n.tabList.splice(r,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=""}}},y=v,O=Object(m["a"])(y,n,a,!1,null,"677a74b7",null);e["default"]=O.exports},"555b":function(t,e,r){},8593:function(t,e,r){"use strict";r.d(e,"j",(function(){return a})),r.d(e,"h",(function(){return o})),r.d(e,"i",(function(){return i})),r.d(e,"P",(function(){return u})),r.d(e,"n",(function(){return s})),r.d(e,"l",(function(){return l})),r.d(e,"m",(function(){return c})),r.d(e,"k",(function(){return d})),r.d(e,"D",(function(){return f})),r.d(e,"v",(function(){return m})),r.d(e,"C",(function(){return p})),r.d(e,"A",(function(){return g})),r.d(e,"x",(function(){return h})),r.d(e,"y",(function(){return b})),r.d(e,"z",(function(){return v})),r.d(e,"B",(function(){return y})),r.d(e,"M",(function(){return O})),r.d(e,"Q",(function(){return _})),r.d(e,"o",(function(){return j})),r.d(e,"d",(function(){return k})),r.d(e,"f",(function(){return w})),r.d(e,"c",(function(){return V})),r.d(e,"e",(function(){return I})),r.d(e,"g",(function(){return x})),r.d(e,"r",(function(){return C})),r.d(e,"p",(function(){return $})),r.d(e,"q",(function(){return F})),r.d(e,"G",(function(){return S})),r.d(e,"H",(function(){return P})),r.d(e,"L",(function(){return T})),r.d(e,"K",(function(){return E})),r.d(e,"a",(function(){return D})),r.d(e,"b",(function(){return L})),r.d(e,"t",(function(){return M})),r.d(e,"O",(function(){return R})),r.d(e,"w",(function(){return G})),r.d(e,"S",(function(){return q})),r.d(e,"R",(function(){return B})),r.d(e,"E",(function(){return W})),r.d(e,"F",(function(){return z})),r.d(e,"u",(function(){return A})),r.d(e,"I",(function(){return J})),r.d(e,"J",(function(){return K})),r.d(e,"s",(function(){return U})),r.d(e,"N",(function(){return N}));var n=r("6b6c");function a(t){return Object(n["a"])({url:"setting/config_class",method:"get",params:t})}function o(t){return Object(n["a"])({url:"setting/config_class/create",method:"get"})}function i(t){return Object(n["a"])({url:"setting/config_class/".concat(t,"/edit"),method:"get"})}function u(t){return Object(n["a"])({url:"setting/config_class/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function s(t){return Object(n["a"])({url:"setting/config",method:"get",params:t})}function l(t){return Object(n["a"])({url:"setting/config/create",method:"get",params:t})}function c(t){return Object(n["a"])({url:"/setting/config/".concat(t,"/edit"),method:"get"})}function d(t,e){return Object(n["a"])({url:"setting/config/set_status/".concat(t,"/").concat(e),method:"PUT"})}function f(t){return Object(n["a"])({url:"setting/group",method:"get",params:t})}function m(t){return Object(n["a"])({url:t.url,method:t.method,data:t.datas})}function p(t){return Object(n["a"])({url:"setting/group/".concat(t),method:"get"})}function g(t,e){return Object(n["a"])({url:e,method:"get",params:t})}function h(t,e){return Object(n["a"])({url:e,method:"get",params:t})}function b(t,e){return Object(n["a"])({url:e,method:"get",params:t})}function v(t,e){return Object(n["a"])({url:e,method:"get",params:t})}function y(t){return Object(n["a"])({url:t,method:"PUT"})}function O(t){return Object(n["a"])({url:"system/log/search_admin",method:"GET"})}function _(t){return Object(n["a"])({url:"system/log",method:"GET",params:t})}function j(){return Object(n["a"])({url:"system/file",method:"GET"})}function k(){return Object(n["a"])({url:"system/backup",method:"GET"})}function w(t){return Object(n["a"])({url:"system/backup/read",method:"GET",params:t})}function V(t){return Object(n["a"])({url:"system/backup/backup",method:"put",data:t})}function I(t){return Object(n["a"])({url:"system/backup/optimize",method:"put",data:t})}function x(t){return Object(n["a"])({url:"system/backup/repair",method:"put",data:t})}function C(t){return Object(n["a"])({url:"system/backup/file_list",method:"GET"})}function $(t){return Object(n["a"])({url:"backup/download",method:"get",params:t})}function F(t){return Object(n["a"])({url:"system/backup/import",method:"POST",data:t})}function S(t){return Object(n["a"])({url:"system/file/opendir",method:"GET",params:t})}function P(t){return Object(n["a"])({url:"system/file/openfile?filepath=".concat(t),method:"GET"})}function T(t){return Object(n["a"])({url:"system/file/savefile",method:"post",data:t})}function E(t){return Object(n["a"])({url:"system/replace_site_url",method:"post",data:t})}function D(){return Object(n["a"])({url:"auth",method:"get"})}function L(t){return Object(n["a"])({url:"auth_apply",method:"post",data:t})}function M(){return Object(n["a"])({url:"setting/get_kf_adv",method:"get"})}function R(t){return Object(n["a"])({url:"setting/set_kf_adv",method:"post",data:t})}function G(){return Object(n["a"])({url:"setting/group_all",method:"get"})}function q(t){return Object(n["a"])({url:"system/version_list",method:"get",params:t})}function B(t){return Object(n["a"])({url:"system/version_crate/".concat(t),method:"get"})}function W(t){return Object(n["a"])({url:"setting/group_data/save_all",method:"POST",data:t})}function z(t){return Object(n["a"])({url:"diy/open_adv/add",method:"POST",data:t})}function A(){return Object(n["a"])({url:"diy/open_adv/info",method:"get"})}function J(t){return Object(n["a"])({url:"setting/config/get_system/".concat(t),method:"get"})}function K(t){return Object(n["a"])({url:"setting/config/save_basics",method:"POST",data:t})}function U(){return Object(n["a"])({url:"setting/get_user_agreement",method:"get"})}function N(t){return Object(n["a"])({url:"setting/set_user_agreement",method:"post",data:t})}},f9f6:function(t,e,r){"use strict";var n=r("555b"),a=r.n(n);a.a}}]); |