优化时间选择
This commit is contained in:
parent
97e8be58c5
commit
5c5516834e
|
|
@ -17,6 +17,7 @@
|
|||
"axios": "0.17.1",
|
||||
"babel-plugin-component": "0.10.1",
|
||||
"babel-polyfill": "6.26.0",
|
||||
"dayjs": "^1.11.13",
|
||||
"echarts": "^5.5.1",
|
||||
"element-china-area-data": "^5.0.2",
|
||||
"element-ui": "2.8.2",
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="日期">
|
||||
<el-date-picker v-model="timeValue" type="datetimerange" range-separator="至" start-placeholder="开始日期"
|
||||
end-placeholder="结束日期" @change="changeTime" value-format="yyyy-MM-DD HH:mm:ss"
|
||||
:default-time="['00:00:00', '23:59:59']">
|
||||
end-placeholder="结束日期" @change="changeTime" :default-time="['00:00:00', '23:59:59']">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
|
@ -141,6 +140,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import dayjs from 'dayjs'
|
||||
import { cashOutAuditPage, cashOutAuditAudit } from "@/api/withdraw.js";
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -228,10 +228,12 @@ export default {
|
|||
this.cashOutAuditPage();
|
||||
},
|
||||
// 确认选择日期
|
||||
changeTime() {
|
||||
changeTime(e) {
|
||||
console.log(e);
|
||||
this.timeValue = e
|
||||
if (this.timeValue.length == 2) {
|
||||
this.query.startTime = this.timeValue[0];
|
||||
this.query.endTime = this.timeValue[1];
|
||||
this.query.startTime = dayjs(this.timeValue[0]).format("YYYY-MM-DD HH:mm:ss");
|
||||
this.query.endTime = dayjs(this.timeValue[1]).format("YYYY-MM-DD HH:mm:ss");
|
||||
} else {
|
||||
this.query.startTime = "";
|
||||
this.query.endTime = "";
|
||||
|
|
|
|||
Loading…
Reference in New Issue