Commit f36c8d9a authored by yun's avatar yun

24483 【客户_二阶段】ios,新建培训,点击报名/培训时间字段,弹出时间选择框,点击可滑动

parent 7b1c2757
......@@ -127,6 +127,8 @@
placeholder="开始时间"
@click="DateClick('applyStartDate')"
readonly
unselectable='on'
onfocus="this.blur();"
>
<span class="distantceSpan">~</span>
<input
......@@ -135,6 +137,8 @@
placeholder="结束时间"
@click="DateClick('applyOverDate')"
readonly
unselectable='on'
onfocus="this.blur();"
>
</template>
</van-field>
......@@ -157,6 +161,8 @@
@click="DateClick('trainStartDate')"
:min-date="minDate"
readonly
unselectable='on'
onfocus="this.blur();"
>
<span class="distantceSpan">~</span>
<input
......@@ -165,6 +171,8 @@
placeholder="结束时间"
@click="DateClick('trainOverDate')"
readonly
unselectable='on'
onfocus="this.blur();"
>
</template>
</van-field>
......@@ -318,6 +326,7 @@
v-model="datePopupIsShow"
position="bottom"
:style="{ height: '40%' }"
@close="touchmoveFlag='0'"
>
<van-datetime-picker
v-if="datePopupIsShow"
......@@ -327,7 +336,7 @@
:max-date="maxDate"
:formatter="formatter"
@confirm="dateConfirmClick"
@cancel="datePopupIsShow = false"
@cancel="datePopupIsShow = false,touchmoveFlag='0'"
/>
</popup>
<!--签到时间 弹出层-->
......@@ -503,7 +512,8 @@ export default {
trainInfo: {
},
saveLoading: false
saveLoading: false,
touchmoveFlag: '0'
}
},
methods: {
......@@ -1259,6 +1269,7 @@ export default {
break
}
this.datePopupIsShow = true
this.touchmoveFlag = '1'
},
// 日期时间格式化
formatter(type, value) {
......@@ -1278,6 +1289,7 @@ export default {
// 点击 日期 时间 完成 按钮 事件
dateConfirmClick() {
this.datePopupIsShow = false
this.touchmoveFlag = '0'
switch (this.type) {
case 'applyStartDate':
this.formData.applyStartDate = moment(this.currentDate.getTime()).format('YYYY/MM/DD HH:mm')
......@@ -1358,6 +1370,20 @@ export default {
this.slId = this.$route.query.slId
this.queryTrainInformation()
this.userPublishValue()
const that = this
document.addEventListener('touchmove', function(event) {
if (that.touchmoveFlag === '1') {
event.preventDefault()
}
}, {passive: false})
},
beforeDestroy() {
const that = this
document.removeEventListener('touchmove', function(event) {
if (that.touchmoveFlag === '1') {
event.preventDefault()
}
}, false)
}
}
</script>
......
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