在线设备录入左侧树微调

This commit is contained in:
sjl
2025-10-31 11:23:28 +08:00
parent 443d5ab2bd
commit 13c0a28c95

View File

@@ -314,7 +314,8 @@
label="装置mac地址:"
:rules="{ required: true, message: '请输入装置mac地址', trigger: 'blur' }"
>
<MacAddressInput v-model="busItem.mac" :disabled="!(pageStatus == 2 && nodeLevel >= 2)"/>
<MacAddressInput v-model="busItem.mac"
:disabled="!(pageStatus == 2 && nodeLevel == 2)"/>
</el-form-item>
<!-- <el-form-item
class="form-item"
@@ -346,7 +347,7 @@
filterable
v-model="busItem.nodeId"
placeholder="请选择所属前置机"
:disabled="!(pageStatus == 2 && nodeLevel >= 2)"
:disabled="!(pageStatus == 2 && nodeLevel == 2)"
>
<el-option
v-for="option in affiliatiedFrontArr"
@@ -479,17 +480,21 @@
:rules="{ required: true, message: '请输入pt', trigger: 'blur' }"
>
<div style="width: 100%; display: flex; justify-content: space-between">
<el-input
<el-input-number
:controls="false"
:min="1"
style="width: 48%"
v-model="lineItem.ptRatio"
:disabled="!((nodeLevel == 4 && pageStatus == 3) || ((nodeLevel == 3 || (nodeLevel == 2 && pageStatus == 2)) && pageStatus == 2))"
></el-input>
></el-input-number>
<span style="display: flex; align-items: center; justify-content: center;">:</span>
<el-input
<el-input-number
:controls="false"
:min="1"
style="width: 48%"
v-model="lineItem.pt2Ratio"
:disabled="!((nodeLevel == 4 && pageStatus == 3) || ((nodeLevel == 3 || (nodeLevel == 2 && pageStatus == 2)) && pageStatus == 2))"
></el-input>
></el-input-number>
</div>
</el-form-item>
<el-form-item
@@ -498,17 +503,21 @@
:rules="{ required: true, message: '请输入ct', trigger: 'blur' }"
>
<div style="width: 100%; display: flex; justify-content: space-between">
<el-input
<el-input-number
:controls="false"
:min="1"
style="width: 48%"
v-model="lineItem.ctRatio"
:disabled="!((nodeLevel == 4 && pageStatus == 3) || ((nodeLevel == 3 || (nodeLevel == 2 && pageStatus == 2)) && pageStatus == 2))"
></el-input>
></el-input-number>
<span style="display: flex; align-items: center; justify-content: center;">:</span>
<el-input
<el-input-number
:controls="false"
:min="1"
style="width: 48%"
v-model="lineItem.ct2Ratio"
:disabled="!((nodeLevel == 4 && pageStatus == 3) || ((nodeLevel == 3 || (nodeLevel == 2 && pageStatus == 2)) && pageStatus == 2))"
></el-input>
></el-input-number>
</div>
</el-form-item>
<el-form-item
@@ -818,6 +827,21 @@ const nodeClick = (e: anyObj, data: any) => {
cleanUnnecessaryData()
/**不是根节点请求数据 */
queryNodeContent()
// 关键修改确保tabs展开
setTimeout(() => {
// 设置默认选中的tab索引
if (nodeLevel.value >= 2 && projectInfoList.value.length > 0) {
deviceIndex.value = '0'
}
if (nodeLevel.value >= 3 && deviceInfoList.value.length > 0) {
busBarIndex.value = '0'
}
if (nodeLevel.value >= 4 && lineInfoList.value.length > 0) {
lineIndex.value = '0'
}
}, 100)
treeClickCount.value = 0
}
@@ -1057,10 +1081,10 @@ const add = () => {
lineNo: 1,
conType: 0,
lineInterval: 1,
ptRatio: 0,
pt2Ratio: 0,
ctRatio: 0,
ct2Ratio: 0,
ptRatio: 1,
pt2Ratio: 1,
ctRatio: 1,
ct2Ratio: 1,
volGrade: '',
devMac:'',
})
@@ -1229,10 +1253,10 @@ const updateLineFunc = (id: any) => {
lineNo: currentLine.lineNo || 1,
conType: currentLine.conType || 0,
lineInterval: currentLine.lineInterval || 1,
ptRatio: currentLine.ptRatio || 0,
pt2Ratio: currentLine.pt2Ratio || 0,
ctRatio: currentLine.ctRatio || 0,
ct2Ratio: currentLine.ct2Ratio || 0,
ptRatio: currentLine.ptRatio || 1,
pt2Ratio: currentLine.pt2Ratio || 1,
ctRatio: currentLine.ctRatio || 1,
ct2Ratio: currentLine.ct2Ratio || 1,
volGrade: volGradeValue || 0,
devMac: devMac,
devId: devId,
@@ -1414,10 +1438,10 @@ const next = async () => {
lineNo: 1,
conType: 0,
lineInterval: 1,
ptRatio: 0,
pt2Ratio: 0,
ctRatio: 0,
ct2Ratio: 0,
ptRatio: 1,
pt2Ratio: 1,
ctRatio: 1,
ct2Ratio: 1,
volGrade: '',
devMac: '',
})
@@ -1822,10 +1846,10 @@ const resetAllForms = () => {
line.lineNo = 1
line.conType = 0
line.lineInterval = 1
line.ptRatio = 0
line.pt2Ratio = 0
line.ctRatio = 0
line.ct2Ratio = 0
line.ptRatio = 1
line.pt2Ratio = 1
line.ctRatio = 1
line.ct2Ratio = 1
line.volGrade = ''
})
@@ -2155,10 +2179,10 @@ const handleLineTabsEdit = (targetName: any, action: any) => {
lineNo: 1,
conType: 0,
lineInterval: 1,
ptRatio: 0,
pt2Ratio: 0,
ctRatio: 0,
ct2Ratio: 0,
ptRatio: 1,
pt2Ratio: 1,
ctRatio: 1,
ct2Ratio: 1,
volGrade: '',
devMac: '',
})