index.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. <template>
  2. <div class="base-container no-events">
  3. <fnHeader></fnHeader>
  4. <div class="content">
  5. <!-- <div class="top"></div> -->
  6. <div class="left yes-events">
  7. <div class="chart-list">
  8. <div class="chart-item">
  9. <chart-box name="地形风险" arrow="left">
  10. <template #title-right>
  11. <div>
  12. <el-select
  13. v-model="topographicValue"
  14. placeholder="请选择"
  15. style="width: 86px"
  16. >
  17. <el-option
  18. v-for="item in topographicOptions"
  19. :key="item.value"
  20. :label="item.label"
  21. :value="item.value"
  22. />
  23. </el-select>
  24. </div>
  25. </template>
  26. <div class="topographic-content">
  27. <bar-chart
  28. styleName="styleName1"
  29. :xData="evaluateXData"
  30. :yData="evaluateYData"
  31. ></bar-chart>
  32. <div class="text-list box-bg">
  33. <div class="text-item" v-for="item in 3" :key="item">
  34. <div class="circle"></div>
  35. <div class="txt">
  36. 高温Ⅰ级<span>26</span>棵
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. </chart-box>
  42. </div>
  43. <div class="chart-item">
  44. <chart-box name="气象预警" arrow="left">
  45. <div class="topographic-content">
  46. <bar-chart
  47. styleName="styleName1"
  48. :xData="evaluateXData"
  49. :yData="evaluateYData"
  50. ></bar-chart>
  51. <div class="text-list box-bg">
  52. <div class="text-item" v-for="item in 3" :key="item">
  53. <div class="circle"></div>
  54. <div class="txt">
  55. 桂味<span>15626</span>棵(树龄3.5年)
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. </chart-box>
  61. </div>
  62. <div class="chart-item">
  63. <chart-box name="气象预警" arrow="left"></chart-box>
  64. </div>
  65. <div class="chart-item">
  66. <chart-box name="气象预警" arrow="left"></chart-box>
  67. </div>
  68. </div>
  69. </div>
  70. <div class="home-bottom">
  71. <div class="file-box yes-events">
  72. <chart-box name="果园档案">
  73. <template #title-right>
  74. <el-icon class="arrow-icon cursor-pointer" color="#141414"
  75. ><DArrowLeft
  76. /></el-icon>
  77. <div class="edit-btn cursor-pointer" @click="goBack">返回</div>
  78. </template>
  79. <file-bar>
  80. <div class="btn-list">
  81. <div class="btn-item">新增</div>
  82. <div class="btn-item">筛选</div>
  83. <div class="btn-item">撤销</div>
  84. <div class="btn-item">保存</div>
  85. </div>
  86. </file-bar>
  87. </chart-box>
  88. </div>
  89. </div>
  90. <div class="right yes-events">
  91. <div class="chart-list">
  92. <div class="chart-item">
  93. <chart-box name="气象预警" arrow="arrow-left"></chart-box>
  94. </div>
  95. <div class="chart-item">
  96. <chart-box name="气象预警" arrow="arrow-left"></chart-box>
  97. </div>
  98. <div class="chart-item">
  99. <chart-box name="气象预警" arrow="arrow-left"></chart-box>
  100. </div>
  101. <div class="chart-item">
  102. <chart-box name="气象预警" arrow="arrow-left"></chart-box>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. <div ref="mapRef" class="bottom-map"></div>
  109. </template>
  110. <script setup>
  111. import { onMounted, ref } from "vue";
  112. import fnHeader from "@/components/fnHeader.vue";
  113. import chartBox from "@/components/chartBox.vue";
  114. import fileBar from "@/components/fileBar.vue";
  115. import barChart from "@/components/charts/barChart.vue";
  116. import FileMap from "./fileMap";
  117. import router from "@/router";
  118. let fileMap = new FileMap();
  119. const mapRef = ref();
  120. const topographicValue = ref("高温风险");
  121. const topographicOptions = ref([
  122. { label: "高温风险", value: "高温风险" },
  123. { label: "病害风险", value: "病害风险" },
  124. { label: "虫害风险", value: "虫害风险" },
  125. { label: "阴雨寡照", value: "阴雨寡照" },
  126. ]);
  127. // 地形风险
  128. const evaluateXData = ["Ⅰ级", "Ⅱ级", "Ⅲ级"];
  129. const evaluateYData = [33, 41, 43];
  130. onMounted(() => {
  131. let location = "POINT (113.78049350268851 23.419886891845312)";
  132. fileMap.initMap(location, mapRef.value);
  133. });
  134. // 返回
  135. const goBack = () => {
  136. router.replace("/home");
  137. };
  138. </script>
  139. <style lang="scss" scoped>
  140. .base-container {
  141. width: 100%;
  142. height: 100vh;
  143. color: #fff;
  144. position: absolute;
  145. box-sizing: border-box;
  146. z-index: 1;
  147. .content {
  148. width: 100%;
  149. height: calc(100% - 74px - 48px);
  150. display: flex;
  151. justify-content: space-between;
  152. box-sizing: border-box;
  153. .left,
  154. .right {
  155. width: 375px;
  156. height: 100%;
  157. padding-top: 10px;
  158. box-sizing: border-box;
  159. display: flex;
  160. padding-left: 15px;
  161. .chart-list {
  162. width: 100%;
  163. height: 100%;
  164. display: flex;
  165. flex-direction: column;
  166. justify-content: space-between;
  167. .chart-item {
  168. width: 100%;
  169. height: calc(100% / 4);
  170. box-sizing: border-box;
  171. margin-bottom: 10px;
  172. &.chart-item:last-child {
  173. margin: 0;
  174. }
  175. }
  176. }
  177. .topographic-content {
  178. width: 100%;
  179. height: calc(100% - 10px);
  180. display: flex;
  181. align-items: center;
  182. justify-content: space-between;
  183. margin-bottom: 10px;
  184. .text {
  185. font-weight: 400;
  186. padding: 8px 0 4px 5px;
  187. text-indent: 2em;
  188. margin-left: 8px;
  189. span {
  190. color: #69bdff;
  191. }
  192. }
  193. .box-bg {
  194. border-radius: 2px 2px 0 0;
  195. font-size: 12px;
  196. padding: 8px 6px;
  197. box-sizing: border-box;
  198. background: linear-gradient(
  199. 180deg,
  200. rgb(85, 85, 85, 0.4) 0%,
  201. rgb(35, 35, 35, 1) 100%
  202. );
  203. }
  204. }
  205. .text-list {
  206. flex: none;
  207. margin: 0 16px;
  208. .text-item {
  209. display: flex;
  210. align-items: center;
  211. margin-bottom: 5px;
  212. .circle {
  213. width: 4px;
  214. height: 4px;
  215. background: rgba(255, 255, 255, 0.44);
  216. border-radius: 50%;
  217. margin-right: 6px;
  218. }
  219. .txt {
  220. font-size: 12px;
  221. span{
  222. margin: 0 2px 0 6px;
  223. color: #E8BA52;
  224. }
  225. }
  226. }
  227. }
  228. }
  229. .right {
  230. .list {
  231. width: 100%;
  232. height: 100%;
  233. }
  234. }
  235. .home-bottom {
  236. display: flex;
  237. align-items: flex-end;
  238. width: calc(100% - 375px - 375px - 72px);
  239. height: 100%;
  240. justify-content: flex-end;
  241. .file-box {
  242. height: 25%;
  243. min-height: 210px;
  244. width: 422px;
  245. position: relative;
  246. box-shadow: 0 0 3px 3px #2199f8;
  247. .arrow-icon {
  248. top: -32px;
  249. left: 50%;
  250. position: absolute;
  251. background: #fff;
  252. width: 16px;
  253. height: 80px;
  254. line-height: 80px;
  255. border-radius: 5px 0 0 5px;
  256. text-align: center;
  257. transform: translateX(-50%) rotate(270deg);
  258. }
  259. .edit-btn {
  260. padding: 2px 24px;
  261. background: #2199f8;
  262. border-radius: 4px;
  263. }
  264. .btn-list {
  265. position: absolute;
  266. right: 4px;
  267. .btn-item {
  268. background: #4f4f4f;
  269. border-radius: 4px;
  270. padding: 2px 24px;
  271. margin-bottom: 16px;
  272. &:last-child {
  273. margin-bottom: 0;
  274. }
  275. }
  276. }
  277. }
  278. }
  279. }
  280. }
  281. .bottom-map {
  282. width: 100%;
  283. height: 100vh;
  284. position: absolute;
  285. z-index: 0;
  286. }
  287. </style>