Skip to main content

How can I see only the data of my own department in the report?

1. Usage scenarios

When you query data on the report page, you must restrict the user from viewing the data of your own department.


2. Video Display

此处为语雀视频卡片,点击链接查看:录制_2021_04_02_14_26_24_873.mp4


3. Procedure

3.1 add a single-line text component to the business data form and define the title as "Department code" or "Department ID 」


3.2 In the didMount() function of the JS panel on the page, add code-assign the department code to the department code component.

The reference code is as follows:

//给部门编码组件赋值表单提交人所在的部门ID信息
export function didMount() {
this.$('部门编码组件的fieldId').setValue(window.loginUser.deptId);
}


3.3 configure conditional filtering in the table component on the report page to make the "Department code" field-match-current logger variable-department code.

See the following figure:

4. Try it online

-------------------- Get the latest information YIDA, welcome to follow US--------------------


This doc is generated using machine translation. Any discrepancies or differences created in the translation are not binding and have no legal effect for compliance or enforcement purposes.
Copyright © 2024钉钉(中国)信息技术有限公司和/或其关联公司浙ICP备18037475号-4