| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-371f1577"],{d801:function(t,e,n){"use strict";var r=n("dfbf");n.n(r).a},dfbf:function(t,e,n){},e2606:function(t,e,n){"use strict";n.r(e),n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0"),n("b636"),n("944a"),n("0c47"),n("23dc"),n("3410"),n("d9e2"),n("159b"),n("131a");var r=n("0122"),i=n("c964"),o=(n("a434"),n("fb6a"),n("d81d"),n("b0c0"),n("a15b"),n("8593")),a=n("d708"),s=n("c276");function c(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */c=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(e){l=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var o,a,s,c;e=e&&e.prototype instanceof p?e:p,e=Object.create(e.prototype),r=new x(r||[]);return i(e,"_invoke",{value:(o=t,a=n,s=r,c="suspendedStart",function(t,e){if("executing"===c)throw new Error("Generator is already running");if("completed"===c){if("throw"===t)throw e;return _()}for(s.method=t,s.arg=e;;){var n=s.delegate;if(n&&(n=function t(e,n){var r=n.method,i=e.iterator[r];return void 0===i?(n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d):(r=f(i,e.iterator,n.arg),"throw"===r.type?(n.method="throw",n.arg=r.arg,n.delegate=null,d):(i=r.arg,i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,d):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)))}(n,s),n)){if(n===d)continue;return n}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if("suspendedStart"===c)throw c="completed",s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);if(c="executing",n=f(o,a,s),"normal"===n.type){if(c=s.done?"completed":"suspendedYield",n.arg===d)continue;return{value:n.arg,done:s.done}}"throw"===n.type&&(c="completed",s.method="throw",s.arg=n.arg)}})}),e}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var d={};function p(){}function m(){}function g(){}o={};var v=(l(o,a,(function(){return this})),Object.getPrototypeOf),y=(v=v&&v(v(O([]))),v&&v!==e&&n.call(v,a)&&(o=v),g.prototype=p.prototype=Object.create(o));function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var o;i(this,"_invoke",{value:function(i,a){function s(){return new e((function(o,s){!function i(o,a,s,c){var u;o=f(t[o],t,a);if("throw"!==o.type)return(a=(u=o.arg).value)&&"object"==Object(r.a)(a)&&n.call(a,"__await")?e.resolve(a.__await).then((function(t){i("next",t,s,c)}),(function(t){i("throw",t,s,c)})):e.resolve(a).then((function(t){u.value=t,s(u)}),(function(t){return i("throw",t,s,c)}));c(o.arg)}(i,a,o,s)}))}return o=o?o.then(s,s):s()}})}function L(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 k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function O(t){if(t){var e,r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(r=function r(){for(;++e<t.length;)if(n.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r}).next=r}return{next:_}}function _(){return{value:void 0,done:!0}}return i(y,"constructor",{value:m.prototype=g,configurable:!0}),i(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),l(w.prototype,s,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new w(h(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),l(y,u,"Generator"),l(y,a,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=O,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;0<=i;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}var a=(o=o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc?null:o)?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},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),d},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,k(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}var u={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=a.a.apiBaseURL.indexOf("/adminapi/");return a.a.apiBaseURL.substring(0,t)}},created:function(){this.getToken(),this.getList(),this.getfileList()},methods:{ImportFile:function(t){var e=this;Object(o.u)({part:t.part,time:t.time}).then(function(){var t=Object(i.a)(c().mark((function t(n){return c().wrap((function(t){for(;;)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;e={title:e,num:n,url:"system/backup/del_file",method:"DELETE",ids:{filename:t.time}};this.$modalSure(e).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.c)("token")},download:function(t){var e=this;t={time:t.time};Object(o.t)(t).then((function(t){t.data.key&&window.open(a.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.b)(this.dataList).then(function(){var e=Object(i.a)(c().mark((function e(n){return c().wrap((function(e){for(;;)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.v)().then(function(){var e=Object(i.a)(c().mark((function e(n){var r;return c().wrap((function(e){for(;;)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.d)(this.dataList).then(function(){var e=Object(i.a)(c().mark((function e(n){return c().wrap((function(e){for(;;)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.f)(this.dataList).then(function(){var e=Object(i.a)(c().mark((function e(n){return c().wrap((function(e){for(;;)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.c)().then(function(){var e=Object(i.a)(c().mark((function e(n){var r;return c().wrap((function(e){for(;;)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,t={tablename:t.name};Object(o.e)(t).then(function(){var t=Object(i.a)(c().mark((function t(n){var r;return c().wrap((function(t){for(;;)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)}))}}};n("d801"),n=n("2877"),n=Object(n.a)(u,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Card",{staticClass:"ivu-mt listbox",attrs:{bordered:!1,"dis-hover":""}},[n("Tabs",{staticClass:"mb30",on:{"on-click":t.onClickTab}},[n("TabPane",{attrs:{label:"数据库列表"}},[n("Card",{staticClass:"tableBox mt10",attrs:{bordered:!1,"dis-hover":""}},[n("div",{attrs:{slot:"title"},slot:"title"},[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;return e.index,[n("a",{on:{click:function(e){return t.Info(r)}}},[t._v("详情")])]}}])})],1),n("Drawer",{attrs:{closable:!1,closable:"",width:"740",title:"[ "+t.rows.name+" ]"+t.rows.comment},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),n("TabPane",{attrs:{label:"备份列表"}},[n("Card",{attrs:{bordered:!1,"dis-hover":""}},[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)],1)],1)],1)],1)}),[],!1,null,"05d8c2b4",null);e.default=n.exports}}]);
|