ezhizao_zx 5 meses atrás
pai
commit
b5d8bf90cc

+ 5 - 2
src/views/dialog/notification.vue

@@ -7,7 +7,10 @@
         <div style="color: white;">{{ title }}</div>
       </div>
     </template>
-    <div v-html="content" style="padding: 12px;height: 500px;"></div>
+    <div style="padding: 12px;height: 500px;overflow: auto;">
+      <div v-html="content"></div>
+    </div>
+
   </el-dialog>
 </template>
 <script setup>
@@ -38,7 +41,7 @@ onMounted(() => {
   // console.log(emitter)
   // emitter.on('show-dialog', open);
   const instance = getCurrentInstance().appContext.app
-  app.config.globalProperties.$notificate = { openForUpdate }
+  // app.config.globalProperties.$notificate = { openForUpdate }
 });
 
 onUnmounted(() => {

+ 1 - 1
src/views/dialog/updateAnnouncement.vue

@@ -34,7 +34,7 @@ onMounted(() => {
   // console.log(emitter)
   // emitter.on('show-dialog', open);
   const instance = getCurrentInstance().appContext.app
-  app.config.globalProperties.$notificate = { openForUpdate }
+  // app.config.globalProperties.$notificate = { openForUpdate }
 });
 
 onUnmounted(() => {

+ 34 - 16
src/views/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="page-container column-container">
     <el-row :gutter="24" style="margin-left: 10px;">
-      <el-col :span="8" class="notifications-label">
+      <el-col :span="24" class="notifications-label">
         <!-- <div class="dashboard-total-item">
           <img :src="totalIcon2" />
           <div class="dashboard-total-item-label">
@@ -13,18 +13,27 @@
           </div>
           <div class="number-label">{{ totalCompanies }} 人</div>
         </div> -->
-        <div class="notifications-header">公告</div>
-        <el-card v-for="item in notifications" style="width: 100%;margin-bottom: 5px;" shadow="always"
-          @click="showNotifiaction(item)">
-          <template #default>
-            <div style="display: flex; flex-direction: row;">
-              <i class="fa fa-bell-o" aria-hidden="true"
-                style="display: inline-block; height: 25px; line-height: 25px;" />
-              <div style="margin-left: 5px;display: inline-block; height: 25px; line-height: 25px;">{{ item.title }}
-              </div>
-            </div>
-          </template>
-        </el-card>
+        <!-- <div class="notifications-header">公告</div>
+        <el-row :gutter="5">
+          <el-col :span="8" v-for="item in notifications">
+            <el-card style="width: 100%;margin-bottom: 5px;" shadow="always" @click="showNotifiaction(item)">
+              <template #header>
+                <div style="display: flex; flex-direction: row;">
+                  <div style="margin-left: 5px;display: inline-block; height: 25px; line-height: 25px;">{{ item.title }}
+                  </div>
+                </div>
+              </template>
+<div style="height: 40px;overflow: clip;">
+  <div v-html="item.content" style="height: 100%;">
+  </div>
+</div>
+<div class="footer">
+  {{ item.createTime }}
+</div>
+</el-card>
+</el-col>
+</el-row> -->
+
         <!-- <el-row v-for="item in notifications" style="padding: 5px 10px;">
           {{ item.title }}
         </el-row> -->
@@ -152,7 +161,7 @@ onMounted(() => {
 })
 
 function getList() {
-  listNotification({}).then(res => {
+  listNotification({ pageSize: 5 }).then(res => {
     notifications.value = res.rows
   })
 }
@@ -203,17 +212,26 @@ const showNotifiaction = (item) => {
   padding: 0 5px;
 }
 
+.notifications-label .footer {
+  font-size: 13px;
+  color: #6b6b6b;
+}
+
+:deep(.notifications-label .el-card__header) {
+  border-bottom: 0 !important;
+}
+
 :deep(.notifications-label .el-card__body) {
   padding: 5px 10px !important;
 }
 
 .notifications-label .el-card {
-  border: 1px solid #fdf1aa;
+  /* border: 1px solid #fdf1aa; */
   border-radius: 2px;
 }
 
 .notifications-label .el-card.is-always-shadow {
-  box-shadow: 0 0 5px #fdf1aa;
+  /* box-shadow: 0 0 5px #fdf1aa; */
 }
 
 .dashboard-total-item {