Skip to main content

Knowledge base application construction


1. Usage scenarios

Place the rich text component in a common form and obtain the data of the form through a custom display page.


2. Video Display

此处为语雀视频卡片,点击链接查看:知识库模板.mp4


3. Procedure

3.1 create a common form

Place a single line of text and a rich text component in the form. You can modify the title of a single line of text and click save.

As shown in the figure:

3.2 create a custom page

On the custom page, drag and drop a table component, click data source, create a remote API, modify the name, request address, requirement parameters, and data processing

(1) change data columns by adding, deleting, or modifying data columns

Request address:YIDA platform interface (page data source can be called directly)  

Refer to the sixth point of the form instance in the document, "Search the form instance details list based on criteria 」

The prefix of the address ishttps://www.aliwork.com/dingtalk/web/  

The APP in the middle is the address bar of the current table page.

The suffix is/v1/form/searchFormDatas.json 

3.3 obtain the request parameters in the application settings on the homepage, find the corresponding form, copy the Form ID, and put it into the request parameters. The parameter name remains unchanged, and the parameter value is the form ID.

3.4 click the plus sign on the right side of data processing and select the request completion callback function to view the code in the document.

The custom page calls the interface to process data and display it in a table.

Reference documents:https://www.yuque.com/yida/subject/vswqzz


You can first copy the entire code to the data processing, where in parentheses let arr ={ }, you only need to leaveinstid:item.formInstId, the rest of the code can be deleted

Modify the required fields in the data column and use the following figure to obtain the required field data.

As shown in the figure (my form only has the title, so I add the title attribute to the code value, obtain the unique identifier of the title attribute, and add Item.formData.)

Return to the edit page and click data source to create a variable binding. Select the name of the remote API created at the beginning.

Click the operation page of the edit page, automatically jump, and then click the button.

Click callback function, add binding action onActionClick, and click save


After the binding action is created, a JS page will automatically pop up. You need to write the following code in it.

export function onActionClick(rowData) {

const id = rowData.instid;

this.utils.router.push('Push', {formInstId:id},true,true)

console.log(rowData);

}

push in the brackets of this.utils.router.push('push') is the address before the question mark on the data details page.

When you return to the home page of the application, you can see the custom obtained form data, and when you click, you can jump

##> click the link to authenticate now ##<


Click me for free consultation!

Kuairen enters the digital age step by step

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