Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-admin-IM
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-admin-IM
提交
00fdd61b
提交
00fdd61b
编写于
4月 19, 2019
作者:
chendeli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add
上级
ccb053d5
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
84 行增加
和
43 行删除
+84
-43
env-config.js
src/utils/env-config.js
+2
-1
qiniu-util.js
src/utils/qiniu-util.js
+1
-1
add-edit.vue
src/views/topicManage/add-edit.vue
+77
-23
index.vue
src/views/topicManage/index.vue
+4
-18
未找到文件。
src/utils/env-config.js
浏览文件 @
00fdd61b
...
...
@@ -10,7 +10,8 @@ export const envConfig = {
// baseUrl: 'https://test1-sc.yunqueyi.com/',
//baseUrl: 'https://uat-sc.yunqueyi.com/',
baseUrl
:
'https://dev-sc.yunqueyi.com'
,
qiniuFileUrl
:
"http://localhost:10201/contents/admin/qiniu/token1"
,
qiniuFileUrl
:
"https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1"
,
qiniuResourceUrl
:
"https://test1-videos.yunqueyi.com"
,
qiniuImgUrl
:
"https://test1-file.yunqueyi.com"
,
loginUrl
:
'https://dev-saas.yunqueyi.com/pica-login/work_station.html'
,
...
...
src/utils/qiniu-util.js
浏览文件 @
00fdd61b
...
...
@@ -455,7 +455,7 @@ export const doUpload = (self,file, filePath, previewId,progressId, fileType) =>
// obj.css('max-width', '100%');
// }
},
20
00
);
},
5
00
);
};
...
...
src/views/topicManage/add-edit.vue
浏览文件 @
00fdd61b
...
...
@@ -2,12 +2,12 @@
<el-dialog
:title=
"title"
:visible
.
sync=
"dialogFormVisible"
@
close=
"optFun('1')"
>
<el-form
:model=
"form"
class=
"topicOpt"
>
<el-form-item
label=
"主题"
:label-width=
"formLabelWidth"
>
<el-input
v-model=
"objInfo.topic.subject"
auto-complete=
"off"
clearable
size=
"mini"
></el-input>
<el-input
v-model=
"objInfo.topic.subject"
auto-complete=
"off"
clearable
size=
"mini"
:maxLength=
"max"
placeholder=
"请输入主题(最长60个字符)"
></el-input>
</el-form-item>
<el-form-item
label=
"内容"
:label-width=
"formLabelWidth"
required
>
<el-input
type=
"textarea"
v-model=
"objInfo.topic.content"
auto-complete=
"off"
clearable
size=
"mini"
></el-input>
<el-input
type=
"textarea"
v-model=
"objInfo.topic.content"
auto-complete=
"off"
clearable
size=
"mini"
:maxLength=
"maxL"
placeholder=
"请输入主题(最长1000个字符)"
rows=
"5"
></el-input>
</el-form-item>
<el-form-item
label=
"话题配图"
:label-width=
"formLabelWidth"
>
<el-form-item
label=
"话题配图"
:label-width=
"formLabelWidth"
class=
"teste1"
>
<!--
<el-upload
action=
"#"
list-type=
"picture-card"
...
...
@@ -19,11 +19,13 @@
<el-upload
action=
"#"
list-type=
"picture-card"
:auto-upload=
"false"
:file-list=
"fileList"
:on-preview=
"handlePictureCardPreview"
:on-remove=
"handleRemove"
:on-change=
"selectImg"
>
:before-upload=
"beforeAvatarUpload"
>
<i
class=
"el-icon-plus"
></i>
</el-upload>
<el-dialog
:visible
.
sync=
"dialogVisible"
size=
"tiny"
:modal=
"false"
:close-on-click-modal=
"false"
>
...
...
@@ -53,11 +55,14 @@ export default {
form
:{},
id
:
null
,
dialogImageUrl
:
''
,
max
:
60
,
maxL
:
1000
,
dialogVisible
:
false
,
dialogFormVisible
:
false
,
fileList
:[],
title
:
'编辑话题'
,
reType
:
[
'PUT'
,
'POST'
],
isEdit
:
false
,
objInfo
:{
topic
:{
subject
:
''
,
...
...
@@ -75,6 +80,10 @@ export default {
editInfo
:{
default
:()
=>
{},
type
:
Object
},
discussId
:{
default
:
0
,
type
:
Number
}
},
computed
:
{
...
...
@@ -85,9 +94,11 @@ export default {
this
.
dialogFormVisible
=
this
.
isShow
if
(
this
.
editInfo
.
topic
){
this
.
isEdit
=
true
;
this
.
objInfo
=
this
.
editInfo
;
}
else
{
this
.
title
=
'新增话题'
this
.
isEdit
=
false
}
console
.
log
(
this
.
editInfo
);
...
...
@@ -95,7 +106,7 @@ export default {
for
(
let
i
=
0
;
i
<
this
.
objInfo
.
images
.
length
;
i
++
){
this
.
fileList
.
push
({
url
:
this
.
objInfo
.
images
[
i
].
imageurl
,
image
U
rl
:
this
.
objInfo
.
images
[
i
].
imageurl
,
image
u
rl
:
this
.
objInfo
.
images
[
i
].
imageurl
,
id
:
this
.
objInfo
.
images
[
i
].
id
})
}
...
...
@@ -109,17 +120,58 @@ export default {
},
methods
:
{
handlePictureCardPreview
(
file
){
console
.
log
(
file
)
//
console.log(file)
this
.
dialogImageUrl
=
file
.
url
;
this
.
dialogVisible
=
true
;
},
selectImg
(
file
){
console
.
log
(
file
)
//
console.log(file)
this
.
fileList
.
push
({
url
:
file
.
url
,
imageurl
:
file
.
url
,
})
},
beforeAvatarUpload
(
file
){
// console.log(file)
// console.log(this.fileList)
if
(
this
.
fileList
.
length
>
5
){
// /、this.$message.info('图片个数不能超过6个')
this
.
showError
(
'上传图片个数不能超过6个'
);
return
false
;
}
this
.
imgDoUpload
(
file
,
4
,
2048
,
400
,
400
)
},
imgDoUpload
(
file
,
urlType
,
size
,
w
,
h
)
{
let
vm
=
this
;
const
isSize
=
file
.
size
/
1024
<
size
;
if
(
!
isSize
)
{
//vm.$message.info('上传图片要小于' + size + 'k')
//vm.$message.info('上传图片要小于2M')
vm
.
showError
(
'上传图片要小于2M'
);
return
;
}
var
_img
=
new
FileReader
()
_img
.
readAsDataURL
(
file
)
_img
.
onload
=
function
(
theFile
)
{
let
image
=
new
Image
()
image
.
src
=
theFile
.
target
.
result
image
.
onload
=
function
()
{
let
_this
=
this
vm
.
$message
.
info
(
'开始上传'
);
doUpload
(
vm
,
file
,
getFilePath
(
file
,
null
),
'preview4'
,
'progress1'
,
1
).
then
(
function
(
path
)
{
//console.log(path)
vm
.
fileList
.
push
({
url
:
path
.
fullPath
,
imageurl
:
path
.
fullPath
})
vm
.
$message
.
success
(
'上传成功'
)
});
}
}
},
handleRemove
(
file
,
fileList
){
let
index
=
null
;
...
...
@@ -134,8 +186,8 @@ export default {
if
(
index
!=
null
){
this
.
fileList
.
splice
(
index
,
1
)
}
console
.
log
(
file
)
console
.
log
(
this
.
fileList
)
//
console.log(file)
//
console.log(this.fileList)
}
},
optFun
(
index
){
...
...
@@ -155,7 +207,7 @@ export default {
},
showError
(
str
){
console
.
log
(
str
)
//
console.log(str)
this
.
$message
({
message
:
str
,
type
:
'warning'
...
...
@@ -164,25 +216,27 @@ export default {
},
//保存修改讨论组件详细
subFun
(
id
){
subFun
(){
///let A = ['PUT','POST']
let
A
=
this
.
isEdit
?
this
.
reType
[
0
]
:
this
.
reType
[
1
];
//console.log(this[A])
if
(
this
.
objInfo
.
topic
.
content
.
length
==
0
){
this
.
showError
(
'
主题
内容不能为空!'
);
this
.
showError
(
'内容不能为空!'
);
return
;
}
let
parm
=
{
topic
:{
subject
:
this
.
objInfo
.
topic
.
subject
,
content
:
this
.
objInfo
.
topic
.
content
,
discussid
:
this
.
objInfo
.
topic
.
discussid
,
discussid
:
this
.
objInfo
.
topic
.
discussid
||
this
.
discussId
,
id
:
this
.
objInfo
.
topic
.
id
},
images
:
this
.
fileList
}
this
.
PUT
(
'/interaction/topic/'
,
parm
).
then
((
res
)
=>
{
this
[
A
]
(
'/interaction/topic/'
,
parm
).
then
((
res
)
=>
{
// closeLoading(vm)
if
(
res
.
code
==
'000000'
)
{
this
.
$message
({
...
...
@@ -201,17 +255,17 @@ export default {
</
script
>
<
style
lang=
"scss"
>
.topicOpt
{
.el-
input__inner
,
.el-textarea__inner
{
width
:
3
00px
;
.el-
form-item__content
{
width
:
5
00px
;
}
.el-upload--picture-card
{
height
:
10
0px
;
width
:
10
0px
;
line-height
:
10
0px
;
height
:
8
0px
;
width
:
8
0px
;
line-height
:
8
0px
;
}
.el-upload-list--picture-card
.el-upload-list__item
{
width
:
10
0px
;
height
:
10
0px
;
width
:
8
0px
;
height
:
8
0px
;
}
.el-form-item__label
{
// line-height: 26px;
...
...
src/views/topicManage/index.vue
浏览文件 @
00fdd61b
...
...
@@ -95,7 +95,7 @@
</el-pagination>
</div>
</div>
<AddEdit
:isShow=
"isShow"
v-on:setFun=
"getFun"
v-if=
"isShow"
:editInfo=
"editInfo"
></AddEdit>
<AddEdit
:isShow=
"isShow"
v-on:setFun=
"getFun"
v-if=
"isShow"
:editInfo=
"editInfo"
:discussId=
"discussId"
></AddEdit>
</div>
</template>
<
script
>
...
...
@@ -149,7 +149,7 @@ export default {
discussId
:
null
,
pageNo
:
1
,
pageSize
:
20
,
editInfo
:{}
editInfo
:{}
,
}
},
...
...
@@ -160,24 +160,10 @@ export default {
'idType'
])
},
filters
:{
filteFun
(
index
){
let
str
=
''
;
if
(
index
==
1
){
str
=
'未发布'
}
else
if
(
index
==
2
){
str
=
'已发布'
}
else
if
(
index
==
3
){
str
=
'已下线'
}
return
str
}
},
created
()
{
this
.
discussId
=
this
.
$route
.
query
.
id
;
this
.
discussId
=
Number
(
this
.
$route
.
query
.
id
)
;
this
.
getData
()
//this.sun()
},
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录