Commit 2078f707 authored by Facius's avatar Facius

详情页面ui修改

parent 3dc6d0d7
<template> <template>
<view class="bottom-button"> <view class="bottom-button">
<view v-for="(item, index) in buttons" :class="['button-view', item.type]"> <view v-for="(item, index) in list" :class="['button-view', item.type]">
<u-button :class="['list-button', item.type]" @click="handleClick(index)" <u-button :class="['list-button', item.type]" @click="handleClick(item)"
:hover-class="item.type == 'image' ? 'none' : ''" :custom-style="buttonStyle[item.type]" type="primary" :hover-class="item.type == 'image' || item.disabled ? 'none' : ''"
shape="circle"> :custom-style="buttonStyle[item.disabled ? 'disabled' : item.type]" type="primary" shape="circle">
<view class="image-view" v-if="item.type == 'image'"> <view class="image-view" v-if="item.type == 'image'">
<image :src="baseImageUrl + item.image" class="image-content"></image> <image :src="baseImageUrl + item.image" class="image-content"></image>
</view> </view>
<view :class="['text-content', item.type]">{{item.label}}</view> <view :class="['text-content', item.type]">{{item.label}}</view>
</u-button> </u-button>
<view v-if="index == 1"style="width: 6rpx;"></view>
</view> </view>
</view> </view>
</template> </template>
...@@ -22,17 +23,29 @@ ...@@ -22,17 +23,29 @@
return [{ return [{
label: '过程反馈', label: '过程反馈',
type: 'image', type: 'image',
image: 'dianhua.png' image: 'guochengfankui.png',
show: true,
disabled: false,
}, },
{ {
label: '异常签到', label: '异常签到',
type: 'image', type: 'image',
image: 'daohang.png' image: 'yichangqiandao.png',
show: false,
disabled: false
},
{
label: '现场拍照',
type: 'image',
image: 'xiancahngpaizhao.png',
show: true,
disabled: false,
}, },
{ {
label: '接单', label: '接单',
type: 'text', type: 'text',
image: '' show: true,
disabled: true
} }
] ]
} }
...@@ -42,6 +55,11 @@ ...@@ -42,6 +55,11 @@
baseImageUrl() { baseImageUrl() {
return process.uniEnv.qn_base_url return process.uniEnv.qn_base_url
}, },
list() {
return this.buttons.filter((item) => {
return item.show == true
})
},
buttonStyle() { buttonStyle() {
return { return {
'image': { 'image': {
...@@ -63,12 +81,23 @@ ...@@ -63,12 +81,23 @@
'width': '100%' 'width': '100%'
}, },
'disabled': {
'background-color': '#D1D4D4',
'border-color': 'transparent',
'display': 'flex',
'flex-direction': 'column',
'height': '104rpx',
'width': '100%'
},
} }
}, },
}, },
methods: { methods: {
handleClick(index) { // 0 主流程; 1 过程反馈;2 异常签到; 3 现场拍照
this.$emit('submit', index) handleClick(item) {
if (item.disabled) return
this.$emit('submit', item.id)
} }
} }
} }
...@@ -82,6 +111,8 @@ ...@@ -82,6 +111,8 @@
padding: 0 30rpx 44rpx 30rpx; padding: 0 30rpx 44rpx 30rpx;
.button-view { .button-view {
max-width: 600rpx;
display: flex;
&.image {} &.image {}
&.text { &.text {
...@@ -92,22 +123,24 @@ ...@@ -92,22 +123,24 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
max-width: 600rpx; max-width: 600rpx;
width: 100%;
&.image {} &.image {}
&.text {} &.text {}
.image-view {
flex-shrink: 0; .image-view {
background-color: #FFFFFF; flex-shrink: 0;
border-radius: 38rpx; background-color: #FFFFFF;
width: 76rpx; border-radius: 38rpx;
height: 76rpx; width: 76rpx;
.image-content { height: 76rpx;
width: 76rpx;
height: 76rpx; .image-content {
} width: 76rpx;
height: 76rpx;
}
} }
.text-content { .text-content {
&.text { &.text {
color: #FFFFFF; color: #FFFFFF;
...@@ -125,7 +158,5 @@ ...@@ -125,7 +158,5 @@
} }
} }
} }
} }
</style> </style>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<view v-if="showCountTime" class="bottom-left-view"> <view v-if="showCountTime" class="bottom-left-view">
<view :class="['bottom-tag-view', {'timeout': timeout}]"><text>{{tagText}}</text></view> <view :class="['bottom-tag-view', {'timeout': timeout}]"><text>{{tagText}}</text></view>
<u-count-down :timestamp="timestamp" font-size="40" show-days separator="zh" <u-count-down :timestamp="timestamp" font-size="40" show-days separator="zh"
:color="timeout ? '#FA5A49' : '#FF930D'" @change="handleChange"separator-color="#666666" ref="order-count-down"></u-count-down> :color="timeout ? '#FA5A49' : '#FF930D'" @change="handleChange" separator-color="#666666" ref="order-count-down"></u-count-down>
</view> </view>
<view v-else-if="showTime"> <view v-else-if="showTime">
<text>{{timeTitle}}</text> <text>{{timeTitle}}</text>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment