index.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <template>
  2. <div class="thermal-map">
  3. <div class="modviewdingwei">
  4. <div class="dadetitle">
  5. {{ shangjiquyu === '全部' ? '广佛6市' : shangjiquyu }}未完工单量
  6. </div>
  7. <div class="modview">
  8. <moduleEnclosure>
  9. <div style="width: 100%; height: 100%">
  10. <div class="mintitle">安装未完工单量</div>
  11. <div class="minnum">{{ huizong.totalInsOpen || 0 }}</div>
  12. </div>
  13. </moduleEnclosure>
  14. </div>
  15. <div class="modview">
  16. <moduleEnclosure>
  17. <div style="width: 100%; height: 100%">
  18. <div class="mintitle">安装未完工台数</div>
  19. <div class="minnum">{{ huizong.totalInsMacOpen || 0 }}</div>
  20. </div>
  21. </moduleEnclosure>
  22. </div>
  23. <div class="modview">
  24. <moduleEnclosure>
  25. <div style="width: 100%; height: 100%">
  26. <div class="mintitle">维修未完工单量</div>
  27. <div class="minnum">{{ huizong.totalRepOpen || 0 }}</div>
  28. </div>
  29. </moduleEnclosure>
  30. </div>
  31. <div class="modview">
  32. <moduleEnclosure>
  33. <div style="width: 100%; height: 100%">
  34. <div class="mintitle">清洗未完工单量</div>
  35. <div class="minnum">{{ huizong.totalRepOpenqx || 0 }}</div>
  36. </div>
  37. </moduleEnclosure>
  38. </div>
  39. </div>
  40. <div class="youxiajiao">
  41. <div
  42. class="csmodview"
  43. v-for="(name, index) in cityList"
  44. :key="index"
  45. @click="getareaList(name)"
  46. >
  47. <moduleEnclosure>
  48. <div style="width: 100%; height: 100%">
  49. <div :class="{ csmintitle: true, selectxz: cityName === name }">
  50. {{ name }}
  51. </div>
  52. </div>
  53. </moduleEnclosure>
  54. </div>
  55. </div>
  56. <div class="xiaodiqu" v-if="quyulist.length" @wheel.stop="() => {}">
  57. <div
  58. v-for="(item, index) in quyulist"
  59. :key="index"
  60. :class="{ xiaomingz: true, selectxz: areaName === item.areaName }"
  61. @click="getareaName(item)"
  62. >
  63. {{ item.areaName }}
  64. </div>
  65. </div>
  66. <div class="relitumap">
  67. <mapdata v-if="showMapv2" :shangjiquyu="shangjiquyu" :type="type" />
  68. </div>
  69. <img src="@/assets/shuoming.png" class="shuoming" />
  70. </div>
  71. </template>
  72. <script>
  73. import moduleEnclosure from '@/components/moduleEnclosure.vue';
  74. import mapdata from './components/mapdata.vue';
  75. import { areaList, query24 } from '@/api/bigView.js';
  76. import bus from '@/utils/eventBus.js';
  77. export default {
  78. components: { moduleEnclosure, mapdata },
  79. data() {
  80. return {
  81. showMapv2: false,
  82. cityName: '全部',
  83. areaName: '',
  84. shangjiquyu: '全部',
  85. type: -1,
  86. cityList: [
  87. '全部',
  88. '广州市',
  89. '清远市',
  90. '韶关市',
  91. '佛山市',
  92. '肇庆市',
  93. '云浮市',
  94. ],
  95. quyulist: [],
  96. huizong: {},
  97. };
  98. },
  99. mounted() {
  100. this.$nextTick(() => {
  101. this.showMapv2 = true;
  102. });
  103. query24().then((res) => {
  104. this.huizong = res.data;
  105. });
  106. },
  107. watch: {
  108. shangjiquyu() {
  109. if (this.shangjiquyu === '全部') {
  110. bus.emit('autoplay', true);
  111. } else {
  112. bus.emit('autoplay', false);
  113. }
  114. this.showMapv2 = false;
  115. this.$nextTick(() => {
  116. this.showMapv2 = true;
  117. });
  118. if (this.type > -1) {
  119. query24({
  120. params: {
  121. [['city', 'area'][this.type]]: this.shangjiquyu,
  122. },
  123. }).then((res) => {
  124. this.huizong = res.data;
  125. });
  126. } else {
  127. query24().then((res) => {
  128. this.huizong = res.data;
  129. });
  130. }
  131. },
  132. },
  133. beforeUnmount() {},
  134. methods: {
  135. getareaList(name) {
  136. this.cityName = name;
  137. this.shangjiquyu = name;
  138. this.areaName = '';
  139. this.type = 0;
  140. if (name !== '全部') {
  141. areaList({
  142. params: {
  143. city: name,
  144. },
  145. }).then((res) => {
  146. this.quyulist = res.data;
  147. });
  148. } else {
  149. this.type = -1;
  150. this.quyulist = [];
  151. }
  152. },
  153. getareaName(item) {
  154. this.type = 1;
  155. this.areaName = item.areaName;
  156. this.shangjiquyu = item.areaName;
  157. },
  158. },
  159. };
  160. </script>
  161. <style scoped lang="scss">
  162. .thermal-map {
  163. width: 100%;
  164. height: 100%;
  165. position: relative;
  166. }
  167. .modviewdingwei {
  168. position: absolute;
  169. left: 64px;
  170. top: 28px;
  171. z-index: 10;
  172. }
  173. .modview {
  174. width: 188px;
  175. height: 86px;
  176. margin-top: 16px;
  177. }
  178. .mintitle {
  179. font-size: 14px;
  180. font-weight: 400;
  181. text-align: center;
  182. color: #7cf8fd;
  183. }
  184. .dadetitle {
  185. width: auto;
  186. font-size: 22px;
  187. font-weight: 400;
  188. text-align: left;
  189. color: #9cbde1;
  190. white-space: nowrap;
  191. }
  192. .minnum {
  193. font-size: 22px;
  194. font-weight: 500;
  195. text-align: center;
  196. color: #ecfdff;
  197. }
  198. .csmodview {
  199. width: 120px;
  200. height: 60px;
  201. margin-top: 10px;
  202. }
  203. .csmintitle {
  204. font-size: 15px;
  205. font-weight: bold;
  206. text-align: center;
  207. color: #f1f6fe;
  208. }
  209. .youxiajiao {
  210. position: absolute;
  211. bottom: 60px;
  212. right: 60px;
  213. z-index: 10;
  214. }
  215. .relitumap {
  216. position: absolute;
  217. top: 0;
  218. right: 0;
  219. bottom: 0;
  220. left: 0;
  221. z-index: 8;
  222. }
  223. .xiaodiqu {
  224. width: 165px;
  225. height: 480px;
  226. background: rgba(106, 207, 210, 0.32);
  227. border: 1px solid #7cf8fd;
  228. position: absolute;
  229. bottom: 60px;
  230. right: 200px;
  231. z-index: 10;
  232. box-sizing: border-box;
  233. padding: 16px;
  234. overflow-y: auto;
  235. text-align: center;
  236. }
  237. .xiaomingz {
  238. width: 100%;
  239. // overflow: hidden;
  240. // text-overflow: ellipsis;
  241. // white-space: nowrap;
  242. font-size: 18px;
  243. font-weight: normal;
  244. text-align: center;
  245. color: #f1f6fe;
  246. line-height: 30px;
  247. margin-bottom: 20px;
  248. }
  249. .selectxz {
  250. color: #6ad3dd !important;
  251. text-decoration: underline !important;
  252. }
  253. .shuoming {
  254. width: 132px;
  255. height: 72px;
  256. position: absolute;
  257. left: 64px;
  258. bottom: 40px;
  259. }
  260. </style>