Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
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
黄媛媛
ElectricitySheep
Commits
1f9a6379
Commit
1f9a6379
authored
Sep 27, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加页面
parent
c67c876d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
742 additions
and
4 deletions
+742
-4
educationIndex.vue
src/components/education/educationIndex.vue
+7
-3
informationEvalution.vue
src/components/education/informationEvalution.vue
+329
-0
informationManage.vue
src/components/education/informationManage.vue
+393
-0
index.js
src/router/index.js
+13
-1
No files found.
src/components/education/educationIndex.vue
View file @
1f9a6379
...
...
@@ -175,14 +175,18 @@
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/edautorelease'}" @click="isChecked='/edautorelease',CommonJump('edautorelease')">
<i
class=
"el-icon-menu"
></i><span>
课程卡自动发放
</span>
</li>
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/informationManage'}" @click="isChecked='/informationManage',CommonJump('informationManage')">
<i
class=
"el-icon-menu"
></i><span>
咨讯管理
</span>
</li>
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/informationEvalution'}" @click="isChecked='/informationEvalution',CommonJump('informationEvalution')">
<i
class=
"el-icon-menu"
></i><span>
咨讯评价
</span>
</li>
</ul>
</div>
</div>
<div
class=
"mainRightContent"
>
<div
class=
"mainRightTop"
>
<div
class=
"mainRightLeft"
>
司导专区
</div>
<div
class=
"mainRightLeft"
>
教育管理
</div>
<div
class=
"marinRightList"
>
<ul>
<li
style=
"display:none"
>
缓存
</li>
...
...
src/components/education/informationEvalution.vue
0 → 100644
View file @
1f9a6379
<
template
>
<div
class=
"informationEvalution"
>
<div
class=
"head-title"
>
资讯评价
<el-button
style=
"float:right;margin-left:10px"
@
click=
"CommonJump('addZixunPj')"
size=
"small"
type=
"primary"
>
新增评价
</el-button>
</div>
<div
class=
"content"
>
<div
style=
"margin-bottom:20px"
>
<span>
评价类型
</span>
<el-select
style=
"margin:0 10px"
class=
"w100"
@
change=
"msg.pageIndex=1,getList()"
v-model=
"msg.CommentGrade"
size=
"small"
placeholder=
"请选择"
>
<el-option
label=
"全部评价"
:value=
"0"
></el-option>
<el-option
v-for=
"item in templateList"
:key=
"item.Id"
:label=
"item.Name"
:value=
"item.Id"
>
</el-option>
</el-select>
<span>
所属平台
</span>
<el-select
class=
"w100"
@
change=
"msg.pageIndex=1,getList()"
style=
"margin-right: 10px;"
v-model=
"msg.PlatformSource"
size=
"small"
placeholder=
"请选择"
>
<el-option
label=
"全平台"
:value=
"0"
></el-option>
<el-option
v-for=
"item in platList"
:key=
"item.Id"
:label=
"item.Name"
:value=
"item.Id"
>
</el-option>
</el-select>
<el-input
style=
"margin-left:15px;width:350px"
class=
"input-item"
placeholder=
"请输入内容"
v-model=
"msgVal"
size=
"small"
>
<el-select
class=
"w100"
@
change=
"ChangeId"
v-model=
"msgId"
slot=
"prepend"
placeholder=
"请选择"
>
<el-option
v-for=
"item in option"
:key=
"item.Id"
:label=
"item.name"
:value=
"item.Id"
>
</el-option>
</el-select>
<el-button
@
click=
"msg.pageIndex=1,getList()"
slot=
"append"
icon=
"el-icon-search"
></el-button>
</el-input>
<el-date-picker
size=
"small"
@
change=
"msg.pageIndex=1,getList()"
v-model=
"dateList"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"开始日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
end-placeholder=
"结束日期"
>
</el-date-picker>
<!--
<el-button
@
click=
"plHf"
style=
"margin-left:10px"
size=
"small"
>
批量回复
</el-button>
<el-button
@
click=
"plSet(2)"
style=
"margin-left:10px"
size=
"small"
>
批量隐藏
</el-button>
<el-button
@
click=
"plSet(6)"
style=
"margin-left:10px"
size=
"small"
>
批量删除
</el-button>
-->
</div>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
@
selection-change=
"TableSelectChange"
style=
"width: 100%"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
prop=
"ID"
label=
"ID"
width=
"80"
>
</el-table-column>
<el-table-column
prop=
"UserName"
label=
"用户"
width=
"100"
>
</el-table-column>
<el-table-column
label=
"平台"
width=
"80"
>
<template
slot-scope=
"scope"
>
<img
v-if=
"scope.row.PlatformSource==1"
src=
"../../assets/img/userman/wx.png"
alt=
""
>
</
template
>
</el-table-column>
<el-table-column
label=
"评价"
width=
"80"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"好评"
placement=
"top"
>
<img
v-if=
"scope.row.CommentGrade==1"
src=
"../../assets/img/userman/good.png"
alt=
""
>
</el-tooltip>
</
template
>
</el-table-column>
<el-table-column
prop=
"Name"
label=
"详情"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"scope.row.Content"
placement=
"top"
>
<span>
{{
scope
.
row
.
Content
}}
</span>
</el-tooltip>
<!--
<div>
<div
v-for=
"(item,index) in scope.row.CommentImgList"
:key=
"index"
@
click=
"OpenImg(scope.row)"
style=
"margin: 10px; display: inline-block; cursor: pointer;"
>
<div
class=
"backImg"
:style=
"
{backgroundImage:'url(' + domainManager().ImageUrl+item + ')',backgroundSize:'cover'}">
</div>
</div>
</div>
-->
</
template
>
</el-table-column>
<el-table-column
prop=
"CommentGradeName"
label=
"评价回复"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
Reply
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"CommentGradeName"
width=
"100"
label=
"置顶"
>
<
template
slot-scope=
"scope"
>
<el-switch
@
change=
"changeSwitch(scope.row)"
v-model=
"scope.row.Is_Top"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"2"
>
</el-switch>
</
template
>
</el-table-column>
<el-table-column
prop=
"CommentGradeName"
width=
"100"
label=
"状态"
>
<
template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.Is_Show==1"
size=
"mini"
type=
"success"
>
显示
</el-tag>
<el-tag
v-if=
"scope.row.Is_Show==2"
size=
"mini"
type=
"warning"
>
隐藏
</el-tag>
</
template
>
</el-table-column>
<el-table-column
width=
"220"
prop=
"address"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"评价回复"
placement=
"top"
>
<img
@
click=
"EditTemplate(scope.row)"
style=
"margin-right:10px"
src=
"../../assets/img/userman/reply.png"
alt=
""
>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top"
>
<img
@
click=
"setBatch(scope.row,6)"
style=
"margin-right:10px"
src=
"../../assets/img/userman/del.png"
alt=
""
>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"隐藏"
placement=
"top"
>
<img
@
click=
"setBatch(scope.row,2)"
v-if=
"scope.row.Is_Show==1"
style=
"margin-right:10px"
src=
"../../assets/img/userman/icon-hidden.png"
alt=
""
>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"显示"
placement=
"top"
>
<img
@
click=
"setBatch(scope.row,3)"
v-if=
"scope.row.Is_Show==2"
style=
"margin-right:10px"
src=
"../../assets/img/userman/icon-show.png"
alt=
""
>
</el-tooltip>
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align:right"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
:current-page
.
sync=
"msg.pageIndex"
layout=
"prev, pager, next"
:total=
"total"
>
</el-pagination>
</div>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
loading
:
false
,
msgVal
:
''
,
msgId
:
''
,
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
CommentGrade
:
0
,
PlatformSource
:
0
,
ArticleName
:
''
,
//咨询标题
Content
:
''
,
//评价内容
StartTime
:
''
,
//评价时间
EndTime
:
''
,
//评价时间
UserName
:
''
,
//用户昵称
ArticleId
:
0
//资讯id
},
templateList
:
[],
//评价类型
platList
:[],
//所属平台
total
:
0
,
tableData
:[],
addMsg
:
{
Id
:
0
,
Name
:
''
,
Content
:
''
,
CommentGrade
:
0
,
},
//搜索内容下拉
option
:
[{
Id
:
1
,
name
:
'用户昵称'
},
{
Id
:
2
,
name
:
'资讯标题'
},
{
Id
:
3
,
name
:
'评价内容'
},
],
//日期
dateList
:
[],
SelectList
:
[],
}
},
created
()
{
this
.
getTemplate
();
//获取评价类型下拉数据
this
.
getplat
();
//获取所属平台下拉数据
this
.
getList
();
//获取列表数据
},
mounted
()
{},
methods
:
{
Delete
(
row
)
{
let
that
=
this
;
that
.
$confirm
(
"确认删除模板?"
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
apipost
(
'/api/order/DelGoodsCommentTemplateInfo'
,
{
TemplateId
:
row
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
getList
();
this
.
Success
(
res
.
data
.
message
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
}).
catch
(()
=>
{
});
},
OpenImg
(
item
)
{
// this.imgSrc = 'https://cdnimg.iotweixin.com/uploads/mall1285/20200316/586d61c616082de7c3a7d1d778104785.jpg';
// this.seeimgDig = true;
},
TableSelectChange
(
val
)
{
this
.
SelectList
=
val
;
},
// // 批量回复
// plHf() {
// let that = this;
// if (this.SelectList.length == 0) {
// this.Error("请勾选数据!");
// return;
// }
// let Ids = "";
// let IdList = [];
// this.SelectList.forEach(item => {
// IdList.push(item.OrderDetailId);
// })
// Ids = IdList.join(',');
// this.hfMsg = {
// OrderDetailIds: Ids,
// Type: 1,
// Content: '',
// }
// this.addDig = true;
// },
//改变下拉切换搜索名称或者内容 标题
ChangeId
(
val
)
{
let
msgVal
=
this
.
msgVal
;
if
(
this
.
msgId
==
1
)
{
this
.
msg
.
UserName
=
msgVal
;
this
.
msg
.
ArticleName
=
''
;
this
.
msg
.
Content
=
''
;
}
if
(
this
.
msgId
==
2
)
{
this
.
msg
.
UserName
=
''
;
this
.
msg
.
ArticleName
=
msgVal
;
this
.
msg
.
Content
=
''
;
}
if
(
this
.
msgId
==
3
)
{
this
.
msg
.
UserName
=
''
;
this
.
msg
.
ArticleName
=
''
;
this
.
msg
.
Content
=
msgVal
;
}
this
.
getList
();
},
//获取数据
getList
()
{
if
(
this
.
dateList
&&
this
.
dateList
.
length
>
0
)
{
this
.
msg
.
StartTime
=
this
.
dateList
[
0
];
this
.
msg
.
EndTime
=
this
.
dateList
[
1
];
}
else
{
this
.
msg
.
StartTime
=
''
;
this
.
msg
.
EndTime
=
''
;
}
this
.
loading
=
true
;
this
.
apipost
(
"/api/Education/GetArticleCommentPageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
console
.
log
(
res
,
'数据'
);
this
.
total
=
res
.
data
.
data
.
count
;
let
pageData
=
res
.
data
.
data
.
pageData
;
this
.
tableData
=
pageData
;
}
})
},
//获取所属平台
getplat
()
{
this
.
apipost
(
"/api/user/GetMemberUserSourceEnumList"
,
{},
res
=>
{
this
.
platList
=
res
.
data
.
data
;
})
},
//分页
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
//获取评价类型
getTemplate
()
{
this
.
apipost
(
"/api/order/GetGoodsCommentTypeEnumList"
,
{},
res
=>
{
this
.
templateList
=
res
.
data
.
data
;
})
},
changeSwitch
(
item
)
{
let
index
=
4
;
//Is_Top 是否置顶 1是 2否
//4 批量置顶 5取消置顶
if
(
item
.
Is_Top
==
1
)
{
index
=
4
;
}
else
{
index
=
5
;
}
let
msg
=
{
CommentIds
:
item
.
ID
,
Type
:
index
,
}
this
.
commonSet
(
msg
);
},
commonSet
(
msg
)
{
this
.
apipost
(
"/api/Education/SetArticleCommentBatch"
,
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
)
this
.
getList
();
// this.addDig = false;
}
else
{
this
.
Error
(
res
.
data
.
message
)
}
})
},
EditTemplate
(){
},
setBatch
(){
}
},
};
</
script
>
<
style
>
.informationEvalution
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
20px
;
box-sizing
:
border-box
;
}
</
style
>
src/components/education/informationManage.vue
0 → 100644
View file @
1f9a6379
<
template
>
<div
class=
"informationManage"
>
<template
v-if=
"informationShowAdd"
>
<div
class=
"head-title"
>
资讯列表
<el-button
style=
"float:right;margin-top: -5px;"
size=
"small"
type=
"primary"
@
click=
"informationShowAdd=false,clearMsg()"
>
新增
</el-button>
</div>
<div
class=
"content"
>
<div>
<span
style=
"margin-left:15px"
>
资讯状态:
</span>
<el-select
class=
"w120"
@
change=
"msg.pageIndex=1,getList()"
v-model=
"msg.ArticleStatus"
size=
"small"
placeholder=
"请选择"
>
<el-option
label=
"全部"
:value=
"-1"
></el-option>
<el-option
label=
"上架"
:value=
"1"
></el-option>
<el-option
label=
"下架"
:value=
"2"
></el-option>
</el-select>
<el-date-picker
size=
"small"
@
change=
"msg.pageIndex=1,getList()"
v-model=
"dateList"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"开始日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
end-placeholder=
"结束日期"
>
</el-date-picker>
<div
style=
"margin-left:20px"
class=
"searchInput"
>
<el-input
style=
"display:inline-block;width:225px;height:30px"
placeholder=
"标题"
@
keyup
.
enter
.
native=
"msg.pageIndex=1,getList()"
v-model=
"msg.Name"
size=
"small"
@
clear=
"msg.pageIndex=1,getList()"
clearable
>
</el-input>
<span
@
click=
"msg.pageIndex=1,getList()"
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
></span>
</div>
<div
style=
"margin-top:15px;"
>
<el-button
@
click=
"tableSet(1)"
size=
"mini"
>
上架
</el-button>
<el-button
@
click=
"tableSet(2)"
style=
"margin:0 10px;"
size=
"mini"
>
下架
</el-button>
<el-button
@
click=
"tableSet(3)"
size=
"mini"
>
删除
</el-button>
</div>
</div>
<el-table
v-loading=
"loading"
:data=
"tableData"
@
selection-change=
"tableSelect"
border
style=
"width: 100%;margin:20px 0"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
prop=
"ID"
width=
"80"
label=
"编号"
>
</el-table-column>
<el-table-column
prop=
"Name"
width=
"280"
label=
"标题"
>
</el-table-column>
<el-table-column
prop=
"CreateDateStr"
label=
"发布时间"
>
</el-table-column>
<el-table-column
label=
"资讯状态"
>
<template
slot-scope=
"scope"
>
<p
v-if=
"scope.row.ArticleStatus==1"
>
上架
</p>
<p
v-if=
"scope.row.ArticleStatus==2"
>
下架
</p>
</
template
>
</el-table-column>
<el-table-column
label=
"是否可以留言"
>
<
template
slot-scope=
"scope"
>
<p
v-if=
"scope.row.IsComment==0"
>
否
</p>
<p
v-if=
"scope.row.IsComment==1"
>
是
</p>
</
template
>
</el-table-column>
<el-table-column
prop=
"CommentNum"
label=
"留言数"
>
</el-table-column>
<el-table-column
prop=
"BrowseNum"
label=
"实际浏览数"
>
</el-table-column>
<el-table-column
prop=
"FictitiousBrowseNum"
label=
"虚拟浏览数"
>
</el-table-column>
<el-table-column
prop=
"address"
width=
"200"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<img
@
click=
"Edit(scope.row)"
style=
"width:32px;height:32px"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
<img
@
click=
"Delete(scope.row)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/del.png"
alt=
""
>
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align:right"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
layout=
"prev, pager, next"
:current-page
.
sync=
"msg.pageIndex"
:total=
"total"
>
</el-pagination>
</div>
</template>
<
template
v-else
>
<div
class=
"head-title"
>
<span
@
click=
"informationShowAdd=true"
style=
"color:rgb(64, 158, 255);cursor:pointer;"
>
资讯管理
</span><span
style=
"margin:0 9px;color:#C0C4CC"
>
/
</span><span>
资讯编辑
</span>
</div>
<div
class=
"content"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"120px"
>
<el-form-item
label=
"资讯状态"
>
<el-select
class=
"w300"
v-model=
"addMsg.ArticleStatus"
size=
"small"
placeholder=
"请选择"
>
<el-option
label=
"上架"
:value=
"1"
></el-option>
<el-option
label=
"下架"
:value=
"2"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"排序"
>
<el-input
type=
"number"
class=
"w300"
v-model=
"addMsg.Sort"
size=
"small"
></el-input>
</el-form-item>
<el-form-item
label=
"自动上架时间"
>
<el-date-picker
size=
"small"
class=
"w300"
v-model=
"addMsg.ShelvesDate"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择日期时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"自动下架时间"
>
<el-date-picker
size=
"small"
class=
"w300"
v-model=
"addMsg.DownDate"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择日期时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"虚拟浏览数量"
>
<el-input
type=
"number"
class=
"w300"
v-model=
"addMsg.FictitiousBrowseNum"
size=
"small"
></el-input>
</el-form-item>
<el-form-item
label=
"标题"
>
<el-input
type=
"text"
class=
"w300"
v-model=
"addMsg.Name"
size=
"small"
></el-input>
</el-form-item>
<el-form-item
label=
"标签"
>
<el-input
type=
"text"
class=
"w300"
v-model=
"addMsg.LableName"
size=
"small"
></el-input>
</el-form-item>
<el-form-item
label=
"是否可以留言"
>
<el-switch
v-model=
"addMsg.IsComment"
class=
"w300"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
</el-switch>
</el-form-item>
<el-form-item
label=
"资讯内容"
>
<el-input
type=
"textarea"
class=
"w300"
:rows=
"4"
v-model=
"addMsg.Describe"
></el-input>
</el-form-item>
</el-form>
</div>
<el-button
size=
"small"
style=
"margin-top:20px;padding:9px 25px;"
type=
"primary"
@
click=
"submitform('addMsg')"
>
保存
</el-button>
</
template
>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
loading
:
false
,
tableData
:
[],
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
ArticleStatus
:
-
1
,
//资讯状态
StartTime
:
''
,
EndTime
:
''
,
Name
:
''
//标题
},
total
:
0
,
dateList
:
[],
informationShowAdd
:
true
,
//是否显示新增
addMsg
:
{
ID
:
0
,
ArticleStatus
:
1
,
//资讯状态 1上架 2下架
Sort
:
''
,
//排序
ShelvesDate
:
''
,
//自动上架时间
DownDate
:
''
,
//自动下架时间
FictitiousBrowseNum
:
''
,
//虚拟浏览数量
Name
:
''
,
//标题
LableName
:
''
,
//标签
IsComment
:
0
,
//是否可以留言,0-否,1-是
Describe
:
''
//资讯内容
},
//选中IDs
CheckedIds
:
[],
rules
:
{
Name
:
[{
required
:
true
,
message
:
'请输入标题'
,
trigger
:
'change'
}]
},
};
},
created
()
{
this
.
getList
();
},
methods
:
{
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
getList
()
{
if
(
this
.
dateList
&&
this
.
dateList
.
length
>
0
)
{
this
.
msg
.
StartTime
=
this
.
dateList
[
0
];
this
.
msg
.
EndTime
=
this
.
dateList
[
1
];
}
else
{
this
.
msg
.
StartTime
=
''
;
this
.
msg
.
EndTime
=
''
;
}
this
.
loading
=
true
;
this
.
apipost
(
"/api/Education/GetArticlePageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
total
=
res
.
data
.
data
.
count
;
let
pageData
=
res
.
data
.
data
.
pageData
;
this
.
tableData
=
pageData
;
}
})
},
//修改
Edit
(
item
)
{
this
.
apipost
(
"/api/Education/GetArticleModel"
,
{
Id
:
item
.
ID
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
informationShowAdd
=
false
;
var
myData
=
res
.
data
.
data
;
this
.
addMsg
.
ID
=
myData
.
ID
;
this
.
addMsg
.
ArticleStatus
=
myData
.
ArticleStatus
;
this
.
addMsg
.
Sort
=
myData
.
Sort
;
this
.
addMsg
.
ShelvesDate
=
this
.
dateFunction
(
myData
.
ShelvesDate
);
this
.
addMsg
.
DownDate
=
this
.
dateFunction
(
myData
.
DownDate
);
this
.
addMsg
.
FictitiousBrowseNum
=
myData
.
FictitiousBrowseNum
;
this
.
addMsg
.
Name
=
myData
.
Name
;
this
.
addMsg
.
LableName
=
myData
.
LableName
;
this
.
addMsg
.
IsComment
=
myData
.
IsComment
;
this
.
addMsg
.
Describe
=
myData
.
Describe
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
//清空值
clearMsg
()
{
this
.
addMsg
.
ID
=
0
;
this
.
addMsg
.
ArticleStatus
=
1
;
this
.
addMsg
.
Sort
=
''
;
this
.
addMsg
.
ShelvesDate
=
''
;
this
.
addMsg
.
DownDate
=
''
;
this
.
addMsg
.
FictitiousBrowseNum
=
''
;
this
.
addMsg
.
Name
=
''
;
this
.
addMsg
.
LableName
=
''
;
this
.
addMsg
.
IsComment
=
0
;
this
.
addMsg
.
Describe
=
''
;
},
submitform
(
addMsg
)
{
//提交创建、修改表单
this
.
$refs
[
addMsg
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
saveMsg
();
}
else
{
return
false
;
}
});
},
//保存
saveMsg
()
{
this
.
apipost
(
"/api/Education/AddOrUpdateArticle"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
informationShowAdd
=
true
;
this
.
getList
();
this
.
clearMsg
();
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
dateFunction
(
time
)
{
var
zoneDate
=
new
Date
(
time
).
toJSON
();
var
date
=
new
Date
(
+
new
Date
(
zoneDate
)
+
8
*
3600
*
1000
).
toISOString
().
replace
(
/T/g
,
' '
).
replace
(
/
\.[\d]{3}
Z/
,
''
);
return
date
;
},
//单个删除
Delete
(
item
)
{
let
that
=
this
;
that
.
$confirm
(
'是否删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
apipost
(
'/api/Education/DelArticleInfo'
,
{
Ids
:
item
.
ID
},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
getList
();
this
.
Success
(
res
.
data
.
message
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
}).
catch
(()
=>
{
});
},
tableSelect
(
val
)
{
this
.
CheckedIds
=
val
;
},
//上架 下架 删除
tableSet
(
num
)
{
if
(
this
.
CheckedIds
.
length
==
0
)
{
this
.
Error
(
"请先勾选要设置的资讯!"
);
return
;
}
let
idList
=
[];
this
.
CheckedIds
.
forEach
(
item
=>
{
idList
.
push
(
item
.
ID
)
})
let
GoodsIds
=
idList
.
join
(
','
);
let
str
=
""
;
let
msg
=
{
Ids
:
GoodsIds
,
ArticleStatus
:
num
,
}
if
(
num
==
1
)
{
str
=
"批量上架,是否继续"
;
}
if
(
num
==
2
)
{
str
=
"批量下架,是否继续"
;
}
if
(
num
==
3
)
{
str
=
"是否确认删除选中的资讯?"
;
var
mymsg
=
{
Ids
:
GoodsIds
}
}
let
that
=
this
;
that
.
$confirm
(
str
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
if
(
num
==
1
||
num
==
2
){
this
.
BatchShevlves
(
msg
);
}
if
(
num
==
3
){
this
.
BatchDelete
(
mymsg
);
}
}).
catch
(()
=>
{
});
},
//批量上下架
BatchShevlves
(
msg
){
this
.
apipost
(
"/api/Education/EnableArticleInfo"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getList
();
this
.
Success
(
res
.
data
.
message
);
this
.
CheckedIds
=
[];
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
//批量删除
BatchDelete
(
msg
){
this
.
apipost
(
"/api/Education/DelArticleInfo"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getList
();
this
.
Success
(
res
.
data
.
message
);
this
.
CheckedIds
=
[];
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
}
},
mounted
()
{
}
};
</
script
>
<
style
>
.informationManage
.content
.searchInput
{
border
:
1px
solid
#DCDFE6
;
border-radius
:
4px
;
}
.informationManage
.content
.searchInput
.el-input__inner
{
border
:
none
;
outline
:
none
;
height
:
30px
;
line-height
:
30px
;
}
.informationManage
.content
.searchInput
{
line-height
:
normal
;
display
:
inline-table
;
width
:
100%
;
border-collapse
:
separate
;
border-spacing
:
0
;
width
:
250px
;
margin-right
:
20px
;
}
.informationManage
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
20px
;
box-sizing
:
border-box
;
}
.informationManage
.w300
{
width
:
300px
!important
;
}
</
style
>
src/router/index.js
View file @
1f9a6379
...
...
@@ -295,7 +295,19 @@ export default new Router({
name
:
'addedautorelease'
,
component
:
resolve
=>
require
([
'@/components/education/addedautorelease'
],
resolve
),
},
//网课 教育-资讯管理
{
path
:
'/informationManage'
,
name
:
'informationManage'
,
component
:
resolve
=>
require
([
'@/components/education/informationManage'
],
resolve
),
},
//网课 教育-资讯评价
{
path
:
'/informationEvalution'
,
name
:
'informationEvalution'
,
component
:
resolve
=>
require
([
'@/components/education/informationEvalution'
],
resolve
),
},
]
},
...
...
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