DR/4DAGE 3 năm trước cách đây
mục cha
commit
a867f1a890

+ 13 - 1
shuzhixiangzheng/src/App.vue

@@ -14,11 +14,15 @@ import {
 } from "./assets/api/loadData.js";
 export default {
   name: "container",
+ 
+  data:{
+   
+  },
   mounted() {
     window.cesiumMap = new Map();
     SZZSY_httpGet(
       (result) => {
-        console.log("首页", result);
+     //   console.log("首页", result);
         this.$store.commit("setSzdata", result.data);
       },
       (reuslt) => {}
@@ -40,6 +44,14 @@ export default {
     //   (result) => {}
     // );
   },
+  methods:{
+    reload(){
+      this.isRouterAlive=false;
+      this.$nextTick(()=>{
+        this.isRouterAlive=true
+      })
+    }
+  }
 };
 </script>
 

+ 1 - 1
shuzhixiangzheng/src/assets/api/Map.js

@@ -283,7 +283,7 @@ class Map{
     }
     
     loadximen(){
-        this._tileset1.show=true;
+       this._tileset1.show=true;
         this._viewer.camera.flyTo({
             destination:Cesium.Cartesian3.fromDegrees(116.219468,29.737767,243.68175872316817),
             orientation:{

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

@@ -77,12 +77,16 @@
       EducationPage,
       VaccinationPage,
     },
+
     data() {
       return {
         dataAll: {}
       };
     },
-    created() {},
+    created() {
+      console.log(11)
+     
+    },
     mounted() {
       this.change();
       // 拿到首页数据,传给左侧的组件
@@ -92,7 +96,7 @@
           this.$store.getters.getSzdata.data.index
         ) {
           this.dataAll = this.$store.getters.getSzdata.data;
-          console.log('拿到首页全部数据', this.dataAll);
+        //  console.log('拿到首页全部数据', this.dataAll);
           clearInterval(clear);
         }
       }, 500);

+ 4 - 1
shuzhixiangzheng/src/components/MainPageChild/EducationPage.vue

@@ -74,7 +74,8 @@ export default {
     const myTime = setInterval(() => {
       try {
         this.school = this.dataAll.school;
-        this.school.map((obj) => {
+        if(this.school&&this.school.length>0){
+          this.school.map((obj) => {
           if (obj.name == "学龄前") {
             this.xlq = {
               num: obj.num,
@@ -108,6 +109,8 @@ export default {
           }
         });
         clearInterval(myTime);
+        }
+        
       } catch (error) {
         console.log(error);
       }

+ 4 - 1
shuzhixiangzheng/src/components/OtherChilds/EdcationPage_shequ.vue

@@ -74,7 +74,8 @@ export default {
       try {
           if(this.dataAll){
             this.school =this.dataAll.school
-        this.school.map((obj) => {
+            if(this.school&&this.school.length>0){
+              this.school.map((obj) => {
           if (obj.name == "学龄前") {
             this.xlq = {
               num: obj.num,
@@ -107,6 +108,8 @@ export default {
             };
           }
         });
+            }
+        
           }
         clearInterval(myTime);
       } catch (error) {

+ 4 - 0
shuzhixiangzheng/src/components/OtherChilds/RightPage.vue

@@ -20,6 +20,8 @@
 import KeyPopulationPage from "../MainPageChild/KeyPopulationPage";
 import ThreeDCharts4 from "../Utils/ThreeDCharts4";
 import EdcationPageShequ from "./EdcationPage_shequ";
+import EmploymentSituation from "../MainPageChild/EmploymentSituation";
+import EducationPage from "../MainPageChild/EducationPage";
 import VaccinationPage from "../MainPageChild/VaccinationPage";
 export default {
   props:['dataAll'],
@@ -28,6 +30,8 @@ export default {
     KeyPopulationPage,
     ThreeDCharts4,
     EdcationPageShequ,
+    EmploymentSituation,
+    EducationPage,
     VaccinationPage,
   },
   data() {

+ 1 - 0
shuzhixiangzheng/src/components/ReturnButton.vue

@@ -19,6 +19,7 @@
     methods:{
       return_click(){
         this.$router.replace('/')
+        location.reload();
       }
     }
   }

+ 16 - 5
shuzhixiangzheng/src/components/Utils/ThreeDCharts.vue

@@ -71,16 +71,27 @@ export default {
   methods: {
     //数据匹配
     initData() {
-      this.optionData.filter((result) => result.name == "公职人员数")[0].value =
+      if(this.working&&this.working.publicRate){
+        this.optionData.filter((result) => result.name == "公职人员数")[0].value =
         +this.working.publicRate;
-      this.optionData.filter((result) => result.name == "自主就业")[0].value =
+      }
+      if(this.working&&this.working.privateRate){
+        this.optionData.filter((result) => result.name == "自主就业")[0].value =
         +this.working.privateRate;
-      this.optionData.filter((result) => result.name == "企业员工")[0].value =
+      }
+      if(this.working&&this.working.companyRate){
+        this.optionData.filter((result) => result.name == "企业员工")[0].value =
         +this.working.companyRate;
-      this.optionData.filter((result) => result.name == "无业")[0].value =
+      }
+      if(this.working&&this.working.noWorkingRate){
+        this.optionData.filter((result) => result.name == "无业")[0].value =
         +this.working.noWorkingRate;
-      this.optionData.filter((result) => result.name == "退休")[0].value =
+      }
+      if(this.working&&this.working.retireRate){
+        this.optionData.filter((result) => result.name == "退休")[0].value =
         +this.working.retireRate;
+      }
+    
       this.init();
     },
     init() {

+ 4 - 3
shuzhixiangzheng/src/components/Utils/ThreeDCharts1.vue

@@ -14,7 +14,6 @@ export default {
   components: {},
   data() {
     return {
-      education: [],
       optionData: [
         {
           name: "文盲",
@@ -74,7 +73,8 @@ export default {
   methods: {
     //数据匹配
     initData() {
-      this.optionData.filter((result) => result.name == "文盲")[0].value =
+      if(this.education){
+        this.optionData.filter((result) => result.name == "文盲")[0].value =
         +this.education.filter((result) => result.name == "文盲")[0].rate;
       this.optionData.filter((result) => result.name == "初中及以下")[0].value =
         +this.education.filter((result) => result.name == "初中及以下")[0].rate;
@@ -89,6 +89,7 @@ export default {
         +this.education.filter((result) => result.name == "本科")[0].rate;
       this.optionData.filter((result) => result.name == "专科")[0].value =
         +this.education.filter((result) => result.name == "专科")[0].rate;
+      }
       this.init();
     },
     init() {
@@ -97,7 +98,7 @@ export default {
         document.getElementById("cityGreenLand-charts1")
       );
       // 传入数据生成 option
-     // console.log('++++++++++++++++',this.optionData);
+    //  console.log('++++++++++++++++',this.optionData);
       this.option = this.getPie3D(this.optionData, 0.8);
       myChart.setOption(this.option);
       //是否需要label指引线,如果要就添加一个透明的2d饼状图并调整角度使得labelLine和3d的饼状图对齐,并再次setOption

+ 1 - 1
shuzhixiangzheng/static/config.js

@@ -1,2 +1,2 @@
 //后端接口地址
-window.BASE_URL="http://101.132.109.234:8099/"
+window.BASE_URL="http://101.132.109.234:8099/"