Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
07f4d43f
提交
07f4d43f
authored
10月 12, 2020
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化问题管理
上级
4d48a354
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
226 行增加
和
129 行删除
+226
-129
TbCfStationItemController.java
...va/com/platform/controller/TbCfStationItemController.java
+1
-1
TbCfProblemEntity.java
.../src/main/java/com/platform/entity/TbCfProblemEntity.java
+38
-4
AdvertisementItemServiceImpl.java
...m/platform/service/impl/AdvertisementItemServiceImpl.java
+2
-0
TbCfProblemServiceImpl.java
...ava/com/platform/service/impl/TbCfProblemServiceImpl.java
+2
-0
TbCfStationItemServiceImpl.java
...com/platform/service/impl/TbCfStationItemServiceImpl.java
+1
-1
TbCfProblemDao.xml
...in/src/main/resources/com/platform/dao/TbCfProblemDao.xml
+30
-18
platform.properties
platform-admin/src/main/resources/dev/platform.properties
+6
-6
platform.properties
platform-admin/src/main/resources/prod/platform.properties
+6
-6
tbcfproblem.html
...m-admin/src/main/webapp/WEB-INF/page/sys/tbcfproblem.html
+19
-9
common.js
platform-admin/src/main/webapp/js/common.js
+22
-8
tbcfproblem.js
platform-admin/src/main/webapp/js/sys/tbcfproblem.js
+99
-76
没有找到文件。
platform-admin/src/main/java/com/platform/controller/TbCfStationItemController.java
浏览文件 @
07f4d43f
...
@@ -241,7 +241,7 @@ public class TbCfStationItemController extends ApiBaseAction {
...
@@ -241,7 +241,7 @@ public class TbCfStationItemController extends ApiBaseAction {
}
else
if
(
res
==
-
1
)
{
}
else
if
(
res
==
-
1
)
{
return
R
.
error
(
"该商品已下架,不能置顶"
);
return
R
.
error
(
"该商品已下架,不能置顶"
);
}
else
if
(
res
==
-
2
)
{
}
else
if
(
res
==
-
2
)
{
return
R
.
error
(
"最多置顶
3
00个商品"
);
return
R
.
error
(
"最多置顶
24
00个商品"
);
}
}
return
R
.
error
(
"置顶失败"
);
return
R
.
error
(
"置顶失败"
);
}
}
...
...
platform-admin/src/main/java/com/platform/entity/TbCfProblemEntity.java
浏览文件 @
07f4d43f
...
@@ -8,7 +8,7 @@ import java.util.Date;
...
@@ -8,7 +8,7 @@ import java.util.Date;
* 表名 tb_cf_problem
* 表名 tb_cf_problem
*
*
* @author lipengjun
* @author lipengjun
* @date 20
19-09-20 11:03:38
* @date 20
20-10-12 14:26:55
*/
*/
public
class
TbCfProblemEntity
implements
Serializable
{
public
class
TbCfProblemEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -17,6 +17,10 @@ public class TbCfProblemEntity implements Serializable {
...
@@ -17,6 +17,10 @@ public class TbCfProblemEntity implements Serializable {
* 问题id
* 问题id
*/
*/
private
String
problemId
;
private
String
problemId
;
/**
* 类型 0:普通问题 1:物流问题
*/
private
Integer
type
;
/**
/**
* 问题明细
* 问题明细
*/
*/
...
@@ -26,7 +30,7 @@ public class TbCfProblemEntity implements Serializable {
...
@@ -26,7 +30,7 @@ public class TbCfProblemEntity implements Serializable {
*/
*/
private
String
answer
;
private
String
answer
;
/**
/**
* 是否展示
* 是否展示
0:隐藏 1:展示
*/
*/
private
Integer
enableFlag
;
private
Integer
enableFlag
;
/**
/**
...
@@ -37,6 +41,10 @@ public class TbCfProblemEntity implements Serializable {
...
@@ -37,6 +41,10 @@ public class TbCfProblemEntity implements Serializable {
* 创建时间
* 创建时间
*/
*/
private
Date
createTime
;
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
/**
* 设置:问题id
* 设置:问题id
...
@@ -51,6 +59,19 @@ public class TbCfProblemEntity implements Serializable {
...
@@ -51,6 +59,19 @@ public class TbCfProblemEntity implements Serializable {
public
String
getProblemId
()
{
public
String
getProblemId
()
{
return
problemId
;
return
problemId
;
}
}
/**
* 设置:类型 0:普通问题 1:物流问题
*/
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
/**
* 获取:类型 0:普通问题 1:物流问题
*/
public
Integer
getType
()
{
return
type
;
}
/**
/**
* 设置:问题明细
* 设置:问题明细
*/
*/
...
@@ -78,14 +99,14 @@ public class TbCfProblemEntity implements Serializable {
...
@@ -78,14 +99,14 @@ public class TbCfProblemEntity implements Serializable {
return
answer
;
return
answer
;
}
}
/**
/**
* 设置:是否展示
* 设置:是否展示
0:隐藏 1:展示
*/
*/
public
void
setEnableFlag
(
Integer
enableFlag
)
{
public
void
setEnableFlag
(
Integer
enableFlag
)
{
this
.
enableFlag
=
enableFlag
;
this
.
enableFlag
=
enableFlag
;
}
}
/**
/**
* 获取:是否展示
* 获取:是否展示
0:隐藏 1:展示
*/
*/
public
Integer
getEnableFlag
()
{
public
Integer
getEnableFlag
()
{
return
enableFlag
;
return
enableFlag
;
...
@@ -116,4 +137,17 @@ public class TbCfProblemEntity implements Serializable {
...
@@ -116,4 +137,17 @@ public class TbCfProblemEntity implements Serializable {
public
Date
getCreateTime
()
{
public
Date
getCreateTime
()
{
return
createTime
;
return
createTime
;
}
}
/**
* 设置:更新时间
*/
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
/**
* 获取:更新时间
*/
public
Date
getUpdateTime
()
{
return
updateTime
;
}
}
}
platform-admin/src/main/java/com/platform/service/impl/AdvertisementItemServiceImpl.java
浏览文件 @
07f4d43f
...
@@ -40,6 +40,8 @@ public class AdvertisementItemServiceImpl implements AdvertisementItemService {
...
@@ -40,6 +40,8 @@ public class AdvertisementItemServiceImpl implements AdvertisementItemService {
@Override
@Override
public
int
save
(
AdvertisementItemEntity
advertisementItem
)
{
public
int
save
(
AdvertisementItemEntity
advertisementItem
)
{
advertisementItem
.
setIsTop
(
0
);
advertisementItem
.
setSort
(
0
);
return
advertisementItemDao
.
save
(
advertisementItem
);
return
advertisementItemDao
.
save
(
advertisementItem
);
}
}
...
...
platform-admin/src/main/java/com/platform/service/impl/TbCfProblemServiceImpl.java
浏览文件 @
07f4d43f
...
@@ -41,11 +41,13 @@ public class TbCfProblemServiceImpl implements TbCfProblemService {
...
@@ -41,11 +41,13 @@ public class TbCfProblemServiceImpl implements TbCfProblemService {
public
int
save
(
TbCfProblemEntity
tbCfProblem
)
{
public
int
save
(
TbCfProblemEntity
tbCfProblem
)
{
tbCfProblem
.
setProblemId
(
IdUtil
.
createIdbyUUID
());
tbCfProblem
.
setProblemId
(
IdUtil
.
createIdbyUUID
());
tbCfProblem
.
setCreateTime
(
new
Date
());
tbCfProblem
.
setCreateTime
(
new
Date
());
tbCfProblem
.
setUpdateTime
(
new
Date
());
return
tbCfProblemDao
.
save
(
tbCfProblem
);
return
tbCfProblemDao
.
save
(
tbCfProblem
);
}
}
@Override
@Override
public
int
update
(
TbCfProblemEntity
tbCfProblem
)
{
public
int
update
(
TbCfProblemEntity
tbCfProblem
)
{
tbCfProblem
.
setUpdateTime
(
new
Date
());
return
tbCfProblemDao
.
update
(
tbCfProblem
);
return
tbCfProblemDao
.
update
(
tbCfProblem
);
}
}
...
...
platform-admin/src/main/java/com/platform/service/impl/TbCfStationItemServiceImpl.java
浏览文件 @
07f4d43f
...
@@ -489,7 +489,7 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
...
@@ -489,7 +489,7 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
return
-
1
;
return
-
1
;
}
}
int
topCount
=
tbCfStationItemDao
.
queryTopCount
();
int
topCount
=
tbCfStationItemDao
.
queryTopCount
();
if
(
topCount
>=
3
00
)
{
if
(
topCount
>=
24
00
)
{
return
-
2
;
return
-
2
;
}
}
item
.
setItemTop
(
1
);
item
.
setItemTop
(
1
);
...
...
platform-admin/src/main/resources/com/platform/dao/TbCfProblemDao.xml
浏览文件 @
07f4d43f
...
@@ -5,21 +5,25 @@
...
@@ -5,21 +5,25 @@
<resultMap
type=
"com.platform.entity.TbCfProblemEntity"
id=
"tbCfProblemMap"
>
<resultMap
type=
"com.platform.entity.TbCfProblemEntity"
id=
"tbCfProblemMap"
>
<result
property=
"problemId"
column=
"problem_id"
/>
<result
property=
"problemId"
column=
"problem_id"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"question"
column=
"question"
/>
<result
property=
"question"
column=
"question"
/>
<result
property=
"answer"
column=
"answer"
/>
<result
property=
"answer"
column=
"answer"
/>
<result
property=
"enableFlag"
column=
"enable_flag"
/>
<result
property=
"enableFlag"
column=
"enable_flag"
/>
<result
property=
"sort"
column=
"sort"
/>
<result
property=
"sort"
column=
"sort"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfProblemEntity"
>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfProblemEntity"
>
select
select
`problem_id`,
`problem_id`,
`type`,
`question`,
`question`,
`answer`,
`answer`,
`enable_flag`,
`enable_flag`,
`sort`,
`sort`,
`create_time`
`create_time`,
`update_time`
from tb_cf_problem
from tb_cf_problem
where problem_id = #{id}
where problem_id = #{id}
</select>
</select>
...
@@ -27,75 +31,83 @@
...
@@ -27,75 +31,83 @@
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfProblemEntity"
>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfProblemEntity"
>
select
select
`problem_id`,
`problem_id`,
`type`,
`question`,
`question`,
`answer`,
`answer`,
`enable_flag`,
`enable_flag`,
`sort`,
`sort`,
`create_time`
`create_time`,
`update_time`
from tb_cf_problem
from tb_cf_problem
WHERE 1=1
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
<if
test=
"name != null and name.trim() != ''"
>
AND
name
LIKE concat('%',#{name},'%')
AND
question
LIKE concat('%',#{name},'%')
</if>
</if>
<choose>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
order by ${sidx} ${order}
</when>
</when>
<otherwise>
<otherwise>
order by
problem_id de
sc
order by
type desc,sort a
sc
</otherwise>
</otherwise>
</choose>
</choose>
<if
test=
"offset != null and limit != null"
>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
limit #{offset}, #{limit}
</if>
</if>
</select>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_problem
select count(*) from tb_cf_problem
WHERE 1=1
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
<if
test=
"name != null and name.trim() != ''"
>
AND name
LIKE concat('%',#{name},'%')
AND question
LIKE concat('%',#{name},'%')
</if>
</if>
</select>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfProblemEntity"
>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfProblemEntity"
>
insert into tb_cf_problem(
insert into tb_cf_problem(
`problem_id`,
`problem_id`,
`type`,
`question`,
`question`,
`answer`,
`answer`,
`enable_flag`,
`enable_flag`,
`sort`,
`sort`,
`create_time`)
`create_time`,
`update_time`)
values(
values(
#{problemId},
#{problemId},
#{type},
#{question},
#{question},
#{answer},
#{answer},
#{enableFlag},
#{enableFlag},
#{sort},
#{sort},
#{createTime})
#{createTime},
#{updateTime})
</insert>
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfProblemEntity"
>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfProblemEntity"
>
update tb_cf_problem
update tb_cf_problem
<set>
<set>
<if
test=
"type != null"
>
`type` = #{type},
</if>
<if
test=
"question != null"
>
`question` = #{question},
</if>
<if
test=
"question != null"
>
`question` = #{question},
</if>
<if
test=
"answer != null"
>
`answer` = #{answer},
</if>
<if
test=
"answer != null"
>
`answer` = #{answer},
</if>
<if
test=
"enableFlag != null"
>
`enable_flag` = #{enableFlag},
</if>
<if
test=
"enableFlag != null"
>
`enable_flag` = #{enableFlag},
</if>
<if
test=
"sort != null"
>
`sort` = #{sort},
</if>
<if
test=
"sort != null"
>
`sort` = #{sort},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime}
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"updateTime != null"
>
`update_time` = #{updateTime}
</if>
</set>
</set>
where problem_id = #{problemId}
where problem_id = #{problemId}
</update>
</update>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
delete from tb_cf_problem where problem_id = #{value}
delete from tb_cf_problem where problem_id = #{value}
</delete>
</delete>
<delete
id=
"deleteBatch"
>
<delete
id=
"deleteBatch"
>
delete from tb_cf_problem where problem_id in
delete from tb_cf_problem where problem_id in
<foreach
item=
"problemId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
<foreach
item=
"problemId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{problemId}
#{problemId}
</foreach>
</foreach>
</delete>
</delete>
</mapper>
</mapper>
\ No newline at end of file
platform-admin/src/main/resources/dev/platform.properties
浏览文件 @
07f4d43f
...
@@ -2,13 +2,13 @@
...
@@ -2,13 +2,13 @@
#jdbc.username=root
#jdbc.username=root
#jdbc.password=root
#jdbc.password=root
#
jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.url
=
jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
#
jdbc.username=root
jdbc.username
=
root
#
jdbc.password=diaoyun666
jdbc.password
=
diaoyun666
jdbc.url
:
jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
#
jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.username
:
root
#
jdbc.username: root
jdbc.password
:
Diaoyunnuli.8
#
jdbc.password: Diaoyunnuli.8
jdbc.initialSize
=
5
jdbc.initialSize
=
5
jdbc.maxActive
=
30
jdbc.maxActive
=
30
...
...
platform-admin/src/main/resources/prod/platform.properties
浏览文件 @
07f4d43f
...
@@ -2,13 +2,13 @@
...
@@ -2,13 +2,13 @@
#jdbc.username=root
#jdbc.username=root
#jdbc.password=root
#jdbc.password=root
#
jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.url
=
jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
#
jdbc.username=root
jdbc.username
=
root
#
jdbc.password=diaoyun666
jdbc.password
=
diaoyun666
jdbc.url
:
jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
#
jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.username
:
root
#
jdbc.username: root
jdbc.password
:
Diaoyunnuli.8
#
jdbc.password: Diaoyunnuli.8
jdbc.initialSize
=
5
jdbc.initialSize
=
5
jdbc.maxActive
=
30
jdbc.maxActive
=
30
...
...
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfproblem.html
浏览文件 @
07f4d43f
...
@@ -38,24 +38,34 @@
...
@@ -38,24 +38,34 @@
<Card
v-show=
"!showList"
>
<Card
v-show=
"!showList"
>
<p
slot=
"title"
>
{{title}}
</p>
<p
slot=
"title"
>
{{title}}
</p>
<i-form
ref=
"formValidate"
:model=
"tbCfProblem"
:rules=
"ruleValidate"
:label-width=
"80"
>
<i-form
ref=
"formValidate"
:model=
"tbCfProblem"
:rules=
"ruleValidate"
:label-width=
"80"
>
<Form-item
label=
"问题明细"
prop=
"question"
>
<Form-item
label=
"问题明细"
prop=
"question"
style=
"width: 800px"
>
<i-input
v-model=
"tbCfProblem.question"
placeholder=
"问题明细"
/>
<i-input
v-model=
"tbCfProblem.question"
placeholder=
"问题明细"
/>
</Form-item>
</Form-item>
<Form-item
label=
"答案"
prop=
"answer"
>
<Form-item
label=
"类型"
prop=
"type"
style=
"width: 800px"
>
<i-select
placeholder=
"请选择"
v-model=
"tbCfProblem.type"
>
<i-option
v-for=
"(el,i) in typeList"
:key=
'i'
:value=
"el.value"
>
{{el.label}}
</i-option>
</i-select>
</Form-item>
<br/>
<br/>
<Form-item
label=
"答案"
prop=
"answer"
style=
"width: 800px"
>
<!-- 加载编辑器的容器 -->
<!-- 加载编辑器的容器 -->
<script
id=
"container"
name=
"content"
type=
"text/plain"
>
<script
id=
"container"
name=
"content"
type=
"text/plain"
>
</script>
</script>
<!--<i-input v-model="tbCfProblem.answer" placeholder="答案"/>-->
<!--<i-input v-model="tbCfProblem.answer" placeholder="答案"/>-->
</Form-item>
</Form-item>
<Form-item
label=
"是否展示"
prop=
"enableFlag"
>
<Form-item
label=
"是否展示"
prop=
"enableFlag"
style=
"width: 800px"
>
<i-input
v-model=
"tbCfProblem.enableFlag"
placeholder=
"是否展示"
/>
<i-select
placeholder=
"请选择"
v-model=
"tbCfProblem.enableFlag"
>
<i-option
v-for=
"(el,i) in enableList"
:key=
'i'
:value=
"el.value"
>
{{el.label}}
</i-option>
</i-select>
</Form-item>
</Form-item>
<Form-item
label=
"排序"
prop=
"sort"
>
<Form-item
label=
"排序"
prop=
"sort"
style=
"width: 800px"
>
<i-input
v-model=
"tbCfProblem.sort"
placeholder=
"排序"
/>
<i-input
v-model=
"tbCfProblem.sort"
placeholder=
"排序"
/>
</Form-item>
</Form-item>
<Form-item
label=
"创建时间"
prop=
"createTime"
>
<i-input
v-model=
"tbCfProblem.createTime"
placeholder=
"创建时间"
/>
</Form-item>
<Form-item>
<Form-item>
<i-button
type=
"primary"
@
click=
"handleSubmit('formValidate')"
>
提交
</i-button>
<i-button
type=
"primary"
@
click=
"handleSubmit('formValidate')"
>
提交
</i-button>
<i-button
type=
"warning"
@
click=
"reload"
style=
"margin-left: 8px"
/>
返回
</i-button>
<i-button
type=
"warning"
@
click=
"reload"
style=
"margin-left: 8px"
/>
返回
</i-button>
...
@@ -97,4 +107,4 @@
...
@@ -97,4 +107,4 @@
<script
type=
"text/javascript"
src=
"../statics/plugins/ueditor/ueditor.all.js"
></script>
<script
type=
"text/javascript"
src=
"../statics/plugins/ueditor/ueditor.all.js"
></script>
<script
src=
"${rc.contextPath}/js/sys/tbcfproblem.js?_${date.systemTime}"
></script>
<script
src=
"${rc.contextPath}/js/sys/tbcfproblem.js?_${date.systemTime}"
></script>
</body>
</body>
</html>
</html>
\ No newline at end of file
platform-admin/src/main/webapp/js/common.js
浏览文件 @
07f4d43f
...
@@ -533,6 +533,7 @@ versionFormat = function (cellvalue) {
...
@@ -533,6 +533,7 @@ versionFormat = function (cellvalue) {
return
returnStr
;
return
returnStr
;
};
};
moneyFormat
=
function
(
cellvalue
)
{
moneyFormat
=
function
(
cellvalue
)
{
/* var returnStr = "未知";
/* var returnStr = "未知";
if (!!cellvalue) {
if (!!cellvalue) {
...
@@ -606,14 +607,14 @@ statusFormat1 = function (cellvalue) {
...
@@ -606,14 +607,14 @@ statusFormat1 = function (cellvalue) {
//状态 0:已删除 1:活动进行中 2:活动已关闭 3:活动已结束
//状态 0:已删除 1:活动进行中 2:活动已关闭 3:活动已结束
adStatus
=
function
(
cellvalue
)
{
adStatus
=
function
(
cellvalue
)
{
let
returnStr
=
"未知"
let
returnStr
=
"未知"
if
(
cellvalue
==
0
)
{
if
(
cellvalue
==
0
)
{
returnStr
=
'已删除'
;
returnStr
=
'已删除'
;
}
else
if
(
cellvalue
==
1
)
{
}
else
if
(
cellvalue
==
1
)
{
returnStr
=
'活动进行中'
;
returnStr
=
'活动进行中'
;
}
else
if
(
cellvalue
==
2
)
{
}
else
if
(
cellvalue
==
2
)
{
returnStr
=
'活动已关闭'
;
returnStr
=
'活动已关闭'
;
}
else
if
(
cellvalue
==
3
)
{
}
else
if
(
cellvalue
==
3
)
{
returnStr
=
'活动已结束'
;
returnStr
=
'活动已结束'
;
}
}
return
returnStr
;
return
returnStr
;
};
};
...
@@ -634,6 +635,19 @@ validFormat = function (cellvalue) {
...
@@ -634,6 +635,19 @@ validFormat = function (cellvalue) {
return
returnStr
;
return
returnStr
;
};
};
typeFormat
=
function
(
cellvalue
)
{
let
returnStr
=
"未知"
if
(
!!
cellvalue
||
cellvalue
==
'0'
)
{
if
(
cellvalue
==
'0'
)
{
returnStr
=
"普通问题"
;
}
else
if
(
cellvalue
==
'1'
)
{
returnStr
=
"物流问题"
;
}
}
return
returnStr
;
}
sortFormat
=
function
(
cellvalue
)
{
sortFormat
=
function
(
cellvalue
)
{
let
returnStr
=
"未知"
let
returnStr
=
"未知"
if
(
!!
cellvalue
||
cellvalue
==
'0'
)
{
if
(
!!
cellvalue
||
cellvalue
==
'0'
)
{
...
...
platform-admin/src/main/webapp/js/sys/tbcfproblem.js
浏览文件 @
07f4d43f
...
@@ -2,12 +2,13 @@ $(function () {
...
@@ -2,12 +2,13 @@ $(function () {
$
(
"#jqGrid"
).
Grid
({
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfproblem/list'
,
url
:
'../tbcfproblem/list'
,
colModel
:
[
colModel
:
[
{
label
:
'problemId'
,
name
:
'problemId'
,
index
:
'problem_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'problemId'
,
name
:
'problemId'
,
index
:
'problem_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'问题明细'
,
name
:
'question'
,
index
:
'question'
,
width
:
80
},
{
label
:
'问题明细'
,
name
:
'question'
,
index
:
'question'
,
width
:
80
},
{
label
:
'答案'
,
name
:
'answer'
,
index
:
'answer'
,
width
:
80
,
formatter
:
contentFormat
},
{
label
:
'类型 '
,
name
:
'type'
,
index
:
'type'
,
width
:
80
,
formatter
:
typeFormat
},
{
label
:
'是否展示'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
},
{
label
:
'答案'
,
name
:
'answer'
,
index
:
'answer'
,
width
:
80
,
formatter
:
contentFormat
},
{
label
:
'排序'
,
name
:
'sort'
,
index
:
'sort'
,
width
:
80
},
{
label
:
'是否展示'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
,
formatter
:
validFormat
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
}],
{
label
:
'排序'
,
name
:
'sort'
,
index
:
'sort'
,
width
:
80
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
}],
});
});
});
});
...
@@ -17,124 +18,146 @@ $(function () {
...
@@ -17,124 +18,146 @@ $(function () {
* @type {UE.ui.Editor|*}
* @type {UE.ui.Editor|*}
*/
*/
var
ue
=
UE
.
getEditor
(
'container'
);
var
ue
=
UE
.
getEditor
(
'container'
);
/**
/**
* 获取文本框内容
* 获取文本框内容
* @returns {*|String|void}
* @returns {*|String|void}
*/
*/
function
getContent
()
{
function
getContent
()
{
var
htmlContent
=
ue
.
getContent
();
var
htmlContent
=
ue
.
getContent
();
return
htmlContent
;
return
htmlContent
;
}
}
/**
/**
* 显示内容
* 显示内容
* @param content
* @param content
*/
*/
function
showContent
(
problemId
)
{
function
showContent
(
problemId
)
{
$
(
'#contentModal'
).
modal
(
'show'
);
$
(
'#contentModal'
).
modal
(
'show'
);
vm
.
getInfo
(
problemId
,
true
);
vm
.
getInfo
(
problemId
,
true
);
};
};
let
vm
=
new
Vue
({
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
el
:
'#rrapp'
,
data
:
{
data
:
{
showList
:
true
,
showList
:
true
,
title
:
null
,
title
:
null
,
tbCfProblem
:
{},
typeList
:
[
ruleValidate
:
{
{
name
:
[
value
:
0
,
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
label
:
'普通问题'
]
},
},
{
q
:
{
value
:
1
,
name
:
''
label
:
'物流问题'
}
}
},
],
methods
:
{
enableList
:
[
query
:
function
()
{
{
vm
.
reload
();
value
:
0
,
},
label
:
'隐藏'
add
:
function
()
{
},
vm
.
showList
=
false
;
{
vm
.
title
=
"新增"
;
value
:
1
,
vm
.
tbCfProblem
=
{};
label
:
'显示'
},
}
update
:
function
(
event
)
{
],
tbCfProblem
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfProblem
=
{};
},
update
:
function
(
event
)
{
let
problemId
=
getSelectedRow
(
"#jqGrid"
);
let
problemId
=
getSelectedRow
(
"#jqGrid"
);
if
(
problemId
==
null
)
{
if
(
problemId
==
null
)
{
return
;
return
;
}
}
vm
.
showList
=
false
;
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
problemId
);
vm
.
getInfo
(
problemId
);
},
},
saveOrUpdate
:
function
(
event
)
{
saveOrUpdate
:
function
(
event
)
{
var
answer
=
getContent
();
var
answer
=
getContent
();
vm
.
tbCfProblem
.
answer
=
encodeURI
(
answer
);
vm
.
tbCfProblem
.
answer
=
encodeURI
(
answer
);
let
url
=
vm
.
tbCfProblem
.
problemId
==
null
?
"../tbcfproblem/save"
:
"../tbcfproblem/update"
;
let
url
=
vm
.
tbCfProblem
.
problemId
==
null
?
"../tbcfproblem/save"
:
"../tbcfproblem/update"
;
Ajax
.
request
({
Ajax
.
request
({
url
:
url
,
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfProblem
),
params
:
JSON
.
stringify
(
vm
.
tbCfProblem
),
type
:
"POST"
,
type
:
"POST"
,
contentType
:
"application/json"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
alert
(
'操作成功'
,
function
(
index
)
{
ue
.
setContent
(
""
);
ue
.
setContent
(
""
);
vm
.
reload
();
vm
.
reload
();
});
});
}
}
});
});
},
},
del
:
function
(
event
)
{
del
:
function
(
event
)
{
let
problemIds
=
getSelectedRows
(
"#jqGrid"
);
let
problemIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
problemIds
==
null
)
{
if
(
problemIds
==
null
)
{
return
;
return
;
}
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
Ajax
.
request
({
url
:
"../tbcfproblem/delete"
,
url
:
"../tbcfproblem/delete"
,
params
:
JSON
.
stringify
(
problemIds
),
params
:
JSON
.
stringify
(
problemIds
),
type
:
"POST"
,
type
:
"POST"
,
contentType
:
"application/json"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
vm
.
reload
();
});
});
}
}
});
});
});
});
},
},
getInfo
:
function
(
problemId
,
isShowDetail
)
{
getInfo
:
function
(
problemId
,
isShowDetail
)
{
Ajax
.
request
({
Ajax
.
request
({
url
:
"../tbcfproblem/info/"
+
problemId
,
url
:
"../tbcfproblem/info/"
+
problemId
,
async
:
true
,
async
:
true
,
successCallback
:
function
(
r
)
{
successCallback
:
function
(
r
)
{
console
.
log
(
r
)
console
.
log
(
r
)
r
.
tbCfProblem
.
answer
=
decodeURI
(
r
.
tbCfProblem
.
answer
);
r
.
tbCfProblem
.
answer
=
decodeURI
(
r
.
tbCfProblem
.
answer
);
vm
.
tbCfProblem
=
r
.
tbCfProblem
;
vm
.
tbCfProblem
=
r
.
tbCfProblem
;
ue
.
setContent
(
vm
.
tbCfProblem
.
answer
);
ue
.
setContent
(
vm
.
tbCfProblem
.
answer
);
if
(
!!
isShowDetail
)
{
if
(
!!
isShowDetail
)
{
var
answer
=
"无内容,请点击修改,添加内容"
;
var
answer
=
"无内容,请点击修改,添加内容"
;
if
(
!!
vm
.
tbCfProblem
.
answer
)
{
if
(
!!
vm
.
tbCfProblem
.
answer
)
{
answer
=
vm
.
tbCfProblem
.
answer
;
answer
=
vm
.
tbCfProblem
.
answer
;
}
}
$
(
"#contentContainer"
).
html
(
answer
);
$
(
"#contentContainer"
).
html
(
answer
);
}
}
}
}
});
});
},
},
reload
:
function
(
event
)
{
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
page
:
page
}).
trigger
(
"reloadGrid"
);
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
vm
.
handleReset
(
'formValidate'
);
},
},
reloadSearch
:
function
()
{
reloadSearch
:
function
()
{
vm
.
q
=
{
vm
.
q
=
{
name
:
''
name
:
''
};
};
...
@@ -148,5 +171,5 @@ let vm = new Vue({
...
@@ -148,5 +171,5 @@ let vm = new Vue({
handleReset
:
function
(
name
)
{
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
handleResetForm
(
this
,
name
);
}
}
}
}
});
});
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论