非dicom文件名生成guid
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
e043e85630
commit
ccf3b823d8
|
@ -643,9 +643,10 @@ export default {
|
||||||
if (!this.uploadVisible) return
|
if (!this.uploadVisible) return
|
||||||
let file = this.fileList.filter((item) => item.id === arr[index].id)[0]
|
let file = this.fileList.filter((item) => item.id === arr[index].id)[0]
|
||||||
file.status = 1
|
file.status = 1
|
||||||
|
console.log(file)
|
||||||
let path = `/${this.$route.query.trialId}/TaskImage/${
|
let path = `/${this.$route.query.trialId}/TaskImage/${
|
||||||
this.currentRow.SubjectId
|
this.currentRow.SubjectId
|
||||||
}/${this.currentRow.VisitTaskId}/${new Date().getTime()}${file.name
|
}/${this.currentRow.VisitTaskId}/${this.$guid()}${file.name
|
||||||
.substring(file.name.lastIndexOf('.'))
|
.substring(file.name.lastIndexOf('.'))
|
||||||
.toLocaleLowerCase()}`
|
.toLocaleLowerCase()}`
|
||||||
console.log(path)
|
console.log(path)
|
||||||
|
|
|
@ -145,6 +145,12 @@ Vue.config.productionTip = false
|
||||||
Vue.prototype.$upload = () => {
|
Vue.prototype.$upload = () => {
|
||||||
_vm.$forceUpdate()
|
_vm.$forceUpdate()
|
||||||
}
|
}
|
||||||
|
Vue.prototype.$guid = () => {
|
||||||
|
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
||||||
|
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
|
||||||
|
return v.toString(16);
|
||||||
|
});
|
||||||
|
}
|
||||||
Vue.prototype.fileToBlob = (file) => {
|
Vue.prototype.fileToBlob = (file) => {
|
||||||
// 创建 FileReader 对象
|
// 创建 FileReader 对象
|
||||||
const reader = new FileReader()
|
const reader = new FileReader()
|
||||||
|
|
|
@ -949,7 +949,7 @@ export default {
|
||||||
file.status = 1
|
file.status = 1
|
||||||
let path = `/${this.trialId}/Image/${this.data.SubjectId}/${
|
let path = `/${this.trialId}/Image/${this.data.SubjectId}/${
|
||||||
this.data.Id
|
this.data.Id
|
||||||
}/${new Date().getTime()}${file.name
|
}/${this.$guid()}${file.name
|
||||||
.substring(file.name.lastIndexOf('.'))
|
.substring(file.name.lastIndexOf('.'))
|
||||||
.toLocaleLowerCase()}`
|
.toLocaleLowerCase()}`
|
||||||
const fileData = await this.fileToBlob(file.file)
|
const fileData = await this.fileToBlob(file.file)
|
||||||
|
|
Loading…
Reference in New Issue