Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
b9f19ca3
提交
b9f19ca3
authored
10月 16, 2020
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化落地页商品排序
上级
5505d8f2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
28 行增加
和
27 行删除
+28
-27
tbcfproblem.html
...m-admin/src/main/webapp/WEB-INF/page/sys/tbcfproblem.html
+3
-2
tbcfproblem.js
platform-admin/src/main/webapp/js/sys/tbcfproblem.js
+25
-25
没有找到文件。
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfproblem.html
浏览文件 @
b9f19ca3
...
...
@@ -52,9 +52,10 @@
<br/>
<Form-item
label=
"答案"
prop=
"answer"
style=
"width: 800px"
>
<!-- 加载编辑器的容器 -->
<script
id=
"container"
name=
"content"
type=
"text/plain"
>
</script
>
<!-- <script id="container" name="content" type="text/plain">--
>
<!-- </script>--
>
<!--<i-input v-model="tbCfProblem.answer" placeholder="答案"/>-->
<textarea
v-model=
"tbCfProblem.answer"
style=
"width: 600px;height: 300px;"
></textarea>
</Form-item>
<Form-item
label=
"是否展示"
prop=
"enableFlag"
style=
"width: 800px"
>
<i-select
placeholder=
"请选择"
v-model=
"tbCfProblem.enableFlag"
>
...
...
platform-admin/src/main/webapp/js/sys/tbcfproblem.js
浏览文件 @
b9f19ca3
...
...
@@ -5,7 +5,7 @@ $(function () {
{
label
:
'problemId'
,
name
:
'problemId'
,
index
:
'problem_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'问题明细'
,
name
:
'question'
,
index
:
'question'
,
width
:
80
},
{
label
:
'类型 '
,
name
:
'type'
,
index
:
'type'
,
width
:
80
,
formatter
:
typeFormat
},
{
label
:
'答案'
,
name
:
'answer'
,
index
:
'answer'
,
width
:
80
,
formatter
:
contentFormat
},
//
{label: '答案', name: 'answer', index: 'answer', width: 80, formatter: contentFormat},
{
label
:
'是否展示'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
,
formatter
:
validFormat
},
{
label
:
'排序'
,
name
:
'sort'
,
index
:
'sort'
,
width
:
80
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
}],
...
...
@@ -17,25 +17,25 @@ $(function () {
* 增加修改的编辑器
* @type {UE.ui.Editor|*}
*/
var
ue
=
UE
.
getEditor
(
'container'
);
/**
* 获取文本框内容
* @returns {*|String|void}
*/
function
getContent
()
{
var
htmlContent
=
ue
.
getContent
();
return
htmlContent
;
}
/**
* 显示内容
* @param content
*/
function
showContent
(
problemId
)
{
$
(
'#contentModal'
).
modal
(
'show'
);
vm
.
getInfo
(
problemId
,
true
);
};
//
var ue = UE.getEditor('container');
//
/
/ /
**
//
* 获取文本框内容
//
* @returns {*|String|void}
//
*/
//
function getContent() {
//
var htmlContent = ue.getContent();
//
return htmlContent;
//
}
//
/
/ /
**
//
* 显示内容
//
* @param content
//
*/
//
function showContent(problemId) {
//
$('#contentModal').modal('show');
//
vm.getInfo(problemId, true);
//
};
let
vm
=
new
Vue
({
...
...
@@ -93,8 +93,8 @@ let vm = new Vue({
vm
.
getInfo
(
problemId
);
},
saveOrUpdate
:
function
(
event
)
{
var
answer
=
getContent
();
vm
.
tbCfProblem
.
answer
=
encodeURI
(
answer
);
//
var answer = getContent();
//
vm.tbCfProblem.answer = encodeURI(answer);
let
url
=
vm
.
tbCfProblem
.
problemId
==
null
?
"../tbcfproblem/save"
:
"../tbcfproblem/update"
;
Ajax
.
request
({
url
:
url
,
...
...
@@ -103,7 +103,7 @@ let vm = new Vue({
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
ue
.
setContent
(
""
);
//
ue.setContent("");
vm
.
reload
();
});
}
...
...
@@ -135,9 +135,9 @@ let vm = new Vue({
async
:
true
,
successCallback
:
function
(
r
)
{
console
.
log
(
r
)
r
.
tbCfProblem
.
answer
=
decodeURI
(
r
.
tbCfProblem
.
answer
);
//
r.tbCfProblem.answer = decodeURI(r.tbCfProblem.answer);
vm
.
tbCfProblem
=
r
.
tbCfProblem
;
ue
.
setContent
(
vm
.
tbCfProblem
.
answer
);
//
ue.setContent(vm.tbCfProblem.answer);
if
(
!!
isShowDetail
)
{
var
answer
=
"无内容,请点击修改,添加内容"
;
if
(
!!
vm
.
tbCfProblem
.
answer
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论