SanHQin 1 viikko sitten
vanhempi
commit
b6b5d7f299

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.9abf1982f04cd95eb13a3584decfbd47.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.b7212920b6e58d14a873.js></script><script type=text/javascript src=./static/js/app.ffcb9b493ed3293e50c5.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.5f969b5f15f8d326a43b69bef2766965.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.b7212920b6e58d14a873.js></script><script type=text/javascript src=./static/js/app.4db4010f0db73138f58b.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/css/app.5f969b5f15f8d326a43b69bef2766965.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/css/app.5f969b5f15f8d326a43b69bef2766965.css.map


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/app.4db4010f0db73138f58b.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/app.4db4010f0db73138f58b.js.map


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
dist/static/js/manifest.161e82026ac2ae03ab6f.js.map


+ 91 - 43
src/components/pages/noticeCenter/component/received.vue

@@ -22,6 +22,8 @@
         :data="tableData"
         :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
         style="width: 100%"
+        @row-click="showNoticeDetail"
+        :row-style="{cursor:'pointer'}"
         height="calc(100%)"
       >
         <el-table-column
@@ -31,24 +33,26 @@
           width="auto"
           min-width="200"
         >
-        <template slot-scope="scope">
-          <span v-html="scope.row.title"></span>
-        </template>
+          <template slot-scope="scope">
+            <span v-html="scope.row.title"></span>
+          </template>
         </el-table-column>
         <el-table-column label="状态 " width="150" align="center">
           <template slot-scope="scope">
-          <span>{{status[scope.row.status]}}</span>
-        </template>
+            <span class="status" :class="`status_${scope.row.status}`">{{
+              status[scope.row.status]
+            }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="type" label="类型 " width="150" align="center">
         </el-table-column>
         <el-table-column
-          prop="type"
-          label="类型 "
-          width="150"
+          prop="create_at"
+          label="时间 "
+          width="250"
           align="center"
         >
         </el-table-column>
-        <el-table-column prop="create_at" label="时间 " width="250" align="center">
-        </el-table-column>
         <el-table-column
           prop="publisherName"
           label="发布者 "
@@ -56,7 +60,12 @@
           align="center"
         >
         </el-table-column>
-        <el-table-column prop="source" label="发布来源" width="200" align="center">
+        <el-table-column
+          prop="source"
+          label="发布来源"
+          width="200"
+          align="center"
+        >
         </el-table-column>
       </el-table>
     </div>
@@ -72,21 +81,26 @@
       >
       </el-pagination>
     </div>
+    <noticeDetailDialog ref="noticeDetailDialogRef"/>
   </div>
 </template>
 
 <script>
+import noticeDetailDialog from '../dialog/noticeDetailDialog.vue';
 export default {
+  components: {
+    noticeDetailDialog
+  },
   data() {
     return {
       userId: this.$route.query.userid,
       org: this.$route.query.org,
       oid: this.$route.query.oid,
       tableLoading: false,
-      status:["未读","已读"],
+      status: ["未读", "已读"],
       searchValue: "",
       tableData: [],
-      copyData:[],
+      copyData: [],
       pageData: {
         nowPage: 1,
         total: 0,
@@ -106,39 +120,50 @@ export default {
     getData() {
       if (this.tableLoading) return;
       this.tableLoading = true;
-      let params = [{
-        uid: this.userId,
-        status:"",
-        type:"",
-        source:"",
-        pUid:"",
-        searchValue:this.searchValue,
-        pageNum:this.pageData.nowPage,
-        pageSize:this.pageData.size,
-      }]
-
-      this.ajax.post(this.$store.state.api+"select_noticeCenter",params).then(res=>{
-        let _resData = res.data[0];
-        if(_resData.length>0){
-          this.copyData = _resData;
-          this.tableData = _resData;
-          this.pageData.total = res.data[1][0].total;
-        }else{
-          this.copyData = [];
-          this.pageData.total = 0;
-          this.pageData.nowPage = 1;
+      let params = [
+        {
+          uid: this.userId,
+          status: "",
+          type: "",
+          source: "",
+          pUid: "",
+          searchValue: this.searchValue,
+          pageNum: this.pageData.nowPage,
+          pageSize: this.pageData.size
         }
-        this.tableLoading = false;
-        // this.tableData = res.data.list
-        // this.pageData.total = res.data.total
-      }).catch(e=>{
-        console.log(e);
-        this.$message.error("获取通知失败")
-        this.tableLoading = false;
-      })
+      ];
+
+      this.ajax
+        .post(this.$store.state.api + "select_noticeCenter", params)
+        .then(res => {
+          let _resData = res.data[0];
+          if (_resData.length > 0) {
+            _resData.forEach(item => {
+              item.content = JSON.parse(item.content);
+            })
+            this.copyData = _resData;
+            this.tableData = _resData;
+            this.pageData.total = res.data[1][0].total;
+          } else {
+            this.copyData = [];
+            this.pageData.total = 0;
+            this.pageData.nowPage = 1;
+          }
+          this.tableLoading = false;
+          // this.tableData = res.data.list
+          // this.pageData.total = res.data.total
+        })
+        .catch(e => {
+          console.log(e);
+          this.$message.error("获取通知失败");
+          this.tableLoading = false;
+        });
+    },
+    showNoticeDetail(row){
+      this.$refs.noticeDetailDialogRef.open(row)
     }
   },
-  mounted(){
+  mounted() {
     this.getData();
   }
 };
@@ -196,6 +221,29 @@ export default {
   border-top: solid 1px #dfdfe0;
 }
 
+.status {
+  padding: 0px 10px;
+  border-radius: 4px;
+  height: 30px;
+  width: fit-content;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin: 0 auto;
+}
+
+.status_0 {
+  background: #f3f4f6;
+  color: #4d5765;
+  border: solid 1px #d4d8dd;
+}
+
+.status_1 {
+  background: #ecfdf5;
+  color: #10664e;
+  border: solid 1px #abf4d3;
+}
+
 .r_bottom {
   width: 100%;
   height: 40px;

+ 207 - 0
src/components/pages/noticeCenter/dialog/noticeDetailDialog.vue

@@ -0,0 +1,207 @@
+<template>
+	<div>
+		<el-dialog
+			:center="true"
+			:visible.sync="show"
+			:close-on-click-modal="true"
+			:modal="true"
+			width="auto"
+			height="auto"
+      top="10vh"
+			:append-to-body="true"
+			class="dialog"
+		>
+			<div class="box">
+				<div class="b_head">
+					<span>消息详细</span>
+					<svg
+						@click="close()"
+						t="1748587270371"
+						class="icon"
+						viewBox="0 0 1024 1024"
+						version="1.1"
+						xmlns="http://www.w3.org/2000/svg"
+						p-id="5023"
+						width="200"
+						height="200"
+					>
+						<path
+							d="M0 0h1024v1024H0z"
+							fill="#FF0033"
+							fill-opacity="0"
+							p-id="5024"
+						></path>
+						<path
+							d="M240.448 168l2.346667 2.154667 289.92 289.941333 279.253333-279.253333a42.666667 42.666667 0 0 1 62.506667 58.026666l-2.133334 2.346667-279.296 279.210667 279.274667 279.253333a42.666667 42.666667 0 0 1-58.005333 62.528l-2.346667-2.176-279.253333-279.253333-289.92 289.962666a42.666667 42.666667 0 0 1-62.506667-58.005333l2.154667-2.346667 289.941333-289.962666-289.92-289.92a42.666667 42.666667 0 0 1 57.984-62.506667z"
+							fill="#fff"
+							p-id="5025"
+						></path>
+					</svg>
+				</div>
+				<div class="b_main" v-loading="loading">
+          <div class="b_m_top">
+            <div class="b_m_t_title" v-html=" data.title"></div>
+            <div>
+              <span>发布来源:{{data.source}}</span>
+              <span>发布者:{{data.publisherName}}</span>
+              <span>发布时间:{{data.create_at}}</span>
+            </div>
+          </div>
+          <div class="b_m_content">
+
+          </div>
+          <div class="b_m_bottom" v-if="false"></div>
+				</div>
+				<div class="b_bottom">
+          <div class="b_b_submit" @click="close()">确定</div>
+				</div>
+			</div>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			loading: false,
+			show: false,
+			data: null,
+		};
+	},
+	methods: {
+		open(data) {
+			this.data = JSON.parse(JSON.stringify(data));
+			this.loading = false;
+			this.show = true;
+		},
+		close() {
+			this.show = false;
+			this.init();
+		},
+		init() {
+			this.data = null;
+			this.loading = false;
+		},
+    submit(){
+      this.close()
+    },
+	},
+};
+</script>
+
+<style scoped>
+.dialog >>> .el-dialog {
+	width: 80vw !important;
+	border-radius: 8px;
+	padding: 0;
+	background-color: #fff;
+	overflow: hidden;
+}
+
+.dialog >>> .el-dialog__body {
+	width: 80vw !important;
+  height: 80vh;
+	height: auto;
+	flex-shrink: 0;
+	padding: 0;
+	box-sizing: border-box;
+	overflow: auto;
+}
+
+.dialog >>> .el-dialog__header {
+	display: none !important;
+}
+
+.box {
+	width: 80vw;
+	height: 80vh;
+	background: #fff;
+	border-radius: 15px;
+	box-shadow: 0px 6px 30px 5px rgba(0, 0, 0, 0.05),
+		0px 16px 24px 2px rgba(0, 0, 0, 0.04), 0px 8px 10px -5px rgba(0, 0, 0, 0.08);
+
+}
+
+.b_head {
+	width: 100%;
+	height: 50px;
+	/* border-radius: 15px 15px 0 0; */
+	background: #1A1A1A;
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	box-sizing: border-box;
+	padding: 0 20px;
+  color: #fff;
+}
+
+.b_head > span {
+	font-size: 18px;
+	font-weight: bold;
+	color: #fff;
+}
+
+.b_head > img {
+	width: 20px;
+	height: 20px;
+	cursor: pointer;
+}
+
+.b_head > svg {
+	width: 20px;
+	height: 20px;
+	cursor: pointer;
+}
+
+.b_main {
+	width: 100%;
+	height: calc(100% - 70px - 40px - 15px);
+	background: #fff;
+	padding: 20px 20px 20px 20px;
+	box-sizing: border-box;
+  overflow: auto;
+}
+
+.b_bottom {
+	width: 100%;
+	height: 70px;
+	display: flex;
+	align-items: center;
+	justify-content: flex-end;
+	box-sizing: border-box;
+	padding: 0 20px;
+}
+
+.b_bottom>div{
+  padding: 10px 25px;
+  background: #fff;
+  color: #000;
+  border-radius: 4px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border: solid 1px #EEEEEE;
+  margin-left: 15px;
+  cursor: pointer;
+  font-size: 16px;
+}
+
+.b_bottom>.b_b_submit{
+  background: #1A1A1A;
+  color: #D4D4D4;
+  border-color: #1A1A1A;
+}
+
+
+.b_m_top{
+  width: 100%;
+  height: auto;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  margin-top: 30px;
+
+}
+</style>

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä