Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
tjmdp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
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
other-project
tjmdp
Commits
621b2551
Commit
621b2551
authored
May 06, 2019
by
liuchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
31d58e72
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
826 additions
and
34 deletions
+826
-34
ActivityController.java
src/main/java/com/qiankun/controller/ActivityController.java
+82
-8
CertificateController.java
...in/java/com/qiankun/controller/CertificateController.java
+65
-0
ActivityRegDao.java
src/main/java/com/qiankun/dao/ActivityRegDao.java
+7
-0
ActivityRegDaoImpl.java
src/main/java/com/qiankun/dao/ActivityRegDaoImpl.java
+39
-0
CarertificateDaoImpl.java
src/main/java/com/qiankun/dao/CarertificateDaoImpl.java
+12
-0
CertificateDao.java
src/main/java/com/qiankun/dao/CertificateDao.java
+9
-0
AbsDao.java
src/main/java/com/qiankun/dao/core/AbsDao.java
+5
-0
IDao.java
src/main/java/com/qiankun/dao/core/IDao.java
+2
-0
Certificate.java
src/main/java/com/qiankun/entity/Certificate.java
+73
-0
ActivityService.java
src/main/java/com/qiankun/service/ActivityService.java
+25
-10
CertificateService.java
src/main/java/com/qiankun/service/CertificateService.java
+42
-0
ActivityRegVo.java
src/main/java/com/qiankun/vo/ActivityRegVo.java
+109
-0
ActivityVo.java
src/main/java/com/qiankun/vo/ActivityVo.java
+49
-0
main.jsp
src/main/webapp/WEB-INF/decorators/main.jsp
+4
-0
activitylist.jsp
src/main/webapp/WEB-INF/pages/activity/activitylist.jsp
+26
-15
activityreglist.jsp
src/main/webapp/WEB-INF/pages/activity/activityreglist.jsp
+140
-0
saveactivity.jsp
src/main/webapp/WEB-INF/pages/activity/saveactivity.jsp
+1
-1
edit.css
src/main/webapp/resources/assets/css/imageLabel/edit.css
+2
-0
jquery.imageLabel.min.css
...resources/assets/css/imageLabel/jquery.imageLabel.min.css
+2
-0
jquery.imageLabel.min.js
...p/resources/assets/js/imageLabel/jquery.imageLabel.min.js
+2
-0
activity.js
src/main/webapp/resources/js/activity/activity.js
+45
-0
activityreg.js
src/main/webapp/resources/js/activity/activityreg.js
+85
-0
No files found.
src/main/java/com/qiankun/controller/ActivityController.java
View file @
621b2551
...
@@ -2,14 +2,17 @@ package com.qiankun.controller;
...
@@ -2,14 +2,17 @@ package com.qiankun.controller;
import
java.io.File
;
import
java.io.File
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.ResourceBundle
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.google.common.collect.Maps
;
import
com.qiankun.entity.ActivityReg
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -22,13 +25,17 @@ import org.springframework.web.bind.annotation.ResponseBody;
...
@@ -22,13 +25,17 @@ import org.springframework.web.bind.annotation.ResponseBody;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.ModelAndView
;
import
com.google.common.collect.Maps
;
import
com.qiankun.annotation.Auth
;
import
com.qiankun.annotation.Auth
;
import
com.qiankun.controller.base.BaseController
;
import
com.qiankun.controller.base.BaseController
;
import
com.qiankun.dao.core.Hints
;
import
com.qiankun.dao.core.Hints
;
import
com.qiankun.entity.Activity
;
import
com.qiankun.entity.Activity
;
import
com.qiankun.entity.ActivityReg
;
import
com.qiankun.entity.ActivityType
;
import
com.qiankun.entity.ActivityType
;
import
com.qiankun.pages.IPageList
;
import
com.qiankun.pages.IPageList
;
import
com.qiankun.pages.PageListImpl
;
import
com.qiankun.service.ActivityService
;
import
com.qiankun.service.ActivityService
;
import
com.qiankun.vo.ActivityRegVo
;
import
com.qiankun.vo.ActivityVo
;
import
com.qiankun.vo.ActivityVo
;
@Controller
@Controller
...
@@ -88,10 +95,43 @@ public class ActivityController extends BaseController<Object>{
...
@@ -88,10 +95,43 @@ public class ActivityController extends BaseController<Object>{
@RequestMapping
(
"/activity/list"
)
@RequestMapping
(
"/activity/list"
)
public
ModelAndView
list
(
ActivityVo
activityVo
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
public
ModelAndView
list
(
ActivityVo
activityVo
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
ModelAndView
view
=
new
ModelAndView
();
IPageList
<
Activity
>
userP
age
=
activityService
.
findByActivitys
(
activityVo
.
getSearchStr
(),
activityVo
.
getType
(),
activityVo
.
getOrder
(),
activityVo
.
getSort
(),
IPageList
<
Activity
>
p
age
=
activityService
.
findByActivitys
(
activityVo
.
getSearchStr
(),
activityVo
.
getType
(),
activityVo
.
getOrder
(),
activityVo
.
getSort
(),
new
Hints
(
getStartRow
(
request
),
getPageCount
(
request
)));
new
Hints
(
getStartRow
(
request
),
getPageCount
(
request
)));
view
.
getModelMap
().
addAttribute
(
"activityPage"
,
userPage
);
IPageList
<
ActivityVo
>
activityPage
=
new
PageListImpl
<>();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
List
<
ActivityVo
>
records
=
new
ArrayList
<>();
for
(
Activity
a
:
page
.
getRecords
())
{
ActivityVo
vo
=
new
ActivityVo
();
vo
.
setAddr
(
a
.
getAddr
());
vo
.
setAvailable
(
a
.
isAvailable
());
vo
.
setName
(
a
.
getName
());
vo
.
setContacts
(
a
.
getContacts
());
vo
.
setContent
(
a
.
getContent
());
vo
.
setCrowd
(
a
.
getCrowd
());
vo
.
setCreateTime
(
a
.
getCreateTime
());
vo
.
setDay
(
sdf
.
format
(
a
.
getDay
()));
vo
.
setId
(
a
.
getId
());
vo
.
setMax
(
a
.
getMax
());
vo
.
setTel
(
a
.
getTel
());
vo
.
setType
(
a
.
getType
());
vo
.
setUploadImage
(
a
.
getUploadImage
());
// List<ActivityReg> list = new ArrayList<>();
// if (a.getActivityReg()!=null) {
// Iterator<ActivityReg> its = a.getActivityReg().iterator();
// while(its.hasNext()) {
// ActivityReg reg = its.next();
// list.add(reg);
// }
// }
// vo.setActivityReg(list);
vo
.
setRegCount
(
a
.
getActivityReg
().
size
());
records
.
add
(
vo
);
}
activityPage
.
setRecords
(
records
);
activityPage
.
setRecordTotal
(
page
.
getRecordTotal
());
view
.
getModelMap
().
addAttribute
(
"activityPage"
,
activityPage
);
view
.
getModelMap
().
addAttribute
(
"pageCount"
,
getPageCount
(
request
));
view
.
getModelMap
().
addAttribute
(
"pageCount"
,
getPageCount
(
request
));
view
.
getModelMap
().
addAttribute
(
"pageNumber"
,
getPageNumber
(
request
));
view
.
getModelMap
().
addAttribute
(
"pageNumber"
,
getPageNumber
(
request
));
view
.
getModelMap
().
addAttribute
(
"activityVo"
,
activityVo
);
view
.
getModelMap
().
addAttribute
(
"activityVo"
,
activityVo
);
...
@@ -200,16 +240,49 @@ public class ActivityController extends BaseController<Object>{
...
@@ -200,16 +240,49 @@ public class ActivityController extends BaseController<Object>{
@RequestMapping
(
"/api/activity/del"
)
public
ModelAndView
delActivity
(
ActivityVo
activityVo
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
activityService
.
remove
(
activityVo
.
getId
());
return
view
;
}
@RequestMapping
(
"/activity/reg/list"
)
public
ModelAndView
activityReglist
(
ActivityRegVo
vo
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
if
(
StringUtils
.
isNotBlank
(
vo
.
getActivityId
()))
{
Activity
activity
=
activityService
.
findById
(
vo
.
getActivityId
());
IPageList
<
ActivityReg
>
regPage
=
activityService
.
findActivityRegPage
(
vo
.
getSearchStr
(),
vo
.
getActivityId
(),
vo
.
getOrder
(),
vo
.
getSort
(),
new
Hints
(
getStartRow
(
request
),
getPageCount
(
request
)));
view
.
getModelMap
().
addAttribute
(
"regPage"
,
regPage
);
view
.
getModelMap
().
addAttribute
(
"pageCount"
,
getPageCount
(
request
));
view
.
getModelMap
().
addAttribute
(
"pageNumber"
,
getPageNumber
(
request
));
view
.
getModelMap
().
addAttribute
(
"ActivityRegVo"
,
vo
);
view
.
getModelMap
().
addAttribute
(
"activity"
,
activity
);
}
view
.
setViewName
(
"activity/activityreglist"
);
return
view
;
}
@RequestMapping
(
"/api/activity/reg/del"
)
public
ModelAndView
delActivityReg
(
ActivityRegVo
vo
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
if
(
StringUtils
.
isNotBlank
(
vo
.
getId
()))
{
activityService
.
removeReg
(
vo
.
getId
());
return
view
;
}
if
(
StringUtils
.
isNotBlank
(
vo
.
getActivityId
()))
{
activityService
.
removeRegAll
(
vo
.
getActivityId
());
return
view
;
}
return
view
;
}
}
}
\ No newline at end of file
src/main/java/com/qiankun/controller/CertificateController.java
0 → 100644
View file @
621b2551
package
com
.
qiankun
.
controller
;
import
java.io.File
;
import
java.util.ResourceBundle
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.servlet.ModelAndView
;
import
com.qiankun.controller.base.BaseController
;
import
com.qiankun.entity.Certificate
;
import
com.qiankun.service.CertificateService
;
@Controller
public
class
CertificateController
extends
BaseController
<
Object
>{
@Autowired
private
CertificateService
certificateService
;
private
ResourceBundle
rb
=
ResourceBundle
.
getBundle
(
"system"
);
private
String
certificateImagePath
=
File
.
separator
+
rb
.
getString
(
"certificateImage"
);
@RequestMapping
(
"/certificate/list"
)
public
ModelAndView
list
(
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
view
.
getModelMap
().
addAttribute
(
"list"
,
certificateService
.
findByAll
());
view
.
setViewName
(
"certificate/list"
);
return
view
;
}
@RequestMapping
(
"/certificate/add"
)
public
ModelAndView
add
(
String
id
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
Certificate
certificate
=
new
Certificate
();
if
(
StringUtils
.
isNotBlank
(
id
))
{
certificate
=
certificateService
.
findById
(
id
);
}
view
.
setViewName
(
"activity/saveactivity"
);
view
.
getModel
().
put
(
"certificate"
,
certificate
);
return
view
;
}
@RequestMapping
(
"/api/certificate/save"
)
public
void
save
(
String
id
,
String
name
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
Certificate
certificate
=
new
Certificate
();
certificateService
.
save
(
certificate
);
}
@RequestMapping
(
"/api/certificate/del"
)
public
ModelAndView
delActivityReg
(
String
id
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
certificateService
.
remove
(
id
);
return
view
;
}
}
\ No newline at end of file
src/main/java/com/qiankun/dao/ActivityRegDao.java
View file @
621b2551
package
com
.
qiankun
.
dao
;
package
com
.
qiankun
.
dao
;
import
com.qiankun.dao.core.Hints
;
import
com.qiankun.dao.core.IDao
;
import
com.qiankun.dao.core.IDao
;
import
com.qiankun.entity.ActivityReg
;
import
com.qiankun.entity.ActivityReg
;
import
com.qiankun.pages.IPageList
;
public
interface
ActivityRegDao
extends
IDao
<
ActivityReg
,
String
>
{
public
interface
ActivityRegDao
extends
IDao
<
ActivityReg
,
String
>
{
IPageList
<
ActivityReg
>
findActivityRegPage
(
String
searchStr
,
String
activityId
,
String
order
,
String
sort
,
Hints
hints
);
void
delByActivity
(
String
activityId
);
}
}
src/main/java/com/qiankun/dao/ActivityRegDaoImpl.java
View file @
621b2551
package
com
.
qiankun
.
dao
;
package
com
.
qiankun
.
dao
;
import
com.qiankun.dao.core.AbsDao
;
import
com.qiankun.dao.core.AbsDao
;
import
com.qiankun.dao.core.Hints
;
import
com.qiankun.entity.Activity
;
import
com.qiankun.entity.ActivityReg
;
import
com.qiankun.entity.ActivityReg
;
import
com.qiankun.pages.IPageList
;
import
com.qiankun.pages.PageListImpl
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
@Repository
@Repository
public
class
ActivityRegDaoImpl
extends
AbsDao
<
ActivityReg
,
String
>
implements
ActivityRegDao
{
public
class
ActivityRegDaoImpl
extends
AbsDao
<
ActivityReg
,
String
>
implements
ActivityRegDao
{
private
static
final
String
FIND_ACTIVITYREG_PAGE
=
" from ActivityReg where activity.id = ? "
;
@Override
public
IPageList
<
ActivityReg
>
findActivityRegPage
(
String
searchStr
,
String
activityId
,
String
order
,
String
sort
,
Hints
hints
)
{
if
(
order
==
null
){
order
=
" createTime "
;
}
if
(
sort
==
null
){
sort
=
" desc "
;
}
String
hql
=
""
;
if
(
StringUtils
.
isNotBlank
(
searchStr
))
{
hql
+=
" and (user.name like '%"
+
searchStr
+
"%' or user.mobile like '%"
+
searchStr
+
"%' or user.paperId like '%"
+
searchStr
+
"%' )"
;
}
IPageList
<
ActivityReg
>
regs
=
new
PageListImpl
<
ActivityReg
>();
regs
.
setRecords
(
find
(
FIND_ACTIVITYREG_PAGE
+
hql
+
sortHQL
(
order
,
sort
),
hints
,
activityId
));
regs
.
setRecordTotal
(
findCount
(
" select count(*) "
+
FIND_ACTIVITYREG_PAGE
+
hql
,
activityId
));
return
regs
;
}
@Override
public
void
delByActivity
(
String
activityId
)
{
String
hql
=
"delete ActivityReg where activity.id=?"
;
super
.
execUpdate
(
hql
,
activityId
);
}
}
}
src/main/java/com/qiankun/dao/CarertificateDaoImpl.java
0 → 100644
View file @
621b2551
package
com
.
qiankun
.
dao
;
import
org.springframework.stereotype.Repository
;
import
com.qiankun.dao.core.AbsDao
;
import
com.qiankun.entity.Certificate
;
@Repository
public
class
CarertificateDaoImpl
extends
AbsDao
<
Certificate
,
String
>
implements
CertificateDao
{
}
src/main/java/com/qiankun/dao/CertificateDao.java
0 → 100644
View file @
621b2551
package
com
.
qiankun
.
dao
;
import
com.qiankun.dao.core.IDao
;
import
com.qiankun.entity.Certificate
;
public
interface
CertificateDao
extends
IDao
<
Certificate
,
String
>
{
}
src/main/java/com/qiankun/dao/core/AbsDao.java
View file @
621b2551
...
@@ -153,6 +153,11 @@ public class AbsDao<E, K extends Serializable> implements IDao<E, K> {
...
@@ -153,6 +153,11 @@ public class AbsDao<E, K extends Serializable> implements IDao<E, K> {
getSession
().
delete
((
E
)
getSession
().
get
(
this
.
persistentClass
,
key
));
getSession
().
delete
((
E
)
getSession
().
get
(
this
.
persistentClass
,
key
));
}
}
@Override
public
void
remove
(
String
entityName
,
K
key
)
{
getSession
().
delete
(
entityName
,
(
E
)
getSession
().
get
(
this
.
persistentClass
,
key
));
}
@Override
@Override
public
void
update
(
E
entity
)
{
public
void
update
(
E
entity
)
{
getSession
().
merge
(
entity
);
getSession
().
merge
(
entity
);
...
...
src/main/java/com/qiankun/dao/core/IDao.java
View file @
621b2551
...
@@ -16,4 +16,6 @@ public interface IDao<E, K> {
...
@@ -16,4 +16,6 @@ public interface IDao<E, K> {
public
abstract
E
findUnique
(
final
String
queryString
,
final
Hints
hnts
,
final
Object
...
values
);
public
abstract
E
findUnique
(
final
String
queryString
,
final
Hints
hnts
,
final
Object
...
values
);
public
abstract
void
remove
(
String
entityName
,
K
key
);
}
}
src/main/java/com/qiankun/entity/Certificate.java
0 → 100644
View file @
621b2551
package
com
.
qiankun
.
entity
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Inheritance
;
import
javax.persistence.InheritanceType
;
import
javax.persistence.Lob
;
import
org.hibernate.annotations.Cache
;
import
org.hibernate.annotations.CacheConcurrencyStrategy
;
import
org.hibernate.annotations.GenericGenerator
;
@Entity
@Cache
(
usage
=
CacheConcurrencyStrategy
.
READ_WRITE
)
@Inheritance
(
strategy
=
InheritanceType
.
TABLE_PER_CLASS
)
public
class
Certificate
{
@Id
@GenericGenerator
(
name
=
"systemUUID"
,
strategy
=
"uuid2"
)
@GeneratedValue
(
generator
=
"systemUUID"
)
private
String
id
;
private
String
name
;
//证书名称
@Lob
private
String
position
;
//位置坐标
private
String
uploadImage
;
//证书照片路径
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getUploadImage
()
{
return
uploadImage
;
}
public
void
setUploadImage
(
String
uploadImage
)
{
this
.
uploadImage
=
uploadImage
;
}
public
String
getPosition
()
{
return
position
;
}
public
void
setPosition
(
String
position
)
{
this
.
position
=
position
;
}
}
src/main/java/com/qiankun/service/ActivityService.java
View file @
621b2551
package
com
.
qiankun
.
service
;
package
com
.
qiankun
.
service
;
import
java.util.Date
;
import
java.util.Iterator
;
import
java.util.List
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.qiankun.dao.ActivityDao
;
import
com.qiankun.dao.ActivityDao
;
import
com.qiankun.dao.ActivityRegDao
;
import
com.qiankun.dao.ActivityRegDao
;
import
com.qiankun.dao.ActivityTypeDao
;
import
com.qiankun.dao.ActivityTypeDao
;
...
@@ -8,16 +17,6 @@ import com.qiankun.entity.Activity;
...
@@ -8,16 +17,6 @@ import com.qiankun.entity.Activity;
import
com.qiankun.entity.ActivityReg
;
import
com.qiankun.entity.ActivityReg
;
import
com.qiankun.entity.ActivityType
;
import
com.qiankun.entity.ActivityType
;
import
com.qiankun.pages.IPageList
;
import
com.qiankun.pages.IPageList
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.awt.image.RGBImageFilter
;
import
java.text.BreakIterator
;
import
java.util.Date
;
import
java.util.Iterator
;
import
java.util.List
;
@Service
@Service
public
class
ActivityService
{
public
class
ActivityService
{
...
@@ -36,6 +35,16 @@ public class ActivityService {
...
@@ -36,6 +35,16 @@ public class ActivityService {
}
}
@Transactional
public
void
removeRegAll
(
String
activityId
)
{
activityRegDao
.
delByActivity
(
activityId
);
}
@Transactional
public
void
removeReg
(
String
id
)
{
activityRegDao
.
remove
(
id
);
}
@Transactional
@Transactional
public
Activity
save
(
Activity
activity
)
{
public
Activity
save
(
Activity
activity
)
{
return
activityDao
.
save
(
activity
);
return
activityDao
.
save
(
activity
);
...
@@ -125,4 +134,10 @@ public class ActivityService {
...
@@ -125,4 +134,10 @@ public class ActivityService {
public
IPageList
<
Activity
>
findPageList
(
String
userId
,
Hints
hints
)
{
public
IPageList
<
Activity
>
findPageList
(
String
userId
,
Hints
hints
)
{
return
activityDao
.
findPageList
(
userId
,
hints
);
return
activityDao
.
findPageList
(
userId
,
hints
);
}
}
public
IPageList
<
ActivityReg
>
findActivityRegPage
(
String
searchStr
,
String
activityId
,
String
order
,
String
sort
,
Hints
hints
){
IPageList
<
ActivityReg
>
regs
=
activityRegDao
.
findActivityRegPage
(
searchStr
,
activityId
,
order
,
sort
,
hints
);
return
regs
;
}
}
}
src/main/java/com/qiankun/service/CertificateService.java
0 → 100644
View file @
621b2551
package
com
.
qiankun
.
service
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.qiankun.dao.CertificateDao
;
import
com.qiankun.entity.Certificate
;
@Service
public
class
CertificateService
{
@Autowired
private
CertificateDao
certificateDao
;
public
Certificate
findById
(
String
id
)
{
Certificate
certificate
=
certificateDao
.
find
(
id
);
return
certificate
;
}
@Transactional
public
void
remove
(
String
id
)
{
certificateDao
.
remove
(
id
);
}
@Transactional
public
Certificate
save
(
Certificate
certificate
)
{
return
certificateDao
.
save
(
certificate
);
}
public
List
<
Certificate
>
findByAll
()
{
return
certificateDao
.
findAll
();
}
}
src/main/java/com/qiankun/vo/ActivityRegVo.java
0 → 100644
View file @
621b2551
package
com
.
qiankun
.
vo
;
import
java.util.Date
;
public
class
ActivityRegVo
{
private
String
id
;
private
boolean
signin
;
//是否签到
private
Date
signinTime
;
//签到时间
private
Date
signoutTime
;
//签出时间
private
String
userId
;
private
Date
createTime
=
new
Date
();
//报名时间
private
String
activityId
;
private
String
searchStr
;
private
String
order
;
private
String
sort
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
boolean
isSignin
()
{
return
signin
;
}
public
void
setSignin
(
boolean
signin
)
{
this
.
signin
=
signin
;
}
public
Date
getSigninTime
()
{
return
signinTime
;
}
public
void
setSigninTime
(
Date
signinTime
)
{
this
.
signinTime
=
signinTime
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getSignoutTime
()
{
return
signoutTime
;
}
public
void
setSignoutTime
(
Date
signoutTime
)
{
this
.
signoutTime
=
signoutTime
;
}
public
String
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
public
String
getActivityId
()
{
return
activityId
;
}
public
void
setActivityId
(
String
activityId
)
{
this
.
activityId
=
activityId
;
}
public
String
getSearchStr
()
{
return
searchStr
;
}
public
void
setSearchStr
(
String
searchStr
)
{
this
.
searchStr
=
searchStr
;
}
public
String
getOrder
()
{
return
order
;
}
public
void
setOrder
(
String
order
)
{
this
.
order
=
order
;
}
public
String
getSort
()
{
return
sort
;
}
public
void
setSort
(
String
sort
)
{
this
.
sort
=
sort
;
}
}
src/main/java/com/qiankun/vo/ActivityVo.java
View file @
621b2551
package
com
.
qiankun
.
vo
;
package
com
.
qiankun
.
vo
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
com.qiankun.entity.ActivityReg
;
public
class
ActivityVo
{
public
class
ActivityVo
{
private
String
id
;
private
String
id
;
...
@@ -23,12 +29,18 @@ private String id;
...
@@ -23,12 +29,18 @@ private String id;
private
String
contacts
;
//联系人
private
String
contacts
;
//联系人
private
String
tel
;
//联系电话
private
String
tel
;
//联系电话
private
String
uploadImage
;
//活动照片路径
private
List
<
ActivityReg
>
activityReg
=
new
ArrayList
<
ActivityReg
>();
private
Date
createTime
=
new
Date
();
private
String
searchStr
;
private
String
searchStr
;
private
String
order
;
private
String
order
;
private
String
sort
;
private
String
sort
;
private
String
userId
;
//请求用户ID
private
String
userId
;
//请求用户ID
private
Integer
regCount
;
public
String
getId
()
{
public
String
getId
()
{
return
id
;
return
id
;
}
}
...
@@ -149,4 +161,41 @@ private String id;
...
@@ -149,4 +161,41 @@ private String id;
public
void
setUserId
(
String
userId
)
{
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
this
.
userId
=
userId
;
}
}
public
String
getUploadImage
()
{
return
uploadImage
;
}
public
void
setUploadImage
(
String
uploadImage
)
{
this
.
uploadImage
=
uploadImage
;
}
public
List
<
ActivityReg
>
getActivityReg
()
{
return
activityReg
;
}
public
void
setActivityReg
(
List
<
ActivityReg
>
activityReg
)
{
this
.
activityReg
=
activityReg
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Integer
getRegCount
()
{
return
regCount
;
}
public
void
setRegCount
(
Integer
regCount
)
{
this
.
regCount
=
regCount
;
}
}
}
src/main/webapp/WEB-INF/decorators/main.jsp
View file @
621b2551
...
@@ -38,6 +38,9 @@
...
@@ -38,6 +38,9 @@
<link
rel=
"stylesheet"
href=
"<webpath:path/>/resources/assets/css/hsCheckData/hsCheckData.css"
/>
<link
rel=
"stylesheet"
href=
"<webpath:path/>/resources/assets/css/hsCheckData/hsCheckData.css"
/>
<link
rel=
"stylesheet"
href=
"<webpath:path/>/resources/assets/css/imageLabel/jquery.imageLabel.min.css"
/>
<link
rel=
"stylesheet"
href=
"<webpath:path/>/resources/assets/css/imageLabel/edit.css"
/>
<link
rel=
"stylesheet"
href=
"<webpath:path/>/resources/css/page.css"
/>
<link
rel=
"stylesheet"
href=
"<webpath:path/>/resources/css/page.css"
/>
<link
rel=
"stylesheet"
href=
"<webpath:path/>/resources/css/style.css"
/>
<link
rel=
"stylesheet"
href=
"<webpath:path/>/resources/css/style.css"
/>
<!--[if lte IE 8] >
<!--[if lte IE 8] >
...
@@ -82,6 +85,7 @@
...
@@ -82,6 +85,7 @@
<script
type=
"text/javascript"
src=
"<webpath:path/>/resources/js/tools/jquery.validate.js"
></script>
<script
type=
"text/javascript"
src=
"<webpath:path/>/resources/js/tools/jquery.validate.js"
></script>
<script
type=
"text/javascript"
src=
"<webpath:path/>/resources/assets/js/bootbox.min.js"
></script>
<script
type=
"text/javascript"
src=
"<webpath:path/>/resources/assets/js/bootbox.min.js"
></script>
<script
type=
"text/javascript"
src=
"<webpath:path/>/resources/assets/js/imageLabel/jquery.imageLabel.min.js"
></script>
<script
type=
"text/javascript"
src=
"<webpath:path/>/resources/js/tools/jquerysession.js"
></script>
<script
type=
"text/javascript"
src=
"<webpath:path/>/resources/js/tools/jquerysession.js"
></script>
<script
type=
"text/javascript"
src=
"<webpath:path/>/resources/js/argus.js"
></script>
<script
type=
"text/javascript"
src=
"<webpath:path/>/resources/js/argus.js"
></script>
...
...
src/main/webapp/WEB-INF/pages/activity/activitylist.jsp
View file @
621b2551
...
@@ -37,10 +37,10 @@
...
@@ -37,10 +37,10 @@
新增
新增
</button>
</button>
<button class="btn btn-sm btn-success">
<
!--
button class="btn btn-sm btn-success">
<i class="icon-ban-circle bigger-110"></i>
<i class="icon-ban-circle bigger-110"></i>
禁用
禁用
</button>
</button
--
>
</div>
</div>
...
@@ -66,13 +66,13 @@
...
@@ -66,13 +66,13 @@
<table id="table-data" class="table table-bordered ">
<table id="table-data" class="table table-bordered ">
<thead>
<thead>
<tr class="">
<tr class="">
<th class="center">
<
!-- <
th class="center">
<label>
<label>
<input type="checkbox" class="ace">
<input type="checkbox" class="ace">
<span class="lbl"></span>
<span class="lbl"></span>
</label>
</label>
</th>
</th>
-->
<th width="
8
%">活动名称</th>
<th width="
15
%">活动名称</th>
<th width="8%">活动类型</th>
<th width="8%">活动类型</th>
<th width="">活动地址</th>
<th width="">活动地址</th>
<th width="8%">活动时间</th>
<th width="8%">活动时间</th>
...
@@ -91,12 +91,12 @@
...
@@ -91,12 +91,12 @@
<c:forEach var="activity" items="${activityPage.records}">
<c:forEach var="activity" items="${activityPage.records}">
<tr class="tr-highlight">
<tr class="tr-highlight">
<td class="center" width=10>
<
!-- <
td class="center" width=10>
<label>
<label>
<input type="checkbox" class="ace">
<input type="checkbox" class="ace">
<span class="lbl"></span>
<span class="lbl"></span>
</label>
</label>
</td>
</td>
-->
<td title="">${activity.name}</td>
<td title="">${activity.name}</td>
<td title="">
<td title="">
...
@@ -106,10 +106,14 @@
...
@@ -106,10 +106,14 @@
<c:if test="${activity.type==4}">其他</c:if>
<c:if test="${activity.type==4}">其他</c:if>
</td>
</td>
<td title="">${activity.addr}</td>
<td title="">${activity.addr}</td>
<td title=""><fmt:formatDate value='${activity.day}' pattern='yyyy-MM-dd HH:mm' /></td>
<td title="">${activity.day}</td>
<td title=""><c:if test="${activity.max==0}">所有</c:if><c:if test="${activity.max!=0}">${activity.max}</c:if></td>
<td title=""><c:if test="${activity.type==3}">全部</c:if>
<c:if test="${activity.type!=3}">
<c:if test="${activity.max==0}">全部</c:if><c:if test="${activity.max!=0}">${activity.regCount}/${activity.max}</c:if>
</c:if>
</td>
<td title="">
<td title="">
<c:if test="${activity.crowd == 0}">
所有人
</c:if>
<c:if test="${activity.crowd == 0}">
全部
</c:if>
<c:if test="${activity.crowd == 1}">捐献志愿者</c:if>
<c:if test="${activity.crowd == 1}">捐献志愿者</c:if>
<c:if test="${activity.crowd == 2}">未采血用户</c:if>
<c:if test="${activity.crowd == 2}">未采血用户</c:if>
...
@@ -120,16 +124,23 @@
...
@@ -120,16 +124,23 @@
<td title=""><fmt:formatDate value='${activity.createTime}' pattern='yyyy-MM-dd HH:mm' /></td>
<td title=""><fmt:formatDate value='${activity.createTime}' pattern='yyyy-MM-dd HH:mm' /></td>
<td>
<td>
<div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
<div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
<c:if test="${activity.type!=3}">
<button class="btn btn-xs btn-info" title="报名情况" onclick="window.location.href='<webpath:path/>/activity/reg/list?activityId=${activity.id}'">
<i class="icon-user"></i>
</button>
</c:if>
<button class="btn btn-xs btn-info" onclick="window.location.href='<webpath:path/>/activity/add?id=${activity.id}'">
<button class="btn btn-xs btn-info" onclick="window.location.href='<webpath:path/>/activity/add?id=${activity.id}'">
<i class="icon-edit
bigger-120
"></i>
<i class="icon-edit"></i>
</button>
</button>
<c:if test="${activity.type!=3}">
<button class="btn btn-xs btn-danger">
<button class="btn btn-xs btn-danger
" onclick="activity.remove('${activity.regCount}','${activity.id}')
">
<i class="icon-trash
bigger-120
"></i>
<i class="icon-trash"></i>
</button>
</button>
</c:if>
</div>
</div>
...
...
src/main/webapp/WEB-INF/pages/activity/activityreglist.jsp
0 → 100644
View file @
621b2551
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="webpath" uri="/WEB-INF/tlds/path.tld"%>
<%@ taglib prefix="webpage" uri="/WEB-INF/tlds/pageview.tld"%>
<head>
</head>
<div class="main-content">
<div class="breadcrumbs" id="breadcrumbs">
<ul class="breadcrumb">
<li>
<i class="icon-home home-icon"></i>
<a href="#">首页</a>
</li>
<li class="active">活动管理</li>
<li class="active">${activity.name}</li>
</ul><!-- .breadcrumb -->
</div>
<div class="page-content">
<div class="row">
<div class="col-xs-12">
<div class="widget-toolbox">
<div class="btn-group">
<!--<button class="btn btn-sm btn-success" onclick="window.location.href='<webpath:path/>/activity/add'">
<i class="icon-plus-sign-alt bigger-110"></i>
新增
</button>-->
<button class="btn btn-sm btn-success" onclick="reg.remove('${ActivityRegVo.activityId}','activityId')">
<i class="icon-trash bigger-110"></i>
全部清除
</button>
</div>
<div class="pull-right ">
<input type="hidden" class="nav-search-input" id="activityId" value="${ActivityRegVo.activityId}" autocomplete="off">
<input type="text" placeholder="查询" class="nav-search-input" id="searchStr" value="${ActivityRegVo.searchStr}" autocomplete="off">
<a href="javascript:void(0);" id="searchBtn"><i class="icon-search nav-search-icon"></i></a>
</div>
</div>
<div class="pull-left">共${regPage.recordTotal}条</div>
<table id="table-data" class="table table-bordered ">
<thead>
<tr class="">
<!-- <th class="center">
<label>
<input type="checkbox" class="ace">
<span class="lbl"></span>
</label>
</th> -->
<th width="15%">姓名</th>
<th width="15%">联系电话</th>
<th width="15%">证件号</th>
<th width="10%">是否签到</th>
<th width="15%">签到时间</th>
<th width="15%">签出时间</th>
<th width="15%">报名时间</th>
<th width="100">操作</th>
</tr>
</thead>
<tbody>
<c:forEach var="reg" items="${regPage.records}">
<tr class="tr-highlight">
<!-- <td class="center" width=10>
<label>
<input type="checkbox" class="ace">
<span class="lbl"></span>
</label>
</td> -->
<td title="">${reg.user.name}</td>
<td title="">${reg.user.mobile}</td>
<td title="">${reg.user.paperId}</td>
<td title=""><c:if test="${reg.signin}"><span class="label label-success">是</span></c:if><c:if test="${!reg.signin}"><span class="label label-warning">否</span></c:if></td>
<td title=""><fmt:formatDate value='${reg.signinTime}' pattern='yyyy-MM-dd HH:mm:ss' /></td>
<td title=""><fmt:formatDate value='${reg.signoutTime}' pattern='yyyy-MM-dd HH:mm:ss'/></td>
<td title=""><fmt:formatDate value='${reg.createTime}' pattern='yyyy-MM-dd HH:mm:ss' /></td>
<td>
<div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
<button class="btn btn-xs btn-danger " onclick="reg.remove('${reg.id}','id')">
<i class="icon-trash"></i>
</button>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<webpage:page totalCount="${regPage.recordTotal}"
pageCount="${pageCount}" currentPage="${pageNumber}"
action="/activity/reg/list"
className="pageable-div pagination"
innerStyle=" float: left; width: 100%" />
</div>
</div>
</div>
</div>
<script src="<webpath:path/>/resources/js/activity/activityreg.js" type="text/javascript"></script>
\ No newline at end of file
src/main/webapp/WEB-INF/pages/activity/saveactivity.jsp
View file @
621b2551
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
<label class="col-sm-3 control-label no-padding-right" for="form-input-readonly"> <font color="red">*</font> 活动时间 </label>
<label class="col-sm-3 control-label no-padding-right" for="form-input-readonly"> <font color="red">*</font> 活动时间 </label>
<div class="col-sm-9">
<div class="col-sm-9">
<input class="col-xs-10 col-sm-10" id="day" name="day" type="text" autocomplete="off" data-date-format="yyyy-mm-dd hh:ss" value="<fmt:formatDate value='${activity.day}' pattern='yyyy-MM-dd HH:mm' />"/>
<input class="col-xs-10 col-sm-10" id="day" name="day" type="text" autocomplete="off" data-date-format="yyyy-mm-dd hh:ss" value="<fmt:formatDate value='${activity.day}' pattern='yyyy-MM-dd HH:mm
:ss
' />"/>
</div>
</div>
</div>
</div>
...
...
src/main/webapp/resources/assets/css/imageLabel/edit.css
0 → 100644
View file @
621b2551
@charset
"UTF-8"
;
.right-select-box
{
color
:
#333
;
position
:
fixed
;
width
:
300px
;
bottom
:
0
;
top
:
10px
;
z-index
:
200
;
right
:
0
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
;
box-shadow
:
-5px
50px
50px
3px
rgba
(
0
,
0
,
0
,
.1
);
border-left
:
1px
solid
#959595
;
transition
:
all
.4s
;
transform
:
translate
(
100%
)}
.right-select-box
*
{
box-sizing
:
border-box
;
list-style
:
none
;
margin
:
0
;
padding
:
0
}
.right-select-box
.full
{
width
:
100%
;
height
:
100%
}
.right-select-box
.full-w
{
width
:
100%
}
.right-select-box
.full-h
{
height
:
100%
}
.right-select-box
.flex-box
{
display
:
-ms-flexbox
;
display
:
flex
}
.right-select-box
.flex1
{
-ms-flex
:
1
;
flex
:
1
;
-webkit-box-flex
:
1
;
overflow
:
hidden
}
.right-select-box
.cover
{
-o-object-fit
:
cover
;
object-fit
:
cover
;
width
:
100%
;
height
:
100%
}
.right-select-box
.cover-body
{
position
:
relative
;
overflow
:
hidden
;
-webkit-transform
:
rotate
(
0deg
)}
.right-select-box
.cover-body
.cover
{
position
:
absolute
}
.right-select-box
.ellipsis
{
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
}
.right-select-box
.select-close
{
position
:
absolute
;
right
:
100%
;
top
:
50%
;
display
:
block
;
padding
:
5px
;
background
:
#fff
;
border
:
1px
solid
#959595
;
border-right
:
none
;
cursor
:
pointer
}
.right-select-box
.select-close
svg
{
transform
:
rotate
(
-90deg
);
transition
:
all
.3s
}
.right-select-box.select-active
{
transform
:
translate
(
0
);
visibility
:
visible
}
.right-select-box.select-active
.select-close
svg
{
transform
:
rotate
(
90deg
)}
.right-select-box
.select-title
{
position
:
relative
;
z-index
:
2
;
border-bottom
:
1px
solid
#959595
}
.right-select-box
.select-title
.btns
{
font-size
:
14px
;
margin-top
:
-3px
;
color
:
#959595
;
padding
:
5px
20px
;
border
:
1px
solid
#959595
;
border-radius
:
5px
5px
0
0
;
margin-left
:
-1px
;
background-color
:
#fff
;
cursor
:
pointer
;
position
:
relative
;
border-color
:
transparent
;
opacity
:
.9
;
transition
:
all
.4s
}
.right-select-box
.select-title
.btns.active
{
border-color
:
#959595
;
border-bottom-color
:
#fff
;
z-index
:
1
;
opacity
:
1
;
top
:
1px
}
.right-select-box
.select-content
{
width
:
100%
;
height
:
100%
;
display
:
-ms-flexbox
;
display
:
flex
;
-ms-flex-direction
:
column
;
flex-direction
:
column
;
position
:
relative
;
z-index
:
0
}
.right-select-box
.select-content
.select-content-inner
{
background-color
:
#fff
;
position
:
relative
;
z-index
:
0
;
overflow
:
hidden
}
.right-select-box
.select-content
.select-content-inner
.inner-lists
{
width
:
200%
;
transition
:
margin
.4s
;
padding-top
:
10px
}
.right-select-box
.select-content
.select-content-inner
.inner-lists
.inner-list
{
overflow
:
hidden
;
overflow-y
:
auto
}
.right-select-box
.ajax-loading
{
margin-top
:
20px
;
margin-bottom
:
10px
;
position
:
relative
;
text-align
:
center
;
font-size
:
12px
;
color
:
#959595
}
.right-select-box
.ajax-loading
:after
{
content
:
""
;
display
:
block
;
margin
:
0
auto
;
width
:
20px
;
height
:
20px
;
border-radius
:
50%
;
border
:
2px
solid
#000
;
border-right-color
:
transparent
;
animation
:
ajaxLoading
.8s
infinite
linear
}
.right-select-box
.ajax-loading.over
:after
{
display
:
none
}
.right-select-box
.ajax-loading.over
:before
{
content
:
"已经全部加载完成~"
}
.right-select-box
.ajax-loading.nothing
:after
{
display
:
none
}
.right-select-box
.ajax-loading.nothing
:before
{
content
:
"没有搜索到相关的产品~"
}
@keyframes
ajaxLoading
{
form
{
transform
:
rotate
(
0deg
)}
to
{
transform
:
rotate
(
1turn
)}}
.products-lists
.list
{
padding
:
10px
;
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
.1
);
cursor
:
pointer
;
transition
:
all
.3s
;
position
:
relative
;
overflow
:
hidden
}
.products-lists
.list
.jiao
{
width
:
25px
;
height
:
25px
;
background-color
:
tomato
;
position
:
absolute
;
left
:
-12px
;
top
:
-12px
;
transform
:
rotate
(
135deg
);
display
:
none
;
z-index
:
1
}
.products-lists
.list.active
.jiao
{
display
:
block
}
.products-lists
.list
:hover
{
background-color
:
rgba
(
0
,
0
,
0
,
.1
)}
.products-lists
.cover-body
{
width
:
60px
;
height
:
60px
;
border-radius
:
4px
;
min-width
:
60px
}
.products-lists
.fonts
{
margin-left
:
10px
;
font-size
:
14px
}
.products-lists
.fonts
p
{
color
:
#959595
;
font-size
:
12px
;
margin-top
:
2px
}
.products-list-body
{
padding-top
:
100px
}
.products-list-body
.form-body
{
box-shadow
:
0
8px
10px
rgba
(
0
,
0
,
0
,
.1
);
position
:
absolute
;
top
:
0
;
width
:
100%
;
height
:
90px
;
left
:
0
;
z-index
:
10
;
background-color
:
#fff
;
padding
:
10px
}
.products-list-body
.form-body
input
{
width
:
100%
;
height
:
30px
;
margin-bottom
:
10px
;
padding
:
0
10px
}
.products-list-body
.form-body
select
{
height
:
30px
;
margin-right
:
10px
}
.products-list-body
.form-body
button
[
type
=
submit
]
{
padding
:
0
20px
;
background-color
:
#4b5060
;
color
:
#fff
;
border-radius
:
2px
;
cursor
:
pointer
}
.loading-top
{
position
:
fixed
;
width
:
100%
;
height
:
100%
;
z-index
:
300
;
left
:
0
;
top
:
0
;
background-color
:
hsla
(
0
,
0%
,
100%
,
.4
);
visibility
:
hidden
;
opacity
:
0
;
transition
:
all
.3s
}
.loading-top.active
{
visibility
:
visible
;
opacity
:
1
}
.loading-top
:after
{
width
:
40px
;
height
:
40px
;
border-radius
:
50%
;
border
:
3px
solid
#000
;
border-right-color
:
transparent
;
animation
:
ajaxLoading
.8s
infinite
linear
;
content
:
""
;
display
:
block
;
position
:
absolute
;
left
:
50%
;
top
:
50%
;
margin-left
:
-20px
;
margin-top
:
-20px
}
\ No newline at end of file
src/main/webapp/resources/assets/css/imageLabel/jquery.imageLabel.min.css
0 → 100644
View file @
621b2551
.imageLabel-box
{
font-size
:
14px
;
visibility
:
hidden
;
opacity
:
0
;
position
:
fixed
;
width
:
100%
;
height
:
100%
;
left
:
0
;
top
:
0
;
background-color
:
#363636
;
z-index
:
100
;
transition
:
all
.4s
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
}
.imageLabel-box.imageLabel-box-active
{
visibility
:
visible
;
opacity
:
1
;
transform
:
scale
(
1
)}
.imageLabel-box
*
{
-webkit-tap-highlight-color
:
rgba
(
255
,
0
,
0
,
0
);
outline
:
none
;
box-sizing
:
border-box
;
list-style
:
none
;
margin
:
0
;
padding
:
0
}
.imageLabel-box
button
{
-webkit-user-select
:
none
}
.imageLabel-box
input
[
type
=
number
]
{
-moz-appearance
:
textfield
}
.imageLabel-box
input
::-webkit-inner-spin-button
,
.imageLabel-box
input
::-webkit-outer-spin-button
{
-webkit-appearance
:
none
!important
;
margin
:
0
}
.imageLabel-box
button
,
.imageLabel-box
input
[
type
=
number
],
.imageLabel-box
input
[
type
=
password
],
.imageLabel-box
input
[
type
=
tel
],
.imageLabel-box
input
[
type
=
text
]
{
-webkit-appearance
:
none
}
.imageLabel-box
input
::-webkit-search-cancel-button
{
display
:
none
}
.imageLabel-box
.imageLabel
{
width
:
100%
;
height
:
100%
;
display
:
-ms-flexbox
;
display
:
flex
;
-ms-flex-direction
:
column
;
flex-direction
:
column
}
.imageLabel-box
.imageLabel
.imageLabel-box
{
width
:
100%
;
height
:
100%
}
.imageLabel-box
.imageLabel-buttons
{
padding
:
10px
;
text-align
:
center
}
.imageLabel-box
.imageLabel-buttons
div
{
padding
:
5px
10px
;
margin
:
0
10px
;
background-color
:
#4b5060
}
.imageLabel-box
.imageLabel-buttons
div
.imageLabel-closes
{
background-color
:
#959595
}
.imageLabel-box
.imageLabel-img-boxs
{
-ms-flex-pack
:
center
;
-ms-flex-align
:
center
;
-ms-flex
:
1
;
flex
:
1
}
.imageLabel-box
.imageLabel-img-boxs
,
.imageLabel-box
.imageLabel-img-boxs
.imageLabel-img-body
{
width
:
100%
;
height
:
100%
;
justify-content
:
center
;
align-items
:
center
;
display
:
-ms-flexbox
;
display
:
flex
}
.imageLabel-box
.imageLabel-img-boxs
.imageLabel-img-body
{
position
:
relative
;
overflow
:
hidden
;
-ms-flex-pack
:
center
;
-ms-flex-align
:
center
}
.imageLabel-box
.imageLabel-drap-menu
{
background-color
:
#fff
;
width
:
100px
;
position
:
fixed
;
z-index
:
9999
;
display
:
none
;
box-shadow
:
0
16px
24px
2px
rgba
(
0
,
0
,
0
,
.06
),
0
6px
30px
5px
rgba
(
0
,
0
,
0
,
.12
),
0
8px
10px
-7px
rgba
(
0
,
0
,
0
,
.2
)}
.imageLabel-box
.imageLabel-drap-menu
.btns
{
padding
:
5px
10px
;
text-align
:
center
}
.imageLabel-box
.imageLabel-drap-menu
.btns
:hover
{
background-color
:
rgba
(
0
,
0
,
0
,
.1
)}
.imageLabel-box
.imageLabel-drap-menu
.btns
:active
{
opacity
:
.9
}
.imageLabel-img
{
visibility
:
hidden
;
opacity
:
0
;
transition
:
all
.3s
}
.imageLabel-img.imageLabel-img-active
{
visibility
:
visible
;
opacity
:
1
}
.imageLabel-content
{
cursor
:
crosshair
;
width
:
100%
;
height
:
100%
;
left
:
0
;
top
:
0
;
position
:
absolute
}
.imageLabel-imgdrop
{
cursor
:
move
;
position
:
absolute
;
min-width
:
7px
;
min-height
:
7px
;
background-color
:
rgba
(
0
,
0
,
0
,
.3
);
border
:
1px
dashed
#959595
;
z-index
:
10
;
display
:
-ms-flexbox
;
display
:
flex
;
-ms-flex-pack
:
center
;
justify-content
:
center
;
-ms-flex-align
:
center
;
align-items
:
center
}
.imageLabel-imgdrop
span
{
color
:
#fff
}
.imageLabel-imgdrop
em
.imageLable-em
{
display
:
none
;
z-index
:
-1
;
position
:
absolute
;
background-color
:
rgba
(
0
,
0
,
0
,
.2
)}
.imageLabel-imgdrop
em
.imageLable-em
:first-of-type
{
bottom
:
100%
;
left
:
50%
;
width
:
10000px
;
margin-bottom
:
1px
;
height
:
10000px
;
margin-left
:
-5000px
}
.imageLabel-imgdrop
em
.imageLable-em
:nth-of-type
(
2
)
{
left
:
100%
;
margin-left
:
1px
;
top
:
-1px
;
width
:
10000px
;
bottom
:
-1px
}
.imageLabel-imgdrop
em
.imageLable-em
:nth-of-type
(
3
)
{
top
:
100%
;
left
:
50%
;
width
:
10000px
;
margin-top
:
1px
;
height
:
10000px
;
margin-left
:
-5000px
}
.imageLabel-imgdrop
em
.imageLable-em
:nth-of-type
(
4
)
{
right
:
100%
;
top
:
-1px
;
width
:
10000px
;
margin-right
:
1px
;
bottom
:
-1px
}
.imageLabel-imgdrop
i
{
width
:
9px
;
height
:
9px
;
border-radius
:
50%
;
border
:
1px
solid
#fff
;
background-color
:
#959595
;
position
:
absolute
;
cursor
:
default
!important
}
.imageLabel-imgdrop
i
:first-of-type
{
left
:
-5px
;
top
:
-5px
;
cursor
:
nw-resize
}
.imageLabel-imgdrop
i
:nth-of-type
(
2
)
{
right
:
-5px
;
top
:
-5px
;
cursor
:
ne-resize
}
.imageLabel-imgdrop
i
:nth-of-type
(
3
)
{
right
:
-5px
;
bottom
:
-5px
;
cursor
:
se-resize
}
.imageLabel-imgdrop
i
:nth-of-type
(
4
)
{
left
:
-5px
;
bottom
:
-5px
;
cursor
:
sw-resize
}
.imageLabel-imgdrop
i
:nth-of-type
(
5
)
{
left
:
50%
;
top
:
-5px
;
margin-left
:
-5px
;
cursor
:
col-resize
}
.imageLabel-imgdrop
i
:nth-of-type
(
6
)
{
right
:
-5px
;
top
:
50%
;
margin-top
:
-5px
;
cursor
:
ew-resize
}
.imageLabel-imgdrop
i
:nth-of-type
(
7
)
{
left
:
50%
;
bottom
:
-5px
;
margin-left
:
-5px
;
cursor
:
col-resize
}
.imageLabel-imgdrop
i
:nth-of-type
(
8
)
{
left
:
-5px
;
top
:
50%
;
margin-top
:
-5px
;
cursor
:
ew-resize
}
.imageLabel-imgdrop.imageLabel-drop-edit
,
.imageLabel-imgdrop.imageLabel-drop-now
{
display
:
block
!important
;
background-color
:
transparent
!important
}
.imageLabel-imgdrop.imageLabel-drop-edit
.imageLabel-imgdrop-font
,
.imageLabel-imgdrop.imageLabel-drop-now
.imageLabel-imgdrop-font
{
opacity
:
0
}
.imageLabel-imgdrop.imageLabel-drop-edit
em
.imageLable-em
,
.imageLabel-imgdrop.imageLabel-drop-now
em
.imageLable-em
{
display
:
block
}
.imageLabel-imgdrop
em
.imageLable-em
{
pointer-events
:
none
}
.imageLabel-imgdrop.imageLabel-drop-edit
{
border
:
2px
solid
transparent
;
-o-border-image
:
url(../images/border.gif)
1
1
round
;
border-image
:
url(../images/border.gif)
1
1
round
}
.imageLabel-imgdrop.imageLabel-drop-has
{
background-color
:
rgba
(
255
,
0
,
0
,
.3
)
!important
}
.imageLabel-imgdrop.imageLabel-drop-has
.imageLabel-imgdrop-font
{
opacity
:
1
}
.imageLabel-imgdrop.imageLabel-drop-move
{
background-color
:
transparent
!important
}
.imageLabel-imgdrop.imageLabel-drop-move
.imageLabel-imgdrop-font
{
opacity
:
0
}
.imageLabel-imgdrop
.imageLabel-imgdrop-font
{
pointer-events
:
none
;
overflow
:
hidden
;
padding
:
2px
;
position
:
absolute
}
.imageLabel-imgdrop
.imageLabel-imgdrop-font
,
.imageLabel-input
{
width
:
100%
;
height
:
100%
;
left
:
0
;
top
:
0
;
display
:
-ms-flexbox
;
display
:
flex
;
-ms-flex-pack
:
center
;
justify-content
:
center
;
-ms-flex-align
:
center
;
align-items
:
center
}
.imageLabel-input
{
position
:
fixed
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
;
visibility
:
hidden
;
transition
:
all
.4s
;
opacity
:
0
;
z-index
:
999999
}
.imageLabel-input
.imageLabel-input-box
{
transform
:
scale
(
0
);
transition
:
all
.4s
}
.imageLabel-input.imageLabel-active
{
opacity
:
1
;
visibility
:
visible
}
.imageLabel-input.imageLabel-active
.imageLabel-input-box
{
transform
:
scale
(
1
)}
.imageLabel-btn
{
padding
:
6px
10px
;
background-color
:
#333
;
color
:
#fff
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
;
border-radius
:
3px
;
cursor
:
pointer
;
text-align
:
center
;
display
:
inline-block
;
box-shadow
:
0
4px
5px
0
rgba
(
0
,
0
,
0
,
.06
),
0
1px
10px
0
rgba
(
0
,
0
,
0
,
.12
),
0
2px
4px
-1px
rgba
(
0
,
0
,
0
,
.3
)}
.imageLabel-btn
:active
{
opacity
:
.8
}
.imageLabel-loading-body
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
left
:
0
;
top
:
0
;
display
:
-ms-flexbox
;
display
:
flex
;
-ms-flex-pack
:
center
;
justify-content
:
center
;
-ms-flex-align
:
center
;
align-items
:
center
}
.imageLabel-loading
{
width
:
50px
;
height
:
50px
;
border-radius
:
50%
;
border
:
2px
solid
#fff
;
border-right-color
:
hsla
(
0
,
0%
,
100%
,
.2
);
animation
:
imageLabelLoading
1s
infinite
linear
}
@keyframes
imageLabelLoading
{
form
{
transform
:
rotate
(
0deg
)}
to
{
transform
:
rotate
(
1turn
)}}
\ No newline at end of file
src/main/webapp/resources/assets/js/imageLabel/jquery.imageLabel.min.js
0 → 100644
View file @
621b2551
"use strict"
;
function
imageLabel
(
e
){
function
a
(){
function
e
(){
var
e
=
$
(
".imageLabel-imgdrop"
),
a
=
[];
e
.
each
(
function
(
e
,
i
){
var
n
=
$
(
i
).
width
()
*
$
(
i
).
height
();
a
.
push
(
n
)}),
e
.
each
(
function
(
e
,
i
){
var
n
=
$
(
i
),
t
=
n
.
width
()
*
n
.
height
(),
l
=
0
;
$
.
each
(
a
,
function
(
e
,
a
){
t
<=
a
&&
l
++
}),
n
.
css
({
"z-index"
:
l
})})}
function
a
(){
var
e
=
$
(
".imageLabel-img"
),
a
=
$
(
".imageLabel-jisuan"
),
i
=
e
[
0
].
naturalWidth
,
n
=
e
[
0
].
naturalHeight
,
t
=
e
.
parents
(
".imageLabel-img-body"
).
width
(),
l
=
e
.
parents
(
".imageLabel-img-body"
).
height
();
i
/
n
>
t
/
l
?
a
.
css
({
width
:
"100%"
,
height
:
n
/
i
*
t
}):
a
.
css
({
height
:
"100%"
,
width
:
i
/
n
*
l
})}
var
t
,
s
,
o
,
d
,
c
,
g
,
m
,
r
=
$
(
".imageLabel-content"
),
b
=!
1
,
p
=!
1
,
v
=!
1
,
f
=
$
(
".imageLabel-drap-menu"
);
$
(
".imageLabel-content"
)[
0
].
oncontextmenu
=
function
(){
return
!
1
},
f
[
0
].
oncontextmenu
=
function
(){
return
!
1
},
$
(
"body"
).
click
(
function
(
e
){
f
.
hide
()}),
$
.
each
(
n
.
data
,
function
(
e
,
a
){
s
=
$
(
'<div class="imageLabel-imgdrop '
+
(
a
.
name
?
"imageLabel-drop-has"
:
""
)
+
'"><span class="imageLabel-imgdrop-font">'
+
(
a
.
name
||
""
)
+
'</span><div class="imageLable-i-s"></div></div>'
);
for
(
var
i
=
0
;
i
<
8
;
i
++
)
s
.
find
(
".imageLable-i-s"
).
append
(
'<i class="imageLable-i">'
);
if
(
n
.
shade
)
for
(
var
t
=
0
;
t
<
4
;
t
++
)
s
.
append
(
'<em class="imageLable-em">'
);
var
l
=
a
;
s
.
css
({
left
:
100
*
(
l
.
ex
-
l
.
x
>
0
?
l
.
x
:
l
.
ex
)
+
"%"
,
top
:
100
*
(
l
.
ey
-
l
.
y
>
0
?
l
.
y
:
l
.
ey
)
+
"%"
,
width
:
100
*
Math
.
abs
(
l
.
ex
-
l
.
x
)
+
"%"
,
height
:
100
*
Math
.
abs
(
l
.
ey
-
l
.
y
)
+
"%"
}).
attr
(
"data-json"
,
JSON
.
stringify
(
a
)),
r
.
append
(
s
)}),
e
(),
$
(
".imageLabel-content"
).
mousedown
(
function
(
e
){
if
(
d
=
e
.
button
,
2
!=
e
.
button
){
if
(
f
.
hide
(),
b
=!
0
,
r
=
$
(
this
),
t
=
{
x
:
r
.
offset
().
left
,
y
:
r
.
offset
().
top
,
cx
:
e
.
clientX
,
cy
:
e
.
clientY
,
w
:
r
.
width
(),
h
:
r
.
height
()},
o
=
{
x
:(
t
.
cx
-
t
.
x
)
/
t
.
w
,
y
:(
t
.
cy
-
t
.
y
)
/
t
.
h
,
ex
:
0
,
ey
:
0
},
$
(
e
.
target
).
hasClass
(
"imageLabel-imgdrop"
))
p
=!
0
,
s
=
$
(
e
.
target
),
c
=
JSON
.
parse
(
s
.
attr
(
"data-json"
)),
o
=
$
.
extend
({},
c
),
n
.
startArea
();
else
if
(
$
(
e
.
target
).
hasClass
(
"imageLable-i"
))
v
=!
0
,
g
=
$
(
e
.
target
),
s
=
$
(
e
.
target
).
parents
(
".imageLabel-imgdrop"
),
c
=
JSON
.
parse
(
s
.
attr
(
"data-json"
)),
o
=
$
.
extend
({},
c
);
else
{
m
=
(
new
Date
).
getTime
(),
p
=!
1
,
s
=
$
(
'<div class="imageLabel-imgdrop"><span class="imageLabel-imgdrop-font"></span><div class="imageLable-i-s"></div></div>'
);
for
(
var
a
=
0
;
a
<
8
;
a
++
)
s
.
find
(
".imageLable-i-s"
).
append
(
'<i class="imageLable-i">'
);
if
(
n
.
shade
)
for
(
var
i
=
0
;
i
<
4
;
i
++
)
s
.
append
(
'<em class="imageLable-em">'
);
s
.
addClass
(
"imageLabel-drop-edit"
).
appendTo
(
r
),
s
.
siblings
().
removeClass
(
"imageLabel-drop-edit"
)}
s
.
addClass
(
"imageLabel-drop-now"
),
n
.
only
&&
$
(
this
).
find
(
".imageLabel-imgdrop"
).
hide
()}
else
$
(
e
.
target
).
hasClass
(
"imageLabel-imgdrop"
)
&&
(
s
=
$
(
e
.
target
),
setTimeout
(
function
(){
f
.
css
({
left
:
e
.
clientX
,
top
:
e
.
clientY
}).
show
()},
0
))}),
$
(
".imageLabel-img-boxs"
).
mousemove
(
function
(
e
){
if
(
b
){
if
(
p
)
o
.
x
=
c
.
x
+
(
e
.
clientX
-
t
.
cx
)
/
t
.
w
,
o
.
ex
=
c
.
ex
+
(
e
.
clientX
-
t
.
cx
)
/
t
.
w
,
o
.
y
=
c
.
y
+
(
e
.
clientY
-
t
.
cy
)
/
t
.
h
,
o
.
ey
=
c
.
ey
+
(
e
.
clientY
-
t
.
cy
)
/
t
.
h
;
else
if
(
v
){
var
a
=
g
.
index
();
0
==
a
&&
(
o
.
x
=
c
.
x
+
(
e
.
clientX
-
t
.
cx
)
/
t
.
w
,
o
.
y
=
c
.
y
+
(
e
.
clientY
-
t
.
cy
)
/
t
.
h
),
1
==
a
&&
(
o
.
ex
=
c
.
ex
+
(
e
.
clientX
-
t
.
cx
)
/
t
.
w
,
o
.
y
=
c
.
y
+
(
e
.
clientY
-
t
.
cy
)
/
t
.
h
),
2
==
a
&&
(
o
.
ex
=
c
.
ex
+
(
e
.
clientX
-
t
.
cx
)
/
t
.
w
,
o
.
ey
=
c
.
ey
+
(
e
.
clientY
-
t
.
cy
)
/
t
.
h
),
3
==
a
&&
(
o
.
x
=
c
.
x
+
(
e
.
clientX
-
t
.
cx
)
/
t
.
w
,
o
.
ey
=
c
.
ey
+
(
e
.
clientY
-
t
.
cy
)
/
t
.
h
),
4
==
a
&&
(
o
.
y
=
c
.
y
+
(
e
.
clientY
-
t
.
cy
)
/
t
.
h
),
5
==
a
&&
(
o
.
ex
=
c
.
ex
+
(
e
.
clientX
-
t
.
cx
)
/
t
.
w
),
6
==
a
&&
(
o
.
ey
=
c
.
ey
+
(
e
.
clientY
-
t
.
cy
)
/
t
.
h
),
7
==
a
&&
(
o
.
x
=
c
.
x
+
(
e
.
clientX
-
t
.
cx
)
/
t
.
w
)}
else
o
.
ex
=
(
e
.
clientX
-
t
.
x
)
/
t
.
w
,
o
.
ey
=
(
e
.
clientY
-
t
.
y
)
/
t
.
h
;
o
.
y
<
0
&&
(
o
.
y
=
0
),
o
.
x
<
0
&&
(
o
.
x
=
0
),
o
.
ey
<
0
&&
(
o
.
ey
=
0
),
o
.
ex
<
0
&&
(
o
.
ex
=
0
),
o
.
ey
>
1
&&
(
o
.
ey
=
1
),
o
.
ex
>
1
&&
(
o
.
ex
=
1
),
o
.
y
>
1
&&
(
o
.
y
=
1
),
o
.
x
>
1
&&
(
o
.
x
=
1
),
s
.
css
({
left
:
100
*
(
o
.
ex
-
o
.
x
>
0
?
o
.
x
:
o
.
ex
)
+
"%"
,
top
:
100
*
(
o
.
ey
-
o
.
y
>
0
?
o
.
y
:
o
.
ey
)
+
"%"
,
width
:
100
*
Math
.
abs
(
o
.
ex
-
o
.
x
)
+
"%"
,
height
:
100
*
Math
.
abs
(
o
.
ey
-
o
.
y
)
+
"%"
}).
addClass
(
"imageLabel-drop-move"
)}}).
mouseup
(
function
(
a
){
if
(
b
){
var
i
=
{};
o
.
x
<
o
.
ex
?(
i
.
x
=
o
.
x
,
i
.
ex
=
o
.
ex
):(
i
.
x
=
o
.
ex
,
i
.
ex
=
o
.
x
),
o
.
y
<
o
.
ey
?(
i
.
y
=
o
.
y
,
i
.
ey
=
o
.
ey
):(
i
.
y
=
o
.
ey
,
i
.
ey
=
o
.
y
),
s
.
attr
(
"data-json"
,
JSON
.
stringify
(
$
.
extend
(
o
,
i
))),
Math
.
abs
(
a
.
clientX
-
t
.
cx
)
>
10
&&
Math
.
abs
(
a
.
clientY
-
t
.
cy
)
>
10
&&!
p
&&!
v
?(
n
.
editPop
&&
(
$
(
".imageLabel-input"
).
addClass
(
"imageLabel-active"
).
find
(
"input"
).
val
(
""
),
setTimeout
(
function
(){
$
(
".imageLabel-input"
).
find
(
"input"
).
focus
()[
0
].
setSelectionRange
(
-
1
,
-
1
)},
500
)),
n
.
edit
(
s
)):
p
||
v
||
s
.
remove
(),
b
=!
1
,
p
=!
1
,
v
=!
1
,
e
(),
s
.
removeClass
(
"imageLabel-drop-now imageLabel-drop-move"
)}
n
.
only
&&
$
(
this
).
find
(
".imageLabel-imgdrop"
).
show
()});
var
y
=
$
(
".imageLabel-input"
),
u
=
y
.
find
(
"input"
);
y
.
find
(
".imageLabel-input-close"
).
click
(
function
(){
y
.
removeClass
(
"imageLabel-active"
)}),
y
.
find
(
".imageLabel-input-ok"
).
click
(
function
(){
s
.
find
(
".imageLabel-imgdrop-font"
).
html
(
u
.
val
());
var
e
=
JSON
.
parse
(
s
.
attr
(
"data-json"
));
e
.
name
=
u
.
val
(),
s
.
attr
(
"data-json"
,
JSON
.
stringify
(
e
)),
y
.
removeClass
(
"imageLabel-active"
),
u
.
val
()?
s
.
addClass
(
"imageLabel-drop-has"
):
s
.
removeClass
(
"imageLabel-drop-has"
)}),
$
(
".imageLabel-delete"
).
click
(
function
(){
s
.
remove
(),
f
.
hide
()}),
$
(
".imageLabel-edit"
).
click
(
function
(){
n
.
edit
(
s
),
s
.
addClass
(
"imageLabel-drop-edit"
).
siblings
().
removeClass
(
"imageLabel-drop-edit"
),
n
.
editPop
&&
(
y
.
addClass
(
"imageLabel-active"
).
find
(
"input"
).
val
(
s
.
find
(
".imageLabel-imgdrop-font"
).
html
()),
setTimeout
(
function
(){
y
.
find
(
"input"
).
focus
()[
0
].
setSelectionRange
(
-
1
,
-
1
)},
500
)),
f
.
hide
()}),
u
.
keydown
(
function
(
e
){
13
==
e
.
keyCode
&&
y
.
find
(
".imageLabel-input-ok"
).
click
()}),
$
(
window
).
keydown
(
function
(
e
){
27
==
e
.
keyCode
&&
y
.
hasClass
(
"imageLabel-active"
)
&&
y
.
removeClass
(
"imageLabel-active"
)}),
a
(),
$
(
window
).
resize
(
a
),
$
(
".imageLabel-closes"
).
click
(
function
(){
n
.
close
(
i
.
getData
())
&&
(
l
.
removeClass
(
"imageLabel-box-active"
),
setTimeout
(
function
(){
l
.
remove
()},
500
))}).
next
().
click
(
function
(){
n
.
confirm
(
i
.
getData
())
&&
l
.
removeClass
(
"imageLabel-box-active"
)})}
if
(
!
e
.
img
)
return
alert
(
"请填写图片地址"
),
!
1
;
var
i
=
{
getData
:
function
(){
var
e
=
[];
return
$
(
".imageLabel-imgdrop"
).
each
(
function
(){
e
.
push
(
JSON
.
parse
(
$
(
this
).
attr
(
"data-json"
)))}),
e
},
clearArea
:
function
(){
$
(
".imageLabel-imgdrop"
).
remove
()},
close
:
function
(){
$
(
".imageLabel-closes"
).
click
()}},
n
=
{
only
:
!
1
,
shade
:
!
0
,
editPop
:
!
0
,
close
:
function
(){
return
!
0
},
edit
:
function
(){},
confirm
:
function
(){
return
!
0
},
startArea
:
function
(){},
clickArea
:
function
(){},
data
:[]};
n
=
$
.
extend
(
n
,
e
),
$
(
".imageLabel-box"
).
remove
();
var
t
=
'<div class="imageLabel-box">
\
n <div class="imageLabel">
\
n <div class="imageLabel-img-boxs">
\
n <span class="imageLabel-img-body">
\
n <div class="imageLabel-loading-body">
\
n <div class="imageLabel-loading"></div>
\
n </div>
\
n <div class="imageLabel-jisuan" style="position: relative;overflow:hidden;">
\
n <img src="'
+
e
.
img
+
'" alt="" style=
\'
position: absolute;with:100%;height:100%;
\'
class="imageLabel-img">
\
n <div class="imageLabel-content">
\
n
\
n </div>
\
n </div>
\
n </span>
\
n <ul class="imageLabel-drap-menu">
\
n <div style=
\'
overflow: hidden;
\'
>
\
n <div style="cursor: pointer;" class="imageLabel-delete btns">删除</div>
\
n <div style="cursor: pointer;" class="imageLabel-edit btns">编辑</div>
\
n </div>
\
n
\
x3c!--
\
n
\
n <li style=
\'
padding:10px;
\'
>
\
n <i></i>红色
\
n </li>
\
n <li style=
\'
padding:10px;
\'
>
\
n <i></i>红色
\
n </li>
\
n --
\
x3e
\
n </ul>
\
n </div>
\
n <div class="imageLabel-buttons">
\
n <div class="imageLabel-btn imageLabel-closes">关闭</div>
\
n <div class="imageLabel-btn">确定</div>
\
n </div>
\
n <div class="imageLabel-input" style=
\'
background-color:rgba(255,255,255,0.3);
\'
>
\
n <div class="imageLabel-input-box" style=
\'
width:250px;
\'
>
\
n <div style=
\'
background-color: #333;
\'
>
\
n <div style=
\'
color:#fff;overflow:hidden;line-height: 40px;
\'
>
\
n <span style=
\'
float: left;margin-left:20px;
\'
>编辑内容</span>
\
n <span class="imageLabel-input-close" style=
\'
float:right;margin-right:20px;cursor: pointer;
\'
>X</span>
\
n </div>
\
n </div>
\
n
\
n <div style=
\'
background: #fff;padding:20px;
\'
>
\
n <input type="text" value=
\'\'
max=
\'
10
\'
style=
\'
width:100%;padding:5px;
\'
>
\
n <div style=
\'
margin-top:20px;overflow:hidden;
\'
>
\
n <div class="imageLabel-input-close imageLabel-btn" style=
\'
float: left;width:90px;background-color: #959595;
\'
>取消</div>
\
n <div class="imageLabel-input-ok imageLabel-btn" style=
\'
float: right;width:90px;
\'
>确定</div>
\
n </div>
\
n </div>
\
n </div>
\
n </div>
\
n </div>
\
n</div>'
,
l
=
$
(
t
);
return
l
.
find
(
".imageLabel-img"
).
one
(
"load"
,
function
(){
$
(
this
).
addClass
(
"imageLabel-img-active"
),
$
(
".imageLabel-loading-body"
).
hide
(),
a
()}),
l
.
appendTo
(
"body"
),
setTimeout
(
function
(){
l
.
addClass
(
"imageLabel-box-active"
)},
0
),
i
}
\ No newline at end of file
src/main/webapp/resources/js/activity/activity.js
View file @
621b2551
...
@@ -92,7 +92,52 @@ $(document).ready(function(){
...
@@ -92,7 +92,52 @@ $(document).ready(function(){
var
activity
=
{
var
activity
=
{
remove
:
function
(
count
,
id
){
if
(
count
!=
0
){
bootbox
.
dialog
({
message
:
"活动已有报名,不能删除"
,
buttons
:{
"success"
:{
"label"
:
"确定"
,
"className"
:
"btn-sm btn-primary"
,
"callback"
:
function
()
{
}
}
}
});
}
else
{
bootbox
.
confirm
({
buttons
:
{
cancel
:
{
label
:
'取消'
,
className
:
'btn-default'
},
confirm
:
{
label
:
'确认'
,
className
:
'btn-myStyle'
}
},
message
:
'请确认是否删除?'
,
callback
:
function
(
result
)
{
if
(
result
)
{
$
.
ajax
({
type
:
'GET'
,
url
:
webPath
+
'/api/activity/del?id='
+
id
,
dataType
:
'json'
,
success
:
function
(
data
){
window
.
location
.
reload
();
}
})
}
else
{
}
},
title
:
"删除活动"
});
}
},
save
:
function
(
form
){
save
:
function
(
form
){
if
(
isSubmit
){
if
(
isSubmit
){
isSubmit
=
false
;
isSubmit
=
false
;
...
...
src/main/webapp/resources/js/activity/activityreg.js
0 → 100644
View file @
621b2551
$
(
document
).
ready
(
function
(){
$
(
"#searchBtn"
).
bind
(
"click"
,
function
(){
reg
.
search
();
});
})
var
reg
=
{
remove
:
function
(
id
,
param
){
bootbox
.
confirm
({
buttons
:
{
cancel
:
{
label
:
'取消'
,
className
:
'btn-default'
},
confirm
:
{
label
:
'确认'
,
className
:
'btn-myStyle'
}
},
message
:
'请确认是否删除?'
,
callback
:
function
(
result
)
{
if
(
result
)
{
$
.
ajax
({
type
:
'GET'
,
url
:
webPath
+
'/api/activity/reg/del?'
+
param
+
'='
+
id
,
dataType
:
'json'
,
success
:
function
(
data
){
window
.
location
.
reload
();
}
})
}
else
{
}
},
title
:
"删除报名人"
});
},
search
:
function
(){
var
activityId
=
$
(
"#activityId"
).
val
();
var
searchStr
=
$
(
"#searchStr"
).
val
();
var
url
=
webPath
+
"/activity/reg/list"
;
if
(
activityId
!=
""
||
searchStr
!=
""
){
var
param
=
"?"
if
(
activityId
!=
""
){
param
=
param
+
"activityId="
+
activityId
;
}
if
(
searchStr
!=
""
){
if
(
param
==
"?"
){
param
=
param
+
"searchStr="
+
searchStr
;
}
else
{
param
=
param
+
"&searchStr="
+
searchStr
;
}
}
url
=
url
+
param
;
}
window
.
location
.
href
=
url
;
}
}
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