From 8a18771d78353386b36590a5a517fcd734c96e40 Mon Sep 17 00:00:00 2001
From: GGJ <357021191@qq.com>
Date: Thu, 20 Jun 2024 11:32:49 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=8A=80=E6=9C=AF?=
=?UTF-8?q?=E7=9B=91=E7=9D=A3=20=E8=8D=89=E7=A8=BF=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../harmonicSurvey/components/planAdd.vue | 42 +-
.../harmonicSurvey/components/planManage.vue | 4 +-
.../harmonicSurvey/components/planTest.vue | 395 +++++++++---------
.../harmonicSurvey/components/testManage.vue | 9 +-
4 files changed, 241 insertions(+), 209 deletions(-)
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 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 上传文件
-
-
-
-
-
-
- 是
- 否
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传文件
+
+
+
+
+
+
+ 是
+ 否
+
+
+
+
+
+
+
+
+
+
+
-
-