Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
001faf1f79
|
@ -217,3 +217,35 @@ export function uploadIVUSTemplate(param) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getOCTFCTTemplate(param) {
|
||||||
|
return requestDownload({
|
||||||
|
url: '/OCTCalculate/getOCTFCTTemplate',
|
||||||
|
method: 'post',
|
||||||
|
responseType: 'blob',
|
||||||
|
data: param
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function uploadOCTFCTTemplate(param) {
|
||||||
|
return request({
|
||||||
|
url: `/OCTCalculate/uploadOCTFCTTemplate`,
|
||||||
|
method: 'post',
|
||||||
|
data: param
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getOCTLipidAngleTemplate(param) {
|
||||||
|
return requestDownload({
|
||||||
|
url: '/OCTCalculate/getOCTLipidAngleTemplate',
|
||||||
|
method: 'post',
|
||||||
|
responseType: 'blob',
|
||||||
|
data: param
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function uploadOCTLipidAngleTemplate(param) {
|
||||||
|
return request({
|
||||||
|
url: `/OCTCalculate/uploadOCTLipidAngleTemplate`,
|
||||||
|
method: 'post',
|
||||||
|
data: param
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -497,6 +497,25 @@
|
||||||
<h2 v-else style="color:#ddd">
|
<h2 v-else style="color:#ddd">
|
||||||
Developing...
|
Developing...
|
||||||
</h2>
|
</h2>
|
||||||
|
<!-- iseCRFShowInDicomReading && currentReadingTaskState < 2 -->
|
||||||
|
<div v-if="false">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="skipTask"
|
||||||
|
>
|
||||||
|
<!-- 跳过 -->
|
||||||
|
{{ $t('trials:readingReport:button:skip') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="submit"
|
||||||
|
>
|
||||||
|
<!-- 提交 -->
|
||||||
|
{{ $t('common:button:submit') }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -809,6 +828,10 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
iseCRFShowInDicomReading: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
questionFormChangeState: {
|
questionFormChangeState: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default() {
|
default() {
|
||||||
|
@ -2190,6 +2213,8 @@ export default {
|
||||||
this.isFullscreen = false
|
this.isFullscreen = false
|
||||||
this.manualsDialog.visible = true
|
this.manualsDialog.visible = true
|
||||||
},
|
},
|
||||||
|
skipTask(){},
|
||||||
|
submit(){},
|
||||||
handleFusion() {
|
handleFusion() {
|
||||||
// https 或者 本地开发环境才是安全上下文
|
// https 或者 本地开发环境才是安全上下文
|
||||||
// if (!window.isSecureContext) {
|
// if (!window.isSecureContext) {
|
||||||
|
@ -2522,6 +2547,7 @@ export default {
|
||||||
width: 350px;
|
width: 350px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border: 1px solid #727272;
|
border: 1px solid #727272;
|
||||||
|
position: relative;
|
||||||
// overflow-y: auto;
|
// overflow-y: auto;
|
||||||
}
|
}
|
||||||
.viewer-container{
|
.viewer-container{
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
<div class="add-icon" @click.prevent="downloadTpl">
|
<div class="add-icon" @click.prevent="downloadTpl">
|
||||||
<i class="el-icon-download" />
|
<i class="el-icon-download" />
|
||||||
</div>
|
</div>
|
||||||
<div class="add-icon" style="margin: 0 5px;" @click.prevent="uploadTpl">
|
<div class="add-icon" style="margin: 0 5px;" @click.prevent="uploadTpl(item.LesionType)">
|
||||||
<i class="el-icon-upload2" />
|
<i class="el-icon-upload2" />
|
||||||
</div>
|
</div>
|
||||||
<div class="add-icon" @click.prevent="handleAddOrEdit('add',item)">
|
<div class="add-icon" @click.prevent="handleAddOrEdit('add',item)">
|
||||||
|
@ -62,17 +62,16 @@
|
||||||
v-if="item.Type === 'basicTable' && item.TableQuestions"
|
v-if="item.Type === 'basicTable' && item.TableQuestions"
|
||||||
:ref="item.Id"
|
:ref="item.Id"
|
||||||
:data="item.TableQuestions.Answers"
|
:data="item.TableQuestions.Answers"
|
||||||
max-height="600"
|
|
||||||
>
|
>
|
||||||
<!-- <el-table-column :label="$t('CustomizeQuestionFormItem:label:OrderMark')" width="60px" show-overflow-tooltip>
|
<!-- <el-table-column :label="$t('CustomizeQuestionFormItem:label:OrderMark')" width="60px" show-overflow-tooltip>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ getLesionName(item.OrderMark,scope.row.RowIndex) }}
|
{{ getLesionName(item.OrderMark,scope.row.RowIndex) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
type="index"
|
type="index"
|
||||||
width="40px"
|
width="40px"
|
||||||
/>
|
/> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-for="q of item.TableQuestions.Questions"
|
v-for="q of item.TableQuestions.Questions"
|
||||||
:key="q.Id"
|
:key="q.Id"
|
||||||
|
@ -80,11 +79,23 @@
|
||||||
:label="q.QuestionName"
|
:label="q.QuestionName"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
:render-header="renderHeader"
|
:render-header="renderHeader"
|
||||||
/>
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="q.Unit > 0">
|
||||||
|
{{ `${scope.row[q.Id]}${$fd('ValueUnit', parseInt(q.Unit))}` }}
|
||||||
|
</span>
|
||||||
|
<span v-else-if="q.DictionaryCode">
|
||||||
|
{{ `${$fd(q.DictionaryCode, parseInt(scope.row[q.Id]))}` }}
|
||||||
|
</span>
|
||||||
|
<span v-else>
|
||||||
|
{{`${scope.row[q.Id]}`}}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="readingTaskState < 2 && item.LesionType === 102"
|
v-if="readingTaskState < 2 && item.LesionType === 102"
|
||||||
:label="$t('common:action:action')"
|
:label="$t('common:action:action')"
|
||||||
width="100px"
|
width="90px"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -162,6 +173,7 @@
|
||||||
:is-qulity-issues="false"
|
:is-qulity-issues="false"
|
||||||
:group-classify="5"
|
:group-classify="5"
|
||||||
/>
|
/>
|
||||||
|
<!-- 新增、编辑弹窗 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-if="addOrEdit.visible"
|
v-if="addOrEdit.visible"
|
||||||
:visible.sync="addOrEdit.visible"
|
:visible.sync="addOrEdit.visible"
|
||||||
|
@ -269,7 +281,7 @@ export default {
|
||||||
formChanged: false,
|
formChanged: false,
|
||||||
digitPlaces: 2,
|
digitPlaces: 2,
|
||||||
addOrEdit: { visible: false, title: '' },
|
addOrEdit: { visible: false, title: '' },
|
||||||
upload: { visible: false, title: '导入' },
|
upload: { visible: false, title: '' },
|
||||||
qsList: [],
|
qsList: [],
|
||||||
answersList: [],
|
answersList: [],
|
||||||
qsForm: {},
|
qsForm: {},
|
||||||
|
@ -302,8 +314,7 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.subjectCode = this.$router.currentRoute.query.subjectCode
|
// this.subjectCode = this.$router.currentRoute.query.subjectCode
|
||||||
this.subjectCode = localStorage.getItem('subjectCode')
|
this.subjectCode = localStorage.getItem('subjectCode')
|
||||||
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
this.digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
||||||
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
|
||||||
window.addEventListener('message', this.receiveMsg)
|
window.addEventListener('message', this.receiveMsg)
|
||||||
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
|
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||||
DicomEvent.$on('setCollapseActive', measureData => {
|
DicomEvent.$on('setCollapseActive', measureData => {
|
||||||
|
@ -493,12 +504,16 @@ export default {
|
||||||
} else if (valueType === 3) {
|
} else if (valueType === 3) {
|
||||||
this.$set(this.questionForm, qId, parseFloat(value))
|
this.$set(this.questionForm, qId, parseFloat(value))
|
||||||
} else {
|
} else {
|
||||||
this.$set(this.questionForm, qId, parseFloat(value).toFixed(this.digitPlaces))
|
this.$set(this.questionForm, qId, this.numberToFixed(value))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
numberToFixed(v, unit) {
|
numberToFixed(v) {
|
||||||
return isNaN(parseFloat(v)) ? null : `${parseFloat(v).toFixed(this.digitPlaces)}${unit}`
|
if (this.digitPlaces > -1) {
|
||||||
|
return isNaN(parseFloat(v)) ? null : `${parseFloat(v).toFixed(this.digitPlaces)}`
|
||||||
|
} else {
|
||||||
|
return v
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async handleSave(index) {
|
async handleSave(index) {
|
||||||
const refName = `questions${index}`
|
const refName = `questions${index}`
|
||||||
|
@ -581,7 +596,7 @@ export default {
|
||||||
this.$set(this.qsForm, this.diffId, null)
|
this.$set(this.qsForm, this.diffId, null)
|
||||||
} else {
|
} else {
|
||||||
const diff = parseFloat(eem) - parseFloat(lumen)
|
const diff = parseFloat(eem) - parseFloat(lumen)
|
||||||
this.$set(this.qsForm, this.diffId, diff.toFixed(this.digitPlaces))
|
this.$set(this.qsForm, this.diffId, this.numberToFixed(diff))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -642,11 +657,15 @@ export default {
|
||||||
}
|
}
|
||||||
const res = await submitTableQuestion(params)
|
const res = await submitTableQuestion(params)
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
// 保存成功!
|
// this.refreshQuestions()
|
||||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
await this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||||
this.addOrEdit.visible = false
|
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
|
||||||
this.refreshQuestions()
|
this.$refs['ecrf2'].getQuestions(this.visitTaskId, true)
|
||||||
|
this.$refs['ecrf3'].getQuestions(this.visitTaskId, true)
|
||||||
DicomEvent.$emit('getReportInfo', true)
|
DicomEvent.$emit('getReportInfo', true)
|
||||||
|
// 保存成功!
|
||||||
|
this.addOrEdit.visible = false
|
||||||
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
}
|
}
|
||||||
loading.close()
|
loading.close()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -685,7 +704,8 @@ export default {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
uploadTpl() {
|
uploadTpl(lesionType) {
|
||||||
|
this.upload.title = `导入( ${this.$fd('LesionType', lesionType)} )`
|
||||||
this.upload.visible = true
|
this.upload.visible = true
|
||||||
},
|
},
|
||||||
async downloadTpl() {
|
async downloadTpl() {
|
||||||
|
@ -707,7 +727,7 @@ export default {
|
||||||
const span = document.createElement('span')
|
const span = document.createElement('span')
|
||||||
span.innerText = column.label
|
span.innerText = column.label
|
||||||
document.body.appendChild(span)
|
document.body.appendChild(span)
|
||||||
column.minWidth = span.getBoundingClientRect().width + 15
|
column.minWidth = span.getBoundingClientRect().width + 20
|
||||||
document.body.removeChild(span)
|
document.body.removeChild(span)
|
||||||
return h('span', column.label)
|
return h('span', column.label)
|
||||||
}
|
}
|
||||||
|
@ -852,6 +872,9 @@ export default {
|
||||||
/deep/.el-table__fixed-body-wrapper tr:hover > td {
|
/deep/.el-table__fixed-body-wrapper tr:hover > td {
|
||||||
background-color: #000 !important;
|
background-color: #000 !important;
|
||||||
}
|
}
|
||||||
|
/deep/.el-table--scrollable-x .el-table__body-wrapper {
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -211,8 +211,7 @@ export default {
|
||||||
...mapGetters(['language'])
|
...mapGetters(['language'])
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
this.digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
||||||
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : parseInt(digitPlaces)
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formItemChange(v, question) {
|
formItemChange(v, question) {
|
||||||
|
@ -242,11 +241,18 @@ export default {
|
||||||
} else if (valueType === 3) {
|
} else if (valueType === 3) {
|
||||||
value = parseFloat(value)
|
value = parseFloat(value)
|
||||||
} else {
|
} else {
|
||||||
value = parseFloat(value).toFixed(this.digitPlaces)
|
value = this.numberToFixed(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return value
|
return value
|
||||||
},
|
},
|
||||||
|
numberToFixed(v) {
|
||||||
|
if (this.digitPlaces > -1) {
|
||||||
|
return isNaN(parseFloat(v)) ? null : `${parseFloat(v).toFixed(this.digitPlaces)}`
|
||||||
|
} else {
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
},
|
||||||
resetFormItemData(v) {
|
resetFormItemData(v) {
|
||||||
this.$emit('resetFormItemData', v)
|
this.$emit('resetFormItemData', v)
|
||||||
},
|
},
|
||||||
|
|
|
@ -45,11 +45,11 @@
|
||||||
<div v-for="item in qs.Childrens" :key="item.Id">
|
<div v-for="item in qs.Childrens" :key="item.Id">
|
||||||
<div v-if="item.Type === 'basicTable'" class="flex-row" style="margin:3px 0;">
|
<div v-if="item.Type === 'basicTable'" class="flex-row" style="margin:3px 0;">
|
||||||
<div class="title">{{ item.QuestionName }}</div>
|
<div class="title">{{ item.QuestionName }}</div>
|
||||||
<div v-if="item.LesionType === 112 && readingTaskState < 2">
|
<div v-if="(item.LesionType === 112 || item.LesionType === 111) && readingTaskState < 2">
|
||||||
<div class="add-icon">
|
<div class="add-icon" @click.prevent="downloadTpl(item.LesionType)">
|
||||||
<i class="el-icon-download" />
|
<i class="el-icon-download" />
|
||||||
</div>
|
</div>
|
||||||
<div class="add-icon" style="margin: 0 5px;">
|
<div class="add-icon" style="margin: 0 5px;" @click.prevent="uploadTpl(item.LesionType)">
|
||||||
<i class="el-icon-upload2" />
|
<i class="el-icon-upload2" />
|
||||||
</div>
|
</div>
|
||||||
<div class="add-icon" @click.prevent="handleAddOrEdit('add',item)">
|
<div class="add-icon" @click.prevent="handleAddOrEdit('add',item)">
|
||||||
|
@ -69,10 +69,10 @@
|
||||||
{{ getLesionName(item.OrderMark,scope.row.RowIndex) }}
|
{{ getLesionName(item.OrderMark,scope.row.RowIndex) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
type="index"
|
type="index"
|
||||||
width="40px"
|
width="40px"
|
||||||
/>
|
/> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-for="q of item.TableQuestions.Questions"
|
v-for="q of item.TableQuestions.Questions"
|
||||||
:key="q.Id"
|
:key="q.Id"
|
||||||
|
@ -80,18 +80,30 @@
|
||||||
:label="q.QuestionName"
|
:label="q.QuestionName"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
:render-header="renderHeader"
|
:render-header="renderHeader"
|
||||||
/>
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="q.Unit > 0">
|
||||||
|
{{ `${scope.row[q.Id]}${$fd('ValueUnit', parseInt(q.Unit))}` }}
|
||||||
|
</span>
|
||||||
|
<span v-else-if="q.DictionaryCode">
|
||||||
|
{{ `${$fd(q.DictionaryCode, parseInt(scope.row[q.Id]))}` }}
|
||||||
|
</span>
|
||||||
|
<span v-else>
|
||||||
|
{{ `${scope.row[q.Id]}` }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="readingTaskState < 2 && (item.LesionType === 112 || item.LesionType === 101)"
|
v-if="readingTaskState < 2"
|
||||||
:label="$t('common:action:action')"
|
:label="$t('common:action:action')"
|
||||||
width="100px"
|
width="90px"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="mini" @click="handleAddOrEdit('edit',item, scope.$index)">
|
<el-button type="text" size="mini" @click="handleAddOrEdit('edit',item, scope.$index)">
|
||||||
{{ $t('common:button:edit') }}
|
{{ $t('common:button:edit') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="item.LesionType === 112" type="text" size="mini" @click="handleDelete(item, scope.$index)">
|
<el-button v-if="item.LesionType === 112 || item.LesionType === 111" type="text" size="mini" @click="handleDelete(item, scope.$index)">
|
||||||
{{ $t('common:button:delete') }}
|
{{ $t('common:button:delete') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -198,22 +210,38 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<!-- 导入 -->
|
||||||
|
<el-dialog
|
||||||
|
v-if="upload.visible"
|
||||||
|
:visible.sync="upload.visible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:title="upload.title"
|
||||||
|
width="500px"
|
||||||
|
>
|
||||||
|
<UploadExcel
|
||||||
|
:visit-task-id="visitTaskId"
|
||||||
|
:lesion-type="upload.lesionType"
|
||||||
|
@close="uploadDlgClose"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { saveTaskQuestion, submitTableQuestion, deleteReadingRowAnswer } from '@/api/trials'
|
import { saveTaskQuestion, submitTableQuestion, deleteReadingRowAnswer } from '@/api/trials'
|
||||||
import { resetReadingTask } from '@/api/reading'
|
import { resetReadingTask, getOCTFCTTemplate, getOCTLipidAngleTemplate } from '@/api/reading'
|
||||||
import DicomEvent from './../DicomEvent'
|
import DicomEvent from './../DicomEvent'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import Questions from './../Questions'
|
import Questions from './../Questions'
|
||||||
import QuestionTableFormItem from './QuestionTableFormItem'
|
import QuestionTableFormItem from './QuestionTableFormItem'
|
||||||
|
import UploadExcel from './UploadExcel'
|
||||||
export default {
|
export default {
|
||||||
name: 'MeasurementList',
|
name: 'MeasurementList',
|
||||||
components: {
|
components: {
|
||||||
Questions,
|
Questions,
|
||||||
QuestionTableFormItem
|
QuestionTableFormItem,
|
||||||
|
UploadExcel
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
isShow: {
|
isShow: {
|
||||||
|
@ -253,7 +281,8 @@ export default {
|
||||||
questionForm: {},
|
questionForm: {},
|
||||||
formChanged: false,
|
formChanged: false,
|
||||||
digitPlaces: 2,
|
digitPlaces: 2,
|
||||||
addOrEdit: { visible: false, title: '' },
|
addOrEdit: { visible: false, title: '', lesionType: null },
|
||||||
|
upload: { visible: false, title: '', lesionType: null },
|
||||||
qsList: [],
|
qsList: [],
|
||||||
answersList: [],
|
answersList: [],
|
||||||
qsForm: {},
|
qsForm: {},
|
||||||
|
@ -287,8 +316,7 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.subjectCode = this.$router.currentRoute.query.subjectCode
|
// this.subjectCode = this.$router.currentRoute.query.subjectCode
|
||||||
this.subjectCode = localStorage.getItem('subjectCode')
|
this.subjectCode = localStorage.getItem('subjectCode')
|
||||||
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
this.digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
||||||
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
|
||||||
window.addEventListener('message', this.receiveMsg)
|
window.addEventListener('message', this.receiveMsg)
|
||||||
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
|
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||||
DicomEvent.$on('setCollapseActive', measureData => {
|
DicomEvent.$on('setCollapseActive', measureData => {
|
||||||
|
@ -476,11 +504,15 @@ export default {
|
||||||
} else if (valueType === 3) {
|
} else if (valueType === 3) {
|
||||||
this.$set(this.questionForm, qId, parseFloat(value))
|
this.$set(this.questionForm, qId, parseFloat(value))
|
||||||
} else {
|
} else {
|
||||||
this.$set(this.questionForm, qId, parseFloat(value).toFixed(this.digitPlaces))
|
this.$set(this.questionForm, qId, this.numberToFixed(value))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
numberToFixed(v, unit) {
|
numberToFixed(v) {
|
||||||
return isNaN(parseFloat(v)) ? null : `${parseFloat(v).toFixed(this.digitPlaces)}${unit}`
|
if (this.digitPlaces > -1) {
|
||||||
|
return isNaN(parseFloat(v)) ? null : `${parseFloat(v).toFixed(this.digitPlaces)}`
|
||||||
|
} else {
|
||||||
|
return v
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async handleSave(index) {
|
async handleSave(index) {
|
||||||
const refName = `questions${index}`
|
const refName = `questions${index}`
|
||||||
|
@ -564,7 +596,7 @@ export default {
|
||||||
this.$set(this.qsForm, this.avgId, null)
|
this.$set(this.qsForm, this.avgId, null)
|
||||||
} else {
|
} else {
|
||||||
const avg = (parseFloat(m1) + parseFloat(m2) + parseFloat(m3)) / 3
|
const avg = (parseFloat(m1) + parseFloat(m2) + parseFloat(m3)) / 3
|
||||||
this.$set(this.qsForm, this.avgId, avg.toFixed(this.digitPlaces))
|
this.$set(this.qsForm, this.avgId, this.numberToFixed(avg))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -602,6 +634,7 @@ export default {
|
||||||
this.$set(this.qsForm, i.Id, v)
|
this.$set(this.qsForm, i.Id, v)
|
||||||
})
|
})
|
||||||
this.addOrEdit.visible = true
|
this.addOrEdit.visible = true
|
||||||
|
this.addOrEdit.lesionType = row.LesionType
|
||||||
},
|
},
|
||||||
async saveFormData() {
|
async saveFormData() {
|
||||||
const valid = await this.$refs.tableQsForm.validate()
|
const valid = await this.$refs.tableQsForm.validate()
|
||||||
|
@ -626,13 +659,20 @@ export default {
|
||||||
trialId: this.trialId,
|
trialId: this.trialId,
|
||||||
answerList: answers
|
answerList: answers
|
||||||
}
|
}
|
||||||
|
if (this.addOrEdit.lesionType === 101) {
|
||||||
|
params.computationTrigger = 9
|
||||||
|
}
|
||||||
const res = await submitTableQuestion(params)
|
const res = await submitTableQuestion(params)
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
// 保存成功!
|
// this.refreshQuestions()
|
||||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
await this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||||
this.addOrEdit.visible = false
|
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
|
||||||
this.refreshQuestions()
|
this.$refs['ecrf2'].getQuestions(this.visitTaskId, true)
|
||||||
|
this.$refs['ecrf3'].getQuestions(this.visitTaskId, true)
|
||||||
DicomEvent.$emit('getReportInfo', true)
|
DicomEvent.$emit('getReportInfo', true)
|
||||||
|
// 保存成功!
|
||||||
|
this.addOrEdit.visible = false
|
||||||
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
}
|
}
|
||||||
loading.close()
|
loading.close()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -671,11 +711,35 @@ export default {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
uploadTpl(lesionType) {
|
||||||
|
this.upload.lesionType = lesionType
|
||||||
|
this.upload.title = `导入( ${this.$fd('LesionType', lesionType)} )`
|
||||||
|
this.upload.visible = true
|
||||||
|
},
|
||||||
|
async downloadTpl(lesionType) {
|
||||||
|
try {
|
||||||
|
const params = {
|
||||||
|
visitTaskId: this.visitTaskId
|
||||||
|
}
|
||||||
|
if (lesionType === 112) {
|
||||||
|
await getOCTFCTTemplate(params)
|
||||||
|
} else {
|
||||||
|
await getOCTLipidAngleTemplate(params)
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async uploadDlgClose() {
|
||||||
|
await this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||||
|
DicomEvent.$emit('getReportInfo', true)
|
||||||
|
this.upload.visible = false
|
||||||
|
},
|
||||||
renderHeader(h, { column, $index }) {
|
renderHeader(h, { column, $index }) {
|
||||||
const span = document.createElement('span')
|
const span = document.createElement('span')
|
||||||
span.innerText = column.label
|
span.innerText = column.label
|
||||||
document.body.appendChild(span)
|
document.body.appendChild(span)
|
||||||
column.minWidth = span.getBoundingClientRect().width + 15
|
column.minWidth = span.getBoundingClientRect().width + 30
|
||||||
document.body.removeChild(span)
|
document.body.removeChild(span)
|
||||||
return h('span', column.label)
|
return h('span', column.label)
|
||||||
}
|
}
|
||||||
|
@ -820,6 +884,9 @@ export default {
|
||||||
/deep/.el-table__fixed-body-wrapper tr:hover > td {
|
/deep/.el-table__fixed-body-wrapper tr:hover > td {
|
||||||
background-color: #000 !important;
|
background-color: #000 !important;
|
||||||
}
|
}
|
||||||
|
/deep/.el-table--scrollable-x .el-table__body-wrapper {
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -211,8 +211,7 @@ export default {
|
||||||
...mapGetters(['language'])
|
...mapGetters(['language'])
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
this.digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
||||||
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : parseInt(digitPlaces)
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formItemChange(v, question) {
|
formItemChange(v, question) {
|
||||||
|
@ -242,11 +241,18 @@ export default {
|
||||||
} else if (valueType === 3) {
|
} else if (valueType === 3) {
|
||||||
value = parseFloat(value)
|
value = parseFloat(value)
|
||||||
} else {
|
} else {
|
||||||
value = parseFloat(value).toFixed(this.digitPlaces)
|
value = this.numberToFixed(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return value
|
return value
|
||||||
},
|
},
|
||||||
|
numberToFixed(v) {
|
||||||
|
if (this.digitPlaces > -1) {
|
||||||
|
return isNaN(parseFloat(v)) ? null : `${parseFloat(v).toFixed(this.digitPlaces)}`
|
||||||
|
} else {
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
},
|
||||||
resetFormItemData(v) {
|
resetFormItemData(v) {
|
||||||
this.$emit('resetFormItemData', v)
|
this.$emit('resetFormItemData', v)
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,125 @@
|
||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
ref="uploadExcel"
|
||||||
|
class="upload-excel-file"
|
||||||
|
>
|
||||||
|
<!-- 文件 -->
|
||||||
|
<el-form-item :label="$t('trials:consistencyCheck:label:file')">
|
||||||
|
<div class="upload-container">
|
||||||
|
<el-upload
|
||||||
|
class="upload-demo"
|
||||||
|
action
|
||||||
|
accept=".xlsx,.xls,.csv"
|
||||||
|
:before-upload="beforeUpload"
|
||||||
|
:http-request="handleUploadFile"
|
||||||
|
:on-preview="handlePreview"
|
||||||
|
:show-file-list="true"
|
||||||
|
:limit="1"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
|
>
|
||||||
|
<el-button size="small" type="primary">
|
||||||
|
{{ $t('trials:consistencyCheck:dialogButton:upload') }}
|
||||||
|
</el-button>
|
||||||
|
<span
|
||||||
|
slot="tip"
|
||||||
|
style="margin-left:10px;"
|
||||||
|
class="el-upload__tip"
|
||||||
|
>
|
||||||
|
({{ $t('trials:consistencyCheck:message:excelFileOnly') }})
|
||||||
|
</span>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { uploadOCTFCTTemplate, uploadOCTLipidAngleTemplate } from '@/api/reading'
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
visitTaskId: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
lesionType: {
|
||||||
|
type: Number,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
beforeUpload(file) {
|
||||||
|
// 检测文件类型是否符合要求
|
||||||
|
if (this.checkFileSuffix(file.name)) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
// Must be xls or xlsx format
|
||||||
|
this.$alert(this.$t('trials:consistencyCheck:message:xlsx'))
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleUploadFile(param) {
|
||||||
|
const loading = this.$loading({ fullscreen: true })
|
||||||
|
try {
|
||||||
|
var data = new FormData()
|
||||||
|
data.append('file', param.file)
|
||||||
|
data.append('visitTaskId', this.visitTaskId)
|
||||||
|
if (this.lesionType === 112) {
|
||||||
|
await uploadOCTFCTTemplate(data)
|
||||||
|
} else {
|
||||||
|
await uploadOCTLipidAngleTemplate(data)
|
||||||
|
}
|
||||||
|
this.$emit('close')
|
||||||
|
this.$message.success('导入成功!')
|
||||||
|
loading.close()
|
||||||
|
} catch (e) {
|
||||||
|
loading.close()
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handlePreview(file) {
|
||||||
|
if (file.fullPath) {
|
||||||
|
window.open(file.fullPath, '_blank')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleExceed(files, fileList) {
|
||||||
|
// Upload is currently limited to 1 file
|
||||||
|
this.$message.warning(this.$t('trials:consistencyCheck:message:onlyOneFile'))
|
||||||
|
},
|
||||||
|
checkFileSuffix(fileName) {
|
||||||
|
var typeArr = ['xls', 'xlsx', 'csv']
|
||||||
|
var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()
|
||||||
|
if (typeArr.indexOf(extendName) !== -1) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.upload-excel-file{
|
||||||
|
.upload-container .el-upload--text {
|
||||||
|
border: none;
|
||||||
|
width: 80px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
.upload-container .el-input--small {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
.upload-container .el-icon-circle-check {
|
||||||
|
color: #428bca;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
.account_item_clear{
|
||||||
|
.el-tag__close{
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -57,6 +57,7 @@
|
||||||
:is-reading-show-subject-info="isReadingShowSubjectInfo"
|
:is-reading-show-subject-info="isReadingShowSubjectInfo"
|
||||||
:is-reading-task-view-in-order="isReadingTaskViewInOrder"
|
:is-reading-task-view-in-order="isReadingTaskViewInOrder"
|
||||||
:is-exists-manual="isExistsManual"
|
:is-exists-manual="isExistsManual"
|
||||||
|
:iseCRFShowInDicomReading="iseCRFShowInDicomReading"
|
||||||
@previewCD="previewCD"
|
@previewCD="previewCD"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -136,6 +137,10 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
iseCRFShowInDicomReading: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
questionFormChangeState: {
|
questionFormChangeState: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default() {
|
default() {
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
:is-exists-clinical-data="isExistsClinicalData"
|
:is-exists-clinical-data="isExistsClinicalData"
|
||||||
:is-exists-no-dicom-file="isExistsNoDicomFile"
|
:is-exists-no-dicom-file="isExistsNoDicomFile"
|
||||||
:is-exists-manual="isExistsManual"
|
:is-exists-manual="isExistsManual"
|
||||||
|
:iseCRFShowInDicomReading="IseCRFShowInDicomReading"
|
||||||
@previewCD="previewCD"
|
@previewCD="previewCD"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
Loading…
Reference in New Issue