Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sunac_report
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
java-sunac-report
sunac_report
Commits
4b366b17
Commit
4b366b17
authored
Aug 29, 2019
by
sunxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回显问题部分解决,单选解决
parent
3d7be45c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
165 additions
and
90 deletions
+165
-90
UserDao.xml
src/main/resources/mappings/modules/sys/UserDao.xml
+1
-2
ctBbtcBusCategoryForm.jsp
src/main/webapp/WEB-INF/views/modules/report/ctBbtcBusCategoryForm.jsp
+10
-1
ctBbtcBusTypeForm.jsp
src/main/webapp/WEB-INF/views/modules/report/ctBbtcBusTypeForm.jsp
+47
-59
reportTrack.jsp
src/main/webapp/WEB-INF/views/modules/report/reportTrack.jsp
+96
-23
userForm.jsp
src/main/webapp/WEB-INF/views/modules/sys/userForm.jsp
+11
-5
No files found.
src/main/resources/mappings/modules/sys/UserDao.xml
View file @
4b366b17
...
...
@@ -65,7 +65,6 @@
a.login_name,
a.password,
a.no,
a.area,
a.name,
a.email,
a.phone,
...
...
@@ -136,7 +135,7 @@
<select
id=
"get"
resultType=
"User"
>
SELECT
<include
refid=
"userColumns"
/>
,cr.name AS area
Name
,cr.name AS area
FROM ct_bbtc_sys_user a
<include
refid=
"userJoins"
/>
LEFT JOIN ct_bbtc_region CR ON a.area = CR.id
...
...
src/main/webapp/WEB-INF/views/modules/report/ctBbtcBusCategoryForm.jsp
View file @
4b366b17
...
...
@@ -50,12 +50,16 @@
var
label
=
data2
[
i
].
name
;
if
(
supplementArea
==
label
){
slsb
.
append
(
"<option value="
+
value
+
" selected='true' >"
+
label
+
"</option>"
);
try
{
$
(
'#s2id_supplementArea'
).
find
(
'.select2-chosen'
).
html
(
label
);
}
catch
(
e
)
{
console
.
log
(
e
);
}
}
else
{
slsb
.
append
(
"<option value="
+
value
+
" >"
+
label
+
"</option>"
);
}
}
/*当循环结束,选中区域后,执行查询业务类型*/
alert
(
slsb
.
val
());
getType
();
}
},
error
:
function
(
data
){
...
...
@@ -92,6 +96,11 @@
var
label
=
data2
[
i
].
typeName
;
if
(
type
==
label
){
slsb
.
append
(
"<option value="
+
value
+
" selected='true' >"
+
label
+
"</option>"
);
try
{
$
(
'#s2id_supplementType'
).
find
(
'.select2-chosen'
).
html
(
label
);
}
catch
(
e
)
{
console
.
log
(
e
);
}
}
else
{
slsb
.
append
(
"<option value="
+
value
+
" >"
+
label
+
"</option>"
);
}
...
...
src/main/webapp/WEB-INF/views/modules/report/ctBbtcBusTypeForm.jsp
View file @
4b366b17
...
...
@@ -24,21 +24,15 @@
});
});
function
addRow
(
list
1
,
list2
,
list3
,
idx
,
tpl
,
row
)
{
$
(
list
1
).
append
(
Mustache
.
render
(
tpl
,
{
function
addRow
(
list
,
idx
,
tpl
,
row
)
{
$
(
list
).
append
(
Mustache
.
render
(
tpl
,
{
idx
:
idx
,
delBtn
:
true
,
row
:
row
}));
$
(
list2
+
idx
).
find
(
"select"
).
each
(
function
()
{
$
(
list
+
idx
).
find
(
"select"
).
each
(
function
()
{
$
(
this
).
val
(
$
(
this
).
attr
(
"data-value"
));
});
$
(
list3
+
idx
).
find
(
"input[type='checkbox'], input[type='radio']"
).
each
(
function
()
{
var
ss
=
$
(
this
).
attr
(
"data-value"
).
split
(
','
);
for
(
var
i
=
0
;
i
<
ss
.
length
;
i
++
)
{
if
(
$
(
this
).
val
()
==
ss
[
i
])
{
$
(
this
).
attr
(
"checked"
,
"checked"
);
}
}
});
genSeqNo
();
}
...
...
@@ -61,14 +55,14 @@
}
/*跟据集团 获取对应的业务类型 和业务类别 */
function
getRegion
(
s
upplementGroup
,
supplementArea
){
var
selectNode
=
$
(
s
upplementArea
);
function
getRegion
(
s
copeList
){
var
selectNode
=
$
(
s
copeList
+
"_area"
);
selectNode
.
empty
();
//每次需要将上一次的数据进行清空
selectNode
.
append
(
"<option value=''>请选择</option>"
);
var
ts_describe
=
$
(
s
upplementGroup
).
val
();
var
ts_describe
=
$
(
s
copeList
+
"_group"
).
val
();
if
(
ts_describe
!=
null
&&
ts_describe
!=
''
){
$
.
ajax
({
type
:
"POST"
,
...
...
@@ -77,7 +71,7 @@
success
:
function
(
returnedData
)
{
var
data1
=
returnedData
.
ctBbtcRegionList
;
if
(
data1
!=
''
)
{
var
slsb
=
$
(
s
upplementArea
);
var
slsb
=
$
(
s
copeList
+
"_area"
);
for
(
var
i
=
0
;
i
<
data1
.
length
;
i
++
){
slsb
.
append
(
new
Option
(
data1
[
i
].
name
,
data1
[
i
].
id
));
}
...
...
@@ -135,78 +129,72 @@
<tr>
<td
colspan=
"7"
>
<a
href=
"javascript:"
onclick=
"addRow('#scopeList',
'#supplementGroup','#supplementArea',
scopeRowIdx, scopeTpl);scopeRowIdx = scopeRowIdx + 1;"
onclick=
"addRow('#scopeList', scopeRowIdx, scopeTpl);scopeRowIdx = scopeRowIdx + 1;"
class=
"btn"
>
新增使用范围
</a></td>
</tr>
</tfoot>
</table>
<script
type=
"text/template"
id=
"scopeTplReadOnly"
>
//
<!--
<
tr
id
=
"scopeList{{idx}}"
>
<
%
--
<
script
type=
"text/template"
id=
"scopeTplReadOnly"
>
//
<!--
<tr id="scopeList{{idx}}">
<td class="hide">
<input id="scopeList{{idx}}_id" type="hidden" />
<input id="scopeList{{idx}}_delFlag" type="hidden" />
<
/td
>
<
td
><
/td
>
<
td
>
<
form
:
select
id
=
"supplementGroup{{idx}}"
path
=
"group"
class
=
"input-small required"
onchange
=
"getRegion('#supplementGroup{{idx}}','#supplementArea{{idx}}');"
cssStyle
=
"width: 280px"
>
<
form
:
option
value
=
""
>
请选择
<
/form:option
>
<
form
:
options
items
=
"${fns:getDictList('supplement_group')}"
itemLabel
=
"label"
itemValue
=
"id"
htmlEscape
=
"false"
/>
<
/form:select
>
<
/td
>
<
td
>
<
form
:
select
id
=
"supplementArea{{idx}}"
path
=
"area"
class
=
"input-small required"
cssStyle
=
"width: 280px"
>
</td>
<td></td>
<td>
<form:select id="scopeList{{idx}}_group" path="group" class="input-small required" onchange="getRegion('#scopeList{{idx}}');" selected="{{row.group}}" cssStyle="width: 280px">
<form:option value="">请选择</form:option>
<
/form:select
>
<
/td
>
<
/tr>/
/-->
</script>
<form:options items="${fns:getDictList('supplement_group')}" itemLabel="label" itemValue="id"
htmlEscape="false"/>
</form:select>
</td>
<td>
<form:select id="scopeList{{idx}}_area" path="area" class="input-small required" selected="{{row.area}}" cssStyle="width: 280px">
<form:option value="">请选择</form:option>
</form:select>
</td>
</tr>//-->
</script>
--%>
<script
type=
"text/template"
id=
"scopeTpl"
>
//
<!--
<
tr
id
=
"scopeList{{idx}}"
>
<
tr
id
=
"scopeList{{idx}}"
>
<
td
class
=
"hide"
>
<
input
id
=
"scopeList{{idx}}_id"
type
=
"hidden"
/>
<
input
id
=
"scopeList{{idx}}_delFlag"
type
=
"hidden"
/>
<
/td
>
<
/td
>
<
td
><
/td
>
<
td
>
<
form
:
select
id
=
"supplementGroup{{idx}}"
path
=
"group"
class
=
"input-small required"
onchange
=
"getRegion('#supplementGroup{{idx}}','#supplementArea{{idx}}');"
cssStyle
=
"width: 280px"
>
<
form
:
option
value
=
""
>
请选择
<
/form:option
>
<
form
:
options
items
=
"${fns:getDictList('supplement_group')}"
itemLabel
=
"label"
itemValue
=
"id"
htmlEscape
=
"false"
/>
<
/form:select
>
<
/td
>
<
td
>
<
form
:
select
id
=
"supplementArea{{idx}}"
path
=
"area"
class
=
"input-small required"
cssStyle
=
"width: 280px"
>
<
td
>
<
form
:
select
id
=
"scopeList{{idx}}_group"
path
=
"group"
class
=
"input-small required"
onchange
=
"getRegion('#scopeList{{idx}}')"
cssStyle
=
"width: 280px"
>
<
form
:
option
value
=
""
>
请选择
<
/form:option
>
<
/form:select
>
<
/td
>
<
td
class
=
"text-center"
width
=
"20"
>
{{
#
delBtn
}}
<
span
class
=
"close"
onclick
=
"delRow(this, '#scopeList{{idx}}')"
title
=
"删除"
>&
times
;
<
/span>{{/
delBtn
}}
<
/td
>
<
/tr>/
/-->
<
form
:
options
items
=
"${fns:getDictList('supplement_group')}"
itemLabel
=
"label"
itemValue
=
"id"
htmlEscape
=
"false"
/>
<
/form:select
>
<
/td
>
<
td
>
<
form
:
select
id
=
"scopeList{{idx}}_area"
path
=
"area"
class
=
"input-small required"
cssStyle
=
"width: 280px"
>
<
form
:
option
value
=
""
>
请选择
<
/form:option
>
<
/form:select
>
<
/td
>
<
td
class
=
"text-center"
width
=
"20"
>
{{
#
delBtn
}}
<
span
class
=
"close"
onclick
=
"delRow(this, '#scopeList{{idx}}')"
title
=
"删除"
>&
times
;
<
/span>{{/
delBtn
}}
<
/td
>
<
/tr>/
/-->
</script>
<script
type=
"text/javascript"
>
var
scopeRowIdx
=
0
,
scopeTpl
=
$
(
"#scopeList"
).
html
().
replace
(
/
(\/\/
\<!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
),
scopeTplReadOnly
=
$
(
"#scopeTplReadOnly"
).
html
().
replace
(
/
(\/\/
\<!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
scopeTpl
=
$
(
"#scopeTpl"
).
html
().
replace
(
/
(\/\/
\<!
\-\-)
|
(\/\/\-\-
>
)
/g
,
""
);
/*数据回显=====================*/
$
(
document
).
ready
(
function
()
{
var
data
=
$
{
fns
:
toJson
(
cloudAreaList
)};
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
data
[
i
].
isCanDelete
!=
null
&&
data
[
i
].
isCanDelete
==
'1'
)
{
alert
(
data
[
i
].
group
);
addRow
(
'#scopeList'
,
'#supplementGroup'
,
'#supplementArea'
,
scopeRowIdx
,
scopeTpl
,
data
[
i
]);
}
else
{
addRow
(
'#scopeList'
,
'#supplementGroup'
,
'#supplementArea'
,
scopeRowIdx
,
scopeTplReadOnly
,
data
[
i
]);
}
addRow
(
'#scopeList'
,
scopeRowIdx
,
scopeTpl
,
data
[
i
]);
scopeRowIdx
=
scopeRowIdx
+
1
;
}
});
</script>
</div>
</div>
<div
class=
"form-actions"
>
<shiro:hasPermission
name=
"report:ctBbtcBusType:edit"
><input
id=
"btnSubmit"
class=
"btn btn-primary"
type=
"submit"
value=
"保 存"
/>
</shiro:hasPermission>
<input
id=
"btnCancel"
class=
"btn"
type=
"button"
value=
"返 回"
onclick=
"history.go(-1)"
/>
...
...
src/main/webapp/WEB-INF/views/modules/report/reportTrack.jsp
View file @
4b366b17
...
...
@@ -94,8 +94,10 @@
/*页面一加载,跟据举报集团 查询对应区域列表 业务列表 跟据业务列表查询类别列表 */
getRegion
();
getType
();
getDepartment
();
getTranArea
();
getBusCategory
();
/* var checkedNumber = "${report.supplementType}";
if (checkedNumber != null && checkedNumber.length != 0) {
...
...
@@ -494,15 +496,27 @@
success
:
function
(
returnedData
)
{
console
.
log
(
returnedData
);
var
data1
=
returnedData
.
ctBbtcRegionList
;
var
supplementArea
=
"${report.supplementArea}"
;
if
(
data1
!=
''
)
{
var
slsb
=
document
.
getElementById
(
"supplementArea"
);
var
slsb
=
$
(
"#supplementArea"
);
for
(
var
i
=
0
;
i
<
data1
.
length
;
i
++
){
/* if(i==0){
slsb.options[i] = new Option("请选择","");
}*/
slsb
.
append
(
new
Option
(
data1
[
i
].
name
,
data1
[
i
].
id
));
/* slsb.append(new Option(data1[i].name,data1[i].id) );*/
var
value
=
data1
[
i
].
id
;
var
label
=
data1
[
i
].
name
;
if
(
supplementArea
==
label
){
slsb
.
append
(
"<option value="
+
value
+
" selected='true' >"
+
label
+
"</option>"
);
try
{
$
(
'#s2id_supplementArea'
).
find
(
'.select2-chosen'
).
html
(
label
);
}
catch
(
e
)
{
console
.
log
(
e
);
}
}
else
{
slsb
.
append
(
"<option value="
+
value
+
" >"
+
label
+
"</option>"
);
}
}
/*当循环结束,选中区域后,执行查询业务类型*/
getType
();
}
},
error
:
function
(
data
){
...
...
@@ -530,12 +544,27 @@
dataType
:
"json"
,
success
:
function
(
returnedData
)
{
var
data2
=
returnedData
.
ctBbtcTypeList
;
var
supplementType
=
"${report.supplementType}"
;
if
(
data2
!=
''
)
{
var
slsb
=
document
.
getElementById
(
"supplementType"
);
var
slsb
=
$
(
"#supplementType"
);
for
(
var
i
=
0
;
i
<
data2
.
length
;
i
++
){
slsb
.
append
(
new
Option
(
data2
[
i
].
typeName
,
data2
[
i
].
parentId
));
/* slsb.append(new Option(data1[i].name,data1[i].id) );*/
var
value
=
data2
[
i
].
parentId
;
var
label
=
data2
[
i
].
typeName
;
if
(
supplementType
==
label
){
slsb
.
append
(
"<option value="
+
value
+
" selected='true' >"
+
label
+
"</option>"
);
try
{
$
(
'#s2id_supplementType'
).
find
(
'.select2-chosen'
).
html
(
label
);
}
catch
(
e
)
{
console
.
log
(
e
);
}
}
else
{
slsb
.
append
(
"<option value="
+
value
+
" >"
+
label
+
"</option>"
);
}
}
}
},
error
:
function
(
data
){
alert
(
"系统错误"
);
...
...
@@ -562,12 +591,27 @@
dataType
:
"json"
,
success
:
function
(
returnedData
)
{
var
data2
=
returnedData
.
ctBbtcTypeList
;
var
supplementType
=
"${report.transferDepartment}"
if
(
data2
!=
''
)
{
var
slsb
=
document
.
getElementById
(
"transferDepartment"
);
var
slsb
=
$
(
"#transferDepartment"
);
for
(
var
i
=
0
;
i
<
data2
.
length
;
i
++
){
slsb
.
append
(
new
Option
(
data2
[
i
].
typeName
,
data2
[
i
].
parentId
));
/* slsb.append(new Option(data1[i].name,data1[i].id) );*/
var
value
=
data2
[
i
].
parentId
;
var
label
=
data2
[
i
].
typeName
;
if
(
supplementType
==
label
){
slsb
.
append
(
"<option value="
+
value
+
" selected='true' >"
+
label
+
"</option>"
);
try
{
$
(
'#s2id_transferDepartment'
).
find
(
'.select2-chosen'
).
html
(
label
);
}
catch
(
e
)
{
console
.
log
(
e
);
}
}
else
{
slsb
.
append
(
"<option value="
+
value
+
" >"
+
label
+
"</option>"
);
}
}
}
},
error
:
function
(
data
){
alert
(
"系统错误"
);
...
...
@@ -594,12 +638,28 @@
success
:
function
(
returnedData
)
{
console
.
log
(
returnedData
);
var
data1
=
returnedData
.
ctBbtcRegionList
;
var
transferArea
=
"${report.transferArea}"
;
if
(
data1
!=
''
)
{
var
slsb
=
document
.
getElementById
(
"transferArea"
);
var
slsb
=
$
(
"#transferArea"
);
for
(
var
i
=
0
;
i
<
data1
.
length
;
i
++
){
slsb
.
append
(
new
Option
(
data1
[
i
].
name
,
data1
[
i
].
id
));
/* slsb.append(new Option(data1[i].name,data1[i].id) );*/
var
value
=
data1
[
i
].
id
;
var
label
=
data1
[
i
].
name
;
if
(
transferArea
==
label
){
slsb
.
append
(
"<option value="
+
value
+
" selected='true' >"
+
label
+
"</option>"
);
try
{
$
(
'#s2id_transferArea'
).
find
(
'.select2-chosen'
).
html
(
label
);
}
catch
(
e
)
{
console
.
log
(
e
);
}
}
else
{
slsb
.
append
(
"<option value="
+
value
+
" >"
+
label
+
"</option>"
);
}
}
/*当循环结束,选中区域后,执行查询业务类型*/
getDepartment
();
}
},
error
:
function
(
data
){
alert
(
"系统错误"
);
...
...
@@ -637,22 +697,35 @@
selectNode.append("<option value=''>请选择</option>");*/
// selectNode.append("
<
option
value
=
''
>
请选择
<
/option>"
)
;
var
supplementCategory
=
"${report.supplementCategory}"
;
if
(
data
!=
''
)
{
var
slsb
=
document
.
getElementById
(
"supplementCategory"
);
var
slsb
=
$
(
"#supplementCategory"
);
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
){
/* if(i==0){
slsb.options[i] = new Option("请选择","");
}*/
slsb
.
append
(
new
Option
(
data
[
i
].
name
,
data
[
i
].
id
));
/* slsb.append(new Option(data1[i].name,data1[i].id) );*/
var
value
=
data
[
i
].
id
;
var
label
=
data
[
i
].
name
;
if
(
supplementCategory
==
label
){
slsb
.
append
(
"<option value="
+
value
+
" selected='true' >"
+
label
+
"</option>"
);
try
{
$
(
'#s2id_supplementCategory'
).
find
(
'.select2-chosen'
).
html
(
label
);
}
catch
(
e
)
{
console
.
log
(
e
);
}
}
else
{
slsb
.
append
(
"<option value="
+
value
+
" >"
+
label
+
"</option>"
);
}
}
}
},
error
:
function
(
data
){
alert
(
"系统错误"
);
}
});
}
else
{
top
.
$
.
jBox
.
tip
(
'请选择业务类型'
,
'warning'
);
/*top.$.jBox.tip('请选择业务类型', 'warning');*/
}
}
...
...
src/main/webapp/WEB-INF/views/modules/sys/userForm.jsp
View file @
4b366b17
...
...
@@ -51,12 +51,18 @@
var
supplementArea
=
$
(
"#hiddenArea"
).
val
();
if
(
data1
!=
''
)
{
var
slsb
=
$
(
"#supplementArea"
);
for
(
var
i
=
0
;
i
<
data1
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
data1
.
length
;
i
++
){
/* slsb.append(new Option(data1[i].name,data1[i].id) );*/
var
value
=
data1
[
i
].
id
;
var
label
=
data1
[
i
].
name
;
if
(
supplementArea
==
label
){
slsb
.
append
(
"<option value="
+
value
+
" selected='true' >"
+
label
+
"</option>"
);
try
{
$
(
'#s2id_supplementArea'
).
find
(
'.select2-chosen'
).
html
(
label
);
}
catch
(
e
)
{
console
.
log
(
e
);
}
}
else
{
slsb
.
append
(
"<option value="
+
value
+
" >"
+
label
+
"</option>"
);
}
...
...
@@ -83,7 +89,8 @@
name=
"sys:user:edit"
>
查看
</shiro:lacksPermission></a></li>
</ul>
<br/>
<form:form
id=
"inputForm"
modelAttribute=
"user"
action=
"${ctx}/sys/user/save"
method=
"post"
class=
"form-horizontal"
>
<form:form
id=
"inputForm"
modelAttribute=
"user"
action=
"${ctx}/sys/user/save"
method=
"post"
class=
"form-horizontal"
>
<form:hidden
path=
"id"
/>
<sys:message
content=
"${message}"
/>
<
%
--
<
div
class=
"control-group"
>
...
...
@@ -137,20 +144,19 @@
<form:options
items=
"${fns:getDictList('supplement_group')}"
itemLabel=
"label"
itemValue=
"id"
htmlEscape=
"false"
/>
</form:select>
<span
class=
"help-inline"
><font
color=
"red"
>
*
</font>
</span>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
所属区域:
</label>
<div
class=
"controls"
>
<input
type=
"hidden"
value=
"${user.area
Name
}"
id=
"hiddenArea"
>
<input
type=
"hidden"
value=
"${user.area}"
id=
"hiddenArea"
>
<form:select
id=
"supplementArea"
path=
"area"
class=
"input-small "
cssStyle=
"width: 220px"
>
<form:option
value=
""
>
请选择
</form:option>
<
%
--
<
form:options
items=
"${ctBbtcRegionList}"
itemLabel=
"name"
itemValue=
"id"
htmlEscape=
"false"
/>
--%>
</form:select>
<
%
--
<
select
id=
"supplementArea"
name=
"area"
class=
"input-small"
style=
"width:220px "
>
<
%
--
<
select
id=
"supplementArea"
name=
"area"
class=
"input-small"
style=
"width:220px "
>
<option
value=
""
>
请选择
</option>
</select>
--%>
<
%
--
<
span
class=
"help-inline"
><font
color=
"red"
>
*
</font>
</span>
--%>
...
...
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