自定义标准阅片单元配置优化

uat_us
caiyiling 2024-04-25 13:15:00 +08:00
parent 8d36fde03d
commit 04b22f5b50
1 changed files with 7 additions and 12 deletions

View File

@ -76,10 +76,10 @@
</el-form-item> </el-form-item>
<!-- 文件类型 --> <!-- 文件类型 -->
<el-form-item <el-form-item
v-if="form.Type === 'upload'" v-show="form.Type === 'upload'"
:label="$t('trials:readingUnit:qsList:title:FileType')" :label="$t('trials:readingUnit:qsList:title:FileType')"
prop="FileType" prop="FileType"
:rules="[{ type: 'array', required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur', 'change'] }]" :rules="[{ type: 'array', required: form.Type === 'upload', message: this.$t('common:ruleMessage:specify'), trigger: [ 'change'] }]"
> >
<el-checkbox-group <el-checkbox-group
v-model="form.FileType" v-model="form.FileType"
@ -910,27 +910,22 @@ export default {
await this.getGroupOptions() await this.getGroupOptions()
await this.getParentQuestions() await this.getParentQuestions()
await this.getLesionType() await this.getLesionType()
console.log('data', this.data)
if (Object.keys(this.data).length > 0) { if (Object.keys(this.data).length > 0) {
for (const k in this.form) { for (const k in this.form) {
if (k === 'CalculateQuestions' && this.data[k] !== undefined) { if (k === 'CalculateQuestions' && this.data[k] !== undefined) {
console.log(this.data[k])
this.form[k] = JSON.parse(this.data[k]) this.form[k] = JSON.parse(this.data[k])
console.log('CalculateQuestions', this.form[k])
} else if (k === 'ClassifyAlgorithms' && this.data[k] !== undefined && this.data[k] !== '') { } else if (k === 'ClassifyAlgorithms' && this.data[k] !== undefined && this.data[k] !== '') {
this.ClassifyAlgorithmsList = JSON.parse(this.data[k]) this.ClassifyAlgorithmsList = JSON.parse(this.data[k])
console.log(11111, this.form) } else if(k === 'FileType'){
if (this.data[k]){
this.form[k] = this.data[k].split(',')
}
} else { } else {
if (this.data.hasOwnProperty(k)) { if (this.data.hasOwnProperty(k)) {
this.form[k] = this.data[k] this.form[k] = this.data[k]
} }
} }
} }
if (this.form.FileType && this.form.FileType.length > 0) {
this.form.FileType = this.form.FileType.split(',')
} else {
this.form.FileType = []
}
if (this.form.ParentId !== '' && this.form.ParentId !== null && this.form.GroupName !== '') { if (this.form.ParentId !== '' && this.form.ParentId !== null && this.form.GroupName !== '') {
this.isParentExistGroup = true this.isParentExistGroup = true
} }
@ -986,7 +981,7 @@ export default {
if (this.form.Type !== 'upload') { if (this.form.Type !== 'upload') {
this.form.ImageCount = 0 this.form.ImageCount = 0
} }
params.FileType = this.form.FileType.toString() params.FileType = this.form.FileType.join(',')
addOrUpdateReadingQuestionTrial(params).then(res => { addOrUpdateReadingQuestionTrial(params).then(res => {
this.$emit('getList') this.$emit('getList')
this.loading = false this.loading = false