webpackJsonp([18],{lPJ6:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=a("mvHQ"),o=a.n(l),i=a("bOdI"),n=a.n(i),r=(a("D/fc"),{data:function(){var e;return e={dbNames:[],timeout:null,itemOptions:["commnon","outer"],userOptions:[],detailForm:{envCheckList:[]},editForm:{},input:"",sqlList:[],addForm:{dbName:"",operatorTime:"",operatorPerson:"",sqlStatement:"",syncEnv:"",envCheckList:[]},operatorPerson:JSON.parse(localStorage.getItem("userInfo")).nick,dialogVisible:!1,detailDialogVisible:!1,queryInfo:{dbName:"",tableName:"",operatorPerson:"",pageNum:1,pageSize:10},currpage:1,itemList:[],total:0,envOptions:[]},n()(e,"timeout",null),n()(e,"addFormRules",{dbName:[{required:!0,message:"请输入数据库名称",trigger:"blur"}],sqlStatement:[{required:!0,message:"请输入sql语句",trigger:"blur"}],envCheckList:[{type:"array",required:!0,message:"请至少选择一个环境",trigger:"change"}]}),e},mounted:function(){this.getAllUserInfo(),this.queryAllDbName()},created:function(){this.queryAllSqlData()},methods:{handleSizeChange:function(e){this.queryInfo.pageSize=e,this.queryAllSqlData()},handleCurrentChange:function(e){this.queryInfo.pageNum=e,this.queryAllSqlData()},getAllUserInfo:function(){var e=this;this.$api.user.queryAllUserInfo().then(function(t){e.userOptions=t.data.data}).catch(function(){})},queryAllDbName:function(){var e=this,t=[];this.$api.sql.queryAllDbName().then(function(a){for(var l in e.envOptions=a.data.data,e.envOptions)t.push({id:e.envOptions[l].id,dbName:e.envOptions[l].dbName});e.dbNames=t,console.log(e.dbNames)}).catch(function(){return e.loading=!1,dbNames})},queryAllSqlData:function(){var e=this;this.$api.sql.queryAllSqlData(o()(this.queryInfo)).then(function(t){e.loading=!1,e.sqlList=t.data.data,e.total=t.data.count,console.log(t.data)}).catch(function(){e.loading=!1})},insertSqlConfigHistoryInfo:function(){var e=this;this.$refs.addFormRef.validate(function(t){if(t){if(e.addForm.operatorTime=e.$common.getCurrentDateTime(),e.addForm.operatorPerson=e.operatorPerson,e.addForm.envCheckList){for(var a="",l=0;l