report.vue 27 KB

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