|
|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<div ref="lxHeader">
|
|
|
|
|
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
|
|
|
|
<lx-header icon="md-apps" :text="$route.meta.title+select.catalog_name" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
|
|
|
|
<div slot="content" v-if="!hasMenu">
|
|
|
|
|
<div class="searchwrap" style="display: flex;align-items: center;">
|
|
|
|
|
<div>
|
|
|
|
|
@ -51,13 +51,13 @@
|
|
|
|
|
@change="changeEnd" v-model="select.endRange" type="daterange" format="yyyy-MM-dd"
|
|
|
|
|
value-format="yyyy-MM-dd" range-separator="至" start-placeholder="结束日期" end-placeholder="">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<el-select style="width:200px" v-model="select.records_status" placeholder="请选择是否到期">
|
|
|
|
|
<el-option v-for="item in rsList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div>
|
|
|
|
|
<el-select style="width:200px" v-model="select.records_status" placeholder="请选择是否到期">
|
|
|
|
|
<el-option v-for="item in rsList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div>
|
|
|
|
|
<el-button type="primary" size="small" @click="select.page=1,getList()">查询</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
@ -66,6 +66,9 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<el-button type="primary" size="small" v-if="!is_search" @click="editIndex('add')">新增</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<el-button type="primary" size="small" v-if="!hasMenu && !is_search" @click="goBack()">返回上一级</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@ -81,17 +84,21 @@
|
|
|
|
|
</el-tree>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div v-if="hasMenu" class="catalog_list">
|
|
|
|
|
<div v-for="item in catalogChildren" class='catalog_item' @click="toUrl(item)">
|
|
|
|
|
<div v-for="item in showData" class='catalog_item' @click="clickIn(item)">
|
|
|
|
|
<div>
|
|
|
|
|
<i :class="item.children&&item.children.length>0?'el-icon-folder-opened':'el-icon-document-copy'"></i>
|
|
|
|
|
<div>{{item.name}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div @click="clickOut" class="catalog_item">
|
|
|
|
|
<i v-if="historyList.length>0"
|
|
|
|
|
class="el-icon-arrow-left"></i>
|
|
|
|
|
<div>{{historyList.length>0?"返回上一级":""}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="catalog_right" v-else>
|
|
|
|
|
<xy-table @getHeight="initHeight" :list="list" :total="total" @pageIndexChange="pageIndexChange"
|
|
|
|
|
@pageSizeChange="pageSizeChange" :table-item="table_item">
|
|
|
|
|
<xy-table @getHeight="initHeight" :defaultExpandAll='false' :isPage="false" rowKey="id" :list="list" :table-item="table_item">
|
|
|
|
|
<template v-slot:catalog_name>
|
|
|
|
|
<el-table-column align='center' label="所属目录" width="240" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
@ -131,25 +138,27 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:link_id>
|
|
|
|
|
<el-table-column align='center' label="前续文档" width="120" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div style="color:#b3241d;cursor: pointer;text-decoration: underline;" v-if="scope.row.link_id" @click="showIndex('show',scope.row.link_id)">
|
|
|
|
|
查看
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:next_link_id>
|
|
|
|
|
<el-table-column align='center' label="延续文档" width="120" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div style="color:#b3241d;cursor: pointer;text-decoration: underline;" v-if="scope.row.next_link_id" @click="showIndex('show',scope.row.next_link_id)">
|
|
|
|
|
查看
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- <template v-slot:link_id>
|
|
|
|
|
<el-table-column align='center' label="前续文档" width="120" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div style="color:#b3241d;cursor: pointer;text-decoration: underline;" v-if="scope.row.link_id"
|
|
|
|
|
@click="showIndex('show',scope.row.link_id)">
|
|
|
|
|
查看
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:next_link_id>
|
|
|
|
|
<el-table-column align='center' label="延续文档" width="120" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div style="color:#b3241d;cursor: pointer;text-decoration: underline;" v-if="scope.row.next_link_id"
|
|
|
|
|
@click="showIndex('show',scope.row.next_link_id)">
|
|
|
|
|
查看
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template> -->
|
|
|
|
|
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<el-table-column align='center' fixed="right" label="操作" width="240" header-align="center">
|
|
|
|
|
@ -259,8 +268,8 @@
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
text: '本周',
|
|
|
|
|
onClick(picker) {
|
|
|
|
|
const end = new Date();
|
|
|
|
|
onClick(picker) {
|
|
|
|
|
const end = new Date();
|
|
|
|
|
const start = new Date();
|
|
|
|
|
const date = new Date();
|
|
|
|
|
const today = new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
|
|
|
@ -269,32 +278,32 @@
|
|
|
|
|
const diff = 1 - today.getDay();
|
|
|
|
|
firstDay.setDate(today.getDate() + diff); // 获取本周第一天的日期
|
|
|
|
|
lastDay.setDate(today.getDate() + (6 - today.getDay() + 1)); // 获取本周最后一天的日期
|
|
|
|
|
start.setTime(firstDay);
|
|
|
|
|
start.setTime(firstDay);
|
|
|
|
|
end.setTime(lastDay);
|
|
|
|
|
picker.$emit('pick', [start, end]);
|
|
|
|
|
}
|
|
|
|
|
}]
|
|
|
|
|
},
|
|
|
|
|
rsList:[{
|
|
|
|
|
id:1,
|
|
|
|
|
name:'是'
|
|
|
|
|
},{
|
|
|
|
|
id:0,
|
|
|
|
|
name:'否'
|
|
|
|
|
},
|
|
|
|
|
rsList: [{
|
|
|
|
|
id: 1,
|
|
|
|
|
name: '是'
|
|
|
|
|
}, {
|
|
|
|
|
id: 0,
|
|
|
|
|
name: '否'
|
|
|
|
|
}],
|
|
|
|
|
select: {
|
|
|
|
|
title: '',
|
|
|
|
|
table_name: 'records',
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 10,
|
|
|
|
|
page_size: 9999,
|
|
|
|
|
catalog_id: '',
|
|
|
|
|
catalog_name: '',
|
|
|
|
|
status: '',
|
|
|
|
|
area_id: '',
|
|
|
|
|
tag_id: '',
|
|
|
|
|
startRange: [],
|
|
|
|
|
endRange: [],
|
|
|
|
|
records_status:''
|
|
|
|
|
endRange: [],
|
|
|
|
|
// records_status:''
|
|
|
|
|
},
|
|
|
|
|
hasMenu: false,
|
|
|
|
|
myHeight: 0,
|
|
|
|
|
@ -306,9 +315,10 @@
|
|
|
|
|
label: 'name'
|
|
|
|
|
},
|
|
|
|
|
catalogList: [],
|
|
|
|
|
historyList: [],
|
|
|
|
|
menuName:[],
|
|
|
|
|
showData:[],
|
|
|
|
|
catalogChildren: [], // 存储所有数据
|
|
|
|
|
showChildren: [], // 目前显示
|
|
|
|
|
lastChildren: [], // 上一级
|
|
|
|
|
areaList: [],
|
|
|
|
|
tagList: [],
|
|
|
|
|
nowDate: '',
|
|
|
|
|
@ -320,7 +330,7 @@
|
|
|
|
|
type: ''
|
|
|
|
|
}, {
|
|
|
|
|
id: 3,
|
|
|
|
|
name: '已结束',
|
|
|
|
|
name: '已结束',
|
|
|
|
|
type: 'info'
|
|
|
|
|
}, {
|
|
|
|
|
id: 1,
|
|
|
|
|
@ -340,19 +350,19 @@
|
|
|
|
|
label: '标题',
|
|
|
|
|
align: 'left',
|
|
|
|
|
width: 360,
|
|
|
|
|
headerAlign: 'left'
|
|
|
|
|
headerAlign: 'center'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
prop: 'catalog_name',
|
|
|
|
|
label: '所属目录',
|
|
|
|
|
prop: 'date',
|
|
|
|
|
label: '开始日期',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 240
|
|
|
|
|
width: 120
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
prop: 'area_name',
|
|
|
|
|
label: '区域',
|
|
|
|
|
prop: 'end_date',
|
|
|
|
|
label: '结束日期',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 240
|
|
|
|
|
width: 120
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
prop: 'tag_name',
|
|
|
|
|
@ -361,36 +371,35 @@
|
|
|
|
|
width: 240
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
prop: 'status',
|
|
|
|
|
label: '状态',
|
|
|
|
|
prop: 'area_name',
|
|
|
|
|
label: '所属区域',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 120
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
prop: 'link_id',
|
|
|
|
|
label: '来源文档',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 120
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
prop: 'next_link_id',
|
|
|
|
|
label: '延续文档',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 120
|
|
|
|
|
width: 240
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
prop: 'date',
|
|
|
|
|
label: '开始日期',
|
|
|
|
|
prop: 'status',
|
|
|
|
|
label: '状态',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 120
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
prop: 'end_date',
|
|
|
|
|
label: '结束日期',
|
|
|
|
|
prop: 'catalog_name',
|
|
|
|
|
label: '所属目录',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 120
|
|
|
|
|
}
|
|
|
|
|
width: 240
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// prop: 'link_id',
|
|
|
|
|
// label: '来源文档',
|
|
|
|
|
// align: 'center',
|
|
|
|
|
// width: 120
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// prop: 'next_link_id',
|
|
|
|
|
// label: '延续文档',
|
|
|
|
|
// align: 'center',
|
|
|
|
|
// width: 120
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
@ -410,27 +419,25 @@
|
|
|
|
|
this.select.endRange = [this.startDate, this.nowDate]
|
|
|
|
|
this.select.status = 0
|
|
|
|
|
this.is_search = true
|
|
|
|
|
}
|
|
|
|
|
if(this.$route.query.status1Total){
|
|
|
|
|
this.select.status = 1
|
|
|
|
|
this.is_search = true
|
|
|
|
|
}
|
|
|
|
|
if (this.$route.query.status1Total) {
|
|
|
|
|
this.select.status = 1
|
|
|
|
|
this.is_search = true
|
|
|
|
|
}
|
|
|
|
|
// this.getCatalogList()
|
|
|
|
|
// 分辨是有下级的 还是直接显示列表
|
|
|
|
|
if (this.$route.path) {
|
|
|
|
|
let path = this.$route.path.split("_")
|
|
|
|
|
this.select.catalog_id = path[1]
|
|
|
|
|
console.log(this.$route.path.includes('menu'))
|
|
|
|
|
if (this.$route.path.includes('menu')) {
|
|
|
|
|
this.hasMenu = true
|
|
|
|
|
this.getCatalogList(path[1])
|
|
|
|
|
} else {
|
|
|
|
|
this.getCatalogList()
|
|
|
|
|
this.getAreaList()
|
|
|
|
|
this.getTagList()
|
|
|
|
|
this.getCatalogList()
|
|
|
|
|
this.getList()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.getAreaList()
|
|
|
|
|
this.getTagList()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
@ -475,6 +482,37 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
clickIn(i) {
|
|
|
|
|
if (i.children && i.children.length > 0) {
|
|
|
|
|
this.historyList.push(this.showData);
|
|
|
|
|
|
|
|
|
|
this.showData = i.children;
|
|
|
|
|
this.menuName.push(i.name)
|
|
|
|
|
this.select.catalog_name = ' / ' + this.menuName.join(" / ")
|
|
|
|
|
console.log(this.historyList);
|
|
|
|
|
}else{
|
|
|
|
|
this.select.catalog_id = i.id
|
|
|
|
|
this.menuName.push(i.name)
|
|
|
|
|
this.select.catalog_name = ' / ' + this.menuName.join(" / ")
|
|
|
|
|
this.hasMenu = false
|
|
|
|
|
this.getList()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
clickOut() {
|
|
|
|
|
if (this.historyList && this.historyList.length > 0) {
|
|
|
|
|
this.showData = this.historyList[this.historyList.length - 1]
|
|
|
|
|
this.menuName.splice(this.menuName.length-1,1)
|
|
|
|
|
this.select.catalog_name = ' / ' + this.menuName.join(" / ")
|
|
|
|
|
this.historyList.pop()
|
|
|
|
|
console.log(this.historyList);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
goBack(){
|
|
|
|
|
this.select.catalog_id = ''
|
|
|
|
|
this.menuName.splice(this.menuName.length-1,1)
|
|
|
|
|
this.select.catalog_name = ' / ' + this.menuName.join(" / ")
|
|
|
|
|
this.hasMenu = true
|
|
|
|
|
},
|
|
|
|
|
async getCatalogList(pid) {
|
|
|
|
|
const res = await index({
|
|
|
|
|
page_size: 999,
|
|
|
|
|
@ -489,7 +527,8 @@
|
|
|
|
|
if (pid) {
|
|
|
|
|
let pList = this.base.findNodesById(this.catalogList, pid)
|
|
|
|
|
console.log("pList", pList)
|
|
|
|
|
this.catalogChildren = pList[0].children
|
|
|
|
|
this.catalogChildren = pList[0].children
|
|
|
|
|
this.showData = this.catalogChildren
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -536,24 +575,14 @@
|
|
|
|
|
this.$refs.showRecord.type = type
|
|
|
|
|
this.$refs.showRecord.isShow = true
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
pageIndexChange(e) {
|
|
|
|
|
this.select.page = e
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
pageSizeChange(e) {
|
|
|
|
|
this.select.page_size = e
|
|
|
|
|
this.select.page = 1
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
resetSearch() {
|
|
|
|
|
this.select.page = 1
|
|
|
|
|
|
|
|
|
|
this.select.area_id = []
|
|
|
|
|
this.select.tag_id = []
|
|
|
|
|
this.select.startRange = []
|
|
|
|
|
this.select.endRange = []
|
|
|
|
|
this.select.records_status = ""
|
|
|
|
|
this.select.endRange = []
|
|
|
|
|
// this.select.records_status = ""
|
|
|
|
|
if (this.is_search) {
|
|
|
|
|
this.select.catalog_id = ''
|
|
|
|
|
this.select.catalog_name = ''
|
|
|
|
|
@ -589,8 +618,8 @@
|
|
|
|
|
sort_name: 'date',
|
|
|
|
|
catalogs_id: this.select.catalog_id ? this.select.catalog_id : '',
|
|
|
|
|
area_ids: this.select.area_id ? this.select.area_id : '',
|
|
|
|
|
tag_ids: this.select.tag_id ? this.select.tag_id : '',
|
|
|
|
|
records_status:this.select.records_status,
|
|
|
|
|
tag_ids: this.select.tag_id ? this.select.tag_id : '',
|
|
|
|
|
// records_status:this.select.records_status,
|
|
|
|
|
filter: [{
|
|
|
|
|
"key": "title",
|
|
|
|
|
"op": "like",
|
|
|
|
|
@ -609,8 +638,12 @@
|
|
|
|
|
value: this.select.status
|
|
|
|
|
}]
|
|
|
|
|
})
|
|
|
|
|
this.list = res.data
|
|
|
|
|
this.total = res.total
|
|
|
|
|
// this.list = res.data
|
|
|
|
|
if (res.data.length > 0) {
|
|
|
|
|
this.list = this.base.buildTree(res.data, 'link_id')
|
|
|
|
|
}else{
|
|
|
|
|
this.list = []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
deleteList(id) {
|
|
|
|
|
var that = this;
|
|
|
|
|
@ -650,7 +683,8 @@
|
|
|
|
|
.catalog {
|
|
|
|
|
&_list {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&_item {
|
|
|
|
|
@ -659,7 +693,9 @@
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
margin: 20px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
color: #b3241d;
|
|
|
|
|
color: #b3241d;
|
|
|
|
|
width:150px;
|
|
|
|
|
height:130px;
|
|
|
|
|
|
|
|
|
|
i {
|
|
|
|
|
font-size: 40px;
|
|
|
|
|
|