Browse Source

增加空列表显示

master
parent
commit
70d02391bf
  1. 2
      components/cs-bottom-wrapper/index.vue
  2. 6
      components/cs-dict-tag/index.vue
  3. 50
      components/cs-emty/index.vue
  4. 4
      components/cs-text-more/index.vue
  5. 15
      config.js
  6. 39
      pages/enterprise.vue
  7. 41
      pages/index.vue
  8. 2
      pages/login.vue
  9. 6
      pages/owner.vue
  10. 29
      pages/task.vue
  11. 5
      sub/enterprise/detail.vue
  12. 2
      sub/task/detail.vue
  13. 6
      sub/task/record.vue

2
components/cs-bottom-wrapper/index.vue

@ -29,7 +29,7 @@ export default {
z-index: 99;
border-top: 1px solid #f1f1f4;
.safe {
height: 20px;
height: 40rpx;
}
}
</style>

6
components/cs-dict-tag/index.vue

@ -97,9 +97,9 @@ export default {
color: #99a1b7;
}
.dict-tag {
min-width: 100px;
min-width: 200rpx;
text-align: center;
font-size: 12px;
padding: 4px 20px;
font-size: 24rpx;
padding: 16rpx 40rpx;
}
</style>

50
components/cs-emty/index.vue

@ -0,0 +1,50 @@
<template>
<view class="cs-empty" :style="{ marginTop: marginTop + 'rpx' }">
<image
class="empty-image"
src="/static/images/emty.png"
mode="aspectFit"
/>
<text class="empty-text">{{ text }}</text>
<slot></slot>
</view>
</template>
<script>
export default {
name: 'cs-empty',
props: {
//
text: {
type: String,
default: '暂无数据'
},
//
marginTop: {
type: Number,
default: 0
}
}
}
</script>
<style lang="scss" scoped>
.cs-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #fff;
height: 856rpx;
border-radius: 24rpx;
gap: 24rpx;
.empty-image {
width: 158rpx;
height: 158rpx;
}
.empty-text {
font-size: 32rpx;
color: #99a1b7;
}
}
</style>

4
components/cs-text-more/index.vue

@ -2,7 +2,7 @@
<view :style="{ color }">
<view
style="
font-size: 13px;
font-size: 26rpx;
line-height: 160%;
position: relative;
transform: 0.2s all;
@ -15,7 +15,7 @@
<view
v-else
style="
font-size: 13px;
font-size: 26rpx;
line-height: 160%;
position: relative;
transform: 0.2s all;

15
config.js

@ -1,21 +1,22 @@
// 应用全局配置
module.exports = {
// baseUrl: 'http://188.188.3.166:48080',
// baseUrl: 'http://188.188.5.188:48080',
// baseUrl: 'https://hb.jzce.com',
baseUrl: 'http://188.188.3.232:48080',
// baseUrl: 'http://localhost:48080',
baseApi: '/admin-api',
imgUrl: 'https://hb.jzce.com',
// 应用信息
appInfo: {
// 应用名称
name: "nature-secure-miniapp",
name: 'nature-secure-miniapp',
// 应用版本
version: "1.0.0",
version: '1.0.0',
// 应用logo
logo: "/static/logo.png",
logo: '/static/logo.png',
// 官方网站
site_url: "",
site_url: '',
// 政策协议
agreements: []
}
agreements: [],
},
}

39
pages/enterprise.vue

@ -116,8 +116,9 @@
:status="load"
marginTop="12"
marginBottom="12"
v-if="load == 'nomore'"
v-if="load !== 'nomore'"
/>
<cs-emty v-if="list.length == 0"></cs-emty>
</scroll-view>
</view>
</cs-page>
@ -320,18 +321,18 @@ export default {
.list {
display: flex;
flex-flow: column nowrap;
gap: 12px;
padding: 0 12px;
gap: 24rpx;
padding: 0 24rpx;
}
.enterprise {
padding: 12px;
padding: 24rpx;
background-color: #fff;
border-radius: $cs-border-radius;
gap: 12px;
margin-top: 12px;
gap: 24rpx;
margin-top: 24rpx;
position: relative;
overflow: hidden;
font-size: 12px;
font-size: 24rpx;
.address {
color: $uni-text-color-grey;
}
@ -339,40 +340,40 @@ export default {
background-color: $cs-color-touch;
}
.tagList {
margin-top: 8px;
margin-top: 16rpx;
display: flex;
gap: 4px;
gap: 8rpx;
color: $uni-text-color-grey;
flex-flow: row wrap;
.tag {
font-size: 12px;
font-size: 24rpx;
display: flex;
padding: 2px 6px;
padding: 4rpx 12rpx;
justify-content: center;
align-items: center;
border-radius: 2px;
border-radius: 4rpx;
background: #f9f9f9;
}
}
.audit {
position: absolute;
right: -19px;
top: 6px;
right: -38rpx;
top: 12rpx;
transform: rotateZ(45deg);
transform-origin: 50% 50%;
padding: 4px 20px;
font-size: 12px;
padding: 8rpx 40rpx;
font-size: 24rpx;
text-align: center;
}
}
::v-deep .van-dropdown-menu {
box-shadow: none;
height: 35px;
font-size: 13px;
height: 70rpx;
font-size: 26rpx;
border-bottom: 1px solid #f1f1f4;
}
::v-deep .u-list {
padding: 12px;
padding: 24rpx;
}
</style>

41
pages/index.vue

@ -287,8 +287,12 @@ export default {
const res = await HomeApi.getPieData(this.queryParams)
this.detail = res.data
let curIndex = 0
const split = 1 / this.detail.completionRate.length
const data = this.detail.completionRate.map((item, index) => {
const res = { ...item, color: this.color[curIndex] }
const res = {
...item,
color: `rgba(4, 180, 64,${split * (index + 1)})`
}
curIndex > this.color.length ? 0 : curIndex++
return res
})
@ -384,6 +388,13 @@ export default {
} else {
e.detail.callback(true)
}
},
numFilter(value) {
//
let tempVal = parseFloat(value).toFixed(3)
//
let realVal = tempVal.substring(0, tempVal.length - 1)
return realVal
}
}
}
@ -394,25 +405,25 @@ export default {
height: 100%;
}
.view {
padding: 0 12px;
padding-bottom: 12px;
padding: 0 24rpx;
padding-bottom: 24rpx;
display: flex;
gap: 12px;
gap: 24rpx;
flex-flow: column nowrap;
.box {
padding: 12px;
padding: 24rpx;
background-color: #fff;
border: 1px solid #f9f9f9;
border-radius: 12px;
margin-top: 12px;
border: 2rpx solid #f9f9f9;
border-radius: 24rpx;
margin-top: 24rpx;
&:last-child {
margin-bottom: 12px;
margin-bottom: 24rpx;
}
}
.row-1 {
display: flex;
flex-flow: column nowrap;
gap: 12px;
gap: 24rpx;
}
.people-name {
max-width: 4rem;
@ -423,7 +434,7 @@ export default {
}
.tab {
position: relative;
padding: 4px 16px;
padding: 16rpx 32rpx;
.name {
z-index: 2;
position: inherit;
@ -434,7 +445,7 @@ export default {
position: absolute;
inset: 0;
background-color: #fff;
border-radius: 2px;
border-radius: 4rpx;
transform: translateX(calc(var(--index) * 100%));
transition: 0.2s all;
z-index: 1;
@ -443,8 +454,8 @@ export default {
}
::v-deep .van-dropdown-menu {
box-shadow: none;
height: 35px !important;
font-size: 13px;
border-bottom: 1px solid #f1f1f4;
height: 70rpx !important;
font-size: 26rpx;
border-bottom: 2rpx solid #f1f1f4;
}
</style>

2
pages/login.vue

@ -131,7 +131,7 @@ export default {
justify-content: center;
align-items: center;
flex-flow: column nowrap;
gap: 20px;
gap: 40rpx;
background: var(--LightMode-Success-Success, #17c653);
.title {

6
pages/owner.vue

@ -221,14 +221,14 @@ export default {
.header {
display: flex;
flex-flow: row nowrap;
gap: 10px;
gap: 20rpx;
align-items: center;
.title {
font-size: 16px;
font-size: 32rpx;
}
}
.owner-container {
padding: 10px;
padding: 20rpx;
height: 100%;
.section {
border-radius: $cs-border-radius;

29
pages/task.vue

@ -128,8 +128,9 @@
:status="load"
marginTop="12"
marginBottom="12"
v-if="load == 'nomore'"
v-if="load !== 'nomore'"
/>
<cs-emty v-if="list.length == 0"></cs-emty>
</scroll-view>
</view>
</cs-page>
@ -307,17 +308,17 @@ export default {
overflow: hidden;
}
.list {
padding: 0 12px;
padding: 0 24rpx;
}
.enterprise {
padding: 12px;
padding: 24rpx;
background-color: #fff;
border-radius: $cs-border-radius;
gap: 12px;
margin-top: 12px;
gap: 24rpx;
margin-top: 24rpx;
position: relative;
overflow: hidden;
font-size: 12px;
font-size: 24rpx;
&:active {
background-color: $cs-color-touch;
}
@ -325,18 +326,18 @@ export default {
color: $uni-text-color-grey;
}
.tagList {
margin-top: 8px;
margin-top: 16rpx;
display: flex;
gap: 4px;
gap: 8rpx;
color: $uni-text-color-grey;
display: flex;
.tag {
font-size: 12px;
font-size: 24rpx;
display: flex;
padding: 2px 6px;
padding: 4rpx 12rpx;
justify-content: center;
align-items: center;
border-radius: 2px;
border-radius: 4rpx;
background: #f9f9f9;
}
}
@ -353,13 +354,13 @@ export default {
}
::v-deep .van-dropdown-menu {
box-shadow: none;
height: 35px !important;
font-size: 13px;
height: 70rpx !important;
font-size: 26rpx;
border-bottom: 1px solid #f1f1f4;
}
::v-deep .u-list {
padding: 12px;
padding: 24rpx;
}
::v-deep .u-count-num {

5
sub/enterprise/detail.vue

@ -126,10 +126,9 @@
</view>
</cs-bottom-wrapper>
<cs-bottom-wrapper v-else>
<cs-bottom-wrapper v-if="isChange">
<view class="operation">
<view class="btn green" v-if="isChange">认领该企业</view>
<view class="btn red" v-else>删除该企业</view>
<view class="btn green" >认领该企业</view>
</view>
</cs-bottom-wrapper>

2
sub/task/detail.vue

@ -170,6 +170,8 @@
marginBottom="12"
v-if="load != 'nomore'"
/>
<cs-emty v-if="list.length == 0"></cs-emty>
<view class="btn-box" v-if="isSelect.length > 0">
<view class="confirm-btn" @tap="replay">
已选择({{ isSelect.length }})

6
sub/task/record.vue

@ -34,7 +34,7 @@
</view>
<view
style="
font-size: 13px;
font-size: 26rpx;
line-height: 160%;
position: relative;
transform: 0.2s all;
@ -46,7 +46,7 @@
<view
v-else
style="
font-size: 13px;
font-size: 26rpx;
line-height: 160%;
position: relative;
transform: 0.2s all;
@ -58,7 +58,7 @@
? detail.description
: `${detail.description.slice(1, 20)}...`
}}
<text style="color: #17c653; padding-left: 4px">
<text style="color: #17c653; padding-left: 8rpx">
{{ isShowAllText ? '收起' : '展开' }}
</text>
</view>

Loading…
Cancel
Save