全局阅片配置bug修复

uat_us
caiyiling 2024-04-25 11:25:54 +08:00
parent 88f2c34db9
commit 0680bdf805
2 changed files with 32 additions and 15 deletions

View File

@ -215,7 +215,7 @@ export default {
} }
this.isSign = res.Result.IsSign this.isSign = res.Result.IsSign
} }
this.form.GlobalAssessTypeIdsStr = this.form.GlobalAssessTypeIds.map(v => this.$fd('GlobalAssessType', v, 'id')).toString() // this.form.GlobalAssessTypeIdsStr = this.form.GlobalAssessTypeIds.map(v => this.$fd('GlobalAssessType', v, 'id')).toString()
this.loading = false this.loading = false
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
@ -223,11 +223,19 @@ export default {
}, },
handleSave(isPrompt) { handleSave(isPrompt) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.$refs['globalReadingForm'].validate((valid) => { this.$refs['globalReadingForm'].validate(async(valid) => {
if (!valid) { if (!valid) {
resolve(false) resolve(false)
} else { } else {
this.loading = true this.loading = true
if(this.form.GlobalAssessTypes.length === 0){
try{
let res = await getTrialConfigGlobalReadingInfo({ trialId: this.$route.query.trialId, TrialReadingCriterionId: this.trialReadingCriterionId })
this.form.GlobalAssessTypes = res.Result.GlobalAssessTypes
}catch(e){
console.log(e)
}
}
// //
this.form.TrialId = this.$route.query.trialId this.form.TrialId = this.$route.query.trialId
this.form.TrialReadingCriterionId = this.trialReadingCriterionId this.form.TrialReadingCriterionId = this.trialReadingCriterionId

View File

@ -3,7 +3,7 @@
<div v-if="isShow" class="content"> <div v-if="isShow" class="content">
<el-tabs v-model="TrialReadingCriterionId" type="border-card"> <el-tabs v-model="TrialReadingCriterionId" type="border-card">
<template v-for="item of trialCriterionList"> <template v-for="item of trialCriterionList">
<el-tab-pane v-if="isPaneShow" :key="item.TrialReadingCriterionId" :label="item.TrialReadingCriterionName" :name="item.TrialReadingCriterionId"> <el-tab-pane :key="item.TrialReadingCriterionId" :label="item.TrialReadingCriterionName" :name="item.TrialReadingCriterionId">
<div style="text-align: right;padding-bottom: 10px"> <div style="text-align: right;padding-bottom: 10px">
<!-- 同步当前标准 --> <!-- 同步当前标准 -->
<el-button <el-button
@ -17,7 +17,7 @@
{{ $t('trials:readingUnit:button:sync') }} {{ $t('trials:readingUnit:button:sync') }}
</el-button> </el-button>
</div> </div>
<el-collapse v-model="activeCollapse" class="setting-config"> <el-collapse v-model="activeCollapse" class="setting-config" v-if="item.isPaneShow && item.TrialReadingCriterionId === TrialReadingCriterionId" >
<!-- 阅片规则 --> <!-- 阅片规则 -->
<el-collapse-item :title="$t('trials:readingUnit:readingRules')" name="1"> <el-collapse-item :title="$t('trials:readingUnit:readingRules')" name="1">
<ReadingRules <ReadingRules
@ -142,13 +142,14 @@ export default {
}, },
watch: { watch: {
async TrialReadingCriterionId(v) { async TrialReadingCriterionId(v) {
await this.asyncTrialCriterionDictionary(v) // await this.asyncTrialCriterionDictionary(v)
let o = this.trialCriterionList.find(i => i.TrialReadingCriterionId === v) // let i = this.trialCriterionList.findIndex(i => i.TrialReadingCriterionId === v)
this.CriterionType = o.CriterionType // if(i === -1) return
this.isPaneShow = false // this.CriterionType = this.trialCriterionList[i].CriterionType
this.$nextTick(() => { // this.trialCriterionList[i].isPaneShow = false
this.isPaneShow = true // this.$nextTick(() => {
}) // this.trialCriterionList[i].isPaneShow = true
// })
} }
}, },
mounted() { mounted() {
@ -177,11 +178,14 @@ export default {
signInfo: signInfo signInfo: signInfo
} }
resetAndAsyncCriterion(params).then(res => { resetAndAsyncCriterion(params).then(res => {
this.isPaneShow = false this.loading = false
let i = this.trialCriterionList.findIndex(i => i.TrialReadingCriterionId === this.TrialReadingCriterionId)
if(i === -1) return
this.trialCriterionList[i].isPaneShow = false
this.$nextTick(() => { this.$nextTick(() => {
this.signVisible2 = false this.signVisible2 = false
this.isPaneShow = true this.trialCriterionList[i].isPaneShow = true
this.loading = false
}) })
}).catch(() => { }).catch(() => {
this.$refs['signForm2'].btnLoading = false this.$refs['signForm2'].btnLoading = false
@ -197,7 +201,12 @@ export default {
}, },
getTrialCriterionList() { getTrialCriterionList() {
getTrialCriterionList(this.trialId, false).then(async res => { getTrialCriterionList(this.trialId, false).then(async res => {
this.trialCriterionList = res.Result this.trialCriterionList = res.Result.map(item=>{
return {
...item,
isPaneShow: true,
}
})
this.TrialReadingCriterionId = this.trialCriterionList[0].TrialReadingCriterionId this.TrialReadingCriterionId = this.trialCriterionList[0].TrialReadingCriterionId
this.isShow = true this.isShow = true
}).catch(() => { }).catch(() => {