浏览代码

新增组件及页面

liuqiwen 4 年之前
父节点
当前提交
40910e4699

+ 2 - 2
dgtis-ui/src/views/system/userInfo/index.vue

@@ -187,8 +187,8 @@ export default {
       getCustomerByIdData(){
           this.loading = true;
           let that = this;
-          // let id = that.$route.query.id;
-          let id = that.$route.params.id;
+          let id = that.$route.query.id;
+          // let id = that.$route.params.id;
           getCustomerById({id:id}).then(response => {
                   console.log(response);
                   that.loading =  false;

+ 23 - 5
dgtis-ui/src/views/system/userInfoDetails/index.vue

@@ -76,10 +76,10 @@
                         <div class="bxInfo">享受保障:<span>{{custInfo.guaranteeDay}}</span><span class="unit">天</span></div>
                       </el-col>
                       <el-col :span="8">
-                        <div class="bxInfo">标准保费:<span>{{custInfo.prem}}</span><span class="unit">元</span></div>
+                        <div class="bxInfo">标准保费:<span>{{fixed2(custInfo.prem)}}</span><span class="unit">元</span></div>
                       </el-col>
                       <el-col :span="8" v-for="(value, key, index) in majorCategorie">
-                        <div class="bxInfo">{{key}}:<span>{{value/10000}}</span><span class="unit">万</span></div>
+                        <div class="bxInfo">{{key}}:<span>{{wanFn(value)}}</span><span class="unit">万</span></div>
                       </el-col>
                     </el-row>
                   </div>
@@ -225,8 +225,8 @@ export default {
     getCustomerOverViewByIdData(){
       this.loading = true;
       var that = this;
-      // let id = this.$route.query.id;
-      let id = this.$route.params.id;
+      let id = this.$route.query.id;
+      // let id = this.$route.params.id;
       getCustomerOverViewById({id:id}).then(response => {
           console.log(response);
         // 客户标签
@@ -252,17 +252,35 @@ export default {
           // 理赔信息
           response.data.insuranceclaimthread != undefined ?that.insuranceclaimthread = response.data.insuranceclaimthread:{};
           response.data.majorCategorie != undefined ?that.majorCategorie = response.data.majorCategorie:{};
-
           // 投保时间节点及保费
           that.lineBarChartData.xAxisData = response.data.lineBarChartData.xaxisData;
           that.lineBarChartData.lineData.data = response.data.lineBarChartData.actaulData.data;
           that.lineBarChartData.lineData.name = response.data.lineBarChartData.actaulData.name;
+
           // that.lineBarChartData.barData.data = response.data.lineBarChartData.expectedData.data;
           // that.lineBarChartData.barData.name = response.data.lineBarChartData.expectedData.name;
           that.loading = false;
         }
       );
     },
+    wanFn(val){
+      var value = '';
+      if(val != undefined && val>0){
+        value = (val/10000).toFixed(2);
+      }else if(val == 0){
+        value = 0;
+      }
+      return value;
+    },
+    fixed2(val){
+      var value = '';
+      if(val != undefined && val>0){
+        value = val.toFixed(2);
+      }else if(val == 0){
+        value = 0;
+      }
+      return value;
+    }
   }
 };
 </script>

+ 4 - 4
dgtis-ui/src/views/system/userInfoList/index.vue

@@ -154,12 +154,12 @@
       }, `user_${new Date().getTime()}.xlsx`)
     },
     toOverview(row){
-      // this.$router.push({ path:'/userInfoOverview', query: {id: row.id}  })
-      this.$router.push({ name:'UserInfoOverview',params:{id: row.id}  })
+      this.$router.push({ path:'/userInfoOverview', query: {id: row.id}  })
+      // this.$router.push({ name:'UserInfoOverview',params:{id: row.id}  })
     },
     toDetail(row){
-      // this.$router.push({ path:'/userInfoDetails', query: {id: row.id}  })
-      this.$router.push({ name:'UserInfoDetails',params:{id: row.id}  })
+      this.$router.push({ path:'/userInfoDetails', query: {id: row.id}  })
+      // this.$router.push({ name:'UserInfoDetails',params:{id: row.id}  })
     }
   }
 };