业务管理,系统管理

This commit is contained in:
sjl
2025-07-28 16:35:36 +08:00
parent d6e440dedb
commit d53b9df52f
10 changed files with 134 additions and 64 deletions

View File

@@ -94,7 +94,7 @@
>
<el-form :model="formData" label-width="120px" :rules="rules" ref="ruleFormRef">
<el-form-item label="名称:" prop="name">
<el-input v-model="formData.name" placeholder="请输入名称"></el-input>
<el-input v-model="formData.name" placeholder="请输入名称" maxlength="32" show-word-limit @input="handleInput"></el-input>
</el-form-item>
<el-form-item label="IP:" prop="ip" class="top">
<el-input v-model="formData.ip" placeholder="请输入Ip"></el-input>
@@ -332,14 +332,31 @@ const tableStore = new TableStore({
})
// 点击行
const currentChangeEvent = () => {
// 确保 tableRef 和当前记录存在
if (!tableRef.value || !tableRef.value.getRef().getCurrentRecord()) {
loading.value = false;
dataSource.value = [];
return;
}
loading.value = true
dataSource.value = []
nodeDeviceTree({
nodeId: tableRef.value.getRef().getCurrentRecord().id
}).then(res => {
dataSource.value = res.data.processDeviceList.filter(item => (item.name = item.processNo + ''))
// 检查返回的数据是否存在且不为空
if (res.data && res.data.processDeviceList) {
dataSource.value = res.data.processDeviceList.filter(item => (item.name = item.processNo + ''))
} else {
dataSource.value = []
}
loading.value = false
}).catch(() => {
// 添加错误处理,确保 loading 状态也能关闭
dataSource.value = []
loading.value = false
})
// const row = tableRef.value.getRef().getCurrentRecord()
}
const treeRef = ref()
@@ -444,6 +461,10 @@ const resetForm = () => {
}
}
const handleInput = (val: string) => {
formData.value.name = val.replace(/\s+/g, '')
}
onMounted(() => {
setTimeout(() => {
tableStore.index()

View File

@@ -54,6 +54,7 @@
</el-button>
</el-form-item>
<el-form-item style="right: 0; position: absolute; overflow: hidden">
<div class="title">
<LocationInformation style="width: 16px; margin-right: 8px; color: #396" />
<span style="font-size: 16px; font-weight: bold; color: #396">当前操作节点</span>
@@ -2353,6 +2354,9 @@ const next = async () => {
// 撤销
const black = () => {
pageStatus.value = 1
busBarIndex.value = '0'
deviceIndex.value = '0';
lineIndex.value = '0';
}
// 确认提交
const onsubmit = () => {