提交 9b524add 编写于 作者: 张磊's avatar 张磊

quick detect

上级 d01f6cc1
...@@ -83,7 +83,8 @@ export default { ...@@ -83,7 +83,8 @@ export default {
am: '上午', am: '上午',
pm: '下午', pm: '下午',
}, },
currentItem:'' currentItem:'',
currentItemChoosed:{}
}; };
}, },
watch: { watch: {
...@@ -106,30 +107,24 @@ export default { ...@@ -106,30 +107,24 @@ export default {
} }
}, },
mounted() { mounted() {
// this.getTimes();d
}, },
methods: { methods: {
// 获取机构列表 // 获取机构列表
getScheduling() { getScheduling() {
const {projectEquityNo, hospitalId} = this; const {projectEquityNo, hospitalId} = this;
getScheduling({ projectEquityNo, hospitalId }).then(res => { getScheduling({ projectEquityNo, hospitalId }).then(res => {
console.log(res);
this.timsArray = res.data; this.timsArray = res.data;
// this.selectTimes = res.data[0].appointmentDate;
// this.currentItem = res.data[0];
}); });
}, },
selectItem() { selectItem() {
if (this.selectTimes === '') { if (this.selectTimes === '') {
// this.$toast('请选择日期');
return; return;
} }
if (this.selectTimeBucket === '') { if (this.selectTimeBucket === '') {
// this.$toast('请选择时间段');
return; return;
} }
this.$emit('change', this.selectTimes + ' ' + this.selectTimeBucket);
this.$emit('change', {value: (this.selectTimes + ' ' + this.selectTimeBucket), currentItemChoosed: this.currentItemChoosed});
}, },
cancel() { cancel() {
this.finished = false; this.finished = false;
...@@ -171,6 +166,8 @@ export default { ...@@ -171,6 +166,8 @@ export default {
return; return;
} }
this.selectTimeBucket = item === 'am' ? this.currentItem['amTimeBegin'] : this.currentItem['pmTimeBegin']; this.selectTimeBucket = item === 'am' ? this.currentItem['amTimeBegin'] : this.currentItem['pmTimeBegin'];
this.currentItemChoosed = {...this.currentItem, timeBucket: item};
console.log('-selectTimeB', this.currentItem, this.currentItemChoosed);
this.selectItem(); this.selectItem();
} }
} }
......
...@@ -149,18 +149,12 @@ ...@@ -149,18 +149,12 @@
v-else v-else
class="appoint-form-value" class="appoint-form-value"
> >
{{ dectionForm.appointmentTime }} {{ appointmentTimeShadow }}
</div> </div>
</template> </template>
</van-field> </van-field>
</van-form> </van-form>
</div> </div>
<!-- <van-button
@click="submit"
>
提交1
</van-button> -->
<van-button <van-button
round round
block block
...@@ -215,6 +209,7 @@ import SelectTime from '@/components/selectTime/index.vue'; ...@@ -215,6 +209,7 @@ import SelectTime from '@/components/selectTime/index.vue';
import PickArea from '@/components/pickArea/index.vue'; import PickArea from '@/components/pickArea/index.vue';
import { getJumpPageStatus, getButtonStatus} from '@/api/question'; import { getJumpPageStatus, getButtonStatus} from '@/api/question';
import storejs from 'storejs'; import storejs from 'storejs';
import dayjs from 'dayjs';
import AMapLoader from '@amap/amap-jsapi-loader'; import AMapLoader from '@amap/amap-jsapi-loader';
export default { export default {
components: { components: {
...@@ -286,6 +281,7 @@ export default { ...@@ -286,6 +281,7 @@ export default {
stock: false, stock: false,
buttonStatus: false, buttonStatus: false,
buttonText: '', buttonText: '',
appointmentTimeShadow: '',
}; };
}, },
computed: { computed: {
...@@ -303,7 +299,6 @@ export default { ...@@ -303,7 +299,6 @@ export default {
this.buttonStatus this.buttonStatus
); );
}, },
}, },
mounted() { mounted() {
this.$loading.show(); this.$loading.show();
...@@ -432,8 +427,12 @@ export default { ...@@ -432,8 +427,12 @@ export default {
}, },
selectTimes(times) { selectTimes(times) {
console.log(times); console.log(times);
this.dectionForm.appointmentTime = times; const {value, currentItemChoosed} = times;
this.dectionForm.appointmentTime = value;
this.closePopup('showSelectTime'); this.closePopup('showSelectTime');
// appointmentTimeShadow
const m = (Number(dayjs(currentItemChoosed.appointmentDate).month()) + 1) + '月' + (Number(dayjs(currentItemChoosed.appointmentDate).date())) + '日';
this.appointmentTimeShadow = m + ' ' + currentItemChoosed[currentItemChoosed.timeBucket + 'TimeContent'];
}, },
getTimes() { getTimes() {
this.timsArray = []; this.timsArray = [];
......
...@@ -24,9 +24,12 @@ ...@@ -24,9 +24,12 @@
<div class="detection-title"> <div class="detection-title">
您的{{ isUnderLine ? '领取' : '检测' }}时间 您的{{ isUnderLine ? '领取' : '检测' }}时间
</div> </div>
<div class="detection-time"> <div class="detection-time mb5">
{{ detailInfo.appointmentTimeStr }} {{ detailInfo.appointmentTimeStr }}
</div> </div>
<div class="detection-time">
{{ detailInfo.appointmentTimeStr2 }}
</div>
<div class="detail-top-info"> <div class="detail-top-info">
<div class="detail-top-address"> <div class="detail-top-address">
<div class="detail-top-address-name"> <div class="detail-top-address-name">
...@@ -763,6 +766,9 @@ export default { ...@@ -763,6 +766,9 @@ export default {
text-align: center; text-align: center;
margin-bottom: 15px ; margin-bottom: 15px ;
} }
.mb5{
margin-bottom: 5px ;
}
} }
.appoint-detail-tel{ .appoint-detail-tel{
margin-top: 25px; margin-top: 25px;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册