|
@@ -123,11 +123,12 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-upload ref="upload" style="display: inline-block;" action="" :limit="1" :http-request="httpRequest"
|
|
|
- :on-remove="handleRemove" :on-change="onChange" :before-upload="beforeAvatarUpload"
|
|
|
- :on-success="handleUploadSuccess" :file-list="fileS">
|
|
|
- <el-button type="info" size="mini">点击上传</el-button>
|
|
|
- </el-upload>
|
|
|
+ <el-upload ref="upload" style="display: inline-block; margin-left: 5em;" action=""
|
|
|
+ :limit="1" :http-request="httpRequest"
|
|
|
+ :on-remove="handleRemove" :on-change="onChange" :before-upload="beforeAvatarUpload"
|
|
|
+ :on-success="handleUploadSuccess" :file-list="fileS">
|
|
|
+ <el-button type="info" size="mini">点击上传</el-button>
|
|
|
+ </el-upload>
|
|
|
|
|
|
</el-row>
|
|
|
</el-form>
|
|
@@ -143,6 +144,7 @@
|
|
|
import UserSelect from '@/components/userSelect'
|
|
|
import NotifyService from '@/api/notify/NotifyService'
|
|
|
import {client, headers} from '@/api/sys/OSSService'
|
|
|
+
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
@@ -256,7 +258,13 @@
|
|
|
this.$message.error('不支持的格式!')
|
|
|
return false
|
|
|
}
|
|
|
- const fileName = uploadFileName
|
|
|
+ const now = new Date()
|
|
|
+ const year = now.getFullYear()
|
|
|
+ const month = now.getMonth()+1
|
|
|
+ const day = now.getDate()>10?now.getDate():'0'+now.getDate()
|
|
|
+ const filePath = 'attachment-file/workAttachment/'+year+'/'+month+'/'+day+'/'+now.getTime()
|
|
|
+ console.log(filePath, '文件存储路径')
|
|
|
+ const fileName = filePath + uploadFileName
|
|
|
console.log(fileName, '文件名')
|
|
|
client.put(
|
|
|
fileName,
|