2026-01-04 18:31:52 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="w100 h100">
|
2026-01-08 18:23:46 +08:00
|
|
|
|
<div v-if="activeName === '收益查看'">
|
2026-01-07 19:20:12 +08:00
|
|
|
|
<span style="display: inline-block;font-size: 14px;font-weight: 600;">计算方式:</span>
|
|
|
|
|
|
<el-select v-model="typeNum" @change="handleSelect">
|
|
|
|
|
|
<el-option key="1000" :value="'1000'" :label="'1000'">1000计算方式</el-option>
|
|
|
|
|
|
<el-option key="1024" :value="'1024'" :label="'1024'">1024计算方式</el-option>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</div>
|
2026-01-08 18:23:46 +08:00
|
|
|
|
<TableList ref="tabref" class="w100 h100" :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnRenderList="fnRenderList" @fnClick="callback">
|
2026-01-04 18:31:52 +08:00
|
|
|
|
<template #tempDay="{ valueKey, row, column }">
|
|
|
|
|
|
<span v-if="row && row[valueKey] || row[valueKey] === 0">{{row[valueKey]}}/{{row.createTime}}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template #tempMonth="{ valueKey, row, column }">
|
|
|
|
|
|
<span v-if="row && row[valueKey] || row[valueKey] === 0">{{row[valueKey]}}/{{row.createTime.slice(0, 7)}}</span>
|
|
|
|
|
|
</template>
|
2026-01-08 18:23:46 +08:00
|
|
|
|
<template #tempStatus="{ valueKey, row, column }">
|
|
|
|
|
|
<span v-if="row[valueKey] === '0'">未连通</span>
|
|
|
|
|
|
<span v-if="row[valueKey] === '1'">已连通</span>
|
|
|
|
|
|
</template>
|
2026-01-16 18:18:58 +08:00
|
|
|
|
<template #tempDiskStatus="{ row, column }">
|
|
|
|
|
|
<dict-tag :options="dict.type.disk_status" :value="row.status"/>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template #tempOmountFlag="{ row, column }">
|
|
|
|
|
|
<dict-tag :options="dict.type.disk_omount_flag" :value="row.omountFlag"/>
|
|
|
|
|
|
</template>
|
2026-01-04 18:31:52 +08:00
|
|
|
|
</TableList>
|
|
|
|
|
|
<el-dialog title="相关数据" :visible.sync="listOpen" width="900px" append-to-body style="padding-bottom: 20px;">
|
|
|
|
|
|
<relevantData :rowDataList="rowDataList" @closeDialog="closeDialog"></relevantData>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import TableList from '@/components/table/index.vue';
|
|
|
|
|
|
import relevantData from '../../earnManage/server/relevantData'
|
2026-01-16 18:18:58 +08:00
|
|
|
|
import {diskIssuanceOperat, delDiskName} from "@/api/disRevenue/resource";
|
2026-01-04 18:31:52 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
name: "serRegisTable",
|
2026-01-16 18:18:58 +08:00
|
|
|
|
dicts: ['disk_status', 'disk_omount_flag'],
|
2026-01-04 18:31:52 +08:00
|
|
|
|
components: {TableList, relevantData},
|
|
|
|
|
|
props: {
|
|
|
|
|
|
activeName: {
|
|
|
|
|
|
type: String,
|
|
|
|
|
|
default: ''
|
|
|
|
|
|
},
|
|
|
|
|
|
modelVal: {
|
|
|
|
|
|
type: Array,
|
|
|
|
|
|
default: () => []
|
2026-01-16 18:18:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
clientId : {
|
|
|
|
|
|
type: String,
|
|
|
|
|
|
default: ''
|
2026-01-04 18:31:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
watch: {
|
2026-01-08 18:23:46 +08:00
|
|
|
|
activeName: {
|
|
|
|
|
|
handler(newVal, oldVal) {
|
|
|
|
|
|
if (newVal && newVal !== oldVal) {
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
this.columnsList();
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
deep: true,
|
|
|
|
|
|
immediate: true
|
|
|
|
|
|
},
|
2026-01-04 18:31:52 +08:00
|
|
|
|
modelVal: {
|
|
|
|
|
|
handler(newVal) {
|
|
|
|
|
|
if (newVal && newVal.length > 0) {
|
|
|
|
|
|
this.queryParams = newVal[0].queryParams;
|
|
|
|
|
|
this.tableList = newVal[0].tableList;
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
deep: true,
|
|
|
|
|
|
immediate: true
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2026-01-07 19:20:12 +08:00
|
|
|
|
typeNum: '1000',
|
2026-01-04 18:31:52 +08:00
|
|
|
|
// 列显隐信息
|
2026-01-08 18:23:46 +08:00
|
|
|
|
columns: {},
|
|
|
|
|
|
config: {},
|
2026-01-04 18:31:52 +08:00
|
|
|
|
tableList: [],
|
|
|
|
|
|
queryParams: {
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
total: 0,
|
|
|
|
|
|
},
|
|
|
|
|
|
listOpen: false,
|
|
|
|
|
|
rowDataList: {},
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2026-01-07 19:20:12 +08:00
|
|
|
|
handleSelect(val) {
|
|
|
|
|
|
this.$emit('fnPaging', {calculationMode: this.typeNum})
|
|
|
|
|
|
},
|
2026-01-04 18:31:52 +08:00
|
|
|
|
fnRenderList(val) {
|
2026-01-07 19:20:12 +08:00
|
|
|
|
this.$emit('fnPaging', Object.assign({}, this.modelVal[0].queryParams, {calculationMode: this.typeNum}));
|
2026-01-04 18:31:52 +08:00
|
|
|
|
},
|
|
|
|
|
|
closeDialog() {
|
|
|
|
|
|
this.listOpen = false;
|
|
|
|
|
|
},
|
2026-01-08 18:23:46 +08:00
|
|
|
|
columnsList() {
|
|
|
|
|
|
this.columns = {};
|
|
|
|
|
|
this.config = {};
|
|
|
|
|
|
if (this.activeName === '收益查看') {
|
|
|
|
|
|
// 列显隐信息
|
|
|
|
|
|
this.columns = {
|
|
|
|
|
|
id: {label: `ID`, width: '50'},
|
|
|
|
|
|
clientId: {label: `ClientID`, minWidth: '280', visible: true},
|
|
|
|
|
|
businessName: {label: `业务名称`, minWidth: '150', visible: true},
|
|
|
|
|
|
bandwidth95Daily: {label: `95带宽值/日(Mbit)`, minWidth: '150', slotName: 'tempDay',visible: true},
|
|
|
|
|
|
bandwidth95Monthly: {label: `95带宽值/月(Mbit)`, minWidth: '150', slotName: 'tempMonth',visible: true},
|
|
|
|
|
|
avgMonthlyBandwidth95: {label: `月均日95值(Mbit)`, minWidth: '150',slotName: 'tempDay',visible: true},
|
|
|
|
|
|
};
|
|
|
|
|
|
this.config = {
|
|
|
|
|
|
colHiddenCheck: true,
|
|
|
|
|
|
colTopHiddenIcon: true,
|
|
|
|
|
|
tableButton: {
|
|
|
|
|
|
line: [
|
|
|
|
|
|
{content: '相关数据', fnCode: 'edit', type: 'text', icon: 'el-icon-tickets', hasPermi: 'earnManage:server:relevantData'},
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
} else if (this.activeName === '虚拟网卡信息') {
|
|
|
|
|
|
// 列显隐信息
|
|
|
|
|
|
this.columns = {
|
|
|
|
|
|
id: {label: `ID`, width: '50'},
|
|
|
|
|
|
clientId: {label: `clientID`, minWidth: '280'},
|
|
|
|
|
|
isp: {label: `运营商`, minWidth: '60', visible: true},
|
|
|
|
|
|
province: {label: `省`, minWidth: '60', visible: true},
|
|
|
|
|
|
city: {label: `市`, minWidth: '80',visible: true},
|
|
|
|
|
|
publicIp: {label: `公网地址`, minWidth: '100',visible: true},
|
|
|
|
|
|
ipv4Address: {label: `IPv4`, minWidth: '120',visible: true},
|
|
|
|
|
|
gateway: {label: `网关`, minWidth: '120',visible: true},
|
|
|
|
|
|
interfaceName: {label: `接口名称`, minWidth: '100',visible: true},
|
|
|
|
|
|
interfaceType: {label: `接口类型`, minWidth: '80',visible: true},
|
|
|
|
|
|
macAddress: {label: `MAC地址`, minWidth: '150',visible: true},
|
|
|
|
|
|
ipv6Address: {label: `IPv6`, minWidth: '100',visible: true},
|
|
|
|
|
|
status: {label: `连通状态`, minWidth: '100', slotName: 'tempStatus', visible: true},
|
|
|
|
|
|
};
|
|
|
|
|
|
this.config = {
|
|
|
|
|
|
colHiddenCheck: true, colTopHiddenIcon: true,
|
|
|
|
|
|
};
|
|
|
|
|
|
} else if (this.activeName === '网卡信息') {
|
|
|
|
|
|
// 列显隐信息
|
|
|
|
|
|
this.columns = {
|
|
|
|
|
|
id: {label: `ID`, width: '50'},
|
|
|
|
|
|
clientId: {label: `clientID`, minWidth: '280'},
|
|
|
|
|
|
isp: {label: `运营商`, minWidth: '60', visible: true},
|
|
|
|
|
|
province: {label: `省`, minWidth: '60', visible: true},
|
|
|
|
|
|
city: {label: `市`, minWidth: '80',visible: true},
|
|
|
|
|
|
publicIp: {label: `公网地址`, minWidth: '100',visible: true},
|
|
|
|
|
|
ipv4Address: {label: `IPv4`, minWidth: '120',visible: true},
|
|
|
|
|
|
gateway: {label: `网关`, minWidth: '150',visible: true},
|
|
|
|
|
|
interfaceName: {label: `接口名称`, minWidth: '100',visible: true},
|
|
|
|
|
|
interfaceType: {label: `接口类型`, minWidth: '100',visible: true},
|
|
|
|
|
|
macAddress: {label: `MAC地址`, minWidth: '150',visible: true},
|
|
|
|
|
|
ipv6Address: {label: `IPv6`, minWidth: '120',visible: true},
|
|
|
|
|
|
};
|
|
|
|
|
|
this.config = {
|
|
|
|
|
|
colHiddenCheck: true, colTopHiddenIcon: true,
|
|
|
|
|
|
};
|
2026-01-15 18:16:53 +08:00
|
|
|
|
} else if (this.activeName === '硬盘设备监控') {
|
|
|
|
|
|
// 列显隐信息
|
|
|
|
|
|
this.columns = {
|
|
|
|
|
|
id: {label: `ID`, width: '50'},
|
|
|
|
|
|
clientId: {label: `clientID`, minWidth: '280'},
|
2026-01-16 18:18:58 +08:00
|
|
|
|
name: {label: `磁盘名称`, minWidth: '60', visible: true},
|
2026-01-19 18:15:06 +08:00
|
|
|
|
serial: {label: `序列号`, minWidth: '120', visible: true},
|
2026-01-16 18:18:58 +08:00
|
|
|
|
total: {label: `总大小(GB)`, minWidth: '100',visible: true},
|
|
|
|
|
|
type: {label: `类型`, minWidth: '60',visible: true},
|
|
|
|
|
|
usedSpace: {label: `已用空间(GB)`, minWidth: '100',visible: true},
|
|
|
|
|
|
readSpeed: {label: `读速率(KB/s)`, minWidth: '90',visible: true},
|
|
|
|
|
|
writeSpeed: {label: `写速率(KB/s)`, minWidth: '90',visible: true},
|
|
|
|
|
|
readIops: {label: `读IOPS`, minWidth: '60',visible: true},
|
|
|
|
|
|
writeIops: {label: `写IOPS`, minWidth: '60',visible: true},
|
|
|
|
|
|
status: {label: `状态`, minWidth: '50', slotName: 'tempDiskStatus', visible: true},
|
|
|
|
|
|
omountFlag: {label: `执行卸载`, minWidth: '60', slotName: 'tempOmountFlag', visible: true},
|
2026-01-15 18:16:53 +08:00
|
|
|
|
};
|
|
|
|
|
|
this.config = {
|
|
|
|
|
|
colHiddenCheck: true, colTopHiddenIcon: true,
|
|
|
|
|
|
tableButton: {
|
|
|
|
|
|
line: [
|
|
|
|
|
|
{content: '测试磁盘IOOS', fnCode: 'testIoos', type: 'primary', showName: 'status', showVal: '1'},
|
|
|
|
|
|
{content: '卸载', fnCode: 'uninstall', type: 'danger', showName: 'status', showVal: '0'},
|
|
|
|
|
|
{content: '删除记录', fnCode: 'delete', type: 'danger', showName: 'status', showVal: '0'},
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
2026-01-08 18:23:46 +08:00
|
|
|
|
}
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
if (this.$refs.tabref) {
|
|
|
|
|
|
this.$refs.tabref.tableKey++;
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
2026-01-04 18:31:52 +08:00
|
|
|
|
callback(result, rowData, selectChange, selectList) {
|
|
|
|
|
|
if (result && result.fnCode) {
|
|
|
|
|
|
switch (result.fnCode) {
|
|
|
|
|
|
case 'edit':
|
|
|
|
|
|
this.listOpen = true;
|
|
|
|
|
|
this.rowDataList = rowData;
|
|
|
|
|
|
break;
|
2026-01-15 18:16:53 +08:00
|
|
|
|
case 'testIoos':
|
2026-01-16 18:18:58 +08:00
|
|
|
|
let params = {id: rowData.id, clientId: this.clientId, name: rowData.name, processType: 1};
|
|
|
|
|
|
diskIssuanceOperat(params).then(res => {
|
2026-01-27 18:19:55 +08:00
|
|
|
|
this.$modal.msgSuccess("测试成功!");
|
2026-01-16 18:18:58 +08:00
|
|
|
|
this.$emit('diskTableData');
|
|
|
|
|
|
});
|
2026-01-15 18:16:53 +08:00
|
|
|
|
break;
|
|
|
|
|
|
case 'uninstall':
|
2026-01-16 18:18:58 +08:00
|
|
|
|
let paramsTow = {id: rowData.id, clientId: this.clientId, name: rowData.name, processType: 2};
|
|
|
|
|
|
diskIssuanceOperat(paramsTow).then(res => {
|
2026-01-27 18:19:55 +08:00
|
|
|
|
this.$modal.msgSuccess("卸载成功!");
|
2026-01-16 18:18:58 +08:00
|
|
|
|
this.$emit('diskTableData');
|
|
|
|
|
|
});
|
2026-01-15 18:16:53 +08:00
|
|
|
|
break;
|
|
|
|
|
|
case 'delete':
|
2026-01-16 18:18:58 +08:00
|
|
|
|
delDiskName(rowData.id).then(res => {
|
2026-01-27 18:19:55 +08:00
|
|
|
|
this.$modal.msgSuccess("删除成功!");
|
2026-01-16 18:18:58 +08:00
|
|
|
|
this.$emit('diskTableData');
|
|
|
|
|
|
});
|
2026-01-15 18:16:53 +08:00
|
|
|
|
break;
|
2026-01-04 18:31:52 +08:00
|
|
|
|
default:
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
</style>
|