shaogen1995 4 лет назад
Родитель
Сommit
72affef41d
3 измененных файлов с 11 добавлено и 7 удалено
  1. 2 2
      src/utils/request.js
  2. 5 3
      src/views/holding/holding0_DiaEdit.vue
  3. 4 2
      src/views/holding/holding3_DiaEdit.vue

+ 2 - 2
src/utils/request.js

@@ -1,8 +1,8 @@
 import axios from 'axios'
 import axios from 'axios'
 // export const baseURL = '666初始地址'
 // export const baseURL = '666初始地址'
 const service = axios.create({
 const service = axios.create({
-  baseURL: 'http://192.168.0.135:8006',
-  // baseURL: '',
+  // baseURL: 'http://192.168.0.135:8006',
+  baseURL: '',
   timeout: 5000
   timeout: 5000
 })
 })
 
 

+ 5 - 3
src/views/holding/holding0_DiaEdit.vue

@@ -517,9 +517,11 @@ export default {
       // console.log(333333, file)
       // console.log(333333, file)
       // console.log(666666, this.ruleForm.fileIds)
       // console.log(666666, this.ruleForm.fileIds)
       if (file.code === 0) {
       if (file.code === 0) {
-        if (this.ruleForm.fileIds === '') this.ruleForm.fileIds = `${file.data.fileId}`
-        else this.ruleForm.fileIds += `,${file.data.fileId}`
-        this.temp = this.ruleForm.fileIds.split(',')
+        this.temp.push(file.data.fileId)
+        this.ruleForm.fileIds = this.temp.join(',')
+        // if (this.ruleForm.fileIds === '') this.ruleForm.fileIds = `${file.data.fileId}`
+        // else this.ruleForm.fileIds += `,${file.data.fileId}`
+        // this.temp = this.ruleForm.fileIds.split(',')
         this.$message.success('上传成功')
         this.$message.success('上传成功')
         this.tempData[this.affixVal].push({ name: file.data.fileName, updateTime: file.timestamp.slice(0, 10), filePath: file.data.filePath, id: file.data.fileId })
         this.tempData[this.affixVal].push({ name: file.data.fileName, updateTime: file.timestamp.slice(0, 10), filePath: file.data.filePath, id: file.data.fileId })
       }
       }

+ 4 - 2
src/views/holding/holding3_DiaEdit.vue

@@ -524,8 +524,10 @@ export default {
       // 上传成功
       // 上传成功
       // console.log(666666, this.ruleForm.fileIds)
       // console.log(666666, this.ruleForm.fileIds)
       if (file.code === 0) {
       if (file.code === 0) {
-        if (this.ruleForm.fileIds === '') this.ruleForm.fileIds = `${file.data.fileId}`
-        else this.ruleForm.fileIds += `,${file.data.fileId}`
+        this.temp.push(file.data.fileId)
+        this.ruleForm.fileIds = this.temp.join(',')
+        // if (this.ruleForm.fileIds === '') this.ruleForm.fileIds = `${file.data.fileId}`
+        // else this.ruleForm.fileIds += `,${file.data.fileId}`
         this.$message.success('上传成功')
         this.$message.success('上传成功')
         // 获取当前时间
         // 获取当前时间
         // const myDate = new Date()
         // const myDate = new Date()