|
@@ -7,50 +7,53 @@
|
|
|
</div>
|
|
|
<div class="assistance-center-top-search">
|
|
|
<el-cascader
|
|
|
- v-model="queryParams.classifyId"
|
|
|
:options="classifyList"
|
|
|
collapse-tags
|
|
|
clearable
|
|
|
:props="{
|
|
|
multiple:true,
|
|
|
- value:'id',
|
|
|
- label:'text',
|
|
|
- children:'child'
|
|
|
+ value:'ClassifyId',
|
|
|
+ label:'ClassifyName',
|
|
|
+ children:'Children',
|
|
|
+ emitPath:false
|
|
|
}"
|
|
|
placeholder="所属分类"
|
|
|
@change="handlSearchClassify"
|
|
|
/>
|
|
|
- <el-input placeholder="文章标题" v-model="queryParams.title" @input="handlSearchClassify" clearable
|
|
|
+ <el-input placeholder="文章标题" v-model="queryParams.KeyWord" clearable @input="getDocumentList"
|
|
|
style="width:500px;margin-left: 20px;">
|
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
|
</el-input>
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-table ref="documentTable" :data="documentList" border class="document-table">
|
|
|
- <el-table-column prop="title" label="文章标题" align="center">
|
|
|
+ <el-table-column prop="Title" label="文章标题" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span @click="goDetail(scope.row)" class="document-title">{{scope.row.title}}</span>
|
|
|
+ <span @click="goDetail(scope.row)" class="document-title">{{scope.row.Title}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="classify" label="所属分类" align="center">
|
|
|
- <template slot-scope="scope"> <span>{{scope.row.classify}}</span> </template>
|
|
|
+ <el-table-column prop="ClassifyName" label="所属分类" align="center">
|
|
|
+ <template slot-scope="scope"> <span>{{scope.row.ClassifyName}}</span> </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="author" label="文章作者" align="center">
|
|
|
- <template slot-scope="scope"> <span>{{scope.row.author}}</span> </template>
|
|
|
+ <el-table-column prop="Author" label="文章作者" align="center">
|
|
|
+ <template slot-scope="scope"> <span>{{scope.row.Author}}</span> </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="status" label="发布状态" align="center">
|
|
|
+ <el-table-column prop="Status" label="发布状态" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span :style="{color:scope.row.status==1?'#4FB112':'#F56C6C'}">{{scope.row.status==1?"已发布":"未发布"}}</span>
|
|
|
+ <span :style="{color:scope.row.Status==2?'#4FB112':'#F56C6C'}">{{scope.row.Status==2?"已发布":"未发布"}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="updateTime" label="更新时间" align="center">
|
|
|
- <template slot-scope="scope"> <span>{{scope.row.updateTime}}</span> </template>
|
|
|
+ <el-table-column prop="CreateTime" label="创建时间" align="center">
|
|
|
+ <template slot-scope="scope"> <span>{{scope.row.CreateTime}}</span> </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="ModifyTime" label="更新时间" align="center">
|
|
|
+ <template slot-scope="scope"> <span>{{scope.row.ModifyTime}}</span> </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" min-width="110" v-if="Role!='admin'">
|
|
|
<template slot-scope="scope">
|
|
|
<div style="color:#4099ef;">
|
|
|
- <span style="margin-right:10px;cursor: pointer;" @click="publish(scope.row)" v-if="scope.row.status==1">取消发布</span>
|
|
|
- <template v-if="scope.row.status==0">
|
|
|
+ <span style="margin-right:10px;cursor: pointer;" @click="publish(scope.row)" v-if="scope.row.Status==2">取消发布</span>
|
|
|
+ <template v-if="scope.row.Status==1">
|
|
|
<span style="margin-right:10px;cursor: pointer;" @click="editDocument(scope.row)">编辑</span>
|
|
|
<span style="margin-right:10px;cursor: pointer;" @click="publish(scope.row)">发布</span>
|
|
|
</template>
|
|
@@ -72,6 +75,7 @@
|
|
|
|
|
|
<script>
|
|
|
import mPage from '@/components/mPage.vue';
|
|
|
+import { assistanceDocInterence } from '../../../api/modules/assistanceDoc';
|
|
|
|
|
|
export default {
|
|
|
name:"assistanceCenter",
|
|
@@ -80,11 +84,12 @@ import mPage from '@/components/mPage.vue';
|
|
|
return {
|
|
|
classifyList:[],
|
|
|
documentList:[],
|
|
|
+ ClassifyIdList:[],
|
|
|
queryParams:{
|
|
|
CurrentIndex:1,
|
|
|
PageSize:10,
|
|
|
- classifyId:[],
|
|
|
- title:""
|
|
|
+ ClassifyIds:"",
|
|
|
+ KeyWord:""
|
|
|
},
|
|
|
total:100
|
|
|
}
|
|
@@ -95,69 +100,23 @@ import mPage from '@/components/mPage.vue';
|
|
|
},
|
|
|
methods: {
|
|
|
getClassifyList(){
|
|
|
- //TODO: 获取分类列表接口
|
|
|
- this.classifyList = [
|
|
|
- {id:1,text:"分类介绍",child:[{id:11,text:"分类介绍1",child:[{id:111,text:"分类介绍11",child:null}]}]},
|
|
|
- {id:2,text:"ETA使用",child:[{id:22,text:"ETA使用1",child:[{id:222,text:"ETA使用11",child:null}]}]},
|
|
|
- {id:3,text:"ETA移动",child:[{id:33,text:"ETA移动1",child:[{id:333,text:"ETA移动11",child:null}]}]},
|
|
|
- {id:4,text:"指标成图",child:[{id:44,text:"指标成图1",child:[{id:444,text:"指标成图11",child:null}]}]},
|
|
|
- {id:5,text:"图表分析",child:[{id:55,text:"图表分析1",child:[{id:555,text:"图表分析11",child:null}]}]}
|
|
|
- ]
|
|
|
+ assistanceDocInterence.getAssistanceClassifyList().then(res=>{
|
|
|
+ if(res.Ret == 200){
|
|
|
+ this.classifyList = res.Data?res.Data.AllNodes||[]:[]
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
getDocumentList(){
|
|
|
- //TODO: 获取文章列表接口
|
|
|
- this.documentList=[
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:0,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:0,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`},
|
|
|
- {id:1,title:"关于ETA投研系统",classify:"ETA介绍/关于ETA投研系统",author:"张三",status:1,updateTime:"2023-07-21 12:12:12",
|
|
|
- Content:`<p style='color:red;font-size:26px;background-color:#000000'>帮助中心啦</p>`}]
|
|
|
+ assistanceDocInterence.getAssistanceDocList(this.queryParams).then(res=>{
|
|
|
+ if(res.Ret == 200){
|
|
|
+ this.documentList=res.Data.List || []
|
|
|
+ this.total = res.Data.Paging.Totals || 0
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
- handlSearchClassify(){
|
|
|
- console.log(this.queryParams);
|
|
|
+ handlSearchClassify(value){
|
|
|
+ // console.log(value);
|
|
|
+ this.queryParams.ClassifyIds = value.join(',')
|
|
|
this.getDocumentList()
|
|
|
},
|
|
|
pageChange(page_no){
|
|
@@ -165,15 +124,11 @@ import mPage from '@/components/mPage.vue';
|
|
|
this.handlSearchClassify()
|
|
|
},
|
|
|
goDetail(item){
|
|
|
- //TODO: 去往详情
|
|
|
- sessionStorage.setItem("documentDoc",item.Content)
|
|
|
- let { href } = this.$router.resolve({ path: "/assistanceDocDetail" });
|
|
|
- window.open(href, "_blank");
|
|
|
+ this.$router.push({path:"/assistanceDocDetail",query:{DocId:item.Id}})
|
|
|
},
|
|
|
//发布/取消发布
|
|
|
publish(item){
|
|
|
- console.log(item.status);
|
|
|
- let text = item.status==1?'取消发布':'发布'
|
|
|
+ let text = item.Status==2?'取消发布':'发布'
|
|
|
|
|
|
this.$confirm(`是否确认${text}?`,"提示",
|
|
|
{
|
|
@@ -181,16 +136,22 @@ import mPage from '@/components/mPage.vue';
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
}).then(res=>{
|
|
|
- //TODO: 接口对接
|
|
|
- this.$message.success(text+"成功")
|
|
|
- this.getDocumentList()
|
|
|
+ assistanceDocInterence.assistanceDocPublish({
|
|
|
+ DocId:item.Id,
|
|
|
+ Status:3-item.Status
|
|
|
+ }).then(res=>{
|
|
|
+ if(res.Ret == 200){
|
|
|
+ this.$message.success(text+"成功")
|
|
|
+ this.getDocumentList()
|
|
|
+ }
|
|
|
+ })
|
|
|
}).catch(() => {});
|
|
|
},
|
|
|
addDocument(){
|
|
|
this.$router.push("/assistanceDocAdd")
|
|
|
},
|
|
|
editDocument(item){
|
|
|
- this.$router.push({path:"/assistanceDocAdd",query:{DocId:5}})
|
|
|
+ this.$router.push({path:"/assistanceDocEdit",query:{DocId:item.Id}})
|
|
|
},
|
|
|
//删除文章
|
|
|
deleteDocument(item){
|
|
@@ -200,9 +161,12 @@ import mPage from '@/components/mPage.vue';
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
}).then(res=>{
|
|
|
- //TODO: 接口对接
|
|
|
- this.$message.success("删除成功")
|
|
|
- this.getDocumentList()
|
|
|
+ assistanceDocInterence.assistanceDocDelete({DocId:item.Id}).then(res=>{
|
|
|
+ if(res.Ret == 200){
|
|
|
+ this.$message.success("删除成功")
|
|
|
+ this.getDocumentList()
|
|
|
+ }
|
|
|
+ })
|
|
|
}).catch(() => {});
|
|
|
},
|
|
|
classifyManage(){
|