index.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. <template>
  2. <Bg></Bg>
  3. <Header> </Header>
  4. <div class="container2">
  5. <div class="mainDiv">
  6. <Title class="title" title="农事复核对比"></Title>
  7. <div class="tabs">
  8. <div class="tabs-item confirmed">农事-营养 2023.4.16</div>
  9. <div class="tabs-item to-be-confirmed">
  10. 农事-营养
  11. <span class="time">2023.4.16</span>
  12. </div>
  13. <div class="tabs-item">农事-杀梢 2023.4.17</div>
  14. </div>
  15. <div class="button-row">
  16. <div class="btn-group">
  17. <div
  18. :class="['btn-item', 'yse-events', { 'btn-act': active === index }]"
  19. v-for="(item, index) in btnList"
  20. :key="index"
  21. @click="handleAct(index)"
  22. >
  23. {{ item }}
  24. </div>
  25. </div>
  26. <div class="toggle-group" v-show="active === 0">
  27. <div :class="['toggle-item','before',{'before-act':btnItemAct===0}]" @click="handleBtnItemAct(0)">执行前</div>
  28. <div :class="['toggle-item','after',{'after-act':btnItemAct===1}]" @click="handleBtnItemAct(1)">执行后</div>
  29. </div>
  30. <div class="select" v-show="active !== 0">
  31. <el-select
  32. class="mr-10"
  33. v-show="active === 1"
  34. v-model="selectValue1"
  35. size="large"
  36. placeholder="品种筛选"
  37. style="width: 150px"
  38. popper-class="v-select-popper"
  39. clearable
  40. >
  41. <el-option
  42. v-for="item in options1"
  43. :key="item.value"
  44. :label="item.label"
  45. :value="item.value"
  46. />
  47. </el-select>
  48. <el-select
  49. v-model="selectValue"
  50. size="large"
  51. placeholder="区域筛选"
  52. style="width: 150px"
  53. popper-class="v-select-popper"
  54. clearable
  55. >
  56. <el-option
  57. v-for="item in options"
  58. :key="item.value"
  59. :label="item.label"
  60. :value="item.value"
  61. />
  62. </el-select>
  63. </div>
  64. </div>
  65. <div class="box-content">
  66. <div class="map" ref="mapRef" v-show="active === 0"></div>
  67. <div class="picture-list list" v-show="active === 1">
  68. <div
  69. :class="['picture-item', { marker: item.markers }]"
  70. :style="{
  71. marginRight: (index + 1) % 3 === 0 ? '0' : '8px',
  72. borderColor: item.markers ? '#F72E24' : '#00fff0',
  73. }"
  74. v-for="(item, index) in pictureList"
  75. :key="index"
  76. >
  77. <el-image
  78. @click="handlePicturn(item, index)"
  79. class="image"
  80. :src="item.img1"
  81. fit="cover"
  82. />
  83. <el-image
  84. @click="handlePicturn(item, index)"
  85. class="image"
  86. :src="item.img2"
  87. fit="cover"
  88. />
  89. <div
  90. class="overlay"
  91. v-show="item.show"
  92. @click="handlePicturn(item, index)"
  93. >
  94. <div
  95. class="overlay-btn"
  96. :style="{ background: item.markers ? '#F72E24' : '#f78724' }"
  97. @click.stop="handlePicturnBtn(item, index)"
  98. >
  99. {{ item.markers ? "取消标记" : "问题标记" }}
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. <div class="photo-list list" v-show="active === 2">
  105. <div
  106. class="photo-item"
  107. :style="{ marginRight: (index + 1) % 6 === 0 ? '0' : '19px' }"
  108. v-for="(item, index) in 20"
  109. :key="index"
  110. >
  111. <el-image
  112. class="image"
  113. src="https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg"
  114. fit="cover"
  115. />
  116. <div class="photo-name">王东东</div>
  117. </div>
  118. </div>
  119. <!-- 按钮 -->
  120. <div class="box-btn">
  121. <div class="green yse-events">生成复核报告</div>
  122. <div class="orange yse-events">确认农事</div>
  123. </div>
  124. <!-- 问题标记区位 -->
  125. <div class="mark-area" v-show="showPicture" @click="handleMarkArea">
  126. <div class="mark-title">
  127. <div>问题标记区位</div>
  128. </div>
  129. <el-image
  130. class="image"
  131. src="https://fuss10.elemecdn.com/d/e6/c4d93a3805b3ce3f323f7974e6f78jpeg.jpeg"
  132. fit="cover"
  133. />
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138. </template>
  139. <script setup>
  140. import Header from "@/views/components/Header.vue";
  141. import Bg from "../Bg";
  142. import Title from "../components/title";
  143. import { useRouter } from "vue-router";
  144. import { reactive, toRefs, ref, onMounted } from "vue";
  145. import { useStore } from "vuex";
  146. import CheckComparisonMap from "./CheckComparisonMap";
  147. const router = useRouter();
  148. const store = useStore();
  149. const state = reactive({
  150. btnList: ["全景图", "近景图", "执行照片"],
  151. pictureList: [
  152. {
  153. img1: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
  154. img2: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
  155. markers: false,
  156. show: false,
  157. },
  158. {
  159. img1: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
  160. img2: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
  161. markers: true,
  162. show: false,
  163. },
  164. {
  165. img1: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
  166. img2: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
  167. markers: false,
  168. show: false,
  169. },
  170. {
  171. img1: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
  172. img2: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
  173. markers: false,
  174. show: false,
  175. },
  176. {
  177. img1: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
  178. img2: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
  179. markers: true,
  180. show: false,
  181. },
  182. {
  183. img1: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
  184. img2: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
  185. markers: false,
  186. show: false,
  187. },
  188. {
  189. img1: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
  190. img2: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
  191. markers: false,
  192. show: false,
  193. },
  194. ],
  195. listItem: [],
  196. });
  197. const { btnList, pictureList, listItem } = toRefs(state);
  198. // 执行前后
  199. const btnItemAct = ref(0)
  200. const handleBtnItemAct = (e) => {
  201. btnItemAct.value = e;
  202. };
  203. const showPicture = ref(false);
  204. const active = ref(0);
  205. const handleAct = (e) => {
  206. active.value = e;
  207. selectValue.value = ''
  208. selectValue1.value = ''
  209. };
  210. const picturnIndex = ref(null);
  211. const picturnItem = ref(null);
  212. const handlePicturn = (e, i) => {
  213. showPicture.value = false;
  214. state.pictureList[i].show = !e.show;
  215. };
  216. const handlePicturnBtn = (e, i) => {
  217. picturnIndex.value = i;
  218. picturnItem.value = e;
  219. if (state.pictureList[i].markers) {
  220. state.pictureList[i].markers = !e.markers;
  221. state.pictureList[i].show = !e.show;
  222. } else {
  223. showPicture.value = e.show;
  224. }
  225. };
  226. const handleMarkArea = () => {
  227. state.pictureList[picturnIndex.value].show = !picturnItem.value.show;
  228. showPicture.value = picturnItem.value.show;
  229. state.pictureList[picturnIndex.value].markers = !picturnItem.value.markers;
  230. };
  231. const selectValue = ref("");
  232. const options = [
  233. {
  234. value: "Option1",
  235. label: "1区",
  236. },
  237. {
  238. value: "Option2",
  239. label: "2区",
  240. },
  241. {
  242. value: "Option3",
  243. label: "3区",
  244. },
  245. {
  246. value: "Option4",
  247. label: "4区",
  248. },
  249. ];
  250. const selectValue1 = ref("");
  251. const options1 = [
  252. {
  253. value: "Option1",
  254. label: "妃子笑",
  255. },
  256. {
  257. value: "Option2",
  258. label: "糯米糍",
  259. },
  260. {
  261. value: "Option3",
  262. label: "状元红",
  263. },
  264. {
  265. value: "Option4",
  266. label: "青皮甜",
  267. },
  268. ];
  269. const initData = async () => {
  270. // let url = "aPictureGarden";
  271. // if (!switchValue.value) {
  272. // url = "aPictureTree";
  273. // }
  274. // const { code, data } = await VE_API.regionalInformation[url]({
  275. // gardenId: curGardenId.value,
  276. // });
  277. // const dataValue = data.data;
  278. // state.baseData = dataValue;
  279. // state.btnList = dataValue;
  280. // updateData(active.value);
  281. };
  282. // 地图初始化
  283. const mapRef = ref(null);
  284. const kmap = new CheckComparisonMap();
  285. const location = store.getters.userinfo.location;
  286. const curGardenId = ref(store.getters.userinfo.curGardenId);
  287. onMounted(() => {
  288. initData();
  289. kmap.initMap(location, mapRef.value);
  290. // kmap.initArea(curGardenId.value)
  291. // kmap.initSubArea(curGardenId.value)
  292. // kmap.addSingleSelect(selectTree)
  293. });
  294. </script>
  295. <style lang="scss" scoped>
  296. // @import "../../styles/index.scss";
  297. .container2 {
  298. height: 100%;
  299. width: 100%;
  300. z-index: 2;
  301. position: absolute;
  302. color: #fff;
  303. .mainDiv {
  304. position: absolute;
  305. top: 100px;
  306. bottom: 65px;
  307. left: 20px;
  308. right: 20px;
  309. border: 1px solid rgba(81, 233, 240, 0.6);
  310. .title {
  311. width: 449px;
  312. }
  313. .tabs {
  314. width: auto;
  315. height: 46px;
  316. display: flex;
  317. margin: 19px 0 4px 4px;
  318. .tabs-item {
  319. width: 242px;
  320. height: 100%;
  321. background: #00fff0;
  322. border-radius: 5px;
  323. border: 1px solid #000000;
  324. font-weight: 800;
  325. font-size: 19px;
  326. color: #0e4c5d;
  327. line-height: 46px;
  328. text-align: center;
  329. margin-right: 16px;
  330. cursor: pointer;
  331. &::after {
  332. position: absolute;
  333. top: -12px;
  334. right: -12px;
  335. width: 38px;
  336. height: 23px;
  337. font-weight: 800;
  338. font-size: 9px;
  339. color: #fff;
  340. line-height: 23px;
  341. }
  342. &.confirmed {
  343. color: #f5f5f5;
  344. border: 1px solid #b1b1b1;
  345. background: #7c7978;
  346. position: relative;
  347. &::after {
  348. content: "已确认";
  349. color: #524e4e;
  350. background: url("@/assets/img/checkComparison/tips_bg_gray.png")
  351. no-repeat center center / 100% 100%;
  352. }
  353. }
  354. &.to-be-confirmed {
  355. border: 1px solid #000000;
  356. background: #0e4c5d;
  357. color: #ffffff;
  358. position: relative;
  359. &::after {
  360. content: "待确认";
  361. background: url("@/assets/img/checkComparison/tips_bg_orange.png")
  362. no-repeat center center / 100% 100%;
  363. }
  364. .time {
  365. color: #31fef4;
  366. }
  367. }
  368. }
  369. }
  370. .button-row {
  371. border: 1px solid #3ab5db;
  372. background: rgba(66, 153, 180, 0.4);
  373. display: flex;
  374. justify-content: space-between;
  375. padding: 0 10px;
  376. width: auto;
  377. height: 52px;
  378. .btn-group {
  379. display: flex;
  380. .btn-item {
  381. background: url("@/assets/img/checkComparison/btn_bg.png") no-repeat
  382. center center / 100% 100%;
  383. font-weight: 800;
  384. font-size: 19px;
  385. text-align: center;
  386. line-height: 52px;
  387. padding: 0 22px;
  388. cursor: pointer;
  389. &.btn-act {
  390. background: url("@/assets/img/checkComparison/btn_bg_act.png")
  391. no-repeat center center / 100% 100%;
  392. }
  393. }
  394. }
  395. .toggle-group {
  396. display: flex;
  397. .toggle-item {
  398. width: 126px;
  399. text-align: center;
  400. font-size: 21px;
  401. line-height: 52px;
  402. cursor: pointer;
  403. &.before {
  404. background: url("@/assets/img/checkComparison/before_bg.png")
  405. no-repeat center center / 100% 100%;
  406. margin-right: -23px;
  407. }
  408. &.before-act {
  409. background: url("@/assets/img/checkComparison/before_bg_act.png")
  410. no-repeat center center / 100% 100%;
  411. margin-right: -23px;
  412. }
  413. &.after {
  414. background: url("@/assets/img/checkComparison/after_bg.png")
  415. no-repeat center center / 100% 100%;
  416. }
  417. &.after-act {
  418. background: url("@/assets/img/checkComparison/after_bg_act.png")
  419. no-repeat center center / 100% 100%;
  420. }
  421. }
  422. }
  423. .select {
  424. line-height: 49px;
  425. .mr-10 {
  426. margin-right: 10px;
  427. }
  428. .el-select {
  429. color: #00fff0;
  430. ::v-deep {
  431. .el-select__wrapper {
  432. background: url("@/assets/img/checkComparison/select_bg.png")
  433. no-repeat center center / 100% 100%;
  434. border: none;
  435. box-shadow: none;
  436. .el-select__placeholder {
  437. font-weight: 800;
  438. font-size: 17px;
  439. color: #ffffff;
  440. background: linear-gradient(
  441. 92deg,
  442. #8cc1e3 0%,
  443. #cdfbff 48.8525390625%,
  444. #8cd8fb 100%
  445. );
  446. -webkit-background-clip: text;
  447. -webkit-text-fill-color: transparent;
  448. }
  449. }
  450. }
  451. }
  452. }
  453. }
  454. .box-content {
  455. // @include wh(auto, calc(100% - 52px - 46px - 62px - 19px));
  456. position: relative;
  457. box-sizing: border-box;
  458. margin: 4px;
  459. .map {
  460. border-radius: 5px;
  461. border: 1px solid #00fff0;
  462. box-sizing: border-box;
  463. width: 100%;
  464. height: 100%;
  465. }
  466. .list {
  467. width: 100%;
  468. max-height: 100%;
  469. display: flex;
  470. flex-wrap: wrap;
  471. overflow-y: auto;
  472. }
  473. .picture-list {
  474. .picture-item {
  475. border-radius: 5px;
  476. border: 1px solid #00fff0;
  477. width: 33%;
  478. height: 225px;
  479. display: flex;
  480. justify-content: space-between;
  481. padding: 4px;
  482. box-sizing: border-box;
  483. position: relative;
  484. cursor: pointer;
  485. margin-right: 8px;
  486. margin-bottom: 15px;
  487. &.marker {
  488. &::before {
  489. content: "已标记";
  490. position: absolute;
  491. top: 4px;
  492. right: 4px;
  493. width: 72px;
  494. height: 32px;
  495. line-height: 32px;
  496. text-align: right;
  497. padding-right: 8px;
  498. box-sizing: border-box;
  499. z-index: 5;
  500. font-weight: 800;
  501. font-size: 15px;
  502. background: url("@/assets/img/checkComparison/picturn_title_bg.png")
  503. no-repeat center center / 100% 100%;
  504. }
  505. }
  506. .image {
  507. width: 49.5%;
  508. height: 100%;
  509. cursor: pointer;
  510. }
  511. .overlay {
  512. position: absolute;
  513. width: 100%;
  514. height: 100%;
  515. background: rgba(79, 38, 11, 0.6);
  516. top: 0;
  517. left: 0;
  518. border-radius: 5px;
  519. display: flex;
  520. align-items: center;
  521. justify-content: center;
  522. .overlay-btn {
  523. background: #f78724;
  524. border-radius: 5px;
  525. font-weight: 800;
  526. font-size: 21px;
  527. padding: 4px 18px;
  528. }
  529. }
  530. }
  531. }
  532. .photo-list {
  533. .photo-item {
  534. border-radius: 5px;
  535. border: 1px solid #00fff0;
  536. width: 15.64%;
  537. height: 194px;
  538. margin-right: 19px;
  539. margin-bottom: 11px;
  540. position: relative;
  541. .image {
  542. width: 100%;
  543. height: 100%;
  544. border-radius: 5px;
  545. }
  546. .photo-name {
  547. position: absolute;
  548. bottom: 7px;
  549. left: 4px;
  550. text-align: center;
  551. line-height: 34px;
  552. width: 103px;
  553. height: 34px;
  554. font-weight: 800;
  555. font-size: 19px;
  556. color: #2ff5ed;
  557. background: url("@/assets/img/checkComparison/title_bg.png")
  558. no-repeat center center / 100% 100%;
  559. }
  560. }
  561. }
  562. .box-btn {
  563. position: absolute;
  564. bottom: 55px;
  565. left: 35%;
  566. display: flex;
  567. width: auto;
  568. div {
  569. width: 255px;
  570. height: 59px;
  571. line-height: 59px;
  572. text-align: center;
  573. font-weight: bold;
  574. font-size: 21px;
  575. cursor: pointer;
  576. }
  577. .orange {
  578. background: url("@/assets/img/checkComparison/map_btn_bg_orange.png")
  579. no-repeat center center / 100% 100%;
  580. margin-right: 13px;
  581. }
  582. .green {
  583. background: url("@/assets/img/checkComparison/map_btn_bg_green.png")
  584. no-repeat center center / 100% 100%;
  585. }
  586. }
  587. .mark-area {
  588. position: absolute;
  589. right: 11px;
  590. bottom: 6px;
  591. width: 422px;
  592. height: 364px;
  593. background: #022d3c;
  594. box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.73);
  595. border-radius: 6px;
  596. border: 2px solid #11cfc4;
  597. cursor: pointer;
  598. .mark-title {
  599. background: url("@/assets/img/checkComparison/mark_title_bg.png")
  600. no-repeat center center / 100% 100%;
  601. width: 218px;
  602. height: 26px;
  603. font-weight: 400;
  604. font-size: 18px;
  605. margin: auto;
  606. text-align: center;
  607. line-height: 26px;
  608. position: relative;
  609. z-index: 1;
  610. div {
  611. color: #ffffff;
  612. background: linear-gradient(0deg, #06ffce 0%, #ffffff 100%);
  613. -webkit-background-clip: text;
  614. -webkit-text-fill-color: transparent;
  615. }
  616. }
  617. .image {
  618. width: 100%;
  619. height: 100%;
  620. border-radius: 5px;
  621. position: absolute;
  622. z-index: 0;
  623. top: 0;
  624. }
  625. }
  626. }
  627. }
  628. }
  629. </style>