123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498 |
- <!-- 数据看板-设备管控 -->
- <template>
- <view class="equipmentControl">
- <view class="statistics">
- <view class="statistics-b">
- <view class="statistics-b-li">
- <view class="statistics-b-li-t color-A">99</view>
- <view class="statistics-b-li-b">设备总数</view>
- </view>
- <view class="line"></view>
- <view class="statistics-b-li">
- <view class="statistics-b-li-t color-B">16</view>
- <view class="statistics-b-li-b">今日新增设备</view>
- </view>
- <view class="line"></view>
- <view class="statistics-b-li">
- <view class="statistics-b-li-t color-C">33</view>
- <view class="statistics-b-li-b">超期服役设备</view>
- </view>
- </view>
- </view>
- <view class="small-title">
- <view class="small-title-l">超期服役排行TOP5</view>
- <img class="small-title-r" @click="goPage('overdue')" src="@/pages/images/icon_wdwg_gd.png">
- </view>
- <view class="chart">
- <view class="chart-b">
- <qiun-data-charts type="bar" :opts="opts" :echartsH5="true" :chartData="chartData" />
- </view>
- </view>
- <view class="small-title">
- <view class="small-title-l">设备使用寿命</view>
- <img class="small-title-r" @click="goPage('life')" src="@/pages/images/icon_wdwg_gd.png">
- </view>
- <view class="chart-tow">
- <view class="chart-tow-b">
- <qiun-data-charts type="funnel" :opts="optsTow" :echartsH5="true" :chartData="chartDataTow" />
- </view>
- </view>
- <view class="small-title">
- <view class="small-title-l">特种设备与常规冷热设备安全隐患统计</view>
- </view>
- <view class="small-title-tow">
- <view class="small-title-tow-l">安全检查校级巡查计划标题标题标题标题标题</view>
- <img class="small-title-tow-r" src="@/pages/images/dataBoard/icon_06.png">
- </view>
- <view class="chart-three">
- <view class="chart-three-b">
- <qiun-data-charts type="pie" :opts="optsThree" :echartsH5="true" :chartData="chartDataThree" />
- </view>
- </view>
- <view class="chart-title">
- <view class="chart-title-l">安全指标</view>
- <view class="chart-title-r">占比</view>
- </view>
- <view class="list" v-for="(item,index) in dataList" :key="index">
- <view class="list-title">
- <view class="list-title-l">{{item.data1}}</view>
- <view class="list-title-r">{{item.data2}}</view>
- </view>
- <view class="list-li" v-for="(item2,index2) in item.child" :key="index2">{{item2.name}}</view>
- </view>
- </view>
- </template>
- <script>
- import {
- config
- } from '@/api/request/config.js'
- import {
- } from '@/pages_basics/api/index.js'
- export default {
- name: "equipmentControl",
- components: {
- },
- data() {
- return {
- opts: {
- color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
- "#ea7ccc"
- ],
- padding: [15, 30, 0, 5],
- enableScroll: false,
- legend: {
- show: false,
- },
- xAxis: {
- disabled: true,
- disableGrid: true,
- axisLine: false,
- },
- yAxis: {
- disabled: false,
- disableGrid: true,
- data: [],
- },
- extra: {
- bar: {
- type: "group",
- width: 20,
- meterBorde: 1,
- meterFillColor: "#FFFFFF",
- activeBgColor: "#000000",
- activeBgOpacity: 0.08,
- linearType: "custom",
- barBorderCircle: true,
- seriesGap: 2,
- categoryGap: 2
- }
- }
- },
- chartData: {},
- optsTow: {
- color: ["#0183FA", "#38F0F0", "#2CCA73", "#FC6E21", "#FF4646", ],
- legend: {
- show: false,
- },
- padding: [15, 15, 10, 15],
- enableScroll: false,
- extra: {
- funnel: {
- type: 'triangle',
- border: false,
- labelAlign: "right",
- }
- }
- },
- chartDataTow: {},
- optsThree: {
- color: ["#10C139", "#FF8400", "#00FFE6", "#0183FA", "#73C0DE", "#3CA272",],
- legend: {
- show: false,
- },
- padding: [5, 5, 5, 5],
- enableScroll: false,
- extra: {
- pie: {
- offsetAngle: 0,
- labelWidth: 15,
- border: true,
- borderWidth: 3,
- borderColor: "#3E414F",
- }
- }
- },
- chartDataThree: {},
- // 查询参数
- queryParams: {
- page: 1,
- pageSize: 10,
- },
- dataList: [{
- data1: '13.4加热及制冷装置管理',
- data2: '40%',
- child: [{
- name: '13.4.1 冰箱、烘箱、马弗炉等周围堆放杂物',
- },
- {
- name: '13.4.3 烘箱叠放',
- },
- ]
- },
- {
- data1: '13.4加热及制冷装置管理',
- data2: '40%',
- child: [{
- name: '13.4.1 冰箱、烘箱、马弗炉等周围堆放杂物',
- },
- {
- name: '13.4.3 烘箱叠放',
- },
- ]
- },
- ],
- total: 0,
- }
- },
- created() {
- },
- beforeMount() {
- },
- mounted() {
- this.getServerData();
- this.getServerDataTow();
- this.getServerDataThree();
- },
- methods: {
- getServerData() {
- //模拟从服务器获取数据时的延时
- setTimeout(() => {
- //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
- let res = {
- categories: ["化学与药学院", "化学与药学院", "化学与药学院", "化学与药学院", "化学与药学院"],
- series: [{
- name: "目标值",
- textColor: '#fff',
- data: [35, 36, 31, 33, 13]
- }, ]
- };
- this.chartData = JSON.parse(JSON.stringify(res));
- }, 500);
- },
- getServerDataTow() {
- //模拟从服务器获取数据时的延时
- setTimeout(() => {
- //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
- let res = {
- series: [{
- data: [{
- "name": "一班",
- "value": 50
- }, {
- "name": "二班",
- "value": 40,
- }, {
- "name": "三班",
- "value": 30,
- }, {
- "name": "四班",
- "value": 20,
- }, {
- "name": "五班",
- "value": 10,
- }]
- }]
- };
- this.chartDataTow = JSON.parse(JSON.stringify(res));
- }, 500);
- },
- getServerDataThree() {
- //模拟从服务器获取数据时的延时
- setTimeout(() => {
- //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
- let res = {
- series: [{
- data: [{
- "name": "一班",
- "value": 50
- }, {
- "name": "二班",
- "value": 30
- }, {
- "name": "三班",
- "value": 20
- }, {
- "name": "四班",
- "value": 18
- }, {
- "name": "五班",
- "value": 8
- }]
- }]
- };
- this.chartDataThree = JSON.parse(JSON.stringify(res));
- }, 500);
- },
- dateClick(index) {
- this.dateIndex = index;
- },
- goPage(type) {
- if (type == 'overdue') {
- uni.navigateTo({
- url: '/pages/views/dataBoard/equipmentControlOverdue?pageType=1'
- });
- } else if (type == 'life') {
- uni.navigateTo({
- url: '/pages/views/dataBoard/equipmentControlOverdue?pageType=2'
- });
- }
- },
- },
- }
- </script>
- <style lang="stylus" scoped>
- .equipmentControl {
- height: 100%;
- width: 100%;
- background: #363744;
- padding: 2rpx 0rpx 0;
- box-sizing: border-box;
- .statistics {
- width: 750rpx;
- height: 120rpx;
- background: #3E414F;
- .statistics-b {
- display: flex;
- justify-content: space-between;
- align-items: center;
- .statistics-b-li {
- flex: 1;
- text-align: center;
- .statistics-b-li-t {
- font-weight: 400;
- font-size: 36rpx;
- line-height: 50rpx;
- margin-top: 10rpx;
- }
- .statistics-b-li-b {
- font-weight: 400;
- font-size: 24rpx;
- color: #FFFFFF;
- line-height: 34rpx;
- margin-top: 9rpx;
- }
- }
- .line {
- width: 2rpx;
- height: 30rpx;
- background: #D8D8D8;
- }
- .color-A {
- color: #0183FA;
- }
- .color-B {
- color: #FF0000;
- }
- .color-C {
- color: #FFAA00;
- }
- }
- }
- .small-title {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin: 0 30rpx;
- .small-title-l {
- font-weight: 400;
- font-size: 32rpx;
- color: #FFFFFF;
- line-height: 45rpx;
- text-align: left;
- margin: 28rpx 0;
- }
- .small-title-r {
- width: 15rpx;
- height: 18rpx;
- }
- }
- .chart {
- width: 690rpx;
- height: 476rpx;
- background: #3E414F;
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- margin: 0 30rpx;
- .chart-b {
- width: 690rpx;
- height: 476rpx;
- }
- }
- .chart-tow {
- width: 690rpx;
- height: 436rpx;
- background: #3E414F;
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- margin: 0 30rpx;
- .chart-tow-b {
- width: 690rpx;
- height: 436rpx;
- }
- }
- .small-title-tow {
- width: 750rpx;
- height: 80rpx;
- background: #3E414F;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 20rpx 0 30rpx;
- box-sizing: border-box;
- margin-top: 2rpx;
- .small-title-tow-l {
- flex: 1;
- font-weight: 400;
- font-size: 30rpx;
- color: #FFFFFF;
- line-height: 42rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .small-title-tow-r {
- width: 14rpx;
- height: 8rpx;
- }
- }
- .chart-three {
- width: 690rpx;
- height: 394rpx;
- background: #3E414F;
- border-radius: 20rpx 20rpx 0rpx 0rpx;
- margin: 34rpx 30rpx 0;
- .chart-three-b {
- width: 690rpx;
- height: 394rpx;
- }
- }
- .chart-title {
- width: 689rpx;
- height: 80rpx;
- background: rgba(162, 162, 162, 0.2);
- border-radius: 0rpx 0rpx 0rpx 0rpx;
- padding: 0 70rpx 0 38rpx;
- box-sizing: border-box;
- margin: 0 30rpx;
- display: flex;
- justify-content: space-between;
- .chart-title-l {
- font-weight: 400;
- font-size: 30rpx;
- color: #FFFFFF;
- line-height: 80rpx;
- }
- .chart-title-r {
- font-weight: 400;
- font-size: 30rpx;
- color: #FFFFFF;
- line-height: 80rpx;
- }
- }
- .list {
- margin: 0 30rpx;
- padding: 0 30rpx;
- box-sizing: border-box;
- .list-title {
- height: 80rpx;
- display: flex;
- justify-content: space-between;
- border-bottom: 1rpx dashed rgba(216, 216, 216, 0.2);
- padding: 0 38rpx 0 10rpx;
- box-sizing: border-box;
- .list-title-l {
- font-weight: 400;
- font-size: 28rpx;
- color: #FFFFFF;
- line-height: 80rpx;
- }
- .list-title-r {
- font-weight: 400;
- font-size: 28rpx;
- color: #0183FA;
- line-height: 80rpx;
- }
- }
- .list-li {
- height: 80rpx;
- display: flex;
- justify-content: space-between;
- padding: 0 38rpx 0 10rpx;
- box-sizing: border-box;
- font-weight: 400;
- font-size: 28rpx;
- color: #999999;
- line-height: 80rpx;
- text-align: left;
- }
- }
- }
- </style>
|