123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446 |
- <template>
- <view>
- <view class="top">
- <image src="../img/top.jpg" mode="widthFix"></image>
- </view>
- <view class="container">
- <view class="btn">
- <view class="left">
- <view class="icon">
- <image src="../img/btn_icon.png" mode="widthFix"></image>
- </view>
- <view class="title">
- 通风智能决策及控制系统
- </view>
- </view>
- <!-- <view class="right">
- <uni-icons type="arrowright" color="#FFF"></uni-icons>
- </view> -->
- </view>
- <view class="info">
- <view class="chart">
- <view class="charts-box">
- <qiun-data-charts type="ring" :opts="opts_1" :chartData="chartData_1" />
- </view>
- <view class="charts-box">
- <qiun-data-charts type="ring" :opts="opts_2" :chartData="chartData_2" />
- </view>
- </view>
- <view class="box">
- <view class="item" v-for="(item,index) in info" :key="index">
- <view class="label">{{item.label}}</view>
- <view class="value">{{item.value}}</view>
- </view>
- </view>
- </view>
- <view class="content">
- <view class="section" v-for="(item,index) in list" :key="index">
- <view class="title">
- <view class="left">{{item.title}}</view>
- <view class="right" @click="goto_url(item)">点击查看详情</view>
- </view>
- <view class="inner">
- <view class="item" v-for="(item_2,index_2) in item.info" :key="index_2">
- <view class="label">{{item_2.label}}</view>
- <view class="value">
- <view class="state" :style="{'backgroundColor':item_2.state == 1?'#00BD00':'#D6000F'}">
- </view>
- <view class="text">{{item_2.text}}</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- chartData_1: {
- series: [{
- data: [{
- "name": "有效风",
- "value": 0
- }, {
- "name": "无效风",
- "value": 0
- }]
- }]
- },
- opts_1: {
- color: ["#00FF00", "#FFFF00"],
- dataLabel: false,
- legend: {
- show: true,
- fontColor: "#FFF",
- fontSize: 10,
- position: "bottom",
- margin: 0,
- padding: 0
- },
- title: {
- name: "90%",
- fontSize: 12,
- color: "#FFF"
- },
- subtitle: {
- name: "有效风率",
- fontSize: 10,
- color: "#FFF"
- },
- extra: {
- ring: {
- centerColor: "#34ADFE",
- ringWidth: 20,
- border: false,
- }
- }
- },
- chartData_2: {
- series: [{
- data: [{
- "name": "供风量",
- "value": 16052
- }, {
- "name": "需风量",
- "value": 15052
- }]
- }]
- },
- opts_2: {
- color: ["#51FFF1", "#FFB944"],
- dataLabel: false,
- legend: {
- show: true,
- fontColor: "#FFF",
- fontSize: 10,
- position: "bottom",
- margin: 0,
- padding: 0
- },
- title: {
- name: "1.07",
- fontSize: 12,
- color: "#FFF"
- },
- subtitle: {
- name: "供需比",
- fontSize: 10,
- color: "#FFF"
- },
- extra: {
- ring: {
- centerColor: "#34ADFE",
- ringWidth: 20,
- border: false,
- }
- }
- },
- info: [{
- label: "自动风门",
- value: "2扇"
- },
- {
- label: "自动风窗",
- value: "2扇"
- },
- {
- label: "变频风扇",
- value: "6扇"
- }
- ],
- list: [{
- title: "东井通风机",
- sys_code: "east",
- info: [{
- label: "1#风机",
- state: 0,
- text: "停止"
- },
- {
- label: "2#风机",
- state: 1,
- text: "运行"
- }
- ]
- },
- {
- title: "西井通风机",
- sys_code: "west",
- info: [{
- label: "1#风机",
- state: 0,
- text: "停止"
- },
- {
- label: "2#风机",
- state: 1,
- text: "运行"
- }
- ]
- },
- {
- title: "1314 立井通风机",
- sys_code: "1314",
- info: [{
- label: "1#风机",
- state: 1,
- text: "运行"
- },
- {
- label: "2#风机",
- state: 0,
- text: "停止"
- }
- ]
- },
- {
- title: "220708 辅助巷通风机",
- sys_code: "220708fzx",
- info: [{
- label: "1#风机",
- state: 1,
- text: "运行"
- },
- {
- label: "2#风机",
- state: 0,
- text: "停止"
- }
- ]
- },
- {
- title: "220708 胶带巷通风机",
- sys_code: "220708jdx",
- info: [{
- label: "1#风机",
- state: 1,
- text: "运行"
- },
- {
- label: "2#风机",
- state: 0,
- text: "停止"
- }
- ]
- }
- ],
- };
- },
- mounted() {
- this.getServerData()
- },
- methods: {
- getServerData() {
- this.$api.zaoquan_dcs_getFan({
- sys_code: "index"
- }).then((res) => {
- console.log(res.data)
-
- this.chartData_1 = res.data.chartData_1
- this.chartData_2 = res.data.chartData_2
- this.info = res.data.info
- this.list = res.data.list
- })
- },
- goto_url(item) {
- let zhutongfeng = ["east", "west", "1314","5fq"]
- if (zhutongfeng.includes(item.sys_code)) {
- uni.navigateTo({
- url: "./main_ventilation/main_ventilation" + "?title=" + item.title + "&sys_code=" + item
- .sys_code
- })
- } else {
- uni.navigateTo({
- url: "./local_ventilation/local_ventilation" + "?title=" + item.title + "&sys_code=" + item
- .sys_code
- })
- }
- }
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: #F7F7F7;
- }
- .top {
- margin-top: -80rpx;
- image {
- width: 750rpx;
- }
- }
- .container {
- margin: -900rpx 0 0 0;
- position: relative;
- .btn {
- margin: 0 auto;
- width: 680rpx;
- height: 120rpx;
- background-image: url("../img/btn.png");
- background-size: cover;
- display: flex;
- align-items: center;
- justify-content: space-between;
- box-sizing: border-box;
- padding: 0 40rpx;
- .left {
- display: flex;
- align-items: center;
- .icon {
- margin-right: 20rpx;
- font-size: 0;
- image {
- width: 36rpx;
- }
- }
- .title {
- font-size: 34rpx;
- font-weight: 700;
- color: #FFF;
- }
- }
- .right {
- font-weight: 700;
- }
- }
- .info {
- margin: 25rpx;
- padding-bottom: 20rpx;
- background-color: #34ADFE40;
- border-radius: 16rpx;
- .chart {
- display: flex;
- .charts-box {
- width: 50%;
- height: 300rpx;
- }
- }
- .box {
- margin: 20rpx 40rpx;
- box-sizing: border-box;
- display: flex;
- justify-content: space-between;
- .item {
- font-size: 26rpx;
- display: flex;
- .label {
- color: #FFF;
- }
- .value {
- margin-left: 20rpx;
- color: #FFFF00;
- }
- }
- }
- }
- .content {
- background-color: #F7F7F7;
- border-radius: 35rpx 35rpx 0 0;
- box-sizing: border-box;
- padding: 35rpx;
- .section {
- margin-bottom: 40rpx;
- border-radius: 14rpx;
- overflow: hidden;
- .title {
- background: linear-gradient(-90deg, #FFFFFF, #E6FAFF);
- display: flex;
- align-items: flex-end;
- justify-content: space-between;
- box-sizing: border-box;
- padding: 24rpx;
- .left {
- border-left: 6rpx solid #33C777;
- padding-left: 10rpx;
- font-size: 34rpx;
- font-weight: 700;
- color: #343434;
- }
- .right {
- font-size: 22rpx;
- color: #3394F9;
- }
- }
- .inner {
- background-color: #FFFFFF;
- padding: 30rpx 20rpx;
- display: grid;
- grid-template-columns: repeat(2, 1fr);
- gap: 0 40rpx;
- .item {
- display: flex;
- align-items: center;
- justify-content: space-around;
- line-height: 60rpx;
- .label {
- width: 140rpx;
- color: #8D8D8D;
- font-size: 26rpx;
- }
- .value {
- display: flex;
- align-items: center;
- .state {
- width: 30rpx;
- height: 30rpx;
- background: #D6000F;
- border-radius: 6rpx;
- }
- .text {
- margin-left: 20rpx;
- font-size: 26rpx;
- }
- }
- }
- }
- }
- }
- }
- </style>
|