Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
Project
Project
Details
Activity
Releases
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
micro_app
gk
Commits
5622bf4a
Commit
5622bf4a
authored
May 16, 2025
by
daniel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf(richText+module): 改造自主服务模块
parent
1d656452
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
2171 additions
and
2441 deletions
+2171
-2441
readme.md
readme.md
+4
-0
RichTextBean.java
...ava/com/dlbridge/jadp/plugins/cmpt/bean/RichTextBean.java
+2
-1
CmptMapper.xml
.../com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
+10
-1
JoyfulCheckinRecordsMapper.java
...p/plugins/cmpt/dao/mapper/JoyfulCheckinRecordsMapper.java
+0
-18
JoyfulCheckinRecordsMapper.xml
...dp/plugins/cmpt/dao/mapper/JoyfulCheckinRecordsMapper.xml
+0
-31
JoyfulRichTextMapper.xml
...dge/jadp/plugins/cmpt/dao/mapper/JoyfulRichTextMapper.xml
+0
-129
ModuleMapper.java
...m/dlbridge/jadp/plugins/cmpt/dao/mapper/ModuleMapper.java
+1
-1
ModuleMapper.xml
...om/dlbridge/jadp/plugins/cmpt/dao/mapper/ModuleMapper.xml
+6
-9
RichTextMapper.java
...dlbridge/jadp/plugins/cmpt/dao/mapper/RichTextMapper.java
+1
-1
RichTextMapper.xml
.../dlbridge/jadp/plugins/cmpt/dao/mapper/RichTextMapper.xml
+17
-7
Cmpt.java
...n/java/com/dlbridge/jadp/plugins/cmpt/dao/model/Cmpt.java
+25
-0
JoyfulCheckinRecords.java
...dge/jadp/plugins/cmpt/dao/model/JoyfulCheckinRecords.java
+0
-11
Module.java
...java/com/dlbridge/jadp/plugins/cmpt/dao/model/Module.java
+5
-0
RichText.java
...va/com/dlbridge/jadp/plugins/cmpt/dao/model/RichText.java
+7
-3
CmptService.java
...a/com/dlbridge/jadp/plugins/cmpt/service/CmptService.java
+99
-48
JoyfulCheckinRecordsService.java
...adp/plugins/cmpt/service/JoyfulCheckinRecordsService.java
+0
-44
ModuleService.java
...com/dlbridge/jadp/plugins/cmpt/service/ModuleService.java
+2
-2
RichTextService.java
...m/dlbridge/jadp/plugins/cmpt/service/RichTextService.java
+1
-1
JoyfulRoadController.java
.../dlbridge/jadp/plugins/cmpt/web/JoyfulRoadController.java
+0
-296
MicroApiController.java
...om/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
+22
-0
ModuleController.java
.../com/dlbridge/jadp/plugins/cmpt/web/ModuleController.java
+9
-21
ModuleSettingController.java
...bridge/jadp/plugins/cmpt/web/ModuleSettingController.java
+1
-1
ServiceSettingController.java
...ridge/jadp/plugins/cmpt/web/ServiceSettingController.java
+1
-1
module.jsp
src/main/webapp/WEB-INF/views/cmpt/module.jsp
+581
-583
service.jsp
src/main/webapp/WEB-INF/views/cmpt/service.jsp
+937
-841
menu.jsp
src/main/webapp/WEB-INF/views/common/menu.jsp
+440
-391
No files found.
readme.md
0 → 100644
View file @
5622bf4a
## 打包
```
bash
mvn clean package
-DskipTests
```
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/RichTextBean.java
View file @
5622bf4a
...
...
@@ -7,7 +7,8 @@ public class RichTextBean {
// 服务类型(3:特色民宿:4:旅游景点,5:特色餐饮 6:当地特产 7: 应急避险 8: 医疗点位 9:运动产品)
private
String
type
;
// 点位类型 (1:打卡点,2:服务驿站,3:民宿:4:景点,5:餐饮)
private
String
category
;
// 分类id
private
Integer
moduleId
;
private
String
title
;
private
String
lng
;
// 赛事id
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
View file @
5622bf4a
...
...
@@ -155,6 +155,11 @@
a.cmpt_name as cmptName,
a.logo,
date_format(start_time,'%Y-%m-%d') startTime,
date_format(end_time,'%Y-%m-%d') endTime,
date_format(a.start_time,'%Y-%m-%d %H:%i:%s') as startTimeStr,
date_format(a.end_time,'%Y-%m-%d %H:%i:%s') as endTimeStr,
date_format(c.openTime,'%Y-%m-%d %H:%i:%s') as openTime,
date_format(c.deadLine,'%Y-%m-%d %H:%i:%s') as deadLine,
a.bg_color as cmptbgColor,
a.create_by AS "createBy",
a.create_date AS "createDate",
...
...
@@ -251,7 +256,11 @@
<select
id=
"getCmptFromEnroll"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.Cmpt"
>
select cmptName,date_format(startTime,'%Y-%m-%d %H:%i:%s') startTime,
date_format(ifnull(endTime,now()),'%Y-%m-%d %H:%i:%s') endTime,type cmptType
date_format(ifnull(endTime,now()),'%Y-%m-%d %H:%i:%s') endTime,type as cmptType,
b.city as city,
b.province as province,
b.area as area,
b.location as location
from common.neucmpt a inner join raceenroll.competition b on a.gcmptid = b.cmptid
where a.gtcmptid=#{cmptid}
</select>
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/JoyfulCheckinRecordsMapper.java
deleted
100644 → 0
View file @
1d656452
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
dao
.
mapper
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.JoyfulCheckinRecords
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 活动签到打卡记录
*
* @author LI
*/
public
interface
JoyfulCheckinRecordsMapper
{
int
insJoyfulCheckinRecords
(
JoyfulCheckinRecords
joyfulCheckinRecords
);
List
<
JoyfulCheckinRecords
>
getJoyfulCheckinRecordsList
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"offset"
)
int
offset
,
@Param
(
"pageCount"
)
int
pageCount
);
}
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/JoyfulCheckinRecordsMapper.xml
deleted
100644 → 0
View file @
1d656452
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.dlbridge.jadp.plugins.cmpt.dao.mapper.JoyfulCheckinRecordsMapper"
>
<insert
id=
"insJoyfulCheckinRecords"
>
INSERT INTO gksite.joyful_checkin_records (
userId
,activity_id
,checkin_time
) VALUES (
#{userId}
,#{activityId}
,now()
)
</insert>
<select
id=
"getJoyfulCheckinRecordsList"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.JoyfulCheckinRecords"
>
SELECT
t2.title
,DATE_FORMAT(t1.checkin_time,'%Y/%m/%d %H:%i:%s') AS checkinTime
FROM
gksite.joyful_checkin_records t1
INNER JOIN gksite.joyful_rich_text t2
ON t1.activity_id = t2.id
AND t2.del_flg = '0'
WHERE
t1.userId = #{userId}
ORDER BY t1.checkin_time DESC
LIMIT #{offset}, #{pageCount}
</select>
</mapper>
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/JoyfulRichTextMapper.xml
deleted
100644 → 0
View file @
1d656452
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.dlbridge.jadp.plugins.cmpt.dao.mapper.JoyfulRichTextMapper"
>
<insert
id=
"insJoyfulRichText"
>
INSERT INTO gksite.joyful_rich_text(
userId
,type
,category
,title
,address
,lng
,lat
,content
,img_url
,remark1
,remark2
,remark3
,remark4
,status
,del_flg
,create_time
,create_user
) VALUES (
#{userId}
,#{type}
,#{category}
,#{title}
,#{address}
,#{lng}
,#{lat}
,#{content}
,#{imgUrl}
,#{remark1}
,#{remark2}
,#{remark3}
,#{remark4}
,#{status}
,'0'
,now()
,#{userId}
)
</insert>
<update
id=
"updJoyfulRichText"
>
UPDATE
gksite.joyful_rich_text
SET
userId = #{userId}
,type = #{type}
,category = #{category}
,title = #{title}
,address = #{address}
,lng = #{lng}
,lat = #{lat}
,content = #{content}
,img_url = #{imgUrl}
,remark1 = #{remark1}
,remark2 = #{remark2}
,remark3 = #{remark3}
,remark4 = #{remark4}
,status = #{status}
,update_time = now()
,update_user = #{userId}
WHERE
id = #{id}
</update>
<update
id=
"delJoyfulRichText"
>
UPDATE
gksite.joyful_rich_text
SET
del_flg = '1'
,update_time = now()
,update_user = #{userId}
WHERE
id = #{id}
</update>
<select
id=
"getJoyfulRichTextById"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.JoyfulRichText"
>
SELECT id
, userId
, type
, title
, address
, lng
, lat
, content
, img_url AS imgUrl
, remark1
, remark2
, remark3
, remark4
, status
, category
FROM gksite.joyful_rich_text
WHERE id = #{id}
</select>
<select
id=
"getJoyfulRichTextList"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.JoyfulRichText"
>
SELECT
id
,title
,address
,lng
,lat
,img_url AS imgUrl
,remark1
,remark2
,remark3
,remark4
,type
,status
,category
FROM
gksite.joyful_rich_text
WHERE
del_flg = '0'
<if
test=
"type != null and type != ''"
>
AND type = #{type}
</if>
<if
test=
"title != null and title != ''"
>
AND title like concat('%',#{title},'%')
</if>
<if
test=
"category != null and category != ''"
>
AND FIND_IN_SET(#{category}, category)
</if>
</select>
</mapper>
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/ModuleMapper.java
View file @
5622bf4a
...
...
@@ -13,7 +13,7 @@ public interface ModuleMapper {
int
delete
(
Module
module
);
List
<
Module
>
getList
(
@Param
(
"status"
)
Integer
status
);
List
<
Module
>
getList
(
@Param
(
"
cmptId"
)
Integer
cmptId
,
@Param
(
"
status"
)
Integer
status
);
int
update
(
Module
module
);
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/ModuleMapper.xml
View file @
5622bf4a
...
...
@@ -4,13 +4,10 @@
<insert
id=
"add"
>
INSERT INTO gk_module (
icon, name, sort, path, is_deleted, status, create_time, update_time
) VALUES (
#{icon}, #{name}, #{sort}, #{path}, #{isDeleted}, #{status}, NOW(), NOW()
)
icon, name, sort, path, is_deleted, status, create_time, update_time,cmpt_id
) VALUES (#{icon}, #{name}, #{sort}, #{path}, #{isDeleted}, #{status}, NOW(), NOW(),#{cmptId})
</insert>
<update
id=
"delete"
>
UPDATE gk_module
SET is_deleted = true
...
...
@@ -18,21 +15,21 @@
</update>
<select
id=
"getList"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.Module"
>
SELECT id, icon, name,path, sort, is_deleted AS isDeleted, status, create_time AS createTime, update_time AS updateTime
SELECT id, icon, name,path, sort, is_deleted AS isDeleted, status,
cmpt_id AS cmptId,
create_time AS createTime, update_time AS updateTime
FROM gk_module
WHERE is_deleted = 0
WHERE is_deleted = 0
AND cmpt_id = #{cmptId}
<if
test=
"status!= null"
>
AND status = #{status}
</if>
ORDER BY sort ASC
</select>
<select
id=
"getById"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.Module"
>
SELECT id, icon, name,path, sort, is_deleted AS isDeleted, status, create_time AS createTime, update_time AS updateTime
SELECT id, icon, name,path, sort, is_deleted AS isDeleted, status,
cmpt_id AS cmptId,
create_time AS createTime, update_time AS updateTime
FROM gk_module
WHERE id = #{id} AND is_deleted = 0
</select>
<select
id=
"getByName"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.Module"
>
SELECT id, icon, name,path, sort, is_deleted AS isDeleted, status, create_time AS createTime, update_time AS updateTime
SELECT id, icon, name,path, sort, is_deleted AS isDeleted,
cmpt_id AS cmptId,
status, create_time AS createTime, update_time AS updateTime
FROM gk_module
WHERE name = #{name} AND is_deleted = 0
</select>
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/RichTextMapper.java
View file @
5622bf4a
...
...
@@ -20,5 +20,5 @@ public interface RichTextMapper {
List
<
RichText
>
getById
(
@Param
(
"id"
)
String
id
);
List
<
RichText
>
getPage
(
@Param
(
"type"
)
String
type
,
@Param
(
"title"
)
String
title
,
@Param
(
"
category"
)
String
category
,
@Param
(
"cmptId"
)
Integer
cmptId
,
@Param
(
"page"
)
Integer
page
,
@Param
(
"pageSize"
)
Integer
pageSize
);
List
<
RichText
>
getPage
(
@Param
(
"type"
)
String
type
,
@Param
(
"title"
)
String
title
,
@Param
(
"
moduleId"
)
Integer
category
,
@Param
(
"cmptId"
)
Integer
cmptId
,
@Param
(
"page"
)
Integer
page
,
@Param
(
"pageSize"
)
Integer
pageSize
);
}
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/RichTextMapper.xml
View file @
5622bf4a
...
...
@@ -5,7 +5,9 @@
<insert
id=
"add"
>
INSERT INTO gksite.gk_rich_text( userId
, type
, category
, path
, app_id
, module_id
, title
, address
, lng
...
...
@@ -23,7 +25,9 @@
, cmpt_id)
VALUES ( #{userId}
, #{type}
, #{category}
, #{path}
, #{appId}
, #{moduleId}
, #{title}
, #{address}
, #{lng}
...
...
@@ -47,7 +51,9 @@
SET
userId = #{userId}
,type = #{type}
,category = #{category}
,app_id = #{appId}
,path = #{path}
,module_id = #{moduleId}
,title = #{title}
,address = #{address}
,lng = #{lng}
...
...
@@ -81,6 +87,8 @@
SELECT id
, userId
, cmpt_id AS cmptId
, app_id AS appId
, path
, type
, title
, address
...
...
@@ -93,7 +101,7 @@
, remark3
, remark4
, status
,
category
,
module_id AS moduleId
FROM gksite.gk_rich_text
WHERE id = #{id}
</select>
...
...
@@ -103,6 +111,8 @@
id
,title
,address
,app_id AS appId
,path
,lng
,lat
,img_url AS imgUrl
...
...
@@ -112,7 +122,7 @@
,remark4
,type
,status
,
category
,
module_id AS moduleId
FROM
gksite.gk_rich_text
WHERE
...
...
@@ -126,8 +136,8 @@
<if
test=
"title != null and title != ''"
>
AND title like concat('%',#{title},'%')
</if>
<if
test=
"
category != null and category
!= ''"
>
AND FIND_IN_SET(#{
category}, category
)
<if
test=
"
moduleId != null and moduleId
!= ''"
>
AND FIND_IN_SET(#{
moduleId}, module_id
)
</if>
LIMIT #{pageSize} OFFSET #{page}
</select>
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/Cmpt.java
View file @
5622bf4a
...
...
@@ -33,6 +33,26 @@ public class Cmpt extends JaapRecord<Cmpt> {
private
String
startTime
;
@ApiModelProperty
(
value
=
"赛事结束时间"
,
notes
=
"赛事结束时间"
)
private
String
endTime
;
@ApiModelProperty
(
value
=
"赛事开始时间"
,
notes
=
"赛事开始时间"
)
private
String
startTimeStr
;
@ApiModelProperty
(
value
=
"赛事结束时间"
,
notes
=
"赛事结束时间"
)
private
String
endTimeStr
;
@ApiModelProperty
(
value
=
"报名开始时间"
,
notes
=
"报名开始时间"
)
private
String
openTime
;
@ApiModelProperty
(
value
=
"报名结束时间"
,
notes
=
"报名结束时间"
)
private
String
deadLine
;
@ApiModelProperty
(
value
=
"城市"
,
notes
=
"城市"
)
private
String
city
;
@ApiModelProperty
(
value
=
"省份"
,
notes
=
"省份"
)
private
String
province
;
@ApiModelProperty
(
value
=
"区域"
,
notes
=
"区域"
)
private
String
area
;
@ApiModelProperty
(
value
=
"详细地址"
,
notes
=
"详细地址"
)
private
String
location
;
private
boolean
isDayRank
;
private
boolean
isWeekRank
;
...
...
@@ -47,6 +67,11 @@ public class Cmpt extends JaapRecord<Cmpt> {
private
int
cmptStatus
;
@ApiModelProperty
(
value
=
"报名状态"
,
notes
=
"报名状态"
)
private
int
enrollStatus
;
@ApiModelProperty
(
value
=
"比赛状态"
,
notes
=
"比赛状态"
)
private
int
openStatus
;
private
int
auditStatus
;
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/JoyfulCheckinRecords.java
deleted
100644 → 0
View file @
1d656452
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
dao
.
model
;
import
lombok.Data
;
@Data
public
class
JoyfulCheckinRecords
{
private
String
userId
;
private
String
activityId
;
private
String
checkinTime
;
private
String
title
;
}
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/Module.java
View file @
5622bf4a
...
...
@@ -7,8 +7,12 @@ import java.sql.Timestamp;
@Data
public
class
Module
{
private
Long
id
;
//赛事id
private
Long
cmptId
;
// 图标URL
private
String
icon
;
...
...
@@ -34,5 +38,6 @@ public class Module {
// 更新时间
//@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private
Timestamp
updateTime
;
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/RichText.java
View file @
5622bf4a
...
...
@@ -7,10 +7,10 @@ public class RichText {
private
Integer
id
;
private
Integer
userId
;
private
Integer
cmptId
;
//
服务类型(3:特色民宿:4:旅游景点,5:特色餐饮 6:当地特产 7: 应急避险 8: 医疗点位 9:运动产品
)
//
类型配置(1 网页 2 小程序(appId,path) 3 短连接(#小程序://) 4 页面(小程序) 5文档word,pdf 6 图片 png 7 定位
)
private
Integer
type
;
//
点位类型 (1:打卡点,2:服务驿站,3:民宿:4:景点,5:餐饮)
private
String
category
;
//
分类id
private
Integer
moduleId
;
private
String
title
;
private
String
address
;
private
Double
lng
;
...
...
@@ -23,4 +23,8 @@ public class RichText {
private
String
remark4
;
private
Integer
status
;
private
Integer
delFlg
;
// appId
private
String
appId
;
// 小程序路径/文件地址/图片地址
private
String
path
;
}
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/CmptService.java
View file @
5622bf4a
...
...
@@ -14,6 +14,8 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -40,33 +42,32 @@ public class CmptService {
public
Cmpt
queryCmptBycmptId
(
Integer
cmptId
)
{
try
{
long
start
=
System
.
currentTimeMillis
();
Cmpt
cmpt
=
remoteService
.
getCmptByCmptId
(
cmptId
);
// log.info("耗时cmpt1:"+(System.currentTimeMillis()-start));
if
(
cmpt
==
null
)
{
if
(
cmpt
==
null
)
{
log
.
error
(
"not find related cmpt id : "
+
cmptId
);
return
new
Cmpt
().
setCmptId
(
cmptId
);
}
cmpt
.
setCmptId
(
cmptId
);
// log.info(cmpt);
Cmpt
localCmpt
=
cmptMapper
.
queryCmptBycmptId
(
cmptId
);
// log.info("耗时cmpt2:"+(System.currentTimeMillis()-start));
if
(
localCmpt
==
null
)
{
save
(
cmpt
);
// log.info("耗时cmpt3:"+(System.currentTimeMillis()-start));
return
cmptMapper
.
queryCmptBycmptId
(
cmptId
);
}
else
{
localCmpt
.
setCmptName
(
cmpt
.
getCmptName
());
localCmpt
.
setStartTime
(
cmpt
.
getStartTime
());
localCmpt
.
setEndTime
(
cmpt
.
getEndTime
());
localCmpt
.
setCmptType
(
cmpt
.
getCmptType
());
// by ggb 2025/05/09 设置城市、省份、区域、地址
localCmpt
.
setCity
(
cmpt
.
getCity
());
localCmpt
.
setProvince
(
cmpt
.
getProvince
());
localCmpt
.
setArea
(
cmpt
.
getArea
());
localCmpt
.
setLocation
(
cmpt
.
getLocation
());
localCmpt
.
setLogo
(
cmpt
.
getLogo
());
update
(
localCmpt
);
// log.info("耗时cmpt4:"+(System.currentTimeMillis()-start));
return
localCmpt
;
}
}
catch
(
Exception
ex
)
{
log
.
error
(
ex
.
getMessage
(),
ex
);
}
catch
(
Exception
ex
)
{
log
.
error
(
ex
.
getMessage
(),
ex
);
return
new
Cmpt
().
setCmptId
(
cmptId
);
}
}
...
...
@@ -92,21 +93,22 @@ public class CmptService {
/**
* 小程序绑定报名记录方法
* @param userId 账号ID
* @param phone 手机号
* @param cmptId 计时系统赛事ID
*
* @param userId 账号ID
* @param phone 手机号
* @param cmptId 计时系统赛事ID
* @param userMapId 官网报名记录ID
* @return
*/
public
EnrollInfo
bind
(
Integer
userId
,
String
phone
,
Integer
cmptId
,
Integer
userMapId
)
{
String
name
=
""
;
String
teamId
=
"-1"
;
if
(
userMapId
!=
null
&&
userMapId
>
0
)
{
if
(
userMapId
!=
null
&&
userMapId
>
0
)
{
// 用userMapId查报名记录
Map
<
String
,
String
>
enrollUser
=
remoteService
.
getEnrollUsersByUserMapId
(
userMapId
);
Map
<
String
,
String
>
enrollUser
=
remoteService
.
getEnrollUsersByUserMapId
(
userMapId
);
phone
=
enrollUser
.
get
(
"mobileNum"
);
name
=
enrollUser
.
get
(
"name"
);
if
(
enrollUser
.
containsKey
(
"teamId"
)
&&
StringUtils
.
isNotBlank
(
enrollUser
.
get
(
"teamId"
)))
{
if
(
enrollUser
.
containsKey
(
"teamId"
)
&&
StringUtils
.
isNotBlank
(
enrollUser
.
get
(
"teamId"
)))
{
teamId
=
enrollUser
.
get
(
"teamId"
);
}
}
...
...
@@ -114,7 +116,7 @@ public class CmptService {
EnrollInfo
info
=
getUserInfoByPhone
(
phone
,
cmptId
,
name
);
if
(
info
!=
null
)
{
// 找到报名信息
if
(
StringUtils
.
isNotBlank
(
teamId
))
{
if
(
StringUtils
.
isNotBlank
(
teamId
))
{
info
.
setTeamId
(
Integer
.
parseInt
(
teamId
));
}
UserCmpt
cmpt
=
queryUserCmpt
(
cmptId
,
userId
,
info
.
getMarkNo
());
...
...
@@ -127,9 +129,7 @@ public class CmptService {
info
.
setManualMarkNo
(
cmpt
.
getManualMarkNo
());
return
info
;
}
else
{
UserCmpt
userCmpt
=
new
UserCmpt
().
setCmptId
(
cmptId
)
.
setEnrollId
(
info
.
getMarkNo
()).
setUserId
(
userId
)
.
setStatus
(
1
).
setGTeamId
(
Integer
.
parseInt
(
teamId
)).
setUserMapId
(
userMapId
);
UserCmpt
userCmpt
=
new
UserCmpt
().
setCmptId
(
cmptId
).
setEnrollId
(
info
.
getMarkNo
()).
setUserId
(
userId
).
setStatus
(
1
).
setGTeamId
(
Integer
.
parseInt
(
teamId
)).
setUserMapId
(
userMapId
);
log
.
info
(
"插入绑定内容:"
+
userCmpt
);
saveUserCmpt
(
userCmpt
);
return
info
;
...
...
@@ -155,27 +155,78 @@ public class CmptService {
return
cmptMapper
.
queryUserCmptList
(
userId
);
}
public
Page
<
List
<
Cmpt
>>
queryCmpt
(
Pageable
page
,
Map
<
String
,
String
>
param
)
{
long
start
=
System
.
currentTimeMillis
();
public
Page
<
List
<
Cmpt
>>
queryCmpt
(
Pageable
page
,
Map
<
String
,
String
>
param
)
{
long
count
=
cmptMapper
.
countCount
(
param
);
// log.info("耗时1:"+(System.currentTimeMillis()-start));
List
<
Cmpt
>
list
=
cmptMapper
.
queryCmpt
(
page
,
param
);
// log.info("耗时2:"+(System.currentTimeMillis()-start));
list
.
forEach
(
cmpt
->
{
Object
o
=
valueOperations
.
get
(
"gk:view:"
+
cmpt
.
getCmptId
());
if
(
o
!=
null
)
{
if
(
o
!=
null
)
{
cmpt
.
setView
((
Integer
)
o
);
}
// log.info("耗时3:"+(System.currentTimeMillis()-start));
// by ggb 2025/05/09 判断是否是是在报名中
// 定义日期时间格式
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
LocalDateTime
now
=
LocalDateTime
.
now
();
if
(
cmpt
.
getOpenTime
()
!=
null
)
{
// 解析字符串为LocalDateTime
LocalDateTime
openTime
=
LocalDateTime
.
parse
(
cmpt
.
getOpenTime
(),
formatter
);
if
(
cmpt
.
getDeadLine
()
!=
null
)
{
LocalDateTime
deadLine
=
LocalDateTime
.
parse
(
cmpt
.
getDeadLine
(),
formatter
);
// 判断当前时间是否在两个时间之间
// 报名中
if
(
now
.
isAfter
(
openTime
)
&&
now
.
isBefore
(
deadLine
)){
cmpt
.
setEnrollStatus
(
1
);
}
// 报名结束
if
(
now
.
isAfter
(
deadLine
)){
cmpt
.
setEnrollStatus
(
2
);
}
}
else
{
// 报名中
if
(
now
.
isAfter
(
openTime
)){
cmpt
.
setEnrollStatus
(
1
);
}
}
// 报名未开始
if
(
now
.
isBefore
(
openTime
)){
cmpt
.
setEnrollStatus
(
0
);
}
}
// by ggb 2025/05/09 判断是否是是在比赛中
if
(
cmpt
.
getStartTimeStr
()
!=
null
)
{
// 解析字符串为LocalDateTime
LocalDateTime
startTime
=
LocalDateTime
.
parse
(
cmpt
.
getStartTimeStr
(),
formatter
);
if
(
cmpt
.
getEndTimeStr
()
!=
null
)
{
LocalDateTime
endTime
=
LocalDateTime
.
parse
(
cmpt
.
getEndTimeStr
(),
formatter
);
// 判断当前时间是否在两个时间之间
// 报名中
if
(
now
.
isAfter
(
startTime
)
&&
now
.
isBefore
(
endTime
)){
cmpt
.
setOpenStatus
(
1
);
}
// 报名结束
if
(
now
.
isAfter
(
endTime
)){
cmpt
.
setOpenStatus
(
2
);
}
}
else
{
// 报名中
if
(
now
.
isAfter
(
startTime
)){
cmpt
.
setOpenStatus
(
1
);
}
}
// 比赛未开始
if
(
now
.
isBefore
(
startTime
)){
cmpt
.
setOpenStatus
(
0
);
}
}
Object
countStr
=
valueOperations
.
get
(
"count:cmptid:"
+
cmpt
.
getCmptId
());
if
(
countStr
!=
null
)
{
if
(
countStr
!=
null
)
{
cmpt
.
setEnroll
(
Integer
.
valueOf
(
countStr
.
toString
()));
}
else
{
}
else
{
int
cmptEnrollCount
=
remoteService
.
getCmptEnrollCount
(
cmpt
.
getCmptId
());
cmpt
.
setEnroll
(
cmptEnrollCount
);
valueOperations
.
set
(
"count:cmptid:"
+
cmpt
.
getCmptId
(),
cmptEnrollCount
+
""
,
30
,
TimeUnit
.
MINUTES
);
// log.info("耗时4:"+(System.currentTimeMillis()-start));
valueOperations
.
set
(
"count:cmptid:"
+
cmpt
.
getCmptId
(),
cmptEnrollCount
+
""
,
30
,
TimeUnit
.
MINUTES
);
}
});
return
PageFactory
.
setContent
(
list
,
page
,
count
);
...
...
@@ -183,7 +234,7 @@ public class CmptService {
public
void
update
(
Cmpt
cmpt
)
{
// 不知道为什么要更新计时的赛事名称更新成null,注释掉 by linc 2023/04/04
// cmptMapper.updateGeerunnerCmptName(cmpt.getCmptId(),cmpt.getCmptName());
// cmptMapper.updateGeerunnerCmptName(cmpt.getCmptId(),cmpt.getCmptName());
cmptMapper
.
updateCmpt
(
cmpt
);
}
...
...
@@ -205,7 +256,7 @@ public class CmptService {
}
public
void
saveUser
(
RaceEnrollUser
user
)
{
cmptMapper
.
saveUser
(
user
);
cmptMapper
.
saveUser
(
user
);
}
public
void
updateNeuUser
(
NeuUser
user
)
{
...
...
@@ -221,32 +272,32 @@ public class CmptService {
}
public
int
getEnrollInfoCount
(
Integer
cmptId
,
String
phone
)
{
return
cmptMapper
.
getEnrollInfoCount
(
cmptId
,
phone
);
return
cmptMapper
.
getEnrollInfoCount
(
cmptId
,
phone
);
}
public
String
getPartnerId
(
Integer
cmptid
)
{
String
parnterId
=
cmptMapper
.
getPartnerId
(
cmptid
);
if
(
parnterId
==
null
)
{
return
cmptMapper
.
getDefaultPartnerId
(
cmptid
);
}
return
parnterId
;
String
parnterId
=
cmptMapper
.
getPartnerId
(
cmptid
);
if
(
parnterId
==
null
)
{
return
cmptMapper
.
getDefaultPartnerId
(
cmptid
);
}
return
parnterId
;
}
public
Partner
getPartnerById
(
String
parnter
)
{
return
cmptMapper
.
getParnterByParnterId
(
parnter
);
}
public
void
updateDayRank
(
int
cmptId
,
int
status
,
String
rankName
)
{
public
void
updateDayRank
(
int
cmptId
,
int
status
,
String
rankName
)
{
cmptMapper
.
updateDayRank
(
cmptId
,
status
,
rankName
);
}
public
boolean
isUploadProfile
(
Integer
cmptId
)
{
int
is
=
cmptMapper
.
isUploadProfile
(
cmptId
);
return
is
>
0
;
return
is
>
0
;
}
public
Map
<
String
,
String
>
getPhotoLocation
(
Integer
cmptId
,
Integer
roadId
)
{
return
cmptMapper
.
getPhotoLocation
(
cmptId
,
roadId
);
return
cmptMapper
.
getPhotoLocation
(
cmptId
,
roadId
);
}
public
Map
<
String
,
String
>
getAllStatistic
(
int
userId
)
{
...
...
@@ -259,7 +310,7 @@ public class CmptService {
public
EnrollInfo
bindByManual
(
Integer
userId
,
String
markNo
,
int
cmptId
)
{
EnrollInfo
info
=
remoteService
.
getUserInfoByMarkNo
(
markNo
,
cmptId
);
log
.
info
(
"手动设置计时返回的用户信息:"
+
info
);
log
.
info
(
"手动设置计时返回的用户信息:"
+
info
);
if
(
info
!=
null
)
{
// 找到报名信息
UserCmpt
cmpt
=
queryUserCmpt
(
cmptId
,
userId
,
info
.
getMarkNo
());
if
(
cmpt
!=
null
&&
cmpt
.
getStatus
()
==
1
)
{
// 已经绑定
...
...
@@ -269,13 +320,11 @@ public class CmptService {
cmptMapper
.
updateUserCmptById
(
cmpt
);
return
info
;
}
else
{
UserCmpt
userCmpt
=
new
UserCmpt
().
setCmptId
(
cmptId
)
.
setEnrollId
(
info
.
getMarkNo
()).
setUserId
(
userId
)
.
setStatus
(
1
).
setManualMarkNo
(
info
.
getMarkNo
());
UserCmpt
userCmpt
=
new
UserCmpt
().
setCmptId
(
cmptId
).
setEnrollId
(
info
.
getMarkNo
()).
setUserId
(
userId
).
setStatus
(
1
).
setManualMarkNo
(
info
.
getMarkNo
());
info
.
setManualMarkNo
(
info
.
getMarkNo
());
saveUserCmpt
(
userCmpt
);
log
.
info
(
"手动设置 insert 插入绑定内容:"
+
userCmpt
);
log
.
info
(
"手动设置 insert 插入绑定内容:"
+
userCmpt
);
return
info
;
}
}
else
{
...
...
@@ -284,7 +333,7 @@ public class CmptService {
}
public
RoadUser
getEnrollUsersByPhone
(
Integer
cmptId
,
String
phone
)
{
return
cmptMapper
.
getEnrollUsersByPhone
(
cmptId
,
phone
);
return
cmptMapper
.
getEnrollUsersByPhone
(
cmptId
,
phone
);
}
public
List
<
Cmpt
>
queryMyCmpt
(
int
userId
)
{
...
...
@@ -305,6 +354,7 @@ public class CmptService {
/**
* 查询报名自定义项
*
* @param roadId
* @return
*/
...
...
@@ -317,6 +367,7 @@ public class CmptService {
/**
* 查询赛事分配的号码牌map
*
* @param cmptId
* @return
*/
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/JoyfulCheckinRecordsService.java
deleted
100644 → 0
View file @
1d656452
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
service
;
import
com.dlbridge.jadp.plugins.cmpt.dao.mapper.JoyfulCheckinRecordsMapper
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.JoyfulCheckinRecords
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 活动签到打卡记录
*
* @author LI
*/
@Service
public
class
JoyfulCheckinRecordsService
{
@Resource
JoyfulCheckinRecordsMapper
joyfulCheckinRecordsMapper
;
/**
* 活动签到打卡记录 追加
*
* @param joyfulCheckinRecords
* @return
*/
public
int
insJoyfulCheckinRecords
(
JoyfulCheckinRecords
joyfulCheckinRecords
)
{
return
joyfulCheckinRecordsMapper
.
insJoyfulCheckinRecords
(
joyfulCheckinRecords
);
}
/**
* 活动签到打卡记录 条件检索
*
* @param userId
* @param pageNo
* @param pageCount
* @return
*/
public
List
<
JoyfulCheckinRecords
>
getJoyfulCheckinRecordsList
(
String
userId
,
int
pageNo
,
int
pageCount
)
{
int
offset
=
PointService
.
getOffset
(
pageNo
,
pageCount
);
List
<
JoyfulCheckinRecords
>
joyfulCheckinRecordsList
=
joyfulCheckinRecordsMapper
.
getJoyfulCheckinRecordsList
(
userId
,
offset
,
pageCount
);
return
joyfulCheckinRecordsList
;
}
}
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/ModuleService.java
View file @
5622bf4a
...
...
@@ -21,8 +21,8 @@ public class ModuleService {
return
moduleMapper
.
delete
(
module
);
}
public
List
<
Module
>
listModules
(
Integer
status
)
{
return
moduleMapper
.
getList
(
status
);
public
List
<
Module
>
listModules
(
Integer
cmptId
,
Integer
status
)
{
return
moduleMapper
.
getList
(
cmptId
,
status
);
}
public
int
updateModuleStatus
(
Module
module
)
{
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/RichTextService.java
View file @
5622bf4a
...
...
@@ -82,7 +82,7 @@ public class RichTextService {
* @return
*/
public
List
<
RichText
>
getPage
(
RichTextBean
richTextBean
,
int
page
,
int
pageSize
)
{
List
<
RichText
>
RichTextList
=
richTextMapper
.
getPage
(
richTextBean
.
getType
(),
richTextBean
.
getTitle
(),
richTextBean
.
get
Category
(),
richTextBean
.
getCmptId
(),
page
,
pageSize
);
List
<
RichText
>
RichTextList
=
richTextMapper
.
getPage
(
richTextBean
.
getType
(),
richTextBean
.
getTitle
(),
richTextBean
.
get
ModuleId
(),
richTextBean
.
getCmptId
(),
page
,
pageSize
);
if
(
StringUtils
.
isNotBlank
(
richTextBean
.
getDistance
()))
{
RichTextList
=
RichTextList
.
stream
().
filter
(
model
->
this
.
notGtDistance
(
model
,
richTextBean
)).
collect
(
Collectors
.
toList
());
}
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/JoyfulRoadController.java
deleted
100644 → 0
View file @
1d656452
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
web
;
import
com.dlbridge.jadp.plugins.cmpt.bean.JoyfulRichTextBean
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.*
;
import
com.dlbridge.jadp.plugins.cmpt.service.*
;
import
com.neusoft.www.utils.web.Result
;
import
io.swagger.annotations.*
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.imageio.ImageIO
;
import
javax.servlet.http.HttpServletResponse
;
import
java.awt.image.BufferedImage
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.util.List
;
import
java.util.Map
;
@Log4j2
@RestController
@RequestMapping
(
value
=
"api/joyfulRoad"
)
@Api
(
value
=
"悦行冬奥路"
,
tags
=
"悦行冬奥路"
)
@ApiSort
(
10
)
public
class
JoyfulRoadController
{
@Resource
private
CmptSettingService
cmptSettingService
;
@Resource
private
JoyfulCheckinRecordsService
joyfulCheckinRecordsService
;
@Resource
private
JoyfulRichTextService
joyfulRichTextService
;
@Resource
private
PointService
pointService
;
@Resource
private
WeatherService
weatherService
;
@Resource
private
JoyfunModuleService
joyfunModuleService
;
@PostMapping
(
value
=
"/updCmptsettingName"
)
@ResponseBody
@ApiOperation
(
value
=
"模块名称修改"
,
notes
=
"模块名称修改"
,
tags
=
"模块名称修改"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"成功"
),
@ApiResponse
(
code
=
-
1
,
message
=
"失败"
,
response
=
ObjectUtils
.
Null
.
class
)})
@ApiImplicitParams
({
@ApiImplicitParam
(
value
=
"赛事ID"
,
name
=
"cmptId"
,
required
=
true
,
paramType
=
"body"
),
@ApiImplicitParam
(
value
=
"type"
,
name
=
"type"
,
required
=
true
,
paramType
=
"body"
),
@ApiImplicitParam
(
value
=
"活动名字"
,
name
=
"name"
,
required
=
true
,
paramType
=
"body"
),
@ApiImplicitParam
(
value
=
"更新者"
,
name
=
"updateById"
,
required
=
true
,
paramType
=
"body"
)})
public
Result
updCmptsettingName
(
@RequestBody
CmptSetting
cmptSetting
)
{
if
(
StringUtils
.
isBlank
(
cmptSetting
.
getName
()))
{
return
Result
.
fail
().
setMsg
(
"请输入模块名称!"
);
}
else
if
(
StringUtils
.
length
(
cmptSetting
.
getName
())
>
30
)
{
return
Result
.
fail
().
setMsg
(
"请输入的模块名称在30字以下!"
);
}
int
count
=
cmptSettingService
.
updCmptsettingName
(
cmptSetting
);
if
(
count
>
0
)
{
return
Result
.
success
().
setMsg
(
"更新成功!"
);
}
else
{
return
Result
.
fail
().
setMsg
(
"更新失败!"
);
}
}
@GetMapping
(
value
=
"/getWeatherNow/{areacode}"
)
@ApiOperation
(
value
=
"当前天气"
,
notes
=
"当前天气"
,
tags
=
"当前天气"
)
@ApiImplicitParam
(
value
=
"地区编码"
,
name
=
"areacode"
,
required
=
true
,
paramType
=
"path"
,
defaultValue
=
"101090301"
)
public
Result
<
Map
<
String
,
Object
>>
getWeatherNow
(
@PathVariable
(
"areacode"
)
String
areacode
)
{
Map
<
String
,
Object
>
map
=
weatherService
.
getWeatherNow
(
areacode
);
return
Result
.
success
().
setContent
(
map
);
}
@GetMapping
(
value
=
"/getWeatherDay/{areacode}/{days}"
)
@ApiOperation
(
value
=
"近期天气"
,
notes
=
"近期天气"
,
tags
=
"近期天气"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
value
=
"地区编码"
,
name
=
"areacode"
,
required
=
true
,
paramType
=
"path"
,
defaultValue
=
"101090301"
),
@ApiImplicitParam
(
value
=
"未来天数"
,
name
=
"days"
,
required
=
true
,
paramType
=
"path"
,
defaultValue
=
"3"
)})
public
Result
<
Map
<
String
,
Object
>>
getWeatherDay
(
@PathVariable
(
"areacode"
)
String
areacode
,
@PathVariable
(
"days"
)
String
days
)
{
Map
<
String
,
Object
>
map
=
weatherService
.
getWeatherDay
(
areacode
,
days
);
return
Result
.
success
().
setContent
(
map
);
}
@GetMapping
(
value
=
"/earnPointsInfo/{userId}/{pageNo}/{pageCount}"
)
@ApiOperation
(
value
=
"积分增加流水"
,
notes
=
"积分增加流水"
,
tags
=
"积分增加流水"
)
public
Result
<
UserPoint
>
earnPointsInfo
(
@PathVariable
(
"userId"
)
String
userId
,
@PathVariable
(
"pageNo"
)
int
pageNo
,
@PathVariable
(
"pageCount"
)
int
pageCount
)
{
UserPoint
userPoint
=
pointService
.
getUserPoint
(
userId
,
PointService
.
IS_NEGATIVE_0
,
pageNo
,
pageCount
);
if
(
userPoint
==
null
)
{
Result
.
fail
().
setMsg
(
"用户积分信息不存在!"
);
}
return
Result
.
success
().
setContent
(
userPoint
);
}
@GetMapping
(
value
=
"/redeemPointsInfo/{userId}/{pageNo}/{pageCount}"
)
@ApiOperation
(
value
=
"积分减少流水"
,
notes
=
"积分减少流水"
,
tags
=
"积分减少流水"
)
public
Result
<
UserPoint
>
redeemPointsInfo
(
@PathVariable
(
"userId"
)
String
userId
,
@PathVariable
(
"pageNo"
)
int
pageNo
,
@PathVariable
(
"pageCount"
)
int
pageCount
)
{
UserPoint
userPoint
=
pointService
.
getUserPoint
(
userId
,
PointService
.
IS_NEGATIVE_1
,
pageNo
,
pageCount
);
if
(
userPoint
==
null
)
{
Result
.
fail
().
setMsg
(
"用户积分信息不存在!"
);
}
return
Result
.
success
().
setContent
(
userPoint
);
}
@PostMapping
(
value
=
"/insJoyfulRichText"
)
@ApiOperation
(
value
=
"自助服务管理新增"
,
notes
=
"自助服务管理新增"
,
tags
=
"自助服务管理新增"
)
public
Result
insJoyfulRichText
(
@RequestBody
JoyfulRichText
joyfulRichText
)
{
int
result
=
joyfulRichTextService
.
insJoyfulRichText
(
joyfulRichText
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"新增失败!"
);
}
return
Result
.
success
().
setMsg
(
"新增成功。"
);
}
@PostMapping
(
value
=
"/updJoyfulRichText"
)
@ApiOperation
(
value
=
"自助服务管理修改"
,
notes
=
"自助服务管理修改"
,
tags
=
"自助服务管理修改"
)
public
Result
updJoyfulRichText
(
@RequestBody
JoyfulRichText
joyfulRichText
)
{
int
result
=
joyfulRichTextService
.
updJoyfulRichText
(
joyfulRichText
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"修改失败!"
);
}
return
Result
.
success
().
setMsg
(
"修改成功。"
);
}
@PostMapping
(
value
=
"/delJoyfulRichText"
)
@ApiOperation
(
value
=
"自助服务管理删除"
,
notes
=
"自助服务管理删除"
,
tags
=
"自助服务管理删除"
)
public
Result
delJoyfulRichText
(
@RequestBody
JoyfulRichText
joyfulRichText
)
{
int
result
=
joyfulRichTextService
.
delJoyfulRichText
(
joyfulRichText
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"删除失败!"
);
}
return
Result
.
success
().
setMsg
(
"删除成功。"
);
}
@GetMapping
(
value
=
"/getJoyfulRichText/{id}"
)
@ApiOperation
(
value
=
"自助服务管理主键检索"
,
notes
=
"自助服务管理主键检索"
,
tags
=
"自助服务管理主键检索"
)
public
Result
<
JoyfulRichText
>
getJoyfulRichText
(
@PathVariable
(
"id"
)
String
id
)
{
JoyfulRichText
joyfulRichText
=
joyfulRichTextService
.
getJoyfulRichText
(
id
);
if
(
joyfulRichText
==
null
)
{
return
Result
.
fail
().
setMsg
(
"数据不存在。"
);
}
return
Result
.
success
().
setContent
(
joyfulRichText
);
}
@PostMapping
(
value
=
"/getJoyfulRichTextList/{pageNo}/{pageCount}"
)
@ApiOperation
(
value
=
"自助服务管理条件检索"
,
notes
=
"自助服务管理条件检索"
,
tags
=
"自助服务管理条件检索"
)
public
Result
<
List
<
JoyfulRichText
>>
getJoyfulRichTextList
(
@RequestBody
JoyfulRichTextBean
joyfulRichTextBean
,
@PathVariable
(
"pageNo"
)
int
pageNo
,
@PathVariable
(
"pageCount"
)
int
pageCount
)
{
// TODO 先注释
//if (StringUtils.isNotBlank(joyfulRichTextBean.getType())) {
//} else if (StringUtils.isNotBlank(joyfulRichTextBean.getTitle())) {
//} else if (StringUtils.isNotBlank(joyfulRichTextBean.getDistance()) && StringUtils.isNotBlank(joyfulRichTextBean.getLng()) && StringUtils.isNotBlank(joyfulRichTextBean.getLat())) {
//} else {
// return Result.fail().setMsg("请输入检索条件。");
//}
List
<
JoyfulRichText
>
joyfulRichTextList
=
joyfulRichTextService
.
getJoyfulRichTextList
(
joyfulRichTextBean
);
int
fromIndex
=
pointService
.
getOffset
(
pageNo
,
pageCount
);
joyfulRichTextList
=
JoyfulRichTextService
.
subList
(
joyfulRichTextList
,
fromIndex
,
fromIndex
+
pageCount
);
return
Result
.
success
().
setContent
(
joyfulRichTextList
);
}
@GetMapping
(
value
=
"/getJoyfulRichText/qrCode/{id}"
)
@ApiOperation
(
value
=
"生成签到二维码"
,
notes
=
"生成签到二维码"
,
tags
=
"生成签到二维码"
)
public
void
getJoyfulRichTextQrCode
(
@PathVariable
(
"id"
)
int
id
,
HttpServletResponse
response
)
{
response
.
setContentType
(
"image/png"
);
response
.
setHeader
(
"Pragma"
,
"no-cache"
);
response
.
setHeader
(
"Cache-Control"
,
"no-cache"
);
response
.
setDateHeader
(
"Expires"
,
0
);
try
{
OutputStream
os
=
response
.
getOutputStream
();
BufferedImage
buffImg
=
joyfulRichTextService
.
getJoyfulRichTextQrCode
(
id
);
ImageIO
.
write
(
buffImg
,
"png"
,
os
);
}
catch
(
IOException
e
)
{
log
.
info
(
e
.
getMessage
(),
e
);
}
}
@PostMapping
(
value
=
"/insJoyfulCheckinRecords"
)
@ApiOperation
(
value
=
"活动签到打卡"
,
notes
=
"活动签到打卡"
,
tags
=
"活动签到打卡"
)
public
Result
insJoyfulCheckinRecords
(
@RequestBody
JoyfulCheckinRecords
joyfulCheckinRecords
){
List
<
JoyfulCheckinRecords
>
records
=
joyfulCheckinRecordsService
.
getJoyfulCheckinRecordsList
(
joyfulCheckinRecords
.
getUserId
(),
1
,
10
);
if
(
records
!=
null
&&
!
records
.
isEmpty
()){
return
Result
.
fail
().
setMsg
(
"已签到成功!"
);
}
int
result
=
joyfulCheckinRecordsService
.
insJoyfulCheckinRecords
(
joyfulCheckinRecords
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"新增失败!"
);
}
return
Result
.
success
().
setMsg
(
"新增成功。"
);
}
@GetMapping
(
value
=
"/getJoyfulCheckinRecordsList/{userId}/{pageNo}/{pageCount}"
)
@ApiOperation
(
value
=
"活动签到打卡记录"
,
notes
=
"活动签到打卡记录"
,
tags
=
"活动签到打卡记录"
)
public
Result
<
List
<
JoyfulCheckinRecords
>>
getJoyfulCheckinRecordsList
(
@PathVariable
(
"userId"
)
String
userId
,
@PathVariable
(
"pageNo"
)
int
pageNo
,
@PathVariable
(
"pageCount"
)
int
pageCount
){
List
<
JoyfulCheckinRecords
>
joyfulCheckinRecordsList
=
joyfulCheckinRecordsService
.
getJoyfulCheckinRecordsList
(
userId
,
pageNo
,
pageCount
);
return
Result
.
success
().
setContent
(
joyfulCheckinRecordsList
);
}
//-------------------------自助服务模块-----------------------
@PostMapping
(
"/addModule"
)
@ApiOperation
(
value
=
"新增服务模块"
,
notes
=
"新增一个新的服务模块"
)
public
Result
addModule
(
@RequestBody
JoyfunModule
joyfunModule
)
{
// 判断内容
if
(
StringUtils
.
isBlank
(
joyfunModule
.
getName
()))
{
return
Result
.
fail
().
setMsg
(
"服务模块名称不能为空!"
);
}
if
(
StringUtils
.
isBlank
(
joyfunModule
.
getIcon
()))
{
return
Result
.
fail
().
setMsg
(
"服务模块图标不能为空!"
);
}
if
(
StringUtils
.
isBlank
(
joyfunModule
.
getIcon
()))
{
return
Result
.
fail
().
setMsg
(
"服务模块图标不能为空!"
);
}
JoyfunModule
exitModule
=
joyfunModuleService
.
getModuleByName
(
joyfunModule
.
getName
());
if
(
exitModule
!=
null
){
return
Result
.
fail
().
setMsg
(
"服务模块已存在!"
);
}
int
result
=
joyfunModuleService
.
addModule
(
joyfunModule
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"新增失败!"
);
}
return
Result
.
success
().
setMsg
(
"新增成功。"
);
}
@PostMapping
(
"/updateModule"
)
@ApiOperation
(
value
=
"更新服务模块"
,
notes
=
"更新服务模块"
)
public
Result
updateModule
(
@RequestBody
JoyfunModule
joyfunModule
)
{
// 判断内容
if
(
StringUtils
.
isBlank
(
joyfunModule
.
getName
()))
{
return
Result
.
fail
().
setMsg
(
"服务模块名称不能为空!"
);
}
if
(
StringUtils
.
isBlank
(
joyfunModule
.
getIcon
()))
{
return
Result
.
fail
().
setMsg
(
"服务模块图标不能为空!"
);
}
if
(
StringUtils
.
isBlank
(
joyfunModule
.
getPath
()))
{
return
Result
.
fail
().
setMsg
(
"跳转路径不能为空!"
);
}
int
result
=
joyfunModuleService
.
updateModule
(
joyfunModule
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"更新失败!"
);
}
return
Result
.
success
().
setMsg
(
"更新成功。"
);
}
@PostMapping
(
"/delModule"
)
@ApiOperation
(
value
=
"逻辑删除服务模块"
,
notes
=
"逻辑删除一个服务模块"
)
public
Result
deleteModule
(
@RequestBody
JoyfunModule
joyfunModule
)
{
int
result
=
joyfunModuleService
.
deleteModule
(
joyfunModule
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"删除失败!"
);
}
return
Result
.
success
().
setMsg
(
"删除成功。"
);
}
@GetMapping
(
"/getModule/{id}"
)
@ApiOperation
(
value
=
"获取服务模块详情"
,
notes
=
"获取服务模块详情"
)
public
Result
getModule
(
@PathVariable
(
"id"
)
Integer
id
)
{
JoyfunModule
data
=
joyfunModuleService
.
getModuleById
(
id
);
return
Result
.
success
().
setContent
(
data
);
}
@GetMapping
(
"/modules"
)
@ApiOperation
(
value
=
"获取服务模块列表"
,
notes
=
"获取所有服务模块列表"
)
public
Result
<
List
<
JoyfunModule
>>
listModules
(
@RequestParam
(
value
=
"status"
,
required
=
false
)
Integer
status
)
{
List
<
JoyfunModule
>
serviceModules
=
joyfunModuleService
.
listModules
(
status
);
return
Result
.
success
().
setContent
(
serviceModules
);
}
@PostMapping
(
"/updateModuleStatus"
)
@ApiOperation
(
value
=
"修改服务模块状态"
,
notes
=
"修改服务模块的状态"
)
public
Result
updateModuleStatus
(
@RequestBody
JoyfunModule
joyfunModule
)
{
int
result
=
joyfunModuleService
.
updateModuleStatus
(
joyfunModule
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"状态修改失败!"
);
}
return
Result
.
success
().
setMsg
(
"状态修改成功。"
);
}
@PostMapping
(
"/updateModuleSort"
)
@ApiOperation
(
value
=
"更新服务模块排序"
,
notes
=
"更新服务模块的排序序号"
)
public
Result
updateModuleSort
(
@RequestBody
JoyfunModule
joyfunModule
)
{
int
result
=
joyfunModuleService
.
updateModuleSort
(
joyfunModule
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"排序更新失败!"
);
}
return
Result
.
success
().
setMsg
(
"排序更新成功。"
);
}
}
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/MicroApiController.java
View file @
5622bf4a
...
...
@@ -132,6 +132,9 @@ public class MicroApiController {
@Resource
CustomerService
customerService
;
@Resource
private
WeatherService
weatherService
;
@PostMapping
(
value
=
"/bindCmpt"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"成功"
),
...
...
@@ -1495,6 +1498,25 @@ public class MicroApiController {
return
Result
.
success
().
setContent
(
hashOperations
.
keys
(
"best_mark_no"
));
}
@GetMapping
(
value
=
"/getWeatherNow/{areacode}"
)
@ApiOperation
(
value
=
"当前天气"
,
notes
=
"当前天气"
,
tags
=
"当前天气"
)
@ApiImplicitParam
(
value
=
"地区编码"
,
name
=
"areacode"
,
required
=
true
,
paramType
=
"path"
,
defaultValue
=
"101090301"
)
public
Result
<
Map
<
String
,
Object
>>
getWeatherNow
(
@PathVariable
(
"areacode"
)
String
areacode
)
{
Map
<
String
,
Object
>
map
=
weatherService
.
getWeatherNow
(
areacode
);
return
Result
.
success
().
setContent
(
map
);
}
@GetMapping
(
value
=
"/getWeatherDay/{areacode}/{days}"
)
@ApiOperation
(
value
=
"近期天气"
,
notes
=
"近期天气"
,
tags
=
"近期天气"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
value
=
"地区编码"
,
name
=
"areacode"
,
required
=
true
,
paramType
=
"path"
,
defaultValue
=
"101090301"
),
@ApiImplicitParam
(
value
=
"未来天数"
,
name
=
"days"
,
required
=
true
,
paramType
=
"path"
,
defaultValue
=
"3"
)})
public
Result
<
Map
<
String
,
Object
>>
getWeatherDay
(
@PathVariable
(
"areacode"
)
String
areacode
,
@PathVariable
(
"days"
)
String
days
)
{
Map
<
String
,
Object
>
map
=
weatherService
.
getWeatherDay
(
areacode
,
days
);
return
Result
.
success
().
setContent
(
map
);
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"-aaa"
.
split
(
"-"
)[
0
]+
","
+
"-aaa"
.
split
(
"-"
)[
1
]);
}
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/ModuleController.java
View file @
5622bf4a
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
web
;
import
com.dlbridge.jadp.common.interceptor.PageView
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.Cmpt
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.Module
;
import
com.dlbridge.jadp.plugins.cmpt.service.CmptService
;
import
com.dlbridge.jadp.plugins.cmpt.service.ModuleService
;
import
com.neusoft.www.utils.web.Result
;
import
io.swagger.annotations.Api
;
...
...
@@ -10,6 +13,7 @@ import io.swagger.annotations.ApiSort;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.servlet.ModelAndView
;
import
javax.annotation.Resource
;
import
java.util.List
;
...
...
@@ -17,14 +21,15 @@ import java.util.List;
@Log4j2
@RestController
@RequestMapping
(
value
=
"gk/module"
)
@Api
(
value
=
"
自助服务模块"
,
tags
=
"自助服务模块
"
)
@Api
(
value
=
"
分类管理"
,
tags
=
"分类管理
"
)
@ApiSort
(
10
)
public
class
ModuleController
{
@Resource
private
ModuleService
moduleService
;
//-------------------------自助服务模块-----------------------
//-------------------------服务分类模块-----------------------
@PostMapping
(
"/add"
)
@ApiOperation
(
value
=
"新增服务模块"
,
notes
=
"新增一个新的服务模块"
)
...
...
@@ -33,16 +38,6 @@ public class ModuleController {
if
(
StringUtils
.
isBlank
(
module
.
getName
()))
{
return
Result
.
fail
().
setMsg
(
"服务模块名称不能为空!"
);
}
if
(
StringUtils
.
isBlank
(
module
.
getIcon
()))
{
return
Result
.
fail
().
setMsg
(
"服务模块图标不能为空!"
);
}
if
(
StringUtils
.
isBlank
(
module
.
getIcon
()))
{
return
Result
.
fail
().
setMsg
(
"服务模块图标不能为空!"
);
}
Module
exitModule
=
moduleService
.
getModuleByName
(
module
.
getName
());
if
(
exitModule
!=
null
){
return
Result
.
fail
().
setMsg
(
"服务模块已存在!"
);
}
int
result
=
moduleService
.
addModule
(
module
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"新增失败!"
);
...
...
@@ -56,13 +51,6 @@ public class ModuleController {
if
(
StringUtils
.
isBlank
(
module
.
getName
()))
{
return
Result
.
fail
().
setMsg
(
"服务模块名称不能为空!"
);
}
if
(
StringUtils
.
isBlank
(
module
.
getIcon
()))
{
return
Result
.
fail
().
setMsg
(
"服务模块图标不能为空!"
);
}
if
(
StringUtils
.
isBlank
(
module
.
getPath
()))
{
return
Result
.
fail
().
setMsg
(
"跳转路径不能为空!"
);
}
int
result
=
moduleService
.
updateModule
(
module
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"更新失败!"
);
...
...
@@ -88,8 +76,8 @@ public class ModuleController {
@GetMapping
(
"/list"
)
@ApiOperation
(
value
=
"获取服务模块列表"
,
notes
=
"获取所有服务模块列表"
)
public
Result
<
List
<
Module
>>
listModules
(
@RequestParam
(
value
=
"status"
,
required
=
false
)
Integer
status
)
{
List
<
Module
>
serviceModules
=
moduleService
.
listModules
(
status
);
public
Result
<
List
<
Module
>>
listModules
(
@RequestParam
(
value
=
"
cmptId"
)
Integer
cmptId
,
@RequestParam
(
value
=
"
status"
,
required
=
false
)
Integer
status
)
{
List
<
Module
>
serviceModules
=
moduleService
.
listModules
(
cmptId
,
status
);
return
Result
.
success
().
setContent
(
serviceModules
);
}
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/ModuleSettingController.java
View file @
5622bf4a
...
...
@@ -23,7 +23,7 @@ public class ModuleSettingController {
@RequestMapping
(
"index/{cmptId}"
)
@PageView
public
ModelAndView
outterLink
(
@PathVariable
(
"cmptId"
)
Integer
cmptId
,
ModelAndView
mv
)
{
public
ModelAndView
modulePage
(
@PathVariable
(
"cmptId"
)
Integer
cmptId
,
ModelAndView
mv
)
{
Cmpt
cmpt
=
cmptService
.
queryCmptBycmptId
(
cmptId
);
mv
.
addObject
(
"cmpt"
,
cmpt
);
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/ServiceSettingController.java
View file @
5622bf4a
...
...
@@ -29,7 +29,7 @@ public class ServiceSettingController {
@RequestMapping
(
"index/{cmptId}"
)
@PageView
public
ModelAndView
outterLink
(
@PathVariable
(
"cmptId"
)
Integer
cmptId
,
ModelAndView
mv
)
{
public
ModelAndView
servicePage
(
@PathVariable
(
"cmptId"
)
Integer
cmptId
,
ModelAndView
mv
)
{
Cmpt
cmpt
=
cmptService
.
queryCmptBycmptId
(
cmptId
);
mv
.
addObject
(
"cmpt"
,
cmpt
);
...
...
src/main/webapp/WEB-INF/views/cmpt/module.jsp
View file @
5622bf4a
<%@ page
language=
"java"
contentType=
"text/html; charset=utf-8"
pageEncoding=
"utf-8"
%>
<%@ include
file=
"/WEB-INF/views/include/taglib.jsp"
%>
<%@ taglib
prefix=
"fn"
uri=
"http://java.sun.com/jsp/jstl/functions"
%>
<%@ taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%>
<%@ taglib
prefix=
"fmt"
uri=
"http://java.sun.com/jsp/jstl/fmt"
%>
<!doctype html>
<html>
<head>
<title>
自助服务模块
</title>
<!-- Bootstrap CSS-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/vendor/bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome CSS-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/vendor/font-awesome/css/font-awesome.min.css"
>
<!-- Fontastic Custom icon font-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/fontastic.css"
>
<!-- Google fonts - Poppins -->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/font-css.css"
>
<!-- theme stylesheet-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/style.default.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
id=
"theme-stylesheet"
>
<!-- Custom stylesheet - for your changes-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/custom.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/juery-ui-1.12.css"
>
<!-- Favicon-->
<link
rel=
"shortcut icon"
href=
"https://img.geexek.com/files/home/favicon.ico"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/custom.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/main.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/cmpt/setting.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/leaflet/css/leaflet.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
/>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/leaflet/css/leaflet_label.css"
/>
<script
src=
"${ctxStatic}/My97DatePicker/WdatePicker.js"
type=
"text/javascript"
></script>
<script
src=
"${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"${ctxStatic}/layer/layer.js"
></script>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/layer/skin/layer.css"
>
<link
rel=
"stylesheet"
href=
"/static/cmpt/score.css?
<%=
System
.
currentTimeMillis
()
%>
"
>
<style>
.action
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-around
;
}
.action
div
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
user-select
:
none
;
}
.submit
{
display
:
inline-block
;
width
:
120px
;
height
:
45px
;
text-align
:
center
;
line-height
:
45px
;
color
:
white
;
background
:
#ce3939
;
border-radius
:
4px
;
letter-spacing
:
1px
;
cursor
:
pointer
;
font-size
:
16px
;
}
.cancel
{
width
:
120px
;
height
:
45px
;
background
:
#949494
;
border-radius
:
4px
;
font-size
:
16px
;
color
:
#FFFFFF
;
line-height
:
45px
;
text-align
:
center
;
margin-right
:
20px
;
}
.input
{
width
:
100%
;
height
:
40px
!important
;
line-height
:
40px
!important
;
;
border
:
2px
solid
#F4F4F4
;
border-radius
:
4px
;
margin-right
:
30px
;
margin-left
:
0px
;
padding-left
:
12px
;
background
:
rgba
(
247
,
247
,
247
,
1
);
border-radius
:
4px
;
border
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
}
.title
{
font-size
:
24px
;
font-weight
:
500
;
color
:
rgba
(
51
,
51
,
51
,
1
);
}
.title-new
{
font-size
:
20px
;
color
:
rgba
(
51
,
51
,
51
,
1
);
margin-right
:
15px
;
margin-bottom
:
15px
;
width
:
auto
;
}
.section
{
display
:
flex
;
background
:
rgba
(
255
,
255
,
255
,
1
);
border-radius
:
4px
;
flex-direction
:
column
;
}
.func
{
display
:
flex
;
flex-direction
:
column
;
/* height: 90px; */
padding
:
5px
0
;
}
.tip
{
font-size
:
16px
;
color
:
rgba
(
51
,
51
,
51
,
1
);
position
:
absolute
;
right
:
45px
;
top
:
10px
;
}
.saveDiv
{
display
:
flex
;
justify-content
:
flex-end
;
margin
:
0
20px
;
padding-top
:
10px
;
}
label
{
/* width: auto; */
/* width: 200px; */
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
.label-box
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
.dialog
input
{
width
:
50vw
!important
;
}
.dialog
label
input
{
width
:
20px
!important
;
height
:
20px
!important
;
margin
:
0
10px
!important
;
}
.cover
{
width
:
100%
;
height
:
100px
;
background
:
rgba
(
247
,
247
,
247
,
1
);
border-radius
:
4px
;
border
:
1px
solid
rgba
(
238
,
238
,
238
,
1
);
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.cover-img
{
width
:
300px
;
cursor
:
pointer
;
background-repeat
:
no-repeat
;
background-position
:
center
;
background-size
:
cover
;
height
:
300px
;
}
.icon-cover
{
width
:
34px
;
height
:
34px
;
background-image
:
url("/static/images/icon_cover.png")
;
background-size
:
100%
;
background-repeat
:
no-repeat
;
}
.section
{
width
:
100%
!important
;
display
:
flex
;
flex-direction
:
column
;
}
.section-box
{
width
:
100%
!important
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
.rule-field
tbody
tr
td
:first-child
{
padding-left
:
0
!important
;
height
:
auto
!important
;
}
tbody
tr
td
{
font-size
:
15px
!important
;
}
input
[
type
=
checkbox
]
::before
{
border
:
none
!important
;
background
:
none
!important
;
}
input
[
type
=
checkbox
]
:checked::before
{
border
:
none
!important
;
background
:
none
!important
;
}
input
[
type
=
checkbox
]
{
top
:
0
;
left
:
0
;
}
</style>
</head>
<body>
<jsp:include
page=
"../common/header.jsp"
></jsp:include>
<div
class=
"page-content d-flex align-items-stretch main-body"
>
<jsp:include
page=
"../common/menu.jsp"
></jsp:include>
<div
class=
"rght"
id=
"module"
>
<div
class=
"section"
>
<div>
<h3
class=
"title"
>
服务模块
</h3>
<div
class=
"add-btn"
@
click=
"addModule"
>
<span>
+
</span>
<span>
添加服务模块
</span>
</div>
</div>
</div>
<div
style=
"margin-top: -10px;margin-bottom: 50px"
>
<table
style=
"width: 100%"
class=
"rule-field"
>
<colgroup>
<col
style=
"width:15%;"
>
<col
style=
"width:20%;"
>
<col
style=
"width:10%;"
>
<col
style=
"width:20%;"
>
<col
style=
"width:10%;"
>
<col
style=
"width:20%;"
>
</colgroup>
<thead>
<tr>
<th
style=
"text-align: center"
>
图标
</th>
<th
style=
"text-align: left"
>
模块名
</th>
<th
style=
"text-align: left"
>
排序
</th>
<th
style=
"text-align: left"
>
路径
</th>
<th
style=
"text-align: center"
>
状态
</th>
<th
style=
"text-align: center"
>
操作
</th>
</tr>
</thead>
<tbody>
<tr
v-if=
""
v-for=
"item in list"
:data-id=
"item.id"
>
<td
style=
"text-align: center"
>
<img
:src=
"item.icon"
style=
"width:80px;height:80px;"
/>
</td>
<td
class=
"name"
style=
"text-align: left;"
>
<span
v-text=
"item.name"
></span>
</td>
<td
class=
"name"
style=
"text-align: left;"
>
<span
v-text=
"item.sort"
></span>
</td>
<td
class=
"name"
style=
"text-align: left;"
>
<span
v-text=
"item.path"
></span>
</td>
<td
style=
"text-align: center"
>
<%@ include
file=
"/WEB-INF/views/include/taglib.jsp"
%>
<%@ taglib
prefix=
"fn"
uri=
"http://java.sun.com/jsp/jstl/functions"
%>
<%@ taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%>
<%@ taglib
prefix=
"fmt"
uri=
"http://java.sun.com/jsp/jstl/fmt"
%>
<!doctype html>
<html>
<head>
<title>
自助服务模块
</title>
<!-- Bootstrap CSS-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/vendor/bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome CSS-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/vendor/font-awesome/css/font-awesome.min.css"
>
<!-- Fontastic Custom icon font-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/fontastic.css"
>
<!-- Google fonts - Poppins -->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/font-css.css"
>
<!-- theme stylesheet-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/style.default.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
id=
"theme-stylesheet"
>
<!-- Custom stylesheet - for your changes-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/custom.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/juery-ui-1.12.css"
>
<!-- Favicon-->
<link
rel=
"shortcut icon"
href=
"https://img.geexek.com/files/home/favicon.ico"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/custom.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/main.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/cmpt/setting.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/leaflet/css/leaflet.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
/>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/leaflet/css/leaflet_label.css"
/>
<script
src=
"${ctxStatic}/My97DatePicker/WdatePicker.js"
type=
"text/javascript"
></script>
<script
src=
"${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"${ctxStatic}/layer/layer.js"
></script>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/layer/skin/layer.css"
>
<link
rel=
"stylesheet"
href=
"/static/cmpt/score.css?
<%=
System
.
currentTimeMillis
()
%>
"
>
<style>
.action
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-around
;
}
.action
div
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
user-select
:
none
;
}
.submit
{
display
:
inline-block
;
width
:
120px
;
height
:
45px
;
text-align
:
center
;
line-height
:
45px
;
color
:
white
;
background
:
#ce3939
;
border-radius
:
4px
;
letter-spacing
:
1px
;
cursor
:
pointer
;
font-size
:
16px
;
}
.cancel
{
width
:
120px
;
height
:
45px
;
background
:
#949494
;
border-radius
:
4px
;
font-size
:
16px
;
color
:
#FFFFFF
;
line-height
:
45px
;
text-align
:
center
;
margin-right
:
20px
;
}
.input
{
width
:
100%
;
height
:
40px
!important
;
line-height
:
40px
!important
;
;
border
:
2px
solid
#F4F4F4
;
border-radius
:
4px
;
margin-right
:
30px
;
margin-left
:
0px
;
padding-left
:
12px
;
background
:
rgba
(
247
,
247
,
247
,
1
);
border-radius
:
4px
;
border
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
}
.title
{
font-size
:
24px
;
font-weight
:
500
;
color
:
rgba
(
51
,
51
,
51
,
1
);
}
.title-new
{
font-size
:
20px
;
color
:
rgba
(
51
,
51
,
51
,
1
);
margin-right
:
15px
;
margin-bottom
:
15px
;
width
:
auto
;
}
.section
{
display
:
flex
;
background
:
rgba
(
255
,
255
,
255
,
1
);
border-radius
:
4px
;
flex-direction
:
column
;
}
.func
{
display
:
flex
;
flex-direction
:
column
;
/* height: 90px; */
padding
:
5px
0
;
}
.tip
{
font-size
:
16px
;
color
:
rgba
(
51
,
51
,
51
,
1
);
position
:
absolute
;
right
:
45px
;
top
:
10px
;
}
.saveDiv
{
display
:
flex
;
justify-content
:
flex-end
;
margin
:
0
20px
;
padding-top
:
10px
;
}
label
{
/* width: auto; */
/* width: 200px; */
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
.label-box
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
.dialog
input
{
width
:
50vw
!important
;
}
.dialog
label
input
{
width
:
20px
!important
;
height
:
20px
!important
;
margin
:
0
10px
!important
;
}
.cover
{
width
:
100%
;
height
:
100px
;
background
:
rgba
(
247
,
247
,
247
,
1
);
border-radius
:
4px
;
border
:
1px
solid
rgba
(
238
,
238
,
238
,
1
);
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.cover-img
{
width
:
300px
;
cursor
:
pointer
;
background-repeat
:
no-repeat
;
background-position
:
center
;
background-size
:
cover
;
height
:
300px
;
}
.icon-cover
{
width
:
34px
;
height
:
34px
;
background-image
:
url("/static/images/icon_cover.png")
;
background-size
:
100%
;
background-repeat
:
no-repeat
;
}
.section
{
width
:
100%
!important
;
display
:
flex
;
flex-direction
:
column
;
}
.section-box
{
width
:
100%
!important
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
.rule-field
tbody
tr
td
:first-child
{
padding-left
:
0
!important
;
height
:
auto
!important
;
}
tbody
tr
td
{
font-size
:
15px
!important
;
}
input
[
type
=
checkbox
]
::before
{
border
:
none
!important
;
background
:
none
!important
;
}
input
[
type
=
checkbox
]
:checked::before
{
border
:
none
!important
;
background
:
none
!important
;
}
input
[
type
=
checkbox
]
{
top
:
0
;
left
:
0
;
}
</style>
</head>
<body>
<jsp:include
page=
"../common/header.jsp"
></jsp:include>
<div
class=
"page-content d-flex align-items-stretch main-body"
>
<jsp:include
page=
"../common/menu.jsp"
></jsp:include>
<div
class=
"rght"
id=
"module"
>
<div
class=
"section"
>
<div>
<h3
class=
"title"
>
服务模块
</h3>
<div
class=
"add-btn"
@
click=
"addModule"
>
<span>
+
</span>
<span>
添加服务模块
</span>
</div>
</div>
</div>
<div
style=
"margin-top: -10px;margin-bottom: 50px"
>
<table
style=
"width: 100%"
class=
"rule-field"
>
<colgroup>
<col
style=
"width:15%;"
>
<col
style=
"width:20%;"
>
<col
style=
"width:10%;"
>
<col
style=
"width:20%;"
>
<col
style=
"width:10%;"
>
<col
style=
"width:20%;"
>
</colgroup>
<thead>
<tr>
<th
style=
"text-align: center"
>
图标
</th>
<th
style=
"text-align: left"
>
模块名
</th>
<th
style=
"text-align: left"
>
排序
</th>
<th
style=
"text-align: left"
>
链接
</th>
<th
style=
"text-align: center"
>
状态
</th>
<th
style=
"text-align: center"
>
操作
</th>
</tr>
</thead>
<tbody>
<tr
v-if=
""
v-for=
"item in list"
:data-id=
"item.id"
>
<td
style=
"text-align: center"
>
<img
:src=
"item.icon"
style=
"width:80px;height:80px;"
v-if=
"item.icon"
/>
<span
v-else
>
未设置
</span>
</td>
<td
class=
"name"
style=
"text-align: left;"
>
<span
v-text=
"item.name"
></span>
</td>
<td
class=
"name"
style=
"text-align: left;"
>
<span
v-text=
"item.sort"
></span>
</td>
<td
class=
"name"
style=
"text-align: left;"
>
<span
v-text=
"item.path"
v-if=
"item.path"
></span>
<span
v-else
>
未设置
</span>
</td>
<td
style=
"text-align: center"
>
<span
class=
"badge badge-pill"
:class=
"[item.status==1?'badge-success':'badge-danger']"
v-text=
"statusType[item.status]"
>
:class=
"[item.status==1?'badge-success':'badge-danger']"
v-text=
"statusType[item.status]"
>
</span>
</td>
<td
style=
"text-align: center"
>
<div
class=
"action"
>
<div
class=
"opt edit.opt"
@
click=
"showEdit(item.id)"
>
<span
class=
"icon-edit"
></span>
<span
class=
"edit"
>
</td>
<td
style=
"text-align: center"
>
<div
class=
"action"
>
<div
class=
"opt edit.opt"
@
click=
"showEdit(item.id)"
>
<span
class=
"icon-edit"
></span>
<span
class=
"edit"
>
编辑
</span>
</div>
<div
class=
"opt del"
@
click=
"delModule(item)"
>
<span
class=
"icon-del"
></span>
<span
class=
"del"
>
</div>
<div
class=
"opt del"
@
click=
"delModule(item)"
>
<span
class=
"icon-del"
></span>
<span
class=
"del"
>
删除
</span>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div
class=
"dialog"
v-show=
"dialog"
style=
"width:40vw;height: 80vh; z-index: 99;display: flex;flex-direction: column;left: 50%;
<div
class=
"dialog"
v-show=
"dialog"
style=
"width:40vw;height: 80vh; z-index: 99;display: flex;flex-direction: column;left: 50%;
transform: translateX(-50%);margin-left:0;"
>
<div>
<span
class=
"title"
style=
"margin-bottom: 10px; color: #CE3939"
>
{{title}}
</span>
</div>
<div
style=
"display: flex;flex-direction: column;flex:1;overflow-y: auto;"
>
<div
class=
"func"
>
<div>
<span
class=
"title-new"
>
模块名称
</span>
</div>
<div>
<input
class=
"input"
type=
"text"
v-model=
"module.name"
placeholder=
"请输入功能名称,最多五个字符"
>
</div>
</div>
<div
class=
"func"
>
<div>
<span
class=
"title-new"
>
跳转地址
</span>
</div>
<div>
<input
class=
"input"
type=
"text"
v-model=
"module.path"
placeholder=
"请输入跳转路径
"
>
</div>
</div>
<div
class=
"func"
>
<div>
<span
class=
"title-new"
>
排序(越小越靠前)
</span>
</div>
<div>
<input
class=
"input"
type=
"number"
v-model=
"module.sort"
placeholder=
"请输入排序"
>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
服务模块封面
</span>
<span
style=
"font-size: 16px;color: #ce3939;margin:10px 0;"
>
<div>
<span
class=
"title"
style=
"margin-bottom: 10px; color: #CE3939"
>
{{title}}
</span>
</div>
<div
style=
"display: flex;flex-direction: column;flex:1;overflow-y: auto;"
>
<div
class=
"func"
>
<div>
<span
class=
"title-new"
>
模块名称
</span>
</div>
<div>
<input
class=
"input"
type=
"text"
v-model=
"module.name"
placeholder=
"请输入功能名称,最多五个字符"
>
</div>
</div>
<div
class=
"func"
>
<div>
<span
class=
"title-new"
>
跳转地址
</span>
</div>
<div>
<input
class=
"input"
type=
"text"
v-model=
"module.path"
placeholder=
"请输入跳转路径(可选 支持小程序内部跳转和h5)
"
>
</div>
</div>
<div
class=
"func"
>
<div>
<span
class=
"title-new"
>
排序(越小越靠前)
</span>
</div>
<div>
<input
class=
"input"
type=
"number"
v-model=
"module.sort"
placeholder=
"请输入排序"
>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
服务模块封面/图标(可选)
</span>
<span
style=
"font-size: 16px;color: #ce3939;margin:10px 0;"
>
<span
style=
"font-size: 12px;display: inline-block;border-radius: 50%;height: 18px;width: 18px;background: #ce3939;color: white;text-align: center;"
>
注
</span>
style=
"font-size: 12px;display: inline-block;border-radius: 50%;height: 18px;width: 18px;background: #ce3939;color: white;text-align: center;"
>
注
</span>
<span
style=
"display: inline"
>
建议分辨率500*500
</span>
</span>
<div>
<label
for=
"file"
>
<div
v-if=
"!module.icon"
class=
"cover"
>
<span
class=
"icon-cover"
></span>
<div>
<label
for=
"file"
>
<div
v-if=
"!module.icon"
class=
"cover"
>
<span
class=
"icon-cover"
></span>
</div>
<img
v-else
class=
"cover cover-img"
:src=
"module.icon"
/>
</label>
<input
id=
"file"
type=
"file"
style=
"display: none"
@
change=
"uploadFile"
>
</div>
</div>
<!-- 状态 (status) -->
<div
class=
"func"
>
<span
class=
"title-new"
>
状态
</span>
<div
class=
"label-box"
>
<label>
<input
type=
"radio"
v-model=
"module.status"
value=
"0"
>
关闭
</label>
<label>
<input
type=
"radio"
v-model=
"module.status"
value=
"1"
>
开启
</label>
</div>
</div>
</div>
<div
class=
"saveDiv"
>
<span
@
click=
"cancel"
class=
"cancel"
>
取消
</span>
<span
@
click=
"submit"
class=
"submit"
>
保存
</span>
</div>
</div>
<div
v-show=
"dialog"
style=
"position: fixed;height: 100%;width: 100%;background: black;z-index: 10;opacity: 0.5;top:0px;left:0px"
>
</div>
</div>
<img
v-else
class=
"cover cover-img"
:src=
"module.icon"
/>
</label>
<input
id=
"file"
type=
"file"
style=
"display: none"
@
change=
"uploadFile"
>
</div>
</div>
<!-- 状态 (status) -->
<div
class=
"func"
>
<span
class=
"title-new"
>
状态
</span>
<div
class=
"label-box"
>
<label>
<input
type=
"radio"
v-model=
"module.status"
value=
"0"
>
关闭
</label>
<label>
<input
type=
"radio"
v-model=
"module.status"
value=
"1"
>
开启
</label>
</div>
</div>
</div>
<div
class=
"saveDiv"
>
<span
@
click=
"cancel"
class=
"cancel"
>
取消
</span>
<span
@
click=
"submit"
class=
"submit"
>
保存
</span>
</div>
</div>
<div
v-show=
"dialog"
style=
"position: fixed;height: 100%;width: 100%;background: black;z-index: 10;opacity: 0.5;top:0px;left:0px"
>
</div>
</div>
<script
src=
"${ctxStatic}/vue/vue.js"
></script>
<script>
var
app
=
new
Vue
({
el
:
'#module'
,
data
:
{
list
:
[],
dialog
:
false
,
title
:
'新增服务模块'
,
module
:
{
"id"
:
null
,
"name"
:
null
,
"sort"
:
10
,
"path"
:
null
,
"icon"
:
null
,
"status"
:
1
,
// 状态(0:关闭 1:开启)
"isDeleted"
:
0
// 删除状态(0:未删除 1:已删除)
},
statusType
:
{
0
:
'关闭'
,
1
:
'开启'
}
},
methods
:
{
// 展示dialog
addModule
()
{
this
.
dialog
=
!
this
.
dialog
;
this
.
resetForm
();
},
changePage
(
page
)
{
this
.
page
=
page
this
.
queryAll
()
},
changeType
(
index
)
{
this
.
page
=
1
this
.
typeIndex
=
index
this
.
queryAll
()
},
next
()
{
this
.
page
+=
1
this
.
queryAll
()
},
preview
()
{
this
.
page
-=
1
this
.
queryAll
()
},
// 重置表单
resetForm
()
{
this
.
module
=
{
"id"
:
null
,
"name"
:
null
,
"icon"
:
null
,
"path"
:
null
,
"sort"
:
10
,
"status"
:
1
,
// 状态(0:关闭 1:开启)
"isDeleted"
:
0
// 删除状态(0:未删除 1:已删除)
};
},
// 编辑
showEdit
(
id
)
{
this
.
getDetail
(
id
);
},
// 删除
delModule
(
data
)
{
layer
.
confirm
(
"确认要删除吗?"
,
function
()
{
$
.
ajax
({
url
:
'/gk/module/delete'
,
data
:
JSON
.
stringify
(
data
),
// 将 data 转换为 JSON 字符串
type
:
'post'
,
contentType
:
'application/json'
,
beforeSend
:
()
=>
{
layer
.
load
()
},
success
:
()
=>
{
layer
.
msg
(
'删除成功!'
);
},
complete
:
()
=>
{
layer
.
closeAll
()
<script
src=
"${ctxStatic}/vue/vue.js"
></script>
<script>
var
app
=
new
Vue
({
el
:
'#module'
,
data
:
{
list
:
[],
dialog
:
false
,
title
:
'新增服务模块'
,
module
:
{
"id"
:
null
,
"name"
:
null
,
"sort"
:
100
,
"path"
:
null
,
"icon"
:
null
,
"status"
:
1
,
// 状态(0:关闭 1:开启)
"isDeleted"
:
0
// 删除状态(0:未删除 1:已删除)
},
statusType
:
{
0
:
'关闭'
,
1
:
'开启'
}
},
methods
:
{
// 展示dialog
addModule
()
{
this
.
dialog
=
!
this
.
dialog
;
this
.
resetForm
();
},
changePage
(
page
)
{
this
.
page
=
page
this
.
queryAll
()
},
changeType
(
index
)
{
this
.
page
=
1
this
.
typeIndex
=
index
this
.
queryAll
()
},
next
()
{
this
.
page
+=
1
this
.
queryAll
()
},
preview
()
{
this
.
page
-=
1
this
.
queryAll
()
},
// 重置表单
resetForm
()
{
this
.
module
=
{
"id"
:
null
,
"name"
:
null
,
"icon"
:
null
,
"path"
:
null
,
cmptId
:
getCId
(),
"sort"
:
100
,
"status"
:
1
,
// 状态(0:关闭 1:开启)
"isDeleted"
:
0
// 删除状态(0:未删除 1:已删除)
};
},
// 编辑
showEdit
(
id
)
{
this
.
getDetail
(
id
);
},
// 删除
delModule
(
data
)
{
layer
.
confirm
(
"确认要删除吗?"
,
function
()
{
$
.
ajax
({
url
:
'/gk/module/delete'
,
data
:
JSON
.
stringify
(
data
),
// 将 data 转换为 JSON 字符串
type
:
'post'
,
contentType
:
'application/json'
,
beforeSend
:
()
=>
{
layer
.
load
()
},
success
:
()
=>
{
layer
.
msg
(
'删除成功!'
);
},
complete
:
()
=>
{
layer
.
closeAll
()
app
.
queryAll
();
}
});
});
},
// 保存
submit
()
{
const
module
=
{
...
this
.
module
,
status
:
Number
(
this
.
module
.
status
),
sort
:
Number
(
this
.
module
.
sort
)
}
if
(
!
module
.
name
)
{
layer
.
msg
(
"模块名不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
return
;
}
const
url
=
this
.
module
.
id
?
'/gk/module/update'
:
'/gk/module/add'
$
.
ajax
({
url
:
url
,
data
:
JSON
.
stringify
(
module
),
// 将 data 转换为 JSON 字符串
type
:
'post'
,
contentType
:
'application/json'
,
beforeSend
:
()
=>
{
layer
.
load
()
},
success
:
(
res
)
=>
{
if
(
res
.
code
==
1
)
{
layer
.
msg
(
'保存成功!'
);
app
.
$data
.
dialog
=
false
;
app
.
queryAll
();
}
else
{
layer
.
msg
(
res
.
msg
);
app
.
$data
.
dialog
=
false
;
app
.
queryAll
();
}
},
complete
:
()
=>
{
layer
.
closeAll
()
}
})
},
// 返回
cancel
()
{
this
.
dialog
=
false
;
},
// 查询所有
queryAll
()
{
if
(
!
getCId
())
return
const
url
=
'/gk/module/list?status=1&cmptId='
+
getCId
()
$
.
ajax
({
type
:
'GET'
,
contentType
:
'application/json'
,
url
,
beforeSend
:
()
=>
{
layer
.
load
()
},
complete
:
()
=>
{
layer
.
closeAll
()
},
success
:
(
data
)
=>
{
this
.
list
=
data
.
content
}
})
},
// 获取详情
getDetail
(
id
)
{
$
.
ajax
({
url
:
'/gk/module/detail/'
+
id
,
success
:
(
data
)
=>
{
if
(
data
.
content
)
{
this
.
module
=
data
.
content
;
this
.
dialog
=
true
;
}
},
beforeSend
:
()
=>
{
layer
.
load
()
},
complete
:
()
=>
{
layer
.
closeAll
()
},
});
},
//文件上传处理
uploadFile
(
obj
)
{
logoFile
=
obj
.
target
.
files
[
0
];
if
(
logoFile
.
type
&&
logoFile
.
type
.
indexOf
(
"image"
)
==
-
1
)
{
return
layer
.
msg
(
'请上传图片'
,
{
icon
:
5
})
}
var
reads
=
new
FileReader
();
reads
.
readAsDataURL
(
logoFile
);
reads
.
onload
=
function
()
{
//将处理完的图片文件上传到阿里云服务器
//上传LOGO图片
var
formData
=
new
FormData
();
formData
.
append
(
"uploadImg"
,
logoFile
);
$
.
ajax
({
url
:
'https://event.geexek.com/upload/file.do'
,
/*接口域名地址*/
type
:
'post'
,
data
:
formData
,
contentType
:
false
,
processData
:
false
,
success
:
function
(
res
)
{
if
(
res
.
code
==
"1"
)
{
layer
.
msg
(
'上传成功'
,
{
icon
:
1
,
time
:
1500
});
app
.
$data
.
module
.
icon
=
res
.
result
}
else
{
console
.
log
(
res
);
}
},
beforeSend
:
()
=>
{
layer
.
load
()
},
complete
:
()
=>
{
layer
.
closeAll
()
},
})
};
}
}
});
app
.
queryAll
();
}
});
});
},
// 保存
submit
()
{
const
module
=
{
...
this
.
module
,
status
:
Number
(
this
.
module
.
status
),
sort
:
Number
(
this
.
module
.
sort
)
}
// 假设 service 对象已经定义并初始化
if
(
!
module
.
icon
)
{
layer
.
msg
(
"图标图片!"
,
{
icon
:
5
,
duration
:
1500
});
return
;
}
if
(
!
module
.
name
)
{
layer
.
msg
(
"模块标题不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
return
;
}
if
(
!
module
.
path
)
{
layer
.
msg
(
"跳转路径不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
return
;
}
const
url
=
this
.
module
.
id
?
'/gk/module/update'
:
'/gk/module/add'
$
.
ajax
({
url
:
url
,
data
:
JSON
.
stringify
(
module
),
// 将 data 转换为 JSON 字符串
type
:
'post'
,
contentType
:
'application/json'
,
beforeSend
:
()
=>
{
layer
.
load
()
},
success
:
()
=>
{
layer
.
msg
(
'保存成功!'
);
app
.
$data
.
dialog
=
false
;
app
.
queryAll
();
},
complete
:
()
=>
{
layer
.
closeAll
()
}
})
},
// 返回
cancel
()
{
this
.
dialog
=
false
;
},
// 查询所有
queryAll
()
{
if
(
!
getCId
)
return
const
url
=
'/gk/module/list?status=1'
$
.
ajax
({
type
:
'GET'
,
contentType
:
'application/json'
,
url
,
beforeSend
:
()
=>
{
layer
.
load
()
},
complete
:
()
=>
{
layer
.
closeAll
()
},
success
:
(
data
)
=>
{
this
.
list
=
data
.
content
}
})
},
// 获取详情
getDetail
(
id
)
{
$
.
ajax
({
url
:
'/gk/module/detail/'
+
id
,
success
:
(
data
)
=>
{
if
(
data
.
content
)
{
this
.
module
=
data
.
content
;
this
.
dialog
=
true
;
}
},
beforeSend
:
()
=>
{
layer
.
load
()
},
complete
:
()
=>
{
layer
.
closeAll
()
},
});
},
//文件上传处理
uploadFile
(
obj
)
{
logoFile
=
obj
.
target
.
files
[
0
];
if
(
logoFile
.
type
&&
logoFile
.
type
.
indexOf
(
"image"
)
==
-
1
)
{
return
layer
.
msg
(
'请上传图片'
,
{
icon
:
5
})
}
var
reads
=
new
FileReader
();
reads
.
readAsDataURL
(
logoFile
);
reads
.
onload
=
function
()
{
//将处理完的图片文件上传到阿里云服务器
//上传LOGO图片
var
formData
=
new
FormData
();
formData
.
append
(
"uploadImg"
,
logoFile
);
$
.
ajax
({
url
:
'https://event.geexek.com/upload/file.do'
,
/*接口域名地址*/
type
:
'post'
,
data
:
formData
,
contentType
:
false
,
processData
:
false
,
success
:
function
(
res
)
{
if
(
res
.
code
==
"1"
)
{
layer
.
msg
(
'上传成功'
,
{
icon
:
1
,
time
:
1500
});
app
.
$data
.
module
.
icon
=
res
.
result
}
else
{
console
.
log
(
res
);
}
},
beforeSend
:
()
=>
{
layer
.
load
()
},
complete
:
()
=>
{
layer
.
closeAll
()
},
})
};
}
}
});
app
.
queryAll
();
</script>
</body>
</html>
\ No newline at end of file
</script>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/views/cmpt/service.jsp
View file @
5622bf4a
<%@ page
language=
"java"
contentType=
"text/html; charset=utf-8"
pageEncoding=
"utf-8"
%>
<%@ include
file=
"/WEB-INF/views/include/taglib.jsp"
%>
<%@ taglib
prefix=
"fn"
uri=
"http://java.sun.com/jsp/jstl/functions"
%>
<%@ taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%>
<%@ taglib
prefix=
"fmt"
uri=
"http://java.sun.com/jsp/jstl/fmt"
%>
<!doctype html>
<html>
<head>
<title>
自助服务
</title>
<!-- Bootstrap CSS-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/vendor/bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome CSS-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/vendor/font-awesome/css/font-awesome.min.css"
>
<!-- Fontastic Custom icon font-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/fontastic.css"
>
<!-- Google fonts - Poppins -->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/font-css.css"
>
<!-- theme stylesheet-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/style.default.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
id=
"theme-stylesheet"
>
<!-- Custom stylesheet - for your changes-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/custom.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/juery-ui-1.12.css"
>
<!-- Favicon-->
<link
rel=
"shortcut icon"
href=
"https://img.geexek.com/files/home/favicon.ico"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/custom.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/main.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/cmpt/setting.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/leaflet/css/leaflet.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
/>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/leaflet/css/leaflet_label.css"
/>
<script
src=
"${ctxStatic}/My97DatePicker/WdatePicker.js"
type=
"text/javascript"
></script>
<script
src=
"${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"${ctxStatic}/layer/layer.js"
></script>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/layer/skin/layer.css"
>
<script
src=
"https://enroll.geexek.com/js/ueditor/ueditor.config-zs.js?v=
<%=
System
.
currentTimeMillis
()
%>
"
></script>
<script
src=
"https://enroll.geexek.com/js/ueditor/ueditor.all.js?v=
<%=
System
.
currentTimeMillis
()
%>
"
></script>
<link
rel=
"stylesheet"
href=
"/static/cmpt/score.css?
<%=
System
.
currentTimeMillis
()
%>
"
>
<style>
.action
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-around
;
}
.action
div
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
user-select
:
none
;
}
.submit
{
display
:
inline-block
;
width
:
120px
;
height
:
45px
;
text-align
:
center
;
line-height
:
45px
;
color
:
white
;
background
:
#ce3939
;
border-radius
:
4px
;
letter-spacing
:
1px
;
cursor
:
pointer
;
font-size
:
16px
;
}
.cancel
{
width
:
120px
;
height
:
45px
;
background
:
#949494
;
border-radius
:
4px
;
font-size
:
16px
;
color
:
#FFFFFF
;
line-height
:
45px
;
text-align
:
center
;
margin-right
:
20px
;
}
.input
{
width
:
100%
;
height
:
40px
!important
;
line-height
:
40px
!important
;
;
border
:
2px
solid
#F4F4F4
;
border-radius
:
4px
;
margin-right
:
30px
;
margin-left
:
0px
;
padding-left
:
12px
;
background
:
rgba
(
247
,
247
,
247
,
1
);
border-radius
:
4px
;
border
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
}
.title
{
font-size
:
24px
;
font-weight
:
500
;
color
:
rgba
(
51
,
51
,
51
,
1
);
}
.title-new
{
font-size
:
20px
;
color
:
rgba
(
51
,
51
,
51
,
1
);
margin-right
:
15px
;
margin-bottom
:
15px
;
width
:
80px
;
}
.section
{
display
:
flex
;
background
:
rgba
(
255
,
255
,
255
,
1
);
border-radius
:
4px
;
flex-direction
:
column
;
}
.func
{
display
:
flex
;
flex-direction
:
column
;
/* height: 90px; */
padding
:
5px
0
;
}
.tip
{
font-size
:
16px
;
color
:
rgba
(
51
,
51
,
51
,
1
);
position
:
absolute
;
right
:
45px
;
top
:
10px
;
}
.saveDiv
{
display
:
flex
;
justify-content
:
flex-end
;
margin
:
0
20px
;
padding-top
:
10px
;
}
label
{
/* width: auto; */
/* width: 200px; */
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
.label-box
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
.dialog
input
{
width
:
100%
!important
;
}
.dialog
label
input
{
width
:
20px
!important
;
height
:
20px
!important
;
margin
:
0
10px
!important
;
}
.cover
{
width
:
100%
;
height
:
100px
;
background
:
rgba
(
247
,
247
,
247
,
1
);
border-radius
:
4px
;
border
:
1px
solid
rgba
(
238
,
238
,
238
,
1
);
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.cover-img
{
width
:
300px
;
cursor
:
pointer
;
background-repeat
:
no-repeat
;
background-position
:
center
;
background-size
:
cover
;
height
:
300px
;
}
.icon-cover
{
width
:
34px
;
height
:
34px
;
background-image
:
url("/static/images/icon_cover.png")
;
background-size
:
100%
;
background-repeat
:
no-repeat
;
}
.section
{
width
:
100%
!important
;
display
:
flex
;
flex-direction
:
column
;
}
.section-box
{
width
:
100%
!important
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
.rule-field
tbody
tr
td
:first-child
{
padding-left
:
0
!important
;
height
:
auto
!important
;
}
tbody
tr
td
{
font-size
:
15px
!important
;
}
input
[
type
=
checkbox
]
::before
{
border
:
none
!important
;
background
:
none
!important
;
}
input
[
type
=
checkbox
]
:checked::before
{
border
:
none
!important
;
background
:
none
!important
;
}
input
[
type
=
checkbox
]
{
top
:
0
;
left
:
0
;
}
</style>
</head>
<body>
<jsp:include
page=
"../common/header.jsp"
></jsp:include>
<div
class=
"page-content d-flex align-items-stretch main-body"
>
<jsp:include
page=
"../common/menu.jsp"
></jsp:include>
<div
class=
"rght"
id=
"sevice"
>
<div
class=
"section"
>
<div>
<h3
class=
"title"
>
自助服务
</h3>
<div
class=
"add-btn"
@
click=
"addService"
>
<span>
+
</span>
<span>
添加自助服务
</span>
</div>
</div>
<div
class=
"btn-toolbar flex justify-between"
role=
"toolbar"
aria-label=
"Toolbar with button groups"
>
<div
class=
"btn-group mr-2"
role=
"group"
aria-label=
"First group"
>
<button
:class=
"[index==typeIndex?'btn-danger':'btn-default']"
@
click=
"changeType(index)"
type=
"button"
v-for=
"(type,index) in serviceTypes"
:key=
"type.name"
class=
"btn btn-sm"
>
{{type.name}}
</button>
</div>
<div
class=
"input-group mr-2"
>
<input
type=
"text"
class=
"form-control"
placeholder=
"请输入搜索关键字"
@
keyup
.
enter=
"queryAll"
v-model=
"keyword"
aria-label=
"Input group example"
aria-describedby=
"btnGroupAddon"
>
</div>
<button
class=
"btn btn-sm ml-auto "
:class=
"{
<%@ include
file=
"/WEB-INF/views/include/taglib.jsp"
%>
<%@ taglib
prefix=
"fn"
uri=
"http://java.sun.com/jsp/jstl/functions"
%>
<%@ taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%>
<%@ taglib
prefix=
"fmt"
uri=
"http://java.sun.com/jsp/jstl/fmt"
%>
<!doctype html>
<html>
<head>
<title>
自助服务
</title>
<!-- Bootstrap CSS-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/vendor/bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome CSS-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/vendor/font-awesome/css/font-awesome.min.css"
>
<!-- Fontastic Custom icon font-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/fontastic.css"
>
<!-- Google fonts - Poppins -->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/font-css.css"
>
<!-- theme stylesheet-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/style.default.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
id=
"theme-stylesheet"
>
<!-- Custom stylesheet - for your changes-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/custom.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/juery-ui-1.12.css"
>
<!-- Favicon-->
<link
rel=
"shortcut icon"
href=
"https://img.geexek.com/files/home/favicon.ico"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/custom.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/css/main.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/cmpt/setting.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/leaflet/css/leaflet.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
/>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/leaflet/css/leaflet_label.css"
/>
<script
src=
"${ctxStatic}/My97DatePicker/WdatePicker.js"
type=
"text/javascript"
></script>
<script
src=
"${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"${ctxStatic}/layer/layer.js"
></script>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/layer/skin/layer.css"
>
<script
src=
"https://enroll.geexek.com/js/ueditor/ueditor.config-zs.js?v=
<%=
System
.
currentTimeMillis
()
%>
"
></script>
<script
src=
"https://enroll.geexek.com/js/ueditor/ueditor.all.js?v=
<%=
System
.
currentTimeMillis
()
%>
"
></script>
<link
rel=
"stylesheet"
href=
"/static/cmpt/score.css?
<%=
System
.
currentTimeMillis
()
%>
"
>
<style>
.action
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-around
;
}
.action
div
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
user-select
:
none
;
}
.submit
{
display
:
inline-block
;
width
:
120px
;
height
:
45px
;
text-align
:
center
;
line-height
:
45px
;
color
:
white
;
background
:
#ce3939
;
border-radius
:
4px
;
letter-spacing
:
1px
;
cursor
:
pointer
;
font-size
:
16px
;
}
.cancel
{
width
:
120px
;
height
:
45px
;
background
:
#949494
;
border-radius
:
4px
;
font-size
:
16px
;
color
:
#FFFFFF
;
line-height
:
45px
;
text-align
:
center
;
margin-right
:
20px
;
}
.input
{
width
:
100%
;
height
:
40px
!important
;
line-height
:
40px
!important
;
;
border
:
2px
solid
#F4F4F4
;
border-radius
:
4px
;
margin-right
:
30px
;
margin-left
:
0px
;
padding-left
:
12px
;
background
:
rgba
(
247
,
247
,
247
,
1
);
border-radius
:
4px
;
border
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
}
.title
{
font-size
:
24px
;
font-weight
:
500
;
color
:
rgba
(
51
,
51
,
51
,
1
);
}
.title-new
{
font-size
:
20px
;
color
:
rgba
(
51
,
51
,
51
,
1
);
margin-right
:
15px
;
margin-bottom
:
15px
;
width
:
80px
;
}
.section
{
display
:
flex
;
background
:
rgba
(
255
,
255
,
255
,
1
);
border-radius
:
4px
;
flex-direction
:
column
;
}
.func
{
display
:
flex
;
flex-direction
:
column
;
/* height: 90px; */
padding
:
5px
0
;
}
.tip
{
font-size
:
16px
;
color
:
rgba
(
51
,
51
,
51
,
1
);
position
:
absolute
;
right
:
45px
;
top
:
10px
;
}
.saveDiv
{
display
:
flex
;
justify-content
:
flex-end
;
margin
:
0
20px
;
padding-top
:
10px
;
}
label
{
/* width: auto; */
/* width: 200px; */
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
.label-box
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
.dialog
input
{
width
:
100%
!important
;
}
.dialog
label
input
{
width
:
20px
!important
;
height
:
20px
!important
;
margin
:
0
10px
!important
;
}
.cover
{
width
:
100%
;
height
:
100px
;
background
:
rgba
(
247
,
247
,
247
,
1
);
border-radius
:
4px
;
border
:
1px
solid
rgba
(
238
,
238
,
238
,
1
);
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.cover-img
{
width
:
300px
;
cursor
:
pointer
;
background-repeat
:
no-repeat
;
background-position
:
center
;
background-size
:
cover
;
height
:
300px
;
}
.icon-cover
{
width
:
34px
;
height
:
34px
;
background-image
:
url("/static/images/icon_cover.png")
;
background-size
:
100%
;
background-repeat
:
no-repeat
;
}
.section
{
width
:
100%
!important
;
display
:
flex
;
flex-direction
:
column
;
}
.section-box
{
width
:
100%
!important
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
.rule-field
tbody
tr
td
:first-child
{
padding-left
:
0
!important
;
height
:
auto
!important
;
}
tbody
tr
td
{
font-size
:
15px
!important
;
}
input
[
type
=
checkbox
]
::before
{
border
:
none
!important
;
background
:
none
!important
;
}
input
[
type
=
checkbox
]
:checked::before
{
border
:
none
!important
;
background
:
none
!important
;
}
input
[
type
=
checkbox
]
{
top
:
0
;
left
:
0
;
}
</style>
</head>
<body>
<jsp:include
page=
"../common/header.jsp"
></jsp:include>
<div
class=
"page-content d-flex align-items-stretch main-body"
>
<jsp:include
page=
"../common/menu.jsp"
></jsp:include>
<div
class=
"rght"
id=
"service"
>
<div
class=
"section"
>
<div>
<h3
class=
"title"
>
自助服务
</h3>
<div
class=
"add-btn"
@
click=
"addService"
>
<span>
+
</span>
<span>
添加自助服务
</span>
</div>
</div>
<div
class=
"btn-toolbar flex justify-between"
role=
"toolbar"
aria-label=
"Toolbar with button groups"
>
<div
class=
"btn-group mr-2"
role=
"group"
aria-label=
"First group"
>
<button
:class=
"[index==moduleIndex?'btn-danger':'btn-default']"
@
click=
"changeType(index)"
type=
"button"
v-for=
"(type,index) in moduleOptions"
:key=
"type.name"
class=
"btn btn-sm"
>
{{type.name}}
</button>
</div>
<div
class=
"input-group mr-2"
>
<input
type=
"text"
class=
"form-control"
placeholder=
"请输入搜索关键字"
@
keyup
.
enter=
"queryAll"
v-model=
"keyword"
aria-label=
"Input group example"
aria-describedby=
"btnGroupAddon"
>
</div>
<button
class=
"btn btn-sm ml-auto "
:class=
"{
'btn-danger':keyword
}"
@
click=
"queryAll"
>
搜索
</button>
</div>
</div>
<div
style=
"margin-top: -10px;margin-bottom: 50px"
>
<table
style=
"width: 100%"
class=
"rule-field"
>
<colgroup>
<col
style=
"width:15%;"
>
<col
style=
"width:35%;"
>
<col
style=
"width:10%;"
>
<col
style=
"width:10%;"
>
<col
style=
"width:10%;"
>
<col
style=
"width:20%;"
>
</colgroup>
<thead>
<tr>
<th
style=
"text-align: center"
>
封面
</th>
<th
style=
"text-align: left"
>
服务名称
</th>
<th
style=
"text-align: center"
>
服务类型
</th>
<th
style=
"text-align: center"
>
子
类型
</th>
<th
style=
"text-align: center"
>
状态
</th>
<th
style=
"text-align: center"
>
操作
</th>
</tr>
</thead>
<tbody>
<tr
v-if=
""
v-for=
"item in list"
:data-id=
"item.id"
>
<td
style=
"text-align: center"
>
<img
:src=
"item.imgUrl"
style=
"width:80px;height:80px;object-fit:cover;"
/>
</td>
<td
class=
"name"
style=
"text-align: left;"
>
<span
v-text=
"item.title"
></span>
</td>
<td
style=
"text-align: center"
>
<span
v-if=
"item.type"
v-text=
"serviceType
s[item.type].name"
></span>
<span
v-else
>
未设置
</span>
</td>
<td
style=
"text-align: center"
>
<span
v-text=
"item.category
Name"
></span>
</td>
<td
style=
"text-align: center"
>
搜索
</button>
</div>
</div>
<div
style=
"margin-top: -10px;margin-bottom: 50px"
>
<table
style=
"width: 100%"
class=
"rule-field"
>
<colgroup>
<col
style=
"width:15%;"
>
<col
style=
"width:35%;"
>
<col
style=
"width:10%;"
>
<col
style=
"width:10%;"
>
<col
style=
"width:10%;"
>
<col
style=
"width:20%;"
>
</colgroup>
<thead>
<tr>
<th
style=
"text-align: center"
>
封面
</th>
<th
style=
"text-align: left"
>
服务名称
</th>
<th
style=
"text-align: center"
>
服务类型
</th>
<th
style=
"text-align: center"
>
类型
</th>
<th
style=
"text-align: center"
>
状态
</th>
<th
style=
"text-align: center"
>
操作
</th>
</tr>
</thead>
<tbody>
<tr
v-if=
""
v-for=
"item in list"
:data-id=
"item.id"
>
<td
style=
"text-align: center"
>
<img
:src=
"item.imgUrl"
style=
"width:80px;height:80px;object-fit:cover;"
/>
</td>
<td
class=
"name"
style=
"text-align: left;"
>
<span
v-text=
"item.title"
></span>
</td>
<td
style=
"text-align: center"
>
<span
v-if=
"item.type"
v-text=
"typeOption
s[item.type].name"
></span>
<span
v-else
>
未设置
</span>
</td>
<td
style=
"text-align: center"
>
<span
v-text=
"item.module
Name"
></span>
</td>
<td
style=
"text-align: center"
>
<span
class=
"badge badge-pill"
:class=
"[item.status==1?'badge-success':'badge-danger']"
v-text=
"statusType[item.status]"
></span>
</td>
<td
style=
"text-align: center"
>
<div
class=
"action"
>
<div
class=
"opt edit.opt"
@
click=
"showEdit(item.id)"
>
<span
class=
"icon-edit"
></span>
<span
class=
"edit"
>
:class=
"[item.status==1?'badge-success':'badge-danger']"
v-text=
"statusType[item.status]"
></span>
</td>
<td
style=
"text-align: center"
>
<div
class=
"action"
>
<div
class=
"opt edit.opt"
@
click=
"showEdit(item.id)"
>
<span
class=
"icon-edit"
></span>
<span
class=
"edit"
>
编辑
</span>
</div>
<div
class=
"opt del"
@
click=
"delService(item)"
>
<span
class=
"icon-del"
></span>
<span
class=
"del"
>
</div>
<div
class=
"opt del"
@
click=
"delService(item)"
>
<span
class=
"icon-del"
></span>
<span
class=
"del"
>
删除
</span>
</div>
<div
class=
"opt download"
@
click=
"downloadService(item)"
v-if=
"item.type =='9'"
>
</div>
<div
class=
"opt download"
@
click=
"downloadService(item)"
v-if=
"item.type =='9'"
>
<span
class=
"edit"
>
下载二维码
</span>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<nav
class=
"mt-2"
aria-label=
"Page navigation"
>
<ul
class=
"pagination"
>
<li
class=
"page-item"
v-if=
"page!==1"
@
click=
"preview"
><a
class=
"page-link"
href=
"#"
>
Previous
</a></li>
<li
@
click=
"changePage(item+1)"
v-for=
"item,index in totalPage"
:key=
"item+'page'"
class=
"page-item"
:class=
"{active:(index+1)==page}"
>
<a
class=
"page-link"
href=
"#"
>
{{item}}
</a>
</li>
<li
class=
"page-item"
v-if=
"list.length===pageSize"
@
click=
"next"
><a
class=
"page-link"
href=
"#"
>
Next
</a></li>
</ul>
</nav>
</div>
<div
class=
"dialog"
v-show=
"dialog"
style=
"width:auto;height: 80vh; z-index: 99;display: flex;flex-direction: column;left: 50%;
</div>
</div>
</td>
</tr>
</tbody>
</table>
<nav
class=
"mt-2"
aria-label=
"Page navigation"
>
<ul
class=
"pagination"
>
<li
class=
"page-item"
v-if=
"page!==1"
@
click=
"preview"
><a
class=
"page-link"
href=
"#"
>
Previous
</a></li>
<li
@
click=
"changePage(item+1)"
v-for=
"item,index in totalPage"
:key=
"item+'page'"
class=
"page-item"
:class=
"{active:(index+1)==page}"
>
<a
class=
"page-link"
href=
"#"
>
{{item}}
</a>
</li>
<li
class=
"page-item"
v-if=
"list.length===pageSize"
@
click=
"next"
><a
class=
"page-link"
href=
"#"
>
Next
</a></li>
</ul>
</nav>
</div>
<div
class=
"dialog"
v-show=
"dialog"
style=
"width:auto;height: 80vh; z-index: 99;display: flex;flex-direction: column;left: 50%;
transform: translateX(-50%);margin-left:0;"
>
<div>
<span
class=
"title"
style=
"margin-bottom: 10px; color: #CE3939"
>
{{title}}
</span>
</div>
<div
style=
"display: flex;flex-direction: column;flex:1;overflow-y: auto;"
>
<div
class=
"func"
>
<div>
<span
class=
"title-new"
>
名称
</span>
</div>
<div>
<input
class=
"input"
type=
"text"
v-model=
"service.title"
placeholder=
"请输入功能名称,最多五个字符"
>
</div>
</div>
<!-- 类型 (type) // 服务类型(3:特色民宿:4:旅游景点,5:特色餐饮 6:当地特产 7: 应急避险 8: 医疗点位 9:运动产品) -->
<div
class=
"func"
>
<span
class=
"title-new"
>
服务类型
</span>
<div
class=
"label-box"
>
<label
v-for=
"item in modules"
:key=
"item.id"
>
<input
type=
"radio"
v-model=
"service.type"
:value=
"item.id"
>
{{item.name}}
</label>
</div>
</div>
<!-- 类型 (type) -->
<div
class=
"func"
>
<span
class=
"title-new"
>
子类型
</span>
<div
class=
"label-box"
>
<label
v-for=
"item in categoryOptions"
:key=
"item.value"
>
<input
type=
"checkbox"
v-model=
"service.category"
:value=
"item.value"
>
{{item.name}}
</label>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
地址
</span>
<div>
<input
class=
"input"
type=
"text"
v-model=
"service.address"
placeholder=
"请输入地址"
>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
经度
</span>
<div>
<input
class=
"input"
type=
"number"
v-model=
"service.lng"
placeholder=
"请输入经度(如:106.639824000000000)"
>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
纬度
</span>
<div>
<input
class=
"input"
type=
"number"
v-model=
"service.lat"
placeholder=
"请输入纬度(如:26.672005000000000)"
>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
封面
</span>
<span
style=
"font-size: 16px;color: #ce3939;margin:10px 0;"
>
<div>
<span
class=
"title"
style=
"margin-bottom: 10px; color: #CE3939"
>
{{title}}
</span>
</div>
<div
style=
"display: flex;flex-direction: column;flex:1;overflow-y: auto;"
>
<div
class=
"func"
>
<div>
<span
class=
"title-new"
>
名称
</span>
</div>
<div>
<input
class=
"input"
type=
"text"
v-model=
"service.title"
placeholder=
"请输入标题"
>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
分类
</span>
<div
class=
"label-box"
>
<label
v-for=
"item in modules"
:key=
"item.id"
>
<input
type=
"radio"
v-model=
"service.moduleId"
:value=
"item.id"
>
{{item.name}}
</label>
</div>
</div>
<!-- 类型 (type) -->
<div
class=
"func"
>
<span
class=
"title-new"
>
类型
</span>
<div
class=
"label-box"
>
<label
v-for=
"item in typeOptions"
:key=
"item.value"
>
<input
type=
"radio"
v-model=
"service.type"
:value=
"item.value"
>
{{item.name}}
</label>
</div>
</div>
<div
class=
"func"
v-if=
"service.type == 2"
>
<span
class=
"title-new"
>
appId
</span>
<div>
<input
class=
"input"
type=
"text"
v-model=
"service.appId"
placeholder=
"请输入小程序appId"
>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
{{typeDesc[service.type].label}}
</span>
<div>
<input
class=
"input"
type=
"text"
v-model=
"service.path"
:placeholder=
"typeDesc[service.type].placeholder"
>
</div>
</div>
<div
class=
"func"
v-if=
"service.type==7"
>
<span
class=
"title-new"
>
地址
</span>
<div>
<input
class=
"input"
type=
"text"
v-model=
"service.address"
placeholder=
"请输入地址"
>
</div>
</div>
<div
class=
"func"
v-if=
"service.type==7"
>
<span
class=
"title-new"
>
经度
</span>
<div>
<input
class=
"input"
type=
"number"
v-model=
"service.lng"
placeholder=
"请输入经度(如:106.639824000000000)"
>
</div>
</div>
<div
class=
"func"
v-if=
"service.type==7"
>
<span
class=
"title-new"
>
纬度
</span>
<div>
<input
class=
"input"
type=
"number"
v-model=
"service.lat"
placeholder=
"请输入纬度(如:26.672005000000000)"
>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
图标
</span>
<span
style=
"font-size: 16px;color: #ce3939;margin:10px 0;"
>
<span
style=
"font-size: 12px;display: inline-block;border-radius: 50%;height: 18px;width: 18px;background: #ce3939;color: white;text-align: center;"
>
注
</span>
<span
style=
"display: inline"
>
建议分辨率80*80
</span>
</span>
<div>
<label
for=
"iconUrl"
>
<div
v-if=
"!service.iconUrl"
class=
"cover"
>
<span
class=
"icon-cover"
></span>
</div>
<img
v-else
class=
"cover cover-img"
:src=
"service.iconUrl"
/>
</label>
<input
id=
"ioconUrl"
type=
"file"
style=
"display: none"
@
change=
"uploadIconFile"
>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
封面
</span>
<span
style=
"font-size: 16px;color: #ce3939;margin:10px 0;"
>
<span
style=
"font-size: 12px;display: inline-block;border-radius: 50%;height: 18px;width: 18px;background: #ce3939;color: white;text-align: center;"
>
注
</span>
style=
"font-size: 12px;display: inline-block;border-radius: 50%;height: 18px;width: 18px;background: #ce3939;color: white;text-align: center;"
>
注
</span>
<span
style=
"display: inline"
>
建议分辨率500*500
</span>
</span>
<div>
<label
for=
"file"
>
<div
v-if=
"!service.imgUrl"
class=
"cover"
>
<span
class=
"icon-cover"
></span>
<div>
<label
for=
"file"
>
<div
v-if=
"!service.imgUrl"
class=
"cover"
>
<span
class=
"icon-cover"
></span>
</div>
<img
v-else
class=
"cover cover-img"
:src=
"service.imgUrl"
/>
</label>
<input
id=
"file"
type=
"file"
style=
"display: none"
@
change=
"uploadFile"
>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
内容
</span>
<div
id=
"container"
></div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
备注 1
</span>
<div>
<input
class=
"input"
type=
"text"
v-model=
"service.remark1"
placeholder=
"请输入备注 1"
>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
联系方式
</span>
<div>
<input
class=
"input"
type=
"text"
v-model=
"service.remark2"
placeholder=
"请输入备注 2"
>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
备注 3
</span>
<div>
<input
class=
"input"
type=
"text"
v-model=
"service.remark3"
placeholder=
"请输入备注 3"
>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
备注 4
</span>
<div>
<input
class=
"input"
type=
"text"
v-model=
"service.remark4"
placeholder=
"请输入备注 4"
>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
状态
</span>
<div
class=
"label-box"
>
<label>
<input
type=
"radio"
v-model=
"service.status"
value=
"0"
>
草稿
</label>
<label>
<input
type=
"radio"
v-model=
"service.status"
value=
"1"
>
发布
</label>
</div>
</div>
</div>
<div
class=
"saveDiv"
>
<span
@
click=
"cancel"
class=
"cancel"
>
取消
</span>
<span
@
click=
"submit"
class=
"submit"
>
保存
</span>
</div>
</div>
<div
v-if=
"dialog"
style=
"position: fixed;height: 100%;width: 100%;background: black;z-index: 10;opacity: 0.5;top:0px;left:0px"
>
</div>
</div>
<img
v-else
class=
"cover cover-img"
:src=
"service.imgUrl"
/>
</label>
<input
id=
"file"
type=
"file"
style=
"display: none"
@
change=
"uploadFile"
>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
内容
</span>
<div
id=
"container"
></div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
备注 1
</span>
<div>
<input
class=
"input"
type=
"text"
v-model=
"service.remark1"
placeholder=
"请输入备注 1"
>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
联系方式
</span>
<div>
<input
class=
"input"
type=
"text"
v-model=
"service.remark2"
placeholder=
"请输入备注 2"
>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
备注 3
</span>
<div>
<input
class=
"input"
type=
"text"
v-model=
"service.remark3"
placeholder=
"请输入备注 3"
>
</div>
</div>
<div
class=
"func"
>
<span
class=
"title-new"
>
备注 4
</span>
<div>
<input
class=
"input"
type=
"text"
v-model=
"service.remark4"
placeholder=
"请输入备注 4"
>
</div>
</div>
<!-- 状态 (status) -->
<div
class=
"func"
>
<span
class=
"title-new"
>
状态
</span>
<div
class=
"label-box"
>
<label>
<input
type=
"radio"
v-model=
"service.status"
value=
"0"
>
草稿
</label>
<label>
<input
type=
"radio"
v-model=
"service.status"
value=
"1"
>
发布
</label>
</div>
</div>
</div>
<div
class=
"saveDiv"
>
<span
@
click=
"cancel"
class=
"cancel"
>
取消
</span>
<span
@
click=
"submit"
class=
"submit"
>
保存
</span>
</div>
</div>
<div
v-show=
"dialog"
style=
"position: fixed;height: 100%;width: 100%;background: black;z-index: 10;opacity: 0.5;top:0px;left:0px"
>
</div>
</div>
<script
src=
"${ctxStatic}/vue/vue.js"
></script>
<script>
var
app
=
new
Vue
({
el
:
'#sevice'
,
data
:
{
editor
:
null
,
list
:
[],
dialog
:
false
,
title
:
'新增自助服务'
,
service
:
{
"id"
:
null
,
"userId"
:
getUId
(),
"cmptId"
:
getCId
(),
"type"
:
3
,
// 服务类型(3:特色民宿:4:旅游景点,5:特色餐饮 6:当地特产 7: 应急避险 8: 医疗点位 9:运动产品)
"category"
:
1
,
// 子类型(1:打卡点,2:服务驿站,3:民宿:4:景点,5:餐饮)
"title"
:
null
,
"address"
:
null
,
"lng"
:
null
,
"lat"
:
null
,
"content"
:
null
,
"imgUrl"
:
null
,
"remark1"
:
null
,
"remark2"
:
null
,
"remark3"
:
null
,
"remark4"
:
null
,
"status"
:
[],
// 状态(0:草稿 1:发布)
"delFlg"
:
null
// 删除状态(0:未删除 1:已删除)
},
typeIndex
:
0
,
keyword
:
''
,
page
:
1
,
pageSize
:
10
,
totalPage
:
1
,
// 3:特色民宿:4:旅游景点,5:特色餐饮 6:当地特产 7: 应急避险 8: 医疗点位 9:运动产品
serviceTypes
:
{},
modules
:
[],
// 子类目
categoryOptions
:
[
{
name
:
'打卡点'
,
value
:
1
,
},
{
name
:
'服务驿站'
,
value
:
2
,
},
{
name
:
'民宿'
,
value
:
3
,
},
{
name
:
'景点'
,
value
:
4
,
},
{
name
:
'餐饮'
,
value
:
5
,
},
],
statusType
:
{
0
:
'草稿'
,
1
:
'发布'
}
},
mounted
()
{
const
editor
=
UE
.
getEditor
(
'container'
);
this
.
editor
=
editor
},
methods
:
{
// // 下载签到二维码
downloadService
(
item
)
{
const
url
=
`/gk/richText/qrCode/`
+
item
.
id
;
fetch
(
url
,
{
method
:
'GET'
,
headers
:
{
'Content-Type'
:
'application/json'
}
})
.
then
(
response
=>
{
if
(
!
response
.
ok
)
{
throw
new
Error
(
'Network response was not ok'
);
}
return
response
.
blob
();
})
.
then
(
blob
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
blob
);
const
a
=
document
.
createElement
(
'a'
);
a
.
style
.
display
=
'none'
;
a
.
href
=
url
;
a
.
download
=
'qrcode.png'
;
// 设置下载文件的名称
document
.
body
.
appendChild
(
a
);
a
.
click
();
window
.
URL
.
revokeObjectURL
(
url
);
layer
.
msg
(
'下载成功!'
);
})
.
catch
(
error
=>
{
console
.
error
(
'There was a problem with the fetch operation:'
,
error
);
layer
.
msg
(
'下载失败,请重试!'
);
})
.
finally
(()
=>
{
layer
.
closeAll
();
app
.
queryAll
();
});
layer
.
load
();
},
// 展示dialog
addService
()
{
this
.
dialog
=
!
this
.
dialog
;
this
.
resetForm
();
},
changePage
(
page
)
{
this
.
page
=
page
this
.
queryAll
()
},
changeType
(
index
)
{
this
.
page
=
1
this
.
typeIndex
=
index
this
.
queryAll
()
},
next
()
{
this
.
page
+=
1
this
.
queryAll
()
},
preview
()
{
this
.
page
-=
1
this
.
queryAll
()
},
// 重置表单
resetForm
()
{
this
.
service
=
{
id
:
null
,
userId
:
getUId
(),
cmptId
:
getCId
(),
type
:
this
.
serviceTypes
[
this
.
typeIndex
].
id
,
title
:
''
,
address
:
null
,
lng
:
null
,
lat
:
null
,
content
:
null
,
imgUrl
:
null
,
remark1
:
null
,
remark2
:
null
,
remark3
:
null
,
remark4
:
null
,
status
:
1
,
delFlg
:
null
,
category
:
[]
};
},
// 编辑
showEdit
(
id
)
{
this
.
getDetail
(
id
);
},
// 删除
delService
(
data
)
{
layer
.
confirm
(
"确认要删除吗?"
,
function
()
{
$
.
ajax
({
url
:
'/gk/richText/delete'
,
data
:
JSON
.
stringify
(
data
),
// 将 data 转换为 JSON 字符串
type
:
'post'
,
contentType
:
'application/json'
,
beforeSend
:
()
=>
{
layer
.
load
()
},
success
:
()
=>
{
layer
.
msg
(
'删除成功!'
);
},
complete
:
()
=>
{
layer
.
closeAll
()
app
.
queryAll
();
}
});
});
},
// 保存
submit
()
{
const
service
=
{
...
this
.
service
}
// 假设 service 对象已经定义并初始化
if
(
!
service
.
imgUrl
)
{
layer
.
msg
(
"封面不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
return
;
}
if
(
!
service
.
title
)
{
layer
.
msg
(
"标题不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
return
;
}
if
(
!
service
.
address
)
{
layer
.
msg
(
"地址不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
return
;
}
if
(
!
service
.
lng
||
!
service
.
lat
)
{
layer
.
msg
(
"经纬度不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
return
;
}
var
content
=
this
.
editor
.
getContent
();
if
(
!
content
)
{
layer
.
msg
(
"内容不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
return
;
}
service
.
content
=
content
service
.
category
=
service
.
category
.
join
(
','
)
const
url
=
this
.
service
.
id
?
'/gk/richText/update'
:
'/gk/richText/add'
$
.
ajax
({
url
:
url
,
data
:
JSON
.
stringify
(
service
),
// 将 data 转换为 JSON 字符串
type
:
'post'
,
contentType
:
'application/json'
,
beforeSend
:
()
=>
{
layer
.
load
()
},
success
:
(
data
)
=>
{
layer
.
msg
(
'保存成功!'
);
app
.
$data
.
dialog
=
false
;
app
.
queryAll
();
},
complete
:
()
=>
{
layer
.
closeAll
()
}
})
},
// 返回
cancel
()
{
this
.
dialog
=
false
;
},
queryModules
()
{
if
(
!
getCId
)
return
const
url
=
'/gk/module/list?status=1'
$
.
ajax
({
type
:
'GET'
,
contentType
:
'application/json'
,
url
,
beforeSend
:
()
=>
{
layer
.
load
()
},
complete
:
()
=>
{
layer
.
closeAll
()
},
success
:
(
data
)
=>
{
const
filters
=
data
.
content
.
filter
(
v
=>
v
.
name
!==
'天气服务'
)
let
list
=
filters
.
map
(
item
=>
{
return
{
[
item
.
id
]:
{
value
:
item
.
id
,
name
:
item
.
name
<script
src=
"${ctxStatic}/vue/vue.js"
></script>
<script>
var
app
=
new
Vue
({
el
:
'#service'
,
data
:
{
editor
:
null
,
list
:
[],
dialog
:
false
,
title
:
'新增自助服务'
,
service
:
{
"id"
:
null
,
"userId"
:
getUId
(),
// 用户id
"cmptId"
:
getCId
(),
// 赛事id
"type"
:
4
,
// 类型配置(1 网页 2 小程序(appId,path) 3 短连接(#小程序://) 4 页面(小程序) 5文档word,pdf 6 图片 png 7 定位)
"moduleId"
:
null
,
//
"title"
:
null
,
// 标题
"address"
:
null
,
// 地址
"lng"
:
null
,
// 精度
"lat"
:
null
,
// 维度
"content"
:
null
,
// 内容
"imgUrl"
:
null
,
// 图片地址
"remark1"
:
null
,
// 备注项1
"remark2"
:
null
,
// 备注项2 电话
"remark3"
:
null
,
// 备注项目3
"remark4"
:
null
,
// 备注项4
"status"
:
[],
// 状态(0:草稿 1:发布)
"delFlg"
:
null
,
// 删除状态(0:未删除 1:已删除)
"appId"
:
null
,
// 小程序appid
"path"
:
null
,
// 小程序路径/文件地址/图片地址
},
moduleIndex
:
0
,
keyword
:
''
,
page
:
1
,
pageSize
:
10
,
totalPage
:
1
,
// 3:特色民宿:4:旅游景点,5:特色餐饮 6:当地特产 7: 应急避险 8: 医疗点位 9:运动产品
moduleOptions
:
{},
modules
:
[],
// 子类目 类型配置(1 网页 2 小程序(appId,path) 3 短连接(#小程序://) 4 页面(小程序) 5文档word,pdf 6 图片 png)
typeDesc
:
{
1
:
{
label
:
'网页'
,
placeholder
:
'请输入网页地址'
,
},
2
:
{
label
:
'小程序'
,
placeholder
:
'请输入小程序地址'
,
},
3
:
{
label
:
'短连接'
,
placeholder
:
'请输入短连接地址'
,
},
4
:
{
label
:
'页面'
,
placeholder
:
'请输入页面地址'
,
},
5
:
{
label
:
'文档'
,
placeholder
:
'请输入文档地址'
,
},
6
:
{
label
:
'图片'
,
placeholder
:
'请输入图片地址'
,
}
},
typeOptions
:
[
{
name
:
'H5'
,
value
:
1
,
},
{
name
:
'小程序'
,
value
:
2
,
},
{
name
:
'短连接'
,
value
:
3
,
},
{
name
:
'内部页面'
,
value
:
4
,
},
{
name
:
'文档'
,
value
:
5
,
},
{
name
:
'图片'
,
value
:
6
,
}
],
statusType
:
{
0
:
'草稿'
,
1
:
'发布'
}
},
mounted
()
{
const
editor
=
UE
.
getEditor
(
'container'
);
this
.
editor
=
editor
},
methods
:
{
// // 下载签到二维码
// downloadService(item) {
// const url = `/gk/richText/qrCode/` + item.id;
// fetch(url, {
// method: 'GET',
// headers: {
// 'Content-Type': 'application/json'
// }
// })
// .then(response => {
// if (!response.ok) {
// throw new Error('Network response was not ok');
// }
// return response.blob();
// })
// .then(blob => {
// const url = window.URL.createObjectURL(blob);
// const a = document.createElement('a');
// a.style.display = 'none';
// a.href = url;
// a.download = 'qrcode.png'; // 设置下载文件的名称
// document.body.appendChild(a);
// a.click();
// window.URL.revokeObjectURL(url);
// layer.msg('下载成功!');
// })
// .catch(error => {
// console.error('There was a problem with the fetch operation:', error);
// layer.msg('下载失败,请重试!');
// })
// .finally(() => {
// layer.closeAll();
// app.queryAll();
// });
// layer.load();
// },
// 展示dialog
addService
()
{
if
(
this
.
modules
.
length
===
0
)
{
layer
.
msg
(
'请先设置分类'
);
return
;
}
this
.
dialog
=
!
this
.
dialog
;
this
.
resetForm
();
},
changePage
(
page
)
{
this
.
page
=
page
this
.
queryAll
()
},
changeType
(
index
)
{
this
.
page
=
1
this
.
moduleIndex
=
index
this
.
queryAll
()
},
next
()
{
this
.
page
+=
1
this
.
queryAll
()
},
preview
()
{
this
.
page
-=
1
this
.
queryAll
()
},
// 重置表单
resetForm
()
{
this
.
service
=
{
id
:
null
,
userId
:
getUId
(),
cmptId
:
getCId
(),
type
:
4
,
title
:
''
,
address
:
null
,
lng
:
null
,
moduleId
:
this
.
modules
.
length
>
0
?
this
.
modules
[
0
].
id
:
null
,
appId
:
null
,
path
:
null
,
lat
:
null
,
content
:
null
,
imgUrl
:
null
,
remark1
:
null
,
remark2
:
null
,
remark3
:
null
,
remark4
:
null
,
status
:
1
,
delFlg
:
null
,
};
},
// 编辑
showEdit
(
id
)
{
this
.
getDetail
(
id
);
},
// 删除
delService
(
data
)
{
layer
.
confirm
(
"确认要删除吗?"
,
function
()
{
$
.
ajax
({
url
:
'/gk/richText/delete'
,
data
:
JSON
.
stringify
(
data
),
// 将 data 转换为 JSON 字符串
type
:
'post'
,
contentType
:
'application/json'
,
beforeSend
:
()
=>
{
layer
.
load
()
},
success
:
()
=>
{
layer
.
msg
(
'删除成功!'
);
},
complete
:
()
=>
{
layer
.
closeAll
()
app
.
queryAll
();
}
});
});
},
// 保存
submit
()
{
const
service
=
{
...
this
.
service
}
// 假设 service 对象已经定义并初始化
if
(
!
service
.
title
)
{
layer
.
msg
(
"标题不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
return
;
}
var
content
=
this
.
editor
.
getContent
();
if
(
!
content
)
{
layer
.
msg
(
"内容不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
return
;
}
service
.
content
=
content
const
url
=
this
.
service
.
id
?
'/gk/richText/update'
:
'/gk/richText/add'
$
.
ajax
({
url
:
url
,
data
:
JSON
.
stringify
(
service
),
// 将 data 转换为 JSON 字符串
type
:
'post'
,
contentType
:
'application/json'
,
beforeSend
:
()
=>
{
layer
.
load
()
},
success
:
(
data
)
=>
{
if
(
data
.
code
==
200
)
{
layer
.
msg
(
'保存成功!'
);
app
.
$data
.
dialog
=
false
;
app
.
queryAll
();
}
else
{
layer
.
msg
(
data
.
msg
);
}
},
complete
:
()
=>
{
layer
.
closeAll
()
}
})
},
// 返回
cancel
()
{
this
.
dialog
=
false
;
},
queryModules
()
{
if
(
!
getCId
())
return
const
url
=
`/gk/module/list?status=1&cmptId=`
+
getCId
()
$
.
ajax
({
type
:
'GET'
,
contentType
:
'application/json'
,
url
,
beforeSend
:
()
=>
{
layer
.
load
()
},
complete
:
()
=>
{
layer
.
closeAll
()
},
success
:
(
data
)
=>
{
// const filters = data.content.filter(v => v.name !== '天气服务')
let
list
=
data
.
content
.
map
(
item
=>
{
return
{
[
item
.
id
]:
{
value
:
item
.
id
,
name
:
item
.
name
}
};
});
this
.
modules
=
data
.
content
list
.
unshift
({
0
:
{
value
:
0
,
name
:
'全部'
}
})
// 设置初始值
if
(
data
.
content
.
length
>
0
)
{
this
.
service
.
moduleId
=
data
.
content
[
0
].
id
}
this
.
moduleOptions
=
Object
.
assign
({},
...
list
);
this
.
queryAll
()
}
})
},
// 查询所有
queryAll
()
{
if
(
!
getCId
())
return
const
moduleId
=
this
.
moduleIndex
===
0
?
null
:
this
.
moduleOptions
[
this
.
moduleIndex
].
value
const
url
=
"/gk/richText/page/"
+
this
.
page
+
"/"
+
this
.
pageSize
$
.
ajax
({
type
:
'POST'
,
contentType
:
'application/json'
,
data
:
JSON
.
stringify
({
title
:
this
.
keyword
,
moduleId
,
cmptId
:
getCId
(),
}),
url
,
beforeSend
:
()
=>
{
layer
.
load
()
},
complete
:
()
=>
{
layer
.
closeAll
()
},
success
:
(
data
)
=>
{
this
.
list
=
data
.
content
.
map
(
service
=>
{
return
{
...
service
,
moduleName
:
this
.
modules
.
find
(
module
=>
module
.
id
===
service
.
moduleId
)?.
name
||
'未分类'
}
});
console
.
log
(
this
.
list
)
if
(
data
.
content
.
length
===
this
.
pageSize
)
this
.
totalPage
=
this
.
page
+
1
}
})
},
// 获取详情
getDetail
(
id
)
{
$
.
ajax
({
url
:
'/gk/richText/detail/'
+
id
,
success
:
(
data
)
=>
{
if
(
data
.
content
)
{
this
.
service
=
data
.
content
this
.
editor
.
setContent
(
data
.
content
.
content
)
this
.
dialog
=
true
;
}
},
beforeSend
:
()
=>
{
layer
.
load
()
},
complete
:
()
=>
{
layer
.
closeAll
()
},
});
},
//文件上传处理
uploadFile
(
obj
)
{
logoFile
=
obj
.
target
.
files
[
0
];
if
(
logoFile
.
type
&&
logoFile
.
type
.
indexOf
(
"image"
)
==
-
1
)
{
return
layer
.
msg
(
'请上传图片'
,
{
icon
:
5
})
}
var
reads
=
new
FileReader
();
reads
.
readAsDataURL
(
logoFile
);
reads
.
onload
=
function
()
{
//将处理完的图片文件上传到阿里云服务器
//上传LOGO图片
var
formData
=
new
FormData
();
formData
.
append
(
"uploadImg"
,
logoFile
);
$
.
ajax
({
url
:
'https://event.geexek.com/upload/file.do'
,
/*接口域名地址*/
type
:
'post'
,
data
:
formData
,
contentType
:
false
,
processData
:
false
,
success
:
function
(
res
)
{
console
.
log
({
res
});
if
(
res
.
code
==
"1"
)
{
layer
.
msg
(
'上传成功'
,
{
icon
:
1
,
time
:
1500
});
app
.
$data
.
service
.
imgUrl
=
res
.
result
console
.
log
(
app
.
$data
.
service
.
imgUrl
)
}
else
{
console
.
log
(
res
);
}
},
beforeSend
:
()
=>
{
layer
.
load
()
},
complete
:
()
=>
{
layer
.
closeAll
()
},
})
};
},
//文件上传处理
uploadIconFile
(
obj
)
{
logoFile
=
obj
.
target
.
files
[
0
];
if
(
logoFile
.
type
&&
logoFile
.
type
.
indexOf
(
"image"
)
==
-
1
)
{
return
layer
.
msg
(
'请上传图片'
,
{
icon
:
5
})
}
var
reads
=
new
FileReader
();
reads
.
readAsDataURL
(
logoFile
);
reads
.
onload
=
function
()
{
//将处理完的图片文件上传到阿里云服务器
//上传LOGO图片
var
formData
=
new
FormData
();
formData
.
append
(
"uploadImg"
,
logoFile
);
$
.
ajax
({
url
:
'https://event.geexek.com/upload/file.do'
,
/*接口域名地址*/
type
:
'post'
,
data
:
formData
,
contentType
:
false
,
processData
:
false
,
success
:
function
(
res
)
{
if
(
res
.
code
==
"1"
)
{
layer
.
msg
(
'上传成功'
,
{
icon
:
1
,
time
:
1500
});
app
.
$data
.
service
.
iconUrl
=
res
.
result
}
else
{
console
.
log
(
res
);
}
},
beforeSend
:
()
=>
{
layer
.
load
()
},
complete
:
()
=>
{
layer
.
closeAll
()
},
})
};
}
}
};
});
this
.
modules
=
filters
list
.
unshift
({
0
:
{
value
:
0
,
name
:
'全部'
}
})
this
.
serviceTypes
=
Object
.
assign
({},
...
list
);
console
.
log
(
this
.
serviceTypes
)
this
.
queryAll
()
}
})
},
// 查询所有
queryAll
()
{
if
(
!
getCId
)
return
const
type
=
this
.
serviceTypes
[
this
.
typeIndex
].
value
===
0
?
null
:
this
.
serviceTypes
[
this
.
typeIndex
].
value
const
url
=
'/gk/richText/page/'
+
this
.
page
+
'/'
+
this
.
pageSize
$
.
ajax
({
type
:
'POST'
,
contentType
:
'application/json'
,
data
:
JSON
.
stringify
({
type
,
title
:
this
.
keyword
,
cmptId
:
getCId
(),
}),
url
,
beforeSend
:
()
=>
{
layer
.
load
()
},
complete
:
()
=>
{
layer
.
closeAll
()
},
success
:
(
data
)
=>
{
this
.
list
=
data
.
content
.
map
(
service
=>
{
const
category
=
service
?.
category
?
service
.
category
.
split
(
","
)
:
[];
const
categoryName
=
this
.
categoryOptions
.
filter
(
v
=>
category
.
includes
(
v
.
value
.
toString
()))?.
map
((
v
)
=>
v
.
name
)?.
join
()
return
{
...
service
,
categoryName
:
categoryName
||
'未设置'
}
});
if
(
data
.
content
.
length
===
this
.
pageSize
)
this
.
totalPage
=
this
.
page
+
1
}
})
},
// 获取详情
getDetail
(
id
)
{
$
.
ajax
({
url
:
'/gk/richText/detail/'
+
id
,
success
:
(
data
)
=>
{
if
(
data
.
content
)
{
this
.
service
=
{
...
data
.
content
,
category
:
data
.
content
?.
category
?.
split
(
','
)
??
[]
};
this
.
editor
.
setContent
(
data
.
content
.
content
)
this
.
dialog
=
true
;
}
},
beforeSend
:
()
=>
{
layer
.
load
()
},
complete
:
()
=>
{
layer
.
closeAll
()
},
});
},
//文件上传处理
uploadFile
(
obj
)
{
logoFile
=
obj
.
target
.
files
[
0
];
if
(
logoFile
.
type
&&
logoFile
.
type
.
indexOf
(
"image"
)
==
-
1
)
{
return
layer
.
msg
(
'请上传图片'
,
{
icon
:
5
})
}
var
reads
=
new
FileReader
();
reads
.
readAsDataURL
(
logoFile
);
reads
.
onload
=
function
()
{
//将处理完的图片文件上传到阿里云服务器
//上传LOGO图片
var
formData
=
new
FormData
();
formData
.
append
(
"uploadImg"
,
logoFile
);
$
.
ajax
({
url
:
'https://event.geexek.com/upload/file.do'
,
/*接口域名地址*/
type
:
'post'
,
data
:
formData
,
contentType
:
false
,
processData
:
false
,
success
:
function
(
res
)
{
if
(
res
.
code
==
"1"
)
{
layer
.
msg
(
'上传成功'
,
{
icon
:
1
,
time
:
1500
});
app
.
$data
.
service
.
imgUrl
=
res
.
result
}
else
{
console
.
log
(
res
);
}
},
beforeSend
:
()
=>
{
layer
.
load
()
},
complete
:
()
=>
{
layer
.
closeAll
()
},
})
};
}
}
});
app
.
queryModules
();
</script>
</body>
</html>
\ No newline at end of file
});
app
.
queryModules
();
</script>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/views/common/menu.jsp
View file @
5622bf4a
<%@ page
language=
"java"
contentType=
"text/html; charset=utf-8"
pageEncoding=
"utf-8"
%>
<%@ taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%>
<style>
.menu-txt
{
font-size
:
18px
;
color
:
#333
;
}
ul
{
text-decoration
:
none
;
}
.base.active
.icon-base-setting
{
background
:
url(/static/images/manage/red-setting.png)
no-repeat
center
;
background-size
:
50%
;
}
.menu-item.active
{
color
:
#ce3939
;
opacity
:
0.9
;
box-shadow
:
0px
0px
8px
#ffdcdc
;
border-radius
:
4px
;
}
.menu-sub-item.active
{
}
.active
span
.menu-txt
{
color
:
#ce3939
;
font-weight
:
bold
;
}
.menu-hidden
{
display
:
none
;
}
.left-arrow
{
background
:
url(/static/images/left_arrow.png)
no-repeat
;
width
:
30px
;
display
:
none
;
height
:
30px
;
background-size
:
contain
;
position
:
absolute
;
left
:
26px
;
top
:
10px
;
background-color
:
#ffffff
!
Important
;
z-index
:
99999
;
}
.active
.left-arrow
{
display
:
inline-block
;
background
:
url(/static/images/left_arrow_select.png)
no-repeat
;
background-size
:
25%
;
background-position
:
center
;
}
.flex
{
display
:
flex
;
}
.flex-row
{
flex-direction
:
row
;
}
.flex-column
{
flex-direction
:
column
;
}
.icon-xingxiang
{
width
:
32px
;
height
:
34px
;
display
:
inline-block
;
background
:
url(/static/images/manage/iconset_grey.png)
no-repeat
center
;
background-size
:
50%
;
position
:
absolute
;
left
:
25px
;
top
:
6px
;
}
.active
.icon-xingxiang
{
background
:
url(/static/images/manage/iconset_red.png)
no-repeat
center
;
background-size
:
50%
;
}
.icon-function
{
width
:
32px
;
height
:
32px
;
display
:
inline-block
;
background
:
url(/static/images/manage/func_white.png)
no-repeat
center
;
background-size
:
50%
;
position
:
absolute
;
left
:
25px
;
top
:
6px
;
}
.active
.icon-function
{
background
:
url('/static/images/manage/function.png')
no-repeat
center
;
background-size
:
50%
;
}
.icon-base-setting
{
width
:
32px
;
height
:
32px
;
display
:
inline-block
;
background
:
url('/static/images/manage/base-setting.png')
no-repeat
center
;
background-size
:
50%
;
position
:
absolute
;
left
:
25px
;
top
:
6px
;
}
.menu-sub-item
{
position
:
relative
;
}
.meun-arrow
{
width
:
24px
;
height
:
12px
;
display
:
inline-block
;
background
:
url('/static/images/manage/down-arrow.png')
no-repeat
center
;
background-size
:
50%
;
position
:
absolute
;
right
:
45px
;
top
:
19px
;
}
.menu-sub-item
.menu-txt
{
font-size
:
16px
;
color
:
#999
;
}
.menu-sub-item
:first-child::after
{
content
:
""
;
height
:
29px
;
width
:
1px
;
background
:
#ce3939
;
position
:
absolute
;
left
:
43px
;
top
:
20px
;
}
.menu-sub-item
:last-child::after
{
content
:
""
;
height
:
29px
;
width
:
1px
;
background
:
#ce3939
;
position
:
absolute
;
left
:
43px
;
top
:
0px
;
}
.menu-sub-item
::after
{
content
:
""
;
height
:
49px
;
width
:
1px
;
background
:
#ce3939
;
position
:
absolute
;
left
:
43px
;
top
:
0px
;
}
.back-sec
{
list-style
:
none
;
height
:
40px
;
line-height
:
40px
;
text-align
:
center
;
font-size
:
20px
;
}
.yfb
.menu-sub-item
::after
{
background
:
#fff
;
}
.yfb
.menu-sub-item
:last-child::after
{
background
:
#fff
;
}
</style>
<input
type=
"hidden"
value=
"${cmpt.cmptId}"
id=
"cmpt"
>
<input
type=
"hidden"
value=
"${uId}"
id=
"uId"
>
<input
type=
"hidden"
value=
"${cId}"
id=
"cId"
>
<input
type=
"hidden"
value=
"${timestamp}"
id=
"timestamp"
>
<input
type=
"hidden"
value=
"${sign}"
id=
"sign"
>
<nav
class=
"side-navbar"
>
<c:choose>
<c:when
test=
"
${
yfb
}
"
>
<li
id=
"base"
style=
"display: none;"
></li>
<ul
class=
"yfb"
style=
"padding: 20px 0px;height: 460px;"
>
<li
class=
"data menu-sub-item"
>
<a
href=
"/easy/data/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
数据统计
</span>
</a>
</li>
<li
class=
"review menu-sub-item"
>
<a
href=
"/easy/review/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
成绩管理
</span>
</a>
</li>
<li
class=
"road menu-sub-item"
>
<a
href=
"/easy/road/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
路线导入
</span>
</a>
</li>
<li
class=
"menu-sub-item"
>
<a
href=
"/easy/me"
></span><span
class=
"menu-txt"
>
返回赛事
</span></a>
</li>
</ul>
</c:when>
<c:otherwise>
<ul
class=
"list-unstyled"
style=
"margin: 0px;height: 100%;"
>
<li
class=
"main menu-item"
>
<a
href=
"/gk/cmpt/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"icon-xingxiang"
></span>
<span
class=
"menu-txt"
>
形象管理
</span>
</a>
</li>
<ul
style=
"padding: 0px;margin: 15px 0px;"
>
<li
id=
"cmptSetting"
class=
"cmptSetting menu-item"
>
<a
href=
"/gk/cmpt/cmptSetting/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"icon-function"
></span>
<span
class=
"menu-txt"
>
功能管理
</span>
<%--<span class="meun-arrow"></span>--%>
</a>
</li>
<ul
class=
"collapse list-unstyled show"
style=
"padding: 0px"
>
<li
class=
"banner menu-sub-item"
>
<a
href=
"/gk/banner/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
赛事广告
</span>
</a>
</li>
<%@ taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%>
<style>
.menu-txt
{
font-size
:
18px
;
color
:
#333
;
}
<li
class=
"news menu-sub-item "
>
<a
href=
"/gk/news/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
赛事公告
</span>
</a>
</li>
<li
class=
"manual menu-sub-item"
>
<a
href=
"/gk/cmpt/manual/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
赛事手册
</span>
</a>
</li>
<li
class=
"contact menu-sub-item"
>
<a
href=
"/gk/contact/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
联系救援
</span>
</a>
</li>
<li
class=
"equip menu-sub-item"
>
<a
href=
"/gk/equip/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
强制装备
</span>
</a>
</li>
ul
{
text-decoration
:
none
;
}
<li
class=
"score menu-sub-item"
>
<a
href=
"/gk/score/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
提交成绩
</span>
</a>
</li>
<%-- <li class="auto menu-sub-item">
<a href="/gk/auto/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}">
<span class="left-arrow"></span>
<span class="menu-txt">自动打卡</span>
</a>
</li>--%>
<li
class=
"scan menu-sub-item"
>
<a
href=
"/gk/scan/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
扫码打卡
</span>
</a>
</li>
.base.active
.icon-base-setting
{
background
:
url(/static/images/manage/red-setting.png)
no-repeat
center
;
background-size
:
50%
;
}
.menu-item.active
{
color
:
#ce3939
;
opacity
:
0.9
;
box-shadow
:
0px
0px
8px
#ffdcdc
;
border-radius
:
4px
;
}
<li
class=
"cert menu-sub-item"
>
<a
href=
"/gk/cert/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
完赛证书
</span>
</a>
</li>
<li
class=
"customer menu-sub-item"
>
<a
href=
"/gk/customer/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
赛事客服
</span>
</a>
</li>
.menu-sub-item.active
{}
<li
class=
"outter-link menu-sub-item"
>
<a
href=
"/gk/outter-link/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
外链功能
</span>
</a>
</li>
.active
span
.menu-txt
{
color
:
#ce3939
;
font-weight
:
bold
;
<li
class=
"sure-letter menu-sub-item"
>
<a
href=
"/gk/sure-letter/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
确认函
</span>
</a>
</li>
}
.menu-hidden
{
display
:
none
;
}
.left-arrow
{
background
:
url(/static/images/left_arrow.png)
no-repeat
;
width
:
30px
;
display
:
none
;
height
:
30px
;
background-size
:
contain
;
position
:
absolute
;
left
:
26px
;
top
:
10px
;
background-color
:
#ffffff
!
Important
;
z-index
:
99999
;
}
.active
.left-arrow
{
display
:
inline-block
;
background
:
url(/static/images/left_arrow_select.png)
no-repeat
;
background-size
:
25%
;
background-position
:
center
;
}
.flex
{
display
:
flex
;
}
.flex-row
{
flex-direction
:
row
;
}
.flex-column
{
flex-direction
:
column
;
}
.icon-xingxiang
{
width
:
32px
;
height
:
34px
;
display
:
inline-block
;
background
:
url(/static/images/manage/iconset_grey.png)
no-repeat
center
;
background-size
:
50%
;
position
:
absolute
;
left
:
25px
;
top
:
6px
;
}
.active
.icon-xingxiang
{
background
:
url(/static/images/manage/iconset_red.png)
no-repeat
center
;
background-size
:
50%
;
}
.icon-function
{
width
:
32px
;
height
:
32px
;
display
:
inline-block
;
background
:
url(/static/images/manage/func_white.png)
no-repeat
center
;
background-size
:
50%
;
position
:
absolute
;
left
:
25px
;
top
:
6px
;
}
.active
.icon-function
{
background
:
url('/static/images/manage/function.png')
no-repeat
center
;
background-size
:
50%
;
}
.icon-base-setting
{
width
:
32px
;
height
:
32px
;
display
:
inline-block
;
background
:
url('/static/images/manage/base-setting.png')
no-repeat
center
;
background-size
:
50%
;
position
:
absolute
;
left
:
25px
;
top
:
6px
;
}
<li
class=
"rankSetting menu-sub-item"
>
<a
href=
"/gk/rankSetting/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
.menu-sub-item
{
position
:
relative
;
}
.meun-arrow
{
width
:
24px
;
height
:
12px
;
display
:
inline-block
;
background
:
url('/static/images/manage/down-arrow.png')
no-repeat
center
;
background-size
:
50%
;
position
:
absolute
;
right
:
45px
;
top
:
19px
;
}
.menu-sub-item
.menu-txt
{
font-size
:
16px
;
color
:
#999
;
}
.menu-sub-item
:first-child::after
{
content
:
""
;
height
:
29px
;
width
:
1px
;
background
:
#ce3939
;
position
:
absolute
;
left
:
43px
;
top
:
20px
;
}
.menu-sub-item
:last-child::after
{
content
:
""
;
height
:
29px
;
width
:
1px
;
background
:
#ce3939
;
position
:
absolute
;
left
:
43px
;
top
:
0px
;
}
.menu-sub-item
::after
{
content
:
""
;
height
:
49px
;
width
:
1px
;
background
:
#ce3939
;
position
:
absolute
;
left
:
43px
;
top
:
0px
;
}
.back-sec
{
list-style
:
none
;
height
:
40px
;
line-height
:
40px
;
text-align
:
center
;
font-size
:
20px
;
}
.yfb
.menu-sub-item
::after
{
background
:
#fff
;
}
.yfb
.menu-sub-item
:last-child::after
{
background
:
#fff
;
}
</style>
<input
type=
"hidden"
value=
"${cmpt.cmptId}"
id=
"cmpt"
>
<input
type=
"hidden"
value=
"${uId}"
id=
"uId"
>
<input
type=
"hidden"
value=
"${cId}"
id=
"cId"
>
<input
type=
"hidden"
value=
"${timestamp}"
id=
"timestamp"
>
<input
type=
"hidden"
value=
"${sign}"
id=
"sign"
>
<nav
class=
"side-navbar"
>
<c:choose>
<c:when
test=
"
${
yfb
}
"
>
<li
id=
"base"
style=
"display: none;"
></li>
<ul
class=
"yfb"
style=
"padding: 20px 0px;height: 460px;"
>
<li
class=
"data menu-sub-item"
>
<a
href=
"/easy/data/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
排行榜
</span>
<span
class=
"menu-txt"
>
数据统计
</span>
</a>
</li>
<li
class=
"service menu-sub-item"
>
<a
href=
"/gk/service/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<li
class=
"review menu-sub-item"
>
<a
href=
"/easy/review/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
自助服务
</span>
<span
class=
"menu-txt"
>
成绩管理
</span>
</a>
</li>
</ul>
</li>
</ul>
<ul
style=
"padding: 0px 0;"
>
<li
id=
"base"
class=
"base menu-item"
style=
"cursor: pointer"
>
<a>
<span
class=
"icon-base-setting"
></span>
<span
class=
"menu-txt"
>
基础设置
</span>
<span
class=
"arrow"
></span>
</a>
</li>
<ul
style=
"padding: 0px"
>
<li
class=
"road menu-sub-item"
>
<a
href=
"/gk/road/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<a
href=
"/easy/road/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
路线导入
</span>
</a>
</li>
<li
class=
"photo menu-sub-item"
>
<a
href=
"/gk/photo/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
相册设置
</span>
</a>
<li
class=
"menu-sub-item"
>
<a
href=
"/easy/me"
></span><span
class=
"menu-txt"
>
返回赛事
</span></a>
</li>
<li
class=
"rule menu-sub-item"
>
<a
href=
"/gk/rule/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
成绩规则
</span>
</ul>
</c:when>
<c:otherwise>
<ul
class=
"list-unstyled"
style=
"margin: 0px;height: 100%;"
>
<li
class=
"main menu-item"
>
<a
href=
"/gk/cmpt/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"icon-xingxiang"
></span>
<span
class=
"menu-txt"
>
形象管理
</span>
</a>
</li>
<ul
style=
"padding: 0px;margin: 15px 0px;"
>
<li
id=
"cmptSetting"
class=
"cmptSetting menu-item"
>
<a
href=
"/gk/cmpt/cmptSetting/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"icon-function"
></span>
<span
class=
"menu-txt"
>
功能管理
</span>
<%--<span class="meun-arrow"></span>--%>
</a>
</li>
<ul
class=
"collapse list-unstyled show"
style=
"padding: 0px"
>
<li
class=
"banner menu-sub-item"
>
<a
href=
"/gk/banner/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
赛事广告
</span>
</a>
</li>
<li
class=
"review menu-sub-item"
>
<a
href=
"/gk/review/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
成绩管理
</span>
</a>
</li>
<li
class=
"data menu-sub-item"
>
<a
href=
"/gk/data/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
成绩统计
</span>
</a>
</li>
<li
class=
"news menu-sub-item "
>
<a
href=
"/gk/news/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
赛事公告
</span>
</a>
</li>
<li
class=
"manual menu-sub-item"
>
<a
href=
"/gk/cmpt/manual/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
赛事手册
</span>
</a>
</li>
<li
class=
"contact menu-sub-item"
>
<a
href=
"/gk/contact/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
联系救援
</span>
</a>
</li>
<li
class=
"equip menu-sub-item"
>
<a
href=
"/gk/equip/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
强制装备
</span>
</a>
</li>
<li
class=
"score menu-sub-item"
>
<a
href=
"/gk/score/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
提交成绩
</span>
</a>
</li>
<%-- <li class="auto menu-sub-item">
<a
href="/gk/auto/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}">
<span class="left-arrow"></span>
<span class="menu-txt">自动打卡</span>
</a>
</li>--%>
<li
class=
"scan menu-sub-item"
>
<a
href=
"/gk/scan/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
扫码打卡
</span>
</a>
</li>
<li
class=
"cert menu-sub-item"
>
<a
href=
"/gk/cert/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
完赛证书
</span>
</a>
</li>
<li
class=
"customer menu-sub-item"
>
<a
href=
"/gk/customer/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
赛事客服
</span>
</a>
</li>
<li
class=
"outter-link menu-sub-item"
>
<a
href=
"/gk/outter-link/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
外链功能
</span>
</a>
</li>
<li
class=
"sure-letter menu-sub-item"
>
<a
href=
"/gk/sure-letter/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
确认函
</span>
</a>
</li>
<li
class=
"rankSetting menu-sub-item"
>
<a
href=
"/gk/rankSetting/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
排行榜
</span>
</a>
</li>
<li
class=
"service menu-sub-item"
>
<a
href=
"/gk/service/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
自助服务
</span>
</a>
</li>
<li
class=
"module menu-sub-item"
>
<a
href=
"/gk/module/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
分类管理
</span>
</a>
</li>
</ul>
</li>
</ul>
<ul
style=
"padding: 0px 0;"
>
<li
id=
"base"
class=
"base menu-item"
style=
"cursor: pointer"
>
<a>
<span
class=
"icon-base-setting"
></span>
<span
class=
"menu-txt"
>
基础设置
</span>
<span
class=
"arrow"
></span>
</a>
</li>
<ul
style=
"padding: 0px"
>
<li
class=
"road menu-sub-item"
>
<a
href=
"/gk/road/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
路线导入
</span>
</a>
</li>
<li
class=
"photo menu-sub-item"
>
<a
href=
"/gk/photo/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
相册设置
</span>
</a>
</li>
<li
class=
"rule menu-sub-item"
>
<a
href=
"/gk/rule/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
成绩规则
</span>
</a>
</li>
<li
class=
"review menu-sub-item"
>
<a
href=
"/gk/review/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
成绩管理
</span>
</a>
</li>
<li
class=
"data menu-sub-item"
>
<a
href=
"/gk/data/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
成绩统计
</span>
</a>
</li>
</ul>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</c:otherwise>
</c:choose>
</nav>
<script>
var
classes
=
[
'cmptSetting'
,
'nameList'
,
'manual'
,
'contact'
,
'manage'
,
'route'
,
'road'
,
'equip'
,
'photo'
,
'news'
,
'cert'
,
'data'
,
'banner'
,
'score'
,
'auto'
,
'scan'
,
'review'
,
'customer'
,
'rule'
,
'outter-link'
,
'sure-letter'
,
'rankSetting'
,
'service'
];
let
url
=
document
.
location
.
href
;
var
done
=
false
;
for
(
var
i
in
classes
)
{
if
(
url
.
indexOf
(
classes
[
i
])
>
-
1
)
{
document
.
getElementsByClassName
(
classes
[
i
])[
0
].
classList
.
add
(
'active'
);
if
(
classes
[
i
]
!=
'cmptSetting'
){
let
classesStr
=
document
.
getElementsByClassName
(
classes
[
i
])[
0
].
parentNode
.
parentNode
.
firstElementChild
.
classList
;
document
.
getElementsByClassName
(
classes
[
i
])[
0
].
parentNode
.
parentNode
.
firstElementChild
.
classList
.
add
(
'active'
);
if
(
classesStr
.
contains
(
'cmptSetting'
)){
if
(
document
.
getElementById
(
'base'
)){
document
.
getElementById
(
'base'
).
nextSibling
.
nextSibling
.
classList
.
add
(
'menu-hidden'
);
</c:otherwise>
</c:choose>
</nav>
<script>
var
classes
=
[
'cmptSetting'
,
'nameList'
,
'manual'
,
'contact'
,
'manage'
,
'route'
,
'road'
,
'equip'
,
'photo'
,
'news'
,
'cert'
,
'data'
,
'banner'
,
'score'
,
'auto'
,
'scan'
,
'review'
,
'customer'
,
'rule'
,
'outter-link'
,
'sure-letter'
,
'rankSetting'
,
'service'
,
"module"
];
let
url
=
document
.
location
.
href
;
var
done
=
false
;
for
(
var
i
in
classes
)
{
if
(
url
.
indexOf
(
classes
[
i
])
>
-
1
)
{
document
.
getElementsByClassName
(
classes
[
i
])[
0
].
classList
.
add
(
'active'
);
if
(
classes
[
i
]
!=
'cmptSetting'
)
{
let
classesStr
=
document
.
getElementsByClassName
(
classes
[
i
])[
0
].
parentNode
.
parentNode
.
firstElementChild
.
classList
;
document
.
getElementsByClassName
(
classes
[
i
])[
0
].
parentNode
.
parentNode
.
firstElementChild
.
classList
.
add
(
'active'
);
if
(
classesStr
.
contains
(
'cmptSetting'
))
{
if
(
document
.
getElementById
(
'base'
))
{
document
.
getElementById
(
'base'
).
nextSibling
.
nextSibling
.
classList
.
add
(
'menu-hidden'
);
}
}
else
{
if
(
document
.
getElementById
(
'cmptSetting'
))
{
document
.
getElementById
(
'cmptSetting'
).
nextSibling
.
nextSibling
.
classList
.
add
(
'menu-hidden'
);
}
}
}
else
{
if
(
document
.
getElementById
(
'cmptSetting'
))
{
document
.
getElementById
(
'cmptSetting'
).
nextSibling
.
nextSibling
.
classList
.
remove
(
'menu-hidden'
);
}
if
(
document
.
getElementById
(
'base'
))
{
document
.
getElementById
(
'base'
).
nextSibling
.
nextSibling
.
classList
.
add
(
'menu-hidden'
);
}
}
done
=
true
;
break
;
}
}
if
(
document
.
getElementById
(
'base'
))
{
document
.
getElementById
(
'base'
).
addEventListener
(
'click'
,
function
()
{
if
(
document
.
getElementById
(
'base'
))
{
document
.
getElementById
(
'base'
).
nextSibling
.
nextSibling
.
classList
.
remove
(
'menu-hidden'
);
}
}
else
{
if
(
document
.
getElementById
(
'cmptSetting'
)){
if
(
document
.
getElementById
(
'cmptSetting'
))
{
document
.
getElementById
(
'cmptSetting'
).
nextSibling
.
nextSibling
.
classList
.
add
(
'menu-hidden'
);
}
}
}
else
{
if
(
document
.
getElementById
(
'cmptSetting'
)){
document
.
getElementById
(
'cmptSetting'
).
nextSibling
.
nextSibling
.
classList
.
remove
(
'menu-hidden'
);
}
if
(
document
.
getElementById
(
'base'
)){
document
.
getElementById
(
'base'
).
nextSibling
.
nextSibling
.
classList
.
add
(
'menu-hidden'
);
}
window
.
scrollTo
(
0
,
0
);
});
}
done
=
true
;
break
;
}
}
if
(
document
.
getElementById
(
'base'
)){
document
.
getElementById
(
'base'
).
addEventListener
(
'click'
,
function
()
{
if
(
document
.
getElementById
(
'base'
)){
document
.
getElementById
(
'base'
).
nextSibling
.
nextSibling
.
classList
.
remove
(
'menu-hidden'
);
}
if
(
document
.
getElementById
(
'cmptSetting'
)){
if
(
!
done
)
{
var
classList
=
document
.
getElementsByClassName
(
'main'
)[
0
].
classList
;
classList
.
add
(
'active'
);
document
.
getElementById
(
'base'
).
nextSibling
.
nextSibling
.
classList
.
add
(
'menu-hidden'
);
document
.
getElementById
(
'cmptSetting'
).
nextSibling
.
nextSibling
.
classList
.
add
(
'menu-hidden'
);
}
window
.
scrollTo
(
0
,
0
);
});
}
if
(
!
done
)
{
var
classList
=
document
.
getElementsByClassName
(
'main'
)[
0
].
classList
;
classList
.
add
(
'active'
);
document
.
getElementById
(
'base'
).
nextSibling
.
nextSibling
.
classList
.
add
(
'menu-hidden'
);
document
.
getElementById
(
'cmptSetting'
).
nextSibling
.
nextSibling
.
classList
.
add
(
'menu-hidden'
);
}
function
getCmptId
()
{
return
document
.
getElementById
(
"cmpt"
).
value
;
}
function
getCmptId
()
{
return
document
.
getElementById
(
"cmpt"
).
value
;
}
function
getUId
()
{
return
document
.
getElementById
(
"uId"
).
value
;
}
function
getUId
()
{
return
document
.
getElementById
(
"uId"
).
value
;
}
function
getCId
()
{
return
document
.
getElementById
(
"cId"
).
value
;
}
function
getCId
()
{
return
document
.
getElementById
(
"cId"
).
value
;
}
function
getTimestamp
()
{
return
document
.
getElementById
(
"timestamp"
).
value
;
}
function
getTimestamp
()
{
return
document
.
getElementById
(
"timestamp"
).
value
;
}
function
getSign
()
{
return
document
.
getElementById
(
"sign"
).
value
;
}
function
getSign
()
{
return
document
.
getElementById
(
"sign"
).
value
;
}
window
.
baseURL
=
'${baseURL}'
;
</script>
\ No newline at end of file
window
.
baseURL
=
'${baseURL}'
;
</script>
\ No newline at end of file
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