Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
techbook
Project
Project
Details
Activity
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
front-end-dev
techbook
Commits
b9b676cb
Commit
b9b676cb
authored
May 12, 2020
by
anxixi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
内容管理相关开发
parent
f9ebd09c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
175 additions
and
232 deletions
+175
-232
api.js
src/api/api.js
+4
-224
router.js
src/router.js
+5
-0
api.js
src/views/conmanagementpage/api/api.js
+105
-0
articleservice.vue
src/views/conmanagementpage/articleservice.vue
+0
-0
articlesettings.vue
src/views/conmanagementpage/articlesettings.vue
+56
-5
basedata.vue
src/views/conmanagementpage/basedata.vue
+0
-0
contentarticle.vue
src/views/conmanagementpage/contentarticle.vue
+0
-0
reportaudit.vue
src/views/specialactivity/reportaudit.vue
+3
-1
reportinside.vue
src/views/specialactivity/reportinside.vue
+1
-1
specialsummary.vue
src/views/specialactivity/specialsummary.vue
+1
-1
No files found.
src/api/api.js
View file @
b9b676cb
...
@@ -751,237 +751,17 @@ export default {
...
@@ -751,237 +751,17 @@ export default {
}
}
},
},
fetchPut
(
url
,
params
,
method
=
'PUT'
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
({
method
:
method
,
url
:
base
+
url
,
data
:
params
,
cancelToken
:
new
axios
.
CancelToken
((
c
)
=>
{
_this
.
cancelSource
=
c
}),
headers
:
{
accessToken
:
publicFun
.
getCookie
(
"userInfo"
)?
JSON
.
parse
(
require
(
'js-base64'
).
Base64
.
decode
(
publicFun
.
getCookie
(
"userInfo"
))).
accessToken
:
''
,
deviceId
:
publicFun
.
getCookie
(
"getGuid32"
),
clientCode
:
clientCode
,
},
}).
then
((
response
)
=>
{
if
(
response
.
headers
.
loginstatus
==
2
){
publicFun
.
removeCookie
(
"userInfo"
);
}
if
(
response
.
data
.
code
==
90
||
response
.
data
.
code
==
999
){
window
.
localStorage
.
clear
();
this
.
cancelRequest
()
this
.
isToWhich
()
}
else
if
(
response
.
data
.
code
==
91
||
response
.
data
.
code
==
80
){
if
(
isMobile
){
Toast
(
response
.
data
.
msg
);
location
.
reload
();
}
else
{
MessageBox
.
alert
(
response
.
data
.
msg
,
{
confirmButtonText
:
i18n
.
t
(
"commonTips.confirm"
),
center
:
true
,
customClass
:
'alertDialog'
,
callback
:
action
=>
{
location
.
reload
();
}
});
}
}
else
if
(
response
.
data
.
code
==
500
){
if
(
isMobile
){
Toast
(
response
.
data
.
code
);
}
else
{
router
.
replace
(
"/notServer"
)
}
}
else
if
(
response
.
data
.
code
==
404
){
if
(
isMobile
){
Toast
(
response
.
data
.
code
);
}
else
{
router
.
replace
(
"/notFind"
)
}
}
else
if
(
response
.
data
.
code
==
998
||
response
.
data
.
code
==
996
){
if
(
isMobile
){
Toast
(
response
.
data
.
msg
);
window
.
localStorage
.
clear
();
this
.
cancelRequest
()
this
.
isToWhich
()
}
else
{
MessageBox
.
alert
(
response
.
data
.
msg
,
{
confirmButtonText
:
i18n
.
t
(
"commonTips.confirm"
),
center
:
true
,
customClass
:
'alertDialog'
,
callback
:
action
=>
{
window
.
localStorage
.
clear
();
this
.
cancelRequest
()
this
.
isToWhich
()
}
});
}
// console.log("踢出登录");
}
else
if
(
response
.
data
.
code
==
300
||
response
.
data
.
code
==
997
||
response
.
data
.
code
==
995
){
if
(
isMobile
){
Toast
(
response
.
data
.
msg
);
setTimeout
(
function
(){
router
.
go
(
-
1
);
},
2000
)
}
else
{
MessageBox
.
alert
(
response
.
data
.
msg
,
{
confirmButtonText
:
i18n
.
t
(
"commonTips.confirm"
),
center
:
true
,
customClass
:
'alertDialog'
,
callback
:
action
=>
{
router
.
go
(
-
1
);
}
});
}
}
else
{
resolve
(
response
.
data
)
}
}).
catch
((
error
)
=>
{
if
(
axios
.
isCancel
(
error
))
{
console
.
log
(
'Rquest canceled'
,
error
.
message
);
//请求如果被取消,这里是返回取消的message
}
else
{
reject
(
error
)
}
})
})
},
fetchDelete
(
url
,
method
=
'DELETE'
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
({
method
:
method
,
url
:
base
+
url
,
cancelToken
:
new
axios
.
CancelToken
((
c
)
=>
{
_this
.
cancelSource
=
c
}),
headers
:
{
accessToken
:
publicFun
.
getCookie
(
"userInfo"
)?
JSON
.
parse
(
require
(
'js-base64'
).
Base64
.
decode
(
publicFun
.
getCookie
(
"userInfo"
))).
accessToken
:
''
,
deviceId
:
publicFun
.
getCookie
(
"getGuid32"
),
clientCode
:
clientCode
,
},
}).
then
((
response
)
=>
{
if
(
response
.
headers
.
loginstatus
==
2
){
publicFun
.
removeCookie
(
"userInfo"
);
}
if
(
response
.
data
.
code
==
90
||
response
.
data
.
code
==
999
){
window
.
localStorage
.
clear
();
this
.
cancelRequest
()
this
.
isToWhich
()
}
else
if
(
response
.
data
.
code
==
91
||
response
.
data
.
code
==
80
){
if
(
isMobile
){
Toast
(
response
.
data
.
msg
);
location
.
reload
();
}
else
{
MessageBox
.
alert
(
response
.
data
.
msg
,
{
confirmButtonText
:
i18n
.
t
(
"commonTips.confirm"
),
center
:
true
,
customClass
:
'alertDialog'
,
callback
:
action
=>
{
location
.
reload
();
}
});
}
}
else
if
(
response
.
data
.
code
==
500
){
if
(
isMobile
){
Toast
(
response
.
data
.
code
);
}
else
{
router
.
replace
(
"/notServer"
)
}
}
else
if
(
response
.
data
.
code
==
404
){
if
(
isMobile
){
Toast
(
response
.
data
.
code
);
}
else
{
router
.
replace
(
"/notFind"
)
}
}
else
if
(
response
.
data
.
code
==
998
||
response
.
data
.
code
==
996
){
if
(
isMobile
){
Toast
(
response
.
data
.
msg
);
window
.
localStorage
.
clear
();
this
.
cancelRequest
()
this
.
isToWhich
()
}
else
{
MessageBox
.
alert
(
response
.
data
.
msg
,
{
confirmButtonText
:
i18n
.
t
(
"commonTips.confirm"
),
center
:
true
,
customClass
:
'alertDialog'
,
callback
:
action
=>
{
window
.
localStorage
.
clear
();
this
.
cancelRequest
()
this
.
isToWhich
()
}
});
}
// console.log("踢出登录");
}
else
if
(
response
.
data
.
code
==
300
||
response
.
data
.
code
==
997
||
response
.
data
.
code
==
995
){
if
(
isMobile
){
Toast
(
response
.
data
.
msg
);
setTimeout
(
function
(){
router
.
go
(
-
1
);
},
2000
)
}
else
{
MessageBox
.
alert
(
response
.
data
.
msg
,
{
confirmButtonText
:
i18n
.
t
(
"commonTips.confirm"
),
center
:
true
,
customClass
:
'alertDialog'
,
callback
:
action
=>
{
router
.
go
(
-
1
);
}
});
}
}
else
{
resolve
(
response
.
data
)
}
}).
catch
((
error
)
=>
{
if
(
axios
.
isCancel
(
error
))
{
console
.
log
(
'Rquest canceled'
,
error
.
message
);
//请求如果被取消,这里是返回取消的message
}
else
{
reject
(
error
)
}
})
})
},
fetchPostImg
(
url
,
params
,
method
=
'POST'
)
{
fetchPostImg
(
url
,
params
,
method
=
'POST'
)
{
var
langVal
=
url
.
indexOf
(
'?'
)
==
-
1
?
'?lang='
+
lang
:
'&lang='
+
lang
;
var
langVal
=
url
.
indexOf
(
'?'
)
==
-
1
?
'?lang='
+
lang
:
'&lang='
+
lang
,
_this
=
this
;
if
(
publicFun
.
getCookie
(
"userInfo"
))
{
if
(
publicFun
.
getCookie
(
"userInfo"
))
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
({
axios
({
method
:
method
,
method
:
method
,
url
:
base
+
url
+
langVal
+
"&t="
+
Date
.
parse
(
new
Date
()),
url
:
base
+
url
+
langVal
+
"&t="
+
Date
.
parse
(
new
Date
()),
data
:
params
,
data
:
params
,
cancelToken
:
new
axios
.
CancelToken
((
c
)
=>
{
_this
.
cancelSource
=
c
}),
headers
:
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
,
'Content-Type'
:
'multipart/form-data'
,
accessToken
:
publicFun
.
getCookie
(
"userInfo"
)?
JSON
.
parse
(
require
(
'js-base64'
).
Base64
.
decode
(
publicFun
.
getCookie
(
"userInfo"
))).
accessToken
:
''
,
accessToken
:
publicFun
.
getCookie
(
"userInfo"
)?
JSON
.
parse
(
require
(
'js-base64'
).
Base64
.
decode
(
publicFun
.
getCookie
(
"userInfo"
))).
accessToken
:
''
,
...
...
src/router.js
View file @
b9b676cb
...
@@ -636,6 +636,11 @@ export default new Router({
...
@@ -636,6 +636,11 @@ export default new Router({
component
:
resolve
=>
require
([
'views/conmanagementpage/basedata.vue'
],
resolve
),
component
:
resolve
=>
require
([
'views/conmanagementpage/basedata.vue'
],
resolve
),
meta
:
{
title
:
'数据字典'
}
meta
:
{
title
:
'数据字典'
}
},
},
{
path
:
'/contentarticle'
,
component
:
resolve
=>
require
([
'views/conmanagementpage/contentarticle.vue'
],
resolve
),
meta
:
{
title
:
'发布文章'
}
},
]
]
},
},
{
{
...
...
src/views/conmanagementpage/api/api.js
View file @
b9b676cb
...
@@ -45,4 +45,108 @@ export default {
...
@@ -45,4 +45,108 @@ export default {
addContentClassify
(
url
,
params
){
addContentClassify
(
url
,
params
){
return
api
.
fetchPost
(
url
,
params
);
return
api
.
fetchPost
(
url
,
params
);
},
},
//技术领域
selectSmallBusinessTree
(){
return
api
.
fetchGet
(
'/business/industry/selectSmallBusinessTree'
);
},
//行业领域
selectBigBusinessTree
(){
return
api
.
fetchGet
(
'/business/industry/selectBigBusinessTree'
);
},
//数据字典列表
searchBaseData
(
params
){
return
api
.
fetchPost
(
'/base/article/searchBaseData'
,
params
);
},
//获取单个数据字典信息
getBaseData
(
params
)
{
return
api
.
fetchGet
(
'/base/article/getBaseData?dataId='
+
params
);
},
//添加数据字典
addBaseData
(
url
,
params
){
return
api
.
fetchPost
(
url
,
params
);
},
//删除单个数据字典
removeBaseData
(
params
)
{
return
api
.
fetchGet
(
'/base/article/removeBaseData?dataId='
+
params
);
},
// 发布文章
// 获取频道下拉
getSelectChannels
()
{
return
api
.
fetchGet
(
'/base/article/getSelectChannels'
);
},
// 获取分类下拉
getSelectClassifies
()
{
return
api
.
fetchGet
(
'/base/article/getSelectClassifies'
);
},
//通过code获取数据
selectDictList
(
params
){
return
api
.
fetchGet
(
'/business/dict/selectDictList?groupCode='
+
params
);
},
//获取数据字典下拉
getSelectData
(){
return
api
.
fetchGet
(
'/base/article/getSelectData'
);
},
//专家列表
searchProfessor
(
params
){
return
api
.
fetchPost
(
'/base/professor/searchProfessor'
,
params
);
},
//添加专家
addProfessor
(
params
){
return
api
.
fetchPost
(
'/base/subject/addProfessor'
,
params
);
},
//查询专家信息
searchAccount
(
params
)
{
return
api
.
fetchGet
(
'/base/subject/searchAccount?empAccount='
+
params
);
},
//发布文章
pushArticleContent
(
url
,
params
){
return
api
.
fetchPost
(
url
,
params
);
},
//敏感词检测
checkSensitiveContent
(
params
){
return
api
.
fetchPost
(
'/business/sensitive/checkSensitiveContent'
,
params
);
},
//频道列表条件
getChannelList
()
{
return
api
.
fetchGet
(
'/base/article/getChannelList'
);
},
//分类列表条件
getClassifyList
()
{
return
api
.
fetchGet
(
'/base/article/getClassifyList'
);
},
//文章列表
searchContents
(
params
){
return
api
.
fetchPost
(
'/base/article/searchContents'
,
params
);
},
//文章上线离线
onlineContent
(
params
){
return
api
.
fetchPost
(
'/base/article/onlineContent'
,
params
);
},
//删除文章
removeArticleContent
(
params
)
{
return
api
.
fetchGet
(
'/base/article/removeArticleContent?contentId='
+
params
);
},
//置顶等操作和取消
markContent
(
params
){
return
api
.
fetchPost
(
'/base/article/markContent'
,
params
);
},
//获取文章信息
getArticleContent
(
params
)
{
return
api
.
fetchGet
(
'/base/article/getArticleContent?contentId='
+
params
);
},
// 获取设置信息
getSettingInfo
()
{
return
api
.
fetchGet
(
'/base/article/getSettingInfo'
);
},
// 保存设置信息
saveSettingInfo
(
params
)
{
return
api
.
fetchPost
(
'/base/article/saveSettingInfo'
,
params
);
},
}
}
\ No newline at end of file
src/views/conmanagementpage/articleservice.vue
View file @
b9b676cb
This diff is collapsed.
Click to expand it.
src/views/conmanagementpage/articlesettings.vue
View file @
b9b676cb
<
template
>
<
template
>
<div>
<div
class=
"projectTabadd"
>
文章设置
<div
style=
"margin-top: 20px;"
>
<el-form
label-position=
"right"
label-width=
"180px"
class=
"contnetform180"
>
<el-form-item
label=
"免责声明:"
>
<el-input
v-model=
"infoData.settingStatementContent"
maxlength=
"500"
placeholder=
"请输入免责声明,最多可输入200个字"
style=
"width: 600px;"
type=
"textarea"
:rows=
"6"
></el-input>
</el-form-item>
<el-form-item
label=
" "
>
<el-button
type=
"primary"
@
click=
"getsaveSettingInfo"
>
保存
</el-button>
</el-form-item>
<el-form-item
label=
"评论功能:"
>
<el-switch
v-model=
"value"
@
change=
"getsaveSettingInfo"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
>
</el-switch>
</el-form-item>
</el-form>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
api
from
"./api/api"
;
export
default
{
export
default
{
name
:
"articlesettings"
,
name
:
"articlesettings"
,
data
()
{
data
()
{
return
{
return
{
value
:
true
,
infoData
:{},
}
}
},
},
methods
:
{
methods
:
{
getsaveSettingInfo
(){
if
(
this
.
value
){
this
.
infoData
.
isOpenComment
=
1
;
}
else
{
this
.
infoData
.
isOpenComment
=
0
;
}
api
.
getSettingInfo
(
this
.
infoData
).
then
(
response
=>
{
if
(
response
.
code
==
0
)
{
this
.
$message
.
success
(
'保存成功'
);
}
else
{
this
.
$message
.
error
(
response
.
msg
);
}
})
.
catch
(
error
=>
{
console
.
log
(
"提交出错"
);
return
false
;
});
},
},
},
mounted
(){
mounted
(){
api
.
getSettingInfo
().
then
(
response
=>
{
if
(
response
.
code
==
0
)
{
this
.
infoData
=
response
.
result
;
if
(
this
.
infoData
.
isOpenComment
==
1
){
this
.
value
=
true
;
}
else
{
this
.
value
=
false
;
}
}
else
{
this
.
$message
.
error
(
response
.
msg
);
}
})
.
catch
(
error
=>
{
console
.
log
(
"提交出错"
);
return
false
;
});
}
}
}
}
</
script
>
</
script
>
...
...
src/views/conmanagementpage/basedata.vue
View file @
b9b676cb
This diff is collapsed.
Click to expand it.
src/views/conmanagementpage/contentarticle.vue
0 → 100644
View file @
b9b676cb
This diff is collapsed.
Click to expand it.
src/views/specialactivity/reportaudit.vue
View file @
b9b676cb
...
@@ -53,7 +53,9 @@
...
@@ -53,7 +53,9 @@
<el-table
v-if=
"!istable"
:data=
"publishActivitydata"
tooltip-effect=
"dark"
class=
"projectTable2"
>
<el-table
v-if=
"!istable"
:data=
"publishActivitydata"
tooltip-effect=
"dark"
class=
"projectTable2"
>
<el-table-column
label=
"序号"
type=
"index"
width=
"80"
></el-table-column>
<el-table-column
label=
"序号"
type=
"index"
width=
"80"
></el-table-column>
<el-table-column
label=
"类型"
align=
"center"
>
<el-table-column
label=
"类型"
align=
"center"
>
项目评论
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
reportType
==
0
?
'项目评论'
:
scope
.
row
.
reportType
==
1
?
'文章评论'
:
'- -'
}}
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"reportCode"
label=
"举报原因"
align=
"center"
>
<el-table-column
prop=
"reportCode"
label=
"举报原因"
align=
"center"
>
</el-table-column>
</el-table-column>
...
...
src/views/specialactivity/reportinside.vue
View file @
b9b676cb
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<span>
{{
addData
.
commentsId
}}
</span>
<span>
{{
addData
.
commentsId
}}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"举报类型:"
style=
"width: 100%;"
>
<el-form-item
label=
"举报类型:"
style=
"width: 100%;"
>
<span>
项目评论
</span>
<span>
{{
addData
.
reportType
==
0
?
'项目评论'
:
addData
.
reportType
==
1
?
'文章评论'
:
'- -'
}}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"举报内容:"
style=
"width: 100%;"
>
<el-form-item
label=
"举报内容:"
style=
"width: 100%;"
>
<span
v-html=
"analyzeEmoji(addData.commentsContent)"
></span>
<span
v-html=
"analyzeEmoji(addData.commentsContent)"
></span>
...
...
src/views/specialactivity/specialsummary.vue
View file @
b9b676cb
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
<el-button
type=
"text"
@
click=
"$router.push(
{path:'/subjectstatistics',query:{subjectId:scope.row.subjectId}})">
<el-button
type=
"text"
@
click=
"$router.push(
{path:'/subjectstatistics',query:{subjectId:scope.row.subjectId}})">
统计
统计
</el-button>
</el-button>
<el-button
v-if=
"scope.row.subjectState != 0"
type=
"text"
@
click=
"$router.push(
{path:'/entrycolumn',query:{subjectId:scope.row.subjectId}})">
<el-button
type=
"text"
@
click=
"$router.push(
{path:'/entrycolumn',query:{subjectId:scope.row.subjectId}})">
报名列表
报名列表
</el-button>
</el-button>
<el-button
v-if=
"scope.row.subjectState == 2"
type=
"text"
@
click=
"execute(scope.row)"
>
<el-button
v-if=
"scope.row.subjectState == 2"
type=
"text"
@
click=
"execute(scope.row)"
>
...
...
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