Selaa lähdekoodia

新增组件及页面

liuqiwen 4 vuotta sitten
vanhempi
commit
0edcb4f440

+ 1 - 1
dgtis-ui/src/views/system/userInfo/components/contractInformation.vue

@@ -1,7 +1,7 @@
 <!--合约信息-->
 <template>
   <div>
-    <tags :data="tagsData"></tags>
+    <tags :data="tagsData" v-if="tagsData && tagsData.length > 0"></tags>
     <div class="userInfoPanel mt10">
       <el-row class="userInfo" v-if="data && data.length > 0">
         <el-col :span="12">

+ 5 - 2
dgtis-ui/src/views/system/userInfo/components/health.vue

@@ -7,7 +7,7 @@
       </el-col>
       <el-col :span="12">
         <span class="name">身高</span>
-        <span class="value">{{data.height}}</span>
+        <span class="value" v-if="data.height">t{{data.height}}</span>
       </el-col>
       <el-col :span="12">
         <span class="name">体重</span>
@@ -26,7 +26,9 @@
     props: {
       data: {
         type: Object,
-        default: {}
+        default: function (){
+          return {};
+        }
       },
     },
     data() {
@@ -34,6 +36,7 @@
 
       };
     },
+
     mounted() {
 
     },

+ 32 - 0
dgtis-ui/src/views/system/userInfo/components/nodata.vue

@@ -0,0 +1,32 @@
+<!--理赔-->
+<template>
+  <div class="userInfoPanel mt10">
+    <el-row class="userInfo">
+      <div class="noData">暂无数据</div>
+    </el-row>
+  </div>
+</template>
+<script>
+
+  export default {
+
+    data() {
+      return {
+
+      };
+    },
+    mounted() {
+
+    },
+    methods: {
+
+    }
+  };
+</script>
+<style lang="scss">
+  .noData{
+    color: #303133;
+    text-align: center;
+    padding: 20px 0;
+  }
+</style>

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

@@ -66,11 +66,11 @@
           </el-col>
           <el-col :span="12">
             <span class="name">户籍类型</span>
-            <span class="value">城镇</span>
+            <span class="value">{{custInfo.regtype}}</span>
           </el-col>
           <el-col :span="12">
             <span class="name">个人年收入</span>
-            <span class="value">{{custInfo.pincome}}</span>
+            <span class="value">{{custInfo.pincome}}</span>
             <el-tag type="warning" effect="dark" size="mini" v-if="custInfo.label21 && custInfo.label21 !='' ">{{custInfo.label21}}</el-tag>
           </el-col>
 <!--          <el-col :span="12">-->
@@ -83,7 +83,7 @@
           </el-col>
           <el-col :span="12">
             <span class="name">户籍所在地</span>
-            <span class="value">{{custInfo.regresidence}}</span>
+            <span class="value">{{custInfo.homeaddress}}</span>
           </el-col>
         </el-row>
       </div>
@@ -93,10 +93,12 @@
             <contact :data="contactData"></contact>
           </el-tab-pane>
           <el-tab-pane label="习惯偏好" name="pzgl">
-            <habit :data="habitData"></habit>
+            <habit :data="habitData" v-if="hasHabitData()"></habit>
+            <nodata v-else></nodata>
           </el-tab-pane>
           <el-tab-pane label="健康状况" name="jsgl">
-            <health :data="healthData"></health>
+            <health :data="healthData" v-if="hasHealthData()"></health>
+            <nodata v-else></nodata>
           </el-tab-pane>
           <el-tab-pane label="关系信息" name="gxxx">
             <relationship :data="relationshipData"></relationship>
@@ -129,6 +131,7 @@ import contact from './components/contact'
 import relationship from './components/relationship'
 import touched from './components/touched'
 import tags from './components/tags'
+import nodata from './components/nodata'
 export default {
   name: "UserInfo",
   components: {
@@ -139,7 +142,8 @@ export default {
     contact,
     relationship,
     touched,
-    tags
+    tags,
+    nodata
   },
   data() {
     return {
@@ -260,14 +264,14 @@ export default {
                   that.custInfo = response.data.custInfo;
                   that.relationshipData = response.data.relationship;
                   that.habitData.ctype = response.data.custInfo.ctype;
-                  response.data.custInfo.Hobby1 ? response.data.custInfo.Hobby1 = response.data.custInfo.Hobby1+'、' : response.data.custInfo.Hobby1 ='';
-                  response.data.custInfo.Hobby2 ? response.data.custInfo.Hobby2 = response.data.custInfo.Hobby2+'、' : response.data.custInfo.Hobby2 ='';
-                  response.data.custInfo.Hobby3 ? response.data.custInfo.Hobby3 = response.data.custInfo.Hobby3 : response.data.custInfo.Hobby3 ='';
-                  that.habitData.Hobby = response.data.custInfo.Hobby1 + response.data.custInfo.Hobby2 +response.data.custInfo.Hobby3;
-                  that.healthData.evadate = response.data.custInfo.evadate;
-                  that.healthData.height = response.data.custInfo.height;
-                  that.healthData.weight = response.data.custInfo.weight;
-                  that.healthData.bmi = response.data.custInfo.bmi;
+                  response.data.custInfo.hobby1 ? response.data.custInfo.hobby1 = response.data.custInfo.hobby1+'、' : response.data.custInfo.hobby1 ='';
+                  response.data.custInfo.hobby2 ? response.data.custInfo.hobby2 = response.data.custInfo.hobby2+'、' : response.data.custInfo.hobby2 ='';
+                  response.data.custInfo.hobby3 ? response.data.custInfo.hobby3 = response.data.custInfo.hobby3 : response.data.custInfo.hobby3 ='';
+                  that.habitData.hobby = response.data.custInfo.hobby1 + response.data.custInfo.hobby2 +response.data.custInfo.hobby3;
+                  response.data.custInfo.evadate ? that.healthData.evadate = response.data.custInfo.evadate : that.healthData.evadate = '';
+                  response.data.custInfo.height ? that.healthData.height = response.data.custInfo.height : that.healthData.height = '';
+                  response.data.custInfo.weight ? that.healthData.weight = response.data.custInfo.weight : that.healthData.weight = '';
+                  response.data.custInfo.bmi ? that.healthData.bmi = response.data.custInfo.bmi : that.healthData.bmi = '';
                   that.labelAll();
                   that.labelHy();
                   response.data.insuranceclaimthread?that.claimData = response.data.insuranceclaimthread:that.claimData = [];
@@ -296,6 +300,24 @@ export default {
           }
         } )
       },
+      hasHealthData(){
+        if(this.healthData.evadate ){
+          return true;
+        }else if(this.healthData.height){
+          return true;
+        }else if(this.healthData.weight){
+          return true;
+        }else if(this.healthData.bmi){
+          return true;
+        }
+      },
+      hasHabitData(){
+        if(this.habitData.ctype ){
+          return true;
+        }else if(this.habitData.hobby){
+          return true;
+        }
+      },
     tabChange(tab, event){
       console.log(tab, event);
     },