云平台自测问题修改
This commit is contained in:
@@ -31,7 +31,6 @@
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button type="primary" class="ml10" @click="add" icon="el-icon-Plus">新增</el-button>
|
||||
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table
|
||||
@@ -71,7 +70,7 @@
|
||||
</span>
|
||||
<div>
|
||||
<template v-if="data.id">
|
||||
<el-tooltip content="编辑" placement="top">
|
||||
<el-tooltip content="编辑" placement="left">
|
||||
<el-button
|
||||
style="margin-left: 4px"
|
||||
icon="el-icon-Edit"
|
||||
@@ -82,23 +81,22 @@
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-popconfirm title="确定重启吗?" placement="bottom" @confirm="restart(data)">
|
||||
<el-popconfirm title="确定重启吗?" placement="left" @confirm="restart(data)">
|
||||
<template #reference>
|
||||
<el-tooltip content="重启" placement="top">
|
||||
<el-button
|
||||
style="margin-left: 4px"
|
||||
icon="el-icon-Refresh"
|
||||
type="warning"
|
||||
link
|
||||
/>
|
||||
</el-tooltip>
|
||||
<el-button
|
||||
style="margin-left: 4px"
|
||||
icon="el-icon-Refresh"
|
||||
type="warning"
|
||||
link
|
||||
@click.stop
|
||||
/>
|
||||
</template>
|
||||
<template #actions="{ confirm, cancel }">
|
||||
<el-button size="small" @click="cancel">取消</el-button>
|
||||
<el-button type="warning" size="small" @click="confirm">确认</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -179,12 +177,17 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<!-- 绑定进程号 -->
|
||||
<el-dialog draggable title="绑定进程号" v-model="popUps" :close-on-click-modal="false" width="400px">
|
||||
<el-form :model="bindProcessForm" ref="bindProcessFormRef" label-width="80px" :rules="rules2" >
|
||||
<el-dialog draggable title="绑定进程号" v-model="popUps" :close-on-click-modal="false" width="400px">
|
||||
<el-form :model="bindProcessForm" ref="bindProcessFormRef" label-width="80px" :rules="rules2">
|
||||
<el-form-item label="前置机" prop="nodeId">
|
||||
<el-select v-model="bindProcessForm.nodeId" placeholder="请选择前置机" style="width: 100%" clearable @change="handleNodeChange">
|
||||
<el-select
|
||||
v-model="bindProcessForm.nodeId"
|
||||
placeholder="请选择前置机"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
@change="handleNodeChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in tableStore.table.data"
|
||||
:key="item.id"
|
||||
@@ -193,9 +196,14 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="进程号" prop="processNo">
|
||||
<el-select v-model="bindProcessForm.processNo" placeholder="请选择进程号" style="width: 100%" clearable>
|
||||
<el-select
|
||||
v-model="bindProcessForm.processNo"
|
||||
placeholder="请选择进程号"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in processOptions"
|
||||
:key="item.name"
|
||||
@@ -211,7 +219,6 @@
|
||||
<el-button type="primary" @click="bindTheProcess">确 定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -222,7 +229,14 @@ import { ref, onMounted, provide, reactive, nextTick } from 'vue'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElButton } from 'element-plus'
|
||||
import {addNode,updateNode,delNode,nodeDeviceTree,restartProcess,updateProcess} from '@/api/cs-device-boot/frontManagement'
|
||||
import {
|
||||
addNode,
|
||||
updateNode,
|
||||
delNode,
|
||||
nodeDeviceTree,
|
||||
restartProcess,
|
||||
updateProcess
|
||||
} from '@/api/cs-device-boot/frontManagement'
|
||||
|
||||
defineOptions({
|
||||
name: 'govern/setting/frontManagement'
|
||||
@@ -427,7 +441,6 @@ const currentChangeEvent = () => {
|
||||
|
||||
// 重启进程
|
||||
const restart = (data: any) => {
|
||||
|
||||
restartProcess({
|
||||
nodeId: nodeId.value,
|
||||
processNo: data.processNo
|
||||
@@ -442,11 +455,10 @@ const change = (val: any) => {
|
||||
treeRef.value!.filter(filterText.value)
|
||||
}
|
||||
|
||||
|
||||
// 修改 edit 方法
|
||||
const edit = (data: any) => {
|
||||
bindProcessForm.value.processNo = data.nodeProcess
|
||||
bindProcessForm.value.nodeId = nodeId.value // 默认选中当前节点
|
||||
bindProcessForm.value.nodeId = nodeId.value // 默认选中当前节点
|
||||
processId.value = data.id
|
||||
popUps.value = true
|
||||
|
||||
@@ -466,7 +478,6 @@ const loadProcessOptionsForNode = (nodeId: string) => {
|
||||
} else {
|
||||
processOptions.value = []
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@@ -477,13 +488,12 @@ const handleNodeChange = (nodeId: any) => {
|
||||
bindProcessForm.value.processNo = ''
|
||||
return
|
||||
}
|
||||
// 清除之前选中的进程号
|
||||
// 清除之前选中的进程号
|
||||
bindProcessForm.value.processNo = ''
|
||||
// 加载新选中前置机的进程号选项
|
||||
loadProcessOptionsForNode(nodeId)
|
||||
}
|
||||
|
||||
|
||||
// 更新进程号
|
||||
const bindTheProcess = () => {
|
||||
bindProcessFormRef.value.validate((valid: any) => {
|
||||
@@ -499,8 +509,6 @@ const bindTheProcess = () => {
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
const filterNode = (value: string, data: any, node: any) => {
|
||||
if (!value) return true
|
||||
@@ -537,7 +545,6 @@ const chooseNode = (value: string, data: any, node: any) => {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
tableStore.table.params.orderBy = 'desc'
|
||||
tableStore.table.params.nodeGrade = ''
|
||||
tableStore.table.params.searchState = ''
|
||||
@@ -591,8 +598,6 @@ onMounted(() => {
|
||||
tableStore.index()
|
||||
}, 100)
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -623,7 +628,6 @@ onMounted(() => {
|
||||
}
|
||||
:deep(.default) {
|
||||
display: flex;
|
||||
|
||||
}
|
||||
.custom-tree-node {
|
||||
flex: 1;
|
||||
|
||||
Reference in New Issue
Block a user