From d1b6cd8e5270b15546c94587fe2648453d525eee Mon Sep 17 00:00:00 2001
From: lzhe <lzhe@example.com>
Date: 星期四, 10 十月 2024 12:44:17 +0800
Subject: [PATCH] 1

---
 src/views/notification/notice/newsmail.vue |   97 +++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 75 insertions(+), 22 deletions(-)

diff --git a/src/views/notification/notice/newsmail.vue b/src/views/notification/notice/newsmail.vue
index 167cbc8..9f145ab 100644
--- a/src/views/notification/notice/newsmail.vue
+++ b/src/views/notification/notice/newsmail.vue
@@ -9,25 +9,45 @@
 <template>
 	<div class="newsmail-main">
 		<el-tabs v-model="activeName" class="demo-tabs" @tab-change="handleClick">
-		    <el-tab-pane label="鍏ㄩ儴鍏憡" name="A">
-		    	<el-table ref="multipleTableRef" :data="tableData" border style="width: 100%" class="multipleTableRef">
-					<el-table-column prop="categoryName" label="title"></el-table-column>
-					<el-table-column prop="businessName" label="content"></el-table-column>
-					<el-table-column prop="notifyTime" label="date"></el-table-column>
-					<el-table-column fixed="right" label="鎿嶄綔">
-						<template #default="scope">
-							<el-button text type="primary" size="small" @click="table_view(scope.row, scope.$index)">鏌ョ湅鏇村&gt&gt</el-button>
-						</template>
-					</el-table-column>
-				</el-table>
-		    </el-tab-pane>
-		    <el-tab-pane label="鍙戝竷鍏憡" name="B">Config</el-tab-pane>
-		    <el-tab-pane label="浠诲厤鍏憡" name="C">Role</el-tab-pane>
-		    <el-tab-pane label="杞彂鍏憡" name="D">Task</el-tab-pane>
-		    <el-tab-pane label="鎸囩ず鍏憡" name="E">Task</el-tab-pane>
-		    <el-tab-pane label="浜嬪姟鍏憡" name="F">Task</el-tab-pane>
+		    <el-tab-pane label="鍏ㄩ儴鍏憡" name="A"></el-tab-pane>
+		    <el-tab-pane label="鍙戝竷鍏憡" name="B"></el-tab-pane>
+		    <el-tab-pane label="浠诲厤鍏憡" name="C"></el-tab-pane>
+		    <el-tab-pane label="杞彂鍏憡" name="D"></el-tab-pane>
+		    <el-tab-pane label="鎸囩ず鍏憡" name="E"></el-tab-pane>
+		    <el-tab-pane label="浜嬪姟鍏憡" name="F"></el-tab-pane>
 		</el-tabs>
+		<el-table ref="multipleTableRef" :data="tableData" border style="width: 100%" class="multipleTableRef">
+			<el-table-column prop="categoryName" label="title">
+				<template #default="scope">
+					<span class="spanDot" :style="{'background-color': scope.row.status != 1?'red':''}"></span>
+					<span>{{scope.row.categoryName}}</span>
+				</template>
+			</el-table-column>
+			<el-table-column prop="businessName" label="content"></el-table-column>
+			<el-table-column prop="notifyTime" label="date"></el-table-column>
+			<el-table-column fixed="right" label="鎿嶄綔">
+				<template #default="scope">
+					<el-button text type="primary" size="small" @click="table_view(scope.row, scope.$index)">鏌ョ湅鏇村&gt&gt</el-button>
+				</template>
+			</el-table-column>
+		</el-table>
 	</div>
+	<el-dialog title="璇︽儏" v-model="visible" :width="500" destroy-on-close>
+		<el-row>
+			<el-col :span="24" style="margin-bottom:12px;">
+				<span style="font-weight: bold;">{{detailForm.businessName}}</span>
+			</el-col>
+			<el-col :span="24" style="margin-bottom:12px;font-size: 12px;color: #666;">
+				<span>{{detailForm.notifyTime}}</span>
+			</el-col>
+			<el-col :span="24">
+				<span v-html="detailForm.message"></span>
+			</el-col>
+		</el-row>
+		<template #footer>
+			<el-button @click="visible=false" >鍏抽棴</el-button>
+		</template>
+	</el-dialog>
 </template>
 <script>
 	export default {
@@ -35,7 +55,13 @@
 		data(){
 			return {
 				tableData: [],
-				activeName: "A"
+				activeName: "A",
+				visible: false,
+				detailForm: {
+					businessName: "",
+					notifyTime: "",
+					message: ""
+				}
 			}
 		},
 		created(){
@@ -48,14 +74,33 @@
 			
 		},
 		methods: {
-			table_view() {
-
+			table_view(row) {
+				this.$HTTP.get(`/api/blade-notify/notify-system/get/${row.id}`).then(res=> {
+					if(res.code == 200) {
+						this.detailForm = res.data;
+						this.visible = true;
+					}
+				})
+				
 			},
 			handleClick(TabPaneName) {
-
+				this.getcategoryList();
 			},
 			getcategoryList() {
-				this.$HTTP.get(`/api/blade-notify/notify-system/page?size=10&notifyType=2&current=1`).then(res=> {
+				if(this.activeName == "A") {
+					var url = `/api/blade-notify/notify-system/page?size=10&notifyType=2&current=1`;
+				}else if(this.activeName == "B") {
+					var url = `/api/blade-notify/notify-system/page?size=10&notifyType=2&category=1&current=1`;
+				}else if(this.activeName == "C") {
+					var url = `/api/blade-notify/notify-system/page?size=10&notifyType=2&category=5&current=1`;
+				}else if(this.activeName == "D") {
+					var url = `/api/blade-notify/notify-system/page?size=10&notifyType=2&category=3&current=1`;
+				}else if(this.activeName == "E") {
+					var url = `/api/blade-notify/notify-system/page?size=10&notifyType=2&category=4&current=1`;
+				}else if(this.activeName == "F") {
+					var url = `/api/blade-notify/notify-system/page?size=10&notifyType=2&category=6&current=1`;
+				}
+				this.$HTTP.get(url).then(res=> {
 					if(res.code == 200) {
 						this.tableData = res.data.records;
 					}
@@ -75,4 +120,12 @@
 .multipleTableRef /deep/ .el-table__header-wrapper{
 	display: none;
 }
+.spanDot {
+    width: 6px;
+    height: 6px;
+    border-radius: 3px;
+    display: inline-block;
+    margin-right:12px;
+    font-size: 14px;
+}
 </style>

--
Gitblit v1.9.3