DR/4DAGE 3 lat temu
rodzic
commit
91054d42b6

+ 8 - 8
shuzhixiangzheng/src/App.vue

@@ -23,14 +23,14 @@ export default {
       },
       (reuslt) => {}
     );
-    SZZSQSY_httpGet(
-      "大中社区",
-      (result) => {
-        console.log("大中社区", result);
-        this.$store.commit("setDaZhongdata", result.data);
-      },
-      (result) => {}
-    );
+    // SZZSQSY_httpGet(
+    //   "大中社区",
+    //   (result) => {
+    //     console.log("大中社区", result);
+    //     this.$store.commit("setDaZhongdata", result.data);
+    //   },
+    //   (result) => {}
+    // );
     SZZXQ_httpGet(
       "金湖国际",
       (result) => {

+ 0 - 13
shuzhixiangzheng/src/assets/api/Map.js

@@ -151,27 +151,14 @@ class Map{
             }
             if(obj&&obj.id&&obj.id.type=="jinghuguoji"&&obj.id.label._text=="1#"){
                 jinghuguojiShowFun()
-                    // document.getElementById("child_form").style.display="block"
-                    // document.getElementById("houses").style.display="block"
-                    // document.getElementById("houses1").style.display="none"
-    
-                    // document.getElementById("form_img").src="../png/jinghuguoji/101.png";
                 }
                 if(obj&&obj.id&&obj.id.type=="laoxianweisushe"&&obj.id.label._text=="1#"){
                     laoxianweisusheShowFun()
-                    // document.getElementById("child_form").style.display="block"
-                    // document.getElementById("houses").style.display="none"
-                    // document.getElementById("houses1").style.display="block"
-    
-                  //  document.getElementById("form_img").src="../png/laoxianweisushe/101.png";
                 }
     
     
                 if(obj&&obj.id&&obj.id.label._text=="叶家舍小区"){
                     yejiaxiaosheShowFun()
-                    // document.getElementById("child1_form").style.display="block"
-                    // document.getElementById("img3").src="../png/left1.png";
-                    // document.getElementById("img5").src="../png/right1.png";
                 }
             
             }, Cesium.ScreenSpaceEventType.LEFT_CLICK);

+ 6 - 2
shuzhixiangzheng/src/components/DaZhongPage.vue

@@ -6,7 +6,7 @@
     <img class="img" id="img1" src="../assets/png/footer.png" />
     <img class="img" id="img2" src="../assets/png/title.png" />
     <!-- <img class="img" id="img3" :src="leftPng_url" /> -->
-    <LeftPage :dataAll='dataAll'></LeftPage>
+    <LeftPage :dataAll='dataAll' :isShow='isShow'></LeftPage>
     <RightPage :dataAll='dataAll'></RightPage>
     <!-- <img class="img" id="img5" :src="rightPng_url" /> -->
     <img class="img" id="img4" src="../assets/png/pop.png" />
@@ -128,6 +128,7 @@
     },
     data() {
       return {
+          isShow:true,
         // 传给左侧的总数据
         dataAll:{},
         msg: '',
@@ -228,9 +229,12 @@
         });
       },
       clickjinghuguojiShowFun() {
-          console.log("222")
         this.leftPng_url = left1Png;
         this.rightPng_url = right1Png;
+        console.log(333)
+     //  this.$store.commit("setShowDZ", false);
+        //  localStorage.setItem('showDZ',false)
+        this.isShow=false
       },
       jinghuguojiShowFun() {
         setTimeout(() => {

+ 23 - 20
shuzhixiangzheng/src/components/MainPage.vue

@@ -31,22 +31,22 @@
 
     <div id="click" class="click_class" v-on:click="to3DMap"></div>
 
-    <div class="click_class" id="click_1" v-on:click="toZheji"></div>
-    <div class="click_class" id="click_2" v-on:click="toOther"></div>
-    <div class="click_class" id="click_3" v-on:click="toOther"></div>
-    <div class="click_class" id="click_4" v-on:click="toOther"></div>
-    <div id="click_5" v-on:click="toXiMen"></div>
-    <div class="click_class" id="click_6" v-on:click="toOther"></div>
-    <div class="click_class" id="click_7" v-on:click="toOther"></div>
-    <div class="click_class" id="click_8" v-on:click="toOther"></div>
-    <div class="click_class" id="click_9" v-on:click="toOther"></div>
-    <div class="click_class" id="click_10" v-on:click="toOther"></div>
-    <div class="click_class" id="click_11" v-on:click="toOther"></div>
-    <div class="click_class" id="click_12" v-on:click="toOther"></div>
-    <div class="click_class" id="click_13" v-on:click="toOther"></div>
-    <div class="click_class" id="click_14" v-on:click="toOther"></div>
-    <div class="click_class" id="click_15" v-on:click="toOther"></div>
-    <div class="click_class" id="click_16" v-on:click="toOther"></div>
+    <div class="click_class" name='叶家舍小区' id="click_1" v-on:click="toZheji"></div>
+    <div class="click_class" name='大岭社区' id="click_2" v-on:click="toOther"></div>
+    <div class="click_class" name='台山社区' id="click_3" v-on:click="toOther"></div>
+    <div class="click_class" name='云亭社区' id="click_4" v-on:click="toOther"></div>
+    <div  class="click_class" name='西门社区' id="click_5" v-on:click="toXiMen"></div>
+    <div class="click_class" name='江阀社区' id="click_6" v-on:click="toOther"></div>
+    <div class="click_class" name='莲湾社区' id="click_7" v-on:click="toOther"></div>
+    <div class="click_class" name='三里社区' id="click_8" v-on:click="toOther"></div>
+    <div class="click_class" name='江新社区' id="click_9" v-on:click="toOther"></div>
+    <div class="click_class" name='钟山社区' id="click_10" v-on:click="toOther"></div>
+    <div class="click_class" name='鄱湖社区' id="click_11" v-on:click="toOther"></div>
+    <div class="click_class" name='胜利村' id="click_12" v-on:click="toOther"></div>
+    <div class="click_class" name='月亮村' id="click_13" v-on:click="toOther"></div>
+    <div class="click_class" name='洪湖村' id="click_14" v-on:click="toOther"></div>
+    <div class="click_class" name='柏树社区' id="click_15" v-on:click="toOther"></div>
+    <div class="click_class" name='洋港社区' id="click_16" v-on:click="toOther"></div>
   </div>
 </template>
 
@@ -112,14 +112,17 @@ export default {
       }
     },
     changeData(name) {
+      console.log("点击",name)
       SZZSQSY_httpGet(
         name,
         (result) => {
-          console.log(name, result);
-          this.$store.commit("setDaZhongdata", result.data);
-          this.$store.commit("setSzdata", result.data);
+          console.log('sssssssssssssssssssssssss',name, result);
+           this.$store.commit("setDaZhongdata", result.data);
+          //this.$store.commit("setSzdata", result.data);
         },
-        (result) => {}
+        (result) => {
+          console.log(name, result)
+        }
       );
     },
     to3DMap() {

+ 5 - 5
shuzhixiangzheng/src/components/MainPageChild/KeyPopulationPage.vue

@@ -4,15 +4,15 @@
       <td>
         <span id="partyMemberNum">
           <span class="font">党员人数</span> <br />
-          <span class="number">{{ important.member }}</span>
+          <span class="number">{{important? important.member:0 }}</span>
         </span>
         <span id="treatmentObjectNum">
           <span class="font">优抚对象</span><br />
-          <span class="number">{{ important.specialCare }}</span>
+          <span class="number">{{ important?important.specialCare:0 }}</span>
         </span>
         <span id="subsistenceAllowanceObjectNum">
           <span class="font">低保对象</span><br />
-          <span class="number">{{ important.basicAllowance }}</span>
+          <span class="number">{{important? important.basicAllowance:0 }}</span>
         </span>
         <span id="shakeoffPovertyNum">
           <span class="font">城市脱贫解困对象</span><br />
@@ -20,11 +20,11 @@
         </span>
         <span id="disabledNum">
           <span class="font">残疾人</span><br />
-          <span class="number">{{ important.deformed }}</span>
+          <span class="number">{{important? important.deformed:0 }}</span>
         </span>
         <span id="liveAloneNum">
           <span class="font">独居户</span><br />
-          <span class="number">{{ important.alone }}</span>
+          <span class="number">{{ important?important.alone:0 }}</span>
         </span>
       </td>
     </tr>

+ 5 - 5
shuzhixiangzheng/src/components/MainPageChild/VaccinationPage.vue

@@ -15,16 +15,16 @@
     <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_num">{{vaccin? vaccin.total:0 }}</span>
     <span id="ym_name2">疫苗总接种率</span>
-    <span id="ym_num1">{{ vaccin.allRate }}%</span>
+    <span id="ym_num1">{{vaccin? vaccin.allRate:0 }}%</span>
 
     <span id="ym_name3">3-12岁疫苗接种率</span>
-    <span id="ym_num2">{{ vaccin.threeToTwelveRate }}%</span>
+    <span id="ym_num2">{{vaccin? vaccin.threeToTwelveRate:0 }}%</span>
     <span id="ym_name4">12-18岁疫苗接种率</span>
-    <span id="ym_num3">{{ vaccin.TwelveToEighteenRate }}%</span>
+    <span id="ym_num3">{{ vaccin?vaccin.TwelveToEighteenRate:0 }}%</span>
     <span id="ym_name5">18岁以上疫苗接种率</span>
-    <span id="ym_num4">{{ vaccin.eighteenRate }}%</span>
+    <span id="ym_num4">{{vaccin? vaccin.eighteenRate:0 }}%</span>
   </div>
 </template>
     

+ 76 - 67
shuzhixiangzheng/src/components/OtherChilds/LeftPage.vue

@@ -6,77 +6,86 @@
     </div>
     <img id="person_status_img" src="../../assets/png/2.png" />
     <PepoleStatus></PepoleStatus>
-    <img id="dizhizaihai_img" src="../../assets/png/dizhizaihai.png" v-if="showDZ"/>
-    <Dezhizhaihai :data='dataAll.damage' v-if="showDZ"></Dezhizhaihai>
-    <img id="populationStructure_img" src="../../assets/png/renkoujieguo.png" v-if="!showDZ"/>
-    <PopulationStructure v-if="!showDZ"></PopulationStructure>
+    <template v-if="isShow" >
+      <img id="dizhizaihai_img" src="../../assets/png/dizhizaihai.png" />
+      <Dezhizhaihai :data='dataAll.damage' ></Dezhizhaihai>
+    </template>
+    <template v-else>
+      <img id="populationStructure_img" src="../../assets/png/renkoujieguo.png" />
+      <PopulationStructure></PopulationStructure>
+    </template>
   </div>
 </template>
-  
-  <script>
-import ViewPage from "../MainPageChild/ViewPage.vue";
-import PepoleStatus from "../OtherChilds/PepoleStatus.vue";
-import Dezhizhaihai from "./Dezhizhaihai.vue";
-import PopulationStructure from "./PopulationStructure.vue";
-export default {
-  props: ["dataAll"],
-  name: "",
-  components: {
-    ViewPage,
-    PepoleStatus,
-    Dezhizhaihai,
-    PopulationStructure
-  },
-  data() {
-    return {
-        showDZ:true
-    };
-  },
-  mounted() {
-    console.log('拿到数据',this.dataAll);
-  },
-  methods: {},
-};
+
+<script>
+  import ViewPage from "../MainPageChild/ViewPage.vue";
+  import PepoleStatus from "../OtherChilds/PepoleStatus.vue";
+  import Dezhizhaihai from "./Dezhizhaihai.vue";
+  import PopulationStructure from "./PopulationStructure.vue";
+  export default {
+    props: ["dataAll", 'isShow'],
+    name: "",
+    components: {
+      ViewPage,
+      PepoleStatus,
+      Dezhizhaihai,
+      PopulationStructure
+    },
+    data() {
+      return {
+      };
+    },
+    mounted() {
+    //   console.log('拿到数据', this.dataAll);
+    //   this.showDZ = localStorage.getItem('showDZ')
+    //   console.log("this.showDZ", this.showDZ)
+    },
+    methods: {},
+  };
+
 </script>
-  
-  
-  <style scoped>
-#viewPage_f {
-  position: absolute;
-  width: 100%;
-  height: 100%;
-  left: -10%;
-}
 
-#person_status_img {
-  position: absolute;
-  width: 150px;
-  top: 30%;
-}
-#leftPage {
-  position: absolute;
-  left: 2%;
-  top: 7%;
-  z-index: 2;
-  height: 93%;
-  width: 23%;
-  background-color: rgba(4, 11, 30, 0.6);
-}
-#dazhong_img {
-  position: absolute;
-  width: 200px;
-  top: -1%;
-}
 
-#dizhizaihai_img {
-  position: absolute;
-  width: 200px;
-  top: 70%;
-}
-#populationStructure_img{
+<style scoped>
+  #viewPage_f {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    left: -10%;
+  }
+
+  #person_status_img {
     position: absolute;
-  width: 150px;
-  top: 70%;
-}
+    width: 150px;
+    top: 30%;
+  }
+
+  #leftPage {
+    position: absolute;
+    left: 2%;
+    top: 7%;
+    z-index: 2;
+    height: 93%;
+    width: 23%;
+    background-color: rgba(4, 11, 30, 0.6);
+  }
+
+  #dazhong_img {
+    position: absolute;
+    width: 200px;
+    top: -1%;
+  }
+
+  #dizhizaihai_img {
+    position: absolute;
+    width: 200px;
+    top: 70%;
+  }
+
+  #populationStructure_img {
+    position: absolute;
+    width: 150px;
+    top: 70%;
+  }
+
 </style>
-  

+ 16 - 7
shuzhixiangzheng/src/components/XiMenPage.vue

@@ -6,16 +6,16 @@
       <img class="img" id="img2" src="../assets/png/title.png"></img>
       <!-- <img class="img" id="img3" :src="leftPng_url"></img>
       <img class="img" id="img5" :src="rightPng_url"></img> -->
-      <LeftPage></LeftPage>
-    <RightPage></RightPage>
+      <LeftPage :dataAll='dataAll' :isShow='isShow'></LeftPage>
+      <RightPage :dataAll='dataAll'></RightPage>
     </div>
   </template>
   
   <script>
       import Time from "./Time.vue"
       import ReturnButton from "./ReturnButton.vue"
-      import left2Png from "../assets/png/西门社区/left.png"
-  import right2Png from "../assets/png/西门社区/right.png"
+//       import left2Png from "../assets/png/西门社区/left.png"
+//   import right2Png from "../assets/png/西门社区/right.png"
   import LeftPage from "./OtherChilds/LeftPage.vue"
   import RightPage from "./OtherChilds/RightPage.vue"
   export default {
@@ -28,14 +28,23 @@
     },
     data () {
       return {
+        isShow:true,
         msg: '',
+        dataAll:{},
         form_show:false,
-        leftPng_url:left2Png,
-        rightPng_url:right2Png,
       }
     },
     mounted(){
-      
+        let clear = setInterval(() => {
+        if (
+          this.$store.getters.getDaZhongdata.code === 10000 &&
+          this.$store.getters.getDaZhongdata.data
+        ) {
+          this.dataAll=this.$store.getters.getDaZhongdata.data
+          console.log('--------',this.dataAll);
+          clearInterval(clear);
+        }
+      }, 500);
     },
     methods:{
 

+ 8 - 3
shuzhixiangzheng/src/components/ZheJiPage.vue

@@ -4,9 +4,10 @@
     <ReturnButton></ReturnButton>
     <img class="img" id="img1" src="../assets/png/footer.png" />
     <img class="img" id="img2" src="../assets/png/title.png" />
-    <img class="img" id="img3" :src="left2Png_url" />
-    <img class="img" id="img5" :src="right2Png_url" />
-
+    <!-- <img class="img" id="img3" :src="left2Png_url" />
+    <img class="img" id="img5" :src="right2Png_url" /> -->
+    <LeftPage></LeftPage>
+    <RightPage></RightPage>
     <div id="child1_form" v-show="form_show">
       <img
         class="img"
@@ -67,11 +68,15 @@ import left2Png from "../assets/png/柘矶社区/left.png";
 import right2Png from "../assets/png/柘矶社区/right.png";
 import house2Png from "../assets/png/house2.png";
 import { jinghuguoji_httpGet } from "../assets/api/loadData.js";
+import LeftPage from "./OtherChilds/LeftPage.vue"
+  import RightPage from "./OtherChilds/RightPage.vue"
 export default {
   name: "ZheJiDPage",
   components: {
     Time,
     ReturnButton,
+    LeftPage,
+    RightPage
   },
   data() {
     return {

+ 16 - 1
shuzhixiangzheng/src/store/index.js

@@ -5,7 +5,8 @@ const store = new Vuex.Store({
         state:{  //全局访问对象
            szdata:{},
            dazhongdata:{},
-           jinghuguoji:{}
+           jinghuguoji:{},
+           showDZ:true
         },
         getters: {
             getSzdata: state =>{
@@ -14,8 +15,16 @@ const store = new Vuex.Store({
             getDaZhongdata: state =>{
                return state.dazhongdata
             } ,
+            // getXimendata:state=>{
+            //    return state.ximendata
+            // },
+
             getJinghuguoji:state=>{
                return state.jinghuguoji
+            },
+           
+            getShowDZ:state=>{
+               return state.showDZ
             }
         },      
         mutations: {         
@@ -25,8 +34,14 @@ const store = new Vuex.Store({
          setDaZhongdata(state,value){
             state.dazhongdata = value
          },
+         // setXimendata(state,value){
+         //    state.ximendata = value
+         // },
          setJinghuguoji(state,value){
             state.jinghuguoji = value
+         },
+         setShowDZ(state,value){
+             state.showDZ=value
          }      
          },
          actions:{