下载bug
continuous-integration/drone/push Build is passing Details

uat_us
熊飞 2024-01-22 11:44:26 +08:00
parent cb61f7415e
commit 7ff424ad65
16 changed files with 120 additions and 140 deletions

View File

@ -201,10 +201,10 @@ export default {
},
//
handleDownload(row) {
this.loading = true
DownloadCommonDoc(row.Code).then(data => {
this.loading = false
}).catch(() => { this.loading = false })
window.open(this.OSSclientConfig.basePath + row.Path)
// DownloadCommonDoc(row.Code).then(data => {
// this.loading = false
// }).catch(() => { this.loading = false })
},
//
handleEdit(row) {

View File

@ -320,7 +320,7 @@ export default {
setFormItemData(obj) {
this.$emit('setFormItemData', obj)
},
uploadScreenshot(param) {
async uploadScreenshot(param) {
if (!this.visitTaskId) return
const loading = this.$loading({
target: document.querySelector('.ecrf-wrapper'),
@ -331,16 +331,12 @@ export default {
})
const formData = new FormData()
formData.append('file', param.file)
uploadReadingAnswerImage(this.$route.query.trialId, this.visitTaskId, formData).then(res => {
if (res.IsSuccess) {
this.fileList.push({ url: `${res.Result.Path}` })
this.urls.push(res.Result.Path)
this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '' })
}
loading.close()
}).catch(() => {
loading.close()
})
var file = await this.fileToBlob(param.file)
const res = await this.OSSclient.put(`/${this.trialId}/ReadAttachment/${this.subjectId}/${this.visitTaskId}/${param.file.name}`, file)
this.fileList.push({ name: param.file.name, 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('|') : '' })
loading.close()
},
handleBeforeUpload(file) {
//

View File

@ -349,7 +349,7 @@ export default {
},
handleConfig(row) {
this.rowData = { ...row }
this.config.title = `${this.$fd('LesionType', row.LesionType)}表格问题`
this.config.title = `${this.$fd('LesionType', row.LesionType)}${this.$t('trials:readingUnit:qsList:title:tableQs')}`
this.config.visible = true
},
//

View File

@ -75,6 +75,7 @@ export default {
preview(index, row) {
const filePath = row.FullPath
if (filePath) {
console.log(this.OSSclientConfig.basePath + filePath)
window.open(this.OSSclientConfig.basePath + filePath, '_blank')
}
},

View File

@ -26,14 +26,7 @@
sortable="custom"
>
<template slot-scope="scope">
<router-link
style="color: #428bca;"
tag="a"
:to="{
path: `/trialsResume?doctorId=${scope.row.Id}&token=${token}`,
}"
target="_blank"
>{{ scope.row.LastName }} / {{ scope.row.FirstName }}</router-link>
<el-button type="text" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</el-button>
</template>
</el-table-column>
<!-- Name CN -->
@ -109,6 +102,9 @@ export default {
},
created() { this.initPage() },
methods: {
go(path) {
window.open(path)
},
initPage() {
this.getList()
},

View File

@ -37,14 +37,7 @@
sortable="custom"
>
<template slot-scope="scope">
<router-link
style="color: #428bca;"
tag="a"
:to="{
path: `/trialsResume?doctorId=${scope.row.Id}&token=${token}`,
}"
target="_blank"
>{{ scope.row.LastName }} / {{ scope.row.FirstName }}</router-link>
<el-button type="text" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</el-button>
</template>
</el-table-column>
<!-- Name CN -->
@ -124,6 +117,9 @@ export default {
},
created() { this.initPage() },
methods: {
go(path) {
window.open(path)
},
initPage() {
this.getList()
},

View File

@ -124,14 +124,15 @@
sortable="custom"
>
<template slot-scope="scope">
<router-link
style="color: #428bca;"
tag="a"
:to="{
path: `/trialsResume?doctorId=${scope.row.Id}&token=${token}`,
}"
target="_blank"
>{{ scope.row.LastName }} / {{ scope.row.FirstName }}</router-link>
<el-button type="text" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</el-button>
<!-- <router-link-->
<!-- style="color: #428bca;"-->
<!-- tag="a"-->
<!-- :to="{-->
<!-- path: `/trialsResume?doctorId=${scope.row.Id}&token=${token}`,-->
<!-- }"-->
<!-- target="_blank"-->
<!-- >{{ scope.row.LastName }} / {{ scope.row.FirstName }}</router-link>-->
</template>
</el-table-column>
<!-- Name CN -->
@ -299,6 +300,9 @@ export default {
},
created() { this.initPage() },
methods: {
go(path) {
window.open(path)
},
initPage() {
this.getList()
store.dispatch('global/getHospital')

View File

@ -47,14 +47,7 @@
min-width="120"
>
<template slot-scope="scope">
<router-link
style="color: #428bca;"
tag="a"
:to="{
path: `/trialsResume?doctorId=${scope.row.Id}&token=${token}`,
}"
target="_blank"
>{{ scope.row.LastName }} / {{ scope.row.FirstName }}</router-link>
<el-button type="text" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</el-button>
</template>
</el-table-column>
<!-- Name CN -->
@ -168,6 +161,9 @@ export default {
},
created() { this.initPage() },
methods: {
go(path) {
window.open(path)
},
initPage() {
this.getList()
},

View File

@ -325,7 +325,7 @@ export default {
locateAnnotation(question) {
this.$emit('locateAnnotation', question)
},
uploadScreenshot(param) {
async uploadScreenshot(param) {
if (!this.visitTaskId) return
const loading = this.$loading({
target: document.querySelector('.ecrf-wrapper'),
@ -334,18 +334,12 @@ export default {
text: 'Loading',
spinner: 'el-icon-loading'
})
const formData = new FormData()
formData.append('file', param.file)
uploadReadingAnswerImage(this.$route.query.trialId, this.visitTaskId, formData).then(res => {
if (res.IsSuccess) {
this.fileList.push({ url: `${res.Result.Path}` })
this.urls.push(res.Result.Path)
this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '' })
}
loading.close()
}).catch(() => {
loading.close()
})
var file = await this.fileToBlob(param.file)
const res = await this.OSSclient.put(`/${this.trialId}/ReadAttachment/${this.subjectId}/${this.visitTaskId}/${param.file.name}`, file)
this.fileList.push({ name: param.file.name, 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('|') : '' })
loading.close()
},
handleBeforeUpload(file) {
//

View File

@ -376,7 +376,7 @@ export default {
locateAnnotation(question) {
this.$emit('locateAnnotation', question)
},
uploadScreenshot(param) {
async uploadScreenshot(param) {
if (!this.visitTaskId) return
const loading = this.$loading({
target: document.querySelector('.ecrf-wrapper'),
@ -385,18 +385,12 @@ export default {
text: 'Loading',
spinner: 'el-icon-loading'
})
const formData = new FormData()
formData.append('file', param.file)
uploadReadingAnswerImage(this.$route.query.trialId, this.visitTaskId, formData).then(res => {
if (res.IsSuccess) {
this.fileList.push({ url: `${res.Result.Path}` })
this.urls.push(res.Result.Path)
this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '' })
}
loading.close()
}).catch(() => {
loading.close()
})
var file = await this.fileToBlob(param.file)
const res = await this.OSSclient.put(`/${this.trialId}/ReadAttachment/${this.subjectId}/${this.visitTaskId}/${param.file.name}`, file)
this.fileList.push({ name: param.file.name, 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('|') : '' })
loading.close()
},
handleBeforeUpload(file) {
//

View File

@ -207,7 +207,7 @@
:class="{disabled:fileList.length >= question.ImageCount}"
>
<el-button slot="default" class="el-icon-plus">
上传附件
{{this.$t('common:button:upload')}}
</el-button>
<!-- <div slot="file" slot-scope="{file}">-->
<!-- <div class="el-upload-list__item-name"></div>-->
@ -680,7 +680,7 @@ export default {
},
openAddTableCol(row, index) {
this.addOrEdit.visible = true
this.addOrEdit.title = row.QuestionName + '表格问题'
this.addOrEdit.title = row.QuestionName + this.$t('trials:readingUnit:qsList:title:tableQs')
this.QuestionsList = row.TableQuestions.Questions
this.AnswersList = row.TableQuestions.Answers
if (!index && index !== 0) {

View File

@ -264,7 +264,7 @@ export default {
setFormItemData(obj) {
this.$emit('setFormItemData', obj)
},
uploadScreenshot(param) {
async uploadScreenshot(param) {
if (!this.visitTaskId) return
const loading = this.$loading({
target: document.querySelector('.el-button'),
@ -272,18 +272,12 @@ export default {
lock: true,
spinner: 'el-icon-loading'
})
const formData = new FormData()
formData.append('file', param.file)
uploadReadingAnswerImage(this.$route.query.trialId, this.visitTaskId, formData).then(res => {
if (res.IsSuccess) {
this.fileList.push({ url: `/api/${res.Result.Path}` })
this.urls.push(res.Result.Path)
this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '' })
}
loading.close()
}).catch(() => {
loading.close()
})
var file = await this.fileToBlob(param.file)
const res = await this.OSSclient.put(`/${this.trialId}/ReadAttachment/${this.subjectId}/${this.visitTaskId}/${param.file.name}`, file)
this.fileList.push({ name: param.file.name, 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('|') : '' })
loading.close()
},
handleBeforeUpload(file) {
//

View File

@ -266,7 +266,7 @@ export default {
setFormItemData(obj) {
this.$emit('setFormItemData', obj)
},
uploadScreenshot(param) {
async uploadScreenshot(param) {
if (!this.visitTaskId) return
const loading = this.$loading({
target: document.querySelector('.ecrf-wrapper'),
@ -275,18 +275,12 @@ export default {
text: 'Loading',
spinner: 'el-icon-loading'
})
const formData = new FormData()
formData.append('file', param.file)
uploadReadingAnswerImage(this.$route.query.trialId, this.visitTaskId, formData).then(res => {
if (res.IsSuccess) {
this.fileList.push({ url: `${res.Result.Path}` })
this.urls.push(res.Result.Path)
this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '' })
}
loading.close()
}).catch(() => {
loading.close()
})
var file = await this.fileToBlob(param.file)
const res = await this.OSSclient.put(`/${this.trialId}/ReadAttachment/${this.subjectId}/${this.visitTaskId}/${param.file.name}`, file)
this.fileList.push({ name: param.file.name, 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('|') : '' })
loading.close()
},
handleBeforeUpload(file) {
//

View File

@ -230,7 +230,7 @@
:visible.sync="imgVisible"
width="600px"
>
<el-image :src="OSSclientConfig.basePath + imageUrl" width="100%">
<el-image :src="imageUrl" crossOrigin="Anonymous" width="100%">
<!-- 加载中 -->
<div slot="placeholder" class="image-slot">
{{ $t('trials:readingUnit:qsList:message:loading') }}<span class="dot">...</span>
@ -626,27 +626,47 @@ export default {
setFormItemData(obj) {
this.$emit('setFormItemData', obj)
},
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'
})
const formData = new FormData()
formData.append('file', param.file)
uploadReadingAnswerImage(this.$route.query.trialId, this.visitTaskId, formData).then(res => {
if (res.IsSuccess) {
this.fileList.push({ url: `${res.Result.Path}` })
this.urls.push(res.Result.Path)
this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '' })
}
async uploadScreenshot(param) {
console.log(this.visitTaskId)
if (!this.visitTaskId) {
const loading = this.$loading({
target: document.querySelector('.ecrf-wrapper'),
fullscreen: false,
lock: true,
text: 'Loading',
spinner: 'el-icon-loading'
})
var file = await this.fileToBlob(param.file)
const res = await this.OSSclient.put(`/${this.trialId}/ReadAttachment/preview/${param.file.name}`, file)
this.fileList.push({ name: param.file.name, 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('|') : '' })
loading.close()
}).catch(() => {
} else {
const loading = this.$loading({
target: document.querySelector('.ecrf-wrapper'),
fullscreen: false,
lock: true,
text: 'Loading',
spinner: 'el-icon-loading'
})
var file = await this.fileToBlob(param.file)
const res = await this.OSSclient.put(`/${this.trialId}/ReadAttachment/${this.subjectId}/${this.visitTaskId}/${param.file.name}`, file)
this.fileList.push({ name: param.file.name, 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('|') : '' })
loading.close()
})
}
// uploadReadingAnswerImage(this.$route.query.trialId, this.visitTaskId, formData).then(res => {
// if (res.IsSuccess) {
// this.fileList.push({ url: `${res.Result.Path}` })
// this.urls.push(res.Result.Path)
// this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '' })
// }
// loading.close()
// }).catch(() => {
// loading.close()
// })
},
handleBeforeUpload(file) {
//

View File

@ -266,7 +266,7 @@ export default {
},
openAddTableCol(row) {
this.addOrEdit.visible = true
this.addOrEdit.title = row.QuestionName + '表格问题'
this.addOrEdit.title = row.QuestionName + this.$t('trials:readingUnit:qsList:title:tableQs')
this.QuestionsList = row.TableQuestions.Questions
this.AnswersList = row.TableQuestions.Answers
this.QuestionsForm = {}
@ -316,7 +316,7 @@ export default {
setFormItemData(obj) {
this.$emit('setFormItemData', obj)
},
uploadScreenshot(param) {
async uploadScreenshot(param) {
if (!this.visitTaskId) return
const loading = this.$loading({
target: document.querySelector('.ecrf-wrapper'),
@ -325,18 +325,12 @@ export default {
text: 'Loading',
spinner: 'el-icon-loading'
})
const formData = new FormData()
formData.append('file', param.file)
uploadReadingAnswerImage(this.$route.query.trialId, this.visitTaskId, formData).then(res => {
if (res.IsSuccess) {
this.fileList.push({ url: `${res.Result.Path}` })
this.urls.push(res.Result.Path)
this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '' })
}
loading.close()
}).catch(() => {
loading.close()
})
var file = await this.fileToBlob(param.file)
const res = await this.OSSclient.put(`/${this.trialId}/ReadAttachment/${this.subjectId}/${this.visitTaskId}/${param.file.name}`, file)
this.fileList.push({ name: param.file.name, 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('|') : '' })
loading.close()
},
handleBeforeUpload(file) {
//

View File

@ -1431,10 +1431,11 @@ export default {
})
},
handleDownloadTpl(row) {
this.listLoading = true
DownloadTrialClinicalFile(row.Id).then(data => {
this.listLoading = false
}).catch(() => { this.listLoading = false })
window.open(this.OSSclientConfig.basePath + row.Path)
// this.listLoading = true
// DownloadTrialClinicalFile(row.Id).then(data => {
// this.listLoading = false
// }).catch(() => { this.listLoading = false })
},
handleSelectable(row) {
if (!row.IsApply) {