From f5033d775292408a15d6479c38ec0518d53bb6a6 Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期二, 24 六月 2025 16:33:19 +0800
Subject: [PATCH] Merge branch 'master' of http://101.42.27.146:5001/r/ltkj_peisweb

---
 src/views/system/notice/index.vue |   95 +++++++++++++++++++++++++++++++++++------------
 1 files changed, 71 insertions(+), 24 deletions(-)

diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue
index 6946e12..a338adf 100644
--- a/src/views/system/notice/index.vue
+++ b/src/views/system/notice/index.vue
@@ -83,11 +83,9 @@
       </el-table-column>
     </el-table>
 
-    <div class="pag">
-      <div class="pag1">
-        <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
-          :limit.sync="queryParams.pageSize" @pagination="getList" />
-      </div>
+    <div class="pagination-container">
+      <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize" @pagination="getList" />
     </div>
 
     <!-- 娣诲姞鎴栦慨鏀瑰叕鍛婂璇濇 -->
@@ -145,21 +143,21 @@
 
     <!-- 閫氱煡鍏憡璇︽儏 -->
     <el-dialog :title="formIn.noticeTitle" :visible.sync="openDetail" width="800px" append-to-body>
-      <div style="margin-top:-20px;margin-bottom:10px;">
+      <div class="detail-header">
         <el-tag size="mini" effect="dark" type="warning" v-if="formIn.noticeType === '2'">鍏憡</el-tag>
         <el-tag size="mini" effect="dark" v-else>閫氱煡</el-tag>
-        <span style="margin-left:20px;">{{ parseTime(formIn.createTime, '{y}-{m}-{d} {h}:{i}:{s}') || '鏃�' }}</span>
+        <span class="time">{{ parseTime(formIn.createTime, '{y}-{m}-{d} {h}:{i}:{s}') || '鏃�' }}</span>
       </div>
-      <div style="margin-bottom:10px;">
-        <span style="font-weight:bold;">鎺ユ敹绉戝锛�</span>
+      <div class="detail-item">
+        <span class="label">鎺ユ敹绉戝锛�</span>
         <span>{{ getDeptNames(formIn.deptId) }}</span>
       </div>
-      <div style="margin-bottom:10px;">
-        <span style="font-weight:bold;">鎺ユ敹鐢ㄦ埛锛�</span>
+      <div class="detail-item">
+        <span class="label">鎺ユ敹鐢ㄦ埛锛�</span>
         <span>{{ getUserNames(formIn.userIds) }}</span>
       </div>
-      <div class="content">
-        <div v-html="formIn.noticeContent" style="margin-left:0px;margin-right:76px" class="ql-editor"></div>
+      <div class="detail-content">
+        <div v-html="formIn.noticeContent" class="ql-editor"></div>
       </div>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="cancel">鍏抽棴</el-button>
@@ -203,6 +201,8 @@
       title: "",
       // 鏄惁鏄剧ず寮瑰嚭灞�
       open: false,
+      // 鏄惁涓哄垵娆″姞杞�
+      isInitialLoad: true,
       // 鏌ヨ鍙傛暟
       queryParams: {
         pageNum: 1,
@@ -285,9 +285,10 @@
         this.noticeList = response.rows;
         this.total = response.total;
         this.loading = false;
-        // 楂樹寒鎴栨墦寮�璇︽儏
+        // 楂樹寒鎴栨墦寮�璇︽儏锛堜粎鍒濇鍔犺浇鏃惰Е鍙戣鎯咃級
         this.$nextTick(() => {
-          this.highlightNotice();
+          this.highlightNotice(this.isInitialLoad);
+          this.isInitialLoad = false; // 鏍囪涓洪潪鍒濇鍔犺浇
         });
       }).catch((error) => {
         console.error("listNotice error:", error);
@@ -304,13 +305,15 @@
       }
     },
     /** 楂樹寒鎴栨墦寮�鍏憡璇︽儏 */
-    highlightNotice() {
+    highlightNotice(isInitialLoad) {
       const { noticeId } = this.$route.query;
       if (noticeId) {
         const notice = this.noticeList.find(item => item.noticeId === noticeId);
         if (notice) {
           this.$refs.table.setCurrentRow(notice);
-          this.handledetails(notice);
+          if (isInitialLoad) {
+            this.handledetails(notice); // 浠呭垵娆″姞杞芥椂鎵撳紑璇︽儏
+          }
         }
       }
     },
@@ -527,22 +530,66 @@
 </script>
 
 <style scoped>
-.pag {
-  width: 100%;
+/* 瀹瑰櫒鏍峰紡锛岀‘淇濆唴瀹规湁閫傚綋鍐呰竟璺� */
+.app-container {
+  padding: 20px;
+}
+
+/* 鍒嗛〉瀹瑰櫒锛屾浛鎹㈠師 .pag 鍜� .pag1锛屽眳涓樉绀� */
+.pagination-container {
   display: flex;
   justify-content: center;
+  margin-top: 20px;
 }
 
-.pag1 {
-  width: 30%;
-}
-
+/* 楂樹寒琛屾牱寮忥紝绐佸嚭鏄剧ず璺敱鎸囧畾鐨勫叕鍛� */
 .highlight-row {
   background-color: #e6f7ff;
 }
 
-.ql-editor {
+/* 瀵硅瘽妗嗗簳閮ㄦ寜閽眳涓� */
+.dialog-footer {
+  text-align: center;
+  padding: 10px 0;
+}
+
+/* 璇︽儏瀵硅瘽妗嗗ご閮紙绫诲瀷鏍囩鍜屾椂闂达級 */
+.detail-header {
+  margin: -20px 0 10px;
+  display: flex;
+  align-items: center;
+}
+
+.detail-header .time {
+  margin-left: 20px;
+  color: #606266;
+}
+
+/* 璇︽儏瀵硅瘽妗嗕俊鎭」锛堟帴鏀剁瀹ゃ�佹帴鏀剁敤鎴凤級 */
+.detail-item {
+  margin-bottom: 10px;
+}
+
+.detail-item .label {
+  font-weight: bold;
+  color: #303133;
+}
+
+/* 璇︽儏瀵硅瘽妗嗗唴瀹瑰尯鍩燂紝闄愬埗瀵屾枃鏈珮搴� */
+.detail-content .ql-editor {
   max-height: 300px;
   overflow-y: auto;
+  padding: 10px;
+  color: #303133;
+}
+
+/* 琛ㄦ牸鎿嶄綔鍒楋紝浼樺寲鎸夐挳闂磋窛 */
+.small-padding {
+  padding: 0 10px;
+}
+
+/* 鎼滅储琛ㄥ崟椤堕儴闂磋窛 */
+.mb8 {
+  margin-bottom: 8px;
 }
 </style>
\ No newline at end of file

--
Gitblit v1.8.0