report.vue 27 KB

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