diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step1-1.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step1-1.vue index bb093c810..9d1c8d3e1 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step1-1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step1-1.vue @@ -38,15 +38,17 @@ placeholder="请选择完成时间"> - + -
- {{ form.modelName }} +
+
+ {{ item.name }} +
@@ -212,8 +216,8 @@ form: { title: '', // 调研标题 date: '', // 完成时间 - model: '', // 上传模板 - modelName: '' + modelList: [], + modelNameList: '' }, formRules: { title: [ @@ -222,7 +226,7 @@ date: [ { type: 'date', required: true, message: '请选择完成时间', trigger: 'change' } ], - modelName: [ + modelNameList: [ { required: true, message: '请上传调研结果', trigger: 'change' }, ] }, @@ -344,12 +348,34 @@ } return true }, + importFileRemove (file, fileList) { + let list = '' + this.form.modelList = [] + fileList.forEach(item => { + this.form.modelList.push(item) + if (list.length > 0) { + list += ',' + list += item.name + } else { + list+= item.name + } + }) + this.form.modelNameList = list + }, // 导入标准数据成功后执行 importFileSuccess (response, file) { if (response.ok) { - this.fileMadel = false - this.form.model = response.data.id - this.form.modelName = response.data.name + this.form.modelList.push(response.data) + let list = '' + this.form.modelList.forEach(item => { + if (list.length > 0) { + list += ',' + list += item.name + } else { + list+= item.name + } + }) + this.form.modelNameList = list this.$message({ showClose: true, message: response.message, diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue index 2422224f2..d0324a5ff 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue @@ -38,15 +38,17 @@ placeholder="请选择完成时间"> - + -
- {{ form.modelName }} +
+
+ {{ item.name }} +
点击上传 - - - - -
@@ -174,6 +171,7 @@ >
@@ -190,7 +188,6 @@

点击或拖拽上传文件

-
@@ -205,9 +202,6 @@ export default { name: "bzdyStep1", data() { return { - // isFileUploadStr:'点击上传', - progressType: false, - loadProgress: 0, commentText: '', nodeList: [], nodeList2: [], @@ -223,8 +217,8 @@ export default { form: { title: '', // 调研标题 date: '', // 完成时间 - model: '', // 上传模板 - modelName: '' + modelList: [], + modelNameList: '' }, formRules: { title: [ @@ -233,7 +227,7 @@ export default { date: [ { type: 'date', required: true, message: '请选择完成时间', trigger: 'change' } ], - modelName: [ + modelNameList: [ { required: true, message: '请上传调研结果', trigger: 'change' }, ] }, @@ -320,10 +314,6 @@ export default { this.drawerTitle = title this.modalshowflag = true }, - progressFile (event, file, fileList) { - let loadProgress = Math.floor(event.percent) - this.loadProgress = loadProgress - }, // 导入按钮 上传之前的钩子 beginImportFile (file) { var filename = file.name @@ -332,13 +322,11 @@ export default { var fileSuffix = filename.substring(index1, index2) // const fileSuffix = file.name.split('.')[1] // 后缀名 // 判断上传文件格式 - this.progressType = true if (fileSuffix === '.ppt' || fileSuffix === '.docx' || fileSuffix === '.DOCX' || fileSuffix === '.PPT' || fileSuffix === '.xls' || fileSuffix === '.xlsx') { return true } else { this.spinShow = false this.$message.error('文件' + file.name + '格式不正确,请上传PPT,DOCX,XLS文件') - this.progressType = false return false } // 判断文件上传大小 @@ -347,20 +335,38 @@ export default { return true } else { this.$message.error('文件' + file.name + '大小不超过200M') - this.progressType = false return false } return true }, + importFileRemove (file, fileList) { + let list = '' + this.form.modelList = [] + fileList.forEach(item => { + this.form.modelList.push(item) + if (list.length > 0) { + list += ',' + list += item.name + } else { + list+= item.name + } + }) + this.form.modelNameList = list + }, // 导入标准数据成功后执行 importFileSuccess (response, file) { if (response.ok) { - // this.isFileUploadStr='点击查看已上传文件'; - this.fileMadel = false; - this.loadProgress = 0 - this.progressType = false - this.form.model = response.data.id - this.form.modelName = response.data.name + this.form.modelList.push(response.data) + let list = '' + this.form.modelList.forEach(item => { + if (list.length > 0) { + list += ',' + list += item.name + } else { + list+= item.name + } + }) + this.form.modelNameList = list this.$message({ showClose: true, message: response.message, diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step2.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step2.vue index 842b3a8d0..b8f2b7825 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step2.vue @@ -41,8 +41,10 @@
-
- {{ form.modelName }} +
+
+ {{ item.name }} +
- - @@ -178,7 +180,7 @@ form: { title: '', // 调研标题 date: '', // 完成时间 - model: '', // 上传模板 + modelList: [], responUserList: '', responUserListName: '', }, @@ -203,8 +205,8 @@ this.histortData = res }, e => {}) }, - updateFile () { - window.location.href = '/api/att/attFile/downloadFile?fileId=' + this.form.model + updateFile (item) { + window.location.href = '/api/att/attFile/downloadFile?fileId=' + item.id }, checkedRole2 (data) { var idList = '' @@ -276,11 +278,12 @@ pId: this.pId }).then(res => { let data = JSON.parse(res.mesg) + this.form.modelList = data.modelList || data.form.modelList this.form.title = data.title || data.form.title this.form.date = data.date || data.form.date this.json = data || data.form - this.form.model = data.model || data.form.model - this.form.modelName = data.modelName || data.form.modelName + // this.form.model = data.model || data.form.model + // this.form.modelName = data.modelName || data.form.modelName this.form.responUserList = data.form.responUserList this.form.responUserListName = data.form.responUserListName }).catch(e => { diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step3.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step3.vue index e3f635c75..a3183f640 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step3.vue @@ -41,8 +41,10 @@ -
- {{ form.modelName }} +
+
+ {{ item.name }} +
- - @@ -197,8 +199,7 @@ form: { title: '', // 调研标题 date: '', // 完成时间 - model: '', // 上传模板 - modelName: '', + modelList: [], fileId: '', fileName: '', responUserList: '', @@ -227,8 +228,8 @@ this.histortData = res }, e => {}) }, - updateFile () { - window.location.href = '/api/att/attFile/downloadFile?fileId=' + this.form.model + updateFile (item) { + window.location.href = '/api/att/attFile/downloadFile?fileId=' + item.id }, // 导入按钮 上传之前的钩子 beginImportFile (file) { @@ -323,8 +324,7 @@ this.form.title = data.title || data.form.title this.form.date = data.date || data.form.date this.json = data || data.form - this.form.model = data.model || data.form.model - this.form.modelName = data.modelName || data.form.modelName + this.form.modelList = data.modelList || data.form.modelList this.form.responUserList = data.form.responUserList this.form.responUserListName = data.form.responUserListName this.form.fileName = data.form.fileName || data.fileName || '' diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step4.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step4.vue index 1ce3a071e..53fde2da7 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step4.vue @@ -41,8 +41,10 @@ -
- {{ form.modelName }} +
+
+ {{ item.name }} +
- - @@ -169,8 +171,7 @@ form: { title: '', // 调研标题 date: '', // 完成时间 - model: '', // 上传模板 - modelName: '', + modelList: [], fileId: '', fileName: '', responUserList: '', @@ -257,8 +258,7 @@ this.json = data || data.form this.form.file = data.fileId || data.form.fileId this.form.fileName = data.fileName || data.form.fileName - this.form.model = data.model || data.form.model - this.form.modelName = data.modelName || data.form.modelName + this.form.modelList = data.modelList || data.form.modelList }).catch(e => { }) })