report.vue 26 KB

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