前置管理选中背景,重启,更新进程号
This commit is contained in:
@@ -207,5 +207,7 @@ defineExpose({
|
||||
min-width: 128px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<!-- @/components/table/column/GroupColumn.vue@/components/table/column/GroupColumn.vue -->
|
||||
|
||||
@@ -69,18 +69,19 @@
|
||||
></span>
|
||||
</span>
|
||||
<div>
|
||||
<!-- <el-button type="primary" v-if="data.id == undefined" link icon="el-icon-Plus" ></el-button> -->
|
||||
<template v-if="data.id">
|
||||
<el-tooltip content="编辑" placement="top">
|
||||
<el-button
|
||||
style="margin-left: 4px"
|
||||
icon="el-icon-Edit"
|
||||
v-if="data.id"
|
||||
type="primary"
|
||||
@click="edit(data)"
|
||||
link
|
||||
></el-button>
|
||||
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-popconfirm
|
||||
v-else
|
||||
class="box-item"
|
||||
title="确定重启吗?"
|
||||
placement="bottom"
|
||||
@@ -92,6 +93,7 @@
|
||||
</template>
|
||||
|
||||
<template #reference>
|
||||
<el-tooltip content="重启" placement="top">
|
||||
<el-button
|
||||
style="margin-left: 4px"
|
||||
icon="el-icon-Refresh"
|
||||
@@ -99,8 +101,10 @@
|
||||
link
|
||||
@click.stop
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -108,32 +112,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 重启确认对话框 -->
|
||||
<el-dialog
|
||||
draggable
|
||||
title="重启确认"
|
||||
v-model="restartDialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="400px"
|
||||
:before-close="cancelRestart"
|
||||
>
|
||||
<el-form :model="restartForm" label-width="80px" :rules="restartRules" ref="restartFormRef">
|
||||
<el-form-item label="密码:" prop="password">
|
||||
<el-input
|
||||
v-model="restartForm.password"
|
||||
type="password"
|
||||
placeholder="请输入密码"
|
||||
show-password
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="cancelRestart">取 消</el-button>
|
||||
<el-button type="primary" @click="confirmRestart">确 定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog
|
||||
draggable
|
||||
:title="dialogTitle"
|
||||
@@ -378,8 +356,17 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
loadCallback: () => {
|
||||
// 确保数据存在且不为空
|
||||
if (tableStore.table.data && tableStore.table.data.length > 0) {
|
||||
// 使用 nextTick 确保 DOM 更新完成后再设置当前行
|
||||
nextTick(() => {
|
||||
tableRef.value.getRef().setCurrentRow(tableStore.table.data[0])
|
||||
// 延迟执行 currentChangeEvent 确保 setCurrentRow 生效
|
||||
setTimeout(() => {
|
||||
currentChangeEvent()
|
||||
}, 0)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
const nodeId = ref('')
|
||||
@@ -417,11 +404,9 @@ const currentChangeEvent = () => {
|
||||
|
||||
// 重启进程
|
||||
const restart = (data: any) => {
|
||||
console.log('🚀 ~ restart ~ data:', data)
|
||||
restartProcess({
|
||||
deviceRebootType: data.processNo,
|
||||
nodeId: nodeId.value,
|
||||
processNo: 2
|
||||
processNo: data.processNo
|
||||
}).then(res => {
|
||||
ElMessage.success('重启成功')
|
||||
currentChangeEvent()
|
||||
@@ -569,9 +554,7 @@ onMounted(() => {
|
||||
}
|
||||
:deep(.default) {
|
||||
display: flex;
|
||||
.row--current {
|
||||
background-color: var(--el-color-primary-light-8) !important;
|
||||
}
|
||||
|
||||
}
|
||||
.custom-tree-node {
|
||||
flex: 1;
|
||||
|
||||
Reference in New Issue
Block a user