@@ -203,7 +203,8 @@ export default {
userTypeEnumInt: 0,
errorMsg: '',
crcId: '',
- craId: ''
+ craId: '',
+ loading:false
}
},
mounted() {
@@ -211,13 +212,15 @@ export default {
},
methods: {
async initForm() {
+ this.loading = true
+ await this.getUserType()
Object.keys(this.data).forEach(key => {
this.form[key] = this.data[key]
})
if (zzSessionStorage.getItem('userTypeEnumInt')) {
this.userTypeEnumInt = zzSessionStorage.getItem('userTypeEnumInt') * 1
}
- this.getUserType()
+ this.loading = false
},
// 保存参与者信息
handleSave() {
@@ -275,13 +278,16 @@ export default {
},
// 获取系统用户类型
getUserType() {
- getUserTypeList(3).then(res => {
- this.userTypeOptions = res.Result
- var crcObj = res.Result.find(i => i.UserTypeEnum === 2)
- this.crcId = crcObj ? crcObj.Id : ''
- var craObj = res.Result.find(i => i.UserTypeEnum === 9)
- this.craId = craObj ? craObj.Id : ''
- })
+ return new Promise(resolve => {
+ getUserTypeList(3).then(res => {
+ this.userTypeOptions = res.Result
+ var crcObj = res.Result.find(i => i.UserTypeEnum === 2)
+ this.crcId = crcObj ? crcObj.Id : ''
+ var craObj = res.Result.find(i => i.UserTypeEnum === 9)
+ this.craId = craObj ? craObj.Id : ''
+ })
+ resolve()
+ }).catch(() => { resolve() })
},
handleIsCorrectChange(val) {
if (!val) {
From 5b40accc617e034bad0675ae8f63d6588aa39888 Mon Sep 17 00:00:00 2001
From: caiyiling <1321909229@qq.com>
Date: Mon, 15 Jan 2024 16:19:45 +0800
Subject: [PATCH 5/8] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=AD=E5=BF=83?=
=?UTF-8?q?=E8=B0=83=E7=A0=94?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.eslintignore | 2 +-
.gitignore | 1 +
.../components/HistoricalParticipantForm.vue | 193 +++++++++---------
.../research/components/ParticipantForm.vue | 158 ++++++++------
4 files changed, 195 insertions(+), 159 deletions(-)
diff --git a/.eslintignore b/.eslintignore
index 96d8bc74..a4566609 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -4,7 +4,7 @@ src/utils/*
public
dist
-src/*
+# src/*
src/views/dictionary/checkConfig/*
src/views/trials/trials-panel/trial-summary/*
src/main.js
diff --git a/.gitignore b/.gitignore
index 9ad28d23..701a8cf8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@ tests/**/coverage/
*.ntvs*
*.njsproj
*.sln
+.eslintignore
diff --git a/src/views/research/components/HistoricalParticipantForm.vue b/src/views/research/components/HistoricalParticipantForm.vue
index 9ddb675d..bdc9e38f 100644
--- a/src/views/research/components/HistoricalParticipantForm.vue
+++ b/src/views/research/components/HistoricalParticipantForm.vue
@@ -3,19 +3,11 @@
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
{{ item.UserType }}
-
-
- {{ item.label }}
+
+
+ {{
+ item.label }}
- {{ errorMsg }}
+ {{
+ errorMsg
+ }}
-
-