diff --git a/src/views/pqs/supervise/harmonicSurvey/components/planAdd.vue b/src/views/pqs/supervise/harmonicSurvey/components/planAdd.vue
index f8fea835..b6eb3e96 100644
--- a/src/views/pqs/supervise/harmonicSurvey/components/planAdd.vue
+++ b/src/views/pqs/supervise/harmonicSurvey/components/planAdd.vue
@@ -16,7 +16,7 @@
-
+
-->
-
+
@@ -164,8 +170,10 @@ const dictData = useDictData()
const supvTypeOptionList = dictData.getBasicData('supv_type')
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'
@@ -220,18 +228,19 @@ const rules = ref({
supvObjectName: [{ required: true, message: '请输入计划名称', trigger: 'blur' }],
planName: [{ required: true, message: '请输入计划名称', trigger: 'blur' }],
leader: [{ required: true, message: '请输入测试负责人', trigger: 'blur' }],
- substation: [{ required: true, message: '请选择关联电站', trigger: 'change' }]
+ substation: [{ required: true, message: '请选择关联电站', trigger: 'blur' }]
// fileList: [{ required: true, message: '请上传文件', trigger: 'change' }],
})
const changeSubstationFlag = () => {
console.log(form.value.customSubstationFlag)
//处理所属变电站手都输入1/下拉数据0
+ key.value++
if (form.value.customSubstationFlag == 0) {
rules.value.substation[0].message = '请选择关联电站'
- form.value.substation = ''
+ form.value.substation = []
} else {
rules.value.substation[0].message = '请输入关联电站'
- form.value.substation = []
+ form.value.substation = ''
}
}
const cancelFn = () => {
@@ -262,22 +271,21 @@ const submitFn = (flag: boolean) => {
const addForm = JSON.parse(JSON.stringify(form.value))
if (form.value.customSubstationFlag == 0) {
- addForm.substation = addForm.substation.length==0?'': addForm.substation.join(',')
+ addForm.substation = addForm.substation.length == 0 ? '' : addForm.substation.join(',')
}
addForm.saveOrCheckflag = '1'
- if (title.value == '计划新增') {
- addSurveyPlan(addForm).then(res => {
- cancelFn()
- emit('onsubmit')
- })
- }
+
+ addSurveyPlan(addForm).then(res => {
+ cancelFn()
+ emit('onsubmit')
+ })
} else {
formRef.value.validate(async (valid: any) => {
if (valid) {
//选择系统变电站
const addForm = JSON.parse(JSON.stringify(form.value))
if (form.value.customSubstationFlag == 0) {
- addForm.substation = addForm.substation.length==0?'': addForm.substation.join(',')
+ addForm.substation = addForm.substation.length == 0 ? '' : addForm.substation.join(',')
}
addForm.saveOrCheckflag = '2'
if (title.value == '计划新增') {
@@ -332,7 +340,9 @@ const open = (text: string, id: any) => {
})
title.value = text
planAddition.value = true
-
+ setTimeout(() => {
+ key.value++
+ }, 10)
if (id) {
detailById(id)
}
diff --git a/src/views/pqs/supervise/harmonicSurvey/components/planManage.vue b/src/views/pqs/supervise/harmonicSurvey/components/planManage.vue
index dfabe0ae..418af924 100644
--- a/src/views/pqs/supervise/harmonicSurvey/components/planManage.vue
+++ b/src/views/pqs/supervise/harmonicSurvey/components/planManage.vue
@@ -162,7 +162,9 @@ const tableStore = new TableStore({
disabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 0)
},
- click: row => {}
+ click: row => {
+ planAddRef.value.open('编辑', row.id, false)
+ }
},
{
name: 'edit',
diff --git a/src/views/pqs/supervise/harmonicSurvey/components/planTest.vue b/src/views/pqs/supervise/harmonicSurvey/components/planTest.vue
index 90e7be64..ff5639e5 100644
--- a/src/views/pqs/supervise/harmonicSurvey/components/planTest.vue
+++ b/src/views/pqs/supervise/harmonicSurvey/components/planTest.vue
@@ -1,82 +1,84 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 上传文件
-
-
-
-
-
-
- 是
- 否
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传文件
+
+
+
+
+
+
+ 是
+ 否
+
+
+
+
+
+
+
+
+
+
+
-
-