report.vue 24 KB

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