Răsfoiți Sursa

查看详情-判断字段在字典中查不到,设为空

lihongxiao 2 ani în urmă
părinte
comite
e63f6725fb
2 a modificat fișierele cu 12 adăugiri și 5 ștergeri
  1. 2 2
      config/dev.env.js
  2. 10 3
      src/views/Letter/Orderlist.vue

+ 2 - 2
config/dev.env.js

@@ -6,11 +6,11 @@ module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
   ENV_CONFIG:'"dev"',
   // BASE_URL: '"https://test.baoxianzhanggui.com/web-api"',//测试服务器
-  // BASE_URL:'"https://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
+  BASE_URL:'"https://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
   // BASE_URL:'"https://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
   // BASE_URL: '"http://192.168.0.115:8080/"' //凯森
   // BASE_URL: '"http:///192.168.0.106:8080/"',//屈晨
-  BASE_URL: '"http:///192.168.0.253:8080/"',//田智
+  // BASE_URL: '"http:///192.168.0.253:8080/"',//田智
   // BASE_URL: '"http:///192.168.0.42:8080/"',//武鸿鹏
   // BASE_URL: '"http://192.168.1.101:8080/"',
   // BASE_URL: '"http:///192.168.0.22:8080/"',//郝宇

+ 10 - 3
src/views/Letter/Orderlist.vue

@@ -1289,9 +1289,15 @@ export default {
       });
     },
     natureOfVehicleUseCap(ele) {
-      return this.natureOfVehicleUseoptions.find((item) => {
-        return item.dictValue === ele;
-      }).dictTag;
+      if( this.natureOfVehicleUseoptions.find(item => item.dictValue==ele)){
+          return this.natureOfVehicleUseoptions.find((item) => {
+            return item.dictValue === ele;
+        }).dictTag; 
+      }
+      else{
+        return ''
+      }
+     
     },
     //应用详情
     OrderDetails(dy, item) {
@@ -1319,6 +1325,7 @@ export default {
         if (res.code == 200) {
           this.licenseNo = res.data.licenseno; //车牌号
           this.inscompany = res.data.inscompany; //保险公司
+          res.data.carinfo.carnature='8A'
           res.data.carinfo.carnature= this.natureOfVehicleUseCap(res.data.carinfo.carnature)
           if (res.data.accidentInfo) {
             res.data.accidentInfo.constructor === Object