You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
8.9 KiB
1 lines
8.9 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-16f94bb3"],{ab19:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card mb20"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[t._v("数据库备份记录")])]),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading1,expression:"listLoading1"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"small","highlight-current-row":""}},[a("el-table-column",{attrs:{prop:"filename",label:"备份名称",sortable:"","min-width":"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"part",label:"part","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"size",label:"大小","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"compress",label:"compress","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"backtime",label:"时间","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"100",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.time,e.$index)}}},[t._v("删除")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.download(e.row.time)}}},[t._v("下载")])]}}])})],1)],1),t._v(" "),a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",{staticClass:"mr10"},[t._v("数据库表列表")]),t._v(" "),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.getBackup}},[t._v("备份")]),t._v(" "),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.getOptimize}},[t._v("优化表")]),t._v(" "),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.getRepair}},[t._v("修复表")])],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.databaseData.data,size:"small","highlight-current-row":""},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:"表名称","min-width":"200",sortable:""}}),t._v(" "),a("el-table-column",{attrs:{prop:"comment",label:"备注","min-width":"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"engine",label:"类型","min-width":"130",sortable:""}}),t._v(" "),a("el-table-column",{attrs:{prop:"data_length",label:"大小",sortable:"","min-width":"130"}}),t._v(" "),a("el-table-column",{attrs:{prop:"update_time",label:"更新时间",sortable:"","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"rows",label:"行数",sortable:"","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"100",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.Info(e.row)}}},[t._v("详情")])]}}])})],1)],1),t._v(" "),a("el-dialog",{attrs:{title:"[ "+t.rows.name+" ]"+t.rows.comment,visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.tabList,size:"small","max-height":"500","highlight-current-row":""}},[a("el-table-column",{attrs:{prop:"COLUMN_NAME",label:"字段名","min-width":"80"}}),t._v(" "),a("el-table-column",{attrs:{prop:"COLUMN_TYPE",label:"数据类型","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{prop:"COLUMN_DEFAULT",label:"默认值","min-width":"130"}}),t._v(" "),a("el-table-column",{attrs:{prop:"IS_NULLABLE",label:"允许非空","min-width":"130"}}),t._v(" "),a("el-table-column",{attrs:{prop:"EXTRA",label:"自动递增","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"COLUMN_COMMENT",label:"备注","min-width":"120"}})],1)],1)],1)},i=[],s=a("c80c"),r=(a("96cf"),a("3b8d")),l=(a("7f7f"),a("f955")),o=a("bbcc"),c=a("5f87"),u={name:"DataBackup",data:function(){return{tableData:{data:[]},databaseData:{data:[]},listLoading:!1,listLoading1:!1,selectionList:[],dataList:{},dialogVisible:!1,tabList:[],rows:{}}},mounted:function(){this.getList(),this.getListDatabase()},methods:{exportData:function(){var t=this,e=this.formValidate,a={is_show:e.is_show,store_name:e.store_name};storeCombinationApi(a).then((function(t){location.href=t.data[0]})).catch((function(e){t.$message.error(e.message)}))},download:function(t){window.open(o["a"].https+"/safety/database/download/".concat(t,"?token=")+Object(c["a"])())},handleClose:function(){this.dialogVisible=!1},handleSelectionChange:function(t){this.selectionList=t;var e=[];this.selectionList.map((function(t){e.push(t.name)})),this.dataList={name:e}},Info:function(t){var e=this;this.rows=t,this.dialogVisible=!0,this.listLoading=!0,Object(l["h"])(t.name).then(function(){var t=Object(r["a"])(Object(s["a"])().mark((function t(a){return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.tabList=a.data,e.listLoading=!1;case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.listLoading=!1,e.$message.error(t.message)}))},getBackup:function(){var t=this;if(0===this.selectionList.length)return this.$message.warning("请选择表");this.$modalSure("是否备份数据库表").then((function(){Object(l["d"])(t.dataList).then(function(){var e=Object(r["a"])(Object(s["a"])().mark((function e(a){return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$message.success(a.message);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$message.error(e.message)}))}))},getOptimize:function(){var t=this;if(0===this.selectionList.length)return this.$message.warning("请选择表");this.$modalSure("是否优化数据库表").then((function(){Object(l["l"])(t.dataList).then(function(){var e=Object(r["a"])(Object(s["a"])().mark((function e(a){return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$message.success(a.message);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.message)}))}))},getRepair:function(){var t=this;if(0===this.selectionList.length)return this.$message.warning("请选择表");this.$modalSure("是否修复数据库表").then((function(){Object(l["m"])(t.dataList).then(function(){var e=Object(r["a"])(Object(s["a"])().mark((function e(a){return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$message.success(a.message);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.message)}))}))},getList:function(){var t=this;this.listLoading1=!0,Object(l["i"])().then((function(e){t.tableData.data=e.data,t.listLoading1=!1})).catch((function(e){t.listLoading1=!1,t.$message.error(e.message)}))},getListDatabase:function(){var t=this;this.listLoading=!0,Object(l["g"])().then((function(e){t.databaseData.data=e.data,t.listLoading=!1})).catch((function(e){t.listLoading=!1,t.$message.error(e.message)}))},handleDelete:function(t,e){var a=this;this.$modalSure().then((function(){Object(l["j"])({feilname:t}).then((function(t){var e=t.message;a.$message.success(e),a.getList()})).catch((function(t){var e=t.message;a.$message.error(e)}))}))}}},d=u,h=a("2877"),m=Object(h["a"])(d,n,i,!1,null,"b2263bb6",null);e["default"]=m.exports},f955:function(t,e,a){"use strict";a.d(e,"i",(function(){return i})),a.d(e,"j",(function(){return s})),a.d(e,"g",(function(){return r})),a.d(e,"d",(function(){return l})),a.d(e,"m",(function(){return o})),a.d(e,"l",(function(){return c})),a.d(e,"h",(function(){return u})),a.d(e,"c",(function(){return d})),a.d(e,"k",(function(){return h})),a.d(e,"b",(function(){return m})),a.d(e,"e",(function(){return b})),a.d(e,"a",(function(){return f})),a.d(e,"f",(function(){return p})),a.d(e,"n",(function(){return g}));var n=a("0c6d");function i(){return n["a"].get("safety/database/fileList")}function s(t){return n["a"].delete("safety/database/delete",t)}function r(){return n["a"].get("safety/database/lst")}function l(t){return n["a"].post("safety/database/backups",t)}function o(t){return n["a"].post("safety/database/repair",t)}function c(t){return n["a"].post("safety/database/optimize",t)}function u(t){return n["a"].get("safety/database/detail/".concat(t))}function d(){return n["a"].get("auth")}function h(){return n["a"].get("copyright/auth")}function m(t){return n["a"].post("auth_apply",t)}function b(){return n["a"].get("check_auth")}function f(){return n["a"].get("pay/auth")}function p(t){return n["a"].post("clear/cache",t)}function g(t){return n["a"].post("copyright/save",t)}}}]); |