report.vue 26 KB

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