zhuangyunsheng 1 éve
szülő
commit
9ac0dca006

+ 45 - 0
src/api/system/log.js

@@ -0,0 +1,45 @@
+import request from "@/utils/request";
+import { useUserStore } from "@/store/user";
+const { userInfo } = useUserStore(); // store 用户
+
+export default {
+    get: function (params) {
+        return request({
+            url: "/qdport-zcgx/log/page",
+            method: "get",
+            params
+        })
+    },
+
+    add: function (data) {
+        return request({
+            url: "/qdport-zcgx/log/save",
+            data: {
+                userId: userInfo.id,
+                loginName: userInfo.userName,
+                userName: userInfo.name,
+                // operateName //  新增删除修改
+                // operateType // 政策分享 消息管理
+            }
+        })
+    },
+
+    edit: function (data) {
+        return request({
+            url: "/qdport-zcgx/log/update",
+            method: "post",
+            data
+        })
+    },
+
+    del: function (data) {
+        return request({
+            headers: {
+                "Content-Type": "application/x-www-form-urlencoded"
+            },
+            url: "/qdport-zcgx/log/remove",
+            method: "post",
+            data
+        })
+    }
+}

+ 0 - 3
src/layout/components/SideBar/index.vue

@@ -70,16 +70,13 @@ const activeMenu = computed(() => {
   bottom: 0;
   left: 0;
   z-index: $base-z-index;
-  // width: $base-sidebar-width;
   height: 100vh;
   box-shadow: 2px 0 6px rgb(0 21 41 / 35%);
-  border-right: 1px solid #ccc;
   background: $base-sidebar-menu-background;
   transition: width $base-transition-time;
 
   &.is-collapse {
     width: $base-sidebar-width;
-    border-right: 0;
   }
 
   :deep(.el-scrollbar__wrap) {

+ 1 - 1
src/views/caseShare/index.vue

@@ -100,7 +100,7 @@ import { columns, statusDic } from "./main";
 import yhPagination from "@/components/Pagination/index.vue";
 import yhWorkflow from "@/components/Workflow/index.vue";
 import caseShareDetail from "./dialog.vue";
-import policyProcessDialog from "@/views/myBusiness/case.vue";
+import policyProcessDialog from "@/views/myAffairs/case.vue";
 
 export default {
     components: {

+ 81 - 26
src/views/home/index.vue

@@ -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>

+ 7 - 9
src/views/home/main.js

@@ -1,13 +1,11 @@
-export const columns = [
-    { label: "政策名称", props: "name" },
-    { label: "政策类别", props: "zcType" },
-    { label: "发布人", props: "createName" },
-    { label: "发布单位", props: "companyName" },
-    { label: "联系方式", props: "contactPhone" },
-    { label: "发布日期", props: "createTime" }
-]
-
 export const storageTypeDic = [
     { label: "政策文件", value: "文件类", title: "重点信息领域政策公开" },
     { label: "政策解读", value: "解读类", title: "重点信息领域政策解读" }
+]
+
+export const fixedMenus = [
+    { label: "我的待办", path: "/myAffairs" },
+    { label: "案例分享", path: "/caseShare" },
+    { label: "进度查询", path: "/progress" },
+    { label: "留言互动", path: "/policyShare/message" }
 ]

+ 16 - 0
src/views/home/policyDetail.vue

@@ -1,4 +1,5 @@
 <template>
+    <el-page-header title="返回" icon="arrow-left" :content="form.name" @back="$emit('closed')"></el-page-header>
     <el-card v-loading="loading" class="tjm_card_style_custom">
         <el-collapse v-model="activeNames">
             <el-collapse-item class="form-collapse-item" title="政策内容" name="detail">
@@ -48,6 +49,7 @@ export default {
             this.loading = true;
             this.replyCount = replyCount || null;
             this.form.id = data.id;
+            this.form.name = data.name;
             this.form.docNo = data.docNo;
             nextTick(() => this.$refs.shareForm.setData(data.id));
         },
@@ -60,6 +62,20 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.el-page-header {
+  position: relative;
+  top: calc(-1 * $base-padding);
+  left: calc(-1 * $base-padding);
+  width: calc(100% - $base-padding);
+  padding: 15px;
+  background: #fff;
+  box-shadow: var(--el-box-shadow-light);
+
+  :deep(.el-page-header__back:hover) {
+    color: var(--el-color-primary);
+  }
+}
+
 .tjm_card_style_custom > :deep(.el-card__body) .el-collapse {
   border: none;
 

src/views/myBusiness/case.vue → src/views/myAffairs/case.vue


+ 13 - 2
src/views/myBusiness/component/done.vue

@@ -69,7 +69,7 @@
 import API from "@/api/policy/todo";
 import { useUserStore } from "@/store/user";
 import { typeDic } from "@/views/policyShare/main";
-import { refTypeDic } from "@/views/myBusiness/main";
+import { refTypeDic } from "@/views/myAffairs/main";
 
 import yhPagination from "@/components/Pagination/index.vue";
 import yhWorkflow from "@/components/Workflow/index.vue";
@@ -152,4 +152,15 @@ export default {
         }
     }
 }
-</script>
+</script>
+
+<style lang="scss" scoped>
+.tjm_card_style_custom {
+  border: none;
+  box-shadow: 0 0;
+
+  :deep(.el-card__body) {
+    padding-top: 10px;
+  }
+}
+</style>

src/views/myBusiness/component/index.js → src/views/myAffairs/component/index.js


+ 11 - 2
src/views/myBusiness/component/send.vue

@@ -62,7 +62,16 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-.tjm_card_table {
-  margin-top: 0;
+.tjm_card_style_custom {
+  border: none;
+  box-shadow: 0 0;
+
+  :deep(.el-card__body) {
+    padding-top: 10px;
+
+    .tjm_card_table {
+      margin-top: 0;
+    }
+  }
 }
 </style>

+ 13 - 2
src/views/myBusiness/component/toDo.vue

@@ -65,7 +65,7 @@
 import API from "@/api/policy/todo";
 import { useUserStore } from "@/store/user";
 import { typeDic } from "@/views/policyShare/main";
-import { refTypeDic } from "@/views/myBusiness/main";
+import { refTypeDic } from "@/views/myAffairs/main";
 
 import yhPagination from "@/components/Pagination/index.vue";
 import policyShare from "../share.vue";
@@ -140,4 +140,15 @@ export default {
         }
     }
 }
-</script>
+</script>
+
+<style lang="scss" scoped>
+.tjm_card_style_custom {
+  border: none;
+  box-shadow: 0 0;
+
+  :deep(.el-card__body) {
+    padding-top: 10px;
+  }
+}
+</style>

+ 68 - 0
src/views/myAffairs/index.vue

@@ -0,0 +1,68 @@
+<template>
+    <div v-if="show" class="mine-policy-detail">
+        <policy-detail ref="policyDetail" @closed="show = false"></policy-detail>
+    </div>
+
+    <div v-else class="mine-content">
+        <el-tabs v-model="element">
+            <el-tab-pane v-for="(label, key) in myBusinessTab" :key="key" :label="label" :name="key"></el-tab-pane>
+        </el-tabs>
+
+        <component :is="allComps[element]" @replyAll="table_detail"></component>
+    </div>
+</template>
+
+<script>
+import { myBusinessTab } from "@/views/myAffairs/main";
+import allComps from "@/views/myAffairs/component/index";
+import policyDetail from "@/views/home/policyDetail.vue";
+
+export default {
+    components: {
+        policyDetail
+    },
+
+    data() {
+        return {
+            allComps,
+            myBusinessTab,
+
+            element: "toDo",
+
+            show: false
+        }
+    },
+
+    methods: {
+        table_detail(row) {
+            this.show = true;
+            nextTick(() => this.$refs.policyDetail.setData(row, 5));
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.mine-policy-detail :deep(.tjm_card_style_custom) > .el-card__body {
+  max-height: calc(
+    $base-main-height - $base-padding - 2 * var(--el-card-padding) - 54px
+  );
+  overflow: auto;
+}
+
+.mine-content {
+  padding-top: 10px;
+  background: #fff;
+  border: 1px solid var(--el-border-color-light);
+  border-radius: var(--el-border-radius-base);
+  box-shadow: var(--el-box-shadow-light);
+
+  .el-tabs {
+    padding: 0 20px;
+
+    :deep(.el-tabs__content) {
+      display: none;
+    }
+  }
+}
+</style>

+ 1 - 1
src/views/myBusiness/main.js

@@ -1,5 +1,5 @@
 export const myBusinessTab = {
-    toDo: "待办事宜",
+    toDo: "我的待办",
     done: "我的已办",
     send: "我的消息"
 }

src/views/myBusiness/share.vue → src/views/myAffairs/share.vue


src/views/myBusiness/strive.vue → src/views/myAffairs/strive.vue


+ 0 - 77
src/views/myBusiness/index.vue

@@ -1,77 +0,0 @@
-<template>
-    <div v-if="detail.show" class="mine-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>
-
-    <template v-else>
-        <el-tabs v-model="element">
-            <el-tab-pane v-for="(label, key) in myBusinessTab" :key="key" :label="label" :name="key"></el-tab-pane>
-        </el-tabs>
-
-        <component :is="allComps[element]" @replyAll="table_detail"></component>
-    </template>
-</template>
-
-<script>
-import { myBusinessTab } from "@/views/myBusiness/main";
-import allComps from "@/views/myBusiness/component/index";
-import policyDetail from "@/views/home/policyDetail.vue";
-
-export default {
-    components: {
-        policyDetail
-    },
-
-    data() {
-        return {
-            allComps,
-            myBusinessTab,
-
-            element: "toDo",
-
-            detail: {
-                show: false,
-                name: null
-            }
-        }
-    },
-
-    methods: {
-        table_detail(row) {
-            this.detail.show = true;
-            this.detail.name = row.name;
-            nextTick(() => this.$refs.policyDetail.setData(row, 5));
-        }
-    }
-}
-</script>
-
-<style lang="scss" scoped>
-.mine-policy-detail {
-  .el-page-header {
-    position: relative;
-    top: calc(-1 * $base-padding);
-    left: calc(-1 * $base-padding);
-    width: calc(100% - $base-padding);
-    padding: 15px;
-    background: #fff;
-    box-shadow: var(--el-box-shadow-light);
-
-    :deep(.el-page-header__back:hover) {
-      color: var(--el-color-primary);
-    }
-  }
-
-  :deep(.tjm_card_style_custom) > .el-card__body {
-    max-height: calc(
-      $base-main-height - $base-padding - 2 * var(--el-card-padding) - 54px
-    );
-    overflow: auto;
-  }
-}
-
-.el-tabs :deep(.el-tabs__content) {
-  display: none;
-}
-</style>

+ 1 - 1
src/views/policyShare/index.vue

@@ -120,7 +120,7 @@ import tableImport from "@/components/Upload/tableImport.vue";
 import yhPagination from "@/components/Pagination/index.vue";
 import policyDetail from "@/views/manage/policyShare/dialog.vue";
 import policyDialog from "./dialog.vue";
-import policyProcessDialog from "@/views/myBusiness/share.vue";
+import policyProcessDialog from "@/views/myAffairs/share.vue";
 import yhWorkflow from "@/components/Workflow/index.vue";
 
 export default {

+ 9 - 30
src/views/policyShare/message/index.vue

@@ -1,7 +1,6 @@
 <template>
-    <div v-if="detail.show" class="reply-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="reply-policy-detail">
+        <policy-detail ref="policyDetail" @closed="show = false"></policy-detail>
     </div>
 
     <template v-else>
@@ -107,10 +106,7 @@ export default {
             total: 0,
             tableData: [],
 
-            detail: {
-                show: false,
-                name: null
-            }
+            show: false
         }
     },
 
@@ -151,8 +147,7 @@ export default {
         },
 
         table_detail(row, count) {
-            this.detail.show = true;
-            this.detail.name = row.name;
+            this.show = true;
             nextTick(() => this.$refs.policyDetail.setData(row, count));
         }
     }
@@ -160,27 +155,11 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-.reply-policy-detail {
-  .el-page-header {
-    position: relative;
-    top: calc(-1 * $base-padding);
-    left: calc(-1 * $base-padding);
-    width: calc(100% - $base-padding);
-    padding: 15px;
-    background: #fff;
-    box-shadow: var(--el-box-shadow-light);
-
-    :deep(.el-page-header__back:hover) {
-      color: var(--el-color-primary);
-    }
-  }
-
-  :deep(.tjm_card_style_custom) > .el-card__body {
-    max-height: calc(
-      $base-main-height - $base-padding - 2 * var(--el-card-padding) - 54px
-    );
-    overflow: auto;
-  }
+.reply-policy-detail :deep(.tjm_card_style_custom) > .el-card__body {
+  max-height: calc(
+    $base-main-height - $base-padding - 2 * var(--el-card-padding) - 54px
+  );
+  overflow: auto;
 }
 
 .tjm_card_reply .el-descriptions {

+ 1 - 1
src/views/policyStrive/index.vue

@@ -133,7 +133,7 @@ import yhPagination from "@/components/Pagination/index.vue";
 import yhWorkflow from "@/components/Workflow/index.vue";
 import policyDetail from "./dialog.vue";
 import policyExplain from "./explain.vue";
-import policyProcessDialog from "@/views/myBusiness/strive.vue";
+import policyProcessDialog from "@/views/myAffairs/strive.vue";
 
 export default {
     components: {

+ 9 - 30
src/views/publicDomain/index.vue

@@ -1,7 +1,6 @@
 <template>
-    <div v-if="detail.show" class="domain-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="domain-policy-detail">
+        <policy-detail ref="policyDetail" @closed="show = false"></policy-detail>
     </div>
 
     <el-card v-else class="tjm_card_style_custom">
@@ -87,10 +86,7 @@ export default {
             total: 0,
             tableData: [],
 
-            detail: {
-                show: false,
-                name: null
-            }
+            show: false
         }
     },
 
@@ -137,8 +133,7 @@ export default {
         },
 
         table_detail(row) {
-            this.detail.show = true;
-            this.detail.name = row.name;
+            this.show = true;
             nextTick(() => this.$refs.policyDetail.setData(row));
         }
     }
@@ -146,26 +141,10 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-.domain-policy-detail {
-  .el-page-header {
-    position: relative;
-    top: calc(-1 * $base-padding);
-    left: calc(-1 * $base-padding);
-    width: calc(100% - $base-padding);
-    padding: 15px;
-    background: #fff;
-    box-shadow: var(--el-box-shadow-light);
-
-    :deep(.el-page-header__back:hover) {
-      color: var(--el-color-primary);
-    }
-  }
-
-  :deep(.tjm_card_style_custom) > .el-card__body {
-    max-height: calc(
-      $base-main-height - $base-padding - 2 * var(--el-card-padding) - 54px
-    );
-    overflow: auto;
-  }
+.domain-policy-detail :deep(.tjm_card_style_custom) > .el-card__body {
+  max-height: calc(
+    $base-main-height - $base-padding - 2 * var(--el-card-padding) - 54px
+  );
+  overflow: auto;
 }
 </style>