Selaa lähdekoodia

报价历史显示问题

lihongxiao 2 vuotta sitten
vanhempi
commit
7f6d4c4122
2 muutettua tiedostoa jossa 9 lisäystä ja 6 poistoa
  1. 2 2
      config/dev.env.js
  2. 7 4
      src/views/Letter/Letter.vue

+ 2 - 2
config/dev.env.js

@@ -5,9 +5,9 @@ const prodEnv = require('./prod.env')
 module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
   ENV_CONFIG:'"dev"',
-  // BASE_URL: '"http://39.98.239.48/web-api"',//测试服务器
+  BASE_URL: '"http://39.98.239.48/web-api"',//测试服务器
   // BASE_URL:'"http://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
-  BASE_URL: '"http://192.168.0.115:8080/"' //凯森
+  // BASE_URL: '"http://192.168.0.115:8080/"' //凯森
   // BASE_URL: '"http:///192.168.0.106:8080/"',//田智
 })
 

+ 7 - 4
src/views/Letter/Letter.vue

@@ -3533,8 +3533,8 @@ export default {
       };
       this.$api.letter.queryQuoteHistory(params).then(res => {
         res.data.forEach(item => {
-          if( res.data.accidentInfo){
-            res.data.accidentInfo.constructor === Object?[res.data.accidentInfo]:res.data.accidentInfo
+          if( item.accidentInfo){
+            item.accidentInfo.constructor === Object?[item.accidentInfo]:item.accidentInfo
           }
           item.username = this.paramsEdit.username+'('+this.paramsEdit.userid+')'
         })
@@ -3618,12 +3618,13 @@ export default {
         const saveInfo = {
           download: date.getTime() + `.png`,
           href: base64Data,
+          
         }
         const element = document.createElement('a')
         element.style.display = 'none'
         for (const key in saveInfo) {
           element.setAttribute(key, saveInfo[key])
-        }
+        } 
         document.body.appendChild(element)
         element.click()
         setTimeout(() => {
@@ -4481,7 +4482,9 @@ export default {
       };
       this.$api.letter.queryQuoteHistory(params).then(res => {
         res.data.forEach(item => {
-          item.accidentInfo.constructor=== Object?[res.data.accidentInfo]:res.data.accidentInfo
+          if( item.accidentInfo){
+            item.accidentInfo.constructor=== Object?[item.accidentInfo]:item.accidentInfo
+          }
         })
         this.HistoryList = res.data;
       });