|
|
@@ -1,16 +1,15 @@
|
|
|
<template>
|
|
|
- <div v-if="detail.show" class="home-policy-detail">
|
|
|
- <el-page-header title="返回" icon="arrow-left" :content="detail.name" @back="detail.show = false"></el-page-header>
|
|
|
- <policy-detail ref="policyDetail"></policy-detail>
|
|
|
+ <div v-if="show" class="home-policy-detail">
|
|
|
+ <policy-detail ref="policyDetail" @closed="show = false"></policy-detail>
|
|
|
</div>
|
|
|
|
|
|
<template v-else>
|
|
|
<div style="background-image: url(/home-header.png)" class="home-header">
|
|
|
- <el-form @submit.prevent @keyup.enter="name && toDomain({ name })">
|
|
|
+ <el-form @submit.prevent @keyup.enter="name && routeTo('/publicDomain', { name })">
|
|
|
<el-form-item>
|
|
|
<el-input v-model="name" placeholder="搜索你想了解的政策">
|
|
|
<template #append>
|
|
|
- <el-button link icon="search" @click="name && toDomain({ name })"></el-button>
|
|
|
+ <el-button link icon="search" @click="name && routeTo('/publicDomain', { name })">搜索</el-button>
|
|
|
</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
@@ -52,17 +51,32 @@
|
|
|
|
|
|
<div class="domain-link">
|
|
|
<template v-for="zcType in typeDic" v-bind:key="zcType">
|
|
|
- <el-card @click="toDomain({ zcType, inWhType: params.inWhType })">{{ zcType }}</el-card>
|
|
|
+ <el-card @click="routeTo('/publicDomain', { zcType, inWhType: params.inWhType })">{{ zcType }}</el-card>
|
|
|
</template>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <div class="home-fix-button-group">
|
|
|
+ <el-button-group>
|
|
|
+ <el-button v-for="item in fixedRouters" :key="item.path" type="primary" @click="routeTo(item.path)">
|
|
|
+ <template #icon>
|
|
|
+ <el-icon size="23">
|
|
|
+ <component v-if="item.meta.icon.indexOf('ep') !== -1" :is="item.meta.icon.slice(2)" />
|
|
|
+ <svg-icon v-if="item.meta.icon.indexOf('tjm') !== -1" :icon-class="item.meta.icon.slice(4)" />
|
|
|
+ </el-icon>
|
|
|
+ </template>
|
|
|
+ {{ item.label}}
|
|
|
+ </el-button>
|
|
|
+ </el-button-group>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import Share from "@/api/policy/share";
|
|
|
+import { usePermissionStore } from "@/store/permission.js"
|
|
|
import { levelDic, typeDic } from "@/views/policyShare/main";
|
|
|
-import { columns, storageTypeDic } from "./main";
|
|
|
+import { storageTypeDic, fixedMenus } from "./main";
|
|
|
import policyDetail from "./policyDetail.vue";
|
|
|
|
|
|
export default {
|
|
|
@@ -72,7 +86,7 @@ export default {
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
- columns, levelDic, typeDic, storageTypeDic,
|
|
|
+ levelDic, typeDic, storageTypeDic,
|
|
|
name: "", // 筛选字段 -- 名称
|
|
|
|
|
|
loading: false,
|
|
|
@@ -85,16 +99,18 @@ export default {
|
|
|
},
|
|
|
tableData: [],
|
|
|
|
|
|
- detail: {
|
|
|
- show: false,
|
|
|
- name: null
|
|
|
- }
|
|
|
+ show: false
|
|
|
}
|
|
|
},
|
|
|
|
|
|
computed: {
|
|
|
+ fixedRouters() {
|
|
|
+ const router = usePermissionStore().sidebarRouters.filter(r => r.children && r.children.length == 1).map(r => r.children[0]);
|
|
|
+ return fixedMenus.map(m => router.find(r => m.path == r.path) && Object.assign(m, router.find(r => m.path == r.path)) || null).filter(m => m);
|
|
|
+ },
|
|
|
+
|
|
|
domainTitle() {
|
|
|
- return storageTypeDic.find(s => s.value == this.params.inWhType).title
|
|
|
+ return storageTypeDic.find(s => s.value == this.params.inWhType).title;
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -119,13 +135,12 @@ export default {
|
|
|
}).catch(() => this.loading = false);
|
|
|
},
|
|
|
|
|
|
- toDomain(query) {
|
|
|
- this.$router.push({ path: "/publicDomain", query })
|
|
|
+ routeTo(path, query = {}) {
|
|
|
+ this.$router.push({ path, query });
|
|
|
},
|
|
|
|
|
|
table_detail(row) {
|
|
|
- this.detail.show = true;
|
|
|
- this.detail.name = row.name;
|
|
|
+ this.show = true;
|
|
|
nextTick(() => this.$refs.policyDetail.setData(row));
|
|
|
}
|
|
|
}
|
|
|
@@ -133,18 +148,13 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-.home-policy-detail {
|
|
|
+.home-policy-detail :deep {
|
|
|
.el-page-header {
|
|
|
- padding: 15px;
|
|
|
- background: #fff;
|
|
|
- box-shadow: var(--el-box-shadow-light);
|
|
|
-
|
|
|
- :deep(.el-page-header__back:hover) {
|
|
|
- color: var(--el-color-primary);
|
|
|
- }
|
|
|
+ position: static;
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
|
|
|
- :deep(.tjm_card_style_custom) {
|
|
|
+ .tjm_card_style_custom {
|
|
|
width: calc(100% - 2 * $base-padding);
|
|
|
margin: $base-padding auto 0;
|
|
|
|
|
|
@@ -177,6 +187,10 @@ export default {
|
|
|
box-shadow: 0 0;
|
|
|
}
|
|
|
|
|
|
+ :deep(.el-input__inner::placeholder) {
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+
|
|
|
:deep(.el-input-group__append) {
|
|
|
padding: 0 30px;
|
|
|
box-shadow: 0 0;
|
|
|
@@ -186,6 +200,8 @@ export default {
|
|
|
|
|
|
.el-button {
|
|
|
--el-button-active-color: #fff;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
}
|
|
|
@@ -356,4 +372,43 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.home-fix-button-group {
|
|
|
+ z-index: 999999;
|
|
|
+ position: fixed;
|
|
|
+ top: calc($base-navbar-height + 2 * $base-padding + 376px / 2 - 46px + 27px);
|
|
|
+ right: 0;
|
|
|
+
|
|
|
+ .el-button-group {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ padding: 0 8px;
|
|
|
+ background: var(--el-color-primary);
|
|
|
+
|
|
|
+ .el-button {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-evenly;
|
|
|
+ align-items: center;
|
|
|
+ height: 72px;
|
|
|
+ margin: 0;
|
|
|
+ padding: 0;
|
|
|
+ border: none;
|
|
|
+ border-radius: 0;
|
|
|
+ font-size: 14px;
|
|
|
+
|
|
|
+ &:not(:first-child) {
|
|
|
+ border-top: 1px solid #72bbff;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ background: transparent;
|
|
|
+ }
|
|
|
+
|
|
|
+ :deep(.el-icon + span) {
|
|
|
+ margin-left: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|