解决日期问题
This commit is contained in:
parent
f17db170f4
commit
9b4c7b7107
|
@ -32,8 +32,10 @@
|
|||
</a-col>
|
||||
<a-col :md="8" :sm="8">
|
||||
<a-form-item label="时间范围">
|
||||
<a-range-picker :default-value="defaultTime" show-time :show-time="{ format: 'HH:mm:ss' }"
|
||||
:format="dateFormat" @change="onChangeTime" />
|
||||
<!-- <a-range-picker :default-value="defaultTime" show-time :show-time="{ format: 'HH:mm:ss' }"
|
||||
:format="dateFormat" @change="onChangeTime" /> -->
|
||||
<a-range-picker :show-time="{ format: 'HH:mm:ss' }" v-model="defaultTime" format="YYYY-MM-DD HH:mm:ss"
|
||||
@change="onChangeTime" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="5" :sm="5">
|
||||
|
@ -57,7 +59,7 @@
|
|||
<a-col :md="6">
|
||||
<div class="linese"></div>
|
||||
<!-- 分类区域 -->
|
||||
<div style="height:calc(100vh - 316px);overflow: auto;background: #e6e9f1;padding:10px;" ref="treeContainer">
|
||||
<div style="height:calc(100vh - 366px);overflow: auto;background: #e6e9f1;padding:10px;" ref="treeContainer">
|
||||
<a-tree :tree-data="treeDate" @select="onSelect" />
|
||||
</div>
|
||||
<div class="linese"></div>
|
||||
|
@ -65,7 +67,7 @@
|
|||
<a-col :md="18">
|
||||
<div class="linese"></div>
|
||||
<!-- 表格区域 -->
|
||||
<div style="height:calc(100vh - 316px);background: #e6e9f1;overflow:hidden;padding: 15px;">
|
||||
<div style="height:calc(100vh - 366px);background: #e6e9f1;overflow:hidden;padding: 15px;">
|
||||
<a-table size="middle" bordered :columns="columns" :data-source="dataSource" :loading="loading"
|
||||
:pagination="pagination" :scroll="{ x: 1200, y: 'calc(100vh - 450px)' }" rowKey="序号"
|
||||
@change="handleTableChange">
|
||||
|
@ -160,15 +162,12 @@ export default {
|
|||
if (res.success) {
|
||||
this.allTask = res.result
|
||||
if (res.result.length > 0) {
|
||||
this.activeTaskId = res.result[0].id
|
||||
|
||||
const start = moment(res.result[0].startTime).set({ hour: 0, minute: 0, second: 0 })
|
||||
const end = moment(res.result[0].endTime).set({ hour: 23, minute: 59, second: 59 })
|
||||
this.defaultTime = [start, end];
|
||||
console.log('riq', this.defaultTime)
|
||||
this.activeTaskId = res.result[0].id
|
||||
const start = moment(res.result[0].startTime)
|
||||
const end = moment(res.result[0].endTime)
|
||||
this.defaultTime.push(start, end)
|
||||
this.tableParams.startTime = start.format(this.dateFormat);
|
||||
this.tableParams.endTime = end.format(this.dateFormat)
|
||||
|
||||
this.tableParams.endTime = end.format(this.dateFormat)
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
|
@ -176,12 +175,10 @@ export default {
|
|||
})
|
||||
},
|
||||
handleTaskChange(value) {
|
||||
var curTask = this.allTask.filter(item => item.id == value)
|
||||
console.log(curTask)
|
||||
|
||||
var curTask = this.allTask.filter(item => item.id == value)
|
||||
const start = moment(curTask.startTime)
|
||||
const end = moment(curTask.endTime)
|
||||
this.defaultTime = [start, end];
|
||||
this.defaultTime.push(start, end)
|
||||
this.tableParams.startTime = start.format(this.dateFormat);
|
||||
this.tableParams.endTime = end.format(this.dateFormat)
|
||||
|
||||
|
@ -273,7 +270,7 @@ export default {
|
|||
},
|
||||
handelEdit(record) {
|
||||
const filteredColumn = this.columns.filter(item => item.dataIndex != 'operation' && item.dataIndex != 'ROW_ID');
|
||||
delete record['ROW_ID'];
|
||||
delete record['ROW_ID'];
|
||||
this.$refs.editdataseachForm.initForm(this.tableParams.schemaMass, this.tableParams.tableName, filteredColumn, record);
|
||||
},
|
||||
getTableDataList() {
|
||||
|
|
|
@ -46,17 +46,19 @@
|
|||
</div>
|
||||
|
||||
<!-- table区域-begin -->
|
||||
<div style="height:calc(100vh - 316px);overflow:hidden; background: #e6e9f1 !important;">
|
||||
<div class="linese"></div>
|
||||
<a-table size="middle" bordered :columns="columns" :data-source="dataSource" :loading="loading"
|
||||
:pagination="pagination" :scroll="{ x: 1200, y: 'calc(100vh - 310px)' }" rowKey="序号"
|
||||
@change="handleTableChange">
|
||||
<template slot="operation" slot-scope="text, record">
|
||||
<a-button type="primary" @click="handelEdit(record)">编辑</a-button>
|
||||
</template>
|
||||
</a-table>
|
||||
<div class="linese"></div>
|
||||
<div class="linese"></div>
|
||||
<!-- 表格区域 -->
|
||||
<div style="height:calc(100vh - 316px);background: #e6e9f1;overflow:hidden;padding: 15px;">
|
||||
<a-table size="middle" bordered :columns="columns" :data-source="dataSource" :loading="loading"
|
||||
:pagination="pagination" :scroll="{ x: 1200, y: 'calc(100vh - 450px)' }" rowKey="序号"
|
||||
@change="handleTableChange">
|
||||
<template slot="operation" slot-scope="text, record">
|
||||
<a-button type="primary" @click="handelEdit(record)">编辑</a-button>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="linese"></div>
|
||||
|
||||
<!-- table区域-end -->
|
||||
|
||||
<!-- 表单区域 -->
|
||||
|
@ -69,7 +71,7 @@ import filesModel from './modules/filesModel'
|
|||
|
||||
import {
|
||||
getSuccessTableInfo,
|
||||
getTableDataByOri,
|
||||
getTableDataByOri,
|
||||
} from '@/api/fileDataLink'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import JEllipsis from "@/components/jeecg/JEllipsis";
|
||||
|
|
Loading…
Reference in New Issue
Block a user