Compare commits
No commits in common. "8f46819b9a8a1a00a92932dcee27456cac3d1955" and "b209c6566b509e294dcf1b6457e4dc544bd0dc85" have entirely different histories.
8f46819b9a
...
b209c6566b
|
@ -22,15 +22,12 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-for="item in exportInfo.DicList"
|
v-for="item in exportInfo.DicList"
|
||||||
:key="item.Code"
|
:key="item.Code"
|
||||||
:label="$i18n.locale === 'zh' ? item.ValueCN : item.Value"
|
:label="$i18n.locale === 'zh' ? item.ValueCN : item.Value">
|
||||||
|
|
||||||
>
|
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
@change="() => changeState(scope, item.Code)"
|
@change="() => changeState(scope, item.Code)"
|
||||||
:checked="getCheckState(scope, item.Code)"
|
:checked="getCheckState(scope, item.Code)"
|
||||||
:disabled="getDisabledState(scope.row, item)"
|
:disabled="getDisabledState(scope.row, item)"
|
||||||
v-show="!scope.row.IsGroup || !scope.row.HasChildren"
|
|
||||||
>
|
>
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</template>
|
</template>
|
||||||
|
@ -46,7 +43,6 @@
|
||||||
v-model="scope.row.CDISCCode"
|
v-model="scope.row.CDISCCode"
|
||||||
size="mini"
|
size="mini"
|
||||||
:disabled="scope.row.HasChildren || scope.row.IsTableQuestion"
|
:disabled="scope.row.HasChildren || scope.row.IsTableQuestion"
|
||||||
v-show="!scope.row.IsGroup || !scope.row.HasChildren"
|
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
|
@ -95,7 +91,29 @@ export default {
|
||||||
async submit() {
|
async submit() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
try {
|
try {
|
||||||
let params = this.filterQuestions(this.exportInfo.QuestionList)
|
let params= {
|
||||||
|
questionList: [],
|
||||||
|
tableQuestionList: []
|
||||||
|
}
|
||||||
|
params.questionList = this.exportInfo.QuestionList.map(i => {
|
||||||
|
return {
|
||||||
|
questionId: i.QuestionId,
|
||||||
|
tableQuestionId: i.TableQuestionId,
|
||||||
|
exportResult: i.ExportResult,
|
||||||
|
CDISCCode: i.CDISCCode
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.exportInfo.QuestionList.forEach(i => {
|
||||||
|
let childlist = i.Children.map(k => {
|
||||||
|
return {
|
||||||
|
questionId: i.QuestionId,
|
||||||
|
tableQuestionId: k.TableQuestionId,
|
||||||
|
exportResult: k.ExportResult,
|
||||||
|
CDISCCode: k.CDISCCode
|
||||||
|
}
|
||||||
|
})
|
||||||
|
params.tableQuestionList = params.tableQuestionList.concat(childlist)
|
||||||
|
})
|
||||||
let res = await setTrialQuestionExportResult(params)
|
let res = await setTrialQuestionExportResult(params)
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
|
@ -106,36 +124,6 @@ export default {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
filterQuestions(arr) {
|
|
||||||
let params= {
|
|
||||||
questionList: [],
|
|
||||||
tableQuestionList: []
|
|
||||||
}
|
|
||||||
for (let i of arr) {
|
|
||||||
if (!i.IsGroup && !i.IsTableQuestion) {
|
|
||||||
params.questionList.push({
|
|
||||||
questionId: i.QuestionId,
|
|
||||||
tableQuestionId: i.TableQuestionId,
|
|
||||||
exportResult: i.ExportResult,
|
|
||||||
CDISCCode: i.CDISCCode
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (i.TableQuestionId) {
|
|
||||||
params.tableQuestionList.push({
|
|
||||||
questionId: i.QuestionId,
|
|
||||||
tableQuestionId: i.TableQuestionId,
|
|
||||||
exportResult: i.ExportResult,
|
|
||||||
CDISCCode: i.CDISCCode
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (i.Children && i.Children.length > 0) {
|
|
||||||
const childResults = this.filterQuestions(i.Children)
|
|
||||||
params.questionList = params.questionList.concat(childResults.questionList)
|
|
||||||
params.tableQuestionList = params.tableQuestionList.concat(childResults.tableQuestionList)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return params;
|
|
||||||
},
|
|
||||||
// 获取状态
|
// 获取状态
|
||||||
getCheckState(item, code) {
|
getCheckState(item, code) {
|
||||||
return item.row.ExportResult.indexOf(code) > -1
|
return item.row.ExportResult.indexOf(code) > -1
|
||||||
|
|
Loading…
Reference in New Issue