瀏覽代碼

no message

linwenxin 6 月之前
父節點
當前提交
c9398d817a
共有 2 個文件被更改,包括 37 次插入9 次删除
  1. 8 0
      src/api/networkNotification.js
  2. 29 9
      src/views/setting/notification/networkNotification/index.vue

+ 8 - 0
src/api/networkNotification.js

@@ -71,3 +71,11 @@ export function noticeWebsitMarkRead(params) {
     params
   })
 }
+
+export function noticeWebsitMarkReadOne(params) {
+  return request({
+    url: `/noticeWebsit/mark/readOne`,
+    method: 'post',
+    params
+  })
+}

+ 29 - 9
src/views/setting/notification/networkNotification/index.vue

@@ -44,7 +44,12 @@
         <zj-page-container v-if="formBoolXQ">
           <zj-page-fill class="neibuview">
             <div class="nlnlknmlkmkl" style="width: 100%" v-if="formBoolXQ">
-              <template-page ref="pageRef2" :getList="getList2" :exportList="exportList2"></template-page>
+              <template-page
+                ref="pageRef2"
+                :getList="getList2"
+                :exportList="exportList2"
+                :operation="operation2()"
+              ></template-page>
             </div>
             <zj-form-container
               ref="formRef"
@@ -55,13 +60,6 @@
               <zj-form-module title="基础信息" :form-data="formData" :form-items="items" />
             </zj-form-container>
           </zj-page-fill>
-          <!-- 操作按钮 -->
-          <div style="box-sizing: border-box; padding: 10px; text-align: right">
-            <!-- <el-button size="mini" @click="handleClose">取 消</el-button>
-            <el-button v-if="formData.status" size="mini" @click="formConfirm" type="primary"
-              >发 送</el-button
-            > -->
-          </div>
         </zj-page-container>
       </el-dialog>
     </div>
@@ -81,7 +79,8 @@ import {
   noticeWebsitOfOrSend,
   noticeWebsitListWebsit,
   noticeWebsitListWebsitExport,
-  noticeWebsitMarkRead
+  noticeWebsitMarkRead,
+  noticeWebsitMarkReadOne
 } from '@/api/networkNotification'
 import operation_mixin from '@/components/template/operation_mixin.js'
 import { required } from '@/components/template/rules_verify.js'
@@ -449,6 +448,27 @@ export default {
         }
       })
     },
+    operation2() {
+      return this.operationBtn({
+        details: {
+          name: '接收',
+          conditions: ({ row, index, column }) => {
+            return row.readFlag == 'NO'
+          },
+          click: ({ row, index, column }) => {
+            noticeWebsitMarkReadOne({
+              id: row.id
+            }).then(res => {
+              this.$message({
+                type: 'success',
+                message: '操作成功!'
+              })
+              this.$refs.pageRef2.refreshList()
+            })
+          }
+        }
+      })
+    },
     openWindow(cb) {
       this.$nextTick(() => {
         cb?.()