...
|
...
|
@@ -14,15 +14,14 @@ |
|
|
placeholder="服务器名称" clearable></el-input>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
<el-input v-model="user_queryInfo.virtualHostName" prefix-icon="el-icon-search"
|
|
|
size="medium"
|
|
|
<el-input v-model="user_queryInfo.virtualHostName" prefix-icon="el-icon-search" size="medium"
|
|
|
placeholder="虚拟主机名称" clearable></el-input>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-button type="success" style="width:150px" size="medium" @click="user_getList">
|
|
|
查询用户信息
|
|
|
</el-button>
|
|
|
<el-button type="primary" style="width:150px" size="medium" @click="user_toAddDialog">
|
|
|
<el-button type="primary" style="width:150px" :loading="user_loading.listLoading" size="medium" @click="user_toAddDialog">
|
|
|
添加用户信息
|
|
|
</el-button>
|
|
|
</el-col>
|
...
|
...
|
@@ -35,10 +34,12 @@ |
|
|
element-loading-text="获取用户信息列表,拼命加载中">
|
|
|
<el-table-column type="selection" width="55" align="center"></el-table-column>
|
|
|
<el-table-column type="index" align="center"></el-table-column>
|
|
|
<el-table-column label="用户名称" prop="username" align="center" width="190"></el-table-column>
|
|
|
<el-table-column label="服务器名称" prop="serverName" align="center" width="190"></el-table-column>
|
|
|
<el-table-column label="用户名称" prop="username" align="center" width="170"></el-table-column>
|
|
|
<el-table-column label="真实姓名" prop="realName" align="center" width="170"></el-table-column>
|
|
|
<el-table-column label="服务器名称" prop="serverName" align="center" width="180"></el-table-column>
|
|
|
<el-table-column label="虚拟主机名称" prop="virtualHostName" align="center" width="300"></el-table-column>
|
|
|
<el-table-column label="操作" width="340px" align="center">
|
|
|
<el-table-column label="操作" width="340px" align="center" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<!-- 删除用户 -->
|
|
|
<el-tooltip effect="dark" content="删除用户" placement="top-start" :enterable="false">
|
|
|
<el-button type="danger" icon="el-icon-delete" size="small"
|
...
|
...
|
@@ -47,11 +48,11 @@ |
|
|
</el-button>
|
|
|
</el-tooltip>
|
|
|
<!-- 编辑关系 -->
|
|
|
<el-tooltip effect="dark" content="编辑关系" placement="top-start" :enterable="false">
|
|
|
<el-button type="primary" icon="el-icon-edit" size="small"
|
|
|
@click="user_toEditDialog(scope.$index,scope.row)">编辑关系
|
|
|
</el-button>
|
|
|
</el-tooltip>
|
|
|
<!-- <el-tooltip effect="dark" content="编辑关系" placement="top-start" :enterable="false">-->
|
|
|
<!-- <el-button type="primary" icon="el-icon-edit" size="small"-->
|
|
|
<!-- @click="user_toEditDialog(scope.$index,scope.row)">编辑关系-->
|
|
|
<!-- </el-button>-->
|
|
|
<!-- </el-tooltip>-->
|
|
|
<!-- 删除关系 -->
|
|
|
<el-tooltip effect="dark" content="删除关系" placement="top-start" :enterable="false">
|
|
|
<el-button type="danger" icon="el-icon-edit" size="small"
|
...
|
...
|
@@ -59,18 +60,23 @@ |
|
|
</el-button>
|
|
|
</el-tooltip>
|
|
|
<!-- 修改密码 -->
|
|
|
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<!-- 分页区域 -->
|
|
|
<div style="margin-top: 10px">
|
|
|
<el-row :gutter="24">
|
|
|
<el-col :span="5">
|
|
|
<el-col :span="8">
|
|
|
<el-button type="danger" icon="el-icon-delete"
|
|
|
:loading="user_loading.batchDelLoading"
|
|
|
:disabled="this.user_page.selectList.length===0"
|
|
|
@click="user_batchRemove">批量删除
|
|
|
@click="user_batchRemove">批量删除用户
|
|
|
</el-button>
|
|
|
<el-button type="danger" icon="el-icon-delete"
|
|
|
:loading="user_loading.batchDelLoading"
|
|
|
:disabled="this.user_page.selectList.length===0"
|
|
|
@click="user_batchRemoveRelation">批量删除用户关系
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="10" style="margin-top: 5px">
|
...
|
...
|
@@ -92,25 +98,33 @@ |
|
|
<div>
|
|
|
<el-dialog title="添加MQ用户信息"
|
|
|
:visible.sync="user_dialog.addDialog"
|
|
|
v-loading="user_loading.addLoading" element-loading-text="正在添加MQ用户,拼命加载中"
|
|
|
style="margin-top: -20px"
|
|
|
width="50%" text-align="center" @close="user_addDialogClosed">
|
|
|
<el-form :inline="true" label-width="145px" status-icon style="margin-top: -10px"
|
|
|
:model="user_addForm" :rules="user_addFormRules" ref="user_addFormRef" align="center">
|
|
|
<el-form-item label="用户名称:" prop="exchangeName">
|
|
|
<el-form-item label="用户名称:" prop="username">
|
|
|
<el-input v-model="user_addForm.username" style="width:270px" size="small" clearable
|
|
|
placeholder="请输入用户名称">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="用户密码:" prop="firstPassword">
|
|
|
<el-input type="password" v-model="user_addForm.firstPassword" style="width:270px"
|
|
|
size="small" clearable show-password placeholder="请输入用户密码"></el-input>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="重新输入密码:" prop="password">
|
|
|
<el-input type="password" v-model="user_addForm.password" style="width:270px"
|
|
|
size="small" clearable show-password placeholder="请重新输入密码"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="真实姓名:" prop="realName">
|
|
|
<el-input v-model="user_addForm.realName" style="width:270px" size="small" clearable
|
|
|
placeholder="请输入真实姓名">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
<br/>
|
|
|
<el-form-item label="选择关系:">
|
|
|
<el-form-item label="选择用户关系:">
|
|
|
<br/>
|
|
|
<el-tree style="width:270px"
|
|
|
:data="user_config.tree.server_hostList"
|
...
|
...
|
@@ -131,26 +145,113 @@ |
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
|
|
|
<!-- 编辑,对话框区域 -->
|
|
|
<div>
|
|
|
<el-dialog title="编辑MQ用户关系"
|
|
|
:visible.sync="user_dialog.editDialog"
|
|
|
style="margin-top: -20px"
|
|
|
width="50%" text-align="center" @close="user_editDialogClosed">
|
|
|
<el-form :inline="true" label-width="145px" status-icon style="margin-top: -10px"
|
|
|
:model="user_editForm" :rules="user_editFormRules" ref="user_editFormRef" align="center">
|
|
|
<el-form-item label="用户名称:" prop="username">
|
|
|
<el-input v-model="user_editForm.username" style="width:300px" size="small" clearable readonly
|
|
|
placeholder="请输入用户名称"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="服务器名称:" prop="serverName">
|
|
|
<el-input v-model="user_editForm.serverName" style="width:300px" size="small" clearable readonly
|
|
|
placeholder="请输入服务器名称"></el-input>
|
|
|
</el-form-item>
|
|
|
<br/>
|
|
|
<el-form-item label="现有用户关系:" prop="virtualHostIds">
|
|
|
<el-select v-model="user_editForm.virtualHostIds" prefix-icon="el-icon-search" clearable
|
|
|
style="width:300px" size="small" filterable multiple disabled
|
|
|
@change="user_editChange"
|
|
|
placeholder="选择用户关系">
|
|
|
<el-option
|
|
|
v-for="item in (user_config.virtualHostList)"
|
|
|
:key="item.id"
|
|
|
:label="item.virtualHostName"
|
|
|
:value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<br/>
|
|
|
<el-form-item label="选择用户关系:" prop="virtualHostId">
|
|
|
<el-select v-model="user_editForm.virtualHostId" prefix-icon="el-icon-search" clearable
|
|
|
style="width:300px" size="small" filterable multiple
|
|
|
@change="user_editChange"
|
|
|
placeholder="选择用户关系">
|
|
|
<el-option
|
|
|
v-for="item in (user_config.virtualHostList)"
|
|
|
:key="item.id"
|
|
|
:label="item.virtualHostName"
|
|
|
:value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
<br/>
|
|
|
<el-form-item label="选择用户关系:">
|
|
|
<br/>
|
|
|
<el-tree style="width:270px"
|
|
|
@check-change="user_editTreeChange"
|
|
|
:data="user_config.tree.edit_serverHostList"
|
|
|
:props="user_config.tree.defaultParams"
|
|
|
ref="tree_edit"
|
|
|
node-key="id"
|
|
|
:default-checked-keys='user_editForm.aliasName'
|
|
|
show-checkbox highlight-current default-expand-all>
|
|
|
</el-tree>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer" style="text-align: center;margin-top: -20px">
|
|
|
<el-button type="info" @click="user_dialog.editDialog = false" size="medium"
|
|
|
style="width: 100px">取消
|
|
|
</el-button>
|
|
|
<el-button type="primary" @click="user_edit" :loading="user_loading.editLoading"
|
|
|
size="medium" style="width: 100px">编辑关系
|
|
|
</el-button>
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</el-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
getServerAndHostList,
|
|
|
selectUserInfoList
|
|
|
selectUserInfoList,
|
|
|
insertUserInfo,
|
|
|
deleteUserInfo,
|
|
|
deleteUserRelation,
|
|
|
getHostList,
|
|
|
batchDeleteUser,
|
|
|
batchDeleteUserRelation
|
|
|
} from "../../api/message_bus";
|
|
|
|
|
|
export default {
|
|
|
name: "UserInfo",
|
|
|
data() {
|
|
|
const validatePassword = (rule, value, callback) => {
|
|
|
if (value === '') {
|
|
|
callback(new Error('请重新输入密码'));
|
|
|
} else if (value !== this.user_addForm.firstPassword) {
|
|
|
callback(new Error('两次输入密码不一致!'));
|
|
|
} else {
|
|
|
callback();
|
|
|
}
|
|
|
};
|
|
|
return {
|
|
|
|
|
|
/**
|
|
|
* user,配置与参数
|
|
|
*/
|
|
|
user_config: {
|
|
|
virtualHostList: [],
|
|
|
tree: {
|
|
|
treeList: [],
|
|
|
edit_serverHostList: [],
|
|
|
// 服务器及虚拟主机列表
|
|
|
server_hostList: [],
|
|
|
defaultParams: {
|
...
|
...
|
@@ -191,7 +292,13 @@ |
|
|
/**
|
|
|
* user,新增表单
|
|
|
*/
|
|
|
user_addForm: {},
|
|
|
user_addForm: {
|
|
|
username: '',
|
|
|
realName: '',
|
|
|
firstPassword: '',
|
|
|
password: '',
|
|
|
virtualHostId: '',
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* user,编辑表单
|
...
|
...
|
@@ -211,7 +318,21 @@ |
|
|
/**
|
|
|
* user,添加表单,验证规则
|
|
|
*/
|
|
|
user_addFormRules: {},
|
|
|
user_addFormRules: {
|
|
|
realName: [
|
|
|
{required: true, message: '请输入真实姓名', trigger: ['blur', 'change']},
|
|
|
],
|
|
|
username: [
|
|
|
{required: true, message: '请输入用户名称', trigger: ['blur', 'change']},
|
|
|
],
|
|
|
firstPassword: [
|
|
|
{required: true, message: '请输入用户密码', trigger: ['blur', 'change']},
|
|
|
],
|
|
|
password: [
|
|
|
{required: true, message: '请再次输入密码', trigger: ['blur', 'change']},
|
|
|
{validator: validatePassword, trigger: ['blur', 'change']}
|
|
|
],
|
|
|
},
|
|
|
/**
|
|
|
* user,编辑表单,验证规则
|
|
|
*/
|
...
|
...
|
@@ -281,7 +402,7 @@ |
|
|
* user,添加对话框,打开事件
|
|
|
*/
|
|
|
user_toAddDialog() {
|
|
|
this.selectServerAndHostList();
|
|
|
// this.selectServerAndHostList();
|
|
|
this.user_dialog.addDialog = true;
|
|
|
},
|
|
|
/**
|
...
|
...
|
@@ -296,15 +417,67 @@ |
|
|
* user,添加功能
|
|
|
*/
|
|
|
user_add() {
|
|
|
console.log(this.$refs.tree.getCheckedKeys());
|
|
|
this.user_addForm.virtualHostId = this.$refs.tree.getCheckedKeys().join();
|
|
|
if (this.user_addForm.virtualHostId === '') {
|
|
|
return this.$confirm('用户关系不能为空,请务必选择用户关系', '警告', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}
|
|
|
)
|
|
|
}
|
|
|
this.$refs.user_addFormRef.validate(valid => {
|
|
|
// 未通过,表单预校验
|
|
|
if (!valid) return;
|
|
|
this.user_loading.addLoading = true;
|
|
|
insertUserInfo(this.user_addForm).then((response) => {
|
|
|
let res = response.data;
|
|
|
// 添加失败
|
|
|
if (res.code !== '200') {
|
|
|
if (res.code === '201') {
|
|
|
this.user_loading.addLoading = false;
|
|
|
return this.$confirm(res.msg, '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}
|
|
|
)
|
|
|
}
|
|
|
// 关闭加载
|
|
|
this.user_loading.addLoading = false;
|
|
|
this.$message.error(res.msg);
|
|
|
}
|
|
|
// 添加,成功
|
|
|
this.$message.success(res.msg);
|
|
|
// 关闭加载
|
|
|
this.user_loading.addLoading = false;
|
|
|
// 隐藏对话框
|
|
|
this.user_dialog.addDialog = false;
|
|
|
// 刷新列表
|
|
|
this.user_getList();
|
|
|
}).catch(error => {
|
|
|
this.user_loading.addLoading = false;
|
|
|
this.$message.error(error.toString());
|
|
|
});
|
|
|
})
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* user,编辑对话框,打开事件
|
|
|
*/
|
|
|
user_toEditDialog(index, row) {
|
|
|
this.user_dialog.editDialog = true;
|
|
|
this.selectHostList(row.serverId);
|
|
|
this.selectEditServerAndHostList(row.serverName)
|
|
|
this.user_editForm = Object.assign({}, row);
|
|
|
|
|
|
this.user_editForm.virtualHostIds = [];
|
|
|
if (this.user_editForm.virtualHostId.indexOf(",") === -1) {
|
|
|
// 队列id中不包含","
|
|
|
this.user_editForm.virtualHostIds[0] = this.user_editForm.virtualHostId;
|
|
|
} else {
|
|
|
this.user_editForm.virtualHostIds = this.user_editForm.virtualHostId.split(",")
|
|
|
}
|
|
|
this.user_dialog.editDialog = true;
|
|
|
},
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -316,24 +489,93 @@ |
|
|
},
|
|
|
|
|
|
/**
|
|
|
* user,编辑对话框,改变
|
|
|
*/
|
|
|
user_editChange(value) {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* user,编辑对话框中的tree组件,改变
|
|
|
*/
|
|
|
user_editTreeChange(value) {
|
|
|
this.user_editForm.virtualHostId = this.$refs.tree_edit.getCheckedKeys().join();
|
|
|
console.log(this.user_editForm.virtualHostId)
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* user,编辑功能
|
|
|
*/
|
|
|
user_edit() {
|
|
|
|
|
|
this.user_addForm.virtualHostId = this.$refs.tree.getCheckedKeys().join();
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* user,删除功能
|
|
|
*/
|
|
|
user_remove(index, row) {
|
|
|
|
|
|
// 弹框询问是否删除?
|
|
|
this.$confirm('此操作永久删除该用户信息, 是否继续?', '警告', {
|
|
|
confirmButtonText: '确定删除',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}
|
|
|
).then(() => {
|
|
|
// 开启加载
|
|
|
this.user_loading.delLoading = true;
|
|
|
deleteUserInfo(row).then((response) => {
|
|
|
let res = response.data;
|
|
|
if (res.code !== '200') {
|
|
|
// 关闭加载
|
|
|
this.user_loading.delLoading = false;
|
|
|
return this.$message.error(res.msg);
|
|
|
}
|
|
|
// 关闭加载
|
|
|
this.user_loading.delLoading = false;
|
|
|
this.$message.success(res.msg);
|
|
|
// 刷新列表
|
|
|
this.user_getList();
|
|
|
}).catch(error => {
|
|
|
// 关闭加载
|
|
|
this.user_loading.delLoading = false;
|
|
|
this.$message.error(error.toString());
|
|
|
});
|
|
|
}).catch(() => {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* user,删除用户关系
|
|
|
*/
|
|
|
user_removeRelation(index, row) {
|
|
|
|
|
|
// 弹框询问是否删除?
|
|
|
this.$confirm('此操作永久删除该用户信息, 是否继续?', '警告', {
|
|
|
confirmButtonText: '确定删除',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}
|
|
|
).then(() => {
|
|
|
// 开启加载
|
|
|
this.user_loading.delLoading = true;
|
|
|
deleteUserRelation(row).then((response) => {
|
|
|
let res = response.data;
|
|
|
if (res.code !== '200') {
|
|
|
// 关闭加载
|
|
|
this.user_loading.delLoading = false;
|
|
|
return this.$message.error(res.msg);
|
|
|
}
|
|
|
// 关闭加载
|
|
|
this.user_loading.delLoading = false;
|
|
|
this.$message.success(res.msg);
|
|
|
// 刷新列表
|
|
|
this.user_getList();
|
|
|
}).catch(error => {
|
|
|
// 关闭加载
|
|
|
this.user_loading.delLoading = false;
|
|
|
this.$message.error(error.toString());
|
|
|
});
|
|
|
}).catch(() => {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -344,15 +586,94 @@ |
|
|
},
|
|
|
|
|
|
/**
|
|
|
* user,批量删除功能
|
|
|
* user,批量删除用户
|
|
|
*/
|
|
|
user_batchRemove() {
|
|
|
const usernames = this.user_page.selectList.map(item => item.username).toString().split(",");
|
|
|
const serverNames = this.user_page.selectList.map(item => item.serverName).toString().split(",");
|
|
|
const params = [];
|
|
|
if (usernames.length === serverNames.length) {
|
|
|
for (let i = 0; i < usernames.length; i++) {
|
|
|
let param = {
|
|
|
username: usernames[i],
|
|
|
serverName: serverNames[i],
|
|
|
}
|
|
|
console.log(param)
|
|
|
params.push(param)
|
|
|
}
|
|
|
} else {
|
|
|
return this.$message.error("批量删除用户失败,请仔细检查");
|
|
|
}
|
|
|
console.log(params)
|
|
|
this.$confirm('此操作永久删除该用户, 是否继续?', '警告', {
|
|
|
confirmButtonText: '确定删除',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}
|
|
|
).then(() => {
|
|
|
// 开启加载
|
|
|
this.user_loading.listLoading = true;
|
|
|
batchDeleteUser(params).then((response) => {
|
|
|
let res = response.data;
|
|
|
if (res.code !== '200') {
|
|
|
// 关闭加载
|
|
|
this.user_loading.listLoading = false;
|
|
|
return this.$message.error(res.msg);
|
|
|
}
|
|
|
// 关闭加载
|
|
|
this.user_loading.listLoading = false;
|
|
|
this.$message.success(res.msg);
|
|
|
// 刷新列表
|
|
|
this.user_getList();
|
|
|
}).catch(error => {
|
|
|
// 关闭加载
|
|
|
this.user_loading.listLoading = false;
|
|
|
this.$message.error(error.toString());
|
|
|
});
|
|
|
}).catch(() => {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* user,批量删除用户关系功能
|
|
|
*/
|
|
|
user_batchRemoveRelation() {
|
|
|
const ids = this.user_page.selectList.map(item => item.id).toString();
|
|
|
console.log(ids)
|
|
|
const param = {
|
|
|
id: ids,
|
|
|
}
|
|
|
this.$confirm('此操作永久删除该用户关系, 是否继续?', '警告', {
|
|
|
confirmButtonText: '确定删除',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}
|
|
|
).then(() => {
|
|
|
// 开启加载
|
|
|
this.user_loading.listLoading = true;
|
|
|
batchDeleteUserRelation(param).then((response) => {
|
|
|
let res = response.data;
|
|
|
if (res.code !== '200') {
|
|
|
// 关闭加载
|
|
|
this.user_loading.listLoading = false;
|
|
|
return this.$message.error(res.msg);
|
|
|
}
|
|
|
// 关闭加载
|
|
|
this.user_loading.listLoading = false;
|
|
|
this.$message.success(res.msg);
|
|
|
// 刷新列表
|
|
|
this.user_getList();
|
|
|
}).catch(error => {
|
|
|
// 关闭加载
|
|
|
this.user_loading.listLoading = false;
|
|
|
this.$message.error(error.toString());
|
|
|
});
|
|
|
}).catch(() => {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 服务器与虚拟主机 1:n
|
|
|
* 获取列表
|
|
|
* MQ服务器与虚拟主机(1:n)的列表
|
|
|
*/
|
|
|
selectServerAndHostList() {
|
|
|
getServerAndHostList().then((response) => {
|
...
|
...
|
@@ -366,10 +687,44 @@ |
|
|
this.$message.error(error.toString());
|
|
|
});
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 编辑列表的MQ服务器与虚拟主机(1:n)的列表
|
|
|
*/
|
|
|
selectEditServerAndHostList(serverName) {
|
|
|
const param = {serverName: serverName};
|
|
|
getServerAndHostList(param).then((response) => {
|
|
|
let res = response.data;
|
|
|
if (res.code !== '200') {
|
|
|
return this.$message.error('获取服务器与虚拟主机信息,失败!');
|
|
|
}
|
|
|
// 获取列表数据
|
|
|
this.user_config.tree.edit_serverHostList = res.data;
|
|
|
}).catch(error => {
|
|
|
this.$message.error(error.toString());
|
|
|
});
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 获取虚拟主机列表
|
|
|
*/
|
|
|
selectHostList(serverId) {
|
|
|
let params = {serverId: serverId};
|
|
|
getHostList(params).then((response) => {
|
|
|
let res = response.data;
|
|
|
if (res.code !== '200') {
|
|
|
return this.$message.error('获取虚拟主机列表,失败!');
|
|
|
}
|
|
|
this.user_config.virtualHostList = res.data;
|
|
|
}).catch(error => {
|
|
|
this.$message.error(error.toString());
|
|
|
});
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.selectServerAndHostList();
|
|
|
},
|
|
|
computed: {},
|
|
|
}
|
...
|
...
|
|