Browse Source

平车列表页及详情页开发

210plan
aBin 3 years ago
parent
commit
d8eba32521
  1. 2
      src/components/Service/Service.vue
  2. 24
      src/components/Volume/Volume.vue
  3. 112
      src/pages/MoreCar/detail.vue
  4. 53
      src/pages/MoreCar/index.vue
  5. BIN
      src/static/news/Frame 34@2x.png
  6. BIN
      src/static/news/logo2x.png
  7. BIN
      src/static/news/logo2xg.png

2
src/components/Service/Service.vue

@ -9,7 +9,7 @@
<!-- 客服 --> <!-- 客服 -->
<img style="height: 28px; width: 28px" src="./icon/tel-we.png" alt="" /> <img style="height: 28px; width: 28px" src="./icon/tel-we.png" alt="" />
</button> </button>
<view class="edition">v4.0.1</view> <view class="edition">v4.0.2</view>
</div> </div>
</template> </template>
<script> <script>

24
src/components/Volume/Volume.vue

@ -2,11 +2,10 @@
<view class="volume-box"> <view class="volume-box">
<scroll-view scroll-x style="height: 100%; width: 100%"> <scroll-view scroll-x style="height: 100%; width: 100%">
<view class="flex justify-between"> <view class="flex justify-between">
<view class="flex flex-col items-center justify-center" style="flex-shrink: 0" @click="apply"> <!-- <view class="flex flex-col items-center justify-center" style="flex-shrink: 0" @click="apply">
<!-- <img class="volume-img" src="@/static/image.png" alt="" /> -->
<img class="volume-img" src="@/static/image.png" alt="" /> <img class="volume-img" src="@/static/image.png" alt="" />
<span class="mt-2" style="color: #70798c">申请</span> <span class="mt-2" style="color: #70798c">申请</span>
</view> </view> -->
<!-- <view class="flex flex-col items-center justify-center" style="flex-shrink: 0" @click="statistics"> <!-- <view class="flex flex-col items-center justify-center" style="flex-shrink: 0" @click="statistics">
<img class="volume-img" src="@/static/image.png" alt="" /> <img class="volume-img" src="@/static/image.png" alt="" />
<span class="mt-2" style="color: #70798c">统计</span> <span class="mt-2" style="color: #70798c">统计</span>
@ -16,7 +15,7 @@
style="flex-shrink: 0" style="flex-shrink: 0"
v-for="(item, index) in btnList" v-for="(item, index) in btnList"
:key="index" :key="index"
@click="jumpV(item.url)" @click="jumpV(item)"
> >
<!-- <img class="volume-img" src="@/static/image.png" alt="" /> --> <!-- <img class="volume-img" src="@/static/image.png" alt="" /> -->
<img class="volume-img" :src="item.iconUrl || '@/static/image.png'" alt="" /> <img class="volume-img" :src="item.iconUrl || '@/static/image.png'" alt="" />
@ -78,13 +77,18 @@ export default {
} }
}, },
// //
jumpV(url) { jumpV(item) {
if (this.user.phone) { const url = item.url;
console.log('this.userId: ', this.userId); if (item.jumpType === 0) {
this.$u.route('pages/questionnaire-webview/questionnaire-webview', { u: this.userId, url: url }); uni.navigateTo({ url });
} else { } else {
// this.$u.route('/pages/get-phone-power/get-phone-power'); if (this.user.phone) {
this.$u.route('/pages/phone-bind/phone-bind'); console.log('this.userId: ', this.userId);
this.$u.route('pages/questionnaire-webview/questionnaire-webview', { u: this.userId, url: url });
} else {
// this.$u.route('/pages/get-phone-power/get-phone-power');
this.$u.route('/pages/phone-bind/phone-bind');
}
} }
}, },
}, },

112
src/pages/MoreCar/detail.vue

@ -3,6 +3,7 @@
<view class="title"> 平车信息 </view> <view class="title"> 平车信息 </view>
<view <view
class="car-box bor-left-lv" class="car-box bor-left-lv"
v-if="car"
:class="{ :class="{
'bor-left-lv': car.carStatus === 0, 'bor-left-lv': car.carStatus === 0,
'bor-left-zhan': car.carStatus === 1, 'bor-left-zhan': car.carStatus === 1,
@ -10,6 +11,7 @@
'bor-left-dian': car.carStatus === 3, 'bor-left-dian': car.carStatus === 3,
'bor-left-li': car.carStatus === 4, 'bor-left-li': car.carStatus === 4,
}" }"
@click="openDetail"
> >
<view class="car-title flex items-center"> <view class="car-title flex items-center">
<view class="car-no">{{ car.carNo }}</view> <view class="car-no">{{ car.carNo }}</view>
@ -47,38 +49,66 @@
</view> </view>
</view> </view>
<view class="title"> 时间轴 </view> <view class="title"> 时间轴 </view>
<view class="time-line-box"></view> <view class="time-line-box">
<view class="flex" v-for="(step, stepIndex) in stepList" :key="step.stepId">
<view class="time-line-left flex flex-col items-center">
<view class="time-line-cir" :class="step.type === 1 ? 'green' : step.type === 2 ? 'blue' : ''"></view>
<view
class="time-line-bor"
v-if="stepIndex !== stepList.length - 1"
:class="step.type === 1 ? 'green-bg' : step.type === 2 ? 'blue-bg' : ''"
></view>
</view>
<view class="time-line-right flex-1" style="margin-top: -16rpx">
<view class="w-full name-status flex justify-between">
<view :class="step.type === 1 ? 'green' : step.type === 2 ? 'blue' : ''">
{{ step.stepName }}
</view>
<view :class="step.type === 1 ? 'green' : step.type === 2 ? 'blue' : ''">
<!-- {{ step.type }} -->
{{ step.type === 0 ? '未开始' : step.type === 1 ? '待确认' : '已结束' }}
</view>
</view>
<view class="w-full time-status flex justify-between">
<view class="flex items-center" :class="step.type === 1 ? 'green' : step.type === 2 ? 'blue' : ''">
<!-- {{ step.stepName }} -->
<img src="@/static/news/logo2xg.png" v-if="step.type === 2" style="width: 32rpx; height: 32rpx; margin-right: 8rpx" alt="" />
<img src="@/static/news/logo2x.png" v-else style="width: 32rpx; height: 32rpx; margin-right: 8rpx" alt="" />
{{ step.startTime ? $moment(+step.startTime).format('YYYY-MM-DD HH:mm') : '未知' }}
</view>
<view>
<!-- {{ step.type }} -->
<u-icon size="32" name="edit-pen" :color="step.type === 1 ? '#00c767' : step.type === 2 ? '#4f8bff' : ''"></u-icon>
</view>
</view>
</view>
</view>
</view>
</div> </div>
</template> </template>
<script> <script>
import { mapMutations } from 'vuex';
export default { export default {
name: 'detail', name: 'detail',
components: {}, components: {},
props: {}, props: {},
data() { data() {
return { return {
car: { car: null,
age: null,
carId: '1',
carNo: '1001',
carStatus: 0,
doctorId: '0',
doctorName: null,
firstAidId: '1601126216004542464',
gender: null,
medicalHistoryList: ['家族史', '心脏病', '高血压'],
name: '',
idcard: '123123444403142235',
nursesId: '1',
nursesName: '张野',
},
status: 0, status: 0,
stepList: [], stepList: [],
}; };
}, },
computed: {}, computed: {},
methods: { methods: {
...mapMutations('carbasics', ['setFirstAidId', 'setDetailValueType']),
//
openDetail() {
this.setFirstAidId(this.car.firstAidId);
this.setDetailValueType(this.car.demonstrate);
uni.navigateTo({ url: `/pages/patientLine/patientLine?caseType=${0}` });
},
async getSteps() { async getSteps() {
try { try {
const params = { firstAidId: this.car.firstAidId }; const params = { firstAidId: this.car.firstAidId };
@ -92,7 +122,9 @@ export default {
watch: {}, watch: {},
// -- // --
onLoad() { onLoad(options) {
console.log('options: ', options);
this.car = JSON.parse(options.info);
this.getSteps(); this.getSteps();
}, },
// --0 // --0
@ -115,9 +147,53 @@ export default {
</script> </script>
<style scoped> <style scoped>
.blue-bg {
background: #4f8bff !important;
}
.green-bg {
background: #00c767 !important;
}
.blue {
color: #4f8bff !important;
border-color: #4f8bff !important;
}
.green {
color: #00c767 !important;
border-color: #00c767 !important;
}
.name-status {
font-size: 32rpx;
font-family: OPPOSans-Bold, OPPOSans;
font-weight: bold;
color: #a3acbf;
}
.time-status {
margin-top: 12rpx;
font-size: 24rpx;
font-family: OPPOSans-Medium, OPPOSans;
font-weight: 500;
color: #a3acbf;
}
.time-line-left {
margin-right: 24rpx;
}
.time-line-cir {
width: 8px;
height: 8px;
border: 4rpx solid #a3acbf;
border-radius: 50%;
opacity: 1;
}
.time-line-bor {
width: 4rpx;
height: 112rpx;
background: #a3acbf;
opacity: 1;
}
.time-line-box { .time-line-box {
margin-right: 24rpx;
width: calc(100% - 64rpx); width: calc(100% - 64rpx);
height: 100rpx; /* height: 100rpx; */
margin: 32rpx; margin: 32rpx;
padding: 32rpx; padding: 32rpx;
background: #ffffff; background: #ffffff;

53
src/pages/MoreCar/index.vue

@ -52,7 +52,7 @@
{{ medical }} {{ medical }}
</view> </view>
</view> </view>
<view class="id-card">身份证{{ car.idcard }}</view> <view class="id-card">身份证{{ car.idcard || '' }}</view>
</view> </view>
</view> </view>
</view> </view>
@ -87,53 +87,7 @@ export default {
itemStyle: { itemStyle: {
color: '#2C2B3B', color: '#2C2B3B',
}, },
carList: [ carList: [],
{
age: null,
carId: '1',
carNo: '1001',
carStatus: 0,
doctorId: '0',
doctorName: null,
firstAidId: '1601126216004542464',
gender: null,
medicalHistoryList: ['家族史', '心脏病', '高血压'],
name: '',
idcard: '123123444403142235',
nursesId: '1',
nursesName: '张野',
},
{
age: null,
carId: '2',
carNo: '1001',
carStatus: 0,
doctorId: '0',
doctorName: null,
firstAidId: '1601126216004542464',
gender: null,
medicalHistoryList: ['家族史', '心脏病', '高血压'],
name: '',
idcard: '123123444403142235',
nursesId: '1',
nursesName: '张野',
},
{
age: null,
carId: '3',
carNo: '1001',
carStatus: 0,
doctorId: '0',
doctorName: null,
firstAidId: '1601126216004542464',
gender: null,
medicalHistoryList: ['家族史', '心脏病', '高血压'],
name: '',
idcard: '123123444403142235',
nursesId: '1',
nursesName: '张野',
},
],
status: 0, status: 0,
}; };
}, },
@ -142,7 +96,7 @@ export default {
detailCar(info) { detailCar(info) {
console.log('info: ', info); console.log('info: ', info);
if (this.status === 0 || this.status === 1) { if (this.status === 0 || this.status === 1) {
uni.navigateTo({ url: '/pages/MoreCar/detail' }); uni.navigateTo({ url: `/pages/MoreCar/detail?info=${JSON.stringify(info)}` });
} }
}, },
change(index) { change(index) {
@ -157,6 +111,7 @@ export default {
}; };
const res = await this.$u.api.queryCar(params); const res = await this.$u.api.queryCar(params);
console.log('res: ', res); console.log('res: ', res);
this.carList = [...res];
} catch (error) {} } catch (error) {}
}, },
}, },

BIN
src/static/news/Frame 34@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
src/static/news/logo2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/static/news/logo2xg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Loading…
Cancel
Save