|
|
@@ -37,7 +37,7 @@
|
|
|
@click="showStartDate = true"
|
|
|
/>
|
|
|
<van-popup v-model="showStartDate" position="bottom">
|
|
|
- <van-datetime-picker type="date" @confirm="onConfirmDate" @cancel="showStartDate = false" />
|
|
|
+ <van-datetime-picker type="datetime" @confirm="onConfirmDate" @cancel="showStartDate = false" />
|
|
|
</van-popup>
|
|
|
<!-- 培训结束时间 -->
|
|
|
<van-field
|
|
|
@@ -52,7 +52,7 @@
|
|
|
@click="showEndDate = true"
|
|
|
/>
|
|
|
<van-popup v-model="showEndDate" position="bottom">
|
|
|
- <van-datetime-picker type="date" @confirm="onConfirmEndDate" @cancel="showEndDate = false" />
|
|
|
+ <van-datetime-picker type="datetime" @confirm="onConfirmEndDate" @cancel="showEndDate = false" />
|
|
|
</van-popup>
|
|
|
<!-- 培训内容 -->
|
|
|
<van-field
|
|
|
@@ -100,8 +100,8 @@ import NavBar from '@/components/NavBar'
|
|
|
import CheckPeople from '@/components/checkPeople/index.vue'
|
|
|
import Upload from '@/components/upload/index.vue'
|
|
|
import { gettrainingInfo,edittrainingInfo } from '@/api/training.js'
|
|
|
-import { newDateDay } from '@/utils/date.js'
|
|
|
-import { Dialog } from 'vant'
|
|
|
+import { newDateTime } from '@/utils/date.js'
|
|
|
+import { Dialog, Toast } from 'vant'
|
|
|
export default {
|
|
|
name: 'SocAppAddTraining',
|
|
|
components: {
|
|
|
@@ -176,13 +176,13 @@ export default {
|
|
|
},
|
|
|
//开始时间确认
|
|
|
onConfirmDate(val) {
|
|
|
- this.form.trainingStartDateTime = newDateDay(val)
|
|
|
+ this.form.trainingStartDateTime = newDateTime(val)
|
|
|
|
|
|
this.showStartDate = false
|
|
|
},
|
|
|
//结束时间
|
|
|
onConfirmEndDate(val) {
|
|
|
- this.form.trainingEndDateTime = newDateDay(val)
|
|
|
+ this.form.trainingEndDateTime = newDateTime(val)
|
|
|
this.showEndDate = false
|
|
|
},
|
|
|
userListHandler(list){
|
|
|
@@ -226,7 +226,9 @@ export default {
|
|
|
submitType:2,
|
|
|
...this.form
|
|
|
}).then(res=>{
|
|
|
-
|
|
|
+ let { code ,msg}=res
|
|
|
+ Toast('登记成功')
|
|
|
+ this.$router.push('/training')
|
|
|
})
|
|
|
})
|
|
|
.catch(() => {
|