123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173 |
- <template>
- <view>
- <u-navbar :title="title" :backIconColor="'#ffffff'" title-color="#ffffff"
- :background="backgroundObj"></u-navbar>
- <view class="gradient-header">
- <view class="jpback">
- </view>
- </view>
- <view class="main">
- <view class="statistics ">
- <view class="data1">
- <view class="item">
- <view class="line">
- <view class="name">
- {{info.name}}
- </view>
- <view class="item-tags">
- <view class="tag tag1" :class="'typeN typeN'+info.type">
- {{info.typeN}}
-
- </view>
- <view class="tag" :class="'statusN statusN'+info.status">
- {{info.statusN}}
-
- </view>
- <view class="tag" :class="'lockStatusN lockStatusN'+info.lockStatus">
- {{info.lockStatusN}}
- </view>
- </view>
- </view>
- <view class="line">
- 编号:{{info.lockNo}}
- </view>
- </view>
- <view class="value" v-if="0">
- <u-button type="primary" size="mini" shape="circle">
- <img class="img" src="@/assets/img/button/lock.svg" alt="">
- 降锁
- </u-button>
- </view>
- </view>
- </view>
- <view class=" no_statistics">
- <view class="data2">
- <view class="top">
- <view class="item">
- <view class="name">
- 停车时长
- </view>
- <view class="value">
- 5h13m
- </view>
- </view>
- <view class="item">
- <view class="name">
- 使用率
- </view>
- <view class="value">
- 77.22%
- </view>
- </view>
- <view class="item">
- <view class="name">
- 异常次数
- </view>
- <view class="value">
- 2
- </view>
- </view>
- </view>
- <view class="body">
- <u-radio-group v-model="radiovalue" @change="radioGroupChange">
- <u-radio @change="radioChange" v-for="(item, index) in radiolist" :key="index"
- :name="item.value">
- {{item.name}}
- </u-radio>
- </u-radio-group>
- </view>
- </view>
- </view>
- <view class="statistics ">
- <view class="title">
- <view class="icon">
- <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
- </view>
- <view class="text">
- <view>车位平均占用率(%)</view>
- <view class="tag">2025年1月<u-icon name="arrow-down"></u-icon></view>
- </view>
- </view>
- <view class="contentBody">
- <jpContent :status="jpContentMap.body2">
- <view class="body2lineChart">
- <view id="body2line1" class="body2line">
- </view>
- </view>
- </jpContent>
- </view>
- </view>
- <view class="statistics ">
- <view class="title">
- <view class="icon">
- <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
- </view>
- <view class="text">
- <view>地锁历史异常状态</view>
- </view>
- </view>
- <view class="contentBody">
- <jpContent :status="jpContentMap.body1">
- <view class="body1pieChart">
- <view id="body1pie1" class="body1pie">
- </view>
- </view>
- </jpContent>
- </view>
- </view>
- <view class="statistics ">
- <view class="title">
- <view class="icon">
- <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
- </view>
- <view class="text">
- <view>高频使用时段分布</view>
- </view>
- </view>
- <view class="contentBody">
- <jpContent :status="jpContentMap.body3">
- <view class="body3barChart">
- <view id="body3bar1" class="body3bar">
- </view>
- </view>
- </jpContent>
- </view>
- </view>
- <view class="statistics ">
- <view class="title">
- <view class="icon">
- <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
- </view>
- <view class="text">
- <view>用户停留时长分群特征</view>
- </view>
- </view>
- <view class="contentBody">
- <jpContent :status="jpContentMap.body4">
- <view class="body4pieChart">
- <view id="body4pie1" class="body4pie">
- </view>
- </view>
- </jpContent>
- </view>
- </view>
- <view class="statistics ">
- <view class="title">
- <view class="icon">
- <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
- </view>
- <view class="text">
- <view>高频使用用户TOP5</view>
- </view>
- </view>
- <view class="contentBody">
- <jpContent :status="jpContentMap.body5">
- <view class="body5data">
- <view class="line">
- <view class="data">
- <view class="item">
- 王二
- </view>
- <view class="value">
- 鄂DDT1268
- </view>
- <view class="value">
- 28次
- </view>
- </view>
- <view class="goto">
- <u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
- </view>
- </view>
- <view class="line">
- <view class="data">
- <view class="item">
- 王三
- </view>
- <view class="value">
- 鄂DDT1268
- </view>
- <view class="value">
- 8次
- </view>
- </view>
- <view class="goto">
- <u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
- </view>
- </view>
- </view>
- </jpContent>
- </view>
- </view>
- <!-- end-->
- <view class="statistics ">
- <view class="title">
- <view class="icon">
- <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
- </view>
- <view class="text">
- <view>白名单用户清单</view>
- <view class="check-all">查看全部<u-icon name="arrow-right"></u-icon></view>
- </view>
- </view>
- <view class="contentBody">
- <jpContent :status="jpContentMap.body7">
- <view class="body7data">
- <view class="line">
- <view class="value">
- 用户姓名
- </view>
- <view class="value">
- 车主身份
- </view>
- <view class="value">
- 使用次数
- </view>
- </view>
- <view class="line">
- <view class="value">
- 孙培军
- </view>
- <view class="value">
- 车位所有人
- </view>
- <view class="value">
- 22
- </view>
- </view>
- <view class="line">
- <view class="value">
- 刘洋
- </view>
- <view class="value">
- 白名单用户
- </view>
- <view class="value">
- 11
- </view>
- </view>
- </view>
- </jpContent>
- </view>
- </view>
- <!-- end-->
- <view class="statistics ">
- <view class="title">
- <view class="icon">
- <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
- </view>
- <view class="text">
- <view>车位异常记录</view>
- <view class="check-all">查看全部<u-icon name="arrow-right"></u-icon></view>
- </view>
- </view>
- <view class="contentBody">
- <jpContent :status="jpContentMap.body6">
- <view class="body6main">
- <view class="line" v-for="(item,index) in abnormalRecordsList" :key="index">
- <view class="abnormal-item">
- <!-- @click="gotoUrl('/pages/abnormal/abnormalAlarmDetails?id='+item.id)"
- -->
- <view class="item-title">
- <view class="name">
- <span v-if="item.level==1" class="level level1 ">一级</span>
- <span v-if="item.level==2" class="level level2">二级</span>
- {{item.content}}
- </view>
- <view class="date"
- style="display: flex; justify-content: space-between;margin-top: 4rpx;">
- <view>{{item.title}}</view>
- <view>{{item.createTime}}</view>
- </view>
- </view>
- </view>
- <u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
- </view>
- </view>
- </jpContent>
- </view>
- </view>
- <!-- end-->
- <view class="statistics ">
- <view class="title">
- <view class="icon">
- <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
- </view>
- <view class="text">
- <view>地锁信息</view>
- <view class="check-all">查看全部<u-icon name="arrow-right"></u-icon></view>
- </view>
- </view>
- <view class="contentBody">
- <jpContent :status="jpContentMap.body8">
- <view class="body8main">
- <view class="line">
- <view class="value">
- 类型
- </view>
- <view class="value">
- 设备编号
- </view>
- <view class="value">
- 设备地址
- </view>
- </view>
- <view class="line">
- <view class="value">
- 智能地锁
- </view>
- <view class="value">
- JPDJ01-0002
- </view>
- <view class="value">
- 软件园软件园软件园软件园软件园软件园
- </view>
- </view>
- </view>
- </jpContent>
- </view>
- </view>
- <!-- end-->
- <u-divider border-color="#CFD2D5">已经到底了</u-divider>
- </view>
- </view>
- </template>
- <script>
- import jpContent from '@/components/JPcontent.vue'
- import * as echarts from 'echarts';
- import * as API from '@/apis/pagejs/deviceTab.js'
-
- export default {
- components: {
- jpContent
- },
- data() {
- return {
- id:"",
- info:{},
- echartsList: {},
- jpContentMap: {
- body1: 2,
- body2: 2,
- body3: 2,
- body4: 2,
- body5: 2,
- body6: 2,
- body7: 2,
- body8: 2,
- body9: 2,
- body10: 2,
- },
- title: "",
- backgroundObj: {
- background: '#307AF6'
- },
- radiovalue: "2",
- radiolist: [{
- name: '上月',
- value: "2"
- },
- {
- name: '当月',
- value: "1"
- },
- {
- name: '今日',
- value: "4"
- }, {
- name: '当年',
- value: "3"
- }, {
- name: '合计',
- value: "0"
- },
- {
- name: '指定时间',
- value: "10"
- }
- ],
- abnormalRecordsList: [{
- level: 1,
- content: "1111111",
- title: "11",
- createTime: "123:123"
- },
- {
- level: 2,
- content: "1111111",
- title: "11",
- createTime: "123:123"
- }
- ],
- };
- },
- onLoad(op) {
- if(op.id){
- this.id=op.id
- }
- },
- onReady() {
- if(this.id){
- this.init();
- }
-
- },
- methods: {
- init() {
- this.getInfo()
- this.getbody1()
- this.getbody2()
- this.getbody3()
- this.getbody4()
- },
- getInfo(){
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- var obj = {
- id: this.id
- }
-
- API.lockDetails(obj).then((res) => {
- this.info = res.data.floorlockInfo
- this.title =this.info.parkingName
- uni.hideLoading();
-
- //this.getWhiteList()
- }).catch(error => {
-
- uni.hideLoading();
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- getbody1() {
- var key = "body1pie1"
- var myChart = this.echartsList[key];
- if (!myChart) {
- myChart = echarts.init(document.getElementById(key), null, {
- width: uni.upx2px(300 * 2),
- height: uni.upx2px(170 * 2)
- })
- }
- myChart.clear()
- var option = {
- grid: {
- top: 20,
- left: 0,
- right: 0,
- bottom: 0,
- containLabel: true
- },
- series: [{
- type: 'pie',
- radius: ['80%', '50%'],
- radius: [35, 50],
- data: [{
- itemStyle: {
- color: "#EB3C31"
- },
- value: 1048,
- name: '0.5小时\n20%',
- },
- {
- itemStyle: {
- color: "#EF8132"
- },
- value: 735,
- name: '2小时\n10%'
- },
- {
- itemStyle: {
- color: "#929292"
- },
- value: 580,
- name: '2-6小时\n30%'
- },
- ]
- }]
- };
- myChart.setOption(option);
- this.echartsList[key] = myChart;
- },
- getbody4() {
- var key = "body4pie1"
- var myChart = this.echartsList[key];
- if (!myChart) {
- myChart = echarts.init(document.getElementById(key), null, {
- width: uni.upx2px(300 * 2),
- height: uni.upx2px(170 * 2)
- })
- }
- myChart.clear()
- var option = {
- grid: {
- top: 20,
- left: 0,
- right: 0,
- bottom: 0,
- containLabel: true
- },
- series: [{
- type: 'pie',
- radius: ['80%', '50%'],
- radius: [45, 60],
- data: [{
- value: 1048,
- name: '0.5小时\n20%'
- },
- {
- value: 735,
- name: '2小时\n10%'
- },
- {
- value: 580,
- name: '2-6小时\n30%'
- },
- {
- value: 484,
- name: '6小时以上\n40%'
- },
- ]
- }]
- };
- myChart.setOption(option);
- this.echartsList[key] = myChart;
- },
- getbody3() {
- var key = "body3bar1"
- var myChart = this.echartsList[key];
- if (!myChart) {
- myChart = echarts.init(document.getElementById(key), null, {
- width: uni.upx2px(300 * 2),
- height: uni.upx2px(170 * 2)
- })
- }
- myChart.clear()
- var data1 = ['0-7点', '7-14点', '14-24点']
- var axisLabel = {
- rotate: 40,
- interval: 0,
- textStyle: {
- color: "#333"
- }
- }
- if (data1.length < 7) {
- axisLabel = {
- interval: 0,
- textStyle: {
- color: "#333"
- },
- }
- } else {
- axisLabel.interval = 0;
- }
- var option = {
- xAxis: {
- type: 'category',
- data: data1,
- axisLabel: axisLabel,
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- yAxis: {
- type: 'value'
- },
- grid: {
- top: 20,
- left: 0,
- right: 0,
- bottom: 0,
- containLabel: true
- },
- series: [{
- itemStyle: {
- color: "#5A88E5"
- },
- data: [120, 200, 150],
- type: 'bar'
- }]
- };
- myChart.setOption(option);
- this.echartsList[key] = myChart;
- },
- getbody2() {
- var key = "body2line1"
- var myChart = this.echartsList[key];
- if (!myChart) {
- myChart = echarts.init(document.getElementById(key), null, {
- width: uni.upx2px(300 * 2),
- height: uni.upx2px(170 * 2)
- })
- }
- myChart.clear()
- var data1 = ['0-2点', '2-4点', '4-6点', '6-8点', '8-10点', '10-12点', '12-14点', '14-16点', '16-18点', '18-20点',
- '20-22点', '22-24点'
- ]
- var axisLabel = {
- rotate: 40,
- interval: 0,
- textStyle: {
- color: "#333"
- }
- }
- if (data1.length < 7) {
- axisLabel = {
- interval: 0,
- textStyle: {
- color: "#333"
- },
- }
- } else {
- axisLabel.interval = 0;
- }
- var option = {
- xAxis: {
- type: 'category',
- data: data1,
- axisLabel: axisLabel,
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- yAxis: {
- type: 'value'
- },
- grid: {
- top: 20,
- left: 0,
- right: 0,
- bottom: 0,
- containLabel: true
- },
- series: [{
- areaStyle: {},
- itemStyle: {
- color: "#BBD4FB"
- },
- label: {
- show: true,
- position: 'top',
- color: "#307AF6"
- },
- data: [50, 30, 24, 18, 35, 47, 50, 30, 24, 28, 35, 47],
- type: 'line'
- }]
- };
- myChart.setOption(option);
- this.echartsList[key] = myChart;
- },
- }
- }
- </script>
- <style lang="scss">
- .gradient-header {
- height: 0px;
- }
- .jpback {
- height: 268rpx;
- background: linear-gradient(180deg, rgba(22, 119, 255, 1) 20%, rgba(121, 177, 255, 1) 100%);
- }
- .main {
- padding: 32rpx;
- .no_statistics {
- margin-bottom: 24rpx;
- }
- .statistics {
- border-radius: 8px;
- background-color: rgba(255, 255, 255, 1);
- box-shadow: 0px 1px 6px 0px rgba(0, 59, 142, 0.05);
- margin-bottom: 24rpx;
- padding: 40rpx;
- .title {
- display: flex;
- align-items: center;
- margin-bottom: 32rpx;
- font-weight: bold;
- .img {
- width: 36rpx;
- height: 36rpx;
- vertical-align: middle;
- border-radius: 999px;
- }
- .change {
- display: flex;
- align-items: center;
- .change-img {
- width: 32rpx;
- height: 32rpx;
- vertical-align: middle;
- }
- text {
- margin-left: 8rpx;
- }
- }
- .text {
- color: rgba(16, 16, 16, 1);
- font-size: 36rpx;
- margin-left: 16rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- width: 100%;
- .tag {
- border-radius: 4px;
- border: 1px solid rgba(187, 187, 187, 1);
- color: rgba(51, 51, 51, 1);
- font-size: 24rpx;
- padding: 1px 8rpx;
- margin-left: 8rpx;
- }
- }
- .change {
- margin-left: 16rpx;
- font-size: 24rpx;
- color: #838383;
- }
- .check-all {
- margin-left: auto;
- color: rgba(131, 131, 131, 1);
- font-size: 24rpx;
- }
- }
- }
- }
- .data1 {
- display: flex;
- align-items: center;
- justify-content: space-between;
- .item {
- .line{
- display: flex;
- align-items: center;
- }
- .name {
- color: rgba(51, 51, 51, 1);
- font-size: 36rpx;
- font-weight: bold;
- margin-right: 8rpx;
- }
- .item-tags {
- display: flex;
- .tag {
- border-radius: 4px;
- background-color: rgba(39, 177, 72, 1);
- color: rgba(255, 255, 255, 1);
- font-size: 24rpx;
- padding: 2rpx 8rpx;
- margin-right: 8rpx;
- }
- .typeN1 {
- background-color: rgba(22, 119, 255, 1);
- }
- .typeN2{
- background-color: #8161ff;
- background-color: #8161ff;
- }
- .statusN{
- background-color:#838383
- }
- .lockStatusN {
-
- background-color: rgba(153, 153, 153, 1);
- }
-
- .lockStatusN2 {
- background-color: #03A9F4
- }
-
- }
- }
- .value {
- .img {
- margin-right: 8rpx;
- width: 32rpx;
- height: 32rpx;
- }
- }
- }
- .data2 {
- height: 336rpx;
- padding: 32rpx;
- border-radius: 12px;
- background: linear-gradient(180deg, rgba(222, 222, 222, 1) 3%, rgba(255, 255, 255, 1) 5%, rgba(232, 232, 232, 1) 56%, rgba(255, 255, 255, 1) 59%, rgba(236, 236, 236, 1) 95%, rgba(215, 215, 215, 1) 98%);
- .top {
- background-repeat: round;
- background-image: url('@/assets/img/deviceTab/index3-2.png');
- display: flex;
- justify-content: space-around;
- text-align: center;
- height: 152rpx;
- align-items: center;
- .item {
- .name {
- color: rgba(16, 16, 16, 1);
- font-size: 32rpx;
- }
- .value {
- color: rgba(16, 16, 16, 1);
- font-size: 48rpx;
- font-weight: bold;
- }
- }
- }
- .body {
- padding: 16rpx;
- }
- }
- .body5data {
- .line {
- display: flex;
- align-items: center;
- justify-content: space-between;
- .data {
- display: flex;
- width: 80%;
- justify-content: space-between;
- .item {
- color: rgba(51, 51, 51, 1);
- font-size: 16px;
- }
- .value {
- color: rgba(119, 119, 119, 1);
- font-size: 16px;
- }
- }
- }
- }
- .body7data {
- .line {
- display: flex;
- align-items: center;
- justify-content: space-between;
- .value {
- width: 33%;
- padding: 16rpx;
- color: rgba(51, 51, 51, 1);
- }
- .value:nth-child(3) {
- text-align: center;
- }
- }
- /* 隔行变色: 偶数行设置背景色 */
- .line:nth-child(odd) {
- background-color: #F2F2F2;
- /* 偶数行 */
- }
- .line:nth-child(even) {
- background-color: #FFFFFF
- /* 奇数行 */
- }
- }
- .body8main {
- .line {
- display: flex;
- align-items: center;
- justify-content: space-between;
- .value {
- width: 33%;
- padding: 16rpx;
- text-align: center;
-
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- }
- /* 隔行变色: 偶数行设置背景色 */
- .line:nth-child(odd) {
- color: rgba(119, 119, 119, 1);
- font-size: 14px;
- /* 偶数行 */
- }
- .line:nth-child(even) {
- color: rgba(16, 16, 16, 1);
- font-size: 16px;
- /* 奇数行 */
- }
- }
- .body6main {
- .line {
- display: flex;
- justify-content: space-between;
- }
- .abnormal-item:last-of-type {
- border-bottom: none !important;
- padding-bottom: 0;
- }
- .abnormal-item {
- width: 100%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 16rpx;
- border-bottom: 1px solid rgba(245, 245, 245, 1);
- .item-title {
- .level {
- color: #fff;
- border-radius: 8rpx;
- font-weight: 400;
- padding: 4rpx 8rpx;
- font-size: 22rpx;
- margin-right: 2px;
- }
- .level1 {
- background: red;
- }
- .level2 {
- background-color: rgba(255, 123, 0, 1);
- }
- color: rgba(51, 51, 51, 1);
- width: 100%;
- .img {
- width: 32rpx;
- height: 32rpx;
- margin-right: 8rpx;
- }
- .name {
- color: rgba(51, 51, 51, 1);
- font-weight: bold;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- .date {
- color: rgba(119, 119, 119, 1);
- font-size: 24rpx;
- }
- }
- .item-value {
- text-align: right;
- display: flex;
- align-items: center;
- .more {
- margin-left: 8rpx;
- }
- .value1 {
- font-weight: bold;
- color: rgba(51, 51, 51, 1);
- }
- .value2 {
- color: rgba(119, 119, 119, 1);
- font-size: 24rpx;
- }
- }
- }
- }
- </style>
|