[update]完成时间组件,待测试。

This commit is contained in:
OrangeM21 2020-06-01 15:56:53 +08:00
parent d7341c13a1
commit 57a95d10d6
3 changed files with 11 additions and 6 deletions

View File

@ -7,28 +7,31 @@
:end-placeholder="this.$t('common.StartDate')"
align="center"
size="large"
value-format="yyyy-MM-DD hh:mm:ss"
:clearable="false"
class="datepicker"
value-format="yyyy-MM-ddThh:mm"
:default-time="['12:00:00', '12:00:00']"
@change="handleDateChange"
/>
</template>
<script>
import { formatDate } from '@/utils/common'
export default {
name: '',
components: {},
data() {
return {
value: []
value: [formatDate((new Date().getTime()) - 432000000), formatDate(new Date().getTime())]
}
},
computed: {
},
mounted() {
console.log(this.value)
},
methods: {
handleDateChange(val) {

View File

@ -117,8 +117,9 @@ export function formatDate(inputTime) {
let h = date.getHours()
h = h < 10 ? ('0' + h) : h
let minute = date.getMinutes()
let second = date.getSeconds()
// let second = date.getSeconds()
minute = minute < 10 ? ('0' + minute) : minute
second = second < 10 ? ('0' + second) : second
return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second
// second = second < 10 ? ('0' + second) : second
// return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second
return y + '-' + m + '-' + d + 'T' + h + ':' + minute
}

View File

@ -109,6 +109,7 @@ export default {
}
},
mounted() {
console.log(this.tableConfig.extraQuery)
},
methods: {