Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jfV5lcyq
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
管理员
jfV5lcyq
Commits
577c0ea4
Commit
577c0ea4
authored
Jun 08, 2018
by
陈玉兰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
5278200a
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
169 additions
and
59 deletions
+169
-59
formmodelTab.js
WebContent/process/pages/formmodel/js/formmodelTab.js
+16
-27
formtableTabDetail.jsp
WebContent/process/pages/formtable/formtableTabDetail.jsp
+3
-4
formtableTab.js
WebContent/process/pages/formtable/js/formtableTab.js
+68
-26
FormmodelsBusiness.java
src_process/com/gaowj/business/FormmodelsBusiness.java
+2
-0
FormmodelsBusinessImpl.java
...com/gaowj/business/formmodels/FormmodelsBusinessImpl.java
+35
-0
actAction.java
src_process/com/gaowj/formmodel/action/actAction.java
+14
-1
dataAction.java
src_process/com/gaowj/formmodel/action/dataAction.java
+2
-0
actAction.java
src_process/com/gaowj/formtable/action/actAction.java
+11
-0
Property.java
src_utils/com/gaowj/util/Property.java
+18
-1
No files found.
WebContent/process/pages/formmodel/js/formmodelTab.js
View file @
577c0ea4
...
@@ -79,7 +79,7 @@ function rowstyler(index,row){
...
@@ -79,7 +79,7 @@ function rowstyler(index,row){
}
}
}
}
//展示列表
//展示列表
datagrid
(
"list"
,
ls_title
,
gaowj
.
WEB_APP_NAME
+
"/formmodelData_list
"
,
queryData
,
is_column
,
60
,
80
);
datagrid
(
"list"
,
ls_title
,
gaowj
.
WEB_APP_NAME
+
"/formmodelData_list
?tableId="
+
$
.
getUrlParam
(
"tableId"
)
,
queryData
,
is_column
,
60
,
80
);
/****/
/****/
...
@@ -104,15 +104,14 @@ function formatMenu(value, data,index) {
...
@@ -104,15 +104,14 @@ function formatMenu(value, data,index) {
//上浮横向菜单集里的具体菜单项(需更改)
//上浮横向菜单集里的具体菜单项(需更改)
function
getOptionMenu
(
data
,
index
){
function
getOptionMenu
(
data
,
index
){
var
returnData
=
"<span class=
\"
icon-edit
\"
style=
\"
padding-left:20px;*width:20px;
\"
></span><a href=
\"
javascript:void(0);
\"
onclick=
\"
editRow('"
var
returnData
=
"<span class=
\"
icon-edit
\"
style=
\"
padding-left:20px;*width:20px;
\"
></span><a href=
\"
javascript:void(0);
\"
onclick=
\"
editRow('"
+
index
+
"')
\"
>编辑</a> | <span class=
\"
icon-ext-file
\"
style=
\"
padding-left:20px;*width:20px;
\"
></span><a href=
\"
javascript:void(0);
\"
onclick=
\"
deploy('"
+
index
+
"')
\"
>编辑</a> | <span class=
\"
icon-clear
\"
style=
\"
padding-left:20px;*width:20px;
\"
></span><a href=
\"
javascript:void(0);
\"
onclick=
\"
deleteRow('"
+
index
+
"')
\"
>部署</a> | <span class=
\"
icon-clear
\"
style=
\"
padding-left:20px;*width:20px;
\"
></span><a href=
\"
javascript:void(0);
\"
onclick=
\"
deleteRow('"
+
index
+
"')
\"
>删除</a>"
;
+
index
+
"')
\"
>删除</a>"
;
return
returnData
;
return
returnData
;
}
}
//返回菜单集的菜单个数(需更改)
//返回菜单集的菜单个数(需更改)
function
getOptionMenuCount
(){
function
getOptionMenuCount
(){
var
is_menu_count
=
3
;
var
is_menu_count
=
2
;
return
is_menu_count
;
return
is_menu_count
;
}
}
...
@@ -136,14 +135,14 @@ function addRow(){
...
@@ -136,14 +135,14 @@ function addRow(){
}
}
//加载增加子页面成功后的回调
//加载增加子页面成功后的回调
function
addUrlOnloadCallback
(
is_row
){
function
addUrlOnloadCallback
(
is_row
){
is_row
.
MODEL_CONTENT
=
''
;
initUeditor
(
is_row
);
initUeditor
(
is_row
);
}
}
//保存
//保存
function
insertData
(
is_entity
){
function
insertData
(
is_entity
){
console
.
log
(
is_entity
);
var
tableId
=
$
.
getUrlParam
(
"tableId"
);
var
tableId
=
$
.
getUrlParam
(
"tableId"
);
is_entity
.
FIELD_TABLE_ID
=
tableId
;
is_entity
.
FIELD_TABLE_ID
=
tableId
;
is_entity
.
FIELD_FLAG
=
is_entity
.
FLAG
;
is_entity
.
FIELD_MODEL_CONTENT
=
is_entity
.
editorValue
;
is_entity
.
FIELD_MODEL_CONTENT
=
is_entity
.
editorValue
;
var
v_result
=
formmodelModule
.
act
.
insertFormModel
(
is_entity
);
var
v_result
=
formmodelModule
.
act
.
insertFormModel
(
is_entity
);
$
(
'#list'
).
datagrid
(
'reload'
);
$
(
'#list'
).
datagrid
(
'reload'
);
...
@@ -161,12 +160,17 @@ function editRow(index) {
...
@@ -161,12 +160,17 @@ function editRow(index) {
//加载修改子页面成功后的回调
//加载修改子页面成功后的回调
function
updateUrlOnloadCallback
(
is_row
){
function
updateUrlOnloadCallback
(
is_row
){
var
flag
=
is_row
.
FLAG
;
$
(
'input[name="FLAG"]'
).
each
(
function
(
index
,
element
){
if
(
$
(
element
).
val
()
==
flag
){
$
(
element
).
prop
(
'checked'
,
true
);
}
})
$
(
'input[name="FLAG"]'
).
attr
(
"checked"
,
''
);
initUeditor
(
is_row
);
initUeditor
(
is_row
);
}
}
function
initUeditor
(){
function
initUeditor
(
is_row
){
UE
.
delEditor
(
'ueditId'
);
UE
.
delEditor
(
'ueditId'
);
var
ue
=
UE
.
getEditor
(
'ueditId'
,{});
var
ue
=
UE
.
getEditor
(
'ueditId'
,{});
ue
.
ready
(
function
()
{
ue
.
ready
(
function
()
{
...
@@ -177,7 +181,9 @@ function initUeditor(){
...
@@ -177,7 +181,9 @@ function initUeditor(){
//保存
//保存
function
updateData
(
is_entity
){
function
updateData
(
is_entity
){
v_result
=
procdefinitionModule
.
act
.
updateProcdefinition
(
is_entity
);
is_entity
.
FIELD_MODEL_CONTENT
=
is_entity
.
editorValue
;
is_entity
.
FIELD_FLAG
=
is_entity
.
FLAG
;
v_result
=
formmodelModule
.
act
.
updateFormModel
(
is_entity
);
$
(
'#list'
).
datagrid
(
'reload'
);
$
(
'#list'
).
datagrid
(
'reload'
);
return
v_result
;
return
v_result
;
}
}
...
@@ -261,27 +267,10 @@ function refreshRow(){
...
@@ -261,27 +267,10 @@ function refreshRow(){
$
(
"#formmodelTab_searchForm"
).
form
(
'reset'
);
$
(
"#formmodelTab_searchForm"
).
form
(
'reset'
);
searchRow
();
searchRow
();
}
}
/****/
/**
* 序号:9
* 功能:查询
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function
searchRow
(){
function
searchRow
(){
var
v_query
=
$
(
"#formmodelTab_searchForm"
).
getFormVal
();
var
v_query
=
$
(
"#formmodelTab_searchForm"
).
getFormVal
();
$
(
'#list'
).
datagrid
(
'load'
,
v_query
);
$
(
'#list'
).
datagrid
(
'load'
,
v_query
);
}
}
function
design
(
index
){
$
(
'#list'
).
datagrid
(
'selectRow'
,
index
);
var
is_row
=
$
(
'#list'
).
datagrid
(
'getSelections'
);
$
(
'#list'
).
datagrid
(
'clearSelections'
);
window
.
open
(
'http://localhost:92/process-editor/modeler.jsp?modelId='
+
is_row
[
0
].
ID
);
}
WebContent/process/pages/formtable/formtableTabDetail.jsp
View file @
577c0ea4
...
@@ -7,21 +7,20 @@
...
@@ -7,21 +7,20 @@
<span>表名:</span>
<span>表名:</span>
</td>
</td>
<td style="width: 30%">
<td style="width: 30%">
<input class="easyui-textbox" id="TABLE_NAME" name="FIELD_TABLE_NAME" value="${is_row.TABLE_NAME}" style="width:200px" />
<input class="easyui-textbox"
required="required"
id="TABLE_NAME" name="FIELD_TABLE_NAME" value="${is_row.TABLE_NAME}" style="width:200px" />
</td>
</td>
<td style="width: 15%;" class="tableStyleLable">
<td style="width: 15%;" class="tableStyleLable">
<span>同步数据库状态:</span>
<span>同步数据库状态:</span>
</td>
</td>
<td style="width: 30%">
<td style="width: 30%">
<
span id="IS_DBSYNCH" name="FIELD_IS_DBSYNCH" value="0"></span
>
<
input id="IS_DBSYNCH" name="FIELD_IS_DBSYNCH" value="0"/
>
</td>
</td>
</tr>
</tr>
<tr>
<td class="tableStyleLable">
<td class="tableStyleLable">
<span>描述:</span>
<span>描述:</span>
</td>
</td>
<td colspan="3">
<td colspan="3">
<input class="easyui-textbox" id="CONTENT" name="FIELD_CONTENT" value="${is_row.CONTENT}" style="width:570px" />
<input class="easyui-textbox"
required="required"
id="CONTENT" name="FIELD_CONTENT" value="${is_row.CONTENT}" style="width:570px" />
</td>
</td>
</tr>
</tr>
</table>
</table>
...
...
WebContent/process/pages/formtable/js/formtableTab.js
View file @
577c0ea4
...
@@ -39,9 +39,18 @@ var ls_ywlx = 'YBYW';
...
@@ -39,9 +39,18 @@ var ls_ywlx = 'YBYW';
* 单位:宁波金网
* 单位:宁波金网
* 备注:需更改
* 备注:需更改
**/
**/
var
is_dbsynch_data
=
[{
CODE_ID
:
'0'
,
CODE_NAME
:
'
未同步'
},{
CODE_ID
:
'1'
,
CODE_NAME
:
'已
同步'
}];
var
is_dbsynch_data
=
[{
CODE_ID
:
'0'
,
CODE_NAME
:
'
不同步'
},{
CODE_ID
:
'1'
,
CODE_NAME
:
'
同步'
}];
var
type_data
=
[{
CODE_ID
:
'varchar'
,
CODE_NAME
:
'varchar'
},{
CODE_ID
:
'int'
,
CODE_NAME
:
'int'
},{
CODE_ID
:
'date'
,
CODE_NAME
:
'date'
}];
var
type_data
=
[
{
CODE_ID
:
'varchar'
,
CODE_NAME
:
'varchar'
},
{
CODE_ID
:
'int'
,
CODE_NAME
:
'int'
},
{
CODE_ID
:
'double'
,
CODE_NAME
:
'double'
},
{
CODE_ID
:
'float'
,
CODE_NAME
:
'float'
},
{
CODE_ID
:
'blob'
,
CODE_NAME
:
'blob'
},
{
CODE_ID
:
'bigdecimal'
,
CODE_NAME
:
'bigdecimal'
},
{
CODE_ID
:
'text'
,
CODE_NAME
:
'text'
},
{
CODE_ID
:
'datetime'
,
CODE_NAME
:
'datetime'
},
{
CODE_ID
:
'date'
,
CODE_NAME
:
'date'
}];
var
list_default_field
=
[{
var
list_default_field
=
[{
FIELD_NAME
:
'uuid'
,
FIELD_NAME
:
'uuid'
,
...
@@ -52,7 +61,9 @@ var list_default_field=[{
...
@@ -52,7 +61,9 @@ var list_default_field=[{
CONTENT
:
'主键UUID'
,
CONTENT
:
'主键UUID'
,
FIELD_DEFAULT
:
''
,
FIELD_DEFAULT
:
''
,
TYPE
:
'varchar'
,
TYPE
:
'varchar'
,
IS_NULL
:
false
FIELD_WIDTH
:
20
,
IS_NULL
:
false
,
IS_SHOW_LIST
:
false
},{
},{
FIELD_NAME
:
'create_id'
,
FIELD_NAME
:
'create_id'
,
LENGTH
:
50
,
LENGTH
:
50
,
...
@@ -62,7 +73,9 @@ var list_default_field=[{
...
@@ -62,7 +73,9 @@ var list_default_field=[{
CONTENT
:
'新建人'
,
CONTENT
:
'新建人'
,
FIELD_DEFAULT
:
''
,
FIELD_DEFAULT
:
''
,
TYPE
:
'varchar'
,
TYPE
:
'varchar'
,
IS_NULL
:
true
FIELD_WIDTH
:
20
,
IS_NULL
:
true
,
IS_SHOW_LIST
:
false
},{
},{
FIELD_NAME
:
'create_time'
,
FIELD_NAME
:
'create_time'
,
LENGTH
:
0
,
LENGTH
:
0
,
...
@@ -72,7 +85,9 @@ var list_default_field=[{
...
@@ -72,7 +85,9 @@ var list_default_field=[{
CONTENT
:
'新建时间'
,
CONTENT
:
'新建时间'
,
FIELD_DEFAULT
:
''
,
FIELD_DEFAULT
:
''
,
TYPE
:
'date'
,
TYPE
:
'date'
,
IS_NULL
:
true
FIELD_WIDTH
:
20
,
IS_NULL
:
true
,
IS_SHOW_LIST
:
false
},{
},{
FIELD_NAME
:
'update_id'
,
FIELD_NAME
:
'update_id'
,
LENGTH
:
50
,
LENGTH
:
50
,
...
@@ -82,7 +97,9 @@ var list_default_field=[{
...
@@ -82,7 +97,9 @@ var list_default_field=[{
CONTENT
:
'更新人'
,
CONTENT
:
'更新人'
,
FIELD_DEFAULT
:
''
,
FIELD_DEFAULT
:
''
,
TYPE
:
'varchar'
,
TYPE
:
'varchar'
,
IS_NULL
:
true
FIELD_WIDTH
:
20
,
IS_NULL
:
true
,
IS_SHOW_LIST
:
false
},{
},{
FIELD_NAME
:
'update_time'
,
FIELD_NAME
:
'update_time'
,
LENGTH
:
0
,
LENGTH
:
0
,
...
@@ -92,7 +109,9 @@ var list_default_field=[{
...
@@ -92,7 +109,9 @@ var list_default_field=[{
CONTENT
:
'更新时间'
,
CONTENT
:
'更新时间'
,
FIELD_DEFAULT
:
''
,
FIELD_DEFAULT
:
''
,
TYPE
:
'date'
,
TYPE
:
'date'
,
IS_NULL
:
true
FIELD_WIDTH
:
20
,
IS_NULL
:
true
,
IS_SHOW_LIST
:
false
}];
}];
var
tr
=
[
'<tr>'
,
var
tr
=
[
'<tr>'
,
...
@@ -104,9 +123,11 @@ var tr=['<tr>',
...
@@ -104,9 +123,11 @@ var tr=['<tr>',
' <td>@{point}</td>'
,
' <td>@{point}</td>'
,
' <td>@{field_default}</td>'
,
' <td>@{field_default}</td>'
,
' <td>@{type}</td>'
,
' <td>@{type}</td>'
,
' <td>@{field_width}</td>'
,
' <td>@{is_key}</td>'
,
' <td>@{is_key}</td>'
,
' <td>@{is_null}</td>'
,
' <td>@{is_null}</td>'
,
' <td>@{order_num}</td>'
,
' <td>@{order_num}</td>'
,
' <td>@{is_show_list}</td>'
,
'</tr>'
].
join
(
""
);
'</tr>'
].
join
(
""
);
/****/
/****/
...
@@ -122,11 +143,17 @@ var tr=['<tr>',
...
@@ -122,11 +143,17 @@ var tr=['<tr>',
* 备注:需更改
* 备注:需更改
**/
**/
//定义grid列表
//定义grid列表
var
ls_title
=
"表单管理
<font color='#993300'>(1、绿色表示未同步数据库 2、蓝色表示已同步数据库。)</font>
"
;
var
ls_title
=
"表单管理 "
;
var
is_column
=
[
[
var
is_column
=
[
[
{
field
:
'TABLE_NAME'
,
title
:
'表名'
,
width
:
100
,
align
:
'center'
},
{
field
:
'TABLE_NAME'
,
title
:
'表名'
,
width
:
100
,
align
:
'center'
},
{
field
:
'CONTENT'
,
title
:
'描述'
,
width
:
80
,
align
:
'center'
},
{
field
:
'CONTENT'
,
title
:
'描述'
,
width
:
80
,
align
:
'center'
},
{
field
:
'IS_DBSYNCH'
,
title
:
'是否同步到数据库'
,
width
:
100
,
align
:
'center'
},
{
field
:
'IS_DBSYNCH'
,
title
:
'是否同步到数据库'
,
width
:
100
,
align
:
'center'
,
formatter
:
function
(
value
,
row
,
index
){
if
(
value
==
'0'
){
return
"未同步"
;
}
else
{
return
"同步"
;
}
}},
{
field
:
'CREATE_ID'
,
title
:
'创建人员'
,
width
:
100
,
align
:
'center'
},
{
field
:
'CREATE_ID'
,
title
:
'创建人员'
,
width
:
100
,
align
:
'center'
},
{
field
:
'CREATE_TIME'
,
title
:
'创建时间'
,
width
:
100
,
align
:
'center'
},
{
field
:
'CREATE_TIME'
,
title
:
'创建时间'
,
width
:
100
,
align
:
'center'
},
{
field
:
'UPDATE_TIME'
,
title
:
'更新时间'
,
width
:
100
,
align
:
'center'
},
{
field
:
'UPDATE_TIME'
,
title
:
'更新时间'
,
width
:
100
,
align
:
'center'
},
...
@@ -138,13 +165,9 @@ function dataOnLoadSuccess(){
...
@@ -138,13 +165,9 @@ function dataOnLoadSuccess(){
}
}
//设置颜色和每行高度
//设置颜色和每行高度
function
rowstyler
(
index
,
row
){
function
rowstyler
(
index
,
row
){
if
(
row
.
STATUS
==
'1'
){
return
'color:green;height:30px;'
;
}
else
{
return
'color:blue;height:30px;'
;
}
}
}
//展示列表
//展示列表
datagrid
(
"list"
,
ls_title
,
gaowj
.
WEB_APP_NAME
+
"/formtableData_list"
,
queryData
,
is_column
,
60
,
80
);
datagrid
(
"list"
,
ls_title
,
gaowj
.
WEB_APP_NAME
+
"/formtableData_list"
,
queryData
,
is_column
,
60
,
80
);
...
@@ -219,12 +242,20 @@ function initTableInsert(){
...
@@ -219,12 +242,20 @@ function initTableInsert(){
point
:
'小数点'
,
point
:
'小数点'
,
field_default
:
'默认值'
,
field_default
:
'默认值'
,
type
:
'数据类型'
,
type
:
'数据类型'
,
field_width
:
'字段宽度'
,
is_key
:
'主键'
,
is_key
:
'主键'
,
is_null
:
'允许空值'
,
is_null
:
'允许空值'
,
order_num
:
''
,
order_num
:
''
,
is_show_list
:
'列表显示'
,
})).
appendTo
(
fieldTable
);
})).
appendTo
(
fieldTable
);
$
(
'#IS_DBSYNCH'
).
html
(
'未同步'
);
$
(
'#IS_DBSYNCH'
).
combobox
({
data
:
is_dbsynch_data
,
valueField
:
'CODE_ID'
,
textField
:
'CODE_NAME'
,
editable
:
false
,
panelHeight
:
'auto'
});
for
(
var
i
=
0
;
i
<
list_default_field
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
list_default_field
.
length
;
i
++
){
var
tr2
=
tr
;
var
tr2
=
tr
;
...
@@ -238,9 +269,11 @@ function initTableInsert(){
...
@@ -238,9 +269,11 @@ function initTableInsert(){
point
:
'<input type="text" name="LIST['
+
i
+
'].POINT" value="'
+
field
.
POINT
+
'" />'
,
point
:
'<input type="text" name="LIST['
+
i
+
'].POINT" value="'
+
field
.
POINT
+
'" />'
,
field_default
:
'<input type="text" name="LIST['
+
i
+
'].FIELD_DEFAULT" value="'
+
field
.
FIELD_DEFAULT
+
'" />'
,
field_default
:
'<input type="text" name="LIST['
+
i
+
'].FIELD_DEFAULT" value="'
+
field
.
FIELD_DEFAULT
+
'" />'
,
type
:
'<input type="combobox" name="LIST['
+
i
+
'].TYPE" value="'
+
field
.
TYPE
+
'" />'
,
type
:
'<input type="combobox" name="LIST['
+
i
+
'].TYPE" value="'
+
field
.
TYPE
+
'" />'
,
field_width
:
'<input type="text" name="LIST['
+
i
+
'].FIELD_WIDTH" value="'
+
field
.
FIELD_WIDTH
+
'" />'
,
is_key
:
'<input type="checkbox" value="'
+
field
.
IS_KEY
+
'" name="LIST['
+
i
+
'].IS_KEY" '
+
(
field
.
IS_KEY
==
true
?
'checked'
:
''
)
+
' />'
,
is_key
:
'<input type="checkbox" value="'
+
field
.
IS_KEY
+
'" name="LIST['
+
i
+
'].IS_KEY" '
+
(
field
.
IS_KEY
==
true
?
'checked'
:
''
)
+
' />'
,
is_null
:
'<input type="checkbox" value="'
+
field
.
IS_NULL
+
'" name="LIST['
+
i
+
'].IS_NULL" '
+
(
field
.
IS_NULL
==
false
?
''
:
'checked'
)
+
' />'
,
is_null
:
'<input type="checkbox" value="'
+
field
.
IS_NULL
+
'" name="LIST['
+
i
+
'].IS_NULL" '
+
(
field
.
IS_NULL
==
false
?
''
:
'checked'
)
+
' />'
,
order_num
:
'<input class="field_order_number" type="hidden" name="LIST['
+
i
+
'].ORDER_NUM" />'
order_num
:
'<input class="field_order_number" type="hidden" name="LIST['
+
i
+
'].ORDER_NUM" />'
,
is_show_list
:
'<input type="checkbox" value="'
+
field
.
IS_SHOW_LIST
+
'" name="LIST['
+
i
+
'].IS_SHOW_LIST" '
+
(
field
.
IS_SHOW_LIST
==
false
?
''
:
'checked'
)
+
' />'
});
});
$
(
tr2
).
appendTo
(
fieldTable
);
$
(
tr2
).
appendTo
(
fieldTable
);
$
(
'input[name="LIST['
+
i
+
'].TYPE"]'
).
combobox
({
$
(
'input[name="LIST['
+
i
+
'].TYPE"]'
).
combobox
({
...
@@ -297,9 +330,11 @@ function initTableUpdate(is_row){
...
@@ -297,9 +330,11 @@ function initTableUpdate(is_row){
point
:
'小数点'
,
point
:
'小数点'
,
field_default
:
'默认值'
,
field_default
:
'默认值'
,
type
:
'数据类型'
,
type
:
'数据类型'
,
field_width
:
'字段宽度'
,
is_key
:
'主键'
,
is_key
:
'主键'
,
is_null
:
'允许空值'
,
is_null
:
'允许空值'
,
order_num
:
''
order_num
:
''
,
is_show_list
:
'列表显示'
,
})).
appendTo
(
fieldTable
);
})).
appendTo
(
fieldTable
);
if
(
is_row
.
IS_DBSYNCH
==
0
){
if
(
is_row
.
IS_DBSYNCH
==
0
){
...
@@ -319,9 +354,11 @@ function initTableUpdate(is_row){
...
@@ -319,9 +354,11 @@ function initTableUpdate(is_row){
point
:
'<input type="text" name="LIST['
+
i
+
'].POINT" value="'
+
field
.
POINT
+
'" />'
,
point
:
'<input type="text" name="LIST['
+
i
+
'].POINT" value="'
+
field
.
POINT
+
'" />'
,
field_default
:
'<input type="text" name="LIST['
+
i
+
'].FIELD_DEFAULT" value="'
+
field
.
FIELD_DEFAULT
+
'" />'
,
field_default
:
'<input type="text" name="LIST['
+
i
+
'].FIELD_DEFAULT" value="'
+
field
.
FIELD_DEFAULT
+
'" />'
,
type
:
'<input type="combobox" name="LIST['
+
i
+
'].TYPE" value="'
+
field
.
TYPE
+
'" />'
,
type
:
'<input type="combobox" name="LIST['
+
i
+
'].TYPE" value="'
+
field
.
TYPE
+
'" />'
,
is_key
:
'<input type="checkbox" value="'
+
field
.
IS_KEY
+
'" name="LIST['
+
i
+
'].IS_KEY" '
+
(
field
.
IS_KEY
==
true
?
'checked'
:
''
)
+
' />'
,
field_width
:
'<input type="text" name="LIST['
+
i
+
'].FIELD_WIDTH" value="'
+
field
.
FIELD_WIDTH
+
'" />'
,
is_null
:
'<input type="checkbox" value="'
+
field
.
IS_NULL
+
'" name="LIST['
+
i
+
'].IS_NULL" '
+
(
field
.
IS_NULL
==
false
?
''
:
'checked'
)
+
' />'
,
is_key
:
'<input type="checkbox" value="'
+
field
.
IS_KEY
+
'" name="LIST['
+
i
+
'].IS_KEY" '
+
(
field
.
IS_KEY
==
1
?
'checked'
:
''
)
+
' />'
,
order_num
:
'<input class="field_order_number" type="hidden" value="'
+
field
.
ORDER_NUM
+
'" name="LIST['
+
i
+
'].ORDER_NUM" /><input type="hidden" value="'
+
field
.
UUID
+
'" name="LIST['
+
i
+
'].UUID" />'
is_null
:
'<input type="checkbox" value="'
+
field
.
IS_NULL
+
'" name="LIST['
+
i
+
'].IS_NULL" '
+
(
field
.
IS_NULL
==
0
?
''
:
'checked'
)
+
' />'
,
order_num
:
'<input class="field_order_number" type="hidden" value="'
+
field
.
ORDER_NUM
+
'" name="LIST['
+
i
+
'].ORDER_NUM" /><input type="hidden" value="'
+
field
.
UUID
+
'" name="LIST['
+
i
+
'].UUID" />'
,
is_show_list
:
'<input type="checkbox" value="'
+
field
.
IS_SHOW_LIST
+
'" name="LIST['
+
i
+
'].IS_SHOW_LIST" '
+
(
field
.
IS_SHOW_LIST
==
0
?
''
:
'checked'
)
+
' />'
});
});
$
(
tr2
).
appendTo
(
fieldTable
);
$
(
tr2
).
appendTo
(
fieldTable
);
$
(
'input[name="LIST['
+
i
+
'].TYPE"]'
).
combobox
({
$
(
'input[name="LIST['
+
i
+
'].TYPE"]'
).
combobox
({
...
@@ -452,18 +489,23 @@ function addLine(){
...
@@ -452,18 +489,23 @@ function addLine(){
var
aa
=
{
var
aa
=
{
index
:
j
,
index
:
j
,
opt
:
'<input type="checkbox" name="checkbox"/>'
,
opt
:
'<input type="checkbox" name="checkbox"/>'
,
field_name
:
'<input
type="text" name="LIST['
+
j
+
'].NAME"
/>'
,
field_name
:
'<input
class="easyui-textbox" type="text" name="LIST['
+
j
+
'].NAME" required="true"
/>'
,
content
:
'<input
type="text" name="LIST['
+
j
+
'].CONTENT"
/>'
,
content
:
'<input
class="easyui-textbox" type="text" name="LIST['
+
j
+
'].CONTENT" required="required"
/>'
,
length
:
'<input type="text" name="LIST['
+
j
+
'].LENGTH" value="0"/>'
,
length
:
'<input type="text" name="LIST['
+
j
+
'].LENGTH" value="0"/>'
,
point
:
'<input type="text" name="LIST['
+
j
+
'].POINT" value="0"/>'
,
point
:
'<input type="text" name="LIST['
+
j
+
'].POINT" value="0"
/>'
,
field_default
:
'<input type="text" name="LIST['
+
j
+
'].FIELD_DEFAULT" />'
,
field_default
:
'<input type="text" name="LIST['
+
j
+
'].FIELD_DEFAULT" />'
,
type
:
'<input type="combobox" name="LIST['
+
j
+
'].TYPE" />'
,
type
:
'<input type="combobox" name="LIST['
+
j
+
'].TYPE" value="varchar"/>'
,
field_width
:
'<input type="text" name="LIST['
+
j
+
'].FIELD_WIDTH" value="20"/>'
,
is_key
:
'<input type="checkbox" name="LIST['
+
j
+
'].IS_KEY" />'
,
is_key
:
'<input type="checkbox" name="LIST['
+
j
+
'].IS_KEY" />'
,
is_null
:
'<input type="checkbox" name="LIST['
+
j
+
'].IS_NULL" checked/>'
,
is_null
:
'<input type="checkbox" name="LIST['
+
j
+
'].IS_NULL" checked/>'
,
order_num
:
'<input class="field_order_number" type="hidden" name="LIST['
+
j
+
'].ORDER_NUM" />'
order_num
:
'<input class="field_order_number" type="hidden" name="LIST['
+
j
+
'].ORDER_NUM" />'
,
is_show_list
:
'<input type="checkbox" name="LIST['
+
j
+
'].IS_SHOW_LIST" />'
};
};
var
fieldTable
=
$
(
"#fieldTable"
);
var
fieldTable
=
$
(
"#fieldTable"
);
$
(
replaceByJson
(
tr
,
aa
)).
appendTo
(
fieldTable
);
$
(
replaceByJson
(
tr
,
aa
)).
appendTo
(
fieldTable
);
$
.
parser
.
parse
();
$
(
'input[name="LIST['
+
j
+
'].TYPE"]'
).
combobox
({
$
(
'input[name="LIST['
+
j
+
'].TYPE"]'
).
combobox
({
data
:
type_data
,
data
:
type_data
,
valueField
:
'CODE_ID'
,
valueField
:
'CODE_ID'
,
...
...
src_process/com/gaowj/business/FormmodelsBusiness.java
View file @
577c0ea4
...
@@ -16,4 +16,6 @@ public interface FormmodelsBusiness {
...
@@ -16,4 +16,6 @@ public interface FormmodelsBusiness {
Page
<
Map
<
String
,
Object
>>
list_form_model
(
int
pageNo
,
int
pageSize
,
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
Page
<
Map
<
String
,
Object
>>
list_form_model
(
int
pageNo
,
int
pageSize
,
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
void
delete_form_model
(
List
<
String
>
list
)
throws
BusinessException
;
void
delete_form_model
(
List
<
String
>
list
)
throws
BusinessException
;
void
update_form_model
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
}
}
src_process/com/gaowj/business/formmodels/FormmodelsBusinessImpl.java
View file @
577c0ea4
...
@@ -2,10 +2,12 @@ package com.gaowj.business.formmodels;
...
@@ -2,10 +2,12 @@ package com.gaowj.business.formmodels;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.Set
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.ibatis.session.RowBounds
;
import
org.apache.ibatis.session.RowBounds
;
import
com.gaowj.business.FormmodelsBusiness
;
import
com.gaowj.business.FormmodelsBusiness
;
...
@@ -93,4 +95,37 @@ public class FormmodelsBusinessImpl implements FormmodelsBusiness {
...
@@ -93,4 +95,37 @@ public class FormmodelsBusinessImpl implements FormmodelsBusiness {
formmodelsDAO
.
delete_form_models
(
list
);
formmodelsDAO
.
delete_form_models
(
list
);
}
}
@Override
public
void
update_form_model
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
{
// TODO Auto-generated method stub
if
(
entity
.
keySet
()
!=
null
)
{
entity
.
put
(
"UPDATE_TIME"
,
new
Date
());
entity
.
put
(
"UPDATE_ID"
,
SessionUtil
.
getCode
());
convertEntity
(
entity
);
formmodelsDAO
.
update_form_models
(
entity
);
}
}
private
void
convertEntity
(
Map
<
String
,
Object
>
entity
,
String
...
ignoreKeys
)
{
List
<
Map
<
String
,
Object
>>
updateList
=
new
ArrayList
<
Map
<
String
,
Object
>>();
Set
<
String
>
key
=
entity
.
keySet
();
// 将map集合中的key和value 取出来分别放到list集合里
for
(
String
str
:
key
)
{
Map
<
String
,
Object
>
updateMap
=
new
HashMap
<
String
,
Object
>();
for
(
String
k
:
ignoreKeys
)
{
if
(
StringUtils
.
equalsIgnoreCase
(
"UUID"
,
str
))
continue
;
}
updateMap
.
put
(
"key"
,
str
);
updateMap
.
put
(
"value"
,
entity
.
get
(
str
));
updateList
.
add
(
updateMap
);
}
entity
.
put
(
"info"
,
updateList
);
}
}
}
src_process/com/gaowj/formmodel/action/actAction.java
View file @
577c0ea4
...
@@ -15,7 +15,6 @@ import com.gaowj.business.exception.BusinessException;
...
@@ -15,7 +15,6 @@ import com.gaowj.business.exception.BusinessException;
import
com.gaowj.business.util.QueryParamUtil
;
import
com.gaowj.business.util.QueryParamUtil
;
import
com.gaowj.business.util.RequestUtils
;
import
com.gaowj.business.util.RequestUtils
;
import
com.gaowj.business.util.Status
;
import
com.gaowj.business.util.Status
;
import
com.gaowj.util.Property
;
public
class
actAction
extends
BasicAction
{
public
class
actAction
extends
BasicAction
{
...
@@ -63,4 +62,18 @@ public class actAction extends BasicAction{
...
@@ -63,4 +62,18 @@ public class actAction extends BasicAction{
return
"json"
;
return
"json"
;
}
}
public
String
updateFormModel
()
throws
BusinessException
{
FormmodelsBusiness
business
=
BusinessManager
.
getBusiness
(
FormmodelsBusiness
.
class
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
try
{
entity
.
remove
(
"OPETYPE"
);
business
.
update_form_model
(
entity
);
jsonObject
.
putAll
(
Status
.
getStatusSuccessMessage
(
"更新成功"
));
}
catch
(
Exception
e
)
{
jsonObject
.
putAll
(
Status
.
getStatusErrorMessage
(
"更新失败"
));
e
.
printStackTrace
();
}
return
"json"
;
}
}
}
src_process/com/gaowj/formmodel/action/dataAction.java
View file @
577c0ea4
...
@@ -47,8 +47,10 @@ public class dataAction extends BasicAction{
...
@@ -47,8 +47,10 @@ public class dataAction extends BasicAction{
public
String
list
()
throws
BusinessException
{
public
String
list
()
throws
BusinessException
{
FormmodelsBusiness
business
=
BusinessManager
.
getBusiness
(
FormmodelsBusiness
.
class
);
FormmodelsBusiness
business
=
BusinessManager
.
getBusiness
(
FormmodelsBusiness
.
class
);
Map
<
String
,
Object
>
query
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
Map
<
String
,
Object
>
query
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
String
tableId
=
RequestUtils
.
getString
(
request
,
"tableId"
);
try
{
try
{
query
=
QueryParamUtil
.
StringToDate
(
query
);
query
=
QueryParamUtil
.
StringToDate
(
query
);
query
.
put
(
"TABLE_ID"
,
tableId
);
Page
<
Map
<
String
,
Object
>>
pageRows
=
business
.
list_form_model
(
page
,
pageSize
,
query
);
Page
<
Map
<
String
,
Object
>>
pageRows
=
business
.
list_form_model
(
page
,
pageSize
,
query
);
setPageCount
((
pageRows
.
getCount
()
-
1
)
/
pageSize
+
1
);
setPageCount
((
pageRows
.
getCount
()
-
1
)
/
pageSize
+
1
);
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
...
...
src_process/com/gaowj/formtable/action/actAction.java
View file @
577c0ea4
...
@@ -74,6 +74,7 @@ public class actAction extends BasicAction {
...
@@ -74,6 +74,7 @@ public class actAction extends BasicAction {
if
(
property
.
getCONTENT
()!=
null
&&
""
!=
property
.
getCONTENT
()){
if
(
property
.
getCONTENT
()!=
null
&&
""
!=
property
.
getCONTENT
()){
param
.
put
(
"CONTENT"
,
property
.
getCONTENT
());
param
.
put
(
"CONTENT"
,
property
.
getCONTENT
());
}
}
param
.
put
(
"FIELD_WIDTH"
,
property
.
getFIELD_WIDTH
());
param
.
put
(
"FIELD_NAME"
,
property
.
getNAME
());
param
.
put
(
"FIELD_NAME"
,
property
.
getNAME
());
param
.
put
(
"LENGTH"
,
property
.
getLENGTH
()
);
param
.
put
(
"LENGTH"
,
property
.
getLENGTH
()
);
param
.
put
(
"POINT"
,
property
.
getPOINT
());
param
.
put
(
"POINT"
,
property
.
getPOINT
());
...
@@ -90,6 +91,11 @@ public class actAction extends BasicAction {
...
@@ -90,6 +91,11 @@ public class actAction extends BasicAction {
}
else
{
}
else
{
param
.
put
(
"IS_KEY"
,
1
);
param
.
put
(
"IS_KEY"
,
1
);
}
}
if
(
property
.
getIS_SHOW_LIST
().
equals
(
""
)){
param
.
put
(
"IS_SHOW_LIST"
,
0
);
}
else
{
param
.
put
(
"IS_SHOW_LIST"
,
1
);
}
if
(
property
.
getFIELD_DEFAULT
()!=
null
&&
""
!=
property
.
getFIELD_DEFAULT
()){
if
(
property
.
getFIELD_DEFAULT
()!=
null
&&
""
!=
property
.
getFIELD_DEFAULT
()){
param
.
put
(
"FIELD_DEFAULT"
,
property
.
getFIELD_DEFAULT
());
param
.
put
(
"FIELD_DEFAULT"
,
property
.
getFIELD_DEFAULT
());
}
}
...
@@ -147,6 +153,11 @@ public class actAction extends BasicAction {
...
@@ -147,6 +153,11 @@ public class actAction extends BasicAction {
}
else
{
}
else
{
param
.
put
(
"IS_KEY"
,
1
);
param
.
put
(
"IS_KEY"
,
1
);
}
}
if
(
property
.
getIS_SHOW_LIST
().
equals
(
""
)){
param
.
put
(
"IS_SHOW_LIST"
,
0
);
}
else
{
param
.
put
(
"IS_SHOW_LIST"
,
1
);
}
if
(
property
.
getFIELD_DEFAULT
()!=
null
&&
""
!=
property
.
getFIELD_DEFAULT
()){
if
(
property
.
getFIELD_DEFAULT
()!=
null
&&
""
!=
property
.
getFIELD_DEFAULT
()){
param
.
put
(
"FIELD_DEFAULT"
,
property
.
getFIELD_DEFAULT
());
param
.
put
(
"FIELD_DEFAULT"
,
property
.
getFIELD_DEFAULT
());
}
}
...
...
src_utils/com/gaowj/util/Property.java
View file @
577c0ea4
...
@@ -12,7 +12,8 @@ public class Property {
...
@@ -12,7 +12,8 @@ public class Property {
private
String
TYPE
;
private
String
TYPE
;
private
Integer
ORDER_NUM
;
private
Integer
ORDER_NUM
;
private
String
UUID
;
private
String
UUID
;
private
String
IS_SHOW_LIST
;
private
String
FIELD_WIDTH
;
public
String
getIS_KEY
()
{
public
String
getIS_KEY
()
{
return
IS_KEY
;
return
IS_KEY
;
}
}
...
@@ -92,6 +93,22 @@ public class Property {
...
@@ -92,6 +93,22 @@ public class Property {
public
void
setUUID
(
String
uUID
)
{
public
void
setUUID
(
String
uUID
)
{
UUID
=
uUID
;
UUID
=
uUID
;
}
}
public
String
getIS_SHOW_LIST
()
{
return
IS_SHOW_LIST
;
}
public
void
setIS_SHOW_LIST
(
String
iS_SHOW_LIST
)
{
IS_SHOW_LIST
=
iS_SHOW_LIST
;
}
public
String
getFIELD_WIDTH
()
{
return
FIELD_WIDTH
;
}
public
void
setFIELD_WIDTH
(
String
fIELD_WIDTH
)
{
FIELD_WIDTH
=
fIELD_WIDTH
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment