db447616 by qingxiao

公开课时间调整

1 parent 56eb8457
......@@ -19,7 +19,7 @@ let requestDomain = "https://ow.go.qudone.com";
if (location.href.indexOf("://k.wxpai.cn") > 0 || location.href.indexOf("://h5.k.wxpai.cn") > 0) {
requestDomain = "https://api.k.wxpai.cn/bizproxy";
}
//requestDomain = 'http://localhost:3111'
/**
* header不加session的白名单
*/
......
......@@ -8,8 +8,14 @@
<el-form-item label="标题:" prop="title">
<el-input v-model="publicForm.title" maxlength="50" show-word-limit></el-input>
</el-form-item>
<el-form-item label="开始日期:" prop="startDate">
<el-form-item label="开始时间:" prop="startT">
<el-date-picker
v-model="publicForm.startT"
type="datetime"
value-format="timestamp"
placeholder="选择日期时间">
</el-date-picker>
<!-- <el-date-picker
v-model="publicForm.startDate"
type="date"
placeholder="选择日期(必填)"
......@@ -22,10 +28,16 @@
format="HH:mm:ss"
value-format="HH:mm:ss"
placeholder="选择时间">
</el-time-picker>
</el-time-picker>-->
</el-form-item>
<el-form-item label="结束时间:" prop="endDate">
<el-form-item label="结束时间:" prop="endT">
<el-date-picker
v-model="publicForm.endT"
type="datetime"
value-format="timestamp"
placeholder="选择日期时间">
</el-date-picker>
<!-- <el-date-picker
v-model="publicForm.endDate"
type="date"
placeholder="选择日期(必填)"
......@@ -39,7 +51,7 @@
format="HH:mm:ss"
value-format="HH:mm:ss"
placeholder="选择时间">
</el-time-picker>
</el-time-picker>-->
</el-form-item>
<el-form-item label="地点:" prop="city">
<el-input v-model="publicForm.city" maxlength="100"
......@@ -76,10 +88,14 @@
</el-col>
</el-row>-->
</el-form-item>
<el-form-item label="报名:" prop="enroll">
<el-form-item label="注册/回放:" prop="enroll">
<el-input v-model="publicForm.enroll" maxlength="200"
show-word-limit></el-input>
</el-form-item>
<el-form-item label="团队:" prop="team">
<el-input v-model="publicForm.team" maxlength="100"
show-word-limit></el-input>
</el-form-item>
<el-form-item label="内容:" prop="content">
<el-input v-model="publicForm.content" type="textarea" maxlength="500"
show-word-limit></el-input>
......@@ -109,11 +125,12 @@
publicForm: {},
publicRules: {
title: [{required: true, message: '请输入标题', trigger: 'blur'}],
startDate: [{required: true, message: '请选择开始时间', trigger: 'blur'}],
endDate: [{required: false, message: '请选择结束时间', trigger: 'blur'}],
startT: [{required: true, message: '请选择开始时间', trigger: 'blur'}],
endT: [{required: true, message: '请选择结束时间', trigger: 'blur'}],
enroll: [{required: true, message: '请填写报名', trigger: 'blur'}],
city: [{required: true, message: '请选择省市', trigger: 'blur'}],
content: [{required: true, message: '请输入内容', trigger: 'blur'}],
team: [{required: true, message: '请输入团队', trigger: 'blur'}],
},
provinceList: [],
cityList: [],
......
......@@ -14,15 +14,18 @@
<el-table-column label="活动标题" prop="title"></el-table-column>
<el-table-column label="地点" prop="city">
</el-table-column>
<el-table-column label="报名" prop="enroll"></el-table-column>
<el-table-column label="注册/回放" prop="enroll"></el-table-column>
<el-table-column label="团队" prop="team"></el-table-column>
<el-table-column label="开始时间">
<template slot-scope="scope">
{{scope.row.startDate}} &nbsp; {{scope.row.startTime}}
<!--{{scope.row.startDate}} &nbsp; {{scope.row.startTime}}-->
{{timestampToTime(scope.row.startT)}}
</template>
</el-table-column>
<el-table-column label="结束时间">
<template slot-scope="scope">
{{scope.row.endDate}} &nbsp; {{scope.row.endTime}}
<!--{{scope.row.endDate}} &nbsp; {{scope.row.endTime}}-->
{{timestampToTime(scope.row.endT)}}
</template>
</el-table-column>
<el-table-column label="直播内容" prop="content"></el-table-column>
......@@ -145,6 +148,19 @@
this.queryForm.page = val
this.initPublic()
},
timestampToTime(row) {
if (row === 0) {
return ''
}
var date = new Date(row)
var Y = date.getFullYear() + '-'
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '
var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'
var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':'
var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
return Y + M + D + h + m + s
},
},
created() {
this.initPublic()
......