Butcher.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. <template>
  2. <div class="Butcher" @click="isShowMap = true">
  3. <header>
  4. <!-- <h1 class="title">湖羊全产业链数字化管理系统</h1> -->
  5. <hy-header :navTag="1"></hy-header>
  6. </header>
  7. <section>
  8. <aside class="left">
  9. <article class="left_1">
  10. <h3>市场行情</h3>
  11. <table class="table">
  12. <tr>
  13. <th>产品</th>
  14. <th>价格</th>
  15. <th>市场</th>
  16. </tr>
  17. <tr v-for="item in sheepPriceList" :key="item.site">
  18. <td>{{ item.description }}</td>
  19. <td>
  20. {{ item.price }}元/公斤
  21. <b v-if="item.isRise" style="color: #00ca01"
  22. >▲</b
  23. >
  24. <b v-else style="color: red">▼</b>
  25. </td>
  26. <td>{{ item.site }}</td>
  27. </tr>
  28. </table>
  29. </article>
  30. <article class="left_2">
  31. <h3>市场行情</h3>
  32. <E-Left1 style="height: 100%"></E-Left1>
  33. </article>
  34. <article class="left_3">
  35. <h3>长兴县销售情况</h3>
  36. <E-Left2 style="height: 100%"></E-Left2>
  37. </article>
  38. </aside>
  39. <div class="center">
  40. <div class="top">
  41. <article class="upper">
  42. <div class="date">
  43. {{
  44. `${new Date().getFullYear()}-${
  45. new Date().getMonth() + 1
  46. }-${new Date().getDate()}`
  47. }}
  48. </div>
  49. <div class="title">首 页</div>
  50. <img class="icon" src="../../assets/chilun.png" />
  51. </article>
  52. <article class="mid">
  53. <div class="warp">
  54. <div class="item">
  55. <div>
  56. <span class="title">总存栏量:</span>
  57. <span class="num">10534</span>
  58. <span class="unit">只</span>
  59. </div>
  60. </div>
  61. <div class="item">
  62. <div>
  63. <span class="title">昨日屠宰数:</span>
  64. <span class="num">1534</span>
  65. <span class="unit">只</span>
  66. </div>
  67. </div>
  68. <div class="item">
  69. <div>
  70. <span class="title">检疫合格率:</span>
  71. <span class="num">94.2</span>
  72. <span class="unit">%</span>
  73. </div>
  74. </div>
  75. </div>
  76. </article>
  77. <article class="mapContainer" v-if="isShowMap">
  78. <E-Map style="height: 100%" @e-click="eClick"></E-Map>
  79. </article>
  80. <article class="lower" v-else>
  81. <main class="inputWrap" @click.stop>
  82. <input
  83. type="text"
  84. class="input"
  85. v-model.number="searchStr"
  86. />
  87. <i class="icon_search" @click="search"></i>
  88. </main>
  89. <div class="container">
  90. <div
  91. v-for="(item, index) in retrospectInfo"
  92. :key="index"
  93. :class="'item_' + (index + 1)"
  94. >
  95. <h3>{{ item.title }}</h3>
  96. <div
  97. class="row"
  98. v-for="(item1, index1) in item.list"
  99. :key="index1"
  100. >
  101. {{ item1 }}
  102. </div>
  103. </div>
  104. <span
  105. v-for="(item, index) in retrospectInfo"
  106. :key="item.title"
  107. :class="'time_' + (index + 1)"
  108. >{{ item.time }}</span
  109. >
  110. </div>
  111. </article>
  112. </div>
  113. <div class="bottom">
  114. <article>
  115. <E-Bottom1 style="height: 100%"></E-Bottom1>
  116. </article>
  117. <article>
  118. <E-Bottom2 style="height: 100%"></E-Bottom2>
  119. </article>
  120. <article>
  121. <E-Bottom3 style="height: 100%"></E-Bottom3>
  122. </article>
  123. </div>
  124. </div>
  125. <aside class="right">
  126. <article class="right_1">
  127. <h3>产品运输任务</h3>
  128. <E-Right1 style="height: 100%"></E-Right1>
  129. </article>
  130. <article class="right_2">
  131. <h3>屠宰采购来源</h3>
  132. <!-- cellspacing="0px" -->
  133. <table class="table">
  134. <tr>
  135. <th>羊只</th>
  136. <th>来源地</th>
  137. </tr>
  138. <tr v-for="item in 8" :key="item" class="row">
  139. <td style="width: 30%">{{ 12457 + item }}</td>
  140. <td>湖州市长兴县吕山乡</td>
  141. </tr>
  142. </table>
  143. </article>
  144. <article class="right_3">
  145. <h3>屠宰销售去向</h3>
  146. <table class="table">
  147. <tr>
  148. <th>羊只</th>
  149. <th>去向</th>
  150. </tr>
  151. <tr v-for="item in 8" :key="item" class="row">
  152. <td style="width: 30%">{{ 11457 + item }}</td>
  153. <td>安徽</td>
  154. </tr>
  155. </table>
  156. </article>
  157. </aside>
  158. </section>
  159. </div>
  160. </template>
  161. <script>
  162. import HyHeader from "@/components/HyHeader";
  163. import ELeft1 from "./charts/ELeft1";
  164. import ELeft2 from "./charts/ELeft2";
  165. import ERight1 from "./charts/ERight1";
  166. import EBottom1 from "./charts/EBottom1";
  167. import EBottom2 from "./charts/EBottom2";
  168. import EBottom3 from "./charts/EBottom3";
  169. import EMap from "./charts/EMap";
  170. export default {
  171. name: "Butcher",
  172. components: {
  173. HyHeader,
  174. ELeft1,
  175. ELeft2,
  176. ERight1,
  177. EBottom1,
  178. EBottom2,
  179. EBottom3,
  180. EMap,
  181. },
  182. data() {
  183. return {
  184. searchStr: "00008",
  185. isShowMap: true,
  186. sheepPriceList: [
  187. {
  188. description: "肉羊",
  189. price: "32.5",
  190. site: "长兴",
  191. isRise: true,
  192. },
  193. {
  194. description: "肉羊",
  195. price: "32.5",
  196. site: "杭州",
  197. isRise: true,
  198. },
  199. {
  200. description: "肉羊",
  201. price: "33",
  202. site: "金华",
  203. isRise: true,
  204. },
  205. {
  206. description: "肉羊",
  207. price: "32.5",
  208. site: "苏州",
  209. isRise: false,
  210. },
  211. {
  212. description: "肉羊",
  213. price: "31",
  214. site: "安徽",
  215. isRise: false,
  216. },
  217. {
  218. description: "肉羊",
  219. price: "31",
  220. site: "湖南",
  221. isRise: true,
  222. },
  223. {
  224. description: "肉羊",
  225. price: "32",
  226. site: "江西",
  227. isRise: true,
  228. },
  229. {
  230. description: "肉羊",
  231. price: "29",
  232. site: "内蒙古",
  233. isRise: true,
  234. },
  235. ],
  236. retrospectInfo: [],
  237. retrospectInfo1: [
  238. {
  239. title: "收购",
  240. list: [
  241. "来源:永盛牧场",
  242. "收购重量:50kg",
  243. "收购时间:11月30日",
  244. ],
  245. time: "11月30日",
  246. },
  247. {
  248. title: "检疫",
  249. list: ["检疫结果:合格", "检疫时间:11月30日"],
  250. time: "11月30日",
  251. },
  252. {
  253. title: "屠宰",
  254. list: ["屠宰时间:11月30日"],
  255. time: "11月30日",
  256. },
  257. {
  258. title: "排酸",
  259. list: ["排酸时间:11月30日"],
  260. time: "11月30日",
  261. },
  262. {
  263. title: "分割",
  264. list: ["分割时间:11月30日"],
  265. time: "11月30日",
  266. },
  267. {
  268. title: "运输",
  269. list: ["运输单号:50kg", "目的地:杭州"],
  270. time: "11月30日",
  271. },
  272. ],
  273. retrospectInfo2: [
  274. {
  275. title: "收购",
  276. list: [
  277. "来源:永盛牧场",
  278. "收购重量:50kg",
  279. "收购时间:11月30日",
  280. ],
  281. time: "11月30日",
  282. },
  283. {
  284. title: "检疫",
  285. list: ["检疫结果:合格", "检疫时间:11月30日"],
  286. time: "11月30日",
  287. },
  288. {
  289. title: "屠宰",
  290. list: ["屠宰时间:11月30日"],
  291. time: "11月30日",
  292. },
  293. {
  294. title: "排酸",
  295. list: ["排酸时间:11月30日"],
  296. time: "11月30日",
  297. },
  298. {
  299. title: "入库",
  300. list: ["入库时间:11月30日"],
  301. time: "11月30日",
  302. },
  303. {
  304. title: "运输",
  305. list: ["运输单号:50kg", "目的地:杭州"],
  306. time: "11月30日",
  307. },
  308. ],
  309. };
  310. },
  311. created() {
  312. document.title = "湖羊产业";
  313. if (Math.floor(Math.random()*10) % 2 == 0) {
  314. this.retrospectInfo = this.retrospectInfo1;
  315. } else {
  316. this.retrospectInfo = this.retrospectInfo2;
  317. }
  318. },
  319. methods: {
  320. search() {
  321. console.log(Math.floor(Math.random()*10));
  322. if (this.searchStr % 2 == 0) {
  323. this.retrospectInfo = this.retrospectInfo1;
  324. } else {
  325. this.retrospectInfo = this.retrospectInfo2;
  326. }
  327. },
  328. eClick(params) {
  329. console.log(params)
  330. this.isShowMap = false
  331. }
  332. },
  333. };
  334. </script>
  335. <style lang="scss" scope>
  336. .Butcher {
  337. background-image: url(../../assets/bg.png);
  338. background-size: 100% 100%;
  339. background-repeat: no-repeat;
  340. height: 100%;
  341. display: flex;
  342. flex-direction: column;
  343. overflow: hidden;
  344. > section {
  345. flex-grow: 1;
  346. display: flex;
  347. > aside {
  348. display: flex;
  349. flex-direction: column;
  350. justify-content: space-between;
  351. > article {
  352. height: 31%;
  353. background-image: url(../../assets/download.png);
  354. background-size: 100% 100%;
  355. background-repeat: no-repeat;
  356. > h3 {
  357. color: #fff;
  358. font-size: 25px;
  359. margin-left: 12%;
  360. margin-top: 13px;
  361. display: flex;
  362. align-items: center;
  363. &:before {
  364. content: "";
  365. display: inline-block;
  366. height: 25px;
  367. width: 25px;
  368. margin-right: 50px;
  369. background-color: #fff;
  370. }
  371. }
  372. }
  373. }
  374. > .left {
  375. width: 19.8%;
  376. // border: 1px solid rgb(218, 99, 99);
  377. display: flex;
  378. flex-direction: column;
  379. > .left_1,
  380. .left_2,
  381. .left_3 {
  382. min-width: 600px;
  383. }
  384. > .left_1 {
  385. overflow: hidden;
  386. > .table {
  387. color: #fff;
  388. font-size: 30px;
  389. margin: 20px;
  390. width: 100%;
  391. text-align: center;
  392. }
  393. }
  394. }
  395. > .center {
  396. width: 60.4%;
  397. min-width: 1600px;
  398. // border: 1px solid rgb(163, 147, 58);
  399. display: flex;
  400. flex-direction: column;
  401. > .top {
  402. height: 72%;
  403. // border: 1px solid rgb(62, 58, 128);
  404. display: flex;
  405. flex-direction: column;
  406. .upper {
  407. font-size: 40px;
  408. color: #fff;
  409. display: flex;
  410. justify-content: space-around;
  411. margin: 20px 3%;
  412. // .date {}
  413. .title {
  414. flex-grow: 1;
  415. text-align: center;
  416. display: flex;
  417. align-items: center;
  418. &::before {
  419. content: "";
  420. border: 1px solid #4b81ec;
  421. box-sizing: border-box;
  422. height: 0px;
  423. flex-grow: 1;
  424. margin: 0 50px;
  425. }
  426. &::after {
  427. content: "";
  428. border: 1px solid #4b81ec;
  429. box-sizing: border-box;
  430. height: 0px;
  431. flex-grow: 1;
  432. margin: 0 50px;
  433. }
  434. }
  435. .icon {
  436. width: 50px;
  437. height: 50px;
  438. }
  439. }
  440. .mid {
  441. > .warp {
  442. display: flex;
  443. justify-content: space-around;
  444. margin: 20px 5%;
  445. .item {
  446. border-radius: 20px;
  447. height: 90px;
  448. min-width: 400px;
  449. box-sizing: border-box;
  450. border: 4px solid #53bafd;
  451. flex: 1 0 20%;
  452. margin: 20px 3%;
  453. padding: 10px 10px 10px 10px;
  454. font-size: 35px;
  455. font-weight: 600;
  456. display: flex;
  457. justify-content: center;
  458. align-items: center;
  459. .title {
  460. color: #fff;
  461. }
  462. .num {
  463. color: #53bafd;
  464. font-size: 1.2em;
  465. }
  466. .unit {
  467. color: #53bafd;
  468. font-size: 20px;
  469. margin-left: 15px;
  470. }
  471. }
  472. }
  473. }
  474. .lower {
  475. min-height: 800px;
  476. flex-grow: 1;
  477. display: flex;
  478. flex-direction: column;
  479. margin: 0 3% 1.5% 3%;
  480. color: #fff;
  481. font-size: 30px;
  482. font-weight: 600;
  483. position: relative;
  484. > .inputWrap {
  485. width: 700px;
  486. height: 80px;
  487. display: flex;
  488. align-items: center;
  489. font-size: 60px;
  490. color: #fff;
  491. box-sizing: border-box;
  492. border: 2px solid #797979;
  493. border-radius: 10px;
  494. background-color: #0e93b2;
  495. position: relative;
  496. > .input {
  497. width: 200px;
  498. flex-grow: 1;
  499. font-size: 60px;
  500. color: #fff;
  501. padding-left: 20px;
  502. background: none;
  503. // outline: none;
  504. border: none;
  505. &:focus {
  506. // border: 4px solid #797979;
  507. background: none;
  508. outline: none;
  509. }
  510. }
  511. > .icon_search {
  512. position: absolute;
  513. right: 10px;
  514. width: 60px;
  515. height: 60px;
  516. background: url(../../assets/search.png) no-repeat;
  517. background-size: contain;
  518. }
  519. }
  520. > .container {
  521. position: relative;
  522. // border: 1px solid #797979;
  523. margin: 80px 0;
  524. flex-grow: 1;
  525. background: url(../../assets/bg_main.png) no-repeat;
  526. background-size: 100% 100%;
  527. > div {
  528. // border: 1px solid rgb(243, 14, 14);
  529. display: inline-block;
  530. width: 15.1%;
  531. height: 27.3%;
  532. box-sizing: border-box;
  533. position: absolute;
  534. color: #333333;
  535. > h3 {
  536. text-align: center;
  537. }
  538. > .row {
  539. font-weight: normal;
  540. font-size: 25px;
  541. overflow: hidden;
  542. white-space: nowrap;
  543. text-overflow: ellipsis;
  544. }
  545. }
  546. > .item_1 {
  547. left: 0.7%;
  548. top: 4.7%;
  549. }
  550. > .item_2 {
  551. left: 13.2%;
  552. top: 69%;
  553. }
  554. > .item_3 {
  555. left: 27.3%;
  556. top: 5.5%;
  557. }
  558. > .item_4 {
  559. left: 40.4%;
  560. top: 69.3%;
  561. }
  562. > .item_5 {
  563. left: 64.3%;
  564. top: 5.4%;
  565. }
  566. > .item_6 {
  567. left: 79.8%;
  568. top: 68.9%;
  569. }
  570. > span {
  571. font-size: 35px;
  572. position: absolute;
  573. }
  574. > .time_1 {
  575. left: 5.2%;
  576. top: 57%;
  577. }
  578. > .time_2 {
  579. left: 18.3%;
  580. top: 37%;
  581. }
  582. > .time_3 {
  583. left: 32%;
  584. top: 57%;
  585. }
  586. > .time_4 {
  587. left: 45.6%;
  588. top: 37%;
  589. }
  590. > .time_5 {
  591. left: 69.1%;
  592. top: 57%;
  593. }
  594. > .time_6 {
  595. left: 84.7%;
  596. top: 37%;
  597. }
  598. }
  599. }
  600. .mapContainer {
  601. flex-grow: 1;
  602. }
  603. }
  604. > .bottom {
  605. height: 28%;
  606. // border: 1px solid rgb(23, 131, 116);
  607. display: flex;
  608. justify-content: space-between;
  609. > article {
  610. width: 33%;
  611. }
  612. }
  613. }
  614. > .right {
  615. width: 19.8%;
  616. // border: 1px solid rgb(61, 197, 179);
  617. display: flex;
  618. flex-direction: column;
  619. justify-content: space-between;
  620. > .right_2,
  621. > .right_3 {
  622. overflow: hidden;
  623. > .table {
  624. color: #fff;
  625. font-size: 30px;
  626. margin: 20px;
  627. width: 96%;
  628. text-align: center;
  629. .row {
  630. background-color: #006666ee;
  631. }
  632. }
  633. }
  634. }
  635. }
  636. }
  637. </style>