Merge branch 'master' of http://192.168.1.22:3000/Web/admin-sjzx
This commit is contained in:
@@ -206,3 +206,11 @@ export function exportTerminalBase() {
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
//一键分配终端
|
||||
export function allotTerminal(data: any) {
|
||||
return createAxios({
|
||||
url: '/device-boot/nodeDevice/oneKeyDistribution',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -209,7 +209,8 @@ import {
|
||||
updateNode,
|
||||
nodeDeviceTree,
|
||||
updateDeviceProcess,
|
||||
askRestartProcess
|
||||
askRestartProcess,
|
||||
allotTerminal
|
||||
} from '@/api/device-boot/Business'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
@@ -384,7 +385,32 @@ const tableStore = new TableStore({
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '分配终端',
|
||||
type: 'primary',
|
||||
icon: 'InfoFilled',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'primary',
|
||||
title: '确定分配终端吗?'
|
||||
},
|
||||
click: row => {
|
||||
if (!hasDevices.value) {
|
||||
ElMessage.warning('此前置机下无设备,无法分配终端!');
|
||||
return;
|
||||
}
|
||||
allotTerminal({
|
||||
nodeId: row.id
|
||||
}).then(res => {
|
||||
ElMessage.success(res.message)
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div class="box">
|
||||
<el-form :model="form" label-width="100px" ref="ruleFormRef">
|
||||
<el-form-item label="名称:">
|
||||
<el-form :model="form" label-width="100px" ref="ruleFormRef" :rules="rules">
|
||||
<el-form-item label="名称:" prop="tpName">
|
||||
<el-input v-model="form.tpName" placeholder="请输入" maxlength="32" show-word-limit clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述:" class="mt20">
|
||||
@@ -122,13 +122,8 @@ const menuTree = ref()
|
||||
const TableHeaderRef = ref()
|
||||
|
||||
const rules = reactive({
|
||||
name: [{ required: true, message: '名称不可为空', trigger: 'blur' }],
|
||||
ip: [{ required: true, message: 'ip不可为空', trigger: 'blur' }],
|
||||
nodeGrade: [{ required: true, message: '等级不可为空', trigger: 'blur' }],
|
||||
nodeDevNum: [{ required: true, message: '最大终端数不可为空', trigger: 'blur' }],
|
||||
maxProcessNum: [{ required: true, message: '最大进程数不可为空', trigger: 'blur' }],
|
||||
sort: [{ required: true, message: '排序不可为空', trigger: 'blur' }],
|
||||
remark: [{ required: true, message: '描述不可为空', trigger: 'blur' }]
|
||||
tpName: [{ required: true, message: '名称不可为空', trigger: 'blur' }],
|
||||
|
||||
})
|
||||
|
||||
const dialogFormVisible = ref(false)
|
||||
|
||||
@@ -98,9 +98,9 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="评价筛选">
|
||||
<!-- <el-form-item label="评价筛选">
|
||||
<el-input v-model="tableStore.table.params.evaluate" clearable placeholder="输入关键字筛选" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
@@ -219,7 +219,7 @@ tableStore.table.params.statisticalType = classificationData[0]
|
||||
tableStore.table.params.serverName = 'harmonic-boot'
|
||||
tableStore.table.params.comFlag = []
|
||||
tableStore.table.params.runFlag = []
|
||||
tableStore.table.params.evaluate = ''
|
||||
// tableStore.table.params.evaluate = ''
|
||||
tableStore.table.params.powerFlag = 2
|
||||
tableStore.table.params.monitorFlag = 2
|
||||
tableStore.table.params.scale = []
|
||||
|
||||
@@ -35,8 +35,7 @@
|
||||
<div class="default-main">
|
||||
<vxe-table :data="shareData" v-bind="defaultAttribute" height="auto" auto-resize>
|
||||
<vxe-column field="month" title="月份" min-width="120px" sortable></vxe-column>
|
||||
<vxe-column field="notAssociated" title="未关联暂降次数" sortable></vxe-column>
|
||||
<vxe-column field="linked" title="已关联处理事件" sortable></vxe-column>
|
||||
<vxe-column field="notAssociated" title="电压暂降次数" sortable></vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
@@ -102,28 +101,21 @@ const info = (list: any, searchBeginTime: any, searchEndTime: any,selectedAreaNa
|
||||
]
|
||||
|
||||
|
||||
// let all = 0
|
||||
let all = 0
|
||||
|
||||
// list.monthlyStatistics.monthCalculation.forEach((item: any) => {
|
||||
// all += item.linked + item.notAssociated
|
||||
// })
|
||||
let allNotAssociated = 0
|
||||
let allLinked= 0
|
||||
list.monthlyStatistics.monthCalculation.forEach((item: any) => {
|
||||
allNotAssociated += item.notAssociated
|
||||
all += item.linked + item.notAssociated
|
||||
})
|
||||
|
||||
list.monthlyStatistics.monthCalculation.forEach((item: any) => {
|
||||
allLinked += item.linked
|
||||
})
|
||||
|
||||
|
||||
shareData.value = [
|
||||
{
|
||||
month: '总计',
|
||||
notAssociated: allNotAssociated.toFixed(2),
|
||||
linked: allLinked.toFixed(2)
|
||||
notAssociated: all,
|
||||
},
|
||||
...list.monthlyStatistics.monthCalculation
|
||||
...list.monthlyStatistics.monthCalculation.map((item: any) => ({
|
||||
month: item.month,
|
||||
notAssociated: item.notAssociated + item.linked
|
||||
}))
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ const Processing = (list: any) => {
|
||||
return html
|
||||
}
|
||||
},
|
||||
|
||||
color: ['#07CCCA'],
|
||||
legend: {
|
||||
data: ['暂降次数']
|
||||
},
|
||||
@@ -117,7 +117,7 @@ const Grade = (list: any) => {
|
||||
return html
|
||||
}
|
||||
},
|
||||
|
||||
color: ['#07CCCA'],
|
||||
legend: {
|
||||
data: ['暂降次数']
|
||||
},
|
||||
@@ -185,7 +185,10 @@ const Relation = (list: any, interval: number) => {
|
||||
// } else if (item.notAssociated == 1) {
|
||||
// item.notAssociated = 1.3
|
||||
// }
|
||||
echartswArr.push(item.notAssociated)
|
||||
//echartswArr.push(item.notAssociated)
|
||||
const total = item.notAssociated + item.linked
|
||||
echartswArr.push(total)
|
||||
|
||||
})
|
||||
monthlyStatistics.value = {
|
||||
title: {
|
||||
@@ -208,9 +211,11 @@ const Relation = (list: any, interval: number) => {
|
||||
},
|
||||
|
||||
legend: {
|
||||
data: ['未关联暂降次数', '已关联处理事件']
|
||||
data: ['暂降次数']
|
||||
//data: ['未关联暂降次数', '已关联处理事件']
|
||||
},
|
||||
color: ['#07CCCA', '#Ff6600'],
|
||||
color: ['#07CCCA'],
|
||||
//color: ['#07CCCA', '#Ff6600'],
|
||||
xAxis: {
|
||||
name: '月份', // 给X轴加单位
|
||||
data: echartsndArr
|
||||
@@ -221,11 +226,11 @@ const Relation = (list: any, interval: number) => {
|
||||
options: {
|
||||
series: [
|
||||
{
|
||||
name: '未关联暂降次数',
|
||||
name: '暂降次数',
|
||||
type: 'bar',
|
||||
barMaxWidth: 30,
|
||||
barMinHeight: 5,
|
||||
data: echartswArr,
|
||||
data: echartswArr,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
label: {
|
||||
@@ -247,32 +252,32 @@ const Relation = (list: any, interval: number) => {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '已关联处理事件',
|
||||
type: 'bar',
|
||||
barMaxWidth: 30,
|
||||
data: echartsArr,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
label: {
|
||||
// show: true, //数字开启显示
|
||||
textStyle: {
|
||||
//数值样式
|
||||
color: '#fff',
|
||||
fontSize: 14,
|
||||
fontWeight: 600
|
||||
}
|
||||
},
|
||||
color: function (params: any) {
|
||||
if (params.data == 0) {
|
||||
return '#B3B3B3'
|
||||
} else {
|
||||
return '#Ff6600'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// {
|
||||
// name: '已关联处理事件',
|
||||
// type: 'bar',
|
||||
// barMaxWidth: 30,
|
||||
// data: echartsArr,
|
||||
// itemStyle: {
|
||||
// normal: {
|
||||
// label: {
|
||||
// // show: true, //数字开启显示
|
||||
// textStyle: {
|
||||
// //数值样式
|
||||
// color: '#fff',
|
||||
// fontSize: 14,
|
||||
// fontWeight: 600
|
||||
// }
|
||||
// },
|
||||
// color: function (params: any) {
|
||||
// if (params.data == 0) {
|
||||
// return '#B3B3B3'
|
||||
// } else {
|
||||
// return '#Ff6600'
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,17 @@
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
<el-pagination
|
||||
class="mt10"
|
||||
:currentPage="form.pageNum"
|
||||
:page-size="form.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
background
|
||||
:layout="'sizes,total, ->, prev, pager, next, jumper'"
|
||||
:total="total"
|
||||
@size-change="onTableSizeChange"
|
||||
@current-change="onTableCurrentChange"
|
||||
></el-pagination>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="!view">
|
||||
@@ -168,7 +179,12 @@ tableStore.table.params.searchValue = ''
|
||||
const bxactiveName = ref('ssbx')
|
||||
const boxoList = ref({})
|
||||
const wp = ref({})
|
||||
|
||||
const form = ref({
|
||||
pageSize: 20,
|
||||
pageNum: 1,
|
||||
id: ''
|
||||
})
|
||||
const total = ref(0)
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
@@ -180,13 +196,47 @@ onMounted(() => {
|
||||
|
||||
})
|
||||
})
|
||||
//分析记录管理
|
||||
const analysis1 = () => {
|
||||
queryRelevantLogPage({}).then((res: any) => {
|
||||
|
||||
// 分页
|
||||
const onTableSizeChange = (val: number) => {
|
||||
form.value.pageSize = val
|
||||
form.value.pageNum = 1 // 改变每页条数时回到第一页
|
||||
loadAnalysisData() // 重新加载数据
|
||||
|
||||
}
|
||||
|
||||
const onTableCurrentChange = (val: number) => {
|
||||
form.value.pageNum = val
|
||||
loadAnalysisData() // 重新加载数据
|
||||
|
||||
}
|
||||
|
||||
// 封装数据加载逻辑
|
||||
const loadAnalysisData = async () => {
|
||||
try {
|
||||
const params = {
|
||||
pageNum: form.value.pageNum,
|
||||
pageSize: form.value.pageSize
|
||||
}
|
||||
const res: any = await queryRelevantLogPage(params)
|
||||
AnalysisData.value = res.data.records
|
||||
})
|
||||
total.value = res.data.total
|
||||
} catch (error) {
|
||||
console.error('获取分析记录失败:', error)
|
||||
AnalysisData.value = []
|
||||
total.value = 0
|
||||
}
|
||||
}
|
||||
|
||||
//分析记录管理
|
||||
const analysis1 = async () => {
|
||||
// 初始化分页参数
|
||||
form.value.pageNum = 1
|
||||
await loadAnalysisData()
|
||||
dialogAnalysis.value = true
|
||||
}
|
||||
|
||||
|
||||
// 启动关联分析
|
||||
const firing = () => {
|
||||
processEvents({
|
||||
@@ -207,9 +257,8 @@ const details = (row: any) => {
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
queryRelevantLogPage({}).then((res: any) => {
|
||||
AnalysisData.value = res.data.records
|
||||
})
|
||||
// 重新加载当前页的数据
|
||||
loadAnalysisData()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -217,4 +266,6 @@ const backbxlb = () => {
|
||||
view.value = true
|
||||
view2.value = false
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
style="width: 100%"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="会话超时时间(秒):" prop="sessionTime">
|
||||
<el-form-item label="会话超时时间(分钟):" prop="sessionTime">
|
||||
<el-input-number v-model.number="form.sessionTime" :min="10" style="width: 100%"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="token刷新时间(秒):" prop="sessionRefreshTime">
|
||||
<el-form-item label="token刷新时间(分钟):" prop="sessionRefreshTime">
|
||||
<el-input-number
|
||||
v-model.number="form.sessionRefreshTime"
|
||||
:min="10"
|
||||
|
||||
Reference in New Issue
Block a user