269 lines
7.3 KiB
Plaintext
269 lines
7.3 KiB
Plaintext
<template>
|
|
<div class="glReview_wrapper">
|
|
<h3>访视评估结果</h3>
|
|
|
|
<el-table
|
|
v-loading="loading"
|
|
:data="taskList"
|
|
>
|
|
<el-table-column
|
|
prop="VisitName"
|
|
label="访视名称"
|
|
show-overflow-tooltip
|
|
width="150"
|
|
/>
|
|
<!-- 评估结果 -->
|
|
<el-table-column
|
|
label="评估结果"
|
|
align="center"
|
|
prop=""
|
|
>
|
|
<template>
|
|
<el-table-column
|
|
v-for="(qs,index) in evaluationQsList"
|
|
:key="index"
|
|
prop=""
|
|
:label="qs"
|
|
show-overflow-tooltip
|
|
width="150"
|
|
>
|
|
<template slot-scope="scope">
|
|
{{ scope.row.BeforeQuestionList[index].Answer }}
|
|
</template>
|
|
</el-table-column>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<!-- 评估结果 -->
|
|
<el-table-column
|
|
label="调整后结果"
|
|
align="center"
|
|
prop=""
|
|
>
|
|
<template>
|
|
<el-table-column
|
|
v-for="(qs,index) in adjustedQsList"
|
|
:key="index"
|
|
prop=""
|
|
:label="qs"
|
|
show-overflow-tooltip
|
|
width="150"
|
|
>
|
|
<template slot-scope="scope">
|
|
<div v-if="scope.row.IsEdit">
|
|
<!-- 下拉框 -->
|
|
<el-select
|
|
v-if="scope.row.AfterQuestionList[index].Type==='select'"
|
|
v-model="scope.row.AfterQuestionList[index].Answer"
|
|
>
|
|
<el-option
|
|
v-for="val in scope.row.AfterQuestionList[index].TypeValue.split('|')"
|
|
:key="val"
|
|
:label="val"
|
|
:value="val"
|
|
/>
|
|
</el-select>
|
|
<!-- 单选 -->
|
|
<el-radio-group
|
|
v-if="scope.row.AfterQuestionList[index].Type==='radio'"
|
|
v-model="scope.row.AfterQuestionList[index].Answer"
|
|
>
|
|
<el-radio
|
|
v-for="val in scope.row.AfterQuestionList[index].TypeValue.split('|')"
|
|
:key="val"
|
|
:label="val"
|
|
>
|
|
{{ val }}
|
|
</el-radio>
|
|
</el-radio-group>
|
|
<el-input
|
|
v-if="scope.row.AfterQuestionList[index].Type==='input'"
|
|
v-model="scope.row.AfterQuestionList[index].Answer"
|
|
/>
|
|
</div>
|
|
<div v-else>
|
|
{{ scope.row.AfterQuestionList[index].Answer }}
|
|
</div>
|
|
|
|
</template>
|
|
</el-table-column>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column
|
|
:label="$t('common:action:action')"
|
|
width="200"
|
|
>
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
circle
|
|
title="查看详情"
|
|
icon="el-icon-view"
|
|
@click="handleView(scope.row)"
|
|
/>
|
|
<el-button
|
|
v-if="!scope.row.IsEdit"
|
|
circle
|
|
title="调整"
|
|
icon="el-icon-edit"
|
|
@click="scope.row.IsEdit = true"
|
|
/>
|
|
<el-button
|
|
v-if="scope.row.IsEdit"
|
|
circle
|
|
title="保存"
|
|
icon="el-icon-check"
|
|
@click="handleSave(scope.row)"
|
|
/>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
|
|
<h3>历史全局阅片结果</h3>
|
|
<el-table
|
|
v-loading="historyLoading"
|
|
:data="historyTaskList"
|
|
>
|
|
<el-table-column
|
|
prop="TaskName"
|
|
label="全局"
|
|
show-overflow-tooltip
|
|
width="200"
|
|
/>
|
|
<el-table-column
|
|
:label="$t('common:action:action')"
|
|
width="200"
|
|
>
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
circle
|
|
title="查看详情"
|
|
icon="el-icon-view"
|
|
@click="handleView(scope.row)"
|
|
/>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import { getGlobalReadingInfo, getHistoryGlobalInfo, saveGlobalReadingInfo } from '@/api/trials'
|
|
import { getToken } from '@/utils/auth'
|
|
export default {
|
|
name: 'GlobalReview',
|
|
props: {
|
|
trialId: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
subjectId: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
visitTaskId: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
readingCategory: {
|
|
type: Number,
|
|
required: true
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
loading: false,
|
|
maxLength: 2,
|
|
evaluationQsList: [],
|
|
adjustedQsList: [],
|
|
taskList: [],
|
|
historyLoading: false,
|
|
historyTaskList: []
|
|
}
|
|
},
|
|
mounted() {
|
|
this.getGlInfo()
|
|
this.getHistoryGlobalInfo()
|
|
},
|
|
methods: {
|
|
getGlInfo() {
|
|
this.loading = true
|
|
getGlobalReadingInfo({ visitTaskId: this.visitTaskId }).then(res => {
|
|
var evaluationQsList = []
|
|
var adjustedQsList = []
|
|
if (res.Result.TaskList.length > 0) {
|
|
var task = res.Result.TaskList[0]
|
|
task.BeforeQuestionList.map(qs => {
|
|
evaluationQsList.push(qs.QuestionName)
|
|
})
|
|
task.AfterQuestionList.map(qs => {
|
|
adjustedQsList.push(qs.QuestionName)
|
|
})
|
|
res.Result.TaskList.map(task => {
|
|
task.IsEdit = false
|
|
})
|
|
}
|
|
|
|
this.evaluationQsList = evaluationQsList
|
|
this.adjustedQsList = adjustedQsList
|
|
this.taskList = res.Result.TaskList
|
|
this.loading = false
|
|
}).catch(() => { this.loading = false })
|
|
},
|
|
getHistoryGlobalInfo() {
|
|
this.historyLoading = true
|
|
getHistoryGlobalInfo({ visitTaskId: this.visitTaskId }).then(res => {
|
|
this.historyTaskList = res.Result
|
|
this.historyLoading = false
|
|
}).catch(() => { this.historyLoading = false })
|
|
},
|
|
handleSave(row) {
|
|
this.loading = true
|
|
var questionList = []
|
|
row.AfterQuestionList.map(v => {
|
|
questionList.push(
|
|
{
|
|
questionId: v.QuestionId,
|
|
visitTaskId: row.VisitTaskId,
|
|
answer: v.Answer
|
|
}
|
|
)
|
|
})
|
|
var param = {
|
|
globalTaskId: this.visitTaskId,
|
|
subjectId: this.subjectId,
|
|
trialId: this.trialId,
|
|
questionList: questionList
|
|
}
|
|
saveGlobalReadingInfo(param).then(res => {
|
|
row.IsEdit = false
|
|
this.getGlInfo()
|
|
this.loading = false
|
|
}).catch(() => {
|
|
this.loading = false
|
|
})
|
|
},
|
|
handleView(row) {
|
|
var token = getToken()
|
|
var visitTaskId = row.VisitTaskId
|
|
const routeData = this.$router.resolve({
|
|
path: `/noneDicomReading?subjectId=${this.subjectId}&trialId=${this.trialId}&visitTaskId=${visitTaskId}&TokenKey=${token}&isReadingShowPreviousResults=false`
|
|
})
|
|
window.open(routeData.href, '_blank')
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
.glReview_wrapper{
|
|
flex: 1;
|
|
padding: 10px;
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow-y: auto;
|
|
.box-mr{
|
|
margin:10px 0;
|
|
}
|
|
}
|
|
</style>
|