fix: admin records filter by user_id instead of keyword search
- RecordView passes user_id as separate filter param, not as keyword - Admin records endpoint forwards user_id to DAO - treatmentDao.listAdmin supports exact user_id match filter - Added visible filter tag with clear button in RecordView
这个提交包含在:
@@ -105,9 +105,13 @@ async function updateDevice(deviceId, battery, temperature) {
|
||||
* @param {number} opts.offset
|
||||
* @returns {Promise<{records: Array, total: number}>}
|
||||
*/
|
||||
async function listAdmin({ keyword, dateFrom, dateTo, pageSize, offset }) {
|
||||
async function listAdmin({ keyword, userId, dateFrom, dateTo, pageSize, offset }) {
|
||||
const conditions = []
|
||||
const params = {}
|
||||
if (userId) {
|
||||
conditions.push('r.user_id = :user_id')
|
||||
params.user_id = userId
|
||||
}
|
||||
if (keyword) {
|
||||
conditions.push('u.nickname LIKE :kw')
|
||||
params.kw = '%' + keyword + '%'
|
||||
|
||||
在新工单中引用
屏蔽一个用户