report.vue 26 KB

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