Prechádzať zdrojové kódy

1.fix:修补任务制定-监审通知-被监审单位选择任务关联的单位 Bug
2.test:调试首页样式、备忘录样式

cb_luzhixia 1 mesiac pred
rodič
commit
ee67a1521b

+ 4 - 8
src/api/taskCustomizedRelease.js

@@ -169,17 +169,13 @@ export function getCostProjectSurveyPageList(params) {
 }
 
 /**
- * 根据id获取监审项目文书表数据详情
- * @param {string} id - 数据ID
- * @returns {Promise}
+ * 根据项目id获取项目文书内容
  */
-export function getCostProjectDocumentDetail(id) {
+export function getCostProjectDocumentDetail(params) {
   return request({
-    url: `${url}/api/costProjectDocument/v1/getDetail`,
+    url: `${url}/api/costProjectDocument/v1/getByProjectId`,
     method: 'get',
-    params: {
-      id,
-    },
+    params,
   })
 }
 

+ 2 - 5
src/components/layouts/HtAppMain/index.vue

@@ -1,9 +1,6 @@
 <template>
-  <div
-    v-if="routerView"
-    class="app-main-container"
-    :class="{ 'index-container': $route.meta.title === '首页' }"
-  >
+  <div v-if="routerView" class="app-main-container">
+    <!-- :class="{ 'index-container': $route.meta.title === '首页' }" -->
     <transition mode="out-in" name="fade-transform">
       <keep-alive :include="cachedRoutes" :max="keepAliveMaxNum">
         <router-view

+ 4 - 4
src/views/costAudit/projectInfo/auditProjectManage/memoManage/memoManageMixin.js

@@ -338,10 +338,11 @@ export const memoManageMixin = {
       this.selectedDate = moment(this.selectedDate).add(1, 'month').toDate()
     },
     // 获取备忘录列表
-    async handleSearch() {
+    async handleSearch(num) {
       try {
         let params = {
           ...this.searchParams,
+          pageSize: num || this.searchParams.pageSize,
         }
         const res = await getMemoList(params)
         if (res.code == 200) {
@@ -383,11 +384,10 @@ export const memoManageMixin = {
       this.handleSearch()
     },
     // 初始化日历相关数据
-    initCalendarData() {
+    initCalendarData(num) {
       this.selectedDate = new Date()
-      console.log('初始化日历数据', this.selectedDate)
       this.lunarInfo = this.getLunarInfo(this.selectedDate)
-      this.handleSearch()
+      this.handleSearch(num)
     },
     onTabChange(tab) {
       this.searchParams.startTime = ''

+ 16 - 3
src/views/costAudit/projectInfo/auditTaskManage/taskCustomizedRelease/auditNoticeTab.vue

@@ -317,6 +317,7 @@
     addCostProjectDocument,
     updateCostProjectDocument,
     deleteCostProjectDocument,
+    getCostProjectDocumentDetail,
   } from '@/api/taskCustomizedRelease.js'
   import { dictMixin, regionMixin } from '@/mixins/useDict'
   import { uploadFile } from '@/api/file'
@@ -516,6 +517,9 @@
           this.allUnits = res.value || []
           // 过滤掉状态为停用的数据
           this.allUnits = this.allUnits.filter((item) => item.status == 1)
+          this.allUnits = this.allUnits.filter(
+            (item) => item.unitId == this.project.auditedUnitId
+          )
         })
       },
 
@@ -555,6 +559,18 @@
         }
         this.costProjectDocumentFiles = []
       },
+      getDetail() {
+        getCostProjectDocumentDetail({
+          projectId: this.project.projectId,
+        }).then((res) => {
+          if (res.value) {
+            this.document = {
+              ...this.document,
+              ...res.value,
+            }
+          }
+        })
+      },
       selectClick() {
         this.dialogVisible = true
         this.activeView = 'table'
@@ -937,9 +953,6 @@
             // 关闭加载状态
             this.$loading().close()
             console.error('获取文件URL失败:', error)
-            this.$message.error(
-              `获取下载链接失败: ${error.message || '未知错误'}`
-            )
           })
       },
     },

+ 98 - 120
src/views/home/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="dashboard-page">
     <el-row :gutter="20" class="mb-20 card-row">
-      <el-col :span="14">
+      <el-col :span="13">
         <el-card shadow="hover">
           <div class="card-header">
             <div class="left-icon">
@@ -25,10 +25,13 @@
               </el-select>
             </div>
           </div>
-          <div ref="chartRef" style="width: 100%; height: 300px"></div>
+          <div
+            ref="chartRef"
+            style="width: 100%; height: 400px; margin-top: 20px"
+          ></div>
         </el-card>
       </el-col>
-      <el-col :span="10">
+      <el-col :span="11">
         <el-card shadow="hover">
           <div class="card-header">
             <div class="left-icon">
@@ -43,12 +46,13 @@
             <li v-for="(item, idx) in newsList" :key="idx" class="news-item">
               <div class="news-content">
                 <div class="news-title">
-                  <i class="el-icon-arrow-right"></i>
+                  <i class="icon-dot"></i>
                   {{ item.content }}
                 </div>
                 <div class="news-meta">
                   <div class="left-icon">
                     <img
+                      style="width: 14px; height: 14px; vertical-align: middle"
                       src="@/assets/index_images/index-icon3@2x.png"
                       alt="管理员"
                     />
@@ -56,6 +60,7 @@
                   </div>
                   <div class="left-icon">
                     <img
+                      style="width: 14px; height: 14px; vertical-align: middle"
                       src="@/assets/index_images/index-icon4@2x.png"
                       alt="时间"
                     />
@@ -89,7 +94,12 @@
               ></el-option>
             </el-select>
           </div>
-          <el-table :data="todoList" style="width: 100%" :stripe="false">
+          <el-table
+            :data="todoList"
+            style="width: 100%"
+            :stripe="false"
+            class="no-zebra"
+          >
             <el-table-column label="预警" width="60">
               <template slot-scope="scope">
                 <el-tag v-if="scope.row.warning" type="warning">预警</el-tag>
@@ -171,7 +181,7 @@
               </el-button>
             </div>
           </div>
-          <el-row>
+          <el-row class="mt20">
             <el-col :span="13">
               <div class="calendar-container">
                 <div class="calendar-header">
@@ -256,59 +266,57 @@
               </div>
             </el-col>
             <el-col :span="10">
-              <ul class="memo-list">
+              <ul class="news-list card-content">
                 <li
                   v-for="(item, idx) in memoList"
                   :key="idx"
-                  class="memo-item"
+                  class="news-item mb10"
                 >
-                  <div class="left-icon">
-                    <img
-                      v-if="item.type === 'warning'"
-                      src="@/assets/index_images/index-icon6-light@2x.png"
-                      alt=""
-                      style="width: 15px; height: 15px"
-                    />
-                    <img
-                      v-else
-                      src="@/assets/index_images/index-icon6@2x.png"
-                      alt=""
-                      style="width: 15px; height: 15px"
-                    />
-                  </div>
-                  <div class="memo-content">
-                    <h4
-                      style="
-                        overflow: hidden;
-                        text-overflow: ellipsis;
-                        white-space: nowrap;
-                        margin: 0 0 8px 0;
-                      "
-                    >
-                      {{ item.projectName }}
-                    </h4>
-                    <p class="memo-meta">
-                      <span class="memo-meta-title">
-                        {{ item.title }}
-                      </span>
-                      <span class="memo-meta-date">
+                  <div class="news-content">
+                    <div class="news-title mb10">
+                      <img
+                        v-if="item.type === 'warning'"
+                        src="@/assets/index_images/index-icon6-light@2x.png"
+                        alt=""
+                        style="width: 15px; height: 15px"
+                      />
+                      <img
+                        v-else
+                        src="@/assets/index_images/index-icon6@2x.png"
+                        alt=""
+                        style="width: 15px; height: 15px"
+                      />
+                      <span class="ml10">{{ item.projectName }}</span>
+                    </div>
+                    <div class="news-meta mb10">
+                      <div class="left-icon w40">
+                        <img
+                          style="
+                            width: 14px;
+                            height: 14px;
+                            vertical-align: middle;
+                          "
+                          src="@/assets/index_images/index-icon4@2x.png"
+                        />
+                        <span>{{ item.title }}</span>
+                      </div>
+                      <div class="left-icon">
                         <img
                           style="
                             width: 14px;
                             height: 14px;
                             vertical-align: middle;
-                            margin-right: 4px;
                           "
                           src="@/assets/index_images/index-icon4@2x.png"
                           alt="时间"
                         />
-                        {{ item.memoDate }}
-                      </span>
-                    </p>
-                    <p class="memo-content-text">
+                        <span>{{ item.memoDate }}</span>
+                      </div>
+                    </div>
+                    <div class="news-meta">
                       <i class="el-icon-document"></i>
-                      {{ item.content }}
-                    </p>
+                      <span class="content-text">{{ item.content }}</span>
+                    </div>
                   </div>
                 </li>
               </ul>
@@ -405,7 +413,7 @@
     mounted() {
       this.$el.querySelector('div.el-calendar__header').remove()
       this.initChart()
-      this.initCalendarData()
+      this.initCalendarData(5)
     },
     methods: {
       // 判断是否为周末
@@ -432,12 +440,17 @@
             },
           },
           legend: {
+            show: true,
+            itemWidth: 20,
+            itemHeight: 8,
+            itemGap: 10,
             data: ['已办', '在办'],
           },
           grid: {
+            top: '20%',
             left: '3%',
             right: '4%',
-            bottom: '15%', // 增加底部空间以容纳滚动条和旋转的标签
+            bottom: '2%', // 增加底部空间以容纳滚动条和旋转的标签
             containLabel: true,
           },
           xAxis: {
@@ -488,8 +501,8 @@
         })
       },
       loadMoreNews() {
-        // // 跳转备忘录页面
-        // this.$router.push('/costAudit/projectInfo/memoManage')
+        //  跳转通知公告页面
+        this.$router.push('/personal/notice')
       },
       handleOp(type, row) {
         this.$message.info(`执行【${type}】操作:${row.task}`)
@@ -510,13 +523,17 @@
 
 <style scoped lang="scss">
   @import '@/views/costAudit/projectInfo/auditProjectManage/memoManage/memoManage.scss';
-  .dashboard-page {
-    padding: 20px;
-  }
   .mb-20 {
     /* border: 1px solid red; */
     margin-bottom: 20px;
   }
+  .icon-dot {
+    width: 8px;
+    height: 8px;
+    background-color: #999999;
+    border-radius: 50%;
+    display: inline-block;
+  }
   /* 确保同一行的卡片高度一致 */
   .card-row {
     display: flex;
@@ -556,11 +573,14 @@
     align-items: center;
   }
   .news-list {
+    width: 100%;
   }
   .card-content {
+    width: 100%;
     padding: 20px;
   }
   .news-item {
+    width: 100%;
     padding: 12px 0;
     border-bottom: 1px solid #f0f0f0;
     display: flex;
@@ -570,14 +590,19 @@
     border-bottom: none;
   }
   .news-content {
+    width: 100%;
     line-height: 1.6;
     font-size: 14px;
     flex: 1;
   }
   .news-title {
     display: flex;
-    align-items: flex-start;
+    align-items: flex-center;
     margin-bottom: 8px;
+    width: 95%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
   }
   .news-title i {
     color: #f56c6c;
@@ -587,6 +612,7 @@
     flex-shrink: 0;
   }
   .news-meta {
+    width: 100%;
     display: flex;
     align-items: center;
     margin-left: 22px;
@@ -596,8 +622,8 @@
   }
   .news-meta .left-icon span {
     margin-left: 4px;
-    color: #909399;
-    font-size: 12px;
+    color: #61657e;
+    font-size: 14px;
   }
   .calendar-day {
     position: relative;
@@ -618,82 +644,34 @@
     background-color: #67c23a;
     border-radius: 50%;
   }
-  .memo-list {
-    width: 100%;
-    list-style: none;
-    padding: 20px;
-    margin: 0;
-  }
-  .memo-item {
-    width: 100%;
-    border-radius: 8px;
-    margin-bottom: 20px;
-    display: flex;
-    align-items: flex-start;
-    transition: all 0.3s ease;
-  }
-  .memo-item:last-child {
-    margin-bottom: 0;
-  }
-  .memo-item .left-icon {
+  .left-icon {
     display: flex;
-    align-items: flex-start;
-    margin-right: 12px;
-    padding-top: 2px;
-    flex-shrink: 0;
+    align-items: center;
+    img {
+      width: 20px;
+    }
   }
-  .memo-item .left-icon img {
-    width: 15px;
-    height: 15px;
+  .title {
+    font-size: 18px;
   }
-  .memo-content {
-    width: 100%;
-    flex: 1;
+  /* 彻底移除表格斑马纹效果 */
+  .no-zebra ::v-deep .el-table__row:nth-child(even) {
+    background-color: transparent;
   }
-  .memo-content h4 {
-    margin: 0 0 8px 0;
-    font-size: 16px;
-    font-weight: bolder;
-    color: #303133;
+  .no-zebra ::v-deep .el-table__body tr:hover > td {
+    background-color: #f5f7fa !important;
   }
-  .memo-meta {
-    width: 95%;
-    // display: flex;
-    // align-items: center;
-    margin-bottom: 8px;
+  .w40 {
+    width: 40%;
   }
-  .memo-meta-title {
+  .content-text {
     display: inline-block;
-    width: 40%;
+    width: 95%;
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
+    color: #61657e;
     font-size: 14px;
-    color: #606266;
-    font-weight: 500;
-  }
-  .memo-meta-date {
-    font-size: 12px;
-    color: #909399;
-    white-space: nowrap;
-  }
-  .memo-content-text {
-    width: 98%;
-    font-size: 14px;
-    color: #606266;
-    line-height: 1.6;
-    margin: 0;
-    padding-left: 0;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    white-space: nowrap;
-  }
-  .left-icon {
-    display: flex;
-    align-items: center;
-    img {
-      width: 20px;
-    }
   }
   h3 {
     margin: 0;