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
cdbfa57e
Commit
cdbfa57e
authored
Jul 06, 2024
by
daniel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style(service): 新增服务模块+子类型多选
parent
a90d382d
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
867 additions
and
754 deletions
+867
-754
JoyfulRichTextBean.java
...m/dlbridge/jadp/plugins/cmpt/bean/JoyfulRichTextBean.java
+3
-0
JoyfulRichTextMapper.java
...ge/jadp/plugins/cmpt/dao/mapper/JoyfulRichTextMapper.java
+1
-1
JoyfulRichTextMapper.xml
...dge/jadp/plugins/cmpt/dao/mapper/JoyfulRichTextMapper.xml
+24
-19
JoyfulRichText.java
.../dlbridge/jadp/plugins/cmpt/dao/model/JoyfulRichText.java
+3
-0
JoyfulRichTextService.java
...idge/jadp/plugins/cmpt/service/JoyfulRichTextService.java
+1
-1
service.jsp
src/main/webapp/WEB-INF/views/cmpt/service.jsp
+835
-733
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/JoyfulRichTextBean.java
View file @
cdbfa57e
...
@@ -4,7 +4,10 @@ import lombok.Data;
...
@@ -4,7 +4,10 @@ import lombok.Data;
@Data
@Data
public
class
JoyfulRichTextBean
{
public
class
JoyfulRichTextBean
{
// 服务类型(3:特色民宿:4:旅游景点,5:特色餐饮 6:当地特产 7: 应急避险 8: 医疗点位 9:运动产品)
private
String
type
;
private
String
type
;
// 点位类型 (1:打卡点,2:服务驿站,3:民宿:4:景点,5:餐饮)
private
String
category
;
private
String
title
;
private
String
title
;
private
String
lng
;
private
String
lng
;
private
String
lat
;
private
String
lat
;
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/JoyfulRichTextMapper.java
View file @
cdbfa57e
...
@@ -20,5 +20,5 @@ public interface JoyfulRichTextMapper {
...
@@ -20,5 +20,5 @@ public interface JoyfulRichTextMapper {
List
<
JoyfulRichText
>
getJoyfulRichTextById
(
@Param
(
"id"
)
String
id
);
List
<
JoyfulRichText
>
getJoyfulRichTextById
(
@Param
(
"id"
)
String
id
);
List
<
JoyfulRichText
>
getJoyfulRichTextList
(
@Param
(
"type"
)
String
type
,
@Param
(
"title"
)
String
title
);
List
<
JoyfulRichText
>
getJoyfulRichTextList
(
@Param
(
"type"
)
String
type
,
@Param
(
"title"
)
String
title
,
@Param
(
"category"
)
String
category
);
}
}
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/JoyfulRichTextMapper.xml
View file @
cdbfa57e
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
INSERT INTO gksite.joyful_rich_text(
INSERT INTO gksite.joyful_rich_text(
userId
userId
,type
,type
,category
,title
,title
,address
,address
,lng
,lng
...
@@ -23,6 +24,7 @@
...
@@ -23,6 +24,7 @@
) VALUES (
) VALUES (
#{userId}
#{userId}
,#{type}
,#{type}
,#{category}
,#{title}
,#{title}
,#{address}
,#{address}
,#{lng}
,#{lng}
...
@@ -46,6 +48,7 @@
...
@@ -46,6 +48,7 @@
SET
SET
userId = #{userId}
userId = #{userId}
,type = #{type}
,type = #{type}
,category = #{category}
,title = #{title}
,title = #{title}
,address = #{address}
,address = #{address}
,lng = #{lng}
,lng = #{lng}
...
@@ -75,25 +78,23 @@
...
@@ -75,25 +78,23 @@
</update>
</update>
<select
id=
"getJoyfulRichTextById"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.JoyfulRichText"
>
<select
id=
"getJoyfulRichTextById"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.JoyfulRichText"
>
SELECT
SELECT id
id
, userId
,userId
, type
,type
, title
,title
, address
,address
, lng
,lng
, lat
,lat
, content
,content
, img_url AS imgUrl
,img_url AS imgUrl
, remark1
,remark1
, remark2
,remark2
, remark3
,remark3
, remark4
,remark4
, status
,status
, category
FROM
FROM gksite.joyful_rich_text
gksite.joyful_rich_text
WHERE id = #{id}
WHERE
id = #{id}
</select>
</select>
<select
id=
"getJoyfulRichTextList"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.JoyfulRichText"
>
<select
id=
"getJoyfulRichTextList"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.JoyfulRichText"
>
...
@@ -110,6 +111,7 @@
...
@@ -110,6 +111,7 @@
,remark4
,remark4
,type
,type
,status
,status
,category
FROM
FROM
gksite.joyful_rich_text
gksite.joyful_rich_text
WHERE
WHERE
...
@@ -120,5 +122,8 @@
...
@@ -120,5 +122,8 @@
<if
test=
"title != null and title != ''"
>
<if
test=
"title != null and title != ''"
>
AND title like concat('%',#{title},'%')
AND title like concat('%',#{title},'%')
</if>
</if>
<if
test=
"category != null and category != ''"
>
AND FIND_IN_SET(#{category}, category)
</if>
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/JoyfulRichText.java
View file @
cdbfa57e
...
@@ -6,7 +6,10 @@ import lombok.Data;
...
@@ -6,7 +6,10 @@ import lombok.Data;
public
class
JoyfulRichText
{
public
class
JoyfulRichText
{
private
String
id
;
private
String
id
;
private
String
userId
;
private
String
userId
;
// 服务类型(3:特色民宿:4:旅游景点,5:特色餐饮 6:当地特产 7: 应急避险 8: 医疗点位 9:运动产品)
private
String
type
;
private
String
type
;
// 点位类型 (1:打卡点,2:服务驿站,3:民宿:4:景点,5:餐饮)
private
String
category
;
private
String
title
;
private
String
title
;
private
String
address
;
private
String
address
;
private
String
lng
;
private
String
lng
;
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/JoyfulRichTextService.java
View file @
cdbfa57e
...
@@ -82,7 +82,7 @@ public class JoyfulRichTextService {
...
@@ -82,7 +82,7 @@ public class JoyfulRichTextService {
* @return
* @return
*/
*/
public
List
<
JoyfulRichText
>
getJoyfulRichTextList
(
JoyfulRichTextBean
joyfulRichTextBean
)
{
public
List
<
JoyfulRichText
>
getJoyfulRichTextList
(
JoyfulRichTextBean
joyfulRichTextBean
)
{
List
<
JoyfulRichText
>
joyfulRichTextList
=
joyfulRichTextMapper
.
getJoyfulRichTextList
(
joyfulRichTextBean
.
getType
(),
joyfulRichTextBean
.
getTitle
());
List
<
JoyfulRichText
>
joyfulRichTextList
=
joyfulRichTextMapper
.
getJoyfulRichTextList
(
joyfulRichTextBean
.
getType
(),
joyfulRichTextBean
.
getTitle
()
,
joyfulRichTextBean
.
getCategory
()
);
if
(
StringUtils
.
isNotBlank
(
joyfulRichTextBean
.
getDistance
()))
{
if
(
StringUtils
.
isNotBlank
(
joyfulRichTextBean
.
getDistance
()))
{
joyfulRichTextList
=
joyfulRichTextList
.
stream
().
filter
(
model
->
this
.
notGtDistance
(
model
,
joyfulRichTextBean
)).
collect
(
Collectors
.
toList
());
joyfulRichTextList
=
joyfulRichTextList
.
stream
().
filter
(
model
->
this
.
notGtDistance
(
model
,
joyfulRichTextBean
)).
collect
(
Collectors
.
toList
());
}
}
...
...
src/main/webapp/WEB-INF/views/cmpt/service.jsp
View file @
cdbfa57e
<%@ page
language=
"java"
contentType=
"text/html; charset=utf-8"
pageEncoding=
"utf-8"
%>
<%@ page
language=
"java"
contentType=
"text/html; charset=utf-8"
pageEncoding=
"utf-8"
%>
<%@ include
file=
"/WEB-INF/views/include/taglib.jsp"
%>
<%@ include
file=
"/WEB-INF/views/include/taglib.jsp"
%>
<%@ taglib
prefix=
"fn"
uri=
"http://java.sun.com/jsp/jstl/functions"
%>
<%@ taglib
prefix=
"fn"
uri=
"http://java.sun.com/jsp/jstl/functions"
%>
<%@ taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%>
<%@ taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%>
<%@ taglib
prefix=
"fmt"
uri=
"http://java.sun.com/jsp/jstl/fmt"
%>
<%@ taglib
prefix=
"fmt"
uri=
"http://java.sun.com/jsp/jstl/fmt"
%>
<!doctype html>
<!doctype html>
<html>
<html>
<head>
<head>
<title>
自助服务
</title>
<title>
自助服务
</title>
<!-- Bootstrap CSS-->
<!-- Bootstrap CSS-->
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/vendor/bootstrap/css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/newdermon/vendor/bootstrap/css/bootstrap.min.css"
>
...
@@ -33,8 +33,8 @@
...
@@ -33,8 +33,8 @@
href=
"${ctxStatic}/newdermon/css/main.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
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}/cmpt/setting.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
>
<link
rel=
"stylesheet"
<link
rel=
"stylesheet"
href=
"${ctxStatic}/leaflet/css/leaflet.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
/>
href=
"${ctxStatic}/leaflet/css/leaflet.css?v=
<%=
System
.
currentTimeMillis
()
%>
"
/>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/leaflet/css/leaflet_label.css"
/>
<link
rel=
"stylesheet"
href=
"${ctxStatic}/leaflet/css/leaflet_label.css"
/>
<script
src=
"${ctxStatic}/My97DatePicker/WdatePicker.js"
type=
"text/javascript"
></script>
<script
src=
"${ctxStatic}/My97DatePicker/WdatePicker.js"
type=
"text/javascript"
></script>
<script
src=
"${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"
></script>
<script
src=
"${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"
></script>
...
@@ -66,7 +66,6 @@
...
@@ -66,7 +66,6 @@
}
}
.submit
{
.submit
{
display
:
inline-block
;
display
:
inline-block
;
width
:
120px
;
width
:
120px
;
...
@@ -96,8 +95,7 @@
...
@@ -96,8 +95,7 @@
.input
{
.input
{
width
:
100%
;
width
:
100%
;
height
:
40px
!important
;
height
:
40px
!important
;
line-height
:
40px
!important
;
line-height
:
40px
!important
;
;
;
border
:
2px
solid
#F4F4F4
;
border
:
2px
solid
#F4F4F4
;
border-radius
:
4px
;
border-radius
:
4px
;
margin-right
:
30px
;
margin-right
:
30px
;
...
@@ -219,6 +217,12 @@
...
@@ -219,6 +217,12 @@
}
}
.section
{
.section
{
width
:
100%
!important
;
display
:
flex
;
flex-direction
:
column
;
}
.section-box
{
width
:
100%
!important
;
width
:
100%
!important
;
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
...
@@ -233,17 +237,40 @@
...
@@ -233,17 +237,40 @@
tbody
tr
td
{
tbody
tr
td
{
font-size
:
15px
!important
;
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>
</style>
</head>
</head>
<body>
<body>
<jsp:include
page=
"../common/header.jsp"
></jsp:include>
<jsp:include
page=
"../common/header.jsp"
></jsp:include>
<div
class=
"page-content d-flex align-items-stretch main-body"
>
<div
class=
"page-content d-flex align-items-stretch main-body"
>
<jsp:include
page=
"../common/menu.jsp"
></jsp:include>
<jsp:include
page=
"../common/menu.jsp"
></jsp:include>
<div
class=
"rght"
id=
"sevice"
>
<div
class=
"rght"
id=
"sevice"
>
<div
class=
"section"
>
<div
class=
"section"
>
<div>
<h3
class=
"title"
>
自助服务
</h3>
<h3
class=
"title"
>
自助服务
</h3>
<div
class=
"btn-toolbar mx-2 flex justify-between"
role=
"toolbar"
<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"
>
aria-label=
"Toolbar with button groups"
>
<div
class=
"btn-group mr-2"
role=
"group"
aria-label=
"First group"
>
<div
class=
"btn-group mr-2"
role=
"group"
aria-label=
"First group"
>
<button
:class=
"[index==typeIndex?'btn-danger':'btn-default']"
<button
:class=
"[index==typeIndex?'btn-danger':'btn-default']"
...
@@ -258,30 +285,31 @@
...
@@ -258,30 +285,31 @@
@
keyup
.
enter=
"queryAll"
v-model=
"keyword"
@
keyup
.
enter=
"queryAll"
v-model=
"keyword"
aria-label=
"Input group example"
aria-describedby=
"btnGroupAddon"
>
aria-label=
"Input group example"
aria-describedby=
"btnGroupAddon"
>
</div>
</div>
<button
class=
"btn btn-sm
"
:class=
"{
<button
class=
"btn btn-sm ml-auto
"
:class=
"{
'btn-danger':keyword
'btn-danger':keyword
}"
@
click=
"queryAll"
>
搜索
</button>
}"
@
click=
"queryAll"
>
</div>
搜索
<div
class=
"add-btn"
@
click=
"addService"
>
</button>
<span>
+
</span>
<span>
添加自助服务
</span>
</div>
</div>
</div>
</div>
<div
style=
"margin-top: -10px;margin-bottom: 50px"
>
<div
style=
"margin-top: -10px;margin-bottom: 50px"
>
<table
style=
"width: 100%"
class=
"rule-field"
>
<table
style=
"width: 100%"
class=
"rule-field"
>
<colgroup>
<colgroup>
<col
style=
"width:20
%;"
>
<col
style=
"width:15
%;"
>
<col
style=
"width:40%;"
>
<col
style=
"width:40%;"
>
<col
style=
"width:10%;"
>
<col
style=
"width:10%;"
>
<col
style=
"width:15%;"
>
<col
style=
"width:10%;"
>
<col
style=
"width:10%;"
>
<col
style=
"width:15%;"
>
<col
style=
"width:15%;"
>
</colgroup>
</colgroup>
<thead>
<thead>
<tr>
<tr>
<th
style=
"text-align: center"
>
封面
</th>
<th
style=
"text-align: center"
>
封面
</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>
<th
style=
"text-align: center"
>
子类型
</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>
</tr>
...
@@ -289,7 +317,7 @@
...
@@ -289,7 +317,7 @@
<tbody>
<tbody>
<tr
v-if=
""
v-for=
"item in list"
:data-id=
"item.id"
>
<tr
v-if=
""
v-for=
"item in list"
:data-id=
"item.id"
>
<td
style=
"text-align: center"
>
<td
style=
"text-align: center"
>
<img
:src=
"item.imgUrl"
style=
"width:80px;height:80px;"
/>
<img
:src=
"item.imgUrl"
style=
"width:80px;height:80px;"
/>
</td>
</td>
<td
class=
"name"
style=
"text-align: left;"
>
<td
class=
"name"
style=
"text-align: left;"
>
...
@@ -298,6 +326,9 @@
...
@@ -298,6 +326,9 @@
<td
style=
"text-align: center"
>
<td
style=
"text-align: center"
>
<span
v-text=
"serviceTypes[item.type].name"
></span>
<span
v-text=
"serviceTypes[item.type].name"
></span>
</td>
</td>
<td
style=
"text-align: center"
>
<span
v-text=
"item.categoryName"
></span>
</td>
<td
style=
"text-align: center"
>
<td
style=
"text-align: center"
>
<span
class=
"badge badge-pill"
<span
class=
"badge badge-pill"
:class=
"[item.status==1?'badge-success':'badge-default']"
:class=
"[item.status==1?'badge-success':'badge-default']"
...
@@ -351,24 +382,53 @@
...
@@ -351,24 +382,53 @@
placeholder=
"请输入功能名称,最多五个字符"
>
placeholder=
"请输入功能名称,最多五个字符"
>
</div>
</div>
</div>
</div>
<!-- 类型 (type) // 服务类型(3:特色民宿:4:旅游景点,5:特色餐饮 6:当地特产 7: 应急避险 8: 医疗点位 9:运动产品) -->
<div
class=
"func"
>
<span
class=
"title-new"
>
服务类型
</span>
<div
class=
"label-box"
>
<label>
<input
type=
"radio"
v-model=
"service.type"
:value=
"3"
>
特色民宿
</label>
<label>
<input
type=
"radio"
v-model=
"service.type"
:value=
"4"
>
旅游景点
</label>
<label>
<input
type=
"radio"
v-model=
"service.type"
:value=
"5"
>
特色餐饮
</label>
<label>
<input
type=
"radio"
v-model=
"service.type"
:value=
"6"
>
当地特产
</label>
<label>
<input
type=
"radio"
v-model=
"service.type"
:value=
"7"
>
应急避险
</label>
<label>
<input
type=
"radio"
v-model=
"service.type"
:value=
"8"
>
医疗点位
</label>
<label>
<input
type=
"radio"
v-model=
"service.type"
:value=
"9"
>
运动产品
</label>
</div>
</div>
<!-- 类型 (type) -->
<!-- 类型 (type) -->
<div
class=
"func"
>
<div
class=
"func"
>
<span
class=
"title-new"
>
类型
</span>
<span
class=
"title-new"
>
子
类型
</span>
<div
class=
"label-box"
>
<div
class=
"label-box"
>
<label>
<label>
<input
type=
"radio"
v-model=
"service.type
"
:value=
"1"
>
打卡点
<input
type=
"checkbox"
v-model=
"service.category
"
:value=
"1"
>
打卡点
</label>
</label>
<label>
<label>
<input
type=
"radio"
v-model=
"service.type
"
:value=
"2"
>
服务驿站
<input
type=
"checkbox"
v-model=
"service.category
"
:value=
"2"
>
服务驿站
</label>
</label>
<label>
<label>
<input
type=
"radio"
v-model=
"service.type
"
:value=
"3"
>
民宿
<input
type=
"checkbox"
v-model=
"service.category
"
:value=
"3"
>
民宿
</label>
</label>
<label>
<label>
<input
type=
"radio"
v-model=
"service.type
"
:value=
"4"
>
景点
<input
type=
"checkbox"
v-model=
"service.category
"
:value=
"4"
>
景点
</label>
</label>
<label>
<label>
<input
type=
"radio"
v-model=
"service.type
"
:value=
"5"
>
餐饮
<input
type=
"checkbox"
v-model=
"service.category
"
:value=
"5"
>
餐饮
</label>
</label>
</div>
</div>
</div>
</div>
...
@@ -405,7 +465,7 @@
...
@@ -405,7 +465,7 @@
<div
v-if=
"!service.imgUrl"
class=
"cover"
>
<div
v-if=
"!service.imgUrl"
class=
"cover"
>
<span
class=
"icon-cover"
></span>
<span
class=
"icon-cover"
></span>
</div>
</div>
<img
v-else
class=
"cover cover-img"
:src=
"service.imgUrl"
/>
<img
v-else
class=
"cover cover-img"
:src=
"service.imgUrl"
/>
</label>
</label>
<input
id=
"file"
type=
"file"
style=
"display: none"
@
change=
"uploadFile"
>
<input
id=
"file"
type=
"file"
style=
"display: none"
@
change=
"uploadFile"
>
</div>
</div>
...
@@ -422,7 +482,7 @@
...
@@ -422,7 +482,7 @@
</div>
</div>
</div>
</div>
<div
class=
"func"
>
<div
class=
"func"
>
<span
class=
"title-new"
>
备注 2
</span>
<span
class=
"title-new"
>
联系方式
</span>
<div>
<div>
<input
class=
"input"
type=
"text"
v-model=
"service.remark2"
<input
class=
"input"
type=
"text"
v-model=
"service.remark2"
placeholder=
"请输入备注 2"
>
placeholder=
"请输入备注 2"
>
...
@@ -454,7 +514,6 @@
...
@@ -454,7 +514,6 @@
</label>
</label>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"saveDiv"
>
<div
class=
"saveDiv"
>
<span
@
click=
"cancel"
class=
"cancel"
>
取消
</span>
<span
@
click=
"cancel"
class=
"cancel"
>
取消
</span>
...
@@ -465,8 +524,6 @@
...
@@ -465,8 +524,6 @@
style=
"position: fixed;height: 100%;width: 100%;background: black;z-index: 10;opacity: 0.5;top:0px;left:0px"
>
style=
"position: fixed;height: 100%;width: 100%;background: black;z-index: 10;opacity: 0.5;top:0px;left:0px"
>
</div>
</div>
</div>
</div>
<script
src=
"${ctxStatic}/vue/vue.js"
></script>
<script
src=
"${ctxStatic}/vue/vue.js"
></script>
<script>
<script>
...
@@ -480,7 +537,8 @@
...
@@ -480,7 +537,8 @@
service
:
{
service
:
{
"id"
:
null
,
"id"
:
null
,
"userId"
:
getUId
(),
"userId"
:
getUId
(),
"type"
:
1
,
// 子类型(1:打卡点,2:服务驿站,3:民宿:4:景点,5:餐饮)
"type"
:
3
,
// 服务类型(3:特色民宿:4:旅游景点,5:特色餐饮 6:当地特产 7: 应急避险 8: 医疗点位 9:运动产品)
"category"
:
1
,
// 子类型(1:打卡点,2:服务驿站,3:民宿:4:景点,5:餐饮)
"title"
:
null
,
"title"
:
null
,
"address"
:
null
,
"address"
:
null
,
"lng"
:
null
,
"lng"
:
null
,
...
@@ -491,7 +549,7 @@
...
@@ -491,7 +549,7 @@
"remark2"
:
null
,
"remark2"
:
null
,
"remark3"
:
null
,
"remark3"
:
null
,
"remark4"
:
null
,
"remark4"
:
null
,
"status"
:
1
,
// 状态(0:草稿 1:发布)
"status"
:
[]
,
// 状态(0:草稿 1:发布)
"delFlg"
:
null
// 删除状态(0:未删除 1:已删除)
"delFlg"
:
null
// 删除状态(0:未删除 1:已删除)
},
},
typeIndex
:
0
,
typeIndex
:
0
,
...
@@ -499,32 +557,64 @@
...
@@ -499,32 +557,64 @@
page
:
1
,
page
:
1
,
pageSize
:
10
,
pageSize
:
10
,
totalPage
:
1
,
totalPage
:
1
,
// 3:特色民宿:4:旅游景点,5:特色餐饮 6:当地特产 7: 应急避险 8: 医疗点位 9:运动产品
serviceTypes
:
{
serviceTypes
:
{
0
:
{
0
:
{
name
:
'全部'
,
name
:
'全部'
,
value
:
0
,
value
:
0
,
},
},
1
:
{
3
:
{
name
:
'特色民宿'
,
value
:
3
,
},
4
:
{
name
:
'旅游景点'
,
value
:
4
,
},
5
:
{
name
:
'特色餐饮'
,
value
:
5
,
},
6
:
{
name
:
'当地特产'
,
value
:
6
,
},
7
:
{
name
:
'应急避险'
,
value
:
7
,
},
8
:
{
name
:
'医疗点位'
,
value
:
8
,
},
9
:
{
name
:
'运动产品'
,
value
:
9
,
},
},
// 子类目
categoryOptions
:
[
{
name
:
'打卡点'
,
name
:
'打卡点'
,
value
:
1
,
value
:
1
,
},
},
2
:
{
{
name
:
'服务驿站'
,
name
:
'服务驿站'
,
value
:
2
,
value
:
2
,
},
},
3
:
{
{
name
:
'民宿'
,
name
:
'民宿'
,
value
:
3
,
value
:
3
,
},
},
4
:
{
{
name
:
'景点'
,
name
:
'景点'
,
value
:
4
,
value
:
4
,
},
},
5
:
{
{
name
:
'餐饮'
,
name
:
'餐饮'
,
value
:
5
,
value
:
5
,
},
},
}
,
]
,
statusType
:
{
statusType
:
{
0
:
'草稿'
,
0
:
'草稿'
,
1
:
'发布'
1
:
'发布'
...
@@ -562,7 +652,7 @@
...
@@ -562,7 +652,7 @@
this
.
service
=
{
this
.
service
=
{
id
:
null
,
id
:
null
,
userId
:
getUId
(),
userId
:
getUId
(),
type
:
1
,
type
:
3
,
title
:
''
,
title
:
''
,
address
:
null
,
address
:
null
,
lng
:
null
,
lng
:
null
,
...
@@ -575,6 +665,7 @@
...
@@ -575,6 +665,7 @@
remark4
:
null
,
remark4
:
null
,
status
:
1
,
status
:
1
,
delFlg
:
null
,
delFlg
:
null
,
category
:
[]
};
};
},
},
// 编辑
// 编辑
...
@@ -604,34 +695,35 @@
...
@@ -604,34 +695,35 @@
},
},
// 保存
// 保存
submit
()
{
submit
()
{
const
service
=
this
.
service
const
service
=
{...
this
.
service
}
// 假设 service 对象已经定义并初始化
// 假设 service 对象已经定义并初始化
if
(
!
service
.
imgUrl
)
{
if
(
!
service
.
imgUrl
)
{
layer
.
msg
(
"封面不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
layer
.
msg
(
"封面不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
return
;
return
;
}
}
if
(
!
service
.
title
)
{
if
(
!
service
.
title
)
{
layer
.
msg
(
"标题不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
layer
.
msg
(
"标题不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
return
;
return
;
}
}
if
(
!
service
.
address
)
{
if
(
!
service
.
address
)
{
layer
.
msg
(
"地址不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
layer
.
msg
(
"地址不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
return
;
return
;
}
}
if
(
!
service
.
lng
||
!
service
.
lat
)
{
if
(
!
service
.
lng
||
!
service
.
lat
)
{
layer
.
msg
(
"经纬度不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
layer
.
msg
(
"经纬度不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
return
;
return
;
}
}
var
content
=
this
.
editor
.
getContent
();
var
content
=
this
.
editor
.
getContent
();
if
(
!
content
)
{
if
(
!
content
)
{
layer
.
msg
(
"内容不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
layer
.
msg
(
"内容不能为空!"
,
{
icon
:
5
,
duration
:
1500
});
return
;
return
;
}
}
this
.
service
.
content
=
content
service
.
content
=
content
service
.
category
=
service
.
category
.
join
(
','
)
const
url
=
this
.
service
.
id
?
'/api/joyfulRoad/updJoyfulRichText'
:
'/api/joyfulRoad/insJoyfulRichText'
const
url
=
this
.
service
.
id
?
'/api/joyfulRoad/updJoyfulRichText'
:
'/api/joyfulRoad/insJoyfulRichText'
$
.
ajax
({
$
.
ajax
({
...
@@ -676,7 +768,15 @@
...
@@ -676,7 +768,15 @@
layer
.
closeAll
()
layer
.
closeAll
()
},
},
success
:
(
data
)
=>
{
success
:
(
data
)
=>
{
this
.
list
=
data
.
content
;
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
if
(
data
.
content
.
length
===
this
.
pageSize
)
this
.
totalPage
=
this
.
page
+
1
}
}
})
})
...
@@ -687,7 +787,9 @@
...
@@ -687,7 +787,9 @@
url
:
'/api/joyfulRoad/getJoyfulRichText/'
+
id
,
url
:
'/api/joyfulRoad/getJoyfulRichText/'
+
id
,
success
:
(
data
)
=>
{
success
:
(
data
)
=>
{
if
(
data
.
content
)
{
if
(
data
.
content
)
{
this
.
service
=
data
.
content
;
this
.
service
=
{...
data
.
content
,
category
:
data
.
content
?.
category
?.
split
(
','
)
??
[]};
this
.
editor
.
setContent
(
data
.
content
.
content
)
this
.
editor
.
setContent
(
data
.
content
.
content
)
this
.
dialog
=
true
;
this
.
dialog
=
true
;
}
}
...
@@ -704,7 +806,7 @@
...
@@ -704,7 +806,7 @@
uploadFile
(
obj
)
{
uploadFile
(
obj
)
{
logoFile
=
obj
.
target
.
files
[
0
];
logoFile
=
obj
.
target
.
files
[
0
];
if
(
logoFile
.
type
&&
logoFile
.
type
.
indexOf
(
"image"
)
==
-
1
)
{
if
(
logoFile
.
type
&&
logoFile
.
type
.
indexOf
(
"image"
)
==
-
1
)
{
return
layer
.
msg
(
'请上传图片'
,
{
icon
:
5
})
return
layer
.
msg
(
'请上传图片'
,
{
icon
:
5
})
}
}
var
reads
=
new
FileReader
();
var
reads
=
new
FileReader
();
reads
.
readAsDataURL
(
logoFile
);
reads
.
readAsDataURL
(
logoFile
);
...
@@ -721,7 +823,7 @@
...
@@ -721,7 +823,7 @@
processData
:
false
,
processData
:
false
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
code
==
"1"
)
{
if
(
res
.
code
==
"1"
)
{
layer
.
msg
(
'上传成功'
,
{
icon
:
1
,
time
:
1500
});
layer
.
msg
(
'上传成功'
,
{
icon
:
1
,
time
:
1500
});
app
.
$data
.
service
.
imgUrl
=
res
.
result
app
.
$data
.
service
.
imgUrl
=
res
.
result
}
else
{
}
else
{
console
.
log
(
res
);
console
.
log
(
res
);
...
@@ -741,6 +843,6 @@
...
@@ -741,6 +843,6 @@
});
});
app
.
queryAll
();
app
.
queryAll
();
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
\ 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