非dicom阅片更改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
d91161a139
commit
032150904e
|
@ -547,6 +547,7 @@ export default {
|
|||
this.$set(this.QuestionsForm, obj.key, null)
|
||||
},
|
||||
handleSave() {
|
||||
console.log('tableQsForm')
|
||||
this.$refs.tableQsForm.validate(valid => {
|
||||
if (!valid) return
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
|
@ -612,6 +613,7 @@ export default {
|
|||
var index = this.AnswersList.findIndex(v => v.RowId === this.QuestionsForm.RowId)
|
||||
this.AnswersList.splice(index, 1, this.QuestionsForm)
|
||||
}
|
||||
console.log({key: this.question.Id, val: this.AnswersList, question: this.question})
|
||||
this.$emit('setFormItemData', {key: this.question.Id, val: this.AnswersList, question: this.question})
|
||||
this.formItemNumberChange(this.question.Id, true)
|
||||
this.addOrEdit.visible = false
|
||||
|
@ -935,7 +937,8 @@ export default {
|
|||
let res = await this.OSSclient.put(`/${this.$route.query.trialId}/Customize/${this.visitTaskId}/${fileName}`, file)
|
||||
this.fileList.push({ name: `${this.$t('trials:emailManageCfg:title:fileName')}${this.fileList.length + 1}`, url: this.$getObjectName(res.url) })
|
||||
this.urls.push(this.$getObjectName(res.url))
|
||||
this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '', question: this.question })
|
||||
this.$emit("setFormItemData", { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '', question: this.question })
|
||||
this.$set(this.QuestionsForm, this.question.Id, this.urls.length > 0 ? this.urls.join('|') : '')
|
||||
loading.close()
|
||||
// uploadReadingAnswerImage(this.$route.query.trialId, this.visitTaskId, formData).then(res => {
|
||||
// if (res.IsSuccess) {
|
||||
|
@ -988,6 +991,7 @@ export default {
|
|||
this.fileList.splice(this.fileList.findIndex(f => f.url === file.url), 1)
|
||||
this.urls.splice(this.fileList.findIndex(f => f === file.url), 1)
|
||||
this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '', question: this.question })
|
||||
this.$set(this.QuestionsForm, this.question.Id, this.urls.length > 0 ? this.urls.join('|') : '')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,6 +77,7 @@ export default {
|
|||
methods: {
|
||||
handleSave(isMsg) {
|
||||
return new Promise(resolve => {
|
||||
console.log('handleSave')
|
||||
this.$refs['questions'].validate((valid) => {
|
||||
if (!valid) {
|
||||
resolve(false)
|
||||
|
@ -232,7 +233,9 @@ export default {
|
|||
this.questionForm[v] = ''
|
||||
},
|
||||
setFormItemData(obj) {
|
||||
console.log('setFormItemData', obj)
|
||||
this.$set(this.questionForm, obj.key, JSON.parse(JSON.stringify(obj.val)))
|
||||
console.log(this.questionForm)
|
||||
this.classArr.map(i=>{
|
||||
if (i.triggerId === obj.key) {
|
||||
let answer = null
|
||||
|
|
|
@ -0,0 +1,173 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-upload
|
||||
action
|
||||
:accept="question.FileType"
|
||||
:limit="question.ImageCount === 0 ? 100 : question.ImageCount"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:http-request="uploadScreenshot"
|
||||
list-type="picture-card"
|
||||
:on-remove="handleRemove"
|
||||
:file-list="fileList"
|
||||
:class="{disabled:readingTaskState >= 2 || (question.ImageCount === 0 ? false : fileList.length >= question.ImageCount) || (task.VisitTaskId !== visitTaskId) || question.IsShowInDicom || ((task.IsBaseLine && question.LimitEdit === 2) || (!task.IsBaseLine && question.LimitEdit === 1))}"
|
||||
:disabled="readingTaskState >= 2 || task.VisitTaskId !== visitTaskId || question.IsShowInDicom || ((task.IsBaseLine && question.LimitEdit === 2) || (!task.IsBaseLine && question.LimitEdit === 1))"
|
||||
>
|
||||
<i slot="default" class="el-icon-plus" />
|
||||
<div slot="file" slot-scope="{file}">
|
||||
<viewer
|
||||
:ref="file.url"
|
||||
:images="[imageUrl]"
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
"
|
||||
>
|
||||
<img
|
||||
class="el-upload-list__item-thumbnail"
|
||||
:src="OSSclientConfig.basePath + file.url"
|
||||
crossOrigin="anonymous"
|
||||
alt=""
|
||||
style="max-width: 100%; max-height: 100%"
|
||||
/>
|
||||
<span class="el-upload-list__item-actions">
|
||||
<span
|
||||
class="el-upload-list__item-preview"
|
||||
@click="handlePictureCardPreview(file)"
|
||||
>
|
||||
<i class="el-icon-zoom-in" />
|
||||
</span>
|
||||
|
||||
<span
|
||||
v-if="readingTaskState < 2"
|
||||
class="el-upload-list__item-delete"
|
||||
@click="handleRemove(file)"
|
||||
>
|
||||
<i class="el-icon-delete" />
|
||||
</span>
|
||||
</span>
|
||||
</viewer>
|
||||
</div>
|
||||
</el-upload>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { uploadReadingAnswerImage, getTrialOrganList, getCustomTableQuestionPreview } from '@/api/trials'
|
||||
export default {
|
||||
name: "CustomizeReportPageUpload",
|
||||
props: {
|
||||
task: {
|
||||
Type: Object,
|
||||
required: true
|
||||
},
|
||||
question: {
|
||||
Type: Object,
|
||||
required: true
|
||||
},
|
||||
visitTaskId: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
readingTaskState: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
initUrl: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
imgVisible: false,
|
||||
imageUrl: null,
|
||||
accept: '.png,.jpg,.jpeg',
|
||||
fileList: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.urls = this.initUrl === '' ? [] : this.initUrl.split('|')
|
||||
console.log(this.visitTaskId, this.urls)
|
||||
this.fileList = []
|
||||
this.urls.map(url => {
|
||||
this.fileList.push({ name: '', url: `${url}` })
|
||||
})
|
||||
// console.log(this.fileList)
|
||||
},
|
||||
methods: {
|
||||
checkFileSuffix(fileName) {
|
||||
var index = fileName.lastIndexOf('.')
|
||||
var suffix = fileName.substring(index + 1, fileName.length)
|
||||
if (this.question.FileType.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === -1) {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
async uploadScreenshot(param) {
|
||||
if (!this.visitTaskId) return
|
||||
const loading = this.$loading({
|
||||
target: document.querySelector('.ecrf-wrapper'),
|
||||
fullscreen: false,
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading'
|
||||
})
|
||||
var trialId = this.$route.query.trialId
|
||||
var subjectId = this.$route.query.trialId
|
||||
var file = await this.fileToBlob(param.file)
|
||||
const res = await this.OSSclient.put(`/${trialId}/Read/${subjectId}/Visit/${param.file.name}`, file)
|
||||
console.log(res)
|
||||
this.fileList.push({ name: param.file.name, path: this.$getObjectName(res.url), url: this.$getObjectName(res.url)})
|
||||
this.urls.push(this.$getObjectName(res.url))
|
||||
this.$emit('setImageUrl', this.urls.length > 0 ? this.urls.join('|') : '')
|
||||
loading.close()
|
||||
},
|
||||
handleBeforeUpload(file) {
|
||||
// 检测文件类型是否符合要求
|
||||
if (this.checkFileSuffix(file.name)) {
|
||||
// this.fileList = []
|
||||
return true
|
||||
} else {
|
||||
// this.$alert(`必须是 ${this.accept} 格式`)
|
||||
let msg = this.$t(
|
||||
"trials:readingUnit:qsList:message:imageFormat"
|
||||
).replace("xxx", this.question.FileType)
|
||||
this.$alert(msg)
|
||||
return false
|
||||
}
|
||||
},
|
||||
// 预览图片
|
||||
handlePictureCardPreview(file) {
|
||||
var suffix = file.url.substring(file.url.lastIndexOf(".")+1)
|
||||
suffix = suffix ? suffix.toLowerCase() : ''
|
||||
if (suffix === 'doc' || suffix === 'docx' || suffix === 'pdf'){
|
||||
window.open(this.OSSclientConfig.basePath + file.url,'_blank')
|
||||
}else{
|
||||
this.imageUrl = this.OSSclientConfig.basePath + file.url
|
||||
// this.imgVisible = true
|
||||
this.$refs[file.url].$viewer.show()
|
||||
}
|
||||
},
|
||||
// 删除图片
|
||||
handleRemove(file, fileList) {
|
||||
this.imageUrl = ''
|
||||
this.fileList.splice(this.fileList.findIndex(f => f.url === file.url), 1)
|
||||
this.urls.splice(this.fileList.findIndex(f => f === file.url), 1)
|
||||
this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '' })
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.disabled{
|
||||
::v-deep .el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -5,8 +5,9 @@
|
|||
size="small"
|
||||
:model="questionForm"
|
||||
class="ecrf-form"
|
||||
v-if="taskInfo"
|
||||
>
|
||||
<FormItem
|
||||
<!-- <FormItem
|
||||
v-for="question of questions"
|
||||
:key="question.Id"
|
||||
:question="question"
|
||||
|
@ -16,7 +17,20 @@
|
|||
:calculation-list="calculationList"
|
||||
@setFormItemData="setFormItemData"
|
||||
@resetFormItemData="resetFormItemData"
|
||||
/>
|
||||
/> -->
|
||||
<QuestionFormItem
|
||||
v-for="question of questions"
|
||||
:key="question.Id"
|
||||
:visitTaskId="visitTaskId"
|
||||
:question="question"
|
||||
:question-form="questionForm"
|
||||
:reading-task-state="readingTaskState"
|
||||
:criterion-id="criterionId"
|
||||
:CalculationList="calculationList"
|
||||
:IsBaseline="isBaseline"
|
||||
@resetFormItemData="resetFormItemData"
|
||||
@setFormItemData="setFormItemData"
|
||||
/>
|
||||
|
||||
<el-form-item v-if="readingTaskState < 2">
|
||||
<div style="text-align:center;">
|
||||
|
@ -53,17 +67,18 @@
|
|||
|
||||
<script>
|
||||
|
||||
import { getTrialReadingQuestion, saveVisitTaskQuestions, submitVisitTaskQuestionsInDto, getQuestionCalculateRelation } from '@/api/trials'
|
||||
import { getCustomTableQuestionAnswer, changeDicomReadingQuestionAnswer, getTrialReadingQuestion, saveVisitTaskQuestions, submitVisitTaskQuestionsInDto, getQuestionCalculateRelation } from '@/api/trials'
|
||||
import { setSkipReadingCache } from '@/api/reading'
|
||||
import const_ from '@/const/sign-code'
|
||||
import store from '@/store'
|
||||
import { mapGetters } from 'vuex'
|
||||
import FormItem from './FormItem'
|
||||
// import FormItem from './FormItem'
|
||||
import QuestionFormItem from '@/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem'
|
||||
import SignForm from '@/views/trials/components/newSignForm'
|
||||
export default {
|
||||
name: 'EcrfList',
|
||||
components: {
|
||||
FormItem,
|
||||
QuestionFormItem,
|
||||
SignForm
|
||||
},
|
||||
props: {
|
||||
|
@ -88,7 +103,8 @@ export default {
|
|||
activeName: 0,
|
||||
classArr: [],
|
||||
calculationList: [],
|
||||
taskInfo: null
|
||||
taskInfo: null,
|
||||
isBaseline: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -117,44 +133,99 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.taskInfo = JSON.parse(localStorage.getItem('taskInfo'))
|
||||
this.isBaseline = this.taskInfo.IsBaseLine
|
||||
},
|
||||
methods: {
|
||||
async getQuestions() {
|
||||
async getQuestions(visitTaskId) {
|
||||
this.loading = true
|
||||
try {
|
||||
const param = {
|
||||
readingQuestionCriterionTrialId: this.criterionId,
|
||||
visitTaskId: this.visitTaskId
|
||||
}
|
||||
const res = await getTrialReadingQuestion(param)
|
||||
const res = await getCustomTableQuestionAnswer(param)
|
||||
if (res.IsSuccess) {
|
||||
this.readingTaskState = res.OtherInfo.readingTaskState
|
||||
this.readingTaskState = res.OtherInfo.ReadingTaskState
|
||||
res.Result.SinglePage.map((v) => {
|
||||
if (v.Type === 'group' && v.Childrens.length === 0) return
|
||||
if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary') {
|
||||
this.$set(this.questionForm, v.Id, v.Answer ? v.Answer : null)
|
||||
if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary' && v.Type !== 'table' && v.Type !== 'basicTable' && v.Type !== 'number') {
|
||||
this.$set(this.questionForm, v.Id, v.Answer)
|
||||
}
|
||||
if (v.Type === 'table' || v.Type === 'basicTable') {
|
||||
this.$set(this.questionForm, v.Id, v.TableQuestions.Answers)
|
||||
}
|
||||
if (v.Type === 'class') {
|
||||
this.classArr.push({ triggerId: v.ClassifyQuestionId, classId: v.Id, classifyAlgorithms: v.ClassifyAlgorithms, classifyType: v.ClassifyType })
|
||||
this.classArr.push({triggerId: v.ClassifyQuestionId, classId: v.Id, classifyAlgorithms: v.ClassifyAlgorithms, classifyType: v.ClassifyType})
|
||||
}
|
||||
if (v.Type === 'number') {
|
||||
this.$set(this.questionForm, v.Id, v.Answer === '' ? '' : parseFloat(v.Answer).toFixed(this.digitPlaces))
|
||||
}
|
||||
if (v.Childrens.length > 0) {
|
||||
this.setChild(v.Childrens)
|
||||
}
|
||||
})
|
||||
this.questions = res.Result.SinglePage
|
||||
this.loading = false
|
||||
}
|
||||
this.loading = false
|
||||
} catch (e) {
|
||||
|
||||
} catch(e) {
|
||||
console.log(e)
|
||||
this.loading = false
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
// async getQuestions() {
|
||||
// this.loading = true
|
||||
// try {
|
||||
// const param = {
|
||||
// readingQuestionCriterionTrialId: this.criterionId,
|
||||
// visitTaskId: this.visitTaskId
|
||||
// }
|
||||
// const res = await getTrialReadingQuestion(param)
|
||||
// if (res.IsSuccess) {
|
||||
// this.readingTaskState = res.OtherInfo.readingTaskState
|
||||
// res.Result.SinglePage.map((v) => {
|
||||
// if (v.Type === 'group' && v.Childrens.length === 0 && v.Type !== 'table' && v.Type !== 'basicTable') return
|
||||
// if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary' && v.Type !== 'table' && v.Type !== 'basicTable' && v.Type !== 'number') {
|
||||
// this.$set(this.questionForm, v.Id, v.Answer)
|
||||
// }
|
||||
// if (v.Type === 'table' || v.Type === 'basicTable') {
|
||||
// this.$set(this.questionForm, v.Id, v.TableQuestions.Answers)
|
||||
// }
|
||||
// if (v.Type === 'number') {
|
||||
// this.$set(this.questionForm, v.Id, v.Answer === '' ? '' : parseFloat(v.Answer).toFixed(this.digitPlaces))
|
||||
// }
|
||||
// if (v.Childrens.length > 0) {
|
||||
// this.setChild(v.Childrens)
|
||||
// }
|
||||
// })
|
||||
// this.questions = res.Result.SinglePage
|
||||
// }
|
||||
// this.loading = false
|
||||
// } catch (e) {
|
||||
// this.loading = false
|
||||
// }
|
||||
// },
|
||||
setChild(obj) {
|
||||
obj.forEach(i => {
|
||||
if (i.Type !== 'group' && i.Type !== 'summary' && i.Id) {
|
||||
this.$set(this.questionForm, i.Id, i.Answer ? i.Answer : null)
|
||||
if (i.Type !== 'group' && i.Type !== 'summary' && i.Id && i.Type !== 'table' && i.Type !== 'basicTable') {
|
||||
this.$set(this.questionForm, i.Id, i.Answer)
|
||||
}
|
||||
if (i.Type === 'table' || i.Type === 'basicTable') {
|
||||
i.TableQuestions.Questions.forEach(o => {
|
||||
if (o.Type === 'number') {
|
||||
i.TableQuestions.Answers.forEach((ite, index) => {
|
||||
this.$set(i.TableQuestions.Answers[index], o.Id, i.TableQuestions.Answers[index][o.Id] ? parseFloat(i.TableQuestions.Answers[index][o.Id]).toFixed(this.digitPlaces) : null)
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$set(this.questionForm, i.Id, i.TableQuestions.Answers)
|
||||
}
|
||||
if (i.Type === 'class') {
|
||||
this.classArr.push({ triggerId: i.ClassifyQuestionId, classId: i.Id, classifyAlgorithms: i.ClassifyAlgorithms, classifyType: i.ClassifyType })
|
||||
this.classArr.push({triggerId: i.ClassifyQuestionId, classId: i.Id, classifyAlgorithms: i.ClassifyAlgorithms, classifyType: i.ClassifyType})
|
||||
}
|
||||
if (i.Type === 'number') {
|
||||
this.$set(this.questionForm, i.Id, i.Answer === '' ? '' : parseFloat(i.Answer).toFixed(this.digitPlaces))
|
||||
}
|
||||
if (i.Childrens && i.Childrens.length > 0) {
|
||||
this.setChild(i.Childrens)
|
||||
|
@ -168,8 +239,34 @@ export default {
|
|||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async handleSave(isMsg) {
|
||||
const valid = await this.$refs['questions'].validate()
|
||||
if (!valid) return
|
||||
this.loading = true
|
||||
try {
|
||||
var answers = []
|
||||
for (const k in this.questionForm) {
|
||||
if (this.questionForm[k] instanceof Array) {} else {
|
||||
answers.push({ id: k, answer: this.questionForm[k] })
|
||||
}
|
||||
}
|
||||
var params = {
|
||||
visitTaskId: this.visitTaskId,
|
||||
answers: answers
|
||||
}
|
||||
let res = await changeDicomReadingQuestionAnswer(params)
|
||||
if (res.IsSuccess) {
|
||||
if (isMsg) {
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
}
|
||||
this.loading = false
|
||||
}
|
||||
} catch(e) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
async handleSave() {
|
||||
async handleSave1() {
|
||||
const valid = await this.$refs['questions'].validate()
|
||||
if (!valid) return
|
||||
this.loading = true
|
||||
|
@ -314,5 +411,46 @@ export default {
|
|||
}
|
||||
|
||||
}
|
||||
::v-deep .el-table,
|
||||
.el-table__expanded-cell {
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
border-color: #444444;
|
||||
}
|
||||
|
||||
::v-deep .el-table th,
|
||||
.el-table tr {
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
border-color: #444444;
|
||||
}
|
||||
::v-deep .el-table__body tr > td {
|
||||
background-color: #000 !important;
|
||||
color: #fff;
|
||||
border-color: #444444;
|
||||
}
|
||||
::v-deep .el-table__body tr:hover > td {
|
||||
background-color: #858282 !important;
|
||||
color: #fff;
|
||||
border-color: #444444;
|
||||
}
|
||||
::v-deep .el-table--border th.gutter:last-of-type {
|
||||
border: none;
|
||||
}
|
||||
::v-deep .el-dialog__header {
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
.el-dialog__title {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
::v-deep .el-dialog__body {
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
}
|
||||
::v-deep .el-dialog__footer {
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -209,16 +209,16 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { changeCalculationAnswer, getReadingReportEvaluation, submitDicomVisitTask, verifyVisitTaskQuestions, getQuestionCalculateRelation } from '@/api/trials'
|
||||
import { changeCalculationAnswer, getReadingReportEvaluation, changeDicomReadingQuestionAnswer, submitDicomVisitTask, verifyVisitTaskQuestions, getQuestionCalculateRelation } from '@/api/trials'
|
||||
import { setSkipReadingCache } from '@/api/reading'
|
||||
// import UploadFile from './UploadFile'
|
||||
import CustomizeReportPageUpload from './CustomizeReportPageUpload'
|
||||
import const_ from '@/const/sign-code'
|
||||
import SignForm from '@/views/trials/components/newSignForm'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import store from '@/store'
|
||||
export default {
|
||||
name: 'ReportPage',
|
||||
components: { SignForm },
|
||||
name: 'CustomizeReportPage',
|
||||
components: { SignForm, CustomizeReportPageUpload },
|
||||
data() {
|
||||
return {
|
||||
trialId: '',
|
||||
|
@ -264,7 +264,8 @@ export default {
|
|||
this.visitTaskId = this.taskInfo.VisitTaskId
|
||||
this.subjectId = this.taskInfo.SubjectId
|
||||
this.criterionType = this.taskInfo.CriterionType
|
||||
this.digitPlaces = this.taskInfo.DigitPlaces
|
||||
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
||||
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
||||
this.TrialReadingCriterionId = this.taskInfo.TrialReadingCriterionId
|
||||
window.addEventListener('resize', () => {
|
||||
this.handleResize()
|
||||
|
@ -351,11 +352,11 @@ export default {
|
|||
},
|
||||
InitVisitTaskQuestionForm() {
|
||||
this.taskQuestions.map((v, i) => {
|
||||
if (v.Type === 'group' && v.Childrens.length === 0 && v.Type !== 'table') return
|
||||
if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary' && v.Type !== 'table' && v.Type !== 'number') {
|
||||
if (v.Type === 'group' && v.Childrens.length === 0 && v.Type !== 'table' && v.Type !== 'basicTable') return
|
||||
if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary' && v.Type !== 'table' && v.Type !== 'basicTable' && v.Type !== 'number') {
|
||||
this.$set(this.questionForm, v.QuestionId, v.Answers[this.visitTaskId])
|
||||
}
|
||||
if (v.Type === 'table') {
|
||||
if (v.Type === 'table' || v.Type === 'basicTable') {
|
||||
var tableAnswers = this.getTableAnswers(v.QuestionId, v.Childrens, i)
|
||||
this.$set(this.questionForm, v.QuestionId, tableAnswers)
|
||||
// this.$set(v, 'xfIndex', i)
|
||||
|
@ -379,10 +380,10 @@ export default {
|
|||
},
|
||||
setChild(obj) {
|
||||
obj.forEach((i, index) => {
|
||||
if (i.Type !== 'group' && i.Type !== 'summary' && i.Id && i.Type !== 'table') {
|
||||
if (i.Type !== 'group' && i.Type !== 'summary' && i.Id && i.Type !== 'table' && i.Type !== 'basicTable') {
|
||||
this.$set(this.questionForm, i.QuestionId, i.Answers[this.visitTaskId])
|
||||
}
|
||||
if (i.Type === 'table') {
|
||||
if (i.Type === 'table' || i.Type === 'basicTable') {
|
||||
var tableAnswers = this.getTableAnswers(i.QuestionId, i.Childrens, index)
|
||||
this.$set(this.questionForm, i.QuestionId, tableAnswers)
|
||||
}
|
||||
|
@ -397,7 +398,7 @@ export default {
|
|||
}
|
||||
this.$set(this.questionForm, i.QuestionId, val)
|
||||
}
|
||||
if (i.Childrens && i.Childrens.length > 0 && i.Type !== 'table') {
|
||||
if (i.Childrens && i.Childrens.length > 0 && i.Type !== 'table' && i.Type !== 'basicTable') {
|
||||
this.setChild(i.Childrens)
|
||||
}
|
||||
})
|
||||
|
@ -457,7 +458,6 @@ export default {
|
|||
num = arr.length === 0 ? 0 : Math.max(...arr)
|
||||
break
|
||||
case 9:
|
||||
// eslint-disable-next-line no-redeclare
|
||||
var arr = []
|
||||
this.questionForm[o.QuestionId].forEach(q => {
|
||||
arr.push(q[o.TableQuestionId])
|
||||
|
@ -472,28 +472,27 @@ export default {
|
|||
switch (rules.CustomCalculateMark) {
|
||||
case 1:
|
||||
num += parseFloat(this.questionForm[o.TableQuestionId])
|
||||
break
|
||||
break;
|
||||
case 2:
|
||||
num -= parseFloat(this.questionForm[o.TableQuestionId])
|
||||
break
|
||||
break;
|
||||
case 3:
|
||||
num *= parseFloat(this.questionForm[o.TableQuestionId])
|
||||
break
|
||||
break;
|
||||
case 4:
|
||||
num /= parseFloat(this.questionForm[o.TableQuestionId])
|
||||
// num /= parseFloat(this.questionForm[o.TableQuestionId])
|
||||
break
|
||||
break;
|
||||
}
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
var digitPlaces = parseInt(localStorage.getItem('digitPlaces'))
|
||||
if (rules.ValueType === 2) {
|
||||
num = num * 100
|
||||
}
|
||||
return isNaN(num) ? '' : isFinite(num) ? num.toFixed(digitPlaces) : '∞'
|
||||
return isNaN(num) ? '' : isFinite(num) ? num.toFixed(this.digitPlaces) : '∞'
|
||||
},
|
||||
getReportInfo() {
|
||||
this.loading = true
|
||||
|
@ -522,13 +521,12 @@ export default {
|
|||
questions.forEach((item) => {
|
||||
const obj = item
|
||||
this.$set(obj, 'Answers', {})
|
||||
|
||||
var digitPlaces = parseInt(localStorage.getItem('digitPlaces')) || 0
|
||||
item.Answer.forEach(i => {
|
||||
if (item.DictionaryCode) {
|
||||
this.$set(obj.Answers, i.VisitTaskId, i.Answer ? parseInt(i.Answer) : null)
|
||||
// obj.Answers[i.VisitTaskId] = i.Answer ? parseInt(i.Answer) : null
|
||||
} else {
|
||||
console.log(item.Type)
|
||||
if (item.Type === 'number') {
|
||||
let val = null
|
||||
if (item.ValueType === 0) {
|
||||
|
@ -536,7 +534,7 @@ export default {
|
|||
} else if (item.ValueType === 3) {
|
||||
val = i.Answer
|
||||
} else {
|
||||
val = isNaN(parseFloat(i.Answer)) ? i.Answer : parseFloat(i.Answer).toFixed(digitPlaces)
|
||||
val = isNaN(parseFloat(i.Answer)) ? i.Answer : parseFloat(i.Answer).toFixed(this.digitPlaces)
|
||||
}
|
||||
this.$set(obj.Answers, i.VisitTaskId, val)
|
||||
} else {
|
||||
|
@ -788,6 +786,9 @@ export default {
|
|||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
::v-deep .el-switch__label{
|
||||
color:#fff;
|
||||
}
|
||||
::v-deep .el-switch__label.is-active{
|
||||
color: #428bca;
|
||||
}
|
||||
|
|
|
@ -21,8 +21,12 @@
|
|||
<div
|
||||
v-if="!study.IsCriticalSequence"
|
||||
class="dicom-desc"
|
||||
>
|
||||
<div>{{ study.CodeView }}</div>
|
||||
>
|
||||
<!-- <div v-if="taskInfo && taskInfo.IsShowStudyName">{{ study.StudyName }}</div> -->
|
||||
<div>
|
||||
<span :title="study.CodeView">{{ study.CodeView }}</span>
|
||||
<span :title="study.StudyName" v-if="taskInfo && taskInfo.IsShowStudyName" style="margin-left: 5px;">{{ study.StudyName }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span :title="study.BodyPart">{{ study.BodyPart }}</span>
|
||||
<span style="margin-left: 5px;" :title="study.Modality">{{ study.Modality }}</span>
|
||||
|
@ -164,6 +168,7 @@ export default {
|
|||
text-align: left;
|
||||
color: #d0d0d0;
|
||||
padding: 2px;
|
||||
|
||||
}
|
||||
|
||||
.ps {
|
||||
|
|
Loading…
Reference in New Issue