report.vue 26 KB

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