修改中心调研缺陷

uat_us
caiyiling 2024-01-15 15:27:45 +08:00
parent 7a6bac4c6c
commit e4453bced6
2 changed files with 22 additions and 13 deletions

View File

@ -250,9 +250,12 @@ export default {
}, },
// //
getUserType() { getUserType() {
getUserTypeList(3).then(res => { return new Promise(resolve => {
this.userTypeOptions = res.Result getUserTypeList(3).then(res => {
}) this.userTypeOptions = res.Result
})
resolve()
}).catch(() => { resolve() })
} }
} }
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<el-form ref="participantForm" :model="form" :rules="rules" label-width="200px" :inline="true"> <el-form ref="participantForm" :model="form" :rules="rules" label-width="200px" :inline="true" v-loading="loading">
<div class="base-dialog-body"> <div class="base-dialog-body">
<!-- --> <!-- -->
<el-form-item :label="$t('trials:staffResearch:form:lastName')" prop="LastName"> <el-form-item :label="$t('trials:staffResearch:form:lastName')" prop="LastName">
@ -203,7 +203,8 @@ export default {
userTypeEnumInt: 0, userTypeEnumInt: 0,
errorMsg: '', errorMsg: '',
crcId: '', crcId: '',
craId: '' craId: '',
loading:false
} }
}, },
mounted() { mounted() {
@ -211,13 +212,15 @@ export default {
}, },
methods: { methods: {
async initForm() { async initForm() {
this.loading = true
await this.getUserType()
Object.keys(this.data).forEach(key => { Object.keys(this.data).forEach(key => {
this.form[key] = this.data[key] this.form[key] = this.data[key]
}) })
if (zzSessionStorage.getItem('userTypeEnumInt')) { if (zzSessionStorage.getItem('userTypeEnumInt')) {
this.userTypeEnumInt = zzSessionStorage.getItem('userTypeEnumInt') * 1 this.userTypeEnumInt = zzSessionStorage.getItem('userTypeEnumInt') * 1
} }
this.getUserType() this.loading = false
}, },
// //
handleSave() { handleSave() {
@ -275,13 +278,16 @@ export default {
}, },
// //
getUserType() { getUserType() {
getUserTypeList(3).then(res => { return new Promise(resolve => {
this.userTypeOptions = res.Result getUserTypeList(3).then(res => {
var crcObj = res.Result.find(i => i.UserTypeEnum === 2) this.userTypeOptions = res.Result
this.crcId = crcObj ? crcObj.Id : '' var crcObj = res.Result.find(i => i.UserTypeEnum === 2)
var craObj = res.Result.find(i => i.UserTypeEnum === 9) this.crcId = crcObj ? crcObj.Id : ''
this.craId = craObj ? craObj.Id : '' var craObj = res.Result.find(i => i.UserTypeEnum === 9)
}) this.craId = craObj ? craObj.Id : ''
})
resolve()
}).catch(() => { resolve() })
}, },
handleIsCorrectChange(val) { handleIsCorrectChange(val) {
if (!val) { if (!val) {