联调 前置管理页面

This commit is contained in:
GGJ
2025-04-29 15:59:23 +08:00
parent 503398d050
commit dabb960d09
6 changed files with 46 additions and 8 deletions

View File

@@ -54,7 +54,6 @@
default-expand-all
:props="defaultProps"
:filter-node-method="filterNode"
>
<template #default="{ node, data }">
<div class="custom-tree-node">
@@ -164,7 +163,7 @@
</template>
<script setup lang="ts">
import { ref, onMounted, provide, reactive, nextTick } from 'vue'
import { addNode, delNode, updateNode, nodeDeviceTree } from '@/api/device-boot/Business'
import { addNode, delNode, updateNode, nodeDeviceTree, updateDeviceProcess } from '@/api/device-boot/Business'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
@@ -192,7 +191,7 @@ const popUps = ref(false)
const tableRef = ref()
const processNo = ref('')
const ruleFormRef = ref()
const dataSource = ref([])
const dataSource:any = ref([])
const defaultProps = {
children: 'deviceInfoList',
label: 'name'
@@ -218,7 +217,7 @@ const rules = reactive({
const dialogFormVisible = ref(false)
const dialogTitle = ref('新增前置机')
const processId = ref('')
const tableStore = new TableStore({
url: '/device-boot/node/nodeList',
method: 'POST',
@@ -339,11 +338,22 @@ const change = val => {
treeRef.value!.filter(filterText.value)
}
const edit = (data: any) => {
console.log("🚀 ~ edit ~ data:", data)
console.log('🚀 ~ edit ~ data:', data)
processNo.value = data.processNo
processId.value = data.id
popUps.value = true
}
const bindTheProcess = () => {}
// 更新进程号
const bindTheProcess = () => {
updateDeviceProcess({
id: processId.value,
processNo: processNo.value
}).then(res => {
ElMessage.success('修改成功!')
popUps.value = false
currentChangeEvent()
})
}
const filterNode = (value: string, data: any, node: any) => {
if (!value) return true
// return data.name.includes(value)