用户列表时间格式化

uat_us
caiyiling 2024-06-19 16:36:16 +08:00
parent c6092358d8
commit 7e54379ad3
2 changed files with 14 additions and 7 deletions

View File

@ -111,6 +111,7 @@
v-model="searchData[item.prop]"
:placeholder="item.placeholder"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
:disabled="item.disable && item.disable(searchData[item.prop])"
:style="{ width: item.width }"
/>
@ -122,6 +123,8 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
:style="{ width: item.width }"
clearable
/>

View File

@ -11,12 +11,6 @@
@reset="handleReset"
@new="handleAddUser"
/>
<!-- <el-button-->
<!-- type="primary"-->
<!-- size="mini"-->
<!-- style="margin-left:auto;height: 28px;position: absolute;bottom: 0;right: 10px"-->
<!-- @click="handleAddUser"-->
<!-- >{{$t('common:button:new')}}</el-button>-->
</div>
<base-table
v-loading="loading"
@ -70,6 +64,9 @@ const searchDataDefault = () => {
PageSize: 20,
Asc: false,
RealName: '',
BeginCreateTime: '',
EndCreateTime: '',
CreateTimeArr: [],
SortField: 'CreateTime'
}
}
@ -335,7 +332,14 @@ export default {
handleReset() {
this.searchData = searchDataDefault()
this.getList()
},
handleSearch() {
if (this.searchData.CreateTimeArr.length > 0) {
this.searchData.BeginCreateTime = this.searchData.CreateTimeArr[0]
this.searchData.EndCreateTime = this.searchData.CreateTimeArr[1]
}
this.getList()
},
}
}
</script>