Compare commits

...

2 Commits

Author SHA1 Message Date
truthhun 1de2544b92 页面调整
11 months ago
truthhun 85e6c9c66d 后台数据查询调整
11 months ago

@ -274,7 +274,7 @@ export default {
},
pageChange(page) {
this.$router.push({
query: { page },
query: { ...this.query, page },
})
},
deleteDocument(row) {

@ -213,6 +213,20 @@ export default {
],
}
},
watch: {
$route(to, from) {
// main 滚动到顶部
this.$nextTick(() => {
const main = document.querySelector('.el-main')
if (main) {
main.scrollTo({
behavior: 'smooth',
top: 0,
})
}
})
},
},
computed: {
...mapGetters('user', ['user', 'token', 'permissions', 'allowPages']),
...mapGetters('setting', ['settings']),

@ -170,10 +170,19 @@ export default {
},
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
this.$router.push({
query: this.search,
})
// this.listArticle()
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
) {
this.listArticle()
} else {
this.$router.push({
query: this.search,
})
}
},
onCreate() {
this.article = { id: 0 }

@ -143,10 +143,19 @@ export default {
},
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
this.$router.push({
query: this.search,
})
// this.listAttachment()
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
) {
this.listAttachment()
} else {
this.$router.push({
query: this.search,
})
}
},
async editRow(row) {
const res = await getAttachment({ id: row.id })

@ -142,9 +142,19 @@ export default {
},
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
this.$router.push({
query: this.search,
})
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
) {
this.listBanner()
} else {
this.$router.push({
query: this.search,
})
}
},
onCreate() {
this.banner = {}

@ -174,9 +174,19 @@ export default {
},
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
this.$router.push({
query: this.search,
})
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
) {
this.listComment()
} else {
this.$router.push({
query: this.search,
})
}
},
onCreate() {
this.comment = { id: 0 }

@ -152,25 +152,37 @@
<el-table-column prop="name" label="名称" width="100"> </el-table-column
><el-table-column prop="is_required" label="是否必须" width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_required" effect="danger" size="small"
<el-tag
v-if="scope.row.is_required"
effect="dark"
type="danger"
size="small"
></el-tag
>
<el-tag effect="info" size="small" v-else></el-tag>
<el-tag effect="dark" type="info" size="small" v-else
></el-tag
>
</template>
</el-table-column>
<el-table-column prop="is_installed" label="安装" width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_installed" effect="success" size="small"
<el-tag
v-if="scope.row.is_installed"
effect="dark"
type="success"
size="small"
></el-tag
>
<el-tag effect="warning" size="small" v-else></el-tag>
<el-tag effect="dark" type="warning" size="small" v-else
></el-tag
>
</template>
</el-table-column>
<el-table-column prop="description" min-width="200" label="用途">
</el-table-column>
<el-table-column prop="error" label="错误" min-width="100">
<template slot-scope="scope">
<span v-if="scope.row.error" effect="danger" size="small">{{
<span v-if="scope.row.error" size="small">{{
scope.row.error
}}</span>
<span v-else>-</span>

@ -129,9 +129,19 @@ export default {
},
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
this.$router.push({
query: this.search,
})
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
) {
this.listCategory()
} else {
this.$router.push({
query: this.search,
})
}
},
onCreate() {
this.category = {

@ -297,9 +297,19 @@ export default {
},
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
this.$router.push({
query: this.search,
})
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
) {
this.listDocument()
} else {
this.$router.push({
query: this.search,
})
}
},
onCreate() {
// 新增,跳转到前台文档上传页面

@ -213,9 +213,19 @@ export default {
},
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
this.$router.push({
query: this.search,
})
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
) {
this.listDocument()
} else {
this.$router.push({
query: this.search,
})
}
},
recoverRow(row) {
this.$confirm(`您确定要要恢复【${row.title}】吗?`, '', {

@ -149,9 +149,19 @@ export default {
},
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
this.$router.push({
query: this.search,
})
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
) {
this.$router.push({
query: this.search,
})
} else {
this.listFriendlink()
}
},
onCreate() {
this.friendlink = { id: 0 }

@ -159,9 +159,19 @@ export default {
},
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
this.$router.push({
query: this.search,
})
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
) {
this.listNavigation()
} else {
this.$router.push({
query: this.search,
})
}
},
onCreate() {
this.navigation = { id: 0 }

@ -154,9 +154,19 @@ export default {
},
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
this.$router.push({
query: this.search,
})
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
) {
this.listReport()
} else {
this.$router.push({
query: this.search,
})
}
},
onCreate() {
this.report = { id: 0 }

@ -174,9 +174,19 @@ export default {
},
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
this.$router.push({
query: this.search,
})
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
) {
this.listGroup()
} else {
this.$router.push({
query: this.search,
})
}
},
onCreate() {
this.initGroup()

@ -189,9 +189,19 @@ export default {
},
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
this.$router.push({
query: this.search,
})
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
) {
this.listUser()
} else {
this.$router.push({
query: this.search,
})
}
},
onCreate() {
this.formUserVisible = true

@ -132,9 +132,19 @@ export default {
},
onSearch(search) {
this.search = { ...this.search, ...search, page: 1 }
this.$router.push({
query: this.search,
})
if (
location.href.lastIndexOf(
this.$router.resolve({
query: this.search,
}).href
) > -1
) {
this.listPermission()
} else {
this.$router.push({
query: this.search,
})
}
},
async editRow(row) {
const res = await getPermission({ id: row.id })

Loading…
Cancel
Save