Merge branch 'develop' into FOTON

This commit is contained in:
super_liu
2021-12-31 11:32:13 +08:00
@@ -223,7 +223,7 @@
drag drag
:action="fileUrl" :action="fileUrl"
ref="importfile" ref="importfile"
:file-list="fileList" :file-list="form.fileList"
name="file" name="file"
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx, .pdf, .PDF" accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx, .pdf, .PDF"
:before-upload="beginImportFile" :before-upload="beginImportFile"
@@ -251,7 +251,6 @@
name: "bzdyStep3", name: "bzdyStep3",
data() { data() {
return { return {
fileList: [],
commentText3: '', commentText3: '',
newDocUser: '', newDocUser: '',
drawerModal: false, drawerModal: false,
@@ -267,6 +266,7 @@
acceptShow: false, acceptShow: false,
todoId: '', todoId: '',
form: { form: {
fileList: [],
dyhz: '', dyhz: '',
title: '', // 调研标题 title: '', // 调研标题
date: '', // 完成时间 date: '', // 完成时间
@@ -356,8 +356,10 @@
}, },
importFileRemove (file, fileList) { importFileRemove (file, fileList) {
if (fileList) { if (fileList) {
this.fileList = fileList.slice(-1) this.form.fileList = []
} }
this.form.fileId = ''
this.form.fileName = ''
}, },
// 导入按钮 上传之前的钩子 // 导入按钮 上传之前的钩子
beginImportFile (file) { beginImportFile (file) {
@@ -387,10 +389,11 @@
// 导入标准数据成功后执行 // 导入标准数据成功后执行
importFileSuccess (response, file) { importFileSuccess (response, file) {
if (response.ok) { if (response.ok) {
this.form.fileList = []
this.fileMadel = false this.fileMadel = false
this.form.fileId = response.data.id this.form.fileId = response.data.id
this.form.fileName = response.data.name this.form.fileName = response.data.name
this.fileList = response.data this.form.fileList.push(response.data)
this.$message({ this.$message({
showClose: true, showClose: true,
message: response.message, message: response.message,
@@ -466,6 +469,7 @@
pId: this.pId pId: this.pId
}).then(res => { }).then(res => {
let data = JSON.parse(res.mesg) let data = JSON.parse(res.mesg)
console.log(data);
let commitStatus = res.commitStatus let commitStatus = res.commitStatus
if(commitStatus && commitStatus > 0){ if(commitStatus && commitStatus > 0){
this.acceptShow = true this.acceptShow = true
@@ -487,6 +491,7 @@
this.form.fileId = data.form ? data.form.fileId : '' this.form.fileId = data.form ? data.form.fileId : ''
this.form.dyhz = data.form ? data.form.dyhz : '' this.form.dyhz = data.form ? data.form.dyhz : ''
this.newDocUser = data.form ? data.form.docUser : data.docUser this.newDocUser = data.form ? data.form.docUser : data.docUser
this.form.fileList = data.form ? data.form.fileList : []
}).catch(e => { }).catch(e => {
}) })
}) })