123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095 |
- <template>
- <view class="content">
- <view class="content1">
- <u-navbar back-text="" title="数据统计" :border-bottom='false' :background="background" back-icon-color='white'
- title-color='white'>
- </u-navbar>
- <view class="row2">
- <view class="left" @click="dateClick">
- {{nowDate}}
- <u-icon name="arrow-down-fill" size="16" class="icon"></u-icon>
- </view>
- <view class="right">
- <view :class="typeSelect==index?'type-bgc':''" class="type-style" v-for="(item,index) in moneyList"
- @click="typeClick(index)">
- {{item.name}}
- </view>
- </view>
- </view>
- <view class="row3">
- <view class="title">
- 总收入
- </view>
- <view class="number">
- 核算中
- </view>
- </view>
- </view>
- <view class="move-content">
- <view class="content2 content-wrap">
- <view class="row1">
- <view class="left title">
- 合同完成进度
- </view>
- <view class="right">
- <view class="item" :class="contractSelect=='0'?'item-Select':''" @click="htClick(0)">采购</view>
- <view class="item" :class="contractSelect=='1'?'item-Select':''" @click="htClick(1)">销售</view>
- </view>
- </view>
- <u-line color="#EEEEEE" class="u-line" />
- <view class="row2" @click="goToPage(1)">
- <view class="top">
- 合同总量
- </view>
- <view class="bottom">
- <view class="left">
- <image src="../../static/img/report/hetongzongliang.png" mode=""></image>
- </view>
- <view class="right" v-if="contractSelect=='0'">
- <view class="top">
- <view class="left">
- 已完成量
- <view class="number">{{dataObj3.percentage}}</view>
- </view>
- <view class="right-number">{{dataObj3.total}}吨</view>
- </view>
- <view class="bottom">
- <u-line-progress height="12" active-color="#22C572" :show-percent="false"
- :striped="true" :percent="dataObj3.percent" :striped-active="true">
- </u-line-progress>
- </view>
- </view>
- <view class="right" v-if="contractSelect=='1'">
- <view class="top">
- <view class="left">
- 已完成量
- <view class="number">{{dataObj0.percentage}}</view>
- </view>
- <view class="right-number">{{dataObj0.total}}吨</view>
- </view>
- <view class="bottom">
- <u-line-progress height="12" active-color="#22C572" :show-percent="false"
- :striped="true" :percent="dataObj0.percent" :striped-active="true">
- </u-line-progress>
- </view>
- </view>
- </view>
- </view>
- <view class="row3" @click="goToPage(2)">
- <view class="top">
- 合同总额
- </view>
- <view class="bottom">
- <view class="left">
- <image src="../../static/img/report/kaipiao.png" mode=""></image>
- </view>
- <view class="right" v-if="contractSelect=='0'">
- <view class="top">
- <view class="left">
- 已开票
- <view class="number">{{dataObj4.percentage}}</view>
- </view>
- <view class="right-number">¥{{dataObj4.total}}</view>
- </view>
- <view class="bottom">
- <u-line-progress height="12" active-color="#FD714F" :show-percent="false"
- :striped="true" :percent="dataObj4.percent" :striped-active="true">
- </u-line-progress>
- </view>
- </view>
- <view class="right" v-if="contractSelect=='1'">
- <view class="top">
- <view class="left">
- 已开票
- <view class="number">{{dataObj1.percentage}}</view>
- </view>
- <view class="right-number">¥{{dataObj1.total}}</view>
- </view>
- <view class="bottom">
- <u-line-progress height="12" active-color="#FD714F" :show-percent="false"
- :striped="true" :percent="dataObj1.percent" :striped-active="true">
- </u-line-progress>
- </view>
- </view>
- </view>
- </view>
- <view class="row4" @click="goToPage(3)">
- <view class="top">
- 合同总额
- </view>
- <view class="bottom">
- <view class="left">
- <image src="../../static/img/report/hetongzongliang.png" mode=""></image>
- </view>
- <view class="right" v-if="contractSelect=='0'">
- <view class="top">
- <view class="left">
- 已结算
- <view class="number">{{dataObj5.percentage}}</view>
- </view>
- <view class="right-number">¥{{dataObj5.total}}</view>
- </view>
- <view class="bottom">
- <u-line-progress height="12" active-color="#5C75DF" :show-percent="false"
- :striped="true" :percent="dataObj5.percent" :striped-active="true">
- </u-line-progress>
- </view>
- </view>
- <view class="right" v-if="contractSelect=='1'">
- <view class="top">
- <view class="left">
- 已结算
- <view class="number">{{dataObj2.percentage}}</view>
- </view>
- <view class="right-number">¥{{dataObj5.total}}</view>
- </view>
- <view class="bottom">
- <u-line-progress height="12" active-color="#5C75DF" :show-percent="false"
- :striped="true" :percent="dataObj5.percent" :striped-active="true">
- </u-line-progress>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="content3 content-wrap">
- <view class="title" @click="goToPage(4)">粮食品种占比</view>
- <u-line color="#EEEEEE" class="u-line" />
- <qiun-data-charts type="line" class='line-chart' :chartData="chartData" :opts='zringoptions'
- background="none" :ontouch="true" />
- </view>
- <view class="content4 content-wrap">
- <view class="title">在途信息统计表</view>
- <u-line color="#EEEEEE" class="u-line" />
- <qiun-data-charts type="column" class='line-chart' :chartData="carChartData" :opts='ringoptions'
- background="none" />
- </view>
- <view class="content5 content-wrap" @click="goToPage(5)">
- <view class="title">库存头寸(吨)</view>
- <u-line color="#EEEEEE" class="u-line" />
- <view class="row1">
- <view class="left">
- <image src="../../static/img/report/kuncunliang.png" mode=""></image>
- <view class="text">
- 实际存量
- </view>
- </view>
- <view class="right">
- {{inventoryAct}}
- </view>
- </view>
- <view class="row2">
- <view class="left">
- <image src="../../static/img/report/jiazhi.png" mode=""></image>
- <view class="text">
- 采购待执行
- </view>
- </view>
- <view class="right">
- {{inventoryBuy}}
- </view>
- </view>
- <view class="row2">
- <view class="left">
- <image src="../../static/img/report/jiazhi.png" mode=""></image>
- <view class="text">
- 销售待执行
- </view>
- </view>
- <view class="right">
- {{inventorySale}}
- </view>
- </view>
- <view class="row2">
- <view class="left">
- <image src="../../static/img/report/jiazhi.png" mode=""></image>
- <view class="text">
- 头寸
- </view>
- </view>
- <view class="right">
- {{inventoryTC}}
- </view>
- </view>
- </view>
- <view class="content6 content-wrap">
- <view class="title">库点流向分布</view>
- <u-line color="#EEEEEE" class="u-line" />
- <iframe class='map' :src='url'></iframe>
- </view>
- <!-- <view class="content7">
- <maoScroll :data="ztList" :showNum="showNum" :lineHeight="lineHeight" :animationScroll="animationScroll"
- :animation="animation">
- <template v-slot="{line}">
- <view class="row1">
- <view class="zt">
- <view class="point"></view>在途
- </view>
- <view>{{line.startName}}</view>
- <img src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jiantou.png" alt="">
- <view class="">
- {{line.endName}}
- </view>
- </view>
- </template>
- </maoScroll>
- </view> -->
- <view class="content7">
- <view ref='scroll' class='scroll' :style="{'top':'-'+scrollTop+'px'}">
- <view class="row1" v-for="(item,index) in ztList">
- <view class="zt">
- <view class="point"></view>在途
- </view>
- <view>{{item.startName}}</view>
- →
- <!-- <img src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jiantou.png" alt=""> -->
- <view class="">
- {{item.endName}}
- </view>
- </view>
- </view>
- </view>
- </view>
- <u-select v-model="showDate" mode="mutil-column" confirm-color='#22C572' :list="dateList" @confirm="confirm">
- </u-select>
- </view>
- </template>
- <script>
- import maoScroll from '@/components/mao-scroll/mao-scroll.vue';
- export default {
- components: {
- maoScroll
- },
- data() {
- return {
- scrollTop: 0,
- carInterval: null,
- inventoryAct: 0,
- inventoryBuy: 0,
- inventorySale: 0,
- inventoryTC: 0,
- contractSelect: '0',
- url: '',
- nowDate: '2022年全年',
- seachMoth: '2021',
- background: {
- backgroundColor: '#2E303A',
- },
- typeSelect: '0',
- contractSelect: '0',
- showDate: false,
- chartData: {},
- carChartData: {},
- carRingoptions: {},
- ringoptions: {},
- zringoptions: {},
- moneyList: [{
- name: '收入'
- }, {
- name: '支出'
- }, {
- name: '毛利润'
- }],
- dataList: [],
- dataObj0: {
- percentage: '',
- total: '',
- percentage: ''
- },
- dataObj1: {
- percentage: '',
- total: '',
- percentage: ''
- },
- dataObj2: {
- percentage: '',
- total: '',
- percentage: ''
- },
- dataObj3: {
- percentage: '',
- total: '',
- percentage: ''
- },
- dataObj4: {
- percentage: '',
- total: '',
- percentage: ''
- },
- dataObj5: {
- percentage: '',
- total: '',
- percentage: ''
- },
- dateList: [
- [{
- value: '1',
- label: '2021年'
- },
- {
- value: '2',
- label: '2022年'
- }
- ],
- [{
- value: '0',
- label: '全年'
- },
- {
- value: '01',
- label: '1月'
- },
- {
- value: '02',
- label: '2月'
- },
- {
- value: '03',
- label: '3月'
- },
- {
- value: '04',
- label: '4月'
- },
- {
- value: '05',
- label: '5月'
- },
- {
- value: '06',
- label: '6月'
- },
- {
- value: '07',
- label: '7月'
- },
- {
- value: '08',
- label: '8月'
- },
- {
- value: '09',
- label: '9月'
- },
- {
- value: '10',
- label: '10月'
- },
- {
- value: '11',
- label: '11月'
- },
- {
- value: '12',
- label: '12月'
- },
- ]
- ],
- ztList: [],
- showNum: 8,
- lineHeight: 80,
- animationScroll: 5000,
- animation: 0,
- }
- },
- onLoad: function(option) {
- uni.showLoading({
- title: "数据加载中...",
- mask: true
- })
- if (this.nowDate == '2022年全年') {
- this.seachMoth = '2022'
- }
- this.init()
- },
- destroyed() {
- clearInterval(this.carInterval)
- },
- onUnload() {
- clearInterval(this.carInterval)
- },
- methods: {
- goToPage(index) {
- // console.log(index)
- if (index == 4) {
- uni.navigateTo({
- url: '/pages/user/contractLook/warehouseReserves'
- })
- return true
- } else if (index == 5) {
- uni.navigateTo({
- url: '/pages/user/contractLook/inventoryCost'
- })
- return true
- }
- if (this.contractSelect == '0') {
- uni.navigateTo({
- url: '/pages/user/contractLook/purchaseContract'
- })
- } else {
- uni.navigateTo({
- url: '/pages/user/contractLook/salesContract'
- })
- }
- },
- init() {
- this.url = "https://liangxin.zthymaoyi.com/map_0105.html?id=" + uni.getStorageSync('pcUserInfo').compId +
- '&seachMoth=' + this.seachMoth
- this.$api.doRequest('get', '/biInfoController/selectBiInfo?compId=' + uni.getStorageSync('pcUserInfo')
- .compId + '&seachMoth=' + this.seachMoth).then(res => {
- // console.log(res)
- uni.hideLoading()
- let _list = []
- this.dataList = res.data.data
- for (let i = 0; i < res.data.data.length; i++) {
- let _obj = {}
- let _color = []
- let _title = ""
- let _subtitle = ''
- let _name = ''
- let _count = ''
- let _data = []
- if (i < 6) {
- res.data.data[i].biViewInfoList[0].percent = Number(res.data.data[i].biViewInfoList[0]
- .percentage.substring(0, res.data.data[i].biViewInfoList[0].percentage.length -
- 1)).toFixed(2)
- res.data.data[i].biViewInfoList[0].percentage = Number(res.data.data[i].biViewInfoList[
- 0]
- .percentage.substring(0, res.data.data[i].biViewInfoList[0].percentage.length -
- 1)).toFixed(2) + '%'
- res.data.data[i].total = Number(res.data.data[i].total).toFixed(2)
- switch (i) {
- case 0:
- this.dataObj0 = {
- percentage: res.data.data[i].biViewInfoList[0].percentage,
- total: res.data.data[i].total,
- percent: Number(res.data.data[i].biViewInfoList[0].percent)
- }
- break;
- case 1:
- this.dataObj1 = {
- percentage: res.data.data[i].biViewInfoList[0].percentage,
- total: Number(res.data.data[i].total),
- percent: Number(res.data.data[i].biViewInfoList[0].percent)
- }
- break;
- case 2:
- this.dataObj2 = {
- percentage: res.data.data[i].biViewInfoList[0].percentage,
- total: Number(res.data.data[i].total),
- percent: Number(res.data.data[i].biViewInfoList[0].percent)
- }
- break;
- case 3:
- this.dataObj3 = {
- percentage: res.data.data[i].biViewInfoList[0].percentage,
- total: Number(res.data.data[i].total),
- percent: Number(res.data.data[i].biViewInfoList[0].percent)
- }
- break;
- case 4:
- this.dataObj4 = {
- percentage: res.data.data[i].biViewInfoList[0].percentage,
- total: Number(res.data.data[i].total),
- percent: Number(res.data.data[i].biViewInfoList[0].percent)
- }
- break;
- case 5:
- this.dataObj5 = {
- percentage: res.data.data[i].biViewInfoList[0].percentage,
- total: Number(res.data.data[i].total),
- percent: Number(res.data.data[i].biViewInfoList[0].percent)
- }
- break;
- }
- } else if (i == 6) {
- this.carCount1 = res.data.data[i].biViewInfoList[0].count
- this.carCount2 = res.data.data[i].biViewInfoList[1].count
- this.carCount3 = res.data.data[i].biViewInfoList[2].count
- let _x = []
- let _y = []
- for (let k = 0; k < res.data.data[i].biViewInfoList.length; k++) {
- _x.push(res.data.data[i].biViewInfoList[k].name)
- _y.push(Number(res.data.data[i].biViewInfoList[k].count))
- }
- this.carChartData = {
- categories: _x,
- series: [{
- "name": '车辆',
- "data": _y
- }]
- }
- this.ringoptions = {
- "type": "column",
- "canvasId": "",
- "canvas2d": false,
- "background": "none",
- "animation": true,
- "timing": "easeOut",
- "duration": 1000,
- "color": [
- "#22C572"
- ],
- "padding": [
- 15,
- 15,
- 0,
- 5
- ],
- "rotate": false,
- "errorReload": true,
- "fontSize": 13,
- "fontColor": "#666666",
- "enableScroll": false,
- "touchMoveLimit": 60,
- "enableMarkLine": false,
- "dataLabel": true,
- "dataPointShape": true,
- "dataPointShapeType": "solid",
- "tapLegend": true,
- "xAxis": {
- "disabled": false,
- "axisLine": false,
- "axisLineColor": "#CCCCCC",
- "calibration": false,
- "fontColor": "#666666",
- "fontSize": 13,
- "rotateLabel": false,
- "itemCount": 5,
- "boundaryGap": "center",
- "disableGrid": true,
- "gridColor": "#CCCCCC",
- "gridType": "solid",
- "dashLength": 4,
- "gridEval": 1,
- "scrollShow": false,
- "scrollAlign": "left",
- "scrollColor": "#A6A6A6",
- "scrollBackgroundColor": "#EFEBEF",
- "format": ""
- },
- "yAxis": {
- "disabled": true,
- "disableGrid": true,
- "splitNumber": 5,
- "gridType": "solid",
- "dashLength": 8,
- "gridColor": "#CCCCCC",
- "padding": 10,
- "showTitle": false,
- "data": []
- },
- "legend": {
- "show": false,
- "position": "bottom",
- "float": "center",
- "padding": 5,
- "margin": 5,
- "backgroundColor": "rgba(0,0,0,0)",
- "borderColor": "rgba(0,0,0,0)",
- "borderWidth": 0,
- "fontSize": 13,
- "fontColor": "#666666",
- "lineHeight": 11,
- "hiddenColor": "#CECECE",
- "itemGap": 10
- },
- "extra": {
- "column": {
- "type": "group",
- "width": 30,
- "seriesGap": 2,
- "categoryGap": 3,
- "barBorderCircle": true,
- "linearType": "none",
- "linearOpacity": 1,
- "colorStop": 0,
- "meterBorder": 1,
- "meterFillColor": "#FFFFFF",
- "activeBgColor": "#000000",
- "activeBgOpacity": 0.08,
- "meterBorde": 1
- },
- "tooltip": {
- "showBox": true,
- "showArrow": true,
- "showCategory": false,
- "borderWidth": 0,
- "borderRadius": 0,
- "borderColor": "#000000",
- "borderOpacity": 0.7,
- "bgColor": "#000000",
- "bgOpacity": 0.7,
- "gridType": "solid",
- "dashLength": 4,
- "gridColor": "#CCCCCC",
- "fontColor": "#FFFFFF",
- "splitLine": true,
- "horizentalLine": false,
- "xAxisLabel": false,
- "yAxisLabel": false,
- "labelBgColor": "#FFFFFF",
- "labelBgOpacity": 0.7,
- "labelFontColor": "#666666"
- },
- "markLine": {
- "type": "solid",
- "dashLength": 4,
- "data": []
- }
- }
- }
- } else if (i == 7) {
- this.inventoryAct = Number(res.data.data[i].biViewInfoList[0].count).toFixed(2)
- this.inventoryBuy = Number(res.data.data[i].biViewInfoList[1].count).toFixed(2)
- this.inventorySale = Number(res.data.data[i].biViewInfoList[2].count).toFixed(2)
- this.inventoryTC = Number(Number(this.inventoryAct)+Number(this.inventoryBuy)-Number(this.inventorySale)).toFixed(2)
- } else if (i == 8) {
- let _x = []
- let _y = []
- for (let k = 0; k < res.data.data[i].biViewInfoList.length; k++) {
- if(Number(res.data.data[i].biViewInfoList[k].count).toFixed(2) != 0){
- _x.push(res.data.data[i].biViewInfoList[k].name)
- _y.push(Number(res.data.data[i].biViewInfoList[k].count).toFixed(2))
- }
- }
- this.chartData = {
- categories: _x,
- series: [{
- "name": '储量',
- "data": _y
- }]
- }
- this.zringoptions = {
- "type": "line",
- "canvasId": "",
- "canvas2d": false,
- "background": "none",
- "animation": true,
- "timing": "easeOut",
- "duration": 1000,
- "color": [
- "#91CB74",
- ],
- "padding": [
- 15,
- 10,
- 0,
- 15
- ],
- "rotate": false,
- "errorReload": true,
- "fontSize": 13,
- "fontColor": "#666666",
- "enableScroll": true,
- "touchMoveLimit": 60,
- "enableMarkLine": true,
- "dataLabel": true,
- "dataPointShape": true,
- "dataPointShapeType": "hollow",
- "tapLegend": true,
- "xAxis": {
- "disabled": false,
- "axisLine": false,
- "axisLineColor": "#CCCCCC",
- "calibration": false,
- "fontColor": "#666666",
- "fontSize": 13,
- "rotateLabel": false,
- "itemCount": 4,
- "boundaryGap": "center",
- "disableGrid": false,
- "gridColor": "#CCCCCC",
- "gridType": "dash",
- "dashLength": 4,
- "gridEval": 1,
- "scrollShow": false,
- "scrollAlign": "left",
- "scrollColor": "#A6A6A6",
- "scrollBackgroundColor": "#EFEBEF",
- "format": ""
- },
- "yAxis": {
- "disabled": true,
- "disableGrid": true,
- "splitNumber": 5,
- "gridType": "dash",
- "dashLength": 2,
- "gridColor": "#CCCCCC",
- "padding": 10,
- "showTitle": false,
- "data": []
- },
- "legend": {
- "show": false,
- "position": "bottom",
- "float": "center",
- "padding": 5,
- "margin": 5,
- "backgroundColor": "rgba(0,0,0,0)",
- "borderColor": "rgba(0,0,0,0)",
- "borderWidth": 0,
- "fontSize": 13,
- "fontColor": "#666666",
- "lineHeight": 11,
- "hiddenColor": "#CECECE",
- "itemGap": 10
- },
- "extra": {
- "line": {
- "type": "straight",
- "width": 2
- },
- "tooltip": {
- "showBox": true,
- "showArrow": true,
- "showCategory": false,
- "borderWidth": 0,
- "borderRadius": 0,
- "borderColor": "#000000",
- "borderOpacity": 0.7,
- "bgColor": "#000000",
- "bgOpacity": 0.7,
- "gridType": "dash",
- "dashLength": 4,
- "gridColor": "#22C572",
- "fontColor": "#FFFFFF",
- "splitLine": true,
- "horizentalLine": false,
- "xAxisLabel": false,
- "yAxisLabel": false,
- "labelBgColor": "#FFFFFF",
- "labelBgOpacity": 0.7,
- "labelFontColor": "#666666"
- },
- "markLine": {
- "type": "solid",
- "dashLength": 4,
- "data": []
- }
- }
- }
- } else if (i == 9) {
- for (let k = 0; k < res.data.data[i].biViewInfoList.length; k++) {
- var obj = res.data.data[i].biViewInfoList[k]
- // obj.startName = obj.name.split('→')[0].substring(0, 5) + '...'
- obj.startName = obj.name.split('→')[0]
- obj.endName = obj.name.split('→')[1]
- }
- this.ztList = res.data.data[i].biViewInfoList
- // this.prizeScroll();
- }
- }
- this.chartlist = _list
- // this.scroll()
- uni.hideLoading()
- })
- },
- scroll() {
- let that = this
- let _outHeight = ''
- let _inHeight = ''
- let obj = uni.createSelectorQuery().select('.content7')
- obj.boundingClientRect(function(data) {
- // console.log(data)
- _outHeight = data.height
- }).exec()
- setTimeout(function() {
- let obj1 = uni.createSelectorQuery().select('.scroll')
- obj1.boundingClientRect(function(data) {
- console.log(data)
- _inHeight = data.height
- }).exec()
- that.carInterval = setInterval(() => {
- console.log('···················')
- console.log("_scroll", that.scrollTop)
- console.log('_inHeight', _inHeight)
- console.log('_outHeight', _outHeight)
- if (that.scrollTop < _inHeight - _outHeight) {
- that.scrollTop++
- // console.log(that.$refs)
- // that.$refs.scroll.$el.style.top = '-' + _scroll + 'px'
- } else {
- that.scrollTop = 0
- }
- }, 100)
- }, 10)
- },
- confirm(e) {
- console.log(e)
- this.nowDate = e[0].label + e[1].label
- let _year = e[0].label.substring(0, 4)
- if (e[1].label != '全年') {
- this.seachMoth = _year + '-' + e[1].value
- } else {
- this.seachMoth = _year
- }
- this.init()
- },
- dateClick() {
- this.showDate = true
- },
- typeClick(index) {
- this.typeSelect = index
- console.log(index)
- },
- htClick(index) {
- // this.itemSelect = index
- this.contractSelect = index
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .title {
- font-size: 32rpx;
- font-weight: 400;
- color: #343434;
- }
- .content-wrap {
- background: white;
- margin: 0 20rpx;
- border-radius: 20rpx;
- padding: 20rpx;
- }
- .u-line {
- margin: 20rpx 0 !important;
- }
- .line-chart {
- height: 200px;
- }
- .content1 {
- background: #2E303A;
- padding: 0 20rpx 180rpx 20rpx;
- .row2 {
- display: flex;
- justify-content: space-between;
- color: white;
- font-size: 32rpx;
- align-items: center;
- color: #FFFFFF;
- .icon {
- margin: 0 10rpx;
- }
- .right {
- display: flex;
- font-size: 26rpx;
- .type-style {
- margin-left: 38rpx;
- padding: 6rpx 16rpx;
- border-radius: 10rpx;
- color: #A6A6A6;
- }
- .type-bgc {
- background: rgba(255, 255, 255, 0.3);
- color: white;
- }
- }
- }
- .row3 {
- .title {
- font-size: 26rpx;
- font-weight: 400;
- color: #C5C5C5;
- margin: 35rpx 0 20rpx 0;
- }
- .number {
- font-size: 32rpx;
- font-weight: 400;
- color: #E2C4A1;
- }
- }
- }
- .move-content {
- position: relative;
- top: -136rpx;
- }
- .content2 {
- .row1 {
- display: flex;
- justify-content: space-between;
- .left {}
- .right {
- display: flex;
- .item {
- background: #F1F1F1;
- border-radius: 30px;
- margin-left: 20rpx;
- font-size: 2rpx;
- color: #333333;
- padding: 13rpx 27rpx;
- }
- .item-Select {
- background-color: black;
- color: white;
- }
- }
- }
- .row2,
- .row3,
- .row4 {
- .top {
- font-size: 26rpx;
- color: #929292;
- margin: 0;
- }
- .bottom {
- display: flex;
- align-items: center;
- margin: 10rpx;
- .left {
- margin-left: 20rpx;
- image {
- width: 45rpx;
- height: 45rpx;
- }
- }
- .right {
- width: 100%;
- padding-left: 20rpx;
- .top {
- display: flex;
- justify-content: space-between;
- width: 100%;
- margin-top: 10px;
- .left,
- .right-number {
- display: flex;
- align-items: center;
- font-size: 26rpx;
- color: #343434;
- .number {
- font-size: 26rpx;
- font-weight: 400;
- color: #929292;
- margin-left: 10rpx;
- }
- }
- }
- .bottom {
- margin: 30rpx 0 30rpx 20rpx;
- }
- }
- }
- }
- }
- .content3,
- .content4,
- .content5,
- .content6 {
- margin-top: 20rpx;
- }
- .content5 {
- .row1,
- .row2 {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin: 40rpx 0;
- .left {
- display: flex;
- align-items: center;
- .text {
- font-size: 28rpx;
- font-weight: 400;
- color: #707575;
- margin-left: 20rpx;
- }
- }
- .right {
- font-size: 34rpx;
- font-weight: 500;
- color: #333333;
- }
- image {
- width: 54rpx;
- height: 54rpx;
- }
- }
- }
- .content6 {
- .map {
- border: 0;
- width: 100%;
- height: 500rpx;
- }
- }
- .content7 {
- position: relative;
- overflow: hidden;
- height: 520rpx;
- margin-top: 20rpx;
- .scroll {
- position: absolute;
- width: 100%;
- }
- .row1 {
- background: #FAFAFA;
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin: 20rpx;
- padding: 20rpx;
- color: #707575;
- .point {
- width: 15rpx;
- height: 15rpx;
- border-radius: 50%;
- background: #22C572;
- margin-right: 10px;
- }
- .zt {
- display: flex;
- align-items: center;
- }
- }
- }
- </style>
|