Skip to main content

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

1. Usage scenarios

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

2. Procedure

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

If you do not want users to view and modify this information, you can set the status to hidden. Note that in advanced-data submission-, set the status to always submit.

Business data form

2.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);
}

2.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:

Conditional filtering

YIDA in order to better optimize the content and quality of YIDA user manual, it takes you 3-5 minutes to fill in the document feedback questionnaire. The document feedback questionnaire is submitted anonymously, and the questionnaire information is only used for YIDA document experience feedback collection. Thank you for your support for YIDA!

Click here to fill in the questionnaire


-------------------- 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