Commit f36c8d9a authored by yun's avatar yun

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

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