zzy 0cd090c677 1、微信小程序首页面布局模式改成从接口获取
2、增加测试模块,内部人员无需配置权限就可以查看
2022-09-07 11:29:46 +08:00

204 lines
7.3 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="page-body">
<!-- 顶部信息卡片 -->
<view class="card-header">
<!-- 顶部信息卡片第一行 -->
<view class="uni-flex ai-center jc-between fs12">
<!-- 左侧 -->
<span>业主单位名称{{dataDetail.OWNERUNIT_NAME || ''}}</span>
</view>
<!-- 顶部信息卡片第二行 -->
<view class="uni-flex ai-center jc-between fs12">
<!-- 左侧 -->
<span>经营品牌{{dataDetail.BRAND_NAME || ''}}</span>
<!-- 右侧 -->
<span>经营业态{{dataDetail.BUSINESS_TRADENAME || ''}}</span>
</view>
</view>
<!-- 详情信息 -->
<view class="modle-title">
<h2>测试接口</h2>
</view>
<!-- 详情信息卡片 -->
<view class="content-detail-box main-card ino-flex ai-center uni-column">
<!-- 单列样式 -->
<!-- 业主单位名称 -->
<view class="cellTopStyle">
<span class="fourth-name">业主单位名称</span>
<span>{{dataDetail.OWNERUNIT_NAME || ''}}</span>
</view>
<!-- 经营品牌 -->
<view class="cellTopStyle">
<span class="fourth-name">经营品牌</span>
<span>{{dataDetail.BRAND_NAME || ''}}</span>
</view>
<!-- 经营业态 -->
<view class="cellTopStyle">
<span class="fourth-name">经营业态</span>
<span>{{dataDetail.BUSINESS_TRADENAME || ''}}</span>
</view>
<!-- 门店数量 -->
<view class="cellTopStyle">
<span class="fourth-name">门店数量</span>
<span>{{dataDetail.BUSINESS_STATE !== null ?
dataDetail.BUSINESS_STATE : ''}}</span>
</view>
<!-- 自营门店数量 -->
<view class="cellTopStyle">
<span class="fourth-name">自营门店数量</span>
<span>{{dataDetail.BUSINESS_TYPE_1000 !== null ?
dataDetail.BUSINESS_TYPE_1000 : ''}}</span>
</view>
<!-- 合作经营数量 -->
<view class="cellTopStyle">
<span class="fourth-name">合作经营数量</span>
<span>{{dataDetail.BUSINESS_TYPE_2000 !== null ?
dataDetail.BUSINESS_TYPE_2000 : ''}}</span>
</view>
<!-- 固定租金数量 -->
<view class="cellTopStyle">
<span class="fourth-name">固定租金数量</span>
<span>{{dataDetail.BUSINESS_TYPE_3000 !== null ?
dataDetail.BUSINESS_TYPE_3000 : ''}}</span>
</view>
<!-- 展销门店数量 -->
<view class="cellTopStyle">
<span class="fourth-name">展销门店数量</span>
<span>{{dataDetail.BUSINESS_TYPE_4000 !== null ?
dataDetail.BUSINESS_TYPE_4000 : ''}}</span>
</view>
<!-- 在营数量 -->
<view class="cellTopStyle">
<span class="fourth-name">在营数量</span>
<span>{{dataDetail.BUSINESS_STATE_1000 !== null ?
dataDetail.BUSINESS_STATE_1000 : ''}}</span>
</view>
<!-- 暂停数量 -->
<view class="cellTopStyle">
<span class="fourth-name">暂停数量</span>
<span>{{dataDetail.BUSINESS_STATE_2000 !== null ?
dataDetail.BUSINESS_STATE_2000 : ''}}</span>
</view>
<!-- 停业数量 -->
<view class="cellTopStyle">
<span class="fourth-name">停业数量</span>
<span>{{dataDetail.BUSINESS_STATE_3000 !== null ?
dataDetail.BUSINESS_STATE_3000 : ''}}</span>
</view>
<!-- 待运营数量 -->
<view class="cellTopStyle">
<span class="fourth-name">待运营数量</span>
<span>{{dataDetail.BUSINESS_STATE_1010 !== null ?
dataDetail.BUSINESS_STATE_1010 : ''}}</span>
</view>
</view>
</view>
</template>
<script>
import {mapGetters,mapMutations} from 'vuex'
export default {
data() {
return {
pageData: {
type: null,
id: null
},
loading: true,
dataDetail: {},
}
},
methods: {
...mapMutations(['shouldReLoadingList']),
/**
* 调用接口获取数据详情
*
* Api接口地址EShangApiMain/AutoTest/GetServerpartshopTotalSummary
*/
getDetail(option) {
this.$request.$webGet("EShangApiMain/AutoTest/GetServerpartshopTotalSummary", {
//这里设置接口参数
BUSINESS_BRAND: option.BUSINESS_BRAND,
BUSINESS_TRADE: option.BUSINESS_TRADE,
OWNERUNIT_ID: option.OWNERUNIT_ID,
})
.then(res => {
uni.hideLoading()
this.loading = false
if (res.Result_Code !== 100) {
return
}
this.dataDetail = res.Result_Data.List.length > 0 ? res.Result_Data.List[0] : null
})
},
},
onLoad(option) {
uni.showLoading()
this.pageData = option
this.loading = true
this.getDetail(option)
this.$forceUpdate()
}
}
</script>
<style scoped>
.page-body {
min-height: 100%;
padding: 40rpx 25rpx;
background-color: #fff;
box-sizing: border-box;
padding-bottom: 196rpx;
}
.card-header {
border-radius: 10rpx;
margin: 0 26rpx 22rpx 26rpx;
background: linear-gradient(to right, #8998bb 0%, #a9b5d2 100%);
color: #FFFFFF;
padding: 24rpx 16rpx;
}
.card-header h3 {
padding-bottom: 10rpx;
font-size: 30rpx;
}
.card-header .fs12>text {
font-size: 24rpx;
}
.cellTopStyle {
line-height: 45rpx;
width: 100%;
display: flex;
align-items: center; //上下对齐
justify-content: space-between; //两端对齐
}
.fourth-name {
min-width: 120rpx;
max-width: 140rpx;
color: #ADB2BF;
font-size: 26rpx;
white-space: nowrap;
}
.modle-title {
color: #000;
padding: 36rpx 30rpx 24rpx 30rpx;
font-size: 26rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.modle-title h2 {
font-weight: bolder;
}
.content-detail-box {
margin: 0 26rpx 22rpx 26rpx;
background: #ffffff;
border-radius: 8rpx;
box-shadow: 0rpx 2rpx 8rpx 0rpx rgba(231, 231, 231, 0.67);
overflow: hidden;
position: relative;
padding: 10rpx 30rpx 16rpx 30rpx;
font-size: 26rpx;
}
.content-detail-box span {
font-size: 26rpx;
}
</style>