delete tep file

uat_us
熊飞 2023-12-25 15:38:12 +08:00
parent 9ec51aede5
commit 2cf0801345
2 changed files with 11 additions and 19 deletions

View File

@ -340,7 +340,7 @@ export default {
setFormItemData(obj) { setFormItemData(obj) {
this.$emit('setFormItemData', obj) this.$emit('setFormItemData', obj)
}, },
uploadScreenshot(param) { async uploadScreenshot(param) {
if (!this.visitTaskId) return if (!this.visitTaskId) return
const loading = this.$loading({ const loading = this.$loading({
target: document.querySelector('.el-dialog'), target: document.querySelector('.el-dialog'),
@ -349,22 +349,14 @@ export default {
text: 'Loading', text: 'Loading',
spinner: 'el-icon-loading' spinner: 'el-icon-loading'
}) })
const formData = new FormData() var trialId = this.$route.query.trialId
formData.append('file', param.file) var subjectId = this.$route.query.trialId
uploadReadingAnswerImage(this.$route.query.trialId, this.visitTaskId, formData).then(res => { var file = await this.fileToBlob(param.file)
if (res.IsSuccess) { const res = await this.OSSclient.put(`/${trialId}/Read/${subjectId}/Visit/${param.file.name}`, file)
this.fileList.push({ url: `/api/${res.Result.Path}` }) this.fileList.push({ name: param.file.name, path: this.$getObjectName(res.url), url: this.$getObjectName(res.url)})
this.urls.push(res.Result.Path) this.urls.push(this.$getObjectName(res.url))
console.log(this.urls) this.$emit('setFormTableItemData', this.question.Id, this.urls.length > 0 ? this.urls.join('|') : '')
this.$emit('setFormTableItemData', this.question.Id, this.urls.length > 0 ? this.urls.join('|') : '') loading.close()
// 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()
})
}, },
handleBeforeUpload(file) { handleBeforeUpload(file) {
// //

View File

@ -62,10 +62,10 @@ module.exports = {
// target: 'http://123.56.181.144:8000/api', // 国内测试环境 // target: 'http://123.56.181.144:8000/api', // 国内测试环境
// target: 'http://123.56.94.154:8079', // 国内测试环境2 // target: 'http://123.56.94.154:8079', // 国内测试环境2
// target: 'http://123.56.94.154:7000', // 国内测试环境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', // target: 'http://123.56.181.144:7000',
changeOrigin: true, changeOrigin: true,
secure: true, secure: false,
pathRewrite: { pathRewrite: {
'^/api': '' '^/api': ''
} }