123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- <template>
- <view>
- <view class="top">
- <image src="./icon/top.png" mode="widthFix"></image>
- </view>
- <view class="total">
- <view class="title">分站总数</view>
- <view class="num">
- <text>{{total}}</text>个
- </view>
- </view>
- <view class="section">
- <view class="title">
- <view class="line"></view>
- <view class="text">分站信息列表</view>
- </view>
- <view class="table">
- <uni-table emptyText="暂无更多数据">
- <uni-tr>
- <uni-th align="center">编号</uni-th>
- <uni-th align="center">状态</uni-th>
- </uni-tr>
- <uni-tr v-for="(item,index) in table" :key="index">
- <uni-td style="text-align: center;vertical-align: middle;">{{item.site_num}}</uni-td>
- <uni-td style="text-align: center;vertical-align: middle;">
- <view class="state">
- <image src="./icon/icon_1.png" mode="widthFix" v-if="item.site_status == '通讯正常'"></image>
- <image src="./icon/icon_2.png" mode="widthFix" v-if="item.site_status == '通迅故障'"></image>
- <text>{{item.site_status}}</text>
- </view>
- </uni-td>
- </uni-tr>
- </uni-table>
- </view>
- </view>
- </view>
- </template>
- <script>
- import "@/common/time.js"
- export default {
- data() {
- return {
- total: 0,
- single: "",
- chartData_1: {},
- chartData_2: {},
- table: [],
- opts_1: {
- color: ["#FF7C7C", "#FCC524"],
- legend: {},
- extra: {
- column: {
- width: 15,
- }
- }
- },
- opts_2: {
- color: ["#00A1E9"],
- legend: {
- show: false
- },
- extra: {
- column: {
- width: 25,
- }
- }
- }
- };
- },
- onLoad() {
- console.log()
- // 获取今天的日期
- this.single = new Date().format("yyyy-MM-dd");
- this.getServerData()
- },
- methods: {
- getServerData() {
- setTimeout(() => {
- uni.showLoading({
- mask: true
- })
- this.$api.getSiteCurrInfoList({
- mine_code: "zaoquan",
- }).then((res) => {
- uni.hideLoading()
- console.log(res)
- this.total = res.data.total
- this.table = res.data.list
- })
- }, 10);
- },
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: #F5F6F8;
- }
- .top {
- margin-top: -60rpx;
- image {
- width: 750rpx;
- }
- }
- .total {
- position: relative;
- z-index: 1;
- margin: -200rpx auto 60rpx;
- width: 440rpx;
- height: 80rpx;
- background: rgba(0, 161, 233, 0.3);
- border: 2rpx solid #FFFFFF;
- border-radius: 40px;
- display: flex;
- align-items: center;
- justify-content: center;
- font-weight: 700;
- color: #fff;
- .title {
- margin-right: 20rpx;
- }
- .num {
- text {
- font-size: 42rpx;
- }
- }
- }
- .section {
- position: relative;
- z-index: 1;
- margin: 0rpx auto 30rpx;
- width: 680rpx;
- min-height: 400rpx;
- background: #FFFFFF;
- border-radius: 30rpx;
- box-sizing: border-box;
- padding: 20rpx;
- box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
-
- .title {
- height: 60rpx;
- line-height: 60rpx;
- font-size: 30rpx;
- font-weight: 700;
- display: flex;
- align-items: center;
- .line {
- width: 8rpx;
- height: 30rpx;
- background-color: #00A1E9;
- border-radius: 20rpx;
- margin-right: 10rpx;
- }
- .text {}
- }
- .table {
- margin: 20rpx 0;
- .state{
- display: flex;
- align-items: center;
- justify-content: center;
- image{
- margin-right: 10rpx;
- width: 34rpx;
- height: 34rpx;
- }
- }
- /deep/.uni-table-tr {
- background-color: #F2FAFE;
- }
- /deep/.uni-table-th {
- border: none;
- background-color: #fff;
- }
- /deep/.uni-table-td {
- color: #000;
- font-size: 28rpx;
- font-weight: 700;
- padding: 30rpx 0;
- border-bottom: 8rpx solid #fff;
- }
- /deep/.table--border {
- border: none;
- }
- }
- }
- </style>
|