Compare commits

..

No commits in common. "d292b655d35df00c9bc310d97ed37bec4a477ce6" and "a8d090e32c831e7bd5c421dd7724532402825a94" have entirely different histories.

3 changed files with 12 additions and 20 deletions

View File

@ -229,13 +229,13 @@
<el-upload
v-if="question.Type==='upload'"
:action="question.FileType"
:limit="question.ImageCount === 0 ? 100 : question.ImageCount"
:limit="question.ImageCount"
:on-preview="handlePictureCardPreview"
:before-upload="(file) => {return handleBeforeUpload(file, question.FileType)}"
:http-request="uploadScreenshot"
:on-remove="handleRemove"
:file-list="fileList"
:class="{disabled:question.ImageCount === 0 ? false : fileList.length >= question.ImageCount}"
:class="{disabled:fileList.length >= question.ImageCount}"
>
<el-button slot="default" class="el-icon-plus">
{{this.$t('common:button:upload')}}

View File

@ -167,15 +167,15 @@
<!-- 上传图像 -->
<el-upload
v-if="question.Type==='upload'"
:action="question.FileType"
:limit="question.ImageCount === 0 ? 100 : question.ImageCount"
:action="accept"
:limit="question.ImageCount"
:on-preview="handlePictureCardPreview"
:before-upload="handleBeforeUpload"
:http-request="uploadScreenshot"
list-type="picture-card"
:on-remove="handleRemove"
:file-list="fileList"
:class="{disabled: question.ImageCount === 0 ? false : fileList.length >= question.ImageCount}"
:class="{disabled:fileList.length >= question.ImageCount}"
>
<i slot="default" class="el-icon-plus" />
<div slot="file" slot-scope="{file}">
@ -331,7 +331,6 @@ export default {
this.fileList.push({ name: '', url: `${url}` })
})
}
console.log('11')
}
if (this.type === 'edit') return
// if (this.question.Type === 'number') {
@ -525,17 +524,14 @@ export default {
// this.fileList = []
return true
} else {
let msg = this.$t(
"trials:readingUnit:qsList:message:imageFormat"
).replace("xxx", this.question.FileType)
this.$alert(msg)
this.$alert(`必须是 ${this.accept} 格式`)
return false
}
},
checkFileSuffix(fileName) {
var index = fileName.lastIndexOf('.')
var suffix = fileName.substring(index + 1, fileName.length)
if (this.question.FileType.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === -1) {
if (this.accept.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === -1) {
return false
} else {
return true

View File

@ -1,15 +1,15 @@
<template>
<div>
<el-upload
:action="question.FileType"
:limit="question.ImageCount === 0 ? 100 : question.ImageCount"
:action="accept"
:limit="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))}"
:class="{disabled:readingTaskState >= 2 || (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" />
@ -101,7 +101,7 @@ name: "CustomizeReportPageUpload",
checkFileSuffix(fileName) {
var index = fileName.lastIndexOf('.')
var suffix = fileName.substring(index + 1, fileName.length)
if (this.question.FileType.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === -1) {
if (this.accept.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === -1) {
return false
} else {
return true
@ -132,11 +132,7 @@ name: "CustomizeReportPageUpload",
// 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)
this.$alert(`必须是 ${this.accept} 格式`)
return false
}
},