11
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
<template>
|
||||
<div class="file_list" style="background-color:#fff; margin-top: 3rem;">
|
||||
<div class="file_list" style="background-color:#fff; margin-top: 3rem;">
|
||||
<div class="query">
|
||||
<el-row>
|
||||
<el-col :xs="14" :sm="14" :md="14" :lg="20" :xl="20">
|
||||
<!--<div style="width: 95%;">-->
|
||||
<div>
|
||||
<!--<input class="query_input" v-model="query"/>-->
|
||||
<el-input class="query_input" v-model="query" size="small" :placeholder="$t('message.placeholder')"></el-input>
|
||||
<el-input class="query_input" v-model="query" size="small"
|
||||
:placeholder="$t('message.placeholder')"></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="10" :sm="10" :md="10" :lg="4" :xl="4" style="float: right">
|
||||
<el-button class="query_button" type="primary" size="small" icon="el-icon-search" @click="handleCurrentChange(-1)">
|
||||
{{ $t('message.search') }}</el-button>
|
||||
<el-button class="query_button" type="primary" size="small" icon="el-icon-search"
|
||||
@click="handleCurrentChange(-1)">
|
||||
{{ $t('message.search') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -45,8 +48,9 @@
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page.sync="value.pageNum"
|
||||
:page-size="4"
|
||||
layout="prev, pager, next, jumper"
|
||||
:page-sizes="[10,20, 30, 50, 100]"
|
||||
:page-size="value.pageSize"
|
||||
layout="prev, pager,next,sizes, jumper"
|
||||
:total="value.total">
|
||||
</el-pagination>
|
||||
</el-col>
|
||||
@@ -65,6 +69,7 @@ export default {
|
||||
default: {
|
||||
data: [{}],
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -78,10 +83,16 @@ export default {
|
||||
methods: {
|
||||
getDateTime(date) {
|
||||
let time = new Date(date);
|
||||
return time.getFullYear() + "-" + (time.getMonth()+1) + "-" + time.getDate();
|
||||
return time.getFullYear() + "-" + (time.getMonth() + 1) + "-" + time.getDate();
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
console.log(`每页 ${val} 条`);
|
||||
if (val === -1) {
|
||||
this.value.pageSize = 1
|
||||
} else {
|
||||
this.value.pageSize = val
|
||||
}
|
||||
this.getData()
|
||||
},
|
||||
downloadFile(file) {
|
||||
var filename = prompt(file.fileName);
|
||||
@@ -91,16 +102,19 @@ export default {
|
||||
a.click()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
if (val == -1) {
|
||||
if (val === -1) {
|
||||
this.value.pageNum = 1
|
||||
} else {
|
||||
this.value.pageNum = val
|
||||
}
|
||||
this.getData()
|
||||
},
|
||||
getData() {
|
||||
let data = {
|
||||
title: this.query,
|
||||
id: this.value.navId,
|
||||
pageNum: this.value.pageNum,
|
||||
pageSize: 5
|
||||
pageSize: this.value.pageSize,
|
||||
}
|
||||
this.type = this.$route.query && this.$route.query.type
|
||||
if (this.type != null && this.type != 0) {
|
||||
|
||||
@@ -59,8 +59,9 @@
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page.sync="value.pageNum"
|
||||
:page-sizes="[5,10,20, 30, 50, 100]"
|
||||
:page-size="4"
|
||||
layout="prev, pager, next, jumper"
|
||||
layout="prev, pager, next,sizes, jumper"
|
||||
:total="value.total">
|
||||
</el-pagination>
|
||||
</el-col>
|
||||
@@ -78,8 +79,9 @@ export default {
|
||||
value: {
|
||||
type: Object,
|
||||
default: {
|
||||
//生命周期初始化问题
|
||||
data: []
|
||||
data: [{}],
|
||||
pageNum: 1,
|
||||
pageSize: 5,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -107,21 +109,30 @@ export default {
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
console.log(`每页 ${val} 条`);
|
||||
if (val === -1) {
|
||||
this.value.pageSize = 1
|
||||
} else {
|
||||
this.value.pageSize = val
|
||||
}
|
||||
this.getData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
if (val == -1) {
|
||||
if (val === -1) {
|
||||
this.value.pageNum = 1
|
||||
} else {
|
||||
this.value.pageNum = val
|
||||
}
|
||||
this.getData()
|
||||
},
|
||||
getData(){
|
||||
let data = {
|
||||
title: this.query,
|
||||
id: this.value.navId,
|
||||
pageNum: this.value.pageNum,
|
||||
pageSize: 5
|
||||
pageSize: this.value.pageSize
|
||||
}
|
||||
this.type = this.$route.query && this.$route.query.type
|
||||
if (this.type != null && this.type != 0) {
|
||||
if (this.type != null && this.type !== 0) {
|
||||
data.id = this.value.secondId
|
||||
} else {
|
||||
console.log(this.value);
|
||||
|
||||
@@ -100,10 +100,10 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<Introduction :value="contextData" v-if="type == 1"/>
|
||||
<List :value="contextData" v-if="type == 2"/>
|
||||
<FileList :value="contextData" v-if="type == 4"/>
|
||||
<DireData :value="contextData" v-if="type == 3"/>
|
||||
<Introduction :value="contextData" v-if="type === 1"/>
|
||||
<List :value="contextData" v-if="type === 2"/>
|
||||
<FileList :value="contextData" v-if="type === 4"/>
|
||||
<DireData :value="contextData" v-if="type === 3"/>
|
||||
<Details :value="detailsData" v-if="type == null"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -135,10 +135,10 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<Introduction :value="contextData" v-if="type == 1"/>
|
||||
<List :value="contextData" v-if="type == 2"/>
|
||||
<FileList :value="contextData" v-if="type == 4"/>
|
||||
<DireData :value="contextData" v-if="type == 3"/>
|
||||
<Introduction :value="contextData" v-if="type === 1"/>
|
||||
<List :value="contextData" v-if="type === 2"/>
|
||||
<FileList :value="contextData" v-if="type === 4"/>
|
||||
<DireData :value="contextData" v-if="type === 3"/>
|
||||
<Details :value="detailsData" v-if="type == null"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -335,12 +335,15 @@ export default {
|
||||
this.contextData = null
|
||||
this.bgImage = menu.link
|
||||
let data = null
|
||||
if (this.type == 2 || this.type == 4) {
|
||||
if (this.type === 2 || this.type === 4) {
|
||||
data = {
|
||||
id: menu.encodeId,
|
||||
pageNum: 1,
|
||||
pageSize: 5
|
||||
}
|
||||
if (this.type === 4){
|
||||
data.pageSize = 10
|
||||
}
|
||||
} else {
|
||||
data = {
|
||||
id: menu.encodeId,
|
||||
@@ -349,7 +352,7 @@ export default {
|
||||
getNode(data).then(res => {
|
||||
console.log(res, "res值")
|
||||
console.log(this.type);
|
||||
if (this.type == 2 || this.type == 4) {
|
||||
if (this.type === 2 || this.type === 4) {
|
||||
this.contextData = {
|
||||
data: res.rows,
|
||||
total: res.total,
|
||||
|
||||
Reference in New Issue
Block a user