Browse Source

执法记录详情空列表占位

master
parent
commit
a793e7ef20
  1. 9
      pages/enterprise.vue
  2. 11
      pages/index.vue
  3. 5
      pages/task.vue
  4. 3
      sub/enterprise/detail.vue
  5. 1
      sub/inspection/record.vue
  6. 96
      sub/owner/jobInfo.vue
  7. 8
      sub/task/detail.vue
  8. 1
      sub/task/enforce.vue
  9. 8
      sub/task/locate.vue
  10. 1
      sub/task/record.vue
  11. 21
      uni_modules/s-components/s-header/index.vue
  12. 54
      wxcomponents/vant/common/style/hairline.wxss
  13. 166
      wxcomponents/vant/field/index.wxss
  14. 2
      wxcomponents/vant/search/index.wxss

9
pages/enterprise.vue

@ -355,6 +355,9 @@ export default {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
font-size: 24rpx; font-size: 24rpx;
&:last-child {
margin-bottom: 48rpx;
}
.address { .address {
color: $uni-text-color-grey; color: $uni-text-color-grey;
white-space: nowrap; white-space: nowrap;
@ -385,7 +388,7 @@ export default {
height: fit-content !important; height: fit-content !important;
font-size: 26rpx; font-size: 26rpx;
justify-content: space-between; justify-content: space-between;
// padding: 12rpx 24rpx; padding: 12rpx 24rpx;
} }
} }
::v-deep .van-search { ::v-deep .van-search {
@ -396,10 +399,14 @@ export default {
align-items: center; align-items: center;
.van-icon { .van-icon {
font-size: 40rpx; font-size: 40rpx;
font-weight: bold;
} }
.van-field__body { .van-field__body {
height: 100%; height: 100%;
} }
.select-title {
font-size: 26rpx;
}
} }
} }
::v-deep .u-list { ::v-deep .u-list {

11
pages/index.vue

@ -236,7 +236,7 @@ export default {
if (!this.$roles.checkRole(['director'])) { if (!this.$roles.checkRole(['director'])) {
this.queryParams.deptId = this.$store.getters.deptId this.queryParams.deptId = this.$store.getters.deptId
} }
await this.init() // await this.init()
}, },
onReady() { onReady() {
this.$nextTick(() => { this.$nextTick(() => {
@ -326,8 +326,7 @@ export default {
colorMap.push(color) colorMap.push(color)
return res return res
}) })
colorMap.push('#F9F9F9') this.color = [...colorMap, '#F9F9F9']
this.color = colorMap
this.detail.legendData = data this.detail.legendData = data
this.setPieData(data, this.detail.taskCompletionRate) this.setPieData(data, this.detail.taskCompletionRate)
this.getList() this.getList()
@ -385,7 +384,7 @@ export default {
this.chartData = { this.chartData = {
series: [ series: [
{ {
data: [...pieData] data: pieData
} }
] ]
} }
@ -422,8 +421,8 @@ export default {
return realVal return realVal
}, },
getGradientColor(index, total) { getGradientColor(index, total) {
const opacity = 1 - index / total + 0.1 let opacity = 1 - index / total + 0.1
return `rgba(4, 180, 64, ${opacity})` return `rgba(4, 180, 64, ${opacity > 1 ? 1 : opacity})`
} }
} }
} }

5
pages/task.vue

@ -324,7 +324,10 @@ export default {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
font-size: 24rpx; font-size: 24rpx;
border: 1px solid var(--LightMode-Grey-Grey-100, #f9f9f9); border: 2rpx solid var(--LightMode-Grey-Grey-100, #f9f9f9);
&:last-child {
margin-bottom: 48rpx;
}
&:active { &:active {
background-color: $cs-color-touch; background-color: $cs-color-touch;
} }

3
sub/enterprise/detail.vue

@ -110,7 +110,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="status"> <view class="status" v-if="prove.status != 1">
<cs-dict-tag <cs-dict-tag
:dict="dictMap.enterprise_qualification_status" :dict="dictMap.enterprise_qualification_status"
:value="prove.status" :value="prove.status"
@ -373,6 +373,7 @@ export default {
display: flex; display: flex;
padding: 24rpx 0; padding: 24rpx 0;
align-items: center; align-items: center;
font-weight: bold;
justify-content: center; justify-content: center;
} }
.green { .green {

1
sub/inspection/record.vue

@ -59,6 +59,7 @@
></image> ></image>
</view> </view>
</view> </view>
<cs-emty v-if="list.length == 0"></cs-emty>
</scroll-view> </scroll-view>
</template> </template>

96
sub/owner/jobInfo.vue

@ -45,8 +45,12 @@
<!-- 加载更多状态组件 --> <!-- 加载更多状态组件 -->
<uni-load-more :status="loadMoreStatus" /> <uni-load-more :status="loadMoreStatus" />
<cs-bottom-wrapper>
<view class="operation">
<view class="add-btn" @click="handleAdd">新增</view>
</view>
</cs-bottom-wrapper>
<!-- 新增按钮 --> <!-- 新增按钮 -->
<button class="add-btn" @click="handleAdd">新增</button>
</view> </view>
</template> </template>
@ -225,7 +229,7 @@ export default {
<style lang="scss"> <style lang="scss">
.jobInfo-container { .jobInfo-container {
background: #f9f9f9; background: #f9f9f9;
min-height: 100vh; height: 100vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding-bottom: calc(88rpx + 68rpx); // + padding-bottom: calc(88rpx + 68rpx); // +
@ -233,17 +237,29 @@ export default {
.search-box { .search-box {
padding: 24rpx; padding: 24rpx;
background: #ffffff; background: #ffffff;
position: fixed; ::v-deep .van-search {
top: 0; padding: 0;
left: 0; .van-search__content {
right: 0; height: 44px;
z-index: 1; border-radius: 16rpx;
align-items: center;
.van-icon {
font-size: 40rpx;
font-weight: bold;
}
.van-field__body {
height: 100%;
}
.select-title {
font-size: 26rpx;
}
}
}
} }
.jobInfo-list { .jobInfo-list {
flex: 1; flex: 1;
margin-top: 120rpx; // + padding // margin-top: 120rpx; // + padding
.jobInfo-scroll { .jobInfo-scroll {
height: calc( height: calc(
100vh - 120rpx - 156rpx 100vh - 120rpx - 156rpx
@ -262,30 +278,32 @@ export default {
} }
.jobInfo-title { .jobInfo-title {
font-size: 28rpx; font-size: 30rpx;
color: #333333; font-weight: bold;
color: #071437;
line-height: 40rpx; line-height: 40rpx;
margin-bottom: 8rpx; margin-bottom: 8rpx;
} }
.jobInfo-time { .jobInfo-time {
font-size: 24rpx; font-size: 28rpx;
color: #999999; color: #78829d;
line-height: 34rpx;
} }
.item-btns { .item-btns {
display: flex; display: flex;
gap: 16rpx; gap: 24rpx;
button { button {
flex: 1; flex: 1;
height: 64rpx;
line-height: 64rpx;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
border-radius: 8rpx; border-radius: 8rpx;
border: none; border: none;
padding: 16rpx 0;
display: flex;
justify-content: center;
align-items: center;
} }
.btn-preview { .btn-preview {
@ -302,33 +320,25 @@ export default {
} }
} }
.add-btn { .operation {
position: fixed; padding: 12px;
bottom: 68rpx; // 34px = 68rpx display: flex;
left: 24rpx; align-items: center;
right: 24rpx; justify-content: center;
height: 88rpx; gap: 12px;
line-height: 88rpx; background-color: #fff;
background: #17c653;
color: #ffffff;
font-size: 32rpx;
border-radius: 8rpx;
text-align: center;
border: none;
}
.search-box {
padding: 24rpx; padding: 24rpx;
background: #ffffff; .add-btn {
background: #17c653;
::v-deep .van-search { color: #ffffff;
padding: 0; flex: 1;
background: transparent; font-size: 32rpx;
border-radius: 8px;
.van-search__content { display: flex;
background: #f5f5f5; padding: 12px 0;
border-radius: 8rpx; align-items: center;
} justify-content: center;
font-weight: bold;
} }
} }
</style> </style>

8
sub/task/detail.vue

@ -63,11 +63,7 @@
ref="optionRef" ref="optionRef"
id="options" id="options"
> >
<van-dropdown-menu <van-dropdown-menu active-color="#17C653" style="flex: 1">
safe-area-tab-bar
active-color="#17C653"
style="flex: 1"
>
<van-dropdown-item <van-dropdown-item
v-if="showItem(['director'])" v-if="showItem(['director'])"
:value="queryParams.departmentId" :value="queryParams.departmentId"
@ -100,7 +96,7 @@
" "
/> />
</van-dropdown-menu> </van-dropdown-menu>
<view class="wd-font-600" style="flex: 0 0 200rpx"> <view style="flex: 0 0 200rpx">
(当前 (当前
<text style="color: #17c653">{{ list.length }}</text> <text style="color: #17c653">{{ list.length }}</text>
条记录) 条记录)

1
sub/task/enforce.vue

@ -258,6 +258,7 @@ export default {
padding: 24rpx 0; padding: 24rpx 0;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-weight: bold;
} }
.green { .green {
background-color: $cs-color-main; background-color: $cs-color-main;

8
sub/task/locate.vue

@ -324,7 +324,8 @@ export default {
async getDistance() { async getDistance() {
if (this.enterpriseGps) { if (this.enterpriseGps) {
uni.showLoading({ uni.showLoading({
title: '正在计算位置...' title: '正在计算位置...',
mask: true
}) })
const that = this const that = this
this.$map.calculateDistance({ this.$map.calculateDistance({
@ -334,7 +335,9 @@ export default {
success: res => { success: res => {
that.distance = res.result.elements[0].distance that.distance = res.result.elements[0].distance
console.log('distance', that.distance) console.log('distance', that.distance)
uni.hideLoading() setTimeout(function () {
uni.hideLoading()
}, 1000)
}, },
fail: err => { fail: err => {
console.log('获取定位失败', err) console.log('获取定位失败', err)
@ -473,6 +476,7 @@ export default {
padding: 12px 0; padding: 12px 0;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-weight: bold;
} }
.green { .green {
background-color: $cs-color-main; background-color: $cs-color-main;

1
sub/task/record.vue

@ -386,6 +386,7 @@ export default {
padding: 24rpx 0; padding: 24rpx 0;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-weight: bold;
} }
.green { .green {
background-color: $cs-color-main; background-color: $cs-color-main;

21
uni_modules/s-components/s-header/index.vue

@ -5,7 +5,7 @@
<slot></slot> <slot></slot>
</view> </view>
<view v-else> <view v-else>
<view class="operation" v-if="isTab"> <view class="operation" v-if="isTab" :style="{ ...operatStyle }">
<u--image <u--image
src="/static/images/tabbers/logo.png" src="/static/images/tabbers/logo.png"
width="48rpx" width="48rpx"
@ -22,7 +22,9 @@
export default { export default {
name: 's-header', name: 's-header',
data() { data() {
return {} return {
operatStyle: {}
}
}, },
props: { props: {
title: String, title: String,
@ -35,7 +37,21 @@ export default {
default: false default: false
} }
}, },
mounted() {
this.getSetRect()
},
methods: { methods: {
getSetRect() {
const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.operatStyle = {}
Object.keys(menuButtonInfo).forEach(i => {
this.operatStyle[i] = `${menuButtonInfo[i] * 2}rpx`
})
delete this.operatStyle.left
delete this.operatStyle.right
delete this.operatStyle.bottom
delete this.operatStyle.width
},
goback() { goback() {
this.$emit('goback') this.$emit('goback')
} }
@ -57,6 +73,7 @@ export default {
flex-flow: row nowrap; flex-flow: row nowrap;
align-items: center; align-items: center;
gap: 8rpx; gap: 8rpx;
position: absolute;
.title { .title {
color: #071437; color: #071437;
font-size: 32rpx; font-size: 32rpx;

54
wxcomponents/vant/common/style/hairline.wxss

@ -1 +1,53 @@
.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{border:0 solid #ebedf0;bottom:-50%;box-sizing:border-box;content:" ";left:-50%;pointer-events:none;position:absolute;right:-50%;top:-50%;transform:scale(.5);transform-origin:center}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} .van-hairline,
.van-hairline--bottom,
.van-hairline--left,
.van-hairline--right,
.van-hairline--surround,
.van-hairline--top,
.van-hairline--top-bottom {
position: relative
}
.van-hairline--bottom:after,
.van-hairline--left:after,
.van-hairline--right:after,
.van-hairline--surround:after,
.van-hairline--top-bottom:after,
.van-hairline--top:after,
.van-hairline:after {
border: 0 solid #ebedf0;
bottom: -50%;
box-sizing: border-box;
content: " ";
left: -50%;
pointer-events: none;
position: absolute;
right: -50%;
top: -50%;
transform: scale(.5);
transform-origin: center
}
.van-hairline--top:after {
border-top-width: 1px
}
.van-hairline--left:after {
border-left-width: 1px
}
.van-hairline--right:after {
border-right-width: 1px
}
.van-hairline--bottom:after {
border-bottom-width: 1px
}
.van-hairline--top-bottom:after {
border-width: 1px 0
}
.van-hairline--surround:after {
border-width: 1px
}

166
wxcomponents/vant/field/index.wxss

@ -1 +1,165 @@
@import '../common/index.wxss';.van-field{--cell-icon-size:var(--field-icon-size,16px)}.van-field__label{color:var(--field-label-color,#646566)}.van-field__label--disabled{color:var(--field-disabled-text-color,#c8c9cc)}.van-field__body{align-items:center;display:flex}.van-field__body--textarea{box-sizing:border-box;line-height:1.2em;min-height:var(--cell-line-height,24px);padding:3.6px 0}.van-field__control:empty+.van-field__control{display:block}.van-field__control{background-color:initial;border:0;box-sizing:border-box;color:var(--field-input-text-color,#323233);display:none;height:var(--cell-line-height,24px);line-height:inherit;margin:0;min-height:var(--cell-line-height,24px);padding:0;position:relative;resize:none;text-align:left;width:100%}.van-field__control:empty{display:none}.van-field__control--textarea{height:var(--field-text-area-min-height,18px);min-height:var(--field-text-area-min-height,18px)}.van-field__control--error{color:var(--field-input-error-text-color,#ee0a24)}.van-field__control--disabled{background-color:initial;color:var(--field-input-disabled-text-color,#c8c9cc);opacity:1}.van-field__control--center{text-align:center}.van-field__control--right{text-align:right}.van-field__control--custom{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.van-field__placeholder{color:var(--field-placeholder-text-color,#c8c9cc);left:0;pointer-events:none;position:absolute;right:0;top:0}.van-field__placeholder--error{color:var(--field-error-message-color,#ee0a24)}.van-field__icon-root{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.van-field__clear-root,.van-field__icon-container{line-height:inherit;margin-right:calc(var(--padding-xs, 8px)*-1);padding:0 var(--padding-xs,8px);vertical-align:middle}.van-field__button,.van-field__clear-root,.van-field__icon-container{flex-shrink:0}.van-field__clear-root{color:var(--field-clear-icon-color,#c8c9cc);font-size:var(--field-clear-icon-size,16px)}.van-field__icon-container{color:var(--field-icon-container-color,#969799);font-size:var(--field-icon-size,16px)}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:var(--padding-xs,8px)}.van-field__button:empty{display:none}.van-field__error-message{color:var(--field-error-message-color,#ee0a24);display:block;font-size:var(--field-error-message-text-font-size,12px);text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{color:var(--field-word-limit-color,#646566);font-size:var(--field-word-limit-font-size,12px);line-height:var(--field-word-limit-line-height,16px);margin-top:var(--padding-base,4px);text-align:right}.van-field__word-num{display:inline}.van-field__word-num--full{color:var(--field-word-num-full-color,#ee0a24)} @import '../common/index.wxss';
.van-field {
--cell-icon-size: var(--field-icon-size, 16px)
}
.van-field__label {
color: var(--field-label-color, #646566)
}
.van-field__label--disabled {
color: var(--field-disabled-text-color, #c8c9cc)
}
.van-field__body {
align-items: center;
display: flex
}
.van-field__body--textarea {
box-sizing: border-box;
line-height: 1.2em;
min-height: var(--cell-line-height, 24px);
padding: 3.6px 0
}
.van-field__control:empty+.van-field__control {
display: block
}
.van-field__control {
background-color: initial;
border: 0;
box-sizing: border-box;
color: var(--field-input-text-color, #323233);
display: none;
height: var(--cell-line-height, 24px);
line-height: inherit;
margin: 0;
min-height: var(--cell-line-height, 24px);
padding: 0;
position: relative;
resize: none;
text-align: left;
width: 100%
}
.van-field__control:empty {
display: none
}
.van-field__control--textarea {
height: var(--field-text-area-min-height, 18px);
min-height: var(--field-text-area-min-height, 18px)
}
.van-field__control--error {
color: var(--field-input-error-text-color, #ee0a24)
}
.van-field__control--disabled {
background-color: initial;
color: var(--field-input-disabled-text-color, #c8c9cc);
opacity: 1
}
.van-field__control--center {
text-align: center
}
.van-field__control--right {
text-align: right
}
.van-field__control--custom {
align-items: center;
display: flex;
min-height: var(--cell-line-height, 24px)
}
.van-field__placeholder {
color: var(--field-placeholder-text-color, #99A1B7);
left: 0;
pointer-events: none;
position: absolute;
right: 0;
top: 0
}
.van-field__placeholder--error {
color: var(--field-error-message-color, #ee0a24)
}
.van-field__icon-root {
align-items: center;
display: flex;
min-height: var(--cell-line-height, 24px)
}
.van-field__clear-root,
.van-field__icon-container {
line-height: inherit;
margin-right: calc(var(--padding-xs, 8px)*-1);
padding: 0 var(--padding-xs, 8px);
vertical-align: middle
}
.van-field__button,
.van-field__clear-root,
.van-field__icon-container {
flex-shrink: 0
}
.van-field__clear-root {
color: var(--field-clear-icon-color, #c8c9cc);
font-size: var(--field-clear-icon-size, 16px)
}
.van-field__icon-container {
color: var(--field-icon-container-color, #969799);
font-size: var(--field-icon-size, 16px)
}
.van-field__icon-container:empty {
display: none
}
.van-field__button {
padding-left: var(--padding-xs, 8px)
}
.van-field__button:empty {
display: none
}
.van-field__error-message {
color: var(--field-error-message-color, #ee0a24);
display: block;
font-size: var(--field-error-message-text-font-size, 12px);
text-align: left
}
.van-field__error-message--center {
text-align: center
}
.van-field__error-message--right {
text-align: right
}
.van-field__word-limit {
color: var(--field-word-limit-color, #646566);
font-size: var(--field-word-limit-font-size, 12px);
line-height: var(--field-word-limit-line-height, 16px);
margin-top: var(--padding-base, 4px);
text-align: right
}
.van-field__word-num {
display: inline
}
.van-field__word-num--full {
color: var(--field-word-num-full-color, #ee0a24)
}

2
wxcomponents/vant/search/index.wxss

@ -8,7 +8,7 @@
} }
.van-search__content { .van-search__content {
background-color: var(--search-background-color, #f7f8fa); background-color: var(--search-background-color, #F9F9F9);
border-radius: 2px; border-radius: 2px;
display: flex; display: flex;
flex: 1; flex: 1;

Loading…
Cancel
Save