mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-15 13:22:51 +00:00
1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-78751f2b"],{8593:function(t,e,n){"use strict";n.d(e,"j",(function(){return i})),n.d(e,"h",(function(){return a})),n.d(e,"i",(function(){return o})),n.d(e,"P",(function(){return u})),n.d(e,"n",(function(){return s})),n.d(e,"l",(function(){return c})),n.d(e,"m",(function(){return l})),n.d(e,"k",(function(){return d})),n.d(e,"D",(function(){return f})),n.d(e,"v",(function(){return m})),n.d(e,"C",(function(){return h})),n.d(e,"A",(function(){return g})),n.d(e,"x",(function(){return p})),n.d(e,"y",(function(){return b})),n.d(e,"z",(function(){return v})),n.d(e,"B",(function(){return O})),n.d(e,"M",(function(){return y})),n.d(e,"Q",(function(){return j})),n.d(e,"o",(function(){return k})),n.d(e,"d",(function(){return _})),n.d(e,"f",(function(){return w})),n.d(e,"c",(function(){return L})),n.d(e,"e",(function(){return T})),n.d(e,"g",(function(){return x})),n.d(e,"r",(function(){return M})),n.d(e,"p",(function(){return C})),n.d(e,"q",(function(){return R})),n.d(e,"G",(function(){return $})),n.d(e,"H",(function(){return E})),n.d(e,"L",(function(){return B})),n.d(e,"K",(function(){return U})),n.d(e,"a",(function(){return W})),n.d(e,"b",(function(){return S})),n.d(e,"t",(function(){return G})),n.d(e,"O",(function(){return P})),n.d(e,"w",(function(){return z})),n.d(e,"S",(function(){return D})),n.d(e,"R",(function(){return N})),n.d(e,"E",(function(){return I})),n.d(e,"F",(function(){return A})),n.d(e,"u",(function(){return F})),n.d(e,"I",(function(){return J})),n.d(e,"J",(function(){return q})),n.d(e,"s",(function(){return H})),n.d(e,"N",(function(){return K}));var r=n("6b6c");function i(t){return Object(r["a"])({url:"setting/config_class",method:"get",params:t})}function a(t){return Object(r["a"])({url:"setting/config_class/create",method:"get"})}function o(t){return Object(r["a"])({url:"setting/config_class/".concat(t,"/edit"),method:"get"})}function u(t){return Object(r["a"])({url:"setting/config_class/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function s(t){return Object(r["a"])({url:"setting/config",method:"get",params:t})}function c(t){return Object(r["a"])({url:"setting/config/create",method:"get",params:t})}function l(t){return Object(r["a"])({url:"/setting/config/".concat(t,"/edit"),method:"get"})}function d(t,e){return Object(r["a"])({url:"setting/config/set_status/".concat(t,"/").concat(e),method:"PUT"})}function f(t){return Object(r["a"])({url:"setting/group",method:"get",params:t})}function m(t){return Object(r["a"])({url:t.url,method:t.method,data:t.datas})}function h(t){return Object(r["a"])({url:"setting/group/".concat(t),method:"get"})}function g(t,e){return Object(r["a"])({url:e,method:"get",params:t})}function p(t,e){return Object(r["a"])({url:e,method:"get",params:t})}function b(t,e){return Object(r["a"])({url:e,method:"get",params:t})}function v(t,e){return Object(r["a"])({url:e,method:"get",params:t})}function O(t){return Object(r["a"])({url:t,method:"PUT"})}function y(t){return Object(r["a"])({url:"system/log/search_admin",method:"GET"})}function j(t){return Object(r["a"])({url:"system/log",method:"GET",params:t})}function k(){return Object(r["a"])({url:"system/file",method:"GET"})}function _(){return Object(r["a"])({url:"system/backup",method:"GET"})}function w(t){return Object(r["a"])({url:"system/backup/read",method:"GET",params:t})}function L(t){return Object(r["a"])({url:"system/backup/backup",method:"put",data:t})}function T(t){return Object(r["a"])({url:"system/backup/optimize",method:"put",data:t})}function x(t){return Object(r["a"])({url:"system/backup/repair",method:"put",data:t})}function M(t){return Object(r["a"])({url:"system/backup/file_list",method:"GET"})}function C(t){return Object(r["a"])({url:"backup/download",method:"get",params:t})}function R(t){return Object(r["a"])({url:"system/backup/import",method:"POST",data:t})}function $(t){return Object(r["a"])({url:"system/file/opendir",method:"GET",params:t})}function E(t){return Object(r["a"])({url:"system/file/openfile?filepath=".concat(t),method:"GET"})}function B(t){return Object(r["a"])({url:"system/file/savefile",method:"post",data:t})}function U(t){return Object(r["a"])({url:"system/replace_site_url",method:"post",data:t})}function W(){return Object(r["a"])({url:"auth",method:"get"})}function S(t){return Object(r["a"])({url:"auth_apply",method:"post",data:t})}function G(){return Object(r["a"])({url:"setting/get_kf_adv",method:"get"})}function P(t){return Object(r["a"])({url:"setting/set_kf_adv",method:"post",data:t})}function z(){return Object(r["a"])({url:"setting/group_all",method:"get"})}function D(t){return Object(r["a"])({url:"system/version_list",method:"get",params:t})}function N(t){return Object(r["a"])({url:"system/version_crate/".concat(t),method:"get"})}function I(t){return Object(r["a"])({url:"setting/group_data/save_all",method:"POST",data:t})}function A(t){return Object(r["a"])({url:"diy/open_adv/add",method:"POST",data:t})}function F(){return Object(r["a"])({url:"diy/open_adv/info",method:"get"})}function J(t){return Object(r["a"])({url:"setting/config/get_system/".concat(t),method:"get"})}function q(t){return Object(r["a"])({url:"setting/config/save_basics",method:"POST",data:t})}function H(){return Object(r["a"])({url:"setting/get_user_agreement",method:"get"})}function K(t){return Object(r["a"])({url:"setting/set_user_agreement",method:"post",data:t})}},a1b7:function(t,e,n){},d24f:function(t,e,n){"use strict";var r=n("a1b7"),i=n.n(r);i.a},e260:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"i-layout-page-header"},[n("div",{staticClass:"i-layout-page-header"},[n("span",{staticClass:"ivu-page-header-title"},[t._v(t._s(t.$route.meta.title))])])]),n("Card",{staticClass:"ivu-mt tableBox",attrs:{bordered:!1,"dis-hover":""}},[n("div",{attrs:{slot:"title"},slot:"title"},[n("span",{staticClass:"ivu-pl-8"},[t._v("数据库备份记录")])]),n("Table",{ref:"selection",attrs:{columns:t.columns4,data:t.tabList,loading:t.loading3,"no-data-text":"暂无数据","highlight-row":"",size:"small","no-filtered-data-text":"暂无筛选结果"},scopedSlots:t._u([{key:"action",fn:function(e){var r=e.row,i=e.index;return[n("a",{on:{click:function(e){return t.ImportFile(r)}}},[t._v("导入")]),n("Divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(e){return t.del(r,"删除该备份",i)}}},[t._v("删除")]),n("Divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(e){return t.download(r)}}},[t._v("下载")])]}}])})],1),n("Card",{staticClass:"ivu-mt tableBox",attrs:{bordered:!1,"dis-hover":""}},[n("div",{attrs:{slot:"title"},slot:"title"},[n("span",{staticClass:"ivu-pl-8 mr10"},[t._v("数据库表列表")]),n("Button",{staticClass:"mr10",attrs:{type:"primary"},on:{click:t.getBackup}},[t._v("备份")]),n("Button",{staticClass:"mr10",attrs:{type:"primary"},on:{click:t.getOptimize}},[t._v("优化表")]),n("Button",{staticClass:"mr10",attrs:{type:"primary"},on:{click:t.getRepair}},[t._v("修复表")]),n("Button",{staticClass:"mr10",attrs:{type:"primary"},on:{click:function(e){return t.exportData(1)}}},[t._v("导出文件")])],1),n("Table",{ref:"selection",attrs:{columns:t.columns,data:t.tabList2,loading:t.loading,"highlight-row":"","no-data-text":"暂无数据",size:"small","no-filtered-data-text":"暂无筛选结果"},on:{"on-selection-change":t.onSelectTab},scopedSlots:t._u([{key:"action",fn:function(e){var r=e.row;e.index;return[n("a",{on:{click:function(e){return t.Info(r)}}},[t._v("详情")])]}}])})],1),n("Modal",{staticClass:"tableBox",attrs:{scrollable:"","footer-hide":"",closable:"",title:"[ "+t.rows.name+" ]"+t.rows.comment,"mask-closable":!1,width:"750"},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[n("Table",{ref:"selection",attrs:{columns:t.columns2,data:t.tabList3,loading:t.loading2,"no-data-text":"暂无数据","highlight-row":"","max-height":"600",size:"small","no-filtered-data-text":"暂无筛选结果"}})],1)],1)},i=[],a=(n("7f7f"),n("96cf"),n("3b8d")),o=n("8593"),u=n("d708"),s=n("c276"),c={name:"systemDatabackup",data:function(){return{modals:!1,loading:!1,tabList:[],columns4:[{title:"备份名称",key:"filename",minWidth:200,sortable:!0},{title:"part",key:"part",minWidth:100},{title:"大小",key:"size",minWidth:150},{title:"compress",key:"compress",minWidth:100},{title:"时间",key:"backtime",minWidth:150},{title:"操作",slot:"action",fixed:"right",minWidth:150}],tabList2:[],columns:[{type:"selection",width:60,align:"center"},{title:"表名称",key:"name",minWidth:200,sortable:!0},{title:"备注",key:"comment",minWidth:200},{title:"类型",key:"engine",minWidth:130,sortable:!0},{title:"大小",key:"data_length",minWidth:130,sortable:!0},{title:"更新时间",key:"update_time",minWidth:150,sortable:!0},{title:"行数",key:"rows",minWidth:100,sortable:!0},{title:"操作",slot:"action",fixed:"right",minWidth:150}],selectionList:[],tabList3:[],columns2:[{title:"字段名",key:"COLUMN_NAME"},{title:"数据类型",key:"COLUMN_TYPE"},{title:"默认值",key:"COLUMN_DEFAULT"},{title:"允许非空",key:"IS_NULLABLE"},{title:"自动递增",key:"EXTRA"},{title:"备注",key:"COLUMN_COMMENT"}],rows:{},dataList:{},loading2:!1,loading3:!1,header:{},Token:""}},computed:{fileUrl:function(){var t="/adminapi/",e=u["a"].apiBaseURL.indexOf(t);return u["a"].apiBaseURL.substring(0,e)}},created:function(){this.getToken(),this.getList(),this.getfileList()},methods:{ImportFile:function(t){var e=this;Object(o["q"])({part:t.part,time:t.time}).then(function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$Message.success(n.msg),e.getfileList();case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.loading=!1,e.$Message.error(t.msg)}))},del:function(t,e,n){var r=this,i={title:e,num:n,url:"system/backup/del_file",method:"DELETE",ids:{filename:t.time}};this.$modalSure(i).then((function(t){r.$Message.success(t.msg),r.tabList.splice(n,1)})).catch((function(t){r.$Message.error(t.msg)}))},getToken:function(){this.Token=Object(s["d"])("token")},download:function(t){var e=this,n={time:t.time};Object(o["p"])(n).then((function(t){t.data.key&&window.open(u["a"].apiBaseURL+"/download?key="+t.data.key)})).catch((function(t){e.$Message.error(t)}))},exportData:function(){var t=this.columns.slice(1,7);this.$refs.selection.exportCsv({filename:"导出",columns:t,data:this.tabList2})},onSelectTab:function(t){this.selectionList=t;var e=[];this.selectionList.map((function(t){e.push(t.name)})),this.dataList={tables:e.join(",")}},getBackup:function(){var t=this;if(0===this.selectionList.length)return this.$Message.warning("请选择表");Object(o["c"])(this.dataList).then(function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$Message.success(n.msg),t.getfileList();case 2: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)}))},getfileList:function(){var t=this;this.loading3=!0,Object(o["r"])().then(function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:r=n.data,t.tabList=r.list,t.loading3=!1;case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading3=!1,t.$Message.error(e.msg)}))},getOptimize:function(){var t=this;if(0===this.selectionList.length)return this.$Message.warning("请选择表");Object(o["e"])(this.dataList).then(function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$Message.success(n.msg);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)}))},getRepair:function(){var t=this;if(0===this.selectionList.length)return this.$Message.warning("请选择表");Object(o["g"])(this.dataList).then(function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$Message.success(n.msg);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)}))},getList:function(){var t=this;this.loading=!0,Object(o["d"])().then(function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:r=n.data,t.tabList2=r.list,t.loading=!1;case 3: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)}))},Info:function(t){var e=this;this.rows=t,this.modals=!0,this.loading2=!0;var n={tablename:t.name};Object(o["f"])(n).then(function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(n){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:r=n.data,e.tabList3=r.list,e.loading2=!1;case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.loading2=!1,e.$Message.error(t.msg)}))}}},l=c,d=(n("d24f"),n("2877")),f=Object(d["a"])(l,r,i,!1,null,"934417f6",null);e["default"]=f.exports}}]); |