|
@@ -263,7 +263,6 @@ export default {
|
|
|
that.DelegationList = res.data.data;
|
|
|
}
|
|
|
}).catch(function (error) {
|
|
|
- that.loading = false
|
|
|
that.$message.error("网络错误,请稍后重试");
|
|
|
});
|
|
|
},
|
|
@@ -329,11 +328,10 @@ export default {
|
|
|
},
|
|
|
// 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用,function(file, fileList)
|
|
|
handleChange(file, fileList) {
|
|
|
- this.fileList = fileList
|
|
|
+ this.fileList = fileList
|
|
|
},
|
|
|
//点击文件列表中已上传的文件
|
|
|
- handlePreview(file){
|
|
|
- console.log(file);
|
|
|
+ handlePreview(file){;
|
|
|
window.open(file.url);
|
|
|
},
|
|
|
// 删除文件之前的钩子,参数为上传的文件和文件列表,若返回 false 或者返回 Promise 且被 reject,则停止删除。function(file, fileList)
|
|
@@ -447,8 +445,6 @@ export default {
|
|
|
message: res.data.msg,
|
|
|
type: 'success'
|
|
|
});
|
|
|
- that.loading = true;
|
|
|
-
|
|
|
setTimeout(() => {
|
|
|
that.$router.push('/home/InvitationOfficialActivityData')
|
|
|
}, 3000);
|
|
@@ -470,79 +466,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- //文件上传成功时的钩子
|
|
|
- upLoadSuccess(response, file, fileList) {
|
|
|
- if (response.code == 200) {
|
|
|
- console.log("上传成功");
|
|
|
- this.$refs.OpInvitationOfficialActivityData.validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- const that = this;
|
|
|
- that.OpInvitationOfficialActivityData.filePath = that.OldFile;
|
|
|
- that.OpInvitationOfficialActivityData.sndFilePath = response.data;
|
|
|
- that.OpInvitationOfficialActivityData.createUserId = that.userId
|
|
|
- var url = "/api/Resource/OpInvitationOfficialActivity"
|
|
|
- that.$axios({
|
|
|
- method: 'post',
|
|
|
- url: url,
|
|
|
- headers: {
|
|
|
- Authorization: 'Bearer ' + that.token
|
|
|
- },
|
|
|
- data: that.OpInvitationOfficialActivityData
|
|
|
- }).then(function (res) {
|
|
|
- if (res.data.code == 200) {
|
|
|
- that.$message({
|
|
|
- message: res.data.msg,
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- that.loading = true;
|
|
|
- setTimeout(() => {
|
|
|
- that.$router.push('/home/InvitationOfficialActivityData')
|
|
|
- }, 3000);
|
|
|
- } else {
|
|
|
- that.$message.error(res.data.msg);
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- var delList = this.OpInvitationOfficialActivityData.delegation.split(',')
|
|
|
- var delegaLOist = [];
|
|
|
- delList.forEach(function (item, index) {
|
|
|
- delegaLOist.push(
|
|
|
- parseInt(item)
|
|
|
- )
|
|
|
- });
|
|
|
- this.OpInvitationOfficialActivityData.delegation = delegaLOist
|
|
|
- this.$message.error('请完善信息在保存!');
|
|
|
- return false;
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- console.log("保存失败");
|
|
|
- }
|
|
|
- },
|
|
|
- //文件上传失败时的钩子
|
|
|
- upLoadError(response, file, fileList) {
|
|
|
- console.log("项目添加失败");
|
|
|
- },
|
|
|
- //删除文件之前的钩子,参数为上传的文件和文件列表,若返回 false 或者返回 Promise 且被 reject,则停止删除。
|
|
|
- beforeRemove(file, fileList) {
|
|
|
- this.uploadFiles = fileList;
|
|
|
- this.OldFile = this.OpInvitationOfficialActivityData.filePath
|
|
|
- this.NewFile = file.name
|
|
|
- },
|
|
|
- //文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
|
|
|
- onChange(file, fileList) {
|
|
|
- this.uploadFiles = fileList
|
|
|
- this.OldFile = this.OpInvitationOfficialActivityData.sndFilePath
|
|
|
- this.OpInvitationOfficialActivityData.filePath = this.OldFile
|
|
|
- this.NewFile = file.name
|
|
|
- },
|
|
|
- DownloadOdl() {
|
|
|
- if (this.OpInvitationOfficialActivityData.filePath != "") {
|
|
|
- window.location.href = "http://132.232.92.186:24/Office/GrpFile/商邀相关文件/" + this.OpInvitationOfficialActivityData.filePath
|
|
|
- } else {
|
|
|
- this.$message.error("暂未上传附件");
|
|
|
- }
|
|
|
- }
|
|
|
},
|
|
|
|
|
|
mounted() {
|