Commit 249bfcbe authored by 仇晓婷's avatar 仇晓婷

时间控件

parent 0685f966
<template> <template>
<div class="time-view"> <div class="time-view" v-if="startDate && endDate">
<div>{{ startDate }}</div> <div>{{ startDate }}</div>
<div class="jian-tou" v-if="startDate && endDate"> <div class="jian-tou">
<div>{{ jg }} {{ unit }}</div> <div>{{ jg }} {{ unit }}</div>
</div> </div>
<div>{{ endDate }}</div> <div>{{ endDate }}</div>
...@@ -47,8 +47,10 @@ export default { ...@@ -47,8 +47,10 @@ export default {
}, },
methods: { methods: {
init(v) { init(v) {
this.startDate = v[this.start]; if (v) {
this.endDate = v[this.end]; this.startDate = v[this.start];
this.endDate = v[this.end];
}
this.unit = this.mode; this.unit = this.mode;
var date1 = new Date(this.startDate).getTime(); //开始时间,时间戳 var date1 = new Date(this.startDate).getTime(); //开始时间,时间戳
......
<template> <template>
<Form ref="form" :model="entity" :rules="rules" :label-width="100"> <Form ref="form" :model="entity" :rules="rules" :label-width="100">
<!-- <DateDRange :value="timeValue" ></DateDRange> -->
<Row> <Row>
<Col span="8" class="projct-img"> <Col span="8" class="projct-img">
<FormItem :label="l('picture')" prop="picture"> <FormItem :label="l('picture')" prop="picture">
...@@ -87,7 +88,7 @@ ...@@ -87,7 +88,7 @@
style="width: 300px" style="width: 300px"
></DatePicker> </FormItem ></DatePicker> </FormItem
></Col> ></Col>
<!-- <DateDRange :timeValue="timeValue" :wrok="1"></DateDRange> -->
<Col :span="12" <Col :span="12"
><FormItem :label="l('type')" prop="type"> ><FormItem :label="l('type')" prop="type">
<Dictionary <Dictionary
......
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