Procházet zdrojové kódy

refactor(noticeIssuance): 优化通知公告相关功能

liujt před 2 měsíci
rodič
revize
8ab37e88b3

+ 3 - 2
src/views/bpm/documents/noticeIssuance/components/addOrEdit.vue

@@ -20,7 +20,7 @@
                           </div>
                       </el-col>
                       <el-col :span="18">
-                          <iframe class="file-iframe" style="width: 100%; height: 62vh;" v-if="fileList && fileList.length > 0" :src="currentFileUrl" frameborder="0"></iframe>
+                          <iframe class="file-iframe" style="width: 100%; height: 62vh;" v-if="fileList && fileList.length > 0" :src="currentFileUrl" frameborder="0" allowfullscreen="true"></iframe>
                       </el-col>
                     </el-row>
                   </div>
@@ -56,6 +56,7 @@ import { queryIds } from '@/components/addDoc/api/index'
 import { getCode } from '@/api/codeManagement';
 import { uploadFile } from '@/api/system/file/index.js';
 import processSubmitDialog  from '@/BIZComponents/enventSubmitDialog/processSubmitDialog'
+import { setFileUrl } from '@/components/addDoc/util.js'
 export default {
   components: {
     MainBodyTemplate,
@@ -138,7 +139,7 @@ export default {
   },
   methods: {
     filesOpen(item) {
-      this.currentFileUrl = item.storagePath?.[0]?.url || '';
+      this.currentFileUrl = setFileUrl(item);
     },
     async getFiles(ids) {
       if(ids) {

+ 2 - 2
src/views/bpm/documents/noticeIssuance/index.vue

@@ -28,8 +28,8 @@
         <template v-slot:toolbar>
           <el-button type="primary" @click="toAdd()">新增</el-button>
           <el-button type="danger" @click="toDelAll()">批量删除</el-button>
-          <el-button type="success" @click="toEnd()">导出</el-button>
-          <el-button type="primary" @click="printing()">打印</el-button>
+          <!-- <el-button type="success" @click="toEnd()">导出</el-button>
+          <el-button type="primary" @click="printing()">打印</el-button> -->
         </template>
 
         <template v-slot:docNo="{ row }">

+ 18 - 13
src/views/home/index.vue

@@ -146,13 +146,6 @@
     <el-row :gutter="12" class="mt-20" style="height: 404px;">
       <el-col :span="18" class="box-col">
         <el-card class="box-card">
-          <!-- <div slot="header" class="clearfix">
-            <span>通知公告</span>
-            <span style="float: right; padding: 3px 0">
-              <i class="el-icon-edit"></i>
-              <i class="el-icon-setting"></i>
-            </span>
-          </div> -->
           <div class="card-content">
             <el-tabs v-model="activeTab" @tab-click="handleTabClick">
               <el-tab-pane label="通知公告" name="notice"></el-tab-pane>
@@ -161,7 +154,7 @@
             </el-tabs>
             
             <div v-if="notifications.length > 0" class="notification-list">
-              <div v-for="(item, index) in notifications" :key="index" class="notification-item">
+              <div v-for="(item, index) in notifications" :key="index" class="notification-item" @click="handleNotificationsClick(item)">
                 <div class="notification-dot"></div>
                 <div class="notification-content">
                   <div class="notification-header">
@@ -174,7 +167,7 @@
                     </div>
                     <div v-else class="notification-text">{{ item.content }}</div>
                   </div>
-                  <div class="notification-info"><span style="margin-right: 20px;">{{ item.department }}</span>  {{ item.createUser }}</div>
+                  <div class="notification-info">{{ item.createUser }} <span style="margin-left: 20px;">{{ item.department }}</span></div>
                 </div>
                 <div class="notification-date">{{ item.createTime }}</div>
               </div>
@@ -323,6 +316,17 @@ export default {
     this.getMyWorkCalendar();
   },
   methods: {
+    handleNotificationsClick(item) {
+      console.log('item~~~', item);
+      this.$router.push({
+        path: '/page-wt/documents/noticeIssuance/add-or-edit',
+        // query
+        query: {
+          id: item.id,
+          type: 'detail'
+        }
+      });
+    },
     async getMyWorkCalendar() {
       const res = await getMyWorkCalendar({
         startDate: this.calendarRange[0],
@@ -396,7 +400,7 @@ export default {
           this.handelRouterTo('/page-qms/inspectionWork')
           break;
         case '生产工单':
-          this.handelRouterTo('/page-mes/produceOrder')
+          this.handelRouterTo('/page-mes/produceOrder?isWt=true')
           break;
         case '盘点工单':
           this.handelRouterTo('/page-wms/warehouseManagement/stocktaking/work')
@@ -974,7 +978,7 @@ export default {
 }
 
 .notification-title {
-  font-size: 14px;
+  font-size: 15px;
   font-weight: 500;
   color: #333;
   margin-right: 12px;
@@ -983,11 +987,12 @@ export default {
   text-overflow: ellipsis;
   flex-shrink: 1;
   max-width: 200px;
+
 }
 
 .notification-info {
   font-size: 12px;
-  color: #999;
+  color: #333;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
@@ -995,7 +1000,7 @@ export default {
 
 .notification-text {
   font-size: 12px;
-  color: #666;
+  color: #333;
   line-height: 1.4;
   flex: 1;
   min-width: 0;