CRMEB/crmeb/public/admin/system_static/js/chunk-763feb04.e8a188f7.js
2023-06-12 14:41:51 +08:00

1 line
39 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-763feb04"],{"179b":function(t,e,n){"use strict";var a=n("74b4");n.n(a).a},"46c4":function(t,e,n){"use strict";n.d(e,"e",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return u})),n.d(e,"h",(function(){return s})),n.d(e,"f",(function(){return l})),n.d(e,"d",(function(){return c})),n.d(e,"g",(function(){return d})),n.d(e,"i",(function(){return f}));var a=n("6b6c");function r(t){return Object(a.a)({url:"/setting/menus",method:"get",params:t})}function i(t){return Object(a.a)({url:"/setting/menus/unique",method:"get",params:t})}function o(){return Object(a.a)({url:"/setting/menus/create",method:"get"})}function u(t){return Object(a.a)({url:t.url,method:t.method,data:t.datas})}function s(t){return Object(a.a)({url:"/setting/menus/".concat(t),method:"get"})}function l(t){return Object(a.a)({url:"/setting/menus/show/".concat(t.id),method:"put",data:t})}function c(t){return Object(a.a)({url:"/setting/ruleList?cate_id=".concat(t),method:"get"})}function d(t){return Object(a.a)({url:"setting/menus/batch",method:"post",data:t})}function f(t){return Object(a.a)({url:"setting/rule_cate",method:"get"})}},"4bb7":function(t,e,n){"use strict";var a=n("a772");n.n(a).a},5003:function(t,e,n){},"74b4":function(t,e,n){},"7b98":function(t,e,n){"use strict";var a=n("ec36");n.n(a).a},"90e7":function(t,e,n){"use strict";n.d(e,"v",(function(){return i})),n.d(e,"k",(function(){return o})),n.d(e,"Kb",(function(){return u})),n.d(e,"Jb",(function(){return s})),n.d(e,"j",(function(){return l})),n.d(e,"gb",(function(){return c})),n.d(e,"Ob",(function(){return d})),n.d(e,"c",(function(){return f})),n.d(e,"d",(function(){return m})),n.d(e,"Z",(function(){return b})),n.d(e,"fb",(function(){return p})),n.d(e,"lb",(function(){return h})),n.d(e,"D",(function(){return g})),n.d(e,"Xb",(function(){return v})),n.d(e,"rb",(function(){return _})),n.d(e,"qb",(function(){return O})),n.d(e,"A",(function(){return y})),n.d(e,"B",(function(){return j})),n.d(e,"m",(function(){return F})),n.d(e,"hb",(function(){return w})),n.d(e,"n",(function(){return x})),n.d(e,"kb",(function(){return C})),n.d(e,"jb",(function(){return k})),n.d(e,"ib",(function(){return I})),n.d(e,"mb",(function(){return T})),n.d(e,"ob",(function(){return $})),n.d(e,"W",(function(){return N})),n.d(e,"pb",(function(){return q})),n.d(e,"Bb",(function(){return L})),n.d(e,"I",(function(){return M})),n.d(e,"Ab",(function(){return S})),n.d(e,"r",(function(){return D})),n.d(e,"p",(function(){return R})),n.d(e,"q",(function(){return W})),n.d(e,"s",(function(){return E})),n.d(e,"t",(function(){return P})),n.d(e,"sb",(function(){return K})),n.d(e,"Wb",(function(){return A})),n.d(e,"tb",(function(){return G})),n.d(e,"Rb",(function(){return U})),n.d(e,"ub",(function(){return B})),n.d(e,"cb",(function(){return z})),n.d(e,"Tb",(function(){return J})),n.d(e,"db",(function(){return V})),n.d(e,"ab",(function(){return H})),n.d(e,"bb",(function(){return Q})),n.d(e,"T",(function(){return X})),n.d(e,"C",(function(){return Y})),n.d(e,"G",(function(){return Z})),n.d(e,"F",(function(){return tt})),n.d(e,"x",(function(){return et})),n.d(e,"H",(function(){return nt})),n.d(e,"Vb",(function(){return at})),n.d(e,"u",(function(){return rt})),n.d(e,"Sb",(function(){return it})),n.d(e,"Ub",(function(){return ot})),n.d(e,"z",(function(){return ut})),n.d(e,"E",(function(){return st})),n.d(e,"y",(function(){return lt})),n.d(e,"w",(function(){return ct})),n.d(e,"S",(function(){return dt})),n.d(e,"h",(function(){return ft})),n.d(e,"e",(function(){return mt})),n.d(e,"f",(function(){return bt})),n.d(e,"Lb",(function(){return pt})),n.d(e,"Mb",(function(){return ht})),n.d(e,"Nb",(function(){return gt})),n.d(e,"nb",(function(){return vt})),n.d(e,"Cb",(function(){return _t})),n.d(e,"U",(function(){return Ot})),n.d(e,"Eb",(function(){return yt})),n.d(e,"Db",(function(){return jt})),n.d(e,"Fb",(function(){return Ft})),n.d(e,"Gb",(function(){return wt})),n.d(e,"Hb",(function(){return xt})),n.d(e,"Ib",(function(){return Ct})),n.d(e,"Pb",(function(){return kt})),n.d(e,"Qb",(function(){return It})),n.d(e,"V",(function(){return Tt})),n.d(e,"g",(function(){return $t})),n.d(e,"vb",(function(){return Nt})),n.d(e,"yb",(function(){return qt})),n.d(e,"a",(function(){return Lt})),n.d(e,"b",(function(){return Mt})),n.d(e,"wb",(function(){return St})),n.d(e,"zb",(function(){return Dt})),n.d(e,"xb",(function(){return Rt})),n.d(e,"l",(function(){return Wt})),n.d(e,"X",(function(){return Et})),n.d(e,"Y",(function(){return Pt})),n.d(e,"eb",(function(){return Kt})),n.d(e,"Q",(function(){return At})),n.d(e,"P",(function(){return Gt})),n.d(e,"K",(function(){return Ut})),n.d(e,"J",(function(){return Bt})),n.d(e,"L",(function(){return zt})),n.d(e,"O",(function(){return Jt})),n.d(e,"N",(function(){return Vt})),n.d(e,"R",(function(){return Ht})),n.d(e,"M",(function(){return Qt})),n.d(e,"i",(function(){return Xt})),n.d(e,"o",(function(){return Yt})),n("99af");var a=n("6b6c"),r=n("c276");function i(t){return Object(a.a)({url:"setting/config/header_basics",method:"get",params:t})}function o(t,e){return Object(a.a)({url:e,method:"get",params:t})}function u(t){return Object(a.a)({url:t.url,method:"get",params:t.data})}function s(){return Object(a.a)({url:"notify/sms/temp/create",method:"get"})}function l(t){return Object(a.a)({url:"serve/login",method:"post",data:t})}function c(t){return Object(a.a)({url:"serve/modify",method:"post",data:t})}function d(t){return Object(a.a)({url:"serve/update_phone",method:"post",data:t})}function f(t){return Object(a.a)({url:"serve/captcha",method:"post",data:t})}function m(t){return Object(a.a)({url:"serve/checkCode",method:"post",data:t})}function b(t){return Object(a.a)({url:"serve/register",method:"post",data:t})}function p(){return Object(a.a)({url:"serve/info",method:"get"})}function h(t){return Object(a.a)({url:"serve/sms/sign",method:"PUT",data:t})}function g(t){return Object(a.a)({url:"app/wechat/kefu/login/".concat(t),method:"get"})}function v(t){return Object(a.a)({url:"app/wechat/speechcraft",method:"get",params:t})}function _(t){return Object(a.a)({url:"app/wechat/speechcraft/".concat(t,"/edit"),method:"get"})}function O(){return Object(a.a)({url:"app/wechat/speechcraft/create",method:"get"})}function y(t){return Object(a.a)({url:"app/feedback",method:"get",params:t})}function j(t){return Object(a.a)({url:"app/feedback/".concat(t,"/edit"),method:"get"})}function F(){return Object(a.a)({url:"serve/export_all",method:"get"})}function w(){return Object(a.a)({url:"serve/open",method:"get"})}function x(t){return Object(a.a)({url:"serve/export_temp",method:"get",params:t})}function C(t){return Object(a.a)({url:"serve/record",method:"get",params:t})}function k(t){return Object(a.a)({url:"serve/open",method:"get",params:t})}function I(t){return Object(a.a)({url:"serve/opn_express",method:"post",data:t})}function T(t){return Object(a.a)({url:"serve/sms/open",method:"get",params:t})}function $(t){return Object(a.a)({url:"serve/meal_list",method:"get",params:t})}function N(t){return Object(a.a)({url:"serve/pay_meal",method:"post",data:t})}function q(t){return Object(a.a)({url:"notify/sms/record",method:"get",params:t})}function L(){return Object(a.a)({url:"merchant/store",method:"GET"})}function M(){return Object(a.a)({url:"merchant/store/address",method:"GET"})}function S(t){return Object(a.a)({url:"merchant/store/".concat(t.id),method:"POST",data:t})}function D(t){return Object(a.a)({url:"freight/express",method:"get",params:t})}function R(){return Object(a.a)({url:"/freight/express/create",method:"get"})}function W(t){return Object(a.a)({url:"freight/express/".concat(t,"/edit"),method:"get"})}function E(t){return Object(a.a)({url:"freight/express/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function P(){return Object(a.a)({url:"freight/express/sync_express",method:"get"})}function K(){return Object(a.a)({url:"app/wechat/speechcraftcate",method:"get"})}function A(){return Object(a.a)({url:"app/wechat_qrcode/cate/list",method:"get"})}function G(){return Object(a.a)({url:"app/wechat/speechcraftcate/create",method:"get"})}function U(t){return Object(a.a)({url:"app/wechat_qrcode/cate/create/".concat(t),method:"get"})}function B(t){return Object(a.a)({url:"app/wechat/speechcraftcate/".concat(t,"/edit"),method:"get"})}function z(t){return Object(a.a)({url:"setting/role",method:"GET",params:t})}function J(t){return Object(a.a)({url:"app/wechat_qrcode/list",method:"GET",params:t})}function V(t){return Object(a.a)({url:"setting/role/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function H(t){return Object(a.a)({url:"setting/role/".concat(t.id),method:"post",data:t})}function Q(t){return Object(a.a)({url:"setting/role/".concat(t,"/edit"),method:"get"})}function X(){return Object(a.a)({url:"setting/role/create",method:"get"})}function Y(t){return Object(a.a)({url:"app/wechat/kefu",method:"get",params:t})}function Z(t){return Object(a.a)({url:"app/wechat/kefu/create",method:"get",params:t})}function tt(){return Object(a.a)({url:"app/wechat/kefu/add",method:"get"})}function et(t){return Object(a.a)({url:"app/wechat/kefu",method:"post",data:t})}function nt(t){return Object(a.a)({url:"app/wechat/kefu/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function at(t){return Object(a.a)({url:"app/wechat_qrcode/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function rt(t){return Object(a.a)({url:"app/wechat_qrcode/user_list/".concat(t.id),method:"get",params:t})}function it(t){return Object(a.a)({url:"app/wechat_qrcode/info/".concat(t),method:"get"})}function ot(t,e){return Object(a.a)({url:"app/wechat_qrcode/save/".concat(t),method:"post",data:e})}function ut(t){return Object(a.a)({url:"app/wechat/kefu/".concat(t,"/edit"),method:"GET"})}function st(t,e){return Object(a.a)({url:"app/wechat/kefu/record/".concat(e),method:"GET",params:t})}function lt(t){return Object(a.a)({url:"app/wechat/kefu/chat_list",method:"GET",params:t})}function ct(){return Object(a.a)({url:"notify/sms/is_login",method:"GET"})}function dt(){return Object(a.a)({url:"notify/sms/logout",method:"GET"})}function ft(t){return Object(a.a)({url:"setting/city/list/".concat(t),method:"get"})}function mt(t){return Object(a.a)({url:"setting/city/add/".concat(t),method:"get"})}function bt(t){return Object(a.a)({url:"setting/city/".concat(t,"/edit"),method:"get"})}function pt(t){return Object(a.a)({url:"setting/shipping_templates/list",method:"get",params:t})}function ht(t){return Object(a.a)({url:"setting/shipping_templates/city_list",method:"get"})}function gt(t,e){return Object(a.a)({url:"setting/shipping_templates/save/".concat(t),method:"post",data:e})}function vt(t){return Object(a.a)({url:"setting/shipping_templates/".concat(t,"/edit"),method:"get"})}function _t(){return Object(a.a)({url:"merchant/store/get_header",method:"get"})}function Ot(t){return Object(a.a)({url:"merchant/store",method:"get",params:t})}function yt(t,e){return Object(a.a)({url:"merchant/store/set_show/".concat(t,"/").concat(e),method:"put"})}function jt(t){return Object(a.a)({url:"merchant/store/get_info/".concat(t),method:"get"})}function Ft(t){return Object(a.a)({url:"merchant/store_staff",method:"get",params:t})}function wt(){return Object(a.a)({url:"merchant/store_staff/create",method:"get"})}function xt(t){return Object(a.a)({url:"merchant/store_staff/".concat(t,"/edit"),method:"get"})}function Ct(t,e){return Object(a.a)({url:"merchant/store_staff/set_show/".concat(t,"/").concat(e),method:"put"})}function kt(t){return Object(a.a)({url:"merchant/verify_order",method:"get",params:t})}function It(t){return Object(a.a)({url:"merchant/verify/spread_info/".concat(t),method:"get"})}function Tt(){return Object(a.a)({url:"merchant/store_list",method:"get"})}function $t(){return Object(a.a)({url:"setting/city/clean_cache",method:"get"})}function Nt(){return Object(a.a)({url:"system/config/storage/config",method:"get"})}function qt(t){return Object(a.a)({url:"system/config/storage/config",method:"post",data:t})}function Lt(t){return Object(a.a)({url:"system/config/storage/form/".concat(t),method:"get"})}function Mt(t){return Object(a.a)({url:"system/config/storage/create/".concat(t),method:"get"})}function St(t){return Object(a.a)({url:"system/config/storage",method:"get",params:t})}function Dt(t){return Object(a.a)({url:"system/config/storage/synch/".concat(t),method:"put"})}function Rt(t){return Object(a.a)({url:"system/config/storage/status/".concat(t),method:"put"})}function Wt(t){return Object(a.a)({url:"system/config/storage/domain/".concat(t),method:"get"})}function Et(){return Object(a.a)({url:"setting/config_list/31",method:"get"})}function Pt(t){return Object(a.a)({url:"setting/config/save_basics",method:"post",data:t})}function Kt(t){return Object(a.a)({url:"system/config/storage/save_type/".concat(t),method:"get"})}function At(t){return Object(a.a)({url:"setting/lang_type/list",method:"get",params:t})}function Gt(t){return Object(a.a)({url:"setting/lang_type/form/".concat(t),method:"get"})}function Ut(t){return Object(a.a)({url:"setting/lang_code/list",method:"get",params:t})}function Bt(t){return Object(a.a)({url:"setting/lang_code/info",method:"get",params:t})}function zt(t){return Object(a.a)({url:"setting/lang_code/save",method:"post",data:t})}function Jt(t){return Object(a.a)({url:"setting/lang_country/list",method:"get",params:t})}function Vt(t){return Object(a.a)({url:"setting/lang_country/form/".concat(t),method:"get"})}function Ht(t,e){return Object(a.a)({url:"setting/lang_type/status/".concat(t,"/").concat(e),method:"put"})}function Qt(t){return Object(a.a)({url:"setting/lang_code/translate",method:"post",data:t})}function Xt(t){return Object(a.a)({url:"system/crud",method:"post",data:t})}function Yt(t){return Object(a.a)({url:"file/upload",method:"post",headers:{"Authori-zation":"Bearer "+Object(r.c)("token"),"content-type":"multipart/form-data;Bearer "+Object(r.c)("token")},data:t})}},a772:function(t,e,n){},a9e7:function(t,e,n){"use strict";n.d(e,"f",(function(){return r})),n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return o})),n.d(e,"e",(function(){return u})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return l})),n.d(e,"g",(function(){return c}));var a=n("6b6c");function r(){return Object(a.a)({url:"/system/crud/menus",method:"get"})}function i(){return Object(a.a)({url:"/system/crud/column_type",method:"get"})}function o(t){return Object(a.a)({url:"/system/crud/file_path",method:"post",data:t})}function u(t){return Object(a.a)({url:"/system/crud",method:"get",params:t})}function s(t){return Object(a.a)({url:"/system/crud/".concat(t),method:"get"})}function l(t){return Object(a.a)({url:"/system/crud/download/".concat(t),method:"get"})}function c(t,e){return Object(a.a)({url:"/system/crud/save_file/".concat(t),method:"post",data:e})}},b21d:function(t,e,n){"use strict";n.r(e);var a=n("f3f3"),r=(n("a9e3"),n("d81d"),n("d3b7"),n("159b"),n("b0c0"),n("90e7")),i=(n("caad"),n("a434"),n("a9e7")),o={name:"",props:{foundation:{type:Object,default:function(){return{}}}},data:function(){return{foundationRules:{tableName:[{required:!0,message:"请输入表名",trigger:"blur"}],modelName:[{required:!0,message:"请输入模块名",trigger:"blur"}]},menusList:[],columnTypeList:[],columns:[{title:"字段名称",slot:"field",minWidth:100},{title:"字段类型",slot:"field_type",minWidth:100},{title:"长度",slot:"limit",minWidth:100},{title:"默认值",slot:"default",minWidth:100},{title:"字段描述",slot:"comment",minWidth:100},{title:"列表",slot:"is_table",width:70,align:"center"},{title:"列表名",slot:"table_name",minWidth:120,align:"center"},{title:"表单类型",slot:"from_type",minWidth:100},{title:"必填",slot:"required",width:70,align:"center"},{title:"操作",slot:"action",width:70,align:"center"}],fromTypeList:[{value:"0",label:"不生成"},{value:"input",label:"input"},{value:"textarea",label:"textarea"},{value:"radio",label:"radio"},{value:"number",label:"number"},{value:"frameImageOne",label:"frameImageOne"},{value:"frameImages",label:"frameImages"}],loading:!1,tableField:[]}},created:function(){this.getCrudMenus()},mounted:function(){},methods:{disabledInput:function(t){var e=this.tableField[t];t=["addTimestamps","addSoftDelete"].includes(this.tableField[t].field_type);return e.primaryKey&&(t=!0),"delete_time"===e.field&&"timestamp"===e.field_type||t},initfield:function(){this.tableField=[]},changeItemField:function(t,e){"addSoftDelete"===t&&this.$set(this.tableField[e],"comment","伪删除"),"addTimestamps"===t&&this.$set(this.tableField[e],"comment","添加和修改时间")},getCrudMenus:function(){var t=this;Object(i.f)().then((function(e){t.menusList=e.data})),Object(i.a)().then((function(e){t.columnTypeList=e.data.types}))},del:function(t){this.tableField.splice(t,1)}}},u=(n("179b"),n("2877")),s=(o=Object(u.a)(o,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",{staticClass:"main"},[e("Alert",{attrs:{closable:""}},[t._v(" crud生成说明 不能生成系统自带的表;已经生成过的表还能继续生成 ")]),e("Form",{ref:"foundation",attrs:{model:t.foundation,rules:t.foundationRules,"label-width":100}},[e("FormItem",{attrs:{label:"菜单"}},[e("el-cascader",{staticClass:"form-width",attrs:{size:"small",options:t.menusList,props:{checkStrictly:!0,multiple:!1,emitPath:!1},clearable:""},model:{value:t.foundation.pid,callback:function(e){t.$set(t.foundation,"pid",e)},expression:"foundation.pid"}}),e("div",{staticClass:"tip"},[t._v("选项,选择的菜单成功后会自动写入到此菜单下")])],1),e("FormItem",{attrs:{label:"菜单名称"}},[e("Input",{staticClass:"form-width",attrs:{placeholder:"请输入菜单名称"},model:{value:t.foundation.menuName,callback:function(e){t.$set(t.foundation,"menuName",e)},expression:"foundation.menuName"}}),e("div",{staticClass:"tip"},[t._v("\n 生成菜单为可选项,不填写默认生成的菜单名称将为表名;生成后会把自动生成的权限默认加入该菜单下\n ")])],1),e("FormItem",{attrs:{label:"模块名",prop:"modelName"}},[e("Input",{staticClass:"form-width",attrs:{placeholder:"请输入模块名"},model:{value:t.foundation.modelName,callback:function(e){t.$set(t.foundation,"modelName",e)},expression:"foundation.modelName"}}),e("div",{staticClass:"tip"},[t._v("模块名称为中文或者英文,用在接口名称前缀、表单头部标题")])],1),e("FormItem",{attrs:{label:"表名",prop:"tableName"}},[e("Input",{staticClass:"form-width",attrs:{placeholder:"请输入表名"},model:{value:t.foundation.tableName,callback:function(e){t.$set(t.foundation,"tableName",e)},expression:"foundation.tableName"}}),e("div",{staticClass:"tip"},[t._v("\n 用于生成CRUD指定的表名不需要携带表前缀对于生成过的表将不能在进行生成或者可以删除对应的文件重新生成对应系统中重要的数据表将不允许生成\n ")])],1)],1)],1)}),[],!1,null,"4ae57285",null).exports,n("d0ff")),l=(n("c740"),n("99af"),{name:"",props:{foundation:{type:Object,default:function(){return{}}},id:{type:String|Number}},data:function(){return{foundationRules:{},menusList:[],columnTypeList:[],optionsModal:!1,isCreate:!1,isDelete:!1,columns:[{title:"字段名称",slot:"field",minWidth:100},{title:"字段类型",slot:"field_type",minWidth:100},{title:"长度",slot:"limit",minWidth:100},{title:"默认值",slot:"default",minWidth:100},{title:"字段描述",slot:"comment",minWidth:100},{title:"列表",slot:"is_table",width:70,align:"center"},{title:"列表名",slot:"table_name",minWidth:120,align:"center"},{title:"表单类型",slot:"from_type",minWidth:100},{title:"字典配置",slot:"options",minWidth:100},{title:"必填",slot:"required",width:70,align:"center"},{title:"操作",slot:"action",width:70,align:"center"}],fromTypeList:[],loading:!1,tableField:[],optionsList:[],index:0,deleteField:[]}},created:function(){this.getCrudMenus()},mounted:function(){},methods:{disabledInput:function(t){var e=this.tableField[t];t=["addTimestamps","addSoftDelete"].includes(this.tableField[t].field_type);return!!(e.primaryKey||"delete_time"===e.field&&"timestamp"===e.field_type||("create_time"===e.field||"update_time"===e.field)&&"timestamp"===e.field_type)||t},initfield:function(){this.tableField=[]},changeItemField:function(t,e){"addSoftDelete"===t&&this.$set(this.tableField[e],"comment","伪删除"),"addTimestamps"===t&&this.$set(this.tableField[e],"comment","添加和修改时间")},eidtOptions:function(t){this.index=t,this.optionsList=this.tableField[t].options||[{label:"",value:""}],this.optionsModal=!0},addOptions:function(){this.$set(this.tableField[this.index],"options",this.optionsList)},changeRadio:function(t){this.tableField=[],t&&this.addRow()},initTableName:function(){this.tableField=[]},addRow:function(){for(var t=0;t<this.tableField.length;t++){var e=this.tableField[t];if(!(e.field&&e.field_type||["addTimestamps","addSoftDelete"].includes(e.field_type)))return this.$Message.warning("请先完善上一条数据");if(e.is_table&&!e.table_name&&!Number(e.primaryKey)&&!["addTimestamps","addSoftDelete"].includes(e.field_type))return this.$Message.warning("请输入列表名")}this.tableField.length;var n,a=0;this.tableField.map((function(t){"create_time"!==t.field&&"update_time"!==t.field||a++,"delete_time"===t.field&&a++})),n=this.tableField.length-a,this.tableField.splice(n,0,{field:"",field_type:"",default:"",comment:"",required:!1,is_table:!0,table_name:"",limit:"",primaryKey:0,from_type:"0"})},addCreate:function(t){var e=this;if(t){t=this.tableField.findIndex((function(t){return"create_time"===t.field}));var n=this.tableField.findIndex((function(t){return"update_time"===t.field}));if(0<t||0<n)return this.$nextTick((function(t){e.isCreate=!1})),this.$Message.warning("已存在 create_time或update_time");this.tableField=[].concat(Object(s.a)(this.tableField),[{field:"create_time",field_type:"timestamp",default:"",comment:"添加时间",required:!1,is_table:!0,table_name:"添加时间",limit:"",primaryKey:0,from_type:"0"},{field:"update_time",field_type:"timestamp",default:"",comment:"修改时间",required:!1,is_table:!0,table_name:"修改时间",limit:"",primaryKey:0,from_type:"0"}])}else t=this.tableField.findIndex((function(t){return"create_time"===t.field})),this.tableField.splice(t,2)},addDelete:function(t){if(t){if(0<this.tableField.findIndex((function(t){return"delete_time"===t.field})))return this.isDelete=!1,this.$Message.warning("已存在 delete_time");this.tableField=[].concat(Object(s.a)(this.tableField),[{field:"delete_time",field_type:"timestamp",default:"",comment:"伪删除",required:!1,is_table:!1,table_name:"伪删除",limit:"",primaryKey:0,from_type:"0"}])}else t=this.tableField.findIndex((function(t){return"delete_time"===t.field})),this.tableField.splice(t,1)},changeField:function(t){if(this.tableField[t].field)for(var e=0;e<this.tableField.length;e++)if(this.tableField[e],["id","create_time","update_time","delete_time"].includes(this.tableField[t].field))return this.$Message.warning("列表中已存在该字段名称"),void(this.tableField[t].field="")},changeComment:function(t,e){this.tableField[e].table_name=t.target.value},getCrudMenus:function(){var t=this;Object(i.f)().then((function(e){t.menusList=e.data})),Object(i.a)().then((function(e){t.columnTypeList=e.data.types,t.fromTypeList=e.data.form}))},del:function(t,e){this.tableField.splice(e,1),this.id&&this.deleteField.push(t.field)},addOneOptions:function(){this.optionsList.push({label:"",value:""})},delOneOptions:function(t){this.optionsList.splice(t,1)}}}),c=(l=(n("4bb7"),Object(u.a)(l,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"main"},[n("Alert",{attrs:{closable:""},scopedSlots:t._u([{key:"desc",fn:function(){return[n("p",[t._v("\n 1、字段配置中表存在生成的字段为表内列的信息,并且主键、伪删除字段不允许设置为列,主键默认展示在列表中,伪删除字段不允许展示\n ")]),n("p",[t._v("2、在字段配置中新建表时主键不需要增加列会自动增加一行主键id")]),n("p",[t._v("\n 3、在字段配置中新建表时字段类型为addTimestamps会自动创建create_time、update_time字段字段类型为timestamp\n ")]),n("p",[t._v("\n 4、在字段配置中新建表时字段类型为addSoftDelete会字段创建delete_time字段字段类型为timestamp作用是伪删除\n ")]),n("p",[t._v("5、在字段配置中表单类型为不生成时创建后不会生成对应的表单项")]),n("p",[t._v("6、添加字段id、create_time、update_time、delete_time为不可用字段")])]},proxy:!0}])},[t._v("\n crud生成说明\n ")]),n("div",{staticClass:"df"},[n("Button",{staticClass:"mr20",attrs:{type:"primary"},on:{click:t.addRow}},[t._v("添加一行")]),n("Checkbox",{staticClass:"mr10",on:{"on-change":t.addCreate},model:{value:t.isCreate,callback:function(e){t.isCreate=e},expression:"isCreate"}},[t._v("添加与修改时间")]),n("Checkbox",{staticClass:"mr10",on:{"on-change":t.addDelete},model:{value:t.isDelete,callback:function(e){t.isDelete=e},expression:"isDelete"}},[t._v("伪删除")])],1),n("div",[n("Table",{ref:"selection",attrs:{columns:t.columns,data:t.tableField,"no-data-text":"暂无数据","highlight-row":"",loading:t.loading,"max-height":"600",size:"small","no-filtered-data-text":"暂无筛选结果"},scopedSlots:t._u([{key:"field",fn:function(e){e.row;var a=e.index;return[n("Input",{attrs:{disabled:t.disabledInput(a)},on:{"on-blur":function(e){return t.changeField(a)}},model:{value:t.tableField[a].field,callback:function(e){t.$set(t.tableField[a],"field",e)},expression:"tableField[index].field"}})]}},{key:"field_type",fn:function(e){e.row;var a=e.index;return[n("Select",{attrs:{disabled:t.disabledInput(a)},on:{"on-change":function(e){return t.changeItemField(e,a)}},model:{value:t.tableField[a].field_type,callback:function(e){t.$set(t.tableField[a],"field_type",e)},expression:"tableField[index].field_type"}},t._l(t.columnTypeList,(function(e){return n("Option",{key:e,attrs:{value:e}},[t._v(t._s(e))])})),1)]}},{key:"limit",fn:function(e){e.row;var a=e.index;return[n("Input",{attrs:{disabled:t.disabledInput(a)},model:{value:t.tableField[a].limit,callback:function(e){t.$set(t.tableField[a],"limit",e)},expression:"tableField[index].limit"}})]}},{key:"default",fn:function(e){e.row;var a=e.index;return[n("Input",{attrs:{disabled:t.disabledInput(a)},model:{value:t.tableField[a].default,callback:function(e){t.$set(t.tableField[a],"default",e)},expression:"tableField[index].default"}})]}},{key:"comment",fn:function(e){e.row;var a=e.index;return[n("Input",{attrs:{disabled:t.disabledInput(a)},on:{"on-change":function(e){return t.changeComment(e,a)}},model:{value:t.tableField[a].comment,callback:function(e){t.$set(t.tableField[a],"comment",e)},expression:"tableField[index].comment"}})]}},{key:"required",fn:function(e){e.row;var a=e.index;return[n("Checkbox",{attrs:{disabled:t.disabledInput(a)},model:{value:t.tableField[a].required,callback:function(e){t.$set(t.tableField[a],"required",e)},expression:"tableField[index].required"}})]}},{key:"is_table",fn:function(e){e.row;var a=e.index;return[n("Checkbox",{attrs:{disabled:t.disabledInput(a)},model:{value:t.tableField[a].is_table,callback:function(e){t.$set(t.tableField[a],"is_table",e)},expression:"tableField[index].is_table"}})]}},{key:"table_name",fn:function(e){e.row;var a=e.index;return[n("Input",{attrs:{disabled:t.disabledInput(a)},model:{value:t.tableField[a].table_name,callback:function(e){t.$set(t.tableField[a],"table_name",e)},expression:"tableField[index].table_name"}})]}},{key:"from_type",fn:function(e){e.row;var a=e.index;return[n("Select",{attrs:{disabled:t.disabledInput(a)},model:{value:t.tableField[a].from_type,callback:function(e){t.$set(t.tableField[a],"from_type",e)},expression:"tableField[index].from_type"}},t._l(t.fromTypeList,(function(e){return n("Option",{key:e.value,attrs:{value:e.value}},[t._v(t._s(e.label))])})),1)]}},{key:"options",fn:function(e){e.row;var a=e.index;return[["select","radio","checkbox"].includes(t.tableField[a].from_type)?n("div",{staticClass:"table-options"},[n("Select",t._l(t.tableField[a].options,(function(e){return n("Option",{key:e.value,attrs:{value:e.value}},[t._v(t._s(e.label))])})),1),n("Icon",{staticClass:"create",attrs:{type:"md-create"},on:{click:function(e){return t.eidtOptions(a)}}})],1):n("div",[t._v("--")])]}},{key:"action",fn:function(e){var a=e.row,r=e.index;return[t.tableField[r].primaryKey||t.disabledInput(r)?n("span",[t._v("--")]):n("a",{on:{click:function(e){return t.del(a,r)}}},[t._v("删除")])]}}])})],1),n("Modal",{attrs:{scrollable:"",title:"字典配置",closable:"","mask-closable":!1,width:"400px"},on:{"on-ok":t.addOptions,"on-cancel":function(e){t.optionsModal=!1}},model:{value:t.optionsModal,callback:function(e){t.optionsModal=e},expression:"optionsModal"}},[n("div",{staticClass:"options-list"},t._l(t.optionsList,(function(e,a){return n("div",{key:a,staticClass:"item"},[n("Input",{staticClass:"mr10",staticStyle:{width:"150px"},attrs:{placeholder:"label"},model:{value:e.label,callback:function(n){t.$set(e,"label",n)},expression:"item.label"}}),n("Input",{staticClass:"mr10",staticStyle:{width:"150px"},attrs:{placeholder:"value"},model:{value:e.value,callback:function(n){t.$set(e,"value",n)},expression:"item.value"}}),a==t.optionsList.length-1?n("Icon",{staticClass:"add",attrs:{type:"md-add-circle"},on:{click:t.addOneOptions}}):t._e(),0<a?n("Icon",{staticClass:"add",attrs:{type:"md-remove-circle"},on:{click:function(e){return t.delOneOptions(a)}}}):t._e()],1)})),0)])],1)}),[],!1,null,"4e63305c",null).exports),{name:"",props:{storage:{type:Object,default:function(){return{}}}},data:function(){return{storageRules:{}}},created:function(){},mounted:function(){},methods:{}}),d=(c=(n("7b98"),Object(u.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"main"},[n("Alert",{attrs:{closable:""},scopedSlots:t._u([{key:"desc",fn:function(){return[n("p",[t._v("1、生成的文件位置尽量不要修改可以在创建后自行移动")]),n("p",[t._v("2、生成的文件位置不会包含文件的绝对路径在创建时会携带提前预设的绝对路径")]),n("p",[t._v("3、前端模板文件默认位置在config/app.php的admin_template_path中配置")]),n("p",[t._v("4、后端默认生成位置为网站根目录")]),n("p",[t._v("5、确保前端/admin/src目录、后端app目录有写入创建文件权限")])]},proxy:!0}])},[t._v("\n crud生成文件位置说明\n ")]),n("Form",{ref:"foundation",attrs:{model:t.storage,rules:t.storageRules,"label-width":130}},[n("FormItem",{attrs:{label:"生成controller位置"}},[n("Input",{staticClass:"form-width",attrs:{disabled:"",placeholder:"请输入"},model:{value:t.storage.controller,callback:function(e){t.$set(t.storage,"controller",e)},expression:"storage.controller"}}),n("div",{staticClass:"tip"},[t._v("生成后端控制器文件存放位置")])],1),n("FormItem",{attrs:{label:"生成service位置"}},[n("Input",{staticClass:"form-width",attrs:{disabled:"",placeholder:"请输入"},model:{value:t.storage.service,callback:function(e){t.$set(t.storage,"service",e)},expression:"storage.service"}}),n("div",{staticClass:"tip"},[t._v("生成后端service文件存放位置")])],1),n("FormItem",{attrs:{label:"生成dao位置"}},[n("Input",{staticClass:"form-width",attrs:{disabled:"",placeholder:"请输入"},model:{value:t.storage.dao,callback:function(e){t.$set(t.storage,"dao",e)},expression:"storage.dao"}}),n("div",{staticClass:"tip"},[t._v("生成后端dao文件存放位置")])],1),n("FormItem",{attrs:{label:"生成model位置"}},[n("Input",{staticClass:"form-width",attrs:{disabled:"",placeholder:"请输入"},model:{value:t.storage.model,callback:function(e){t.$set(t.storage,"model",e)},expression:"storage.model"}}),n("div",{staticClass:"tip"},[t._v("生成后端model文件存放位置")])],1),n("FormItem",{attrs:{label:"生成route位置"}},[n("Input",{staticClass:"form-width",attrs:{disabled:"",placeholder:"请输入"},model:{value:t.storage.route,callback:function(e){t.$set(t.storage,"route",e)},expression:"storage.route"}}),n("div",{staticClass:"tip"},[t._v("生成后端路由存放位置")])],1),n("FormItem",{attrs:{label:"生成validate位置"}},[n("Input",{staticClass:"form-width",attrs:{disabled:"",placeholder:"请输入"},model:{value:t.storage.validate,callback:function(e){t.$set(t.storage,"validate",e)},expression:"storage.validate"}}),n("div",{staticClass:"tip"},[t._v("生成后端验证器存放位置")])],1),n("FormItem",{attrs:{label:"生成pages位置"}},[n("Input",{staticClass:"form-width",attrs:{disabled:"",placeholder:"请输入"},model:{value:t.storage.pages,callback:function(e){t.$set(t.storage,"pages",e)},expression:"storage.pages"}}),n("div",{staticClass:"tip"},[t._v("生成前端页面文件存放位置")])],1),n("FormItem",{attrs:{label:"生成api位置"}},[n("Input",{staticClass:"form-width",attrs:{disabled:"",placeholder:"请输入"},model:{value:t.storage.api,callback:function(e){t.$set(t.storage,"api",e)},expression:"storage.api"}}),n("div",{staticClass:"tip"},[t._v("生成前端api接口文件存放位置")])],1),n("FormItem",{attrs:{label:"生成router位置"}},[n("Input",{staticClass:"form-width",attrs:{disabled:"",placeholder:"请输入"},model:{value:t.storage.router,callback:function(e){t.$set(t.storage,"router",e)},expression:"storage.router"}}),n("div",{staticClass:"tip"},[t._v("生成前端路由存放位置")])],1)],1)],1)}),[],!1,null,"0c926c96",null).exports),n("46c4")),f=n("6987");o={name:"system_code_generation",components:{FoundationForm:o,StorageLoc:c,TableForm:l},data:function(){return{currentTab:0,headerList:[{label:"基础信息",value:"foundation"},{label:"字段配置",value:"table"},{label:"存放位置",value:"storage"}],formItem:{foundation:{pid:"",tableName:"",modelName:"",isTable:1,menuName:""},tableForm:{},storage:{},field:{},formItem:{}},ruleValidate:{foundation:{}},tableField:[],rowList:[],reqloading:!1,id:""}},created:function(){this.$route.query.id&&(this.id=this.$route.query.id,this.getDetail(this.$route.query.id))},mounted:function(){},methods:{getDetail:function(t){var e=this;Object(i.b)(t).then((function(t){t=t.data.crudInfo.field;var n=(e.formItem.foundation.pid=Number(t.pid),e.formItem.foundation.tableName=t.tableName,e.formItem.foundation.modelName=t.modelName,e.formItem.foundation.menuName=t.menuName,e.$refs.TableForm.tableField=t.tableField,e.formItem.storage=t.filePath,0);t.tableField.map((function(t){"create_time"!==t.field&&"update_time"!==t.field||2==++n&&(e.$refs.TableForm.isCreate=!0),"delete_time"===t.field&&(e.$refs.TableForm.isDelete=!0)}))}))},storageData:function(t){this.formItem.storage=t},beforeTab:function(){this.currentTab--},addRow:function(){var t=this,e=this.formItem.foundation;if(!e.tableName)return this.$Message.warning("请先填写表名");e={menuName:e.menuName,tableName:e.tableName,fromField:[],columnField:[]},Object(i.d)(e).then((function(e){t.$refs.TableForm.tableField=e.data.tableField.length?e.data.tableField:[],t.formItem.storage=e.data.makePath,e.data.tableField.length||t.$refs.TableForm.tableField.push({field:"id",field_type:"int",default:"",comment:"自增ID",required:!1,is_table:!0,table_name:"",limit:"10",primaryKey:1,from_type:"0"}),t.currentTab++})).catch((function(e){t.$Message.warning(e.msg)}))},nextTab:function(){var t,e=this;if(0==this.currentTab){if(!this.formItem.foundation.tableName)return this.$Message.warning("请输入表名");if(!this.formItem.foundation.modelName)return this.$Message.warning("请输入模块名");if(!this.formItem.foundation.isTable){if(!this.$refs.TableForm.tableField.length)return this.$Message.warning("请先添加表数据");if(this.$refs.TableForm.tableField.length)for(var n=0;n<this.$refs.TableForm.tableField.length;n++){var r=this.$refs.TableForm.tableField[n];if(!(-1!==["addSoftDelete","addTimestamps"].indexOf(r.field_type)||r.field&&r.field_type&&r.comment))return this.$Message.warning("请完善sql表数据")}}if(this.id)return this.currentTab++;this.addRow()}else 2==this.currentTab?this.reqloading||(t=Object(a.a)(Object(a.a)({},this.formItem.foundation),{},{filePath:this.formItem.storage,tableField:this.$refs.TableForm.tableField,deleteField:this.id?this.$refs.TableForm.deleteField:[]}),this.id?(t.id=this.id,this.$Modal.confirm({title:"生成提醒",content:'重新提交会重新生成文件,<span style="color: red">删除、新增、修改</span>的字段将直接从改表中进行修改,请慎重操作!!',loading:!0,onOk:function(){e.saveCodeCrud(t,!0)}})):this.$Modal.confirm({title:"生成提醒",content:"生成后本地开发调试会直接加载生成的vue页面如果是上线后进行生成,可以进行浏览,代码生成列表中的修改文件将不生效。需要重新打包上线!",loading:!0,onOk:function(){e.saveCodeCrud(t,!0)}})):this.currentTab<3&&this.currentTab++},saveCodeCrud:function(t,e){var n=this;this.reqloading=!0,Object(r.i)(t).then((function(t){n.$Message.success(t.msg),n.getMenusUnique(),n.reqloading=!1,e&&n.$Modal.remove(),n.$router.push({name:"system_code_generation_list"})})).catch((function(t){n.reqloading=!1,n.$Message.error(t.msg)}))},getMenusUnique:function(){var t=this;Object(d.c)().then((function(e){e=e.data;var n=(t.$store.commit("userInfo/uniqueAuth",e.uniqueAuth),t.$store.commit("menus/getmenusNav",e.menus),t.$store.dispatch("routesList/setRoutesList",e.menus),Object(f.c)(t.$router.options.routes));t.formatTwoStageRoutes(n),n=Object(f.c)(e.menus);t.$store.commit("menus/setOneLvRoute",n),t.bus.$emit("routesListChange")}))},formatTwoStageRoutes:function(t){var e,n,r=this;return!(t.length<=0)&&(e=[],n=[],t.forEach((function(t){t&&t.meta&&t.meta.keepAlive&&(e.push(Object(a.a)({},t)),n.push(t.name),r.$store.dispatch("keepAliveNames/setCacheKeepAlive",n))})),e)}}},n("db90"),c=Object(u.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"code-wapper"},[n("div",{staticClass:"i-layout-page-header header-title"},[n("div",{staticClass:"fl_header"},[n("router-link",{attrs:{to:{path:t.$routeProStr+"/system/code_generation_list"}}},[n("Button",{attrs:{icon:"ios-arrow-back",size:"small",type:"text"}},[t._v("返回")])],1),n("Divider",{attrs:{type:"vertical"}}),n("span",{staticClass:"ivu-page-header-title mr20",staticStyle:{padding:"0"}},[t._v("添加功能")])],1)]),n("div",{staticClass:"message"},[n("Card",{attrs:{bordered:!1,"dis-hover":""}},[n("Steps",{attrs:{current:t.currentTab}},t._l(t.headerList,(function(t,e){return n("Step",{key:e,attrs:{title:t.label}})})),1)],1)],1),n("div",{directives:[{name:"show",rawName:"v-show",value:"0"==t.currentTab,expression:"currentTab == '0'"}],staticClass:"pt10 tab-1"},[n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[n("FoundationForm",{ref:"Foundation",attrs:{foundation:t.formItem.foundation,tableField:t.tableField},on:{storageData:t.storageData}})],1)],1),n("div",{directives:[{name:"show",rawName:"v-show",value:"1"==t.currentTab,expression:"currentTab == '1'"}],staticClass:"pt10"},[n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[n("TableForm",{ref:"TableForm",attrs:{foundation:t.formItem.foundation,tableField:t.tableField,id:t.id},on:{storageData:t.storageData}})],1)],1),n("div",{directives:[{name:"show",rawName:"v-show",value:"2"==t.currentTab,expression:"currentTab == '2'"}],staticClass:"pt10"},[n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[n("StorageLoc",{attrs:{storage:t.formItem.storage}})],1)],1),n("Card",{staticClass:"btn",attrs:{bordered:!1,"dis-hover":""}},[n("Button",{staticClass:"mr20",on:{click:t.beforeTab}},[t._v("上一步")]),n("Button",{attrs:{type:"primary"},on:{click:t.nextTab}},[t._v(t._s(2==t.currentTab?"提交":"下一步"))])],1)],1)}),[],!1,null,"65f20dd0",null);e.default=c.exports},db90:function(t,e,n){"use strict";var a=n("5003");n.n(a).a},ec36:function(t,e,n){}}]);