MainPage.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. <template>
  2. <div id="firstPage">
  3. <!-- <img class="img" id="img1" src="../assets/png/title.png" /> -->
  4. <!-- <div id="time_time">10:45:23</div>
  5. <div id="time_week">星期五</div>
  6. <div id="time_day">2021.05.16</div> -->
  7. <Time></Time>
  8. <img class="img" id="img2" src="../assets/png/title.png" />
  9. <img class="img" id="first_img" src="../assets/png/first1.png" />
  10. <div id="left_div">
  11. <img class="menu" src="../assets/png/1.png" />
  12. <ViewPage></ViewPage>
  13. <img class="menu" id="peopleStatus" src="../assets/png/2.png" />
  14. <img id="person_status" src="../assets/png/people_status.png" />
  15. <PersonStatusPage></PersonStatusPage>
  16. <img class="menu" id="insuredStatus" src="../assets/png/3.png" />
  17. <img id="insured_status" src="../assets/png/insured_status.png" />
  18. <InsuredPage></InsuredPage>
  19. </div>
  20. <div id="right_div">
  21. <img class="menu" id="importantPersonStatus" src="../assets/png/4.png" />
  22. <KeyPopulationPage></KeyPopulationPage>
  23. <img class="menu" id="employmentSituation" src="../assets/png/5.png" />
  24. <EmploymentSituation></EmploymentSituation>
  25. <img class="menu" id="education" src="../assets/png/6.png" />
  26. <EducationPage></EducationPage>
  27. <img class="menu" id="vaccination" src="../assets/png/7.png" />
  28. <VaccinationPage></VaccinationPage>
  29. </div>
  30. <div id="click" class="click_class" v-on:click="to3DMap"></div>
  31. <div class="click_class" id="click_1" v-on:click="toZheji"></div>
  32. <div class="click_class" id="click_2" v-on:click="toOther"></div>
  33. <div class="click_class" id="click_3" v-on:click="toOther"></div>
  34. <div class="click_class" id="click_4" v-on:click="toOther"></div>
  35. <div id="click_5" v-on:click="toXiMen"></div>
  36. <div class="click_class" id="click_6" v-on:click="toOther"></div>
  37. <div class="click_class" id="click_7" v-on:click="toOther"></div>
  38. <div class="click_class" id="click_8" v-on:click="toOther"></div>
  39. <div class="click_class" id="click_9" v-on:click="toOther"></div>
  40. <div class="click_class" id="click_10" v-on:click="toOther"></div>
  41. <div class="click_class" id="click_11" v-on:click="toOther"></div>
  42. <div class="click_class" id="click_12" v-on:click="toOther"></div>
  43. <div class="click_class" id="click_13" v-on:click="toOther"></div>
  44. <div class="click_class" id="click_14" v-on:click="toOther"></div>
  45. <div class="click_class" id="click_15" v-on:click="toOther"></div>
  46. <div class="click_class" id="click_16" v-on:click="toOther"></div>
  47. </div>
  48. </template>
  49. <script>
  50. import Time from "./Time.vue";
  51. import PersonStatusPage from "./MainPageChild/PersonStatusPage.vue";
  52. import ViewPage from "./MainPageChild/ViewPage.vue";
  53. import InsuredPage from "./MainPageChild/InsuredPage.vue";
  54. import KeyPopulationPage from "./MainPageChild/KeyPopulationPage.vue";
  55. import EmploymentSituation from "./MainPageChild/EmploymentSituation.vue";
  56. import VaccinationPage from "./MainPageChild/VaccinationPage.vue";
  57. import EducationPage from "./MainPageChild/EducationPage.vue";
  58. import {
  59. SZZSY_httpGet,
  60. SZZSQSY_httpGet,
  61. SZZXQ_httpGet,
  62. } from "../assets/api/loadData.js";
  63. export default {
  64. name: "MainPage",
  65. components: {
  66. Time,
  67. PersonStatusPage,
  68. ViewPage,
  69. InsuredPage,
  70. KeyPopulationPage,
  71. EmploymentSituation,
  72. VaccinationPage,
  73. EducationPage,
  74. VaccinationPage,
  75. },
  76. data() {
  77. return {};
  78. },
  79. created() {},
  80. mounted() {
  81. this.change();
  82. },
  83. methods: {
  84. change() {
  85. let boxCollection = document.getElementsByClassName("click_class");
  86. for (let i = 0; i < boxCollection.length; i++) {
  87. boxCollection[i].addEventListener("click", (event) => {
  88. window.name = window.cesiumMap.addLocationName(event);
  89. console.log("event", event);
  90. setTimeout(() => {
  91. this.changeData(event.view.name);
  92. }, 1000);
  93. });
  94. }
  95. },
  96. changeData(name) {
  97. SZZSQSY_httpGet(
  98. name,
  99. (result) => {
  100. console.log(name, result);
  101. this.$store.commit("setDaZhongdata", result.data);
  102. this.$store.commit("setSzdata", result.data);
  103. },
  104. (result) => {}
  105. );
  106. },
  107. to3DMap() {
  108. setTimeout(() => {
  109. window.cesiumMap.removeGaode();
  110. window.cesiumMap.addEntity();
  111. }, 100);
  112. this.$router.replace("/daZhong");
  113. },
  114. toZheji() {
  115. window.cesiumMap.addGaode();
  116. this.$router.replace("/zheJi");
  117. },
  118. toXiMen() {
  119. window.cesiumMap.loadximen();
  120. window.cesiumMap.addLocationName({
  121. target: {
  122. id: "click_5",
  123. },
  124. });
  125. this.$router.replace("/ximen");
  126. },
  127. toOther() {
  128. window.cesiumMap.addGaode();
  129. this.$router.replace("/other");
  130. },
  131. },
  132. };
  133. </script>
  134. <style scoped>
  135. #peopleStatus {
  136. top: 28%;
  137. }
  138. #insuredStatus {
  139. top: 75%;
  140. }
  141. #importantPersonStatus {
  142. left: 10%;
  143. }
  144. #employmentSituation {
  145. top: 22%;
  146. }
  147. #vaccination {
  148. top: 75%;
  149. width: 200px;
  150. }
  151. #education {
  152. top: 45%;
  153. }
  154. #person_status {
  155. position: absolute;
  156. top: 30%;
  157. left: 50%;
  158. width: 30%;
  159. }
  160. #insured_status {
  161. position: absolute;
  162. bottom: 5%;
  163. left: 50%;
  164. width: 20%;
  165. }
  166. #right_div {
  167. position: absolute;
  168. z-index: 120;
  169. color: azure;
  170. width: 25%;
  171. height: 90%;
  172. top: 10%;
  173. right: 1%;
  174. /* background-color: rgb(0,0,0,0.1); */
  175. }
  176. #left_div {
  177. position: absolute;
  178. z-index: 120;
  179. color: azure;
  180. width: 25%;
  181. height: 90%;
  182. top: 10%;
  183. /* background-color: rgb(0,0,0,0.1); */
  184. }
  185. .menu {
  186. position: absolute;
  187. width: 150px;
  188. left: 10%;
  189. }
  190. .font_background_png {
  191. z-index: 119;
  192. position: absolute;
  193. top: -50%;
  194. }
  195. #firstPage {
  196. position: absolute;
  197. width: 100%;
  198. height: 100%;
  199. margin: 0;
  200. padding: 0;
  201. }
  202. .img {
  203. position: absolute;
  204. }
  205. #img1 {
  206. bottom: 1%;
  207. left: 50%;
  208. transform: translateX(-50%);
  209. z-index: 111;
  210. width: 50%;
  211. }
  212. #img2 {
  213. top: -1%;
  214. left: 50%;
  215. transform: translateX(-50%);
  216. z-index: 111;
  217. width: 30%;
  218. }
  219. #first_img {
  220. position: absolute;
  221. z-index: 110;
  222. width: 100%;
  223. height: 100%;
  224. }
  225. .click_class {
  226. position: absolute;
  227. z-index: 111;
  228. width: 80px;
  229. height: 40px;
  230. cursor: pointer;
  231. }
  232. #click {
  233. position: absolute;
  234. z-index: 111;
  235. width: 80px;
  236. height: 40px;
  237. left: 38%;
  238. top: 33%;
  239. cursor: pointer;
  240. }
  241. #click_1 {
  242. left: 54%;
  243. top: 48%;
  244. }
  245. #click_2 {
  246. left: 47.5%;
  247. top: 32.5%;
  248. }
  249. #click_3 {
  250. left: 57.5%;
  251. top: 31%;
  252. }
  253. #click_4 {
  254. left: 41%;
  255. top: 36%;
  256. }
  257. #click_5 {
  258. position: absolute;
  259. z-index: 111;
  260. width: 80px;
  261. height: 40px;
  262. left: 32%;
  263. top: 38%;
  264. cursor: pointer;
  265. }
  266. #click_6 {
  267. left: 36%;
  268. top: 42%;
  269. }
  270. #click_7 {
  271. left: 42%;
  272. top: 43%;
  273. }
  274. #click_8 {
  275. left: 52%;
  276. top: 40%;
  277. }
  278. #click_9 {
  279. left: 52.5%;
  280. top: 35%;
  281. }
  282. #click_10 {
  283. left: 51.5%;
  284. top: 45%;
  285. }
  286. #click_11 {
  287. left: 59%;
  288. top: 47%;
  289. }
  290. #click_12 {
  291. left: 63%;
  292. top: 54%;
  293. }
  294. #click_13 {
  295. left: 38%;
  296. top: 53%;
  297. }
  298. #click_14 {
  299. left: 27%;
  300. top: 56%;
  301. }
  302. #click_15 {
  303. left: 65%;
  304. top: 43%;
  305. }
  306. #click_16 {
  307. left: 48.5%;
  308. top: 27%;
  309. }
  310. </style>