2 lines
13 KiB
JavaScript
2 lines
13 KiB
JavaScript
|
webpackJsonp([22],{uizM:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r("mvHQ"),i=r.n(a),l={data:function(){return{serverOptions:[],loading:!1,queryInfo:{serverName:"",pageNum:1,pageSize:10},serverlist:[],currpage:1,total:0,del:[],addDialogVisible:!1,editDialogVisible:!1,detailDialogVisible:!1,addForm:{serverName:"",ip:"",port:"",deployApplication:"",userName:"",password:"",remarks:""},fileIsChange:!1,editForm:{},detailForm:{},addFormRules:{serverName:[{required:!0,message:"请输入服务器名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 200 个字符",trigger:"blur"}],ip:[{required:!0,message:"请输入服务器ip地址",trigger:"blur"},{min:1,max:100,message:"长度在 1 到 100 个字符",trigger:"blur"}],port:[{required:!1,message:"请输入应用端口",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个数字",trigger:"blur"}],userName:[{required:!0,message:"请输入用户名",trigger:"blur"},{min:1,max:100,message:"长度在 1 到 100 个字符",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:1,max:50,message:"长度在 1 到 50 个字符",trigger:"blur"}],remarks:[{required:!1,message:"请输入备注信息",trigger:"blur"},{min:1,max:200,message:"长度在 1 到 200 个字符",trigger:"blur"}]}}},mounted:function(){this.getServerIpList()},created:function(){this.getServerList()},methods:{getServerIpList:function(){var e=this;this.$api.server.queryAllServerIp(this.queryInfo.ip).then(function(t){e.loading=!1,e.serverOptions=t.data.data}).catch(function(){e.loading=!1})},getServerList:function(){var e=this;this.loading=!0,this.$api.server.queryAllServer(i()(this.queryInfo)).then(function(t){e.loading=!1,e.serverlist=t.data.data.list,e.total=t.data.data.total,e.currpage=t.data.data.pageNum}).catch(function(t){e.loading=!1}),this.currpage=1},editDialogClose:function(){this.$refs.addFormRef.resetFields()},addDialogClose:function(){this.$refs.addFormRef.resetFields()},addServer:function(){var e=this;this.$refs.addFormRef.validate(function(t){t&&e.$api.server.addServer(i()(e.addForm)).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.addDialogVisible=!1,e.getServerList(),e.getServerIpList()}).catch(function(){e.loading=!0})})},query:function(){this.queryInfo.pageNum=1,this.getServerList(),this.getServerIpList()},delServer:function(e){var t=this;this.$confirm("确定删除该服务器吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$api.server.delserver(e).then(function(e){t.$notify({message:e.data.msg,type:"success"}),t.getServerList(),t.getServerIpList()}).catch(function(){}).catch(function(){}),t.loading=!1})},handleSizeChange:function(e){this.queryInfo.pageSize=e,this.getServerList()},handleCurrentChange:function(e){this.queryInfo.pageNum=e,this.getServerList()},showEditDialog:function(e){var t=this;this.editDialogVisible=!0,this.$api.server.queryServerById(e).then(function(e){t.editForm=e.data.data}).catch(function(){})},editServer:function(){var e=this;this.$refs.editFormRef.validate(function(t){t&&e.$api.server.updateServer(i()(e.editForm)).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.editDialogVisible=!1,e.getServerList(),e.getServerIpList()}).catch(function(){e.loading=!1})})},showDetailDialog:function(e){var t=this;this.detailDialogVisible=!0,this.$api.server.queryServerById(e).then(function(e){t.loading=!1,t.editForm=e.data.data}).catch(function(){}),this.loading=!1}}},o={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"server-box"},[r("el-form",{staticClass:"item-form-inline",attrs:{inline:!0}},[r("el-form-item",{attrs:{label:"服务器名称"}},[r("el-input",{attrs:{placeholder:"请输入服务器名称",clearable:""},model:{value:e.queryInfo.serverName,callback:function(t){e.$set(e.queryInfo,"serverName",t)},expression:"queryInfo.serverName"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"服务器IP"}},[r("el-select",{attrs:{placeholder:"请选择",clearable:""},model:
|
||
|
//# sourceMappingURL=22.5b97804d905a7be3d35d.js.map
|