二级评估bug修改
This commit is contained in:
@@ -100,7 +100,7 @@ const submit = async () => {
|
||||
formRef.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
try {
|
||||
ElMessage.info('评估中...')
|
||||
ElMessage.info('正在评估中...')
|
||||
// 调用后端评估接口
|
||||
const formData = new FormData()
|
||||
formData.append('assessId',currentNodeId.value)
|
||||
|
||||
@@ -71,6 +71,7 @@ import Outcome from './outcome.vue'
|
||||
import {exportResult,downloadAssessTemplate,assessResult,userGetInfo} from '@/api/advance-boot/assess'
|
||||
import { Loading } from '@element-plus/icons-vue'
|
||||
import AssessTemplate from './assessTemplate.vue'
|
||||
import { fa } from 'element-plus/es/locale'
|
||||
|
||||
|
||||
defineOptions({
|
||||
@@ -276,7 +277,23 @@ if (!data ||
|
||||
return
|
||||
}
|
||||
|
||||
// 点击的是子节点,更新高亮状态
|
||||
|
||||
// 如果点击的是同一个节点,不需要重新加载,但可以提供刷新功能
|
||||
if (currentNodeId.value === data?.id) {
|
||||
// 可选:如果你希望重复点击能刷新数据,可以保留下面的代码
|
||||
// 否则可以直接 return 不做任何操作
|
||||
infoLoading.value = true
|
||||
outcomeLoading.value = true
|
||||
// 强制触发子组件重新加载,通过先置空再恢复
|
||||
const tempId = currentNodeId.value
|
||||
currentNodeId.value = null
|
||||
nextTick(() => {
|
||||
currentNodeId.value = tempId
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 点击的是不同的子节点,更新高亮状态
|
||||
lastValidNodeKey.value = data?.id || null
|
||||
currentTreeKey.value = lastValidNodeKey.value
|
||||
dotList.value = data
|
||||
|
||||
@@ -117,8 +117,8 @@
|
||||
<el-input-number
|
||||
v-else-if="item.field == 'powerFactor'"
|
||||
v-model="form[item.field]"
|
||||
:min="0"
|
||||
:max="1"
|
||||
:min="0.1"
|
||||
:max="0.9"
|
||||
:step="0.1"
|
||||
:precision="1"
|
||||
placeholder="请输入功率因数"
|
||||
@@ -134,8 +134,9 @@
|
||||
item.field == 's'||
|
||||
item.field == 'transhighCapacity'||
|
||||
item.field == 'transImpedance'||
|
||||
item.field == 'nonlinearloadPower'
|
||||
|
||||
item.field == 'nonlinearloadPower' ||
|
||||
item.field == 'inpactloadNum' ||
|
||||
item.field =='isolationtransImpedance'
|
||||
"
|
||||
style="width: 100%"
|
||||
v-model="form[item.field]"
|
||||
|
||||
@@ -141,6 +141,8 @@
|
||||
v-model.trim="form.powersupplyCapacity"
|
||||
show-word-limit
|
||||
placeholder="请输入值"
|
||||
min="1"
|
||||
max="9999"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="最小短路容量(MVA)" prop="minshortcircuitCapacity">
|
||||
@@ -149,6 +151,8 @@
|
||||
v-model.trim="form.minshortcircuitCapacity"
|
||||
show-word-limit
|
||||
placeholder="请输入值"
|
||||
min="1"
|
||||
max="9999"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="PCC点名称" prop="lineId">
|
||||
@@ -317,7 +321,7 @@ const onsubmit = () => {
|
||||
if (valid2) {
|
||||
if(form.value.assessId){
|
||||
userEdit(form.value).then((res: any) => {
|
||||
form.value.assessId = res.data
|
||||
//form.value.assessId = res.data
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '编辑成功!'
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
v-for="item in voltageleveloption"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -65,7 +65,7 @@
|
||||
v-for="item in voltageleveloption"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -245,7 +245,7 @@ watch(
|
||||
(newQuery) => {
|
||||
tableStore.index()
|
||||
},
|
||||
{ immediate: true }
|
||||
// { immediate: true }
|
||||
)
|
||||
|
||||
// 新增评估用户页面
|
||||
|
||||
@@ -402,6 +402,11 @@ const info = async (i: number) => {
|
||||
const typeId = ref(null)
|
||||
// 过滤数据
|
||||
const formatter = (row: any) => {
|
||||
// 检查数据是否已加载完成
|
||||
if (!row.cellValue && row.cellValue !== 0) {
|
||||
return ''; // 数据未加载时返回空字符串
|
||||
}
|
||||
|
||||
if (row.column.field == 'transtypeId') {
|
||||
if (row.cellValue) {
|
||||
const found = transformer.value.find((item: any) => item.transtypeId == row.cellValue)
|
||||
@@ -430,7 +435,11 @@ const formatter = (row: any) => {
|
||||
}
|
||||
else if (row.column.field == 'harmId') {
|
||||
const found = characteristic.value.find((item: any) => item.harmId == row.cellValue)
|
||||
return found.harmName || '' // 使用可选链并提供默认值
|
||||
if(found){
|
||||
return found.harmName
|
||||
}else{
|
||||
return ''
|
||||
}
|
||||
} else if (
|
||||
row.column.field == 'capacitorScale' ||
|
||||
row.column.field == 'linevoltageScale' ||
|
||||
@@ -459,7 +468,7 @@ const dictionary = () => {
|
||||
})
|
||||
|
||||
}
|
||||
onMounted(async () => {
|
||||
onBeforeMount(async () => {
|
||||
await dictionary()
|
||||
info(0) // 变压器参数维护
|
||||
info(1) // 电容器参数维护
|
||||
|
||||
Reference in New Issue
Block a user