LvShanXiang.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649
  1. <template>
  2. <div class="LvShanXiang" @click="qita">
  3. <hy-header :navTag="0"></hy-header>
  4. <div class="warp">
  5. <div class="left">
  6. <div class="left1">
  7. <E-Left1 style="height: 100%"></E-Left1>
  8. </div>
  9. <div class="left2">
  10. <E-Left2 style="height: 100%"></E-Left2>
  11. </div>
  12. <div class="left3">
  13. <E-Left3 style="height: 100%"></E-Left3>
  14. </div>
  15. </div>
  16. <div class="middle">
  17. <section class="section">
  18. <div class="warp">
  19. <div class="item">
  20. <div>
  21. <span class="title">当月存栏量:</span>
  22. <span class="num">10534</span>
  23. <span class="unit">只</span>
  24. </div>
  25. </div>
  26. <div class="item">
  27. <div>
  28. <span class="title">当月出栏量:</span>
  29. <span class="num">1534</span>
  30. <span class="unit">只</span>
  31. </div>
  32. </div>
  33. <div class="item">
  34. <div>
  35. <span class="title">月种羊出栏:</span>
  36. <span class="num">2380</span>
  37. <span class="unit">只</span>
  38. </div>
  39. </div>
  40. </div>
  41. <div class="warp">
  42. <div class="item">
  43. <div>
  44. <span class="title">当前肉羊价:</span>
  45. <span class="num">33</span>
  46. <span class="unit">元/kg</span>
  47. </div>
  48. </div>
  49. <div class="item">
  50. <div>
  51. <span class="title">当前种羊价:</span>
  52. <span class="num">53</span>
  53. <span class="unit">元/kg</span>
  54. </div>
  55. </div>
  56. <div class="item">
  57. <div>
  58. <span class="title">当前羊粪价:</span>
  59. <span class="num">0.8</span>
  60. <span class="unit">元/kg</span>
  61. </div>
  62. </div>
  63. </div>
  64. </section>
  65. <footer class="footer" v-if="isShowMain">
  66. <main class="inputWrap">
  67. <!-- <select class="input" v-model="searchStr" placeholder="族谱溯源">
  68. <option value="045472">045472</option>
  69. <option value="045713">045713</option>
  70. <option value="048004">048004</option>
  71. <option value="046845">046845</option>
  72. <option value="043975">043975</option>
  73. </select> -->
  74. <input
  75. type="text"
  76. class="input"
  77. v-model="searchStr"
  78. placeholder="族谱溯源"
  79. />
  80. <i class="icon_search" @click.stop="search"></i>
  81. </main>
  82. <!-- <img class="bg_map" src="../../assets/u922.png" />
  83. <div class="icon_pasture_1" @click.stop="clickPoint('dr')">
  84. <img src="../../assets/icon_pasture.png">
  85. <h3>长兴德睿生态农业开发有限公司</h3>
  86. </div>
  87. <div class="icon_pasture_2" @click.stop="clickPoint('ys')">
  88. <img src="../../assets/icon_pasture.png">
  89. <h3>长兴永盛牧业有限公司</h3>
  90. </div> -->
  91. <iframe
  92. src="http://122.237.98.3:8888/LvShanDaShuJu/page/map.html"
  93. frameborder="0"
  94. style="height: 100%; width: 100%"
  95. ></iframe>
  96. </footer>
  97. <footer class="footer_2" v-show="!isShowMain">
  98. <h1>族谱溯源</h1>
  99. <article class="tree">
  100. <div class="self">{{ sheepClan.self }}</div>
  101. <div class="f">父:{{ sheepClan.f }}</div>
  102. <div class="m">母:{{ sheepClan.m }}</div>
  103. <div class="ff">父父:{{ sheepClan.ff }}</div>
  104. <div class="fm">父母:{{ sheepClan.fm }}</div>
  105. <div class="mf">母父:{{ sheepClan.mf }}</div>
  106. <div class="mm">母母:{{ sheepClan.mm }}</div>
  107. </article>
  108. </footer>
  109. <!-- <footer class="footer"> -->
  110. <!-- <iframe src="http://122.237.98.3:8888/LvShanDaShuJu/page/map.html" frameborder="0" style="height: 100%; width:100%"></iframe> -->
  111. <!-- <Map></Map> -->
  112. <!-- </footer> -->
  113. </div>
  114. <div class="right">
  115. <div class="right1">
  116. <E-Right1 style="height: 100%"></E-Right1>
  117. </div>
  118. <div class="right2">
  119. <E-Right2 style="height: 100%"></E-Right2>
  120. </div>
  121. <div class="right3">
  122. <E-Right3 style="height: 100%"></E-Right3>
  123. </div>
  124. </div>
  125. </div>
  126. <article class="dialog" v-if="showDialog">
  127. <h3>{{ dialogData.name }}</h3>
  128. <div class="container">
  129. <p v-for="item in dialogData.content" :key="item.name">
  130. {{ item }}
  131. </p>
  132. </div>
  133. </article>
  134. </div>
  135. </template>
  136. <script>
  137. import HyHeader from "@/components/HyHeader";
  138. import ELeft1 from "./charts/ELeft1";
  139. import ELeft2 from "./charts/ELeft2";
  140. import ELeft3 from "./charts/ELeft3";
  141. import ERight1 from "./charts/ERight1";
  142. import ERight2 from "./charts/ERight2";
  143. import ERight3 from "./charts/ERight3";
  144. import Map from "./charts/Map";
  145. export default {
  146. name: "LvShanXiang",
  147. data() {
  148. return {
  149. searchStr: "",
  150. isShowMain: true,
  151. sheepClan: {
  152. self: "",
  153. f: "",
  154. m: "",
  155. ff: "",
  156. fm: "",
  157. mf: "",
  158. mm: "",
  159. },
  160. showDialog: false,
  161. fieldInfo: {
  162. dr: {
  163. name: "长兴德睿生态农业开发有限公司",
  164. content: [
  165. "占地面积:200余亩",
  166. "羊舍数量:18幢",
  167. "建筑面积:13000㎡",
  168. "常年存栏:8500多只",
  169. "每年繁殖羔羊:10000多只",
  170. ],
  171. },
  172. ys: {
  173. name: "长兴永盛牧业有限公司",
  174. content: [
  175. "占地面积:200余亩",
  176. "羊舍数量:24幢",
  177. "建筑面积:9500㎡",
  178. "常年存栏:8000只",
  179. "预计年供应:30000只",
  180. ],
  181. },
  182. },
  183. dialogData: { name: "", content: [] },
  184. };
  185. },
  186. components: {
  187. HyHeader,
  188. ELeft1,
  189. ELeft2,
  190. ELeft3,
  191. ERight1,
  192. ERight2,
  193. ERight3,
  194. Map,
  195. },
  196. created() {
  197. document.title = "吕山牧场";
  198. },
  199. methods: {
  200. search() {
  201. console.log(this.searchStr);
  202. if (!this.searchStr) {
  203. confirm("请输入羊只编号!");
  204. return;
  205. }
  206. // if (this.searchStr) {
  207. // this.sheepClan = {
  208. // self: "044782",
  209. // f: "037845",
  210. // m: "036589",
  211. // ff: "023584",
  212. // fm: "027584",
  213. // mf: "022546",
  214. // mm: "024246",
  215. // };
  216. // }
  217. switch (this.searchStr) {
  218. case '045472':
  219. this.sheepClan = {
  220. self: "045472",
  221. f: "034055",
  222. m: "034458",
  223. ff: "026044",
  224. fm: "025487",
  225. mf: "022487",
  226. mm: "021547",
  227. };
  228. break;
  229. case '045713':
  230. this.sheepClan = {
  231. self: "045713",
  232. f: "032487",
  233. m: "035482",
  234. ff: "026544",
  235. fm: "029272",
  236. mf: "022478",
  237. mm: "020247",
  238. };
  239. break;
  240. case '048004':
  241. this.sheepClan = {
  242. self: "048004",
  243. f: "030158",
  244. m: "035648",
  245. ff: "021248",
  246. fm: "020545",
  247. mf: "022178",
  248. mm: "025761",
  249. };
  250. break;
  251. case '046845':
  252. this.sheepClan = {
  253. self: "046845",
  254. f: "033578",
  255. m: "037896",
  256. ff: "021567",
  257. fm: "024598",
  258. mf: "021597",
  259. mm: "021598",
  260. };
  261. break;
  262. case '043975':
  263. this.sheepClan = {
  264. self: "043975",
  265. f: "034862",
  266. m: "031597",
  267. ff: "024872",
  268. fm: "028944",
  269. mf: "027865",
  270. mm: "025568",
  271. };
  272. break;
  273. default: confirm("请输入正确的羊只编号!");
  274. }
  275. console.log("search");
  276. this.isShowMain = false;
  277. },
  278. clickPoint(v) {
  279. this.showDialog = !this.showDialog;
  280. this.dialogData = this.fieldInfo[v];
  281. },
  282. qita() {
  283. this.isShowMain = true;
  284. this.showDialog = false;
  285. },
  286. },
  287. };
  288. </script>
  289. <style lang="scss" scope>
  290. .LvShanXiang {
  291. background-image: url(../../assets/bg.png);
  292. background-size: 100% 100%;
  293. background-repeat: no-repeat;
  294. box-sizing: border-box;
  295. // border: 1px solid #f52424;
  296. height: 100%;
  297. display: flex;
  298. flex-direction: column;
  299. > .warp {
  300. // border: 1px solid #ffee00;
  301. height: 100%;
  302. display: flex;
  303. .left {
  304. // border: 1px solid #2b65e0;
  305. width: 20%;
  306. display: flex;
  307. flex-direction: column;
  308. > .left1 {
  309. // border: 1px solid #8bdd77;
  310. height: 33.33%;
  311. }
  312. > .left2 {
  313. // border: 1px solid #ddad77;
  314. height: 33.33%;
  315. }
  316. > .left3 {
  317. // border: 1px solid #8bdd77;
  318. height: 33.33%;
  319. }
  320. }
  321. > .middle {
  322. width: 60%;
  323. min-width: 1600px;
  324. display: flex;
  325. flex-direction: column;
  326. align-items: center;
  327. > .section {
  328. width: 92%;
  329. .warp {
  330. display: flex;
  331. justify-content: space-around;
  332. .item {
  333. border-radius: 20px;
  334. height: 90px;
  335. min-width: 450px;
  336. border: 4px solid #53bafd;
  337. box-sizing: border-box;
  338. flex: 1 0 20%;
  339. margin: 20px 3%;
  340. padding: 10px 10px 10px 10px;
  341. font-size: 35px;
  342. font-weight: 600;
  343. display: flex;
  344. justify-content: center;
  345. align-items: center;
  346. .title {
  347. color: #fff;
  348. }
  349. .num {
  350. color: #53bafd;
  351. font-size: 1.2em;
  352. }
  353. .unit {
  354. color: #53bafd;
  355. font-size: 20px;
  356. margin-left: 15px;
  357. }
  358. }
  359. }
  360. }
  361. > .footer {
  362. // border: 1px solid #8877dd;
  363. width: 92%;
  364. flex-grow: 1;
  365. margin: 80px 0;
  366. display: flex;
  367. justify-content: center;
  368. align-items: center;
  369. position: relative;
  370. transition: all 1s ease;
  371. > .inputWrap {
  372. position: absolute;
  373. left: 0;
  374. top: 0;
  375. width: 500px;
  376. height: 80px;
  377. display: flex;
  378. align-items: center;
  379. font-size: 60px;
  380. color: #fff;
  381. border: 2px solid #797979;
  382. border-radius: 10px;
  383. background-color: #0e93b2;
  384. > .input {
  385. width: 200px;
  386. flex-grow: 1;
  387. font-size: 60px;
  388. color: rgb(29, 68, 65);
  389. padding-left: 20px;
  390. background: none;
  391. // outline: none;
  392. border: none;
  393. &:focus {
  394. // border: 4px solid #797979;
  395. background: none;
  396. outline: none;
  397. }
  398. }
  399. > .icon_search {
  400. position: absolute;
  401. right: 10px;
  402. width: 60px;
  403. height: 60px;
  404. background: url(../../assets/search.png) no-repeat;
  405. background-size: contain;
  406. }
  407. }
  408. > .bg_map {
  409. height: 80%;
  410. width: 70%;
  411. -webkit-user-select: none;
  412. -moz-user-select: none;
  413. -ms-user-select: none;
  414. user-select: none;
  415. }
  416. .point {
  417. position: absolute;
  418. > .warp {
  419. flex-basis: 1;
  420. display: flex;
  421. justify-content: center;
  422. align-items: center;
  423. border: 6px solid #2793d1;
  424. border-radius: 50%;
  425. box-sizing: border-box;
  426. animation: animation_warp 2s 0.2s infinite alternate;
  427. > .middle {
  428. display: flex;
  429. justify-content: center;
  430. align-items: center;
  431. position: absolute;
  432. box-sizing: border-box;
  433. border: 6px solid #2793d1;
  434. border-radius: 50%;
  435. animation: animation_middle 2s 0.2s infinite
  436. alternate;
  437. .center {
  438. position: absolute;
  439. display: inline-block;
  440. width: 20px;
  441. height: 20px;
  442. box-sizing: border-box;
  443. background-color: #2793d1;
  444. border-radius: 50%;
  445. animation: animation_center 2s 0.2s infinite;
  446. }
  447. }
  448. }
  449. @keyframes animation_warp {
  450. 0% {
  451. width: 140px;
  452. height: 140px;
  453. }
  454. 100% {
  455. width: 50px;
  456. height: 50px;
  457. transform: translate(45px, 45px);
  458. border: 6px solid transparent;
  459. }
  460. }
  461. @keyframes animation_middle {
  462. 0% {
  463. width: 50px;
  464. height: 50px;
  465. border: 6px solid transparent;
  466. }
  467. 100% {
  468. width: 140px;
  469. height: 140px;
  470. }
  471. }
  472. @keyframes animation_center {
  473. 0% {
  474. background-color: transparent;
  475. }
  476. 100% {
  477. background-color: #2793d1;
  478. }
  479. }
  480. }
  481. // > .p1 {
  482. // left: 50%;
  483. // top: 25%;
  484. // }
  485. // > .p2 {
  486. // left: 60%;
  487. // top: 45%;
  488. // }
  489. // > .p3 {
  490. // left: 35%;
  491. // top: 60%;
  492. // }
  493. > .p1 {
  494. left: 33%;
  495. top: 57%;
  496. }
  497. > .p2 {
  498. left: 55%;
  499. top: 45%;
  500. // z-index: 1;
  501. }
  502. > .icon_pasture_1 {
  503. position: absolute;
  504. // left: 29%;
  505. // top: 64%;
  506. left: 27%;
  507. top: 57%;
  508. text-align: center;
  509. > img {
  510. width: 80px;
  511. }
  512. > h3 {
  513. color: #fff;
  514. font-size: 30px;
  515. }
  516. }
  517. > .icon_pasture_2 {
  518. position: absolute;
  519. text-align: center;
  520. // left: 54.6%;
  521. // top: 51.7%;
  522. left: 55%;
  523. top: 48%;
  524. > img {
  525. width: 80px;
  526. }
  527. > h3 {
  528. color: #fff;
  529. font-size: 30px;
  530. }
  531. }
  532. }
  533. > .footer_2 {
  534. // border: 1px solid #8bdd77;
  535. width: 88%;
  536. margin-top: 30px;
  537. flex-grow: 1;
  538. box-sizing: border-box;
  539. // transition: all 3s ease;
  540. display: flex;
  541. flex-direction: column;
  542. > h1 {
  543. color: #fff;
  544. font-size: 60px;
  545. }
  546. > .tree {
  547. // border: 1px solid #9277dd;
  548. flex-grow: 1;
  549. width: 95%;
  550. margin: 3% auto;
  551. background: url(../../assets/tree.png) no-repeat center;
  552. background-size: 100% 100%;
  553. position: relative;
  554. font-size: 60px;
  555. font-weight: 600;
  556. color: #fff;
  557. > div {
  558. // border: 1px solid #dd7796;
  559. position: absolute;
  560. width: 22%;
  561. text-align: center;
  562. overflow: hidden;
  563. text-overflow: ellipsis;
  564. white-space: nowrap;
  565. }
  566. > .self {
  567. left: 5%;
  568. top: 50%;
  569. }
  570. > .f {
  571. left: 34.5%;
  572. top: 36.4%;
  573. }
  574. > .m {
  575. left: 34.5%;
  576. top: 60.9%;
  577. }
  578. > .ff {
  579. left: 71.4%;
  580. top: 9%;
  581. }
  582. > .fm {
  583. left: 71.4%;
  584. top: 36.4%;
  585. }
  586. > .mf {
  587. left: 71.4%;
  588. top: 60.9%;
  589. }
  590. > .mm {
  591. left: 71.4%;
  592. top: 85.6%;
  593. }
  594. }
  595. }
  596. }
  597. .right {
  598. // border: 1px solid #2b65e0;
  599. width: 20%;
  600. > .right1 {
  601. // border: 1px solid #8bdd77;
  602. height: 33.33%;
  603. }
  604. > .right2 {
  605. // border: 1px solid #ddad77;
  606. height: 33.33%;
  607. }
  608. > .right3 {
  609. // border: 1px solid #8bdd77;
  610. height: 33.33%;
  611. }
  612. }
  613. }
  614. }
  615. .dialog {
  616. // border: 1px solid #8bdd77;
  617. min-width: 500px;
  618. min-height: 300px;
  619. position: fixed;
  620. left: 50%;
  621. top: 30%;
  622. transform: translate(-50%, 0);
  623. background-color: #203c7a;
  624. background-image: linear-gradient(30deg, #0c1c46, #27428b);
  625. // background-image: radial-gradient(#203c7a 60%, #277AEB);
  626. box-shadow: 0px 0px 50px #454991;
  627. border-radius: 25px;
  628. overflow: hidden;
  629. box-sizing: border-box;
  630. // padding: 30px;
  631. color: #fff;
  632. > h3 {
  633. font-size: 50px;
  634. text-align: center;
  635. background-color: #207bc4;
  636. padding: 15px 30px 15px 30px;
  637. }
  638. > .container {
  639. font-size: 40px;
  640. margin: 20px 30px;
  641. }
  642. }
  643. </style>