在服务器管理列表中新增“负责人”列;为列表增加服务器设备分配负责人的功能
1、在服务器管理列表中新增“负责人”列 2、为列表增加服务器设备分配负责人的功能 3、调整列表上方按钮宽度,保证多按钮横向排列,避免换行显示
This commit is contained in:
@@ -807,6 +807,22 @@ export function bindSwitch(query) {
|
||||
data: query
|
||||
})
|
||||
}
|
||||
// 用户下拉
|
||||
export function staffAllUserList(query) {
|
||||
return request({
|
||||
url: '/system/user/getAllUserList',
|
||||
method: 'post',
|
||||
data: query
|
||||
})
|
||||
}
|
||||
// 用户下拉
|
||||
export function staffBindOwner(query) {
|
||||
return request({
|
||||
url: '/system/registration/bindOwner',
|
||||
method: 'post',
|
||||
data: query
|
||||
})
|
||||
}
|
||||
|
||||
// 内存详细信息
|
||||
export function initialMemoryDetails(query) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<template v-if="config && config.tableButton && config.tableButton.top">
|
||||
<el-col :span="1.5" v-for="item of config.tableButton.top">
|
||||
<!-- <el-button :type="item.type" plain size="mini" :icon="item.icon" @click="handleClick(item,{})" :hasPermi="[item.hasPermi]">{{item.content}}</el-button>-->
|
||||
<el-button style="padding: 7px 12px;" :ref="`${item.content}`" :type="item.type" plain size="mini" :icon="item.icon" @click="handleClick(item,{})" v-if="checkPermi([item.hasPermi])">{{item.content}}</el-button>
|
||||
<el-button style="padding: 7px 6px;" :ref="`${item.content}`" :type="item.type" plain size="mini" :icon="item.icon" @click="handleClick(item,{})" v-if="checkPermi([item.hasPermi])">{{item.content}}</el-button>
|
||||
</el-col>
|
||||
</template>
|
||||
<right-toolbar v-if="!(config && config.colTopHiddenIcon)" :modelIdent="this.modelIdent" :showSearch.sync="showSearch" @queryTable="renderList" @columnsChange="columnsChange" :columns="columns"></right-toolbar>
|
||||
|
||||
@@ -243,6 +243,14 @@
|
||||
<el-button @click="batchGroupOpen = false">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 分配人员弹窗 -->
|
||||
<el-dialog title="分配负责人" :visible.sync="assignStaffOpen" append-to-body width="900px">
|
||||
<Form ref="assignStaffFormRef" :formList="assignStaffForm" :ruleFormData="assignStaffRuleForm" :config="{labelWidth: '160px', buttonGroup: []}" @fnClick="callback"></Form>
|
||||
<div style="text-align: right;margin-right: 20px;margin-bottom: 20px;">
|
||||
<el-button type="primary" style="margin-left: 10px;" @click="submitAssignStaff">提交</el-button>
|
||||
<el-button @click="assignStaffOpen = false">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -250,7 +258,8 @@
|
||||
<script setup name="Register">
|
||||
import Form from '@/components/form/index.vue';
|
||||
import {listHandle, networkList, getScriptResultBySn, getLogicalNode, addRemark, updateRemark, repBandwidthSubmit, bindBusPublic, getAlarmFlag, bindSwitch,
|
||||
virNetInterfaceChild, removeAlarmFlag, frpConnectLink, listFrpcConfig, removeServer, getLossList, agentIsNew, updateAgentManage, listAllSwitchName} from '@/api/disRevenue/resource';
|
||||
virNetInterfaceChild, removeAlarmFlag, frpConnectLink, listFrpcConfig, removeServer, getLossList, agentIsNew, updateAgentManage, listAllSwitchName,
|
||||
staffAllUserList, staffBindOwner} from '@/api/disRevenue/resource';
|
||||
import {listAllBusinessList} from "@/api/disRevenue/earnManage"
|
||||
import TableList from '@/components/table/index.vue';
|
||||
import MonitorStrategy from '../serverMonitorStrat/monitorStrategy';
|
||||
@@ -326,6 +335,7 @@
|
||||
mgmtGateway: { label: `管理网-网关`, minWidth: '90'},
|
||||
mgmtIpv6Address: { label: `管理网-IPv6全球单播地址`, minWidth: '160'},
|
||||
remark: { label: `标签`, minWidth: '150', slotName: 'tempRemark'},
|
||||
owner: { label: `负责人`, minWidth: '80'},
|
||||
heartbeatInterval: { label: `心跳时间间隔`, minWidth: '90'},
|
||||
heartbeatCount: { label: `心跳次数`, minWidth: '60'},
|
||||
registrationStatus: { label: `注册状态`, slotName: 'tempStatus', minWidth: '60', visible: true},
|
||||
@@ -351,6 +361,7 @@
|
||||
{content: '批量更新agent', fnCode: 'updateAgent', type: 'primary', icon: 'el-icon-refresh-right', hasPermi: 'resource:serverRegister:updateAgent'},
|
||||
{content: '批量复制', fnCode: 'copyList', type: 'primary', icon: 'el-icon-copy-document', hasPermi: 'resource:serverRegister:copyList'},
|
||||
{content: '批量分组', fnCode: 'batchGroup', type: 'primary', icon: 'el-icon-coin', hasPermi: 'resource:serverRegister:batchGroup'},
|
||||
{content: '分配负责人', fnCode: 'assignStaff', type: 'primary', icon: 'el-icon-s-custom', hasPermi: 'resource:serverRegister:assignStaff'},
|
||||
],
|
||||
line: [
|
||||
{content: '选择业务IP', fnCode: 'pubilcNet', type: 'primary', icon: 'el-icon-thumb', showName: 'multiPublicIpStatus', showVal: '0', hasPermi: 'resource:serverRegister:pubilcNet'},
|
||||
@@ -433,7 +444,18 @@
|
||||
config: {title: '',labelWidth: '140px', colSpan: 'disBlock m0Auto'},
|
||||
controls: {
|
||||
id: {label: 'ID',hidden: true},
|
||||
switchClientId: {label: '交换机', span: 18, type: 'select', options:[], required: true},
|
||||
switchClientId: {label: '交换机', span: 18, type: 'select', options:[]},
|
||||
deployDevice: {label: '服务器列表', span: 18, type: 'textarea', rows: 15, required: true},
|
||||
}
|
||||
}],
|
||||
assignStaffOpen: false, // 分配人员
|
||||
staffUserIdsMap: {},
|
||||
assignStaffRuleForm: {},
|
||||
assignStaffForm: [{
|
||||
config: {title: '',labelWidth: '140px', colSpan: 'disBlock m0Auto'},
|
||||
controls: {
|
||||
id: {label: 'ID',hidden: true},
|
||||
owner: {label: '负责人员', span: 18, type: 'select', options:[]},
|
||||
deployDevice: {label: '服务器列表', span: 18, type: 'textarea', rows: 15, required: true},
|
||||
}
|
||||
}],
|
||||
@@ -444,7 +466,6 @@
|
||||
this.fnBusNameList();
|
||||
this.fnLogicalNode();
|
||||
this.switchList();
|
||||
|
||||
},
|
||||
activated() {
|
||||
this.$nextTick(() => {
|
||||
@@ -511,6 +532,15 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
// 用户
|
||||
staffUserList() {
|
||||
staffAllUserList({}).then(val => {
|
||||
this.assignStaffForm[0].controls['owner'].options = val && val.data.map(item => {
|
||||
this.staffUserIdsMap[item.nickName] = item;
|
||||
return Object.assign(item, {label: item.nickName, value: item.nickName});
|
||||
});
|
||||
});
|
||||
},
|
||||
// 处理子组件传递的新值
|
||||
handleValueChange(newValue) {
|
||||
// 父组件更新自身数据,实现同步
|
||||
@@ -995,10 +1025,10 @@
|
||||
this.copyDialogVisible = true;
|
||||
break;
|
||||
case 'batchGroup':
|
||||
if (selectList && selectList.length === 0) {
|
||||
this.$message.warning('请选择数据!');
|
||||
return;
|
||||
}
|
||||
// if (selectList && selectList.length === 0) {
|
||||
// this.$message.warning('请选择数据!');
|
||||
// return;
|
||||
// }
|
||||
this.batchGroupOpen = true;
|
||||
this.batchGroupRuleForm = {};
|
||||
if (this.$refs['batchGroupFormRef']?.$refs.ruleForm) {
|
||||
@@ -1017,6 +1047,30 @@
|
||||
this.$set(this.batchGroupRuleForm, 'deployDevice', groupParams);
|
||||
}
|
||||
break;
|
||||
case 'assignStaff':
|
||||
// if (selectList && selectList.length === 0) {
|
||||
// this.$message.warning('请选择数据!');
|
||||
// return;
|
||||
// }
|
||||
this.staffUserList();
|
||||
this.assignStaffOpen = true;
|
||||
this.assignStaffRuleForm = {};
|
||||
if (this.$refs['assignStaffFormRef']?.$refs.ruleForm) {
|
||||
this.$refs['assignStaffFormRef'].$refs.ruleForm.resetFields();
|
||||
}
|
||||
if (selectList && selectList.length > 0) {
|
||||
let staffParams = '';
|
||||
selectList && selectList.forEach((item, index) => {
|
||||
if (selectList.length === index + 1) {
|
||||
staffParams+= item.clientId;
|
||||
} else {
|
||||
staffParams+= item.clientId + '\n'
|
||||
}
|
||||
});
|
||||
this.$set(this.assignStaffRuleForm, 'owner',this.$store.getters.nickName);
|
||||
this.$set(this.assignStaffRuleForm, 'deployDevice',staffParams);
|
||||
}
|
||||
break;
|
||||
case 'export':
|
||||
let paramsList = Object.assign({}, this.queryParams,rowData);
|
||||
this.download("system/registration/export", paramsList, `服务器管理_${new Date().getTime()}.xlsx`, null, 'json');
|
||||
@@ -1098,7 +1152,9 @@
|
||||
async submitSwitchGroup() {
|
||||
if (!await this.fnFormValid('batchGroupFormRef', 'batchGroupRuleForm')) return;
|
||||
let params = JSON.parse(JSON.stringify(this.batchGroupRuleForm));
|
||||
params['switchName'] = this.switchIdsMap[params.switchClientId].switchName;
|
||||
if (params.switchClientId) {
|
||||
params['switchName'] = this.switchIdsMap[params.switchClientId].switchName;
|
||||
}
|
||||
bindSwitch(params).then(res => {
|
||||
this.$refs['tabRef'].selectList = [];
|
||||
this.$modal.msgSuccess(res.msg);
|
||||
@@ -1107,6 +1163,21 @@
|
||||
this.getList();
|
||||
})
|
||||
},
|
||||
// 分配人员
|
||||
async submitAssignStaff() {
|
||||
if (!await this.fnFormValid('assignStaffFormRef', 'assignStaffRuleForm')) return;
|
||||
let params = JSON.parse(JSON.stringify(this.assignStaffRuleForm));
|
||||
if (params.owner) {
|
||||
params['phone'] = this.staffUserIdsMap[params.owner].phonenumber;
|
||||
}
|
||||
staffBindOwner(params).then(res => {
|
||||
this.$refs['tabRef'].selectList = [];
|
||||
this.$modal.msgSuccess(res.msg);
|
||||
this.assignStaffOpen = false;
|
||||
this.assignStaffRuleForm = {};
|
||||
this.getList();
|
||||
})
|
||||
},
|
||||
// 添加标签
|
||||
async submitTag() {
|
||||
if (!await this.fnFormValid('tagFormRef', 'tagRuleForm')) return;
|
||||
|
||||
Reference in New Issue
Block a user