Quick Development Platform-Implementation of document signatures and Custom reports, quick development platform signatures
Preface
Recently I made an e-government project, where I used document signatures and Custom reports. These two features are very common and I collected them to my own development framework, we also share the implementation methods with you.
Http://www.learun.cn: 8090 Online demo
Document Seal
The official document seal is a small JS plug-in found on the Internet. The principle is very simple. It is to put the seal in a div, and then merge it. The effect is as follows:
Let's take a look at the source code of this small plug-in.
View Code
In fact, we can manage all the stamps and assign the seal permissions to the specified person. When you sign a seal, you can create a specific chapter.
Custom charts
Custom charts use Baidu's Echarts chart plug-in. Then, some encapsulation is made based on this plug-in. You can use SQL statements on the foreground to define the chart data source. Then, the chart ID is used to specify the area display chart.
Open Source Address of Baidu chart: http://echarts.baidu.com/
The encapsulated public method is as follows:
View Code
The effect I have made is as follows.
First, create a chart data source template.
On this page, we can write the SQL statement of the chart data source.
This completes the definition of the report template. You do not need to write a line of code to directly display it to users, such:
Because Echarts can specify to draw a chart to a div, we can also directly bind the chart to the homepage.
Http://www.learun.cn: 8090 Online demo