report.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095
  1. <template>
  2. <view class="content">
  3. <view class="content1">
  4. <u-navbar back-text="" title="数据统计" :border-bottom='false' :background="background" back-icon-color='white'
  5. title-color='white'>
  6. </u-navbar>
  7. <view class="row2">
  8. <view class="left" @click="dateClick">
  9. {{nowDate}}
  10. <u-icon name="arrow-down-fill" size="16" class="icon"></u-icon>
  11. </view>
  12. <view class="right">
  13. <view :class="typeSelect==index?'type-bgc':''" class="type-style" v-for="(item,index) in moneyList"
  14. @click="typeClick(index)">
  15. {{item.name}}
  16. </view>
  17. </view>
  18. </view>
  19. <view class="row3">
  20. <view class="title">
  21. 总收入
  22. </view>
  23. <view class="number">
  24. 核算中
  25. </view>
  26. </view>
  27. </view>
  28. <view class="move-content">
  29. <view class="content2 content-wrap">
  30. <view class="row1">
  31. <view class="left title">
  32. 合同完成进度
  33. </view>
  34. <view class="right">
  35. <view class="item" :class="contractSelect=='0'?'item-Select':''" @click="htClick(0)">采购</view>
  36. <view class="item" :class="contractSelect=='1'?'item-Select':''" @click="htClick(1)">销售</view>
  37. </view>
  38. </view>
  39. <u-line color="#EEEEEE" class="u-line" />
  40. <view class="row2" @click="goToPage(1)">
  41. <view class="top">
  42. 合同总量
  43. </view>
  44. <view class="bottom">
  45. <view class="left">
  46. <image src="../../static/img/report/hetongzongliang.png" mode=""></image>
  47. </view>
  48. <view class="right" v-if="contractSelect=='0'">
  49. <view class="top">
  50. <view class="left">
  51. 已完成量
  52. <view class="number">{{dataObj3.percentage}}</view>
  53. </view>
  54. <view class="right-number">{{dataObj3.total}}吨</view>
  55. </view>
  56. <view class="bottom">
  57. <u-line-progress height="12" active-color="#22C572" :show-percent="false"
  58. :striped="true" :percent="dataObj3.percent" :striped-active="true">
  59. </u-line-progress>
  60. </view>
  61. </view>
  62. <view class="right" v-if="contractSelect=='1'">
  63. <view class="top">
  64. <view class="left">
  65. 已完成量
  66. <view class="number">{{dataObj0.percentage}}</view>
  67. </view>
  68. <view class="right-number">{{dataObj0.total}}吨</view>
  69. </view>
  70. <view class="bottom">
  71. <u-line-progress height="12" active-color="#22C572" :show-percent="false"
  72. :striped="true" :percent="dataObj0.percent" :striped-active="true">
  73. </u-line-progress>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. <view class="row3" @click="goToPage(2)">
  79. <view class="top">
  80. 合同总额
  81. </view>
  82. <view class="bottom">
  83. <view class="left">
  84. <image src="../../static/img/report/kaipiao.png" mode=""></image>
  85. </view>
  86. <view class="right" v-if="contractSelect=='0'">
  87. <view class="top">
  88. <view class="left">
  89. 已开票
  90. <view class="number">{{dataObj4.percentage}}</view>
  91. </view>
  92. <view class="right-number">¥{{dataObj4.total}}</view>
  93. </view>
  94. <view class="bottom">
  95. <u-line-progress height="12" active-color="#FD714F" :show-percent="false"
  96. :striped="true" :percent="dataObj4.percent" :striped-active="true">
  97. </u-line-progress>
  98. </view>
  99. </view>
  100. <view class="right" v-if="contractSelect=='1'">
  101. <view class="top">
  102. <view class="left">
  103. 已开票
  104. <view class="number">{{dataObj1.percentage}}</view>
  105. </view>
  106. <view class="right-number">¥{{dataObj1.total}}</view>
  107. </view>
  108. <view class="bottom">
  109. <u-line-progress height="12" active-color="#FD714F" :show-percent="false"
  110. :striped="true" :percent="dataObj1.percent" :striped-active="true">
  111. </u-line-progress>
  112. </view>
  113. </view>
  114. </view>
  115. </view>
  116. <view class="row4" @click="goToPage(3)">
  117. <view class="top">
  118. 合同总额
  119. </view>
  120. <view class="bottom">
  121. <view class="left">
  122. <image src="../../static/img/report/hetongzongliang.png" mode=""></image>
  123. </view>
  124. <view class="right" v-if="contractSelect=='0'">
  125. <view class="top">
  126. <view class="left">
  127. 已结算
  128. <view class="number">{{dataObj5.percentage}}</view>
  129. </view>
  130. <view class="right-number">¥{{dataObj5.total}}</view>
  131. </view>
  132. <view class="bottom">
  133. <u-line-progress height="12" active-color="#5C75DF" :show-percent="false"
  134. :striped="true" :percent="dataObj5.percent" :striped-active="true">
  135. </u-line-progress>
  136. </view>
  137. </view>
  138. <view class="right" v-if="contractSelect=='1'">
  139. <view class="top">
  140. <view class="left">
  141. 已结算
  142. <view class="number">{{dataObj2.percentage}}</view>
  143. </view>
  144. <view class="right-number">¥{{dataObj5.total}}</view>
  145. </view>
  146. <view class="bottom">
  147. <u-line-progress height="12" active-color="#5C75DF" :show-percent="false"
  148. :striped="true" :percent="dataObj5.percent" :striped-active="true">
  149. </u-line-progress>
  150. </view>
  151. </view>
  152. </view>
  153. </view>
  154. </view>
  155. <view class="content3 content-wrap">
  156. <view class="title" @click="goToPage(4)">粮食品种占比</view>
  157. <u-line color="#EEEEEE" class="u-line" />
  158. <qiun-data-charts type="line" class='line-chart' :chartData="chartData" :opts='zringoptions'
  159. background="none" :ontouch="true" />
  160. </view>
  161. <view class="content4 content-wrap">
  162. <view class="title">在途信息统计表</view>
  163. <u-line color="#EEEEEE" class="u-line" />
  164. <qiun-data-charts type="column" class='line-chart' :chartData="carChartData" :opts='ringoptions'
  165. background="none" />
  166. </view>
  167. <view class="content5 content-wrap" @click="goToPage(5)">
  168. <view class="title">库存头寸(吨)</view>
  169. <u-line color="#EEEEEE" class="u-line" />
  170. <view class="row1">
  171. <view class="left">
  172. <image src="../../static/img/report/kuncunliang.png" mode=""></image>
  173. <view class="text">
  174. 实际存量
  175. </view>
  176. </view>
  177. <view class="right">
  178. {{inventoryAct}}
  179. </view>
  180. </view>
  181. <view class="row2">
  182. <view class="left">
  183. <image src="../../static/img/report/jiazhi.png" mode=""></image>
  184. <view class="text">
  185. 采购待执行
  186. </view>
  187. </view>
  188. <view class="right">
  189. {{inventoryBuy}}
  190. </view>
  191. </view>
  192. <view class="row2">
  193. <view class="left">
  194. <image src="../../static/img/report/jiazhi.png" mode=""></image>
  195. <view class="text">
  196. 销售待执行
  197. </view>
  198. </view>
  199. <view class="right">
  200. {{inventorySale}}
  201. </view>
  202. </view>
  203. <view class="row2">
  204. <view class="left">
  205. <image src="../../static/img/report/jiazhi.png" mode=""></image>
  206. <view class="text">
  207. 头寸
  208. </view>
  209. </view>
  210. <view class="right">
  211. {{inventoryTC}}
  212. </view>
  213. </view>
  214. </view>
  215. <view class="content6 content-wrap">
  216. <view class="title">库点流向分布</view>
  217. <u-line color="#EEEEEE" class="u-line" />
  218. <iframe class='map' :src='url'></iframe>
  219. </view>
  220. <!-- <view class="content7">
  221. <maoScroll :data="ztList" :showNum="showNum" :lineHeight="lineHeight" :animationScroll="animationScroll"
  222. :animation="animation">
  223. <template v-slot="{line}">
  224. <view class="row1">
  225. <view class="zt">
  226. <view class="point"></view>在途
  227. </view>
  228. <view>{{line.startName}}</view>
  229. <img src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jiantou.png" alt="">
  230. <view class="">
  231. {{line.endName}}
  232. </view>
  233. </view>
  234. </template>
  235. </maoScroll>
  236. </view> -->
  237. <view class="content7">
  238. <view ref='scroll' class='scroll' :style="{'top':'-'+scrollTop+'px'}">
  239. <view class="row1" v-for="(item,index) in ztList">
  240. <view class="zt">
  241. <view class="point"></view>在途
  242. </view>
  243. <view>{{item.startName}}</view>
  244. <!-- <img src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jiantou.png" alt=""> -->
  245. <view class="">
  246. {{item.endName}}
  247. </view>
  248. </view>
  249. </view>
  250. </view>
  251. </view>
  252. <u-select v-model="showDate" mode="mutil-column" confirm-color='#22C572' :list="dateList" @confirm="confirm">
  253. </u-select>
  254. </view>
  255. </template>
  256. <script>
  257. import maoScroll from '@/components/mao-scroll/mao-scroll.vue';
  258. export default {
  259. components: {
  260. maoScroll
  261. },
  262. data() {
  263. return {
  264. scrollTop: 0,
  265. carInterval: null,
  266. inventoryAct: 0,
  267. inventoryBuy: 0,
  268. inventorySale: 0,
  269. inventoryTC: 0,
  270. contractSelect: '0',
  271. url: '',
  272. nowDate: '2022年全年',
  273. seachMoth: '2021',
  274. background: {
  275. backgroundColor: '#2E303A',
  276. },
  277. typeSelect: '0',
  278. contractSelect: '0',
  279. showDate: false,
  280. chartData: {},
  281. carChartData: {},
  282. carRingoptions: {},
  283. ringoptions: {},
  284. zringoptions: {},
  285. moneyList: [{
  286. name: '收入'
  287. }, {
  288. name: '支出'
  289. }, {
  290. name: '毛利润'
  291. }],
  292. dataList: [],
  293. dataObj0: {
  294. percentage: '',
  295. total: '',
  296. percentage: ''
  297. },
  298. dataObj1: {
  299. percentage: '',
  300. total: '',
  301. percentage: ''
  302. },
  303. dataObj2: {
  304. percentage: '',
  305. total: '',
  306. percentage: ''
  307. },
  308. dataObj3: {
  309. percentage: '',
  310. total: '',
  311. percentage: ''
  312. },
  313. dataObj4: {
  314. percentage: '',
  315. total: '',
  316. percentage: ''
  317. },
  318. dataObj5: {
  319. percentage: '',
  320. total: '',
  321. percentage: ''
  322. },
  323. dateList: [
  324. [{
  325. value: '1',
  326. label: '2021年'
  327. },
  328. {
  329. value: '2',
  330. label: '2022年'
  331. }
  332. ],
  333. [{
  334. value: '0',
  335. label: '全年'
  336. },
  337. {
  338. value: '01',
  339. label: '1月'
  340. },
  341. {
  342. value: '02',
  343. label: '2月'
  344. },
  345. {
  346. value: '03',
  347. label: '3月'
  348. },
  349. {
  350. value: '04',
  351. label: '4月'
  352. },
  353. {
  354. value: '05',
  355. label: '5月'
  356. },
  357. {
  358. value: '06',
  359. label: '6月'
  360. },
  361. {
  362. value: '07',
  363. label: '7月'
  364. },
  365. {
  366. value: '08',
  367. label: '8月'
  368. },
  369. {
  370. value: '09',
  371. label: '9月'
  372. },
  373. {
  374. value: '10',
  375. label: '10月'
  376. },
  377. {
  378. value: '11',
  379. label: '11月'
  380. },
  381. {
  382. value: '12',
  383. label: '12月'
  384. },
  385. ]
  386. ],
  387. ztList: [],
  388. showNum: 8,
  389. lineHeight: 80,
  390. animationScroll: 5000,
  391. animation: 0,
  392. }
  393. },
  394. onLoad: function(option) {
  395. uni.showLoading({
  396. title: "数据加载中...",
  397. mask: true
  398. })
  399. if (this.nowDate == '2022年全年') {
  400. this.seachMoth = '2022'
  401. }
  402. this.init()
  403. },
  404. destroyed() {
  405. clearInterval(this.carInterval)
  406. },
  407. onUnload() {
  408. clearInterval(this.carInterval)
  409. },
  410. methods: {
  411. goToPage(index) {
  412. // console.log(index)
  413. if (index == 4) {
  414. uni.navigateTo({
  415. url: '/pages/user/contractLook/warehouseReserves'
  416. })
  417. return true
  418. } else if (index == 5) {
  419. uni.navigateTo({
  420. url: '/pages/user/contractLook/inventoryCost'
  421. })
  422. return true
  423. }
  424. if (this.contractSelect == '0') {
  425. uni.navigateTo({
  426. url: '/pages/user/contractLook/purchaseContract'
  427. })
  428. } else {
  429. uni.navigateTo({
  430. url: '/pages/user/contractLook/salesContract'
  431. })
  432. }
  433. },
  434. init() {
  435. this.url = "https://liangxin.zthymaoyi.com/map_0105.html?id=" + uni.getStorageSync('pcUserInfo').compId +
  436. '&seachMoth=' + this.seachMoth
  437. this.$api.doRequest('get', '/biInfoController/selectBiInfo?compId=' + uni.getStorageSync('pcUserInfo')
  438. .compId + '&seachMoth=' + this.seachMoth).then(res => {
  439. // console.log(res)
  440. uni.hideLoading()
  441. let _list = []
  442. this.dataList = res.data.data
  443. for (let i = 0; i < res.data.data.length; i++) {
  444. let _obj = {}
  445. let _color = []
  446. let _title = ""
  447. let _subtitle = ''
  448. let _name = ''
  449. let _count = ''
  450. let _data = []
  451. if (i < 6) {
  452. res.data.data[i].biViewInfoList[0].percent = Number(res.data.data[i].biViewInfoList[0]
  453. .percentage.substring(0, res.data.data[i].biViewInfoList[0].percentage.length -
  454. 1)).toFixed(2)
  455. res.data.data[i].biViewInfoList[0].percentage = Number(res.data.data[i].biViewInfoList[
  456. 0]
  457. .percentage.substring(0, res.data.data[i].biViewInfoList[0].percentage.length -
  458. 1)).toFixed(2) + '%'
  459. res.data.data[i].total = Number(res.data.data[i].total).toFixed(2)
  460. switch (i) {
  461. case 0:
  462. this.dataObj0 = {
  463. percentage: res.data.data[i].biViewInfoList[0].percentage,
  464. total: res.data.data[i].total,
  465. percent: Number(res.data.data[i].biViewInfoList[0].percent)
  466. }
  467. break;
  468. case 1:
  469. this.dataObj1 = {
  470. percentage: res.data.data[i].biViewInfoList[0].percentage,
  471. total: Number(res.data.data[i].total),
  472. percent: Number(res.data.data[i].biViewInfoList[0].percent)
  473. }
  474. break;
  475. case 2:
  476. this.dataObj2 = {
  477. percentage: res.data.data[i].biViewInfoList[0].percentage,
  478. total: Number(res.data.data[i].total),
  479. percent: Number(res.data.data[i].biViewInfoList[0].percent)
  480. }
  481. break;
  482. case 3:
  483. this.dataObj3 = {
  484. percentage: res.data.data[i].biViewInfoList[0].percentage,
  485. total: Number(res.data.data[i].total),
  486. percent: Number(res.data.data[i].biViewInfoList[0].percent)
  487. }
  488. break;
  489. case 4:
  490. this.dataObj4 = {
  491. percentage: res.data.data[i].biViewInfoList[0].percentage,
  492. total: Number(res.data.data[i].total),
  493. percent: Number(res.data.data[i].biViewInfoList[0].percent)
  494. }
  495. break;
  496. case 5:
  497. this.dataObj5 = {
  498. percentage: res.data.data[i].biViewInfoList[0].percentage,
  499. total: Number(res.data.data[i].total),
  500. percent: Number(res.data.data[i].biViewInfoList[0].percent)
  501. }
  502. break;
  503. }
  504. } else if (i == 6) {
  505. this.carCount1 = res.data.data[i].biViewInfoList[0].count
  506. this.carCount2 = res.data.data[i].biViewInfoList[1].count
  507. this.carCount3 = res.data.data[i].biViewInfoList[2].count
  508. let _x = []
  509. let _y = []
  510. for (let k = 0; k < res.data.data[i].biViewInfoList.length; k++) {
  511. _x.push(res.data.data[i].biViewInfoList[k].name)
  512. _y.push(Number(res.data.data[i].biViewInfoList[k].count))
  513. }
  514. this.carChartData = {
  515. categories: _x,
  516. series: [{
  517. "name": '车辆',
  518. "data": _y
  519. }]
  520. }
  521. this.ringoptions = {
  522. "type": "column",
  523. "canvasId": "",
  524. "canvas2d": false,
  525. "background": "none",
  526. "animation": true,
  527. "timing": "easeOut",
  528. "duration": 1000,
  529. "color": [
  530. "#22C572"
  531. ],
  532. "padding": [
  533. 15,
  534. 15,
  535. 0,
  536. 5
  537. ],
  538. "rotate": false,
  539. "errorReload": true,
  540. "fontSize": 13,
  541. "fontColor": "#666666",
  542. "enableScroll": false,
  543. "touchMoveLimit": 60,
  544. "enableMarkLine": false,
  545. "dataLabel": true,
  546. "dataPointShape": true,
  547. "dataPointShapeType": "solid",
  548. "tapLegend": true,
  549. "xAxis": {
  550. "disabled": false,
  551. "axisLine": false,
  552. "axisLineColor": "#CCCCCC",
  553. "calibration": false,
  554. "fontColor": "#666666",
  555. "fontSize": 13,
  556. "rotateLabel": false,
  557. "itemCount": 5,
  558. "boundaryGap": "center",
  559. "disableGrid": true,
  560. "gridColor": "#CCCCCC",
  561. "gridType": "solid",
  562. "dashLength": 4,
  563. "gridEval": 1,
  564. "scrollShow": false,
  565. "scrollAlign": "left",
  566. "scrollColor": "#A6A6A6",
  567. "scrollBackgroundColor": "#EFEBEF",
  568. "format": ""
  569. },
  570. "yAxis": {
  571. "disabled": true,
  572. "disableGrid": true,
  573. "splitNumber": 5,
  574. "gridType": "solid",
  575. "dashLength": 8,
  576. "gridColor": "#CCCCCC",
  577. "padding": 10,
  578. "showTitle": false,
  579. "data": []
  580. },
  581. "legend": {
  582. "show": false,
  583. "position": "bottom",
  584. "float": "center",
  585. "padding": 5,
  586. "margin": 5,
  587. "backgroundColor": "rgba(0,0,0,0)",
  588. "borderColor": "rgba(0,0,0,0)",
  589. "borderWidth": 0,
  590. "fontSize": 13,
  591. "fontColor": "#666666",
  592. "lineHeight": 11,
  593. "hiddenColor": "#CECECE",
  594. "itemGap": 10
  595. },
  596. "extra": {
  597. "column": {
  598. "type": "group",
  599. "width": 30,
  600. "seriesGap": 2,
  601. "categoryGap": 3,
  602. "barBorderCircle": true,
  603. "linearType": "none",
  604. "linearOpacity": 1,
  605. "colorStop": 0,
  606. "meterBorder": 1,
  607. "meterFillColor": "#FFFFFF",
  608. "activeBgColor": "#000000",
  609. "activeBgOpacity": 0.08,
  610. "meterBorde": 1
  611. },
  612. "tooltip": {
  613. "showBox": true,
  614. "showArrow": true,
  615. "showCategory": false,
  616. "borderWidth": 0,
  617. "borderRadius": 0,
  618. "borderColor": "#000000",
  619. "borderOpacity": 0.7,
  620. "bgColor": "#000000",
  621. "bgOpacity": 0.7,
  622. "gridType": "solid",
  623. "dashLength": 4,
  624. "gridColor": "#CCCCCC",
  625. "fontColor": "#FFFFFF",
  626. "splitLine": true,
  627. "horizentalLine": false,
  628. "xAxisLabel": false,
  629. "yAxisLabel": false,
  630. "labelBgColor": "#FFFFFF",
  631. "labelBgOpacity": 0.7,
  632. "labelFontColor": "#666666"
  633. },
  634. "markLine": {
  635. "type": "solid",
  636. "dashLength": 4,
  637. "data": []
  638. }
  639. }
  640. }
  641. } else if (i == 7) {
  642. this.inventoryAct = Number(res.data.data[i].biViewInfoList[0].count).toFixed(2)
  643. this.inventoryBuy = Number(res.data.data[i].biViewInfoList[1].count).toFixed(2)
  644. this.inventorySale = Number(res.data.data[i].biViewInfoList[2].count).toFixed(2)
  645. this.inventoryTC = Number(Number(this.inventoryAct)+Number(this.inventoryBuy)-Number(this.inventorySale)).toFixed(2)
  646. } else if (i == 8) {
  647. let _x = []
  648. let _y = []
  649. for (let k = 0; k < res.data.data[i].biViewInfoList.length; k++) {
  650. if(Number(res.data.data[i].biViewInfoList[k].count).toFixed(2) != 0){
  651. _x.push(res.data.data[i].biViewInfoList[k].name)
  652. _y.push(Number(res.data.data[i].biViewInfoList[k].count).toFixed(2))
  653. }
  654. }
  655. this.chartData = {
  656. categories: _x,
  657. series: [{
  658. "name": '储量',
  659. "data": _y
  660. }]
  661. }
  662. this.zringoptions = {
  663. "type": "line",
  664. "canvasId": "",
  665. "canvas2d": false,
  666. "background": "none",
  667. "animation": true,
  668. "timing": "easeOut",
  669. "duration": 1000,
  670. "color": [
  671. "#91CB74",
  672. ],
  673. "padding": [
  674. 15,
  675. 10,
  676. 0,
  677. 15
  678. ],
  679. "rotate": false,
  680. "errorReload": true,
  681. "fontSize": 13,
  682. "fontColor": "#666666",
  683. "enableScroll": true,
  684. "touchMoveLimit": 60,
  685. "enableMarkLine": true,
  686. "dataLabel": true,
  687. "dataPointShape": true,
  688. "dataPointShapeType": "hollow",
  689. "tapLegend": true,
  690. "xAxis": {
  691. "disabled": false,
  692. "axisLine": false,
  693. "axisLineColor": "#CCCCCC",
  694. "calibration": false,
  695. "fontColor": "#666666",
  696. "fontSize": 13,
  697. "rotateLabel": false,
  698. "itemCount": 4,
  699. "boundaryGap": "center",
  700. "disableGrid": false,
  701. "gridColor": "#CCCCCC",
  702. "gridType": "dash",
  703. "dashLength": 4,
  704. "gridEval": 1,
  705. "scrollShow": false,
  706. "scrollAlign": "left",
  707. "scrollColor": "#A6A6A6",
  708. "scrollBackgroundColor": "#EFEBEF",
  709. "format": ""
  710. },
  711. "yAxis": {
  712. "disabled": true,
  713. "disableGrid": true,
  714. "splitNumber": 5,
  715. "gridType": "dash",
  716. "dashLength": 2,
  717. "gridColor": "#CCCCCC",
  718. "padding": 10,
  719. "showTitle": false,
  720. "data": []
  721. },
  722. "legend": {
  723. "show": false,
  724. "position": "bottom",
  725. "float": "center",
  726. "padding": 5,
  727. "margin": 5,
  728. "backgroundColor": "rgba(0,0,0,0)",
  729. "borderColor": "rgba(0,0,0,0)",
  730. "borderWidth": 0,
  731. "fontSize": 13,
  732. "fontColor": "#666666",
  733. "lineHeight": 11,
  734. "hiddenColor": "#CECECE",
  735. "itemGap": 10
  736. },
  737. "extra": {
  738. "line": {
  739. "type": "straight",
  740. "width": 2
  741. },
  742. "tooltip": {
  743. "showBox": true,
  744. "showArrow": true,
  745. "showCategory": false,
  746. "borderWidth": 0,
  747. "borderRadius": 0,
  748. "borderColor": "#000000",
  749. "borderOpacity": 0.7,
  750. "bgColor": "#000000",
  751. "bgOpacity": 0.7,
  752. "gridType": "dash",
  753. "dashLength": 4,
  754. "gridColor": "#22C572",
  755. "fontColor": "#FFFFFF",
  756. "splitLine": true,
  757. "horizentalLine": false,
  758. "xAxisLabel": false,
  759. "yAxisLabel": false,
  760. "labelBgColor": "#FFFFFF",
  761. "labelBgOpacity": 0.7,
  762. "labelFontColor": "#666666"
  763. },
  764. "markLine": {
  765. "type": "solid",
  766. "dashLength": 4,
  767. "data": []
  768. }
  769. }
  770. }
  771. } else if (i == 9) {
  772. for (let k = 0; k < res.data.data[i].biViewInfoList.length; k++) {
  773. var obj = res.data.data[i].biViewInfoList[k]
  774. // obj.startName = obj.name.split('→')[0].substring(0, 5) + '...'
  775. obj.startName = obj.name.split('→')[0]
  776. obj.endName = obj.name.split('→')[1]
  777. }
  778. this.ztList = res.data.data[i].biViewInfoList
  779. // this.prizeScroll();
  780. }
  781. }
  782. this.chartlist = _list
  783. // this.scroll()
  784. uni.hideLoading()
  785. })
  786. },
  787. scroll() {
  788. let that = this
  789. let _outHeight = ''
  790. let _inHeight = ''
  791. let obj = uni.createSelectorQuery().select('.content7')
  792. obj.boundingClientRect(function(data) {
  793. // console.log(data)
  794. _outHeight = data.height
  795. }).exec()
  796. setTimeout(function() {
  797. let obj1 = uni.createSelectorQuery().select('.scroll')
  798. obj1.boundingClientRect(function(data) {
  799. console.log(data)
  800. _inHeight = data.height
  801. }).exec()
  802. that.carInterval = setInterval(() => {
  803. console.log('···················')
  804. console.log("_scroll", that.scrollTop)
  805. console.log('_inHeight', _inHeight)
  806. console.log('_outHeight', _outHeight)
  807. if (that.scrollTop < _inHeight - _outHeight) {
  808. that.scrollTop++
  809. // console.log(that.$refs)
  810. // that.$refs.scroll.$el.style.top = '-' + _scroll + 'px'
  811. } else {
  812. that.scrollTop = 0
  813. }
  814. }, 100)
  815. }, 10)
  816. },
  817. confirm(e) {
  818. console.log(e)
  819. this.nowDate = e[0].label + e[1].label
  820. let _year = e[0].label.substring(0, 4)
  821. if (e[1].label != '全年') {
  822. this.seachMoth = _year + '-' + e[1].value
  823. } else {
  824. this.seachMoth = _year
  825. }
  826. this.init()
  827. },
  828. dateClick() {
  829. this.showDate = true
  830. },
  831. typeClick(index) {
  832. this.typeSelect = index
  833. console.log(index)
  834. },
  835. htClick(index) {
  836. // this.itemSelect = index
  837. this.contractSelect = index
  838. }
  839. }
  840. }
  841. </script>
  842. <style scoped lang="scss">
  843. .title {
  844. font-size: 32rpx;
  845. font-weight: 400;
  846. color: #343434;
  847. }
  848. .content-wrap {
  849. background: white;
  850. margin: 0 20rpx;
  851. border-radius: 20rpx;
  852. padding: 20rpx;
  853. }
  854. .u-line {
  855. margin: 20rpx 0 !important;
  856. }
  857. .line-chart {
  858. height: 200px;
  859. }
  860. .content1 {
  861. background: #2E303A;
  862. padding: 0 20rpx 180rpx 20rpx;
  863. .row2 {
  864. display: flex;
  865. justify-content: space-between;
  866. color: white;
  867. font-size: 32rpx;
  868. align-items: center;
  869. color: #FFFFFF;
  870. .icon {
  871. margin: 0 10rpx;
  872. }
  873. .right {
  874. display: flex;
  875. font-size: 26rpx;
  876. .type-style {
  877. margin-left: 38rpx;
  878. padding: 6rpx 16rpx;
  879. border-radius: 10rpx;
  880. color: #A6A6A6;
  881. }
  882. .type-bgc {
  883. background: rgba(255, 255, 255, 0.3);
  884. color: white;
  885. }
  886. }
  887. }
  888. .row3 {
  889. .title {
  890. font-size: 26rpx;
  891. font-weight: 400;
  892. color: #C5C5C5;
  893. margin: 35rpx 0 20rpx 0;
  894. }
  895. .number {
  896. font-size: 32rpx;
  897. font-weight: 400;
  898. color: #E2C4A1;
  899. }
  900. }
  901. }
  902. .move-content {
  903. position: relative;
  904. top: -136rpx;
  905. }
  906. .content2 {
  907. .row1 {
  908. display: flex;
  909. justify-content: space-between;
  910. .left {}
  911. .right {
  912. display: flex;
  913. .item {
  914. background: #F1F1F1;
  915. border-radius: 30px;
  916. margin-left: 20rpx;
  917. font-size: 2rpx;
  918. color: #333333;
  919. padding: 13rpx 27rpx;
  920. }
  921. .item-Select {
  922. background-color: black;
  923. color: white;
  924. }
  925. }
  926. }
  927. .row2,
  928. .row3,
  929. .row4 {
  930. .top {
  931. font-size: 26rpx;
  932. color: #929292;
  933. margin: 0;
  934. }
  935. .bottom {
  936. display: flex;
  937. align-items: center;
  938. margin: 10rpx;
  939. .left {
  940. margin-left: 20rpx;
  941. image {
  942. width: 45rpx;
  943. height: 45rpx;
  944. }
  945. }
  946. .right {
  947. width: 100%;
  948. padding-left: 20rpx;
  949. .top {
  950. display: flex;
  951. justify-content: space-between;
  952. width: 100%;
  953. margin-top: 10px;
  954. .left,
  955. .right-number {
  956. display: flex;
  957. align-items: center;
  958. font-size: 26rpx;
  959. color: #343434;
  960. .number {
  961. font-size: 26rpx;
  962. font-weight: 400;
  963. color: #929292;
  964. margin-left: 10rpx;
  965. }
  966. }
  967. }
  968. .bottom {
  969. margin: 30rpx 0 30rpx 20rpx;
  970. }
  971. }
  972. }
  973. }
  974. }
  975. .content3,
  976. .content4,
  977. .content5,
  978. .content6 {
  979. margin-top: 20rpx;
  980. }
  981. .content5 {
  982. .row1,
  983. .row2 {
  984. display: flex;
  985. justify-content: space-between;
  986. align-items: center;
  987. margin: 40rpx 0;
  988. .left {
  989. display: flex;
  990. align-items: center;
  991. .text {
  992. font-size: 28rpx;
  993. font-weight: 400;
  994. color: #707575;
  995. margin-left: 20rpx;
  996. }
  997. }
  998. .right {
  999. font-size: 34rpx;
  1000. font-weight: 500;
  1001. color: #333333;
  1002. }
  1003. image {
  1004. width: 54rpx;
  1005. height: 54rpx;
  1006. }
  1007. }
  1008. }
  1009. .content6 {
  1010. .map {
  1011. border: 0;
  1012. width: 100%;
  1013. height: 500rpx;
  1014. }
  1015. }
  1016. .content7 {
  1017. position: relative;
  1018. overflow: hidden;
  1019. height: 520rpx;
  1020. margin-top: 20rpx;
  1021. .scroll {
  1022. position: absolute;
  1023. width: 100%;
  1024. }
  1025. .row1 {
  1026. background: #FAFAFA;
  1027. display: flex;
  1028. align-items: center;
  1029. justify-content: space-between;
  1030. margin: 20rpx;
  1031. padding: 20rpx;
  1032. color: #707575;
  1033. .point {
  1034. width: 15rpx;
  1035. height: 15rpx;
  1036. border-radius: 50%;
  1037. background: #22C572;
  1038. margin-right: 10px;
  1039. }
  1040. .zt {
  1041. display: flex;
  1042. align-items: center;
  1043. }
  1044. }
  1045. }
  1046. </style>