|
@@ -1,86 +1,110 @@
|
|
|
<template>
|
|
|
<div class="contentDataMain">
|
|
|
- <div class="userTop">
|
|
|
- <div class="userHead">
|
|
|
- <img :src="imgUrl"/>
|
|
|
+ <div class="leftBox">
|
|
|
+ <div class="classTop">
|
|
|
+ 知识分类
|
|
|
</div>
|
|
|
- <div class="userMidle">
|
|
|
- <p class="userMidleName">Hi.</p>
|
|
|
- <p class="userMidleName">{{user.fullName}},祝你开心每一天!</p>
|
|
|
- <p class="userMidleNum">上传文件数量<span>{{myuploadNum}}</span></p>
|
|
|
- </div>
|
|
|
- <div class="userEnd">
|
|
|
- <a-cascader
|
|
|
- :popupStyle="{
|
|
|
- maxWidth: widthVar + 'px',
|
|
|
- 'overflow-x': 'auto'
|
|
|
- }"
|
|
|
- :getPopupContainer="triggerNode => { return triggerNode.parentNode }"
|
|
|
- :options="options"
|
|
|
- :show-search="{ filter }"
|
|
|
- change-on-select
|
|
|
- :default-value="defaultCascader"
|
|
|
- placeholder="请选择分类"
|
|
|
- @change="onChange"
|
|
|
- @popupVisibleChange="popupVisibleChange"
|
|
|
- class="cascaderBox scroll-ckunk"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="searchBoxTop">
|
|
|
- <search typeStr="content" searchWidth="auto" @searchResult="searchResult"></search>
|
|
|
+ <classMenu :categoryValue="categoryValue" :options="options" @changeClass="changeClass"></classMenu>
|
|
|
</div>
|
|
|
- <div class="tabBoxContent">
|
|
|
- <div v-if="index==0||(index==1&&number1Bas!=0)||(index==2&&number2Bas!=0)" v-for="(item, index) in tapArr" :key="index" @click="changeAction(index)">
|
|
|
- <span>{{index==0?categoryName:item}}({{index==0?number0:index==1?number1:number2}})</span>
|
|
|
- <img v-if="tapAction==index" src="../../../../image/tabAction.png"/>
|
|
|
+ <div class="rightBox">
|
|
|
+ <div class="userTop">
|
|
|
+ <div class="userHead">
|
|
|
+ <img :src="imgUrl"/>
|
|
|
+ </div>
|
|
|
+ <div class="userMidle">
|
|
|
+ <p class="userMidleName">Hi.</p>
|
|
|
+ <p class="userMidleName">{{user.fullName}},祝你开心每一天!</p>
|
|
|
+ <p class="userMidleNum">上传文件数量<span>{{myuploadNum}}</span></p>
|
|
|
+ </div>
|
|
|
+ <div class="userEnd">
|
|
|
+ <search typeStr="content" searchWidth="100%" @searchResult="searchResult"></search>
|
|
|
+ <!--<a-cascader
|
|
|
+ :popupStyle="{
|
|
|
+ maxWidth: widthVar + 'px',
|
|
|
+ 'overflow-x': 'auto'
|
|
|
+ }"
|
|
|
+ :getPopupContainer="triggerNode => { return triggerNode.parentNode }"
|
|
|
+ :options="options"
|
|
|
+ :show-search="{ filter }"
|
|
|
+ change-on-select
|
|
|
+ :default-value="defaultCascader"
|
|
|
+ placeholder="请选择分类"
|
|
|
+ @change="onChange"
|
|
|
+ @popupVisibleChange="popupVisibleChange"
|
|
|
+ class="cascaderBox scroll-ckunk"
|
|
|
+ />-->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="btnAddData" @click="addData">新增知识</div>
|
|
|
- </div>
|
|
|
- <div class="searchBoxContent" v-show="(tapAction==0)">
|
|
|
- <div class="noDataBox" v-if="dataList.length==0">
|
|
|
- <img src="../../../../image/noDataNew.png" class="noData"/>
|
|
|
- <p class="noDataText">暂无搜索结果</p>
|
|
|
+ <div class="searchBoxTop">
|
|
|
+ <search typeStr="content" searchWidth="auto" @searchResult="searchResult"></search>
|
|
|
</div>
|
|
|
- <div v-else class="DataBoxContent">
|
|
|
- <div class="listBox">
|
|
|
- <div class="listBoxItemContent listItemClass" v-for="(item, index) in dataList" :key="index">
|
|
|
- <pageList :showJurisdiction="true" :item="item" type="list0" v-if="type==3||type==4"></pageList>
|
|
|
- <pageList :showJurisdiction="true" v-else :item="item" :type="type!=null||categoryName=='全部分类'?'list1':'list0'"></pageList>
|
|
|
- <a-divider class="bottomBorder" v-if="(index!=dataList.length-1)"/>
|
|
|
- </div>
|
|
|
+ <div class="tabBoxContent">
|
|
|
+ <div v-if="index==0||(index==1&&number1Bas!=0)||(index==2&&number2Bas!=0)||(index==3&&number3Bas!=0)" v-for="(item, index) in tapArr" :key="index" @click="changeAction(index)">
|
|
|
+ <span>{{index==0?categoryName:item}}({{index==0?number0:index==1?number1:index==2?number2:number3}})</span>
|
|
|
+ <img v-if="tapAction==index" src="../../../../image/tabAction.png"/>
|
|
|
</div>
|
|
|
- <pageBar ref="pageBarref0" @pageChange="pageChange0" :total="total" :pageSize="pageSize" class="pageBar"></pageBar>
|
|
|
+ <div class="btnAddData" @click="addData">新增知识</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="searchBoxContent" v-show="(tapAction==1)">
|
|
|
- <div class="noDataBox" v-if="dataList1.length==0">
|
|
|
- <img src="../../../../image/noDataNew.png" class="noData"/>
|
|
|
- <p class="noDataText">暂无搜索结果</p>
|
|
|
+ <div class="searchBoxContent" v-show="(tapAction==0)">
|
|
|
+ <div class="noDataBox" v-if="dataList.length==0">
|
|
|
+ <img src="../../../../image/noDataNew.png" class="noData"/>
|
|
|
+ <p class="noDataText">暂无搜索结果</p>
|
|
|
+ </div>
|
|
|
+ <div v-else class="DataBoxContent">
|
|
|
+ <div class="listBox">
|
|
|
+ <div class="listBoxItemContent listItemClass" v-for="(item, index) in dataList" :key="index">
|
|
|
+ <pageList :showJurisdiction="true" :item="item" type="list0" v-if="type==3||type==4"></pageList>
|
|
|
+ <pageList :showJurisdiction="true" v-else :item="item" :type="type!=null||categoryName=='全部分类'?'list1':'list0'"></pageList>
|
|
|
+ <a-divider class="bottomBorder" v-if="(index!=dataList.length-1)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <pageBar ref="pageBarref0" @pageChange="pageChange0" :total="total" :pageSize="pageSize" class="pageBar"></pageBar>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div v-else class="DataBoxContent">
|
|
|
- <div class="listBox">
|
|
|
- <div class="listBoxItemContent listItemClass" v-for="(item, index) in dataList1" :key="index">
|
|
|
- <pageList :item="item" type="list1" :approval="true" @delRefresh="delRefresh"></pageList>
|
|
|
- <a-divider class="bottomBorder" v-if="(index!=dataList1.length-1)"/>
|
|
|
+ <div class="searchBoxContent" v-show="(tapAction==1)">
|
|
|
+ <div class="noDataBox" v-if="dataList1.length==0">
|
|
|
+ <img src="../../../../image/noDataNew.png" class="noData"/>
|
|
|
+ <p class="noDataText">暂无搜索结果</p>
|
|
|
+ </div>
|
|
|
+ <div v-else class="DataBoxContent">
|
|
|
+ <div class="listBox">
|
|
|
+ <div class="listBoxItemContent listItemClass" v-for="(item, index) in dataList1" :key="index">
|
|
|
+ <pageList :item="item" type="list1" :approval="true" @delRefresh="delRefresh"></pageList>
|
|
|
+ <a-divider class="bottomBorder" v-if="(index!=dataList1.length-1)"/>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <pageBar ref="pageBarref1" @pageChange="pageChange1" :total="total" :pageSize="pageSize" class="pageBar"></pageBar>
|
|
|
</div>
|
|
|
- <pageBar ref="pageBarref1" @pageChange="pageChange1" :total="total" :pageSize="pageSize" class="pageBar"></pageBar>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="searchBoxContent" v-show="(tapAction==2)">
|
|
|
- <div class="noDataBox" v-if="dataList2.length==0">
|
|
|
- <img src="../../../../image/noDataNew.png" class="noData"/>
|
|
|
- <p class="noDataText">暂无搜索结果</p>
|
|
|
+ <div class="searchBoxContent" v-show="(tapAction==2)">
|
|
|
+ <div class="noDataBox" v-if="dataList2.length==0">
|
|
|
+ <img src="../../../../image/noDataNew.png" class="noData"/>
|
|
|
+ <p class="noDataText">暂无搜索结果</p>
|
|
|
+ </div>
|
|
|
+ <div v-else class="DataBoxContent">
|
|
|
+ <div class="listBox">
|
|
|
+ <div class="listBoxItemContent listItemClass" v-for="(item, index) in dataList2" :key="index">
|
|
|
+ <pageList :item="item" type="list1" :showEdit="true"></pageList>
|
|
|
+ <a-divider class="bottomBorder" v-if="(index!=dataList2.length-1)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <pageBar ref="pageBarref2" @pageChange="pageChange2" :total="total" :pageSize="pageSize" class="pageBar"></pageBar>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div v-else class="DataBoxContent">
|
|
|
- <div class="listBox">
|
|
|
- <div class="listBoxItemContent listItemClass" v-for="(item, index) in dataList2" :key="index">
|
|
|
- <pageList :item="item" type="list1"></pageList>
|
|
|
- <a-divider class="bottomBorder" v-if="(index!=dataList2.length-1)"/>
|
|
|
+ <div class="searchBoxContent" v-show="(tapAction==3)">
|
|
|
+ <div class="noDataBox" v-if="dataList3.length==0">
|
|
|
+ <img src="../../../../image/noDataNew.png" class="noData"/>
|
|
|
+ <p class="noDataText">暂无搜索结果</p>
|
|
|
+ </div>
|
|
|
+ <div v-else class="DataBoxContent">
|
|
|
+ <div class="listBox">
|
|
|
+ <div class="listBoxItemContent listItemClass" v-for="(item, index) in dataList3" :key="index">
|
|
|
+ <pageList :item="item" type="list1" :showEdit="true" :hideLook="true"></pageList>
|
|
|
+ <a-divider class="bottomBorder" v-if="(index!=dataList3.length-1)"/>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <pageBar ref="pageBarref3" @pageChange="pageChange3" :total="total" :pageSize="pageSize" class="pageBar"></pageBar>
|
|
|
</div>
|
|
|
- <pageBar ref="pageBarref2" @pageChange="pageChange2" :total="total" :pageSize="pageSize" class="pageBar"></pageBar>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -92,13 +116,15 @@ import api from '@/api/knowledge/warehouseIndex'
|
|
|
import search from '../components/search'
|
|
|
import pageBar from '../components/pageBar'
|
|
|
import pageList from '../components/pageList'
|
|
|
+import classMenu from '../components/classMenu'
|
|
|
import {mapState} from "vuex";
|
|
|
export default {
|
|
|
name: 'contentData',
|
|
|
components: {
|
|
|
search,
|
|
|
pageBar,
|
|
|
- pageList
|
|
|
+ pageList,
|
|
|
+ classMenu
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState({
|
|
@@ -123,14 +149,17 @@ export default {
|
|
|
pageNum0:1,
|
|
|
pageNum1:1,
|
|
|
pageNum2:1,
|
|
|
+ pageNum3:1,
|
|
|
total:2,
|
|
|
pageSize:10,
|
|
|
- tapArr:['','我的审批','我的上传'],
|
|
|
+ tapArr:['','我的审批','我的上传','我的草稿'],
|
|
|
number0:0,
|
|
|
number1:0,
|
|
|
number2:0,
|
|
|
+ number3:0,
|
|
|
number1Bas:0,
|
|
|
number2Bas:0,
|
|
|
+ number3Bas:0,
|
|
|
myuploadNum:0,
|
|
|
tapAction:0,
|
|
|
dataList:[
|
|
@@ -139,6 +168,8 @@ export default {
|
|
|
],
|
|
|
dataList2:[
|
|
|
],
|
|
|
+ dataList3:[
|
|
|
+ ],
|
|
|
options: [],
|
|
|
type:null,
|
|
|
typeName:["最新知识","最热知识","文档排行","工作成果","经典案例","维基排行"],
|
|
@@ -146,6 +177,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ if(this.$route.query.showMy!=undefined){
|
|
|
+ this.changeAction(2)
|
|
|
+ }
|
|
|
if(this.$route.query.type!=undefined){
|
|
|
this.type=this.$route.query.type
|
|
|
this.categoryName=this.typeName[this.type]
|
|
@@ -225,11 +259,26 @@ export default {
|
|
|
this.getData(true);
|
|
|
}
|
|
|
},
|
|
|
+ //修改分类
|
|
|
+ changeClass(data){
|
|
|
+ if(data.categoryId=='000'){
|
|
|
+ this.categoryId = ''
|
|
|
+ }else{
|
|
|
+ this.categoryId = data.categoryId
|
|
|
+ }
|
|
|
+ this.categoryValue = data.categoryValue
|
|
|
+ this.categoryName = data.categoryName
|
|
|
+ this.type = null
|
|
|
+ this.getData(true);
|
|
|
+ },
|
|
|
filter(inputValue, path) {
|
|
|
return path.some(option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1);
|
|
|
},
|
|
|
// 跳转添加
|
|
|
addData(){
|
|
|
+ if(this.categoryValue.join(',')=='000'){
|
|
|
+ this.categoryValue=[]
|
|
|
+ }
|
|
|
this.$router.push({
|
|
|
name: "knowledgeAddUpdate",
|
|
|
query: {
|
|
@@ -420,6 +469,40 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
+ /*if(this.tapAction==3||type){
|
|
|
+ let param0 = {
|
|
|
+ "pageNo": this.pageNum,
|
|
|
+ "pageSize": 10,
|
|
|
+ "sortField": "CREATE_TIME_",
|
|
|
+ "sortOrder": "desc",
|
|
|
+ params: {
|
|
|
+ "isDraft":0,
|
|
|
+ "createBy":this.user.userId,
|
|
|
+ "keyword":this.searchData.keyword
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(this.searchData.range!=0){
|
|
|
+ param0.params.type=this.searchData.range
|
|
|
+ }
|
|
|
+ contentData.findAllKnowledge(param0).then((res) => {
|
|
|
+ res.result.data.forEach(element => {
|
|
|
+ element.documentName = element.attachmentName
|
|
|
+ element.documentRemark = element.summary
|
|
|
+ element.viewNum = element.views
|
|
|
+ element.uploadTime = element.createTime
|
|
|
+ element.categoryArr = []
|
|
|
+ this.getType(element)
|
|
|
+ this.getCategory(element.categoryArr,element.knowledgeCategoryAdminVo)
|
|
|
+ });
|
|
|
+ this.number3 = res.result.totalCount
|
|
|
+ this.dataList3 = res.result.data
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ if(Number(res.result.totalCount)!=0){
|
|
|
+ this.$refs.pageBarref3.setTotal(Number(res.result.totalCount))
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }*/
|
|
|
},
|
|
|
// 删除刷新页面
|
|
|
delRefresh(){
|
|
@@ -468,9 +551,8 @@ export default {
|
|
|
getBaseData(){
|
|
|
contentData.getAllKnowledgeCategory().then((res) =>{
|
|
|
this.categoryData(res.data)
|
|
|
- console.log(res.data)
|
|
|
let allposition={
|
|
|
- children: [],
|
|
|
+ children: res.data,
|
|
|
isSys: 0,
|
|
|
label: "全部分类",
|
|
|
level: 1,
|
|
@@ -478,14 +560,14 @@ export default {
|
|
|
operatorName: null,
|
|
|
parent: "0",
|
|
|
parents: null,
|
|
|
- pkId: "",
|
|
|
+ pkId: "000",
|
|
|
sort: 2,
|
|
|
updateBy: "1",
|
|
|
updateTime: "2022-12-27 17:00:30",
|
|
|
value: ""
|
|
|
}
|
|
|
- res.data.unshift(allposition)
|
|
|
- this.options=res.data
|
|
|
+ // res.data.unshift(allposition)
|
|
|
+ this.options=allposition
|
|
|
})
|
|
|
this.delRefresh()
|
|
|
let param1 = {
|
|
@@ -518,6 +600,36 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
+ /*let param0 = {
|
|
|
+ "pageNo": this.pageNum,
|
|
|
+ "pageSize": 10,
|
|
|
+ "sortField": "CREATE_TIME_",
|
|
|
+ "sortOrder": "desc",
|
|
|
+ params: {
|
|
|
+ "isDraft":0,
|
|
|
+ "createBy":this.user.userId,
|
|
|
+ "keyword":this.searchData.keyword
|
|
|
+ }
|
|
|
+ }
|
|
|
+ contentData.findAllKnowledge(param0).then((res) => {
|
|
|
+ res.result.data.forEach(element => {
|
|
|
+ element.documentName = element.attachmentName
|
|
|
+ element.documentRemark = element.summary
|
|
|
+ element.viewNum = element.views
|
|
|
+ element.uploadTime = element.createTime
|
|
|
+ element.categoryArr = []
|
|
|
+ this.getType(element)
|
|
|
+ this.getCategory(element.categoryArr,element.knowledgeCategoryAdminVo)
|
|
|
+ });
|
|
|
+ this.number3 = res.result.totalCount
|
|
|
+ this.number3Bas = res.result.totalCount
|
|
|
+ this.dataList3 = res.result.data
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ if(Number(res.result.totalCount)!=0){
|
|
|
+ this.$refs.pageBarref3.setTotal(Number(res.result.totalCount))
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })*/
|
|
|
},
|
|
|
// 获取文件分类名
|
|
|
getType(item){
|
|
@@ -539,6 +651,9 @@ export default {
|
|
|
},
|
|
|
// 处理分类
|
|
|
getCategory(arr,data){
|
|
|
+ if(data==null){
|
|
|
+ return false
|
|
|
+ }
|
|
|
arr.unshift(data.name)
|
|
|
if(data.parents!=null){
|
|
|
this.getCategory(arr,data.parents)
|
|
@@ -556,6 +671,9 @@ export default {
|
|
|
if(this.tapAction==2){
|
|
|
this.pageNum = this.pageNum2
|
|
|
}
|
|
|
+ if(this.tapAction==3){
|
|
|
+ this.pageNum = this.pageNum3
|
|
|
+ }
|
|
|
},
|
|
|
// 页码处理
|
|
|
pageChange0(num){
|
|
@@ -575,6 +693,13 @@ export default {
|
|
|
this.pageNum2 = num
|
|
|
this.getData(false)
|
|
|
}
|
|
|
+ ,
|
|
|
+ // 页码处理
|
|
|
+ pageChange3(num){
|
|
|
+ this.pageNum = num
|
|
|
+ this.pageNum3 = num
|
|
|
+ this.getData(false)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -583,7 +708,9 @@ export default {
|
|
|
position: absolute;
|
|
|
background: #FAFAFA;
|
|
|
height: 100%;
|
|
|
+ width: 100%;
|
|
|
overflow: scroll;
|
|
|
+ display: flex;
|
|
|
}
|
|
|
.searchHead{
|
|
|
background: #fff;
|
|
@@ -591,7 +718,7 @@ export default {
|
|
|
width: 100%;
|
|
|
}
|
|
|
.searchBoxContent{
|
|
|
- margin: 0px 10.94vw;
|
|
|
+ width: 78.125vw;
|
|
|
border-bottom-left-radius: 10px;
|
|
|
border-bottom-right-radius: 10px;
|
|
|
}
|
|
@@ -601,6 +728,7 @@ export default {
|
|
|
padding: 1.5625vw;
|
|
|
margin-top: 1.25vw;
|
|
|
border-radius: 10px;
|
|
|
+ display: none;
|
|
|
}
|
|
|
.noDataBox{
|
|
|
width: 100%;
|
|
@@ -620,8 +748,7 @@ export default {
|
|
|
}
|
|
|
.tabBoxContent{
|
|
|
display: flow-root;
|
|
|
- width: 78.12vw;
|
|
|
- margin: 0px 10.94vw;
|
|
|
+ width: 78.125vw;
|
|
|
background: #fff;
|
|
|
margin-top: 1.25vw;
|
|
|
border-bottom: 1px solid #EEEEEE;
|
|
@@ -688,7 +815,7 @@ export default {
|
|
|
margin-bottom: 0px;
|
|
|
}
|
|
|
.userTop{
|
|
|
- margin: 0px 10.94vw;
|
|
|
+ width: 78.125vw;
|
|
|
background: #fff;
|
|
|
padding: 1.5625vw;
|
|
|
margin-top: 1.5104vw;
|
|
@@ -723,6 +850,9 @@ export default {
|
|
|
}
|
|
|
.userEnd{
|
|
|
margin-left: auto;
|
|
|
+ width: 47.34375vw;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
}
|
|
|
.cascaderBox{
|
|
|
width: 20.625vw;
|
|
@@ -744,4 +874,22 @@ export default {
|
|
|
/deep/ .ant-cascader-menu:last-child {
|
|
|
margin-right: 0!important;
|
|
|
}
|
|
|
+.leftBox{
|
|
|
+ margin-top: 1.5104vw;
|
|
|
+ width:11.71875vw;
|
|
|
+ margin-right:1.25vw;
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 10px;
|
|
|
+ overflow-x: scroll;
|
|
|
+}
|
|
|
+.rightBox{
|
|
|
+ height: 100%;
|
|
|
+ overflow: scroll;
|
|
|
+}
|
|
|
+.classTop{
|
|
|
+ font-size: 1.04vw;
|
|
|
+ padding: 1.25vw 1.25vw 0.625vw;
|
|
|
+ color: #202124 ;
|
|
|
+ font-weight: 500;
|
|
|
+}
|
|
|
</style>
|