Quellcode durchsuchen

Merge branch 'master' of http://192.168.0.115:3000/shaogen1995/jiangxiSZ

DR/4DAGE vor 3 Jahren
Ursprung
Commit
e8237d91e0

+ 1 - 1
shuzhixiangzheng/src/components/DaZhongPage.vue

@@ -7,7 +7,7 @@
     <img class="img" id="img2" src="../assets/png/title.png" />
     <!-- <img class="img" id="img3" :src="leftPng_url" /> -->
     <LeftPage :dataAll='dataAll'></LeftPage>
-    <RightPage></RightPage>
+    <RightPage :dataAll='dataAll'></RightPage>
     <!-- <img class="img" id="img5" :src="rightPng_url" /> -->
     <img class="img" id="img4" src="../assets/png/pop.png" />
     <div id="child_form">

+ 1 - 1
shuzhixiangzheng/src/components/MainPage.vue

@@ -26,7 +26,7 @@
       <img class="menu" id="education" src="../assets/png/6.png" />
       <EducationPage :dataAll='dataAll'></EducationPage>
       <img class="menu" id="vaccination" src="../assets/png/7.png" />
-      <VaccinationPage></VaccinationPage>
+      <VaccinationPage :vaccin='dataAll.vaccin'></VaccinationPage>
     </div>
 
     <div id="click" class="click_class" v-on:click="to3DMap"></div>

+ 43 - 39
shuzhixiangzheng/src/components/MainPageChild/EducationPage.vue

@@ -47,7 +47,7 @@
       教育程度分布
     </tr>
     <div id="educate_chart">
-      <ThreeDCharts></ThreeDCharts>
+      <ThreeDCharts :education="dataAll.education"></ThreeDCharts>
     </div>
   </div>
 </template>
@@ -61,8 +61,7 @@ export default {
   },
   data() {
     return {
-      school: [
-      ],
+      school: [],
       xlq: 0,
       xx: 0,
       cz: 0,
@@ -72,42 +71,47 @@ export default {
     };
   },
   mounted() {
-    setTimeout(() => {
-      this.school = this.dataAll.school;
-      this.school.map((obj) => {
-        if (obj.name == "学龄前") {
-          this.xlq = {
-            num: obj.num,
-            rate: obj.rate,
-          };
-        } else if (obj.name == "小学") {
-          this.xx = {
-            num: obj.num,
-            rate: obj.rate,
-          };
-        } else if (obj.name == "初中") {
-          this.cz = {
-            num: obj.num,
-            rate: obj.rate,
-          };
-        } else if (obj.name == "高中") {
-          this.gz = {
-            num: obj.num,
-            rate: obj.rate,
-          };
-        } else if (obj.name == "大学") {
-          this.dx = {
-            num: obj.num,
-            rate: obj.rate,
-          };
-        } else if (obj.name == "研究生及以上") {
-          this.yjs = {
-            num: obj.num,
-            rate: obj.rate,
-          };
-        }
-      });
-    }, 1000);
+    const myTime = setInterval(() => {
+      try {
+        this.school = this.dataAll.school;
+        this.school.map((obj) => {
+          if (obj.name == "学龄前") {
+            this.xlq = {
+              num: obj.num,
+              rate: obj.rate,
+            };
+          } else if (obj.name == "小学") {
+            this.xx = {
+              num: obj.num,
+              rate: obj.rate,
+            };
+          } else if (obj.name == "初中") {
+            this.cz = {
+              num: obj.num,
+              rate: obj.rate,
+            };
+          } else if (obj.name == "高中") {
+            this.gz = {
+              num: obj.num,
+              rate: obj.rate,
+            };
+          } else if (obj.name == "大学") {
+            this.dx = {
+              num: obj.num,
+              rate: obj.rate,
+            };
+          } else if (obj.name == "研究生及以上") {
+            this.yjs = {
+              num: obj.num,
+              rate: obj.rate,
+            };
+          }
+        });
+        clearInterval(myTime);
+      } catch (error) {
+        console.log(error);
+      }
+    }, 500);
   },
   methods: {},
 };

+ 158 - 160
shuzhixiangzheng/src/components/MainPageChild/VaccinationPage.vue

@@ -1,171 +1,169 @@
 <template>
-    <div id="vaccinationPage">
-      <img class="yq_back_img" id="img1" src="../../assets/png/yq_background.png"></img>
-      <img class="yq_back_img" id="img2" src="../../assets/png/yq_background.png"></img>
-      <img class="yq_border_img" id="img3" src="../../assets/png/yq_border.png"></img>
-      <img class="yq_border_img" id="img4" src="../../assets/png/yq_border.png"></img>
-      <img class="yq_border_img" id="img5" src="../../assets/png/yq_border.png"></img>
+  <div id="vaccinationPage">
+    <img
+      class="yq_back_img"
+      id="img1"
+      src="../../assets/png/yq_background.png"
+    />
+    <img
+      class="yq_back_img"
+      id="img2"
+      src="../../assets/png/yq_background.png"
+    />
+    <img class="yq_border_img" id="img3" src="../../assets/png/yq_border.png" />
+    <img class="yq_border_img" id="img4" src="../../assets/png/yq_border.png" />
+    <img class="yq_border_img" id="img5" src="../../assets/png/yq_border.png" />
 
-        <span id="ym_name1">疫苗接种</span>
-        <span id="ym_num">{{vaccin.total}}</span>
-        <span id="ym_name2">疫苗总接种率</span>
-        <span id="ym_num1">{{vaccin.allRate}}%</span>
+    <span id="ym_name1">疫苗接种</span>
+    <span id="ym_num">{{ vaccin.total }}</span>
+    <span id="ym_name2">疫苗总接种率</span>
+    <span id="ym_num1">{{ vaccin.allRate }}%</span>
 
-        <span id="ym_name3">3-12岁疫苗接种率</span>
-        <span id="ym_num2">{{vaccin.threeToTwelveRate}}%</span>
-        <span id="ym_name4">12-18岁疫苗接种率</span>
-        <span id="ym_num3">{{vaccin.TwelveToEighteenRate}}%</span>
-        <span id="ym_name5">18岁以上疫苗接种率</span>
-        <span id="ym_num4">{{vaccin.eighteenRate}}%</span>
-    </div>
+    <span id="ym_name3">3-12岁疫苗接种率</span>
+    <span id="ym_num2">{{ vaccin.threeToTwelveRate }}%</span>
+    <span id="ym_name4">12-18岁疫苗接种率</span>
+    <span id="ym_num3">{{ vaccin.TwelveToEighteenRate }}%</span>
+    <span id="ym_name5">18岁以上疫苗接种率</span>
+    <span id="ym_num4">{{ vaccin.eighteenRate }}%</span>
+  </div>
 </template>
     
 <script>
-    export default {
-      name: 'VaccinationPage',
-      components:{
-  
-      },
-      data () {
-        return {
-           vaccin:{				// -- 疫苗接种情况
-            allRate:94.27,		//总接种率
-            total:73518,			//疫苗接种总数
-            eighteenRate:93.96,	//18岁以上接种率
-            threeToTwelveRate:93.96, 	//3-12岁以上接种率
-            TwelveToEighteenRate:93.44	//12-18岁以上接种率
-           }
-        }
-      },
-      mounted(){
-        let clear= setInterval(() => {
-          if(this.$store.getters.getSzdata.code===10000&&this.$store.getters.getSzdata.data.vaccin) {
-            this. vaccin=this.$store.getters.getSzdata.data.vaccin
-            clearInterval(clear)
-          }
-        }, 500);
-      },
-      methods:{
-        
-      
-      }
-    }
+export default {
+  props:['vaccin'],
+  name: "VaccinationPage",
+  components: {},
+  data() {
+    return {
+      // vaccin: {
+      //   // -- 疫苗接种情况
+      //   allRate: 0, //总接种率
+      //   total: 0, //疫苗接种总数
+      //   eighteenRate: 0, //18岁以上接种率
+      //   threeToTwelveRate: 0, //3-12岁以上接种率
+      //   TwelveToEighteenRate: 0, //12-18岁以上接种率
+      // },
+    };
+  },
+  mounted() {
+    console.log('-------',this.vaccin);
+  },
+  methods: {},
+};
 </script>
   
     <style scoped>
+#ym_num {
+  position: absolute;
+  left: 21%;
+  top: 28%;
+  font-size: 28px;
+  color: rgb(251, 212, 21);
+  font-weight: bold;
+}
+#ym_name1 {
+  position: absolute;
+  left: 26%;
+  top: 16%;
+  font-size: 12px;
+  color: rgb(4, 185, 202);
+  font-weight: bold;
+}
 
-      #ym_num{
-        position: absolute;
-        left: 21%;
-        top:28%;  
-        font-size: 28px;
-        color:  rgb(251,212,21);
-        font-weight:bold;
-      }
-      #ym_name1{
-        position: absolute;
-        left: 26%;
-        top:16%;
-        font-size: 12px;
-        color:  rgb(4,185,202);
-        font-weight:bold;
-      }
-
-    #ym_name2{
-      position: absolute;
-        left: 62%;
-        top:16%;
-        font-size: 12px;
-        color:  rgb(4,185,202);
-        font-weight:bold;
-    }
-    #ym_name3{
-      position: absolute;
-      font-weight:bold;
-      top:70%;
-      left: 12%;
-      font-size: 12px;
-    }
-    #ym_name4{
-      position: absolute;
-      font-weight:bold;
-      top:70%;
-      left: 39%;
-      font-size: 12px;
-    }
-    #ym_name5{
-      position: absolute;
-      font-weight:bold;
-      top:70%;
-      left: 67%;
-      font-size: 12px;
-    }
-      #ym_num1{
-        position: absolute;
-        left: 60%;
-        top:28%;
-        font-size: 28px;
-        color:  rgb(251,212,21);
-        font-weight:bold;
-      }
-      #ym_num2{
-        position: absolute;
-        left: 16%;
-        top:78%;
-        font-size: 20px;
-        font-weight:bold;
-      }
-      #ym_num3{
-        position: absolute;
-        left: 43%;
-        top:78%;
-        font-size: 20px;
-        font-weight:bold;
-      }
-      #ym_num4{
-        position: absolute;
-        left: 72%;
-        top:78%;
-        font-size: 20px;
-        font-weight:bold;
-      }
-      #img1{
-        left: 15%;
-        top: 6%;
-      }
-      #img2{
-        left: 55%;
-        top: 6%;
-      }
-      #img3{
-        left: 5%;
-        bottom: -10%;
-      }
-      #img4{
-        left: 33%;
-        bottom: -10%;
-      }
-      #img5{
-        right: 4%;
-        bottom: -10%;
-      }
-      .yq_back_img{
-        position: absolute;
-        width: 30%;
-        height: 50%;
-      }
-      .yq_border_img{
-        position: absolute;
-        width: 35%;
-        height: 60%;
-      }
-         #vaccinationPage{
-        position: absolute;
-        bottom:1%;
-        width: 100%;
-        height: 18%;
-        /* background-color: rgb(0, 0, 255,0.1); */
-      }
-    
-    </style>
+#ym_name2 {
+  position: absolute;
+  left: 62%;
+  top: 16%;
+  font-size: 12px;
+  color: rgb(4, 185, 202);
+  font-weight: bold;
+}
+#ym_name3 {
+  position: absolute;
+  font-weight: bold;
+  top: 70%;
+  left: 12%;
+  font-size: 12px;
+}
+#ym_name4 {
+  position: absolute;
+  font-weight: bold;
+  top: 70%;
+  left: 39%;
+  font-size: 12px;
+}
+#ym_name5 {
+  position: absolute;
+  font-weight: bold;
+  top: 70%;
+  left: 67%;
+  font-size: 12px;
+}
+#ym_num1 {
+  position: absolute;
+  left: 60%;
+  top: 28%;
+  font-size: 28px;
+  color: rgb(251, 212, 21);
+  font-weight: bold;
+}
+#ym_num2 {
+  position: absolute;
+  left: 16%;
+  top: 78%;
+  font-size: 20px;
+  font-weight: bold;
+}
+#ym_num3 {
+  position: absolute;
+  left: 43%;
+  top: 78%;
+  font-size: 20px;
+  font-weight: bold;
+}
+#ym_num4 {
+  position: absolute;
+  left: 72%;
+  top: 78%;
+  font-size: 20px;
+  font-weight: bold;
+}
+#img1 {
+  left: 15%;
+  top: 6%;
+}
+#img2 {
+  left: 55%;
+  top: 6%;
+}
+#img3 {
+  left: 5%;
+  bottom: -10%;
+}
+#img4 {
+  left: 33%;
+  bottom: -10%;
+}
+#img5 {
+  right: 4%;
+  bottom: -10%;
+}
+.yq_back_img {
+  position: absolute;
+  width: 30%;
+  height: 50%;
+}
+.yq_border_img {
+  position: absolute;
+  width: 35%;
+  height: 60%;
+}
+#vaccinationPage {
+  position: absolute;
+  bottom: 1%;
+  width: 100%;
+  height: 18%;
+  /* background-color: rgb(0, 0, 255,0.1); */
+}
+</style>
     

+ 5 - 20
shuzhixiangzheng/src/components/OtherChilds/RightPage.vue

@@ -8,7 +8,7 @@
     </div>
     <img class="menu" id="education" src="../../assets/png/6.png" />
     <div id="education_dib">
-      <EdcationPage_shequ></EdcationPage_shequ>
+      <EdcationPageShequ></EdcationPageShequ>
     </div>
 
     <img class="menu" id="vaccination" src="../../assets/png/7.png" />
@@ -19,34 +19,19 @@
   <script>
 import KeyPopulationPage from "../MainPageChild/KeyPopulationPage";
 import ThreeDCharts4 from "../Utils/ThreeDCharts4";
-import EdcationPage_shequ from "./EdcationPage_shequ";
+import EdcationPageShequ from "./EdcationPage_shequ";
 import VaccinationPage from "../MainPageChild/VaccinationPage";
 export default {
+  props:['dataAll'],
   name: "",
   components: {
     KeyPopulationPage,
     ThreeDCharts4,
-    EdcationPage_shequ,
+    EdcationPageShequ,
     VaccinationPage,
   },
   data() {
-    return {
-      population: [
-        // -- 人口情况
-        {
-          name: "流动人口",
-          num: 501,
-          rate: "22.77",
-        },
-        {
-          name: "常住人口",
-          num: 1699,
-          rate: "77.23",
-        },
-      ],
-      czrk: 0,
-      ldrk: 0,
-    };
+    return {};
   },
   mounted() {},
   methods: {},

+ 8 - 3
shuzhixiangzheng/src/components/Utils/ThreeDCharts.vue

@@ -59,9 +59,14 @@ export default {
     };
   },
   mounted() {
-    setTimeout(() => {
-      this.initData()
-    }, 1000);
+    const myTime = setInterval(() => {
+      try {
+        this.initData();
+        clearInterval(myTime);
+      } catch (error) {
+        console.log(error);
+      }
+    }, 500);
   },
   methods: {
     //数据匹配

Datei-Diff unterdrückt, da er zu groß ist
+ 541 - 510
shuzhixiangzheng/src/components/Utils/ThreeDCharts1.vue