瀏覽代碼

首页消息

LiuJ 5 天之前
父節點
當前提交
f30376e933
共有 1 個文件被更改,包括 367 次插入9 次删除
  1. 367 9
      src/views/dashboard/admin/index.vue

+ 367 - 9
src/views/dashboard/admin/index.vue

@@ -2,6 +2,10 @@
     <div class="dashboard-editor-container">
         <!--超级管理员10000√ 个人会员1× 政务会员2× 企业会员3× 调研员4×-->
         <div v-if="userType == 10000">
+
+
+
+
             <el-row :gutter="32">
                 <el-col :xs="24" :sm="24" :lg="24">
                     <div class="topDataBox">
@@ -45,11 +49,11 @@
                             <div class="topDataLi4">
                                 <div class="topDataMain">
                                     <span @click="goToList(6)">待审核行政通知</span>
-                                    <span @click="goToList(6)">{{noticeCount}}</span>
+                                    <span @click="goToList(6)">{{ noticeCount }}</span>
                                 </div>
                                 <div class="topDataMain">
                                     <span @click="goToList(7)">待审核行政投诉</span>
-                                    <span @click="goToList(7)">{{complaintCount}}</span>
+                                    <span @click="goToList(7)">{{ complaintCount }}</span>
                                 </div>
                             </div>
                         </div>
@@ -169,6 +173,7 @@
 
         <!--超级管理员10000× 个人会员1√ 政务会员2× 企业会员3 调研员4-->
         <div v-if="userType == 1">
+
             <el-row :gutter="32">
                 <el-col :xs="24" :sm="24" :lg="24">
                     <div class="topDataBox">
@@ -212,13 +217,75 @@
                                 </div> -->
                                 <div class="topDataMain">
                                     <span @click="goToList(7)">待审核行政投诉</span>
-                                    <span @click="goToList(7)">{{complaintCount}}</span>
+                                    <span @click="goToList(7)">{{ complaintCount }}</span>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </el-col>
+            </el-row>
+
+            <el-row :gutter="32">
+                <el-col :xs="24" :sm="24" :lg="12">
+                    <div class="chartBox">
+                        <div class="chartTitle">系统消息</div>
+                        <div class="chart-wrapper">
+                            <div v-for="item in sys_msg" :key="item.id" class="sys_msg_item">
+                                <div class="sys_msg_class">{{ item.class }}</div>
+                                <div @click="goToDetail(item.id, item.class)" class="sys_msg_title">{{ item.title }}
+                                </div>
+                                <div class="sys_msg_time">{{ item.formatted_updated_at }}</div>
+                            </div>
+
+                        </div>
+                    </div>
+                </el-col>
+                <el-col :xs="24" :sm="24" :lg="12">
+                    <div class="chartBox">
+
+                        <div class="chartBox">
+                            <div class="chartTitle">聊天消息</div>
+                            <div class="chart-wrapper">
+                                <div v-for="item in chat_msg" :key="item.id" class="sys_msg_item">
+                                    <div class="sys_msg_class">{{ item.class }}</div>
+                                    <div @click="goToDetail(item.id, item.class)" class="sys_msg_title">{{ item.content
+                                        }}</div>
+                                    <div class="sys_msg_time">{{ item.formatted_updated_at }}</div>
+                                </div>
+
+                            </div>
+                        </div>
+                    </div>
+                </el-col>
+            </el-row>
+            <div style="height: 20px;" class="noticeTabs">
+            </div>
+
+            <el-row :gutter="32">
+                <el-col :xs="24" :sm="24" :lg="12">
+                    <div class="chartBox">
+
+                        <div class="chartBox">
+                            <div class="chartTitle">通知投诉</div>
+                            <div class="chart-wrapper">
+                                <div v-for="item in notice_msg" :key="item.id" class="sys_msg_item">
+                                    <div class="sys_msg_class">{{ item.class }}</div>
+                                    <div @click="goToDetail(item.id, item.class)" class="sys_msg_title">{{ item.title }}
+                                    </div>
+                                    <div class="sys_msg_time">{{ item.formatted_updated_at }}</div>
                                 </div>
                             </div>
                         </div>
                     </div>
                 </el-col>
             </el-row>
+
+
+            <div style="height: 20px;" class="noticeTabs">
+            </div>
+
+
+
             <el-row :gutter="32">
                 <el-col :xs="24" :sm="24" :lg="6">
                     <div class="topWindowBox">
@@ -298,17 +365,107 @@
                             <div class="topDataLi4">
                                 <div class="topDataMain">
                                     <span @click="goToList(6)">待审核行政通知</span>
-                                    <span @click="goToList(6)">{{noticeCount}}</span>
+                                    <span @click="goToList(6)">{{ noticeCount }}</span>
+                                </div>
+                                <div class="topDataMain">
+                                    <span @click="goToList(7)">待审核行政投诉</span>
+                                    <span @click="goToList(7)">{{ complaintCount }}</span>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </el-col>
+            </el-row>
+
+
+            <el-row :gutter="32">
+                <el-col :xs="24" :sm="24" :lg="24">
+                    <div class="topDataBox">
+                        <div class="topDataBoxTitle">
+                            <div class="chatIconBox cibStyle1">
+                                <img src="@/assets/index/top_time.png">
+                            </div>
+                            <div class="topDataBoxTitleText">待审核列表</div>
+                        </div>
+                        <div class="topDataBoxList">
+                            <div class="topDataLi1">
+                                <div class="topDataMain">
+                                    <span @click="goToList(1)">待审核资讯</span>
+                                    <span @click="goToList(1)">{{ articleCount }}</span>
+                                </div>
+                            </div>
+                            <div class="topDataLi2">
+                                <div class="topDataMainCenter">
+                                    <span @click="goToList(2)">待审核商品</span>
+                                    <span @click="goToList(2)">{{ goodsCount }}</span>
+                                </div>
+                                <div class="topDataMainCenter">
+                                    <span @click="goToList(3)">待审核书刊音像</span>
+                                    <span @click="goToList(3)">{{ bookCount }}</span>
+                                </div>
+                            </div>
+                            <div class="topDataLi3">
+                                <div class="topDataMainCenter">
+                                    <span @click="goToList(4)">待审核招聘</span>
+                                    <span @click="goToList(4)">{{ jobRecruitingCount }}</span>
                                 </div>
+                                <div class="topDataMainCenter">
+                                    <span @click="goToList(5)">待审核求职</span>
+                                    <span @click="goToList(5)">{{ jobHuntingCount }}</span>
+                                </div>
+                            </div>
+                            <div class="topDataLi4">
+                                <!-- <div class="topDataMain">
+                                    <span @click="goToList(6)">待审核行政通知</span>
+                                    <span @click="goToList(6)">{{noticeCount}}</span>
+                                </div> -->
                                 <div class="topDataMain">
                                     <span @click="goToList(7)">待审核行政投诉</span>
-                                    <span @click="goToList(7)">{{complaintCount}}</span>
+                                    <span @click="goToList(7)">{{ complaintCount }}</span>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </el-col>
+            </el-row>
+
+            <el-row :gutter="32">
+                <el-col :xs="24" :sm="24" :lg="12">
+                    <div class="chartBox">
+                        <div class="chartTitle">系统消息</div>
+                        <div class="chart-wrapper">
+                            <div v-for="item in sys_msg" :key="item.id" class="sys_msg_item">
+                                <div class="sys_msg_class">{{ item.class }}</div>
+                                <div @click="goToDetail(item.id, item.class)" class="sys_msg_title">{{ item.title }}
+                                </div>
+                                <div class="sys_msg_time">{{ item.formatted_updated_at }}</div>
+                            </div>
+
+                        </div>
+                    </div>
+                </el-col>
+                <el-col :xs="24" :sm="24" :lg="12">
+                    <div class="chartBox">
+
+                        <div class="chartBox">
+                            <div class="chartTitle">聊天消息</div>
+                            <div class="chart-wrapper">
+                                <div v-for="item in chat_msg" :key="item.id" class="sys_msg_item">
+                                    <div class="sys_msg_class">{{ item.class }}</div>
+                                    <div @click="goToDetail(item.id, item.class)" class="sys_msg_title">{{ item.content
+                                        }}</div>
+                                    <div class="sys_msg_time">{{ item.formatted_updated_at }}</div>
                                 </div>
+
                             </div>
                         </div>
                     </div>
                 </el-col>
             </el-row>
+            <div style="height: 20px;" class="noticeTabs">
+            </div>
+
+
             <el-row :gutter="32">
                 <el-col :xs="24" :sm="24" :lg="6">
                     <div class="topWindowBox">
@@ -353,11 +510,11 @@
                         </div>
                         <div class="twbNumber2">
                             <div class="twbNumber2Item">
-                                <div class="twbNumber2ItemNum">{{allNoticeCount}}</div>
+                                <div class="twbNumber2ItemNum">{{ allNoticeCount }}</div>
                                 <div>行政通知</div>
                             </div>
                             <div class="twbNumber2Item">
-                                <div class="twbNumber2ItemNum">{{allComplaintCount}}</div>
+                                <div class="twbNumber2ItemNum">{{ allComplaintCount }}</div>
                                 <div>行政投诉</div>
                             </div>
                         </div>
@@ -428,13 +585,105 @@
                                 </div> -->
                                 <div class="topDataMain">
                                     <span @click="goToList(7)">待审核行政投诉</span>
-                                    <span @click="goToList(7)">{{complaintCount}}</span>
+                                    <span @click="goToList(7)">{{ complaintCount }}</span>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </el-col>
+            </el-row>
+
+
+
+            <el-row :gutter="32">
+                <el-col :xs="24" :sm="24" :lg="24">
+                    <div class="topDataBox">
+                        <div class="topDataBoxTitle">
+                            <div class="chatIconBox cibStyle1">
+                                <img src="@/assets/index/top_time.png">
+                            </div>
+                            <div class="topDataBoxTitleText">待审核列表</div>
+                        </div>
+                        <div class="topDataBoxList">
+                            <div class="topDataLi1">
+                                <div class="topDataMain">
+                                    <span @click="goToList(1)">待审核资讯</span>
+                                    <span @click="goToList(1)">{{ articleCount }}</span>
+                                </div>
+                            </div>
+                            <div class="topDataLi2">
+                                <div class="topDataMainCenter">
+                                    <span @click="goToList(2)">待审核商品</span>
+                                    <span @click="goToList(2)">{{ goodsCount }}</span>
+                                </div>
+                                <div class="topDataMainCenter">
+                                    <span @click="goToList(3)">待审核书刊音像</span>
+                                    <span @click="goToList(3)">{{ bookCount }}</span>
+                                </div>
+                            </div>
+                            <div class="topDataLi3">
+                                <div class="topDataMainCenter">
+                                    <span @click="goToList(4)">待审核招聘</span>
+                                    <span @click="goToList(4)">{{ jobRecruitingCount }}</span>
+                                </div>
+                                <div class="topDataMainCenter">
+                                    <span @click="goToList(5)">待审核求职</span>
+                                    <span @click="goToList(5)">{{ jobHuntingCount }}</span>
+                                </div>
+                            </div>
+                            <div class="topDataLi4">
+                                <!-- <div class="topDataMain">
+                                    <span @click="goToList(6)">待审核行政通知</span>
+                                    <span @click="goToList(6)">{{noticeCount}}</span>
+                                </div> -->
+                                <div class="topDataMain">
+                                    <span @click="goToList(7)">待审核行政投诉</span>
+                                    <span @click="goToList(7)">{{ complaintCount }}</span>
                                 </div>
                             </div>
                         </div>
                     </div>
                 </el-col>
             </el-row>
+
+            <el-row :gutter="32">
+                <el-col :xs="24" :sm="24" :lg="12">
+                    <div class="chartBox">
+                        <div class="chartTitle">系统消息</div>
+                        <div class="chart-wrapper">
+                            <div v-for="item in sys_msg" :key="item.id" class="sys_msg_item">
+                                <div class="sys_msg_class">{{ item.class }}</div>
+                                <div @click="goToDetail(item.id, item.class)" class="sys_msg_title">{{ item.title }}
+                                </div>
+                                <div class="sys_msg_time">{{ item.formatted_updated_at }}</div>
+                            </div>
+
+                        </div>
+                    </div>
+                </el-col>
+                <el-col :xs="24" :sm="24" :lg="12">
+                    <div class="chartBox">
+
+                        <div class="chartBox">
+                            <div class="chartTitle">聊天消息</div>
+                            <div class="chart-wrapper">
+                                <div v-for="item in chat_msg" :key="item.id" class="sys_msg_item">
+                                    <div class="sys_msg_class">{{ item.class }}</div>
+                                    <div @click="goToDetail(item.id, item.class)" class="sys_msg_title">{{ item.content
+                                    }}</div>
+                                    <div class="sys_msg_time">{{ item.formatted_updated_at }}</div>
+                                </div>
+
+                            </div>
+                        </div>
+                    </div>
+                </el-col>
+            </el-row>
+            <div style="height: 20px;" class="noticeTabs">
+            </div>
+
+
+
             <el-row :gutter="32">
                 <el-col :xs="24" :sm="24" :lg="6">
                     <div class="topWindowBox">
@@ -518,7 +767,7 @@
                                 </div> -->
                                 <div class="topDataMain">
                                     <span @click="goToList(7)">待审核行政投诉</span>
-                                    <span @click="goToList(7)">{{complaintCount}}</span>
+                                    <span @click="goToList(7)">{{ complaintCount }}</span>
                                 </div>
                             </div>
                         </div>
@@ -613,6 +862,10 @@ export default {
             allJobHuntingCount: 0,
             allNoticeCount: 0,
             allComplaintCount: 0,
+            sys_msg: {},//系统消息
+            chat_msg: {},
+            notice_msg: {},
+
             //折线图
             chatType: '1', //用户选择的哪个数据
             indexDataOptions: [
@@ -657,6 +910,12 @@ export default {
             //获取首页数据
             this.$store.dispatch('public/getAdminIndex').then(res => {
                 if (res.code == 200) {
+                    //系统消息
+                    this.sys_msg = res.data.sys_msg;
+                    //聊天消息
+                    this.chat_msg = res.data.chat_msg;
+                    //通知消息
+                    this.notice_msg = res.data.notice_msg;
                     //待审核数据
                     this.articleCount = res.data.apply.article;
                     this.adCount = res.data.apply.order;
@@ -698,6 +957,40 @@ export default {
             if (typenumber == 7) { this.$router.push({ path: '/ncomplaintListApply' }) }
             if (typenumber == 8) { this.$router.push({ path: '/adList' }) }
         },
+        goToDetail(id, type) {
+            //跳转到详情页
+            switch (type) {
+                case '资讯':
+                    this.$router.push({ path: '/creatNews', query: { id: id } });
+                    break;
+                case "商品":
+                    this.$router.push({ path: '/addGood', query: { id: id } });
+                    break;
+                case '书刊':
+                    this.$router.push({ path: '/addBook', query: { id: id } });
+                case '招聘':
+                    this.$router.push({ path: '/creatJob', query: { id: id } });
+                    break;
+                case '求职':
+                    this.$router.push({ path: '/addJobHunting', query: { id: id } });
+                    break;
+                case '通知':
+                    this.$router.push({ path: '/addNotice', query: { id: id } });
+                    break;
+                case '投诉':
+                    this.$router.push({ path: '/addNcomplaint', query: { id: id } });
+                    break;
+                case '话题':
+                    this.$router.push({ path: '/creatTopic', query: { id: id } });
+                    break;
+                case '单聊':
+                    this.$router.push({ path: '/hall', query: { id: id } });
+                    break;
+                case '群聊':
+                    this.$router.push({ path: '/hall', query: { id: id } });
+                    break;
+            }
+        },
         //切换折线图数据
         changeLineChartData(type) {
             console.log(type)
@@ -1012,4 +1305,69 @@ export default {
     width: 130px;
     margin-left: 20px;
 }
+
+.chartBox {
+    width: 100%;
+    border-radius: 20px;
+    overflow: hidden;
+    background-color: #FFFFFF;
+    /* Match the background color from .topWindowBox */
+    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+    /* Add subtle shadow for depth */
+}
+
+.chartTitle {
+    color: #212227;
+    /* Match @title variable used elsewhere */
+    padding: 30px 30px 0 30px;
+    font-size: 24px;
+    font-weight: bold;
+}
+
+.chart-wrapper {
+    background: #fff;
+    padding: 16px;
+    margin-top: 20px;
+}
+
+.sys_msg_item {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 15px 30px;
+    border-bottom: 1px solid #E9F3FC;
+    /* Light border to separate items */
+}
+
+.sys_msg_class,
+.sys_msg_title,
+.sys_msg_time {
+    font-size: 16px;
+    color: #212227;
+    /* Consistent with other text colors */
+}
+
+.sys_msg_class {
+    font-weight: bold;
+    width: 20%;
+    /* Adjust based on your preference */
+}
+
+.sys_msg_title {
+    width: 60%;
+    /* Adjust based on your preference */
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    //点击图标
+    cursor: pointer;
+}
+
+.sys_msg_time {
+    width: 20%;
+    /* Adjust based on your preference */
+    text-align: right;
+    color: #707B81;
+    /* Softer color for dates */
+}
 </style>