|
@@ -51,24 +51,19 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
handleRemove(file, fileList) {
|
|
|
- this.fileList = fileList
|
|
|
- deleteFile(file.url).then(res => {
|
|
|
- this.$message({
|
|
|
- message: '操作成功!',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
+ let fileName = file.name.indexOf('oa-file/') === 0 ? file.name : 'oa-file/' + file.name
|
|
|
+ deleteFile(fileName).then(res => {
|
|
|
+ this.$message.success('操作成功!');
|
|
|
+ this.fileList = fileList
|
|
|
+ this.$emit('removeFile', fileList)
|
|
|
});
|
|
|
- this.$emit('removeFile', fileList)
|
|
|
},
|
|
|
handleSuccess(response, file, fileList) {
|
|
|
this.fileList = fileList
|
|
|
this.$emit('getFileUrl', fileList)
|
|
|
},
|
|
|
handleError() {
|
|
|
- this.$message({
|
|
|
- message: '上传失败,请稍候再试!',
|
|
|
- type: 'warning'
|
|
|
- });
|
|
|
+ this.$message.error('上传失败,请稍候再试!');
|
|
|
},
|
|
|
clear() {
|
|
|
this.fileList = []
|