fix: improve monitorClient.department
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
parent
cce3a0cef8
commit
d60d7da33c
|
@ -26,9 +26,11 @@ const filter = computed(() => {
|
||||||
if (!formatFrom && formatTo) stamp = { lte: formatTo };
|
if (!formatFrom && formatTo) stamp = { lte: formatTo };
|
||||||
else if (formatFrom && !formatTo) stamp = { gte: formatFrom };
|
else if (formatFrom && !formatTo) stamp = { gte: formatFrom };
|
||||||
else if (formatFrom && formatTo) stamp = { between: [formatFrom, formatTo] };
|
else if (formatFrom && formatTo) stamp = { between: [formatFrom, formatTo] };
|
||||||
|
|
||||||
return Object.assign(obj, {
|
return Object.assign(obj, {
|
||||||
where: { 'v.stamp': stamp, departmentFk: state.getUser().departmentFk },
|
where: {
|
||||||
|
'v.stamp': stamp,
|
||||||
|
'c.departmentFk': state.getUser().value.departmentFk,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -36,8 +38,6 @@ function exprBuilder(param, value) {
|
||||||
switch (param) {
|
switch (param) {
|
||||||
case 'clientFk':
|
case 'clientFk':
|
||||||
return { [`c.id`]: value };
|
return { [`c.id`]: value };
|
||||||
case 'departmentFk':
|
|
||||||
return { [`c.${param}`]: value };
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,9 +70,13 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'departmentFk',
|
name: 'departmentFk',
|
||||||
label: t('customer.summary.team'),
|
label: t('customer.summary.team'),
|
||||||
component: 'select',
|
columnFilter: {
|
||||||
attrs: {
|
component: 'select',
|
||||||
url: 'Departments',
|
attrs: {
|
||||||
|
url: 'Departments',
|
||||||
|
},
|
||||||
|
alias: 'c',
|
||||||
|
inWhere: true,
|
||||||
},
|
},
|
||||||
columnField: {
|
columnField: {
|
||||||
component: null,
|
component: null,
|
||||||
|
|
Loading…
Reference in New Issue