Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
YX_IDENT_beijing_auxiliary_YD
Project
Project
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
zhangyusheng
YX_IDENT_beijing_auxiliary_YD
Commits
39790f8f
Commit
39790f8f
authored
Sep 17, 2019
by
liboyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
派出所代码维护页面
parent
69acd0b5
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
293 additions
and
2 deletions
+293
-2
TaskListMapper.java
src/main/java/com/yxproject/start/mapper/TaskListMapper.java
+1
-1
TaskListServiceImpl.java
...com/yxproject/start/service/impl/TaskListServiceImpl.java
+1
-1
addPolice.html
src/main/resources/static/dialogs/addPolice.html
+32
-0
confirmDeletePolice.html
src/main/resources/static/dialogs/confirmDeletePolice.html
+11
-0
confirmUpdatePolice.html
src/main/resources/static/dialogs/confirmUpdatePolice.html
+32
-0
index.html
src/main/resources/static/index.html
+1
-0
app.js
src/main/resources/static/js/app.js
+4
-0
service.js
src/main/resources/static/js/service.js
+57
-0
getPoliceList.html
...n/resources/static/views/getPoliceList/getPoliceList.html
+51
-0
getPoliceList.js
...ain/resources/static/views/getPoliceList/getPoliceList.js
+103
-0
No files found.
src/main/java/com/yxproject/start/mapper/TaskListMapper.java
View file @
39790f8f
...
...
@@ -1633,7 +1633,7 @@ public interface TaskListMapper {
@Select
(
"SELECT * FROM POLICE_DIC"
)
public
List
<
Map
<
String
,
Object
>>
selectPoliceList
();
@Select
(
"SELECT * FROM POLICE_DIC WHERE POLICE_CODE
=
#{policeCode} OR POLICE_NAME LIKE #{policeCode}"
)
@Select
(
"SELECT * FROM POLICE_DIC WHERE POLICE_CODE
like
#{policeCode} OR POLICE_NAME LIKE #{policeCode}"
)
public
List
<
Map
<
String
,
Object
>>
selectPoliceListByPoliceCode
(
@Param
(
"policeCode"
)
String
policeCode
);
@Insert
(
"INSERT INTO POLICE_DIC (POLICE_CODE,POLICE_NAME) VALUES (#{policeCode},#{policeName})"
)
...
...
src/main/java/com/yxproject/start/service/impl/TaskListServiceImpl.java
View file @
39790f8f
...
...
@@ -1309,7 +1309,7 @@ public class TaskListServiceImpl implements TaskListService {
@Override
public
List
<
Map
<
String
,
Object
>>
selectPoliceListByPoliceCode
(
String
policeCode
){
return
taskListMapper
.
selectPoliceListByPoliceCode
(
policeCode
);
return
taskListMapper
.
selectPoliceListByPoliceCode
(
"%"
+
policeCode
+
"%"
);
}
@Override
...
...
src/main/resources/static/dialogs/addPolice.html
0 → 100644
View file @
39790f8f
<style>
input
[
type
=
number
]
{
-moz-appearance
:
textfield
;
}
input
[
type
=
number
]
::-webkit-inner-spin-button
,
input
[
type
=
number
]
::-webkit-outer-spin-button
{
-webkit-appearance
:
none
;
margin
:
0
;
}
</style>
<div
class=
"ui-dialog-title"
style=
"text-align: center"
>
派出所添加
</div>
<form
class=
"ui-dialog-content"
name=
"form"
>
<table
class=
"table"
style=
"border-color: black;"
>
<tr>
<td>
派出所代码:
</td>
<td><input
type=
"number"
class=
"form-control"
ng-model=
"data.code"
placeholder=
"请输入派出所代码"
required
></td>
</tr>
<tr>
<td>
派出所名称:
</td>
<td>
<input
type=
"text"
class=
"form-control"
ng-model=
"data.name"
placeholder=
"请输入派出所名称"
required
>
</td>
</tr>
</table>
</form>
<div
class=
"ui-dialog-confirm"
>
<button
type=
"submit"
class=
"btn btn-info"
ng-disabled=
"form.$invalid"
ng-click=
"confirmAddPolice()"
>
添加
</button>
<button
type=
"submit"
class=
"btn btn-danger"
ng-click=
"closeThisDialog()"
>
取消
</button>
</div>
\ No newline at end of file
src/main/resources/static/dialogs/confirmDeletePolice.html
0 → 100644
View file @
39790f8f
<div
class=
"ui-dialog-title"
>
提示
</div>
<div
class=
"ui-dialog-content"
>
<div>
确认删除
<span
class=
"text-primary"
>
{{policeName}}
</span>
吗?
</div>
</div>
<div
class=
"ui-dialog-confirm"
>
<button
type=
"submit"
class=
"btn btn-info"
ng-click=
"confirmDeletePolice()"
>
确认删除
</button>
<button
type=
"submit"
class=
"btn btn-danger"
ng-click=
"closeThisDialog()"
>
取消
</button>
</div>
\ No newline at end of file
src/main/resources/static/dialogs/confirmUpdatePolice.html
0 → 100644
View file @
39790f8f
<style>
input
[
type
=
number
]
{
-moz-appearance
:
textfield
;
}
input
[
type
=
number
]
::-webkit-inner-spin-button
,
input
[
type
=
number
]
::-webkit-outer-spin-button
{
-webkit-appearance
:
none
;
margin
:
0
;
}
</style>
<div
class=
"ui-dialog-title"
style=
"text-align: center"
>
派出所修改
</div>
<form
class=
"ui-dialog-content"
name=
"form"
>
<table
class=
"table"
style=
"border-color: black;"
>
<tr>
<td>
派出所代码:
</td>
<td><input
type=
"number"
class=
"form-control"
ng-model=
"code"
ng-value=
"code"
placeholder=
"请输入派出所代码"
required
></td>
</tr>
<tr>
<td>
组织机构:
</td>
<td>
<input
type=
"text"
class=
"form-control"
ng-model=
"name"
ng-value=
"name"
placeholder=
"请输入派出所名称"
required
>
</td>
</tr>
</table>
</form>
<div
class=
"ui-dialog-confirm"
>
<button
type=
"submit"
class=
"btn btn-info"
ng-disabled=
"form.$invalid"
ng-click=
"confirmUpdate(code,name)"
>
添加
</button>
<button
type=
"submit"
class=
"btn btn-danger"
ng-click=
"closeThisDialog()"
>
取消
</button>
</div>
\ No newline at end of file
src/main/resources/static/index.html
View file @
39790f8f
...
...
@@ -218,6 +218,7 @@
<script
src=
"views/blank/blank.js"
></script>
<script
src=
"views/addBackCard/addBackCard.js"
></script>
<script
src=
"views/updatePass/updatePass.js"
></script>
<script
src=
"views/getPoliceList/getPoliceList.js"
></script>
<script
src=
"views/downloadGongan/downloadGongan.js"
></script>
<script
src=
"views/greenPackageInfo/greenPackageInfo.js"
></script>
<script
src=
"views/confirmNotDeliveredInfo/confirmNotDeliveredInfo.js"
></script>
...
...
src/main/resources/static/js/app.js
View file @
39790f8f
...
...
@@ -45,6 +45,7 @@ angular.module('AvatarCheck', [
'AvatarCheck.downloadGongan'
,
'AvatarCheck.greenPackageInfo'
,
"AvatarCheck.confirmNotDeliveredInfo"
,
'AvatarCheck.getPoliceList'
,
'AvatarCheck.blank'
]).
config
([
'$locationProvider'
,
'$routeProvider'
,
'localStorageServiceProvider'
,
'$qProvider'
,
function
(
$locationProvider
,
$routeProvider
,
localStorageServiceProvider
,
$qProvider
)
{
$locationProvider
.
hashPrefix
(
'!'
);
...
...
@@ -228,6 +229,9 @@ angular.module('AvatarCheck', [
if
(
$location
.
path
()
==
"/confirmNotDeliveredInfo"
){
$rootScope
.
tab
=
'/confirmNotDeliveredInfo'
;
}
if
(
$location
.
path
()
==
"/getPoliceList"
){
$rootScope
.
tab
=
'/getPoliceList'
;
}
...
...
src/main/resources/static/js/service.js
View file @
39790f8f
...
...
@@ -1757,5 +1757,61 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
return
failed
(
err
)
});
},
getAllPoliceData
:
function
(
success
)
{
$http
({
method
:
'GET'
,
url
:
"../TaskList/selectPoliceList"
+
urlTimeStamp
()
}).
then
(
function
successCallback
(
response
)
{
success
(
response
.
data
)
})
},
delPoliceByCode
:
function
(
code
,
success
)
{
$http
({
method
:
'GET'
,
url
:
"../TaskList/deletePolice"
+
urlTimeStamp
(),
params
:{
policeCode
:
code
}
}).
then
(
function
successCallback
(
response
)
{
success
(
response
.
data
)
})
},
updatePoliceByCode
:
function
(
oldCode
,
code
,
name
,
success
)
{
console
.
log
(
oldCode
,
code
,
name
);
$http
({
method
:
'GET'
,
url
:
"../TaskList/updatePolice"
+
urlTimeStamp
(),
params
:{
policeCode
:
oldCode
,
policeName
:
name
,
newPoliceCode
:
code
}
}).
then
(
function
successCallback
(
response
)
{
success
(
response
.
data
)
})
},
addPoliceData
:
function
(
code
,
name
,
success
)
{
$http
({
method
:
'GET'
,
url
:
"../TaskList/insertPolice"
+
urlTimeStamp
(),
params
:{
policeCode
:
code
,
policeName
:
name
}
}).
then
(
function
successCallback
(
response
)
{
success
(
response
.
data
)
})
},
searchPoliceByCode
:
function
(
code
,
success
)
{
$http
({
method
:
'GET'
,
url
:
"../TaskList/selectPoliceListByPoliceCode"
+
urlTimeStamp
(),
params
:{
policeCode
:
code
}
}).
then
(
function
successCallback
(
response
)
{
success
(
response
.
data
)
})
}
}
});
\ No newline at end of file
src/main/resources/static/views/getPoliceList/getPoliceList.html
0 → 100644
View file @
39790f8f
<div
class=
"content row"
>
<div
class=
"col-md-12 clearfix"
style=
"margin-top:20px;"
>
<div
class=
"pull-left"
>
<a
class=
"btn btn-primary btn-flat"
ng-click=
"addPolice()"
>
添加派出所
</a>
</div>
<div
class=
"pull-right"
>
<div
class=
"input-group input-group-sm pull-right"
style=
"width:230px;padding-right: 5px;margin-bottom: 10px;"
>
<input
type=
"text"
class=
"form-control input-sm no-border padder"
ng-keyup=
"enterEvent($event,searchInput)"
style=
"height: 35px"
ng-model=
"searchInput"
placeholder=
"输入派出所代码或名称"
>
<span
class=
"input-group-btn"
>
<button
type=
"button"
style=
"height: 35px;background-color: #fff;border-left:0;outline:none;"
ng-click=
"doSearch(searchInput)"
class=
"btn btn-sm bg-light"
>
<i
class=
"fa fa-search"
></i>
</button>
</span>
</div>
</div>
</div>
<div
class=
"col-md-12"
style=
"margin-top:10px;"
>
<div
class=
"box"
>
<div
class=
"box-header with-border"
>
<strong>
派出所列表详情(共
<span
class=
"text-info"
ng-bind=
"policeList.length"
></span>
个派出所)
</strong>
</div>
<div
class=
"box box-primary"
style=
"padding: 7px; padding-top: 0px;"
>
<div
class=
"box-body"
>
<table
class=
"table table-bordered table-hover"
ng-if=
"policeList.length>0"
>
<thead>
<tr>
<th>
NO.
</th>
<th>
派出所名称
</th>
<th>
派出所代码
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
<tr
ng-repeat=
"police in policeList"
>
<td>
{{$index+1}}
</td>
<td>
{{police.POLICE_NAME}}
</td>
<td>
{{police.POLICE_CODE}}
</td>
<td>
<a
class=
"btn btn-default"
ng-click=
"updatePolice(police)"
>
修改
</a>
<a
class=
"btn btn-danger"
ng-click=
"deletePolice(police)"
>
删除
</a>
</td>
</tr>
</tbody>
</table>
<h4
ng-if=
"policeList.length==0"
>
暂无记录。
</h4>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/main/resources/static/views/getPoliceList/getPoliceList.js
0 → 100644
View file @
39790f8f
'use strict'
;
angular
.
module
(
'AvatarCheck.getPoliceList'
,
[
'ngRoute'
,
'AvatarCheck.http'
])
.
config
([
'$routeProvider'
,
function
(
$routeProvider
)
{
$routeProvider
.
when
(
'/getPoliceList'
,
{
templateUrl
:
'views/getPoliceList/getPoliceList.html'
+
urlTimeStamp
(),
controller
:
'getPoliceListCtrl'
,
cache
:
false
});
}])
.
controller
(
'getPoliceListCtrl'
,
function
(
$scope
,
$rootScope
,
HttpService
,
ngDialog
,
$location
,
$timeout
,
MessageService
,
$filter
)
{
//获取所有组织列表
var
getAllPolice
=
function
()
{
HttpService
.
getAllPoliceData
(
function
(
data
)
{
$scope
.
policeList
=
data
;
console
.
log
(
$scope
.
policeList
);
})
};
getAllPolice
();
//冻结组织
$scope
.
deletePolice
=
function
(
police
)
{
ngDialog
.
open
({
template
:
'dialogs/confirmDeletePolice.html'
+
urlTimeStamp
(),
width
:
600
,
cache
:
false
,
closeByDocument
:
false
,
controller
:
[
'$scope'
,
function
(
$scope
)
{
$scope
.
policeName
=
police
.
POLICE_NAME
;
$scope
.
confirmDeletePolice
=
function
()
{
HttpService
.
delPoliceByCode
(
police
.
POLICE_CODE
,
function
()
{
$scope
.
closeThisDialog
();
getAllPolice
();
})
}
}]
})
};
$scope
.
updatePolice
=
function
(
police
)
{
ngDialog
.
open
({
template
:
'dialogs/confirmUpdatePolice.html'
+
urlTimeStamp
(),
width
:
600
,
cache
:
false
,
closeByDocument
:
false
,
controller
:
[
'$scope'
,
function
(
$scope
)
{
$scope
.
name
=
police
.
POLICE_NAME
;
$scope
.
code
=
parseInt
(
police
.
POLICE_CODE
);
$scope
.
confirmUpdate
=
function
(
code
,
name
)
{
HttpService
.
updatePoliceByCode
(
police
.
POLICE_CODE
,
code
,
name
,
function
()
{
$scope
.
closeThisDialog
();
getAllPolice
();
})
}
}]
})
};
$scope
.
addPolice
=
function
()
{
ngDialog
.
open
({
template
:
'dialogs/addPolice.html'
+
urlTimeStamp
(),
width
:
600
,
cache
:
false
,
closeByDocument
:
false
,
controller
:
[
'$scope'
,
function
(
$scope
)
{
$scope
.
data
=
{
code
:
""
,
name
:
""
};
$scope
.
confirmAddPolice
=
function
()
{
HttpService
.
addPoliceData
(
$scope
.
data
.
code
,
$scope
.
data
.
name
,
function
()
{
$scope
.
closeThisDialog
();
getAllPolice
();
})
}
}]
})
}
$scope
.
enterEvent
=
function
(
e
,
input
)
{
var
keycode
=
window
.
event
?
e
.
keyCode
:
e
.
which
;
if
(
keycode
===
13
){
$scope
.
doSearch
(
input
);
}
};
$scope
.
doSearch
=
function
(
searchInput
)
{
console
.
log
(
"searchInput"
,
searchInput
);
if
(
searchInput
==
""
){
getAllPolice
();
}
else
{
HttpService
.
searchPoliceByCode
(
searchInput
,
function
(
data
)
{
$scope
.
policeList
=
data
;
console
.
log
(
$scope
.
policeList
)
})
}
}
});
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