修改bug

This commit is contained in:
zhujiyan
2024-10-30 15:02:25 +08:00
parent 038b5275ea
commit 45942b3205
15 changed files with 57 additions and 483 deletions

View File

@@ -178,10 +178,9 @@
</el-dialog>
</template>
<script lang="ts" setup>
import { ref, inject, defineEmits, provide, nextTick, watch, onMounted } from 'vue'
import { ref, defineEmits } from 'vue'
import { ElMessage } from 'element-plus'
import { Plus, Minus, Message, ArrowRight, ArrowLeft } from '@element-plus/icons-vue'
import { addPlan, addRecord, updateRecord, getDeviceList, addDevice, delDevice } from '@/api/cs-device-boot/planData'
import { addPlan, addRecord, updateRecord, getDeviceList } from '@/api/cs-device-boot/planData'
import { useDictData } from '@/stores/dictData'
import TreeTransfers from './treeTransfers.vue'
const dictData = useDictData()
@@ -279,7 +278,6 @@ const changeVoltageLevel = async () => {
}
//PT变比 电压<0.48kv 1:1 电压>0.48 *1000/100
console.log(value,"999");
if (Number(value) <= 0.48) {
form1.value.pt = 1
form1.value.pt1 = 1
@@ -410,7 +408,6 @@ const detailsType = (val: any) => {
}
//回显方案、测试项操作
const details = (val: any) => {
console.log(val, '88888')
if (val) {
form.value = {
describe: val.describe,
@@ -421,23 +418,6 @@ const details = (val: any) => {
form1.value = val
checkedIdList.value = form1.value.list
}
return
//修改方案回显
if (popupType.value == 1) {
form.value = JSON.parse(JSON.stringify(val))
}
//修改测试项回显
if (popupType.value == 3) {
if (val.records[0] && val.records.length != 0) {
form1.value = JSON.parse(JSON.stringify(val.records[0]))
} else {
initForm()
}
}
if (popupType.value != 1 && popupType.value != 3) {
initForm()
}
}
//未绑定数据tree
const unBindList = ref([])
@@ -566,9 +546,6 @@ const submit = () => {
id: planId.value,
records: [form1.value]
}
// subForm.list = tableData.value.map(item => {
// return item.id
// })
subForm.records[0].list = checkedIdList.value
addRecord(subForm).then(res => {
ElMessage.success('新增测试项成功')
@@ -591,23 +568,6 @@ const submit = () => {
close()
}
})
return
ruleFormRef2.value.validate((valid: any) => {
if (valid) {
let subForm = JSON.parse(JSON.stringify(form1.value))
subForm.list = checkedIdList.value
updateRecord(subForm).then((res: any) => {
if (res.code == 'A0000') {
ElMessage.success('修改测试项成功')
initForm()
emit('onSubmit')
close()
}
})
} else {
console.log('校验不通过')
}
})
}
}
defineExpose({ open, details, detailsType })
@@ -632,7 +592,6 @@ defineExpose({ open, details, detailsType })
.device_info {
width: 100%;
display: flex;
// justify-content: space-between;
.left_device,
.right_device {