delete tep file
parent
9ec51aede5
commit
2cf0801345
|
@ -340,7 +340,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-dialog'),
|
||||
|
@ -349,22 +349,14 @@ 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: `/api/${res.Result.Path}` })
|
||||
this.urls.push(res.Result.Path)
|
||||
console.log(this.urls)
|
||||
this.$emit('setFormTableItemData', this.question.Id, this.urls.length > 0 ? this.urls.join('|') : '')
|
||||
// this.questionForm[this.question.Id] = this.urls.length > 0 ? this.urls.join('|') : ''
|
||||
// console.log(this.questionForm)
|
||||
// this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '' })
|
||||
}
|
||||
loading.close()
|
||||
}).catch(() => {
|
||||
loading.close()
|
||||
})
|
||||
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)
|
||||
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('setFormTableItemData', this.question.Id, this.urls.length > 0 ? this.urls.join('|') : '')
|
||||
loading.close()
|
||||
},
|
||||
handleBeforeUpload(file) {
|
||||
// 检测文件类型是否符合要求
|
||||
|
|
|
@ -62,10 +62,10 @@ module.exports = {
|
|||
// target: 'http://123.56.181.144:8000/api', // 国内测试环境
|
||||
// target: 'http://123.56.94.154:8079', // 国内测试环境2
|
||||
// target: 'http://123.56.94.154:7000', // 国内测试环境2
|
||||
target: 'https://test.extimaging.com',
|
||||
target: 'http://47.117.164.182:7090',
|
||||
// target: 'http://123.56.181.144:7000',
|
||||
changeOrigin: true,
|
||||
secure: true,
|
||||
secure: false,
|
||||
pathRewrite: {
|
||||
'^/api': ''
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue