提交调研表逻辑更改
continuous-integration/drone/push Build is passing Details

uat_us
caiyiling 2024-07-09 16:27:33 +08:00
parent c2083e9c9c
commit d2fc9ad981
1 changed files with 23 additions and 21 deletions

View File

@ -123,32 +123,34 @@ export default {
this.submit(type)
}
},
submit(type) {
//
this.$confirm(this.userTypeEnumInt === 0 ? this.$t('trials:researchForm:message:submitWarning') : this.$t('trials:researchForm:message:submitWarning2'), {
type: 'warning',
distinguishCancelAndClose: true
}).then(() => {
this.loading = true
async submit(type) {
try {
const confirm = await this.$confirm(
this.userTypeEnumInt === 0 ? this.$t('trials:researchForm:message:submitWarning') : this.$t('trials:researchForm:message:submitWarning2'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
var param = {
TrialId: this.trialId,
TrialSiteSurveyId: this.trialSiteSurveyId
}
trialSurveySubmit(param).then((res) => {
this.loading = false
if (res.IsSuccess) {
this.initPage()
if (this.userTypeEnumInt !== 0) {
this.$emit('refreshPage')
}
if (type === 'approve') {
this.$message.success(this.$t('common:message:approvedSuccessfully'))
} else {
this.$message.success(this.$t('trials:researchForm:message:savedSuccessfully'))
}
const res = await trialSurveySubmit(param)
this.loading = false
if (res.IsSuccess) {
this.initPage()
if (type === 'approve') {
this.$message.success(this.$t('common:message:approvedSuccessfully'))
} else {
this.$message.success(this.$t('trials:researchForm:message:savedSuccessfully'))
}
}).catch(() => { this.loading = false })
}).catch(() => {})
}
} catch (e) {
this.loading = false
console.log(e)
}
},
// 退
handleBack() {