irc_web/.svn/pristine/cd/cd5f96c2b161a661e82a2add1b9...

250 lines
7.4 KiB
Plaintext

<template>
<div class="adReview_wrapper">
<el-card :body-style="{ padding: '10px' }">
<div slot="header" class="clearfix">
<span style="font-weight: bold;">评估结果</span>
</div>
<el-table
:data="adInfo.VisitTaskInfoList"
style="width: 100%"
>
<el-table-column
prop="ArmEnum"
label="角色"
>
<template slot-scope="scope">
{{ $fd('ArmEnum', scope.row.ArmEnum) }}
</template>
</el-table-column>
<el-table-column
v-for="(qs,index) in judgeQuestion"
:key="qs"
prop=""
:label="qs"
show-overflow-tooltip
>
<template slot-scope="scope">
{{ scope.row.JudgeQuestionAnswerInfoList[index].Answer }}
</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,1)"
/>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card :body-style="{ padding: '10px' }" class="box-mr">
<div slot="header" class="clearfix">
<span style="font-weight: bold;">裁判结果</span>
</div>
<el-form ref="adForm" :model="adForm" style="width:600px" label-width="100px">
<el-form-item
label=""
prop="judgeResultTaskId"
:rules="[
{ required: true, message: '请选择'},
]"
>
<el-radio-group
v-model="adForm.judgeResultTaskId"
:disabled="adInfo.ReadingTaskState >= 2"
>
<el-radio
v-for="t in adInfo.VisitTaskInfoList"
:key="t.VisitTaskId"
:label="t.VisitTaskId"
>
{{ $fd('ArmEnum', t.ArmEnum) }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="备注"
prop="judgeResultRemark"
:rules="[
{ required: true, message: '请注明'},
]"
>
<el-input
v-model="adForm.judgeResultRemark"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
:disabled="adInfo.ReadingTaskState >= 2"
/>
</el-form-item>
<el-form-item v-if="adInfo.ReadingTaskState < 2">
<div style="text-align:center;">
<el-button type="primary" @click="handleSave">保存</el-button>
<el-button type="primary" @click="handleSubmit">提交</el-button>
</div>
</el-form-item>
</el-form>
</el-card>
<!-- 签名框 -->
<el-dialog
v-if="signVisible"
:visible.sync="signVisible"
:close-on-click-modal="false"
width="600px"
custom-class="base-dialog-wrapper"
>
<div slot="title">
<span style="font-size:18px;">{{ $t('common:dialogTitle:sign') }}</span>
<span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${ currentUser })` }}</span>
</div>
<SignForm ref="signForm" :sign-code-enum="signCode" @closeDialog="closeSignDialog" />
</el-dialog>
</div>
</template>
<script>
import { getJudgeReadingInfo, saveJudgeVisitTaskResult, submitJudgeVisitTaskResult } from '@/api/trials'
import const_ from '@/const/sign-code'
import { getToken } from '@/utils/auth'
import SignForm from '@/views/trials/components/newSignForm'
export default {
name: 'AdReview',
components: { SignForm },
props: {
trialId: {
type: String,
required: true
},
subjectId: {
type: String,
required: true
},
visitTaskId: {
type: String,
required: true
},
readingCategory: {
type: Number,
required: true
}
},
data() {
return {
adInfo: {},
judgeQuestion: [],
adForm: {
visitTaskId: '',
judgeResultTaskId: '',
judgeResultRemark: ''
},
signVisible: false
}
},
mounted() {
this.getAdInfo()
},
methods: {
getAdInfo() {
getJudgeReadingInfo({ visitTaskId: this.visitTaskId }).then(res => {
var judgeQS = []
if (res.Result.VisitTaskInfoList.length > 0) {
res.Result.VisitTaskInfoList[0].JudgeQuestionAnswerInfoList.map(v => {
judgeQS.push(v.QuestionName)
})
}
this.judgeQuestion = judgeQS
this.adInfo = res.Result
this.adForm.judgeResultTaskId = res.Result.JudgeResultTaskId
this.adForm.judgeResultRemark = res.Result.JudgeResultRemark
})
},
handleSave() {
this.$refs['adForm'].validate((valid) => {
if (!valid) return
this.loading = true
this.adForm.visitTaskId = this.visitTaskId
saveJudgeVisitTaskResult(this.adForm).then(res => {
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.loading = false
}).catch(() => {
this.loading = false
})
})
},
handleSubmit() {
this.$refs['questions'].validate((valid) => {
if (!valid) return
const { ImageAssessmentReportConfirmation } = const_.processSignature
this.signCode = ImageAssessmentReportConfirmation
this.signVisible = true
})
},
// 关闭签名框
closeSignDialog(isSign, signInfo) {
if (isSign) {
this.signConfirm(signInfo)
} else {
this.signVisible = false
}
},
// 签名并确认
signConfirm(signInfo) {
this.loading = true
var answers = []
for (const k in this.questionForm) {
answers.push({ readingQuestionTrialId: k, answer: this.questionForm[k] })
}
var params = {
data: {
visitTaskId: this.visitTaskId,
judgeResultTaskId: this.adForm.judgeResultTaskId,
judgeResultRemark: this.adForm.judgeResultRemark
},
signInfo: signInfo
}
submitJudgeVisitTaskResult(params).then(res => {
this.loading = false
if (res.IsSuccess) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.isEdit = false
this.$refs['signForm'].btnLoading = false
this.signVisible = false
window.location.reload()
window.opener.postMessage('noneDicoms', window.location)
}
}).catch(_ => {
this.loading = false
this.$refs['signForm'].btnLoading = 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>
.adReview_wrapper{
flex: 1;
padding: 10px;
width: 100%;
height: 100%;
overflow-y: auto;
.box-mr{
margin:10px 0;
}
}
</style>