OCT标准更改
parent
f80bd64ede
commit
8fae8528c6
|
@ -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
|
||||
})
|
||||
}
|
||||
|
|
|
@ -62,7 +62,6 @@
|
|||
v-if="item.Type === 'basicTable' && item.TableQuestions"
|
||||
:ref="item.Id"
|
||||
:data="item.TableQuestions.Answers"
|
||||
max-height="600"
|
||||
>
|
||||
<!-- <el-table-column :label="$t('CustomizeQuestionFormItem:label:OrderMark')" width="60px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
|
@ -80,7 +79,16 @@
|
|||
:label="q.QuestionName"
|
||||
show-overflow-tooltip
|
||||
: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>
|
||||
{{`${scope.row[q.Id]}`}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="readingTaskState < 2 && item.LesionType === 102"
|
||||
:label="$t('common:action:action')"
|
||||
|
@ -162,6 +170,7 @@
|
|||
:is-qulity-issues="false"
|
||||
:group-classify="5"
|
||||
/>
|
||||
<!-- 新增、编辑弹窗 -->
|
||||
<el-dialog
|
||||
v-if="addOrEdit.visible"
|
||||
:visible.sync="addOrEdit.visible"
|
||||
|
@ -707,7 +716,7 @@ export default {
|
|||
const span = document.createElement('span')
|
||||
span.innerText = column.label
|
||||
document.body.appendChild(span)
|
||||
column.minWidth = span.getBoundingClientRect().width + 15
|
||||
column.minWidth = span.getBoundingClientRect().width + 20
|
||||
document.body.removeChild(span)
|
||||
return h('span', column.label)
|
||||
}
|
||||
|
|
|
@ -45,11 +45,11 @@
|
|||
<div v-for="item in qs.Childrens" :key="item.Id">
|
||||
<div v-if="item.Type === 'basicTable'" class="flex-row" style="margin:3px 0;">
|
||||
<div class="title">{{ item.QuestionName }}</div>
|
||||
<div v-if="item.LesionType === 112 && readingTaskState < 2">
|
||||
<div class="add-icon">
|
||||
<div v-if="(item.LesionType === 112 || item.LesionType === 111) && readingTaskState < 2">
|
||||
<div class="add-icon" @click.prevent="downloadTpl(item.LesionType)">
|
||||
<i class="el-icon-download" />
|
||||
</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" />
|
||||
</div>
|
||||
<div class="add-icon" @click.prevent="handleAddOrEdit('add',item)">
|
||||
|
@ -80,9 +80,18 @@
|
|||
:label="q.QuestionName"
|
||||
show-overflow-tooltip
|
||||
: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>
|
||||
{{ `${scope.row[q.Id]}` }}
|
||||
</span>
|
||||
</template>
|
||||
</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')"
|
||||
width="100px"
|
||||
fixed="right"
|
||||
|
@ -91,7 +100,7 @@
|
|||
<el-button type="text" size="mini" @click="handleAddOrEdit('edit',item, scope.$index)">
|
||||
{{ $t('common:button:edit') }}
|
||||
</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') }}
|
||||
</el-button>
|
||||
</template>
|
||||
|
@ -198,22 +207,38 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
</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>
|
||||
</template>
|
||||
<script>
|
||||
import { saveTaskQuestion, submitTableQuestion, deleteReadingRowAnswer } from '@/api/trials'
|
||||
import { resetReadingTask } from '@/api/reading'
|
||||
import { resetReadingTask, getOCTFCTTemplate, getOCTLipidAngleTemplate } from '@/api/reading'
|
||||
import DicomEvent from './../DicomEvent'
|
||||
import store from '@/store'
|
||||
import { mapGetters } from 'vuex'
|
||||
import Questions from './../Questions'
|
||||
import QuestionTableFormItem from './QuestionTableFormItem'
|
||||
import UploadExcel from './UploadExcel'
|
||||
export default {
|
||||
name: 'MeasurementList',
|
||||
components: {
|
||||
Questions,
|
||||
QuestionTableFormItem
|
||||
QuestionTableFormItem,
|
||||
UploadExcel
|
||||
},
|
||||
props: {
|
||||
isShow: {
|
||||
|
@ -254,6 +279,7 @@ export default {
|
|||
formChanged: false,
|
||||
digitPlaces: 2,
|
||||
addOrEdit: { visible: false, title: '' },
|
||||
upload: { visible: false, title: '导入', lesionType: null },
|
||||
qsList: [],
|
||||
answersList: [],
|
||||
qsForm: {},
|
||||
|
@ -671,11 +697,34 @@ export default {
|
|||
console.log(e)
|
||||
}
|
||||
},
|
||||
uploadTpl(lesionType) {
|
||||
this.upload.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 }) {
|
||||
const span = document.createElement('span')
|
||||
span.innerText = column.label
|
||||
document.body.appendChild(span)
|
||||
column.minWidth = span.getBoundingClientRect().width + 15
|
||||
column.minWidth = span.getBoundingClientRect().width + 30
|
||||
document.body.removeChild(span)
|
||||
return h('span', column.label)
|
||||
}
|
||||
|
|
|
@ -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>
|
Loading…
Reference in New Issue