11
This commit is contained in:
@@ -48,6 +48,7 @@ const routes = [
|
||||
|
||||
const router = new VueRouter({
|
||||
mode: 'history',
|
||||
base:"/web",
|
||||
routes
|
||||
})
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -32,10 +32,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>
|
||||
@@ -166,19 +166,22 @@ 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,
|
||||
}
|
||||
}
|
||||
getNode(data).then(res => {
|
||||
if (this.type == 2||this.type == 4) {
|
||||
if (this.type === 2||this.type === 4) {
|
||||
this.contextData = {
|
||||
data: res.rows,
|
||||
total: res.total,
|
||||
|
||||
@@ -3,7 +3,11 @@
|
||||
<script>
|
||||
export default {
|
||||
created() {
|
||||
this.$router.push("/home?lang="+sessionStorage.getItem("lang"));
|
||||
let path = this.$route.path;
|
||||
console.log(path)
|
||||
if (!path.indexOf("attached")||path==="/"){
|
||||
this.$router.push("/home?lang="+sessionStorage.getItem("lang"));
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -16,8 +16,9 @@ const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
||||
module.exports = {
|
||||
// 部署生产环境和开发环境下的URL。
|
||||
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
||||
// 例如 https://www.hchyun.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.hchyun.com/admin/,则设置 baseUrl 为 /admin/。
|
||||
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
|
||||
// 例如 https://www.hchyun.cn/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.hchyun.com/admin/,则设置 baseUrl 为 /admin/。
|
||||
// publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
|
||||
publicPath: "/web",
|
||||
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
||||
outputDir: 'dist',
|
||||
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||
|
||||
Reference in New Issue
Block a user