Ver Fonte

通知已读功能

dudm há 4 anos atrás
pai
commit
69a90946ca
2 ficheiros alterados com 36 adições e 5 exclusões
  1. 8 0
      front-vue/src/api/system/notice.js
  2. 28 5
      front-vue/src/views/home.vue

+ 8 - 0
front-vue/src/api/system/notice.js

@@ -9,6 +9,14 @@ export function listNotice(query) {
   })
 }
 
+// 消息已读
+export function readWork(noticeId) {
+  return request({
+    url: '/system/ownNotice/readWork/' + noticeId,
+    method: 'get',
+  })
+}
+
 // 处理待办
 export function dealWork(data) {
   return request({

+ 28 - 5
front-vue/src/views/home.vue

@@ -100,7 +100,12 @@
                     <el-tabs v-model="activeName">
                         <el-tab-pane label="我的待办" name="first" style="height:400px">
                             <el-table :data="workList" :show-header="false">
-                                <el-table-column label="标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true"/>
+                                <el-table-column label="标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true">
+                                    <template slot-scope="scope">
+                                        <el-badge is-dot class="item" v-if="scope.row.snyrUserStatus == '0'"></el-badge>
+                                        <span>{{ scope.row.noticeTitle }}</span>
+                                    </template>
+                                </el-table-column>
                                 <el-table-column label="时间" align="center" prop="createTime" :show-overflow-tooltip="true">
                                     <template slot-scope="scope">
                                         <span>{{ parseTime(new Date(scope.row.createTime)) }}</span>
@@ -112,6 +117,7 @@
                                             size="mini"
                                             type="text"
                                             @click="handleDetail(scope.row)"
+                                            style="color:red"
                                         >去办理</el-button>
                                             <!-- v-if="scope.row.openUrl" -->
                                     </template>
@@ -317,7 +323,12 @@
                     <el-tabs v-model="activeName">
                         <el-tab-pane label="我的待办" name="first" style="height:400px">
                             <el-table :data="workList" :show-header="false">
-                                <el-table-column label="标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true"/>
+                                <el-table-column label="标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true">
+                                    <template slot-scope="scope">
+                                        <el-badge is-dot class="item" v-if="scope.row.snyrUserStatus == '0'"></el-badge>
+                                        <span>{{ scope.row.noticeTitle }}</span>
+                                    </template>
+                                </el-table-column>
                                 <el-table-column label="时间" align="center" prop="createTime" :show-overflow-tooltip="true">
                                     <template slot-scope="scope">
                                         <span>{{ parseTime(new Date(scope.row.createTime)) }}</span>
@@ -329,6 +340,7 @@
                                             size="mini"
                                             type="text"
                                             @click="handleDetail(scope.row)"
+                                            style="color:red"
                                         >去办理</el-button>
                                             <!-- v-if="scope.row.openUrl" -->
                                     </template>
@@ -552,7 +564,12 @@
                     <el-tabs v-model="activeName">
                         <el-tab-pane label="我的待办" name="first" style="height:400px">
                             <el-table :data="workList" :show-header="false">
-                                <el-table-column label="标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true"/>
+                                <el-table-column label="标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true">
+                                    <template slot-scope="scope">
+                                        <el-badge is-dot class="item" v-if="scope.row.snyrUserStatus == '0'"></el-badge>
+                                        <span>{{ scope.row.noticeTitle }}</span>
+                                    </template>
+                                </el-table-column>
                                 <el-table-column label="时间" align="center" prop="createTime" :show-overflow-tooltip="true">
                                     <template slot-scope="scope">
                                         <span>{{ parseTime(new Date(scope.row.createTime)) }}</span>
@@ -563,8 +580,8 @@
                                         <el-button
                                             size="mini"
                                             type="text"
-                                            icon="el-icon-info"
                                             @click="handleDetail(scope.row)"
+                                            style="color:red"
                                         >去办理</el-button>
                                     </template>
                                 </el-table-column>
@@ -711,7 +728,7 @@ import { getCreditLineAll, getAvailableBalance, getEffectBalance, getLoanBalance
 import { getCompanyNum, getFinanceSupplier, getFinanceNum, getCompanyReport } from '@/api/service/report/company'
 import { getOwnCompany } from "@/api/common/company";
 import { accAdd, accSub } from "@/utils/calculation";
-import { listNotice } from '@/api/system/notice'
+import { listNotice, readWork } from '@/api/system/notice'
 import { amtformat } from "@/utils/amtCommon"
 import  EchartPie  from '@/components/Echart/pie/index'
 import  EchartBar  from '@/components/Echart/bar/index'
@@ -1615,8 +1632,14 @@ export default {
                 this.noticeId = row.noticeId
                 this.workType = row.workType
                 this.tableId = row.tableId
+                readWork(row.noticeId).then(response => {
+                    this.getWorkList()
+                });
             }else if(row.openType == '01'){
                 this.$router.push({ path: row.openUrl });
+                readWork(row.noticeId).then(response => {
+                    this.getWorkList()
+                });
             }
         },
         // 取消按钮