Commit 8b2a91d5 authored by custom's avatar custom

Merge origin/master into master

parents ddfb3fe1 246390c5
...@@ -72,7 +72,7 @@ winId | String(必填) | html元素标签的id ...@@ -72,7 +72,7 @@ winId | String(必填) | html元素标签的id
functionCode | String(必填) | 抽屉的唯一标识,用以确定该抽屉的相关信息 functionCode | String(必填) | 抽屉的唯一标识,用以确定该抽屉的相关信息
params | Object | 需传递的参数,将自动拼到url上 params | Object | 需传递的参数,将自动拼到url上
closeFunction | function | 关闭抽屉调用的方法 closeFunction | function | 关闭抽屉调用的方法
width | Number | 自定义宽度 width | Number/字符串(100% , 100px) | 自定义宽度
```javascript ```javascript
......
...@@ -147,7 +147,7 @@ mvn clean install -Dmaven.test.skip=true ...@@ -147,7 +147,7 @@ mvn clean install -Dmaven.test.skip=true
在 HelParent 项目录下执行: 在 HelParent 项目录下执行:
- MySql - MySql
- `mvn process-resources -D skipLiquibaseRun=false -D db.driver=com.mysql.jdbc.Driver -D db.url=jdbc:mysql://127.0.0.1:3306/hel -Ddb.user=hel_dev -Ddb.password=hel_dev` - `mvn process-resources -D skipLiquibaseRun=false -D db.driver=com.mysql.jdbc.Driver -D db.url="jdbc:mysql:127.0.0.1:3306/hel?useUnicode=true&characterEncoding=utf8" -Ddb.user=hel_dev -Ddb.password=hel_dev`
- SqlServer - SqlServer
- `mvn process-resources -D skipLiquibaseRun=false -Ddb.user=hel_dev -Ddb.password=hel_dev-D db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver -D db.url="jdbc:sqlserver://127.0.0.1:1433; DatabaseName=hel"` - `mvn process-resources -D skipLiquibaseRun=false -Ddb.user=hel_dev -Ddb.password=hel_dev-D db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver -D db.url="jdbc:sqlserver://127.0.0.1:1433; DatabaseName=hel"`
- Oracle - Oracle
......
## HlsBarChart
```xml
<h:hlsChart chartType="BAR" style="margin-top:5px;margin-left:6px;" barSourceData="barSourceData" titleBgColor="red"
title="商业伙伴" modify="modifyFunc" add="addFunc" color="#ed4e2a"></h:hlsChart>
```
**常用的属性**
| 属性名 | 类型 | 作用 | 是否必输|
|:---: | :---: | :---: | :---: |
| id | string | 唯一标识 |
| chartType | string | 组件类型 | Y
| style | string | 组件box样式 |
| barSourceData | object | 组件数据源 | Y
| titleBgColor | string | 组件标题背景颜色 |
| title | string | 组件标题 |
| modify | function | 编辑icon触发的事件 |
| add | function | 新增icon触发的事件 |
|color|string |字体颜色|
**下面是一个例子**
```javascript
var datas = function (url) {
var odatas = [],
$.ajax({
type: 'GET',
url: "${base.contextPath}/hls/bp/master/home/secord/query",
async: false,
contentType: "application/json; charset=utf-8",
success: function (datas) {
odatas = datas.rows;
}
});
return odatas;
}();
var statisticalData = function () {
var o = {};
$.ajax({
type: 'GET',
url: "${base.contextPath}/hls/bp/master/count/query",
async: false,
contentType: "application/json; charset=utf-8",
success: function (datas) {
o.allCount = datas.rows[0].allCount;
o.monthAddCount = datas.rows[0].monthAddCount;
}
});
return o;
}();
//数据源
var barSourceData = {
barModel: {
xkey: 'description',
ykeys: 'count',
data: datas,
labels: '数值', //鼠标经过柱子图显示的描述
barColors: 'green',
barSizeRatio: 0.5,
},
statisticalModel: {
statisticalTitle: {
allCount: "总数",
monthAddCount: "本月新增"
},
statisticalData: statisticalData
}
};
function modifyFunc(e) {
alert("modifyFunc");
}
function addFunc(e) {
alert("addFunc");
}
```
#### 注意: 数据源中的属性名,需要固定,这样做是考虑到将不同的查询结果整合成统一的数据格式,方便组件渲染。
> - barModel:柱形图
| 属性名 | 类型 | 作用 |
|:---: | :---: | :---: | :---: |
| xkey | string | x轴标题对应的属性名
| ykeys | string | y轴数据对应的属性名 |
| data | Array | 数据集 |
| labels | string | 鼠标经过柱状图时ykeys对应的值的描述 |
| barColors | string | 柱子颜色 |
| barSizeRatio | Number | 柱子和数据的比例 |
> - statisticalModel:上方的统计框
| 属性名 | 类型 | 作用 |
|:---: | :---: | :---: |
| statisticalTitle | object | 统计框的属性名以及属性描述 |
| statisticalData | object | 数据源 (注意statisticalData的属性名和statisticalTitle中的属性名要对应上)
```xml
<h:hlsChart chartType="BAR" style="margin-top:5px;margin-left:6px;" barSourceData="barSourceData" titleBgColor="red"
title="商业伙伴" modify="modifyFunc" add="addFunc" color="#ed4e2a"></h:hlsChart>
```
\ No newline at end of file
## hlsChart 图表
### 实心饼状图(SOLID)
使用方法:
```xml
<h:hlsChart
chartType="SOLID"
style="position: relative;"
dataSource="data"
color="#FA6A4D,#2EC3E8,#A0D469,#FFCD55,#E75B8D"
labels="承租人变更,担保人变更,租赁物变更,租金计划变更,合同文本变更"
values="tenant,guarantor,item,mortgage,cashflow"
segmentShowStroke="true">
</h:hlsChart>
<script>
var data={
"cashflow": "0",
"guarantor": "2",
"item": "0",
"mortgage": "0",
"tenant": "6"
}
</script>
```
| 属性名 | 类型 | 描述 |
| --- | --- | --- |
| chartType | String | 图表类型 |
| style | String | 图表外层的style样式 |
| dataSource | object | 图表数据源 |
| color | String | 图表各数据块所对应的颜色,多个数据块之间使用“,”分隔 |
| labels | String | 图表中各数据块所对应的标签,多个数据块之间使用“,”分隔 |
| values | String | 图表中各数据块所对应响应数据中的字段,多个数据块之间使用“,”分隔 |
| segmentShowStroke | String | 饼图中的块是否分隔,默认为false即不分隔 |
### 环状图(CIRCULAR)
使用方法:
```xml
<h:hlsChart
chartType="CIRCULAR"
style="position: relative;"
url="${base.contextPath}/con/conHomepage/ApprovalQuantity/query"
color="#FFCD55,#2EC3E8,#FA6A4D,#A0D469"
labels="新建,审批中,审批拒绝,审批通过"
values="newCount,approvingCount,rejectedCount,approvedCount"
selectedChanged="select">
</h:hlsChart>
<script>
var select = function(arg,item){
console.log('label:'+item.label);
}
</script>
```
| 属性名 | 类型 | 描述 |
| --- | --- | --- |
| chartType | String | 图表类型 |
| style | String | 图表外层的style样式 |
| url | String | 图表数据源的获取地址 |
| color | String | 图表各数据块所对应的颜色,多个数据块之间使用“,”分隔 |
| labels | String | 图表中各数据块所对应的标签,多个数据块之间使用“,”分隔 |
| values | String | 图表中各数据块所对应响应数据中的字段,多个数据块之间使用“,”分隔 |
| selectedChanged | String | 图表中各数据块的点击回调事件 |
## HlsBarChart 图表
### 柱状图(BAR)
```xml
<h:hlsChart chartType="BAR" style="margin-top:5px;margin-left:6px;" barSourceData="barSourceData" titleBgColor="red"
title="商业伙伴" modify="modifyFunc" add="addFunc" color="#ed4e2a"></h:hlsChart>
```
**常用的属性**
| 属性名 | 类型 | 作用 | 是否必输|
|:---: | :---: | :---: | :---: |
| id | string | 唯一标识 |
| chartType | string | 组件类型 | Y
| style | string | 组件box样式 |
| barSourceData | object | 组件数据源 | Y
| titleBgColor | string | 组件标题背景颜色 |
| title | string | 组件标题 |
| modify | function | 编辑icon触发的事件 |
| add | function | 新增icon触发的事件 |
|color|string |字体颜色|
**下面是一个例子**
```javascript
var datas = function (url) {
var odatas = [],
$.ajax({
type: 'GET',
url: "${base.contextPath}/hls/bp/master/home/secord/query",
async: false,
contentType: "application/json; charset=utf-8",
success: function (datas) {
odatas = datas.rows;
}
});
return odatas;
}();
var statisticalData = function () {
var o = {};
$.ajax({
type: 'GET',
url: "${base.contextPath}/hls/bp/master/count/query",
async: false,
contentType: "application/json; charset=utf-8",
success: function (datas) {
o.allCount = datas.rows[0].allCount;
o.monthAddCount = datas.rows[0].monthAddCount;
}
});
return o;
}();
//数据源
var barSourceData = {
barModel: {
xkey: 'description',
ykeys: 'count',
data: datas,
labels: '数值', //鼠标经过柱子图显示的描述
barColors: 'green',
barSizeRatio: 0.5,
},
statisticalModel: {
statisticalTitle: {
allCount: "总数",
monthAddCount: "本月新增"
},
statisticalData: statisticalData
}
};
function modifyFunc(e) {
alert("modifyFunc");
}
function addFunc(e) {
alert("addFunc");
}
```
#### 注意: 数据源中的属性名,需要固定,这样做是考虑到将不同的查询结果整合成统一的数据格式,方便组件渲染。
> * barModel:柱形图
| 属性名 | 类型 | 作用 |
| --- | --- | --- |
| xkey | string | x轴标题对应的属性名 |
| ykeys | string | y轴数据对应的属性名 |
| data | Array | 数据集 |
| labels | string | 鼠标经过柱状图时ykeys对应的值的描述 |
| barColors | string | 柱子颜色 |
| barSizeRatio | Number | 柱子和数据的比例 |
> * statisticalModel:上方的统计框
| 属性名 | 类型 | 作用 |
| --- | --- | --- |
| statisticalTitle | object | 统计框的属性名以及属性描述 |
| statisticalData | object | 数据源 \(注意statisticalData的属性名和statisticalTitle中的属性名要对应上\) |
```xml
<h:hlsChart chartType="BAR" style="margin-top:5px;margin-left:6px;" barSourceData="barSourceData" titleBgColor="red"
title="商业伙伴" modify="modifyFunc" add="addFunc" color="#ed4e2a"></h:hlsChart>
```
## HlsBrokenChart 图表
### 折线图(BROKEN)
| 属性名 | 类型 | 作用 |
| --- | --- | --- |
| renderType | string | 渲染类型(one 或者 three) |
| url | string | 当渲染为three的时候url生效 |
| time | string | 当天时间(yyyy-mm-dd) |
| title | string | 折线图标题 |
| imageSrc | string | 折线图左角图片路径 |
```xml
<h:hlsChart renderType="three"
url="/con/conHomepage/putIn/query" chartType="BROKEN" time="${Session.sysDate!}"
title="合同逾期金额变动"
imageSrc="/resources/images/CONT/zhuzi.png"></h:hlsChart>
```
## HlsLineChart 图表
### 折线图(LINECHART)
| 属性名 | 类型 | 作用 |
| --- | --- | --- |
| id | string | 唯一标识 |
| url | string | 获取数据源的url |
| chartType | string | 图表类型 |
| title | string | 折线图标题 |
| style | string | 图表外层样式 |
| code | string | 选择放款/回款数据 |
```
<h:hlsChart chartType="LINECHART" id="A" code="PAYMENT" title="放款"
style="margin-top:15px;margin-left:60px;float:left;"
url="${base.contextPath}/csh/write/off/getEveryMonthPaymentAndReceiptAmount/query"> </h:hlsChart>
<h:hlsChart chartType="LINECHART" id="B" code="RECEIPT" title="回款"
style="margin-top:15px;margin-left:60px;float:left;"
url="${base.contextPath}/csh/write/off/getEveryMonthPaymentAndReceiptAmount/query"> </h:hlsChart>
<script>
InitiateSparklineCharts.init();
</script>
```
...@@ -415,7 +415,64 @@ function template(){ ...@@ -415,7 +415,64 @@ function template(){
> **提示**: > **提示**:
> >
> * 遇到**object**类型 就向下添加子标签,当遇到普通类型时,就添加到当前的标签上,就像处理一般属性那样。 > * 遇到**object**类型 就向下添加子标签,当遇到普通类型时,就添加到当前的标签上,就像处理一般属性那样。
### 任务通知栏(noticeTable)
```xml
<h:hlsGrid gridType="noticeTable" titleSearchId="titleSearchId" titleSearchInputId="titleSearchInputId"
hlsDataSource="taskListData" title="任务列表" inputPlaceHolder="搜索任务" titleIcon="fa fa-tasks"
inputImg="${base.contextPath}/resources/images/MAIN/hls-todo-search.png" locateEvent="af" maxPageSize="3"
id="noticeTable"></h:hlsGrid>
```
**常用属性**
| 属性名 | 类型 | 作用 | 是否必输|
|:---: | :---: | :---: | :---: |
| id | string | 唯一标识 | Y |
| gridType | string | 组件类型 | Y |
| titleSearchId | string | input查询框图标的id |
| titleSearchInputId | string | input框id |
| hlsDataSource | Array | 数据源 |
| title | string | 组件标题 |
| titleIcon | string | 组件标题icon(字体图标) |
| inputImg | string | 查询框图标 ||
| locateEvent | function | 行点击事件调用的函数|
| maxPageSize | Number | 记录最大的条数||
**提示:**
>- 每个noticeTable在window下面都会有以该ID命名的对象,该对象上有以下常用方法
| 方法名 | 参数 | 返回值 | 作用|
|:---: | :---: | :---: | :---: |
| renderUI | | | 重新渲染图表,(渲染之前改变传入的数据等信息)|
| selectCheckedItem | | 选中行的数据信息 | 获得选中行的数据信息|
>- locateEvent参数传递一个定义好的方法名字,locateEvent = "testFunc"
```javascript
function testFunc(e,rowdata){
}
```
该函数返回两个参数,参数1: 事件对象; 参数2: 该行数据信息
This diff is collapsed.
This diff is collapsed.
...@@ -40,14 +40,14 @@ ...@@ -40,14 +40,14 @@
#### 2.3 任务类的编写 #### 2.3 任务类的编写
想要自定义一个job,必须要继承一个抽象类AbstractJob,然后在`safeExecute()`方法中执行业务代码,示例代码如下: 想要自定义一个job,必须要继承一个抽象类AbstractJob或者AbstractJobWithIRequest,然后在`safeExecute()`方法中执行业务代码,示例代码如下:
```java ```java
public class demoJob extends AbstractJob{ public class demoJob extends AbstractJob{
@Autowired @Autowired
private xxxService service;//业务类 private xxxService service;//业务类
@Override @Override
public void safeExecute(JobExecutionContext jobExecutionContext) throws Exception { public void safeExecuteWithIRequest(JobExecutionContext jobExecutionContext) throws Exception {
//map中可以获取上方定义的参数,key为参数名称,value为参数值 //map中可以获取上方定义的参数,key为参数名称,value为参数值
JobDataMap map = jobExecutionContext.getMergedJobDataMap(); JobDataMap map = jobExecutionContext.getMergedJobDataMap();
try { try {
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
* II. 项目开发规范 * II. 项目开发规范
* [2.1 项目开发规范](/codeStyle.md#backEndDev) * [2.1 项目开发规范](/codeStyle.md#backEndDev)
* [2.2 编码规范](/codeStyle.md#backEndName)
* 2.3 Checkstyle * 2.3 Checkstyle
* III. 后端开发 * III. 后端开发
...@@ -35,6 +34,8 @@ ...@@ -35,6 +34,8 @@
* [4.2 字段级通用方法](/common-field-javascript.md) * [4.2 字段级通用方法](/common-field-javascript.md)
* [4.3 窗口级通用方法](/common-window-javascript.md) * [4.3 窗口级通用方法](/common-window-javascript.md)
* [4.4 锁屏和解屏通用方法](/common-mask-javascript.md) * [4.4 锁屏和解屏通用方法](/common-mask-javascript.md)
* [4.5 头行保存](/前端组件/头行保存.md)
* V. 前端UI开发 * V. 前端UI开发
...@@ -57,7 +58,7 @@ ...@@ -57,7 +58,7 @@
* [5.17 hlsGridBox\(表格\)](/前端组件/hlsGridBox.md) * [5.17 hlsGridBox\(表格\)](/前端组件/hlsGridBox.md)
* [5.18 hlsNumericTextBox\(数字框\)](/前端组件/hlsNumericTextBox.md) * [5.18 hlsNumericTextBox\(数字框\)](/前端组件/hlsNumericTextBox.md)
* [5.19 hlsNavigationBar\(导航栏\)](/前端组件/hlsNavigationBar.md) * [5.19 hlsNavigationBar\(导航栏\)](/前端组件/hlsNavigationBar.md)
* [5.20 头行保存](/前端组件/头行保存.md) * [5.20 hlsChart\(图表\)](/前端组件/hlsChart.md)
* VI. 框架功能描述 * VI. 框架功能描述
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment