提交调研表逻辑更改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
c2083e9c9c
commit
d2fc9ad981
|
@ -123,32 +123,34 @@ export default {
|
||||||
this.submit(type)
|
this.submit(type)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
submit(type) {
|
async submit(type) {
|
||||||
// 是否确认提交
|
try {
|
||||||
this.$confirm(this.userTypeEnumInt === 0 ? this.$t('trials:researchForm:message:submitWarning') : this.$t('trials:researchForm:message:submitWarning2'), {
|
const confirm = await this.$confirm(
|
||||||
type: 'warning',
|
this.userTypeEnumInt === 0 ? this.$t('trials:researchForm:message:submitWarning') : this.$t('trials:researchForm:message:submitWarning2'),
|
||||||
distinguishCancelAndClose: true
|
{
|
||||||
}).then(() => {
|
type: 'warning',
|
||||||
this.loading = true
|
distinguishCancelAndClose: true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if (confirm !== 'confirm') return
|
||||||
var param = {
|
var param = {
|
||||||
TrialId: this.trialId,
|
TrialId: this.trialId,
|
||||||
TrialSiteSurveyId: this.trialSiteSurveyId
|
TrialSiteSurveyId: this.trialSiteSurveyId
|
||||||
}
|
}
|
||||||
trialSurveySubmit(param).then((res) => {
|
const res = await trialSurveySubmit(param)
|
||||||
this.loading = false
|
this.loading = false
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.initPage()
|
this.initPage()
|
||||||
if (this.userTypeEnumInt !== 0) {
|
if (type === 'approve') {
|
||||||
this.$emit('refreshPage')
|
this.$message.success(this.$t('common:message:approvedSuccessfully'))
|
||||||
}
|
} else {
|
||||||
if (type === 'approve') {
|
this.$message.success(this.$t('trials:researchForm:message:savedSuccessfully'))
|
||||||
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() {
|
handleBack() {
|
||||||
|
|
Loading…
Reference in New Issue