This commit is contained in:
77
2024-05-29 10:38:38 +08:00
parent 48fa454101
commit 3234b6eb97

View File

@@ -63,6 +63,19 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="注册时间" prop="regTimeQuery">
<el-date-picker
v-model="queryParams.regTimeQuery"
type="daterange"
align="right"
unlink-panels
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -254,10 +267,38 @@ export default {
gender: undefined, gender: undefined,
city: undefined, city: undefined,
lastLoginIp: undefined, lastLoginIp: undefined,
onlineStatus: undefined onlineStatus: undefined,
regTimeQuery: undefined
}, },
userAddUpdateDialogVisible: false, userAddUpdateDialogVisible: false,
userInfoDialogVisible: false userInfoDialogVisible: false,
pickerOptions: {
shortcuts: [{
text: '最近一天',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}]
},
}; };
}, },
created() { created() {
@@ -267,7 +308,12 @@ export default {
/** 查询用户列表 */ /** 查询用户列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listUser(this.queryParams).then(response => { let query = {
...this.queryParams,
regBeginDateStr: this.queryParams.regTimeQuery?this.queryParams.regTimeQuery[0]:undefined,
regEndDateStr: this.queryParams.regTimeQuery?this.queryParams.regTimeQuery[1]:undefined,
}
listUser(query).then(response => {
this.userList = response.rows; this.userList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;