修改 草稿 功能 bug
This commit is contained in:
@@ -172,8 +172,6 @@ const title = ref('')
|
||||
const planAddition = ref(false)
|
||||
const key: any = ref(0)
|
||||
const dynamicProp = computed(() => {
|
||||
console.log(123);
|
||||
|
||||
return supvTypeOptionList.filter(item => item.id === form.value.supvType)[0]?.code == 'Technical_Super'
|
||||
? ''
|
||||
: 'substation'
|
||||
@@ -234,7 +232,7 @@ const rules = ref({
|
||||
const changeSubstationFlag = () => {
|
||||
console.log(form.value.customSubstationFlag)
|
||||
//处理所属变电站手都输入1/下拉数据0
|
||||
key.value++
|
||||
key.value += 1
|
||||
if (form.value.customSubstationFlag == 0) {
|
||||
rules.value.substation[0].message = '请选择关联电站'
|
||||
form.value.substation = []
|
||||
@@ -262,7 +260,10 @@ const loadData = () => {
|
||||
const detailById = (id: any) => {
|
||||
getById(id).then(res => {
|
||||
form.value = res.data
|
||||
form.value.substation = res.data.substation.split(',')
|
||||
|
||||
form.value.substation =
|
||||
res.data.customSubstationFlag == 0 ? res.data.substation.split(',') : res.data.substation
|
||||
key.value += 1
|
||||
})
|
||||
}
|
||||
// 提交
|
||||
@@ -277,6 +278,7 @@ const submitFn = (flag: boolean) => {
|
||||
|
||||
addSurveyPlan(addForm).then(res => {
|
||||
cancelFn()
|
||||
ElMessage.success('保存成功!')
|
||||
emit('onsubmit')
|
||||
})
|
||||
} else {
|
||||
@@ -291,11 +293,13 @@ const submitFn = (flag: boolean) => {
|
||||
if (title.value == '计划新增') {
|
||||
addSurveyPlan(addForm).then(res => {
|
||||
cancelFn()
|
||||
ElMessage.success('计划新增成功!')
|
||||
emit('onsubmit')
|
||||
})
|
||||
} else {
|
||||
updateSurveyPlan(addForm).then(res => {
|
||||
cancelFn()
|
||||
ElMessage.success('重新发起成功!')
|
||||
emit('onsubmit')
|
||||
})
|
||||
}
|
||||
@@ -341,7 +345,7 @@ const open = (text: string, id: any) => {
|
||||
title.value = text
|
||||
planAddition.value = true
|
||||
setTimeout(() => {
|
||||
key.value++
|
||||
key.value += 1
|
||||
}, 10)
|
||||
if (id) {
|
||||
detailById(id)
|
||||
|
||||
Reference in New Issue
Block a user