xjc пре 4 година
родитељ
комит
499b940705
6 измењених фајлова са 88 додато и 39 уклоњено
  1. 4 4
      src/main.js
  2. 4 0
      src/router.js
  3. 22 29
      src/views/Home.vue
  4. 0 2
      src/views/article/AddArticle.vue
  5. 5 4
      src/views/message/Notice.vue
  6. 53 0
      src/views/message/NoticeDetail.vue

+ 4 - 4
src/main.js

@@ -10,10 +10,10 @@ import api from './api';
 import echarts from 'echarts';
 import  'echarts/theme/dark.js'
 import VueUeditorWrap from 'vue-ueditor-wrap' // ES6 Module
-import './static/UEditor/ueditor.config'
-import './static/UEditor/ueditor.all'
-import './static/UEditor/lang/zh-cn/zh-cn'
-import './static/UEditor/themes/default/css/ueditor.css';
+import '../public/static/UEditor/ueditor.config'
+import '../public/static/UEditor/ueditor.all'
+import '../public/static/UEditor/lang/zh-cn/zh-cn'
+import '../public/static/UEditor/themes/default/css/ueditor.css';
 
 Vue.component('vue-ueditor-wrap', VueUeditorWrap)
 // import BaiduMap from 'vue-baidu-map'

+ 4 - 0
src/router.js

@@ -37,6 +37,10 @@ export default new Router({
         path: '/message/message/analyse',
         component: () => import('./views/message/MessageAnalyse.vue'),
         name: '问卷统计'
+      }, {
+        path: '/message/message/detail',
+        component: () => import('./views/message/NoticeDetail.vue'),
+        name: '消息详情'
       }]
     },
     {

+ 22 - 29
src/views/Home.vue

@@ -44,8 +44,15 @@
 		font-weight: 400;
 		color: rgba(107,121,142,1);
 		line-height: 20px;
+		overflow: hidden;  
+      	display: -webkit-box;  
+     	-webkit-line-clamp: 2;
+     	-webkit-box-orient: vertical; 
 	}
 }
+.item:hover{
+	cursor: pointer;
+}
 
 </style>
 
@@ -53,8 +60,8 @@
 	<el-container>
 		<el-header>
 			<div class="header">
-				<img class="logo" src="../assets/logo.png" alt="">
-				<div class="siteTitle">中科院期刊微信公众号集中管理平台</div>
+				<!-- <img class="logo" src="../assets/logo.png" alt="">
+				<div class="siteTitle">中科院期刊微信公众号集中管理平台</div> -->
 			</div>	
 			<div class="nav">
 				<router-link v-for='(item,index) in inDate' :key='index' :class="item.act?'active':''" :to="item.to" @click.native='active(index)'>
@@ -62,7 +69,7 @@
 				</router-link>
 				<div class="setting">
 					<div style="display:inline-block;" @click="drawer=true">
-						<el-badge :value="12">
+						<el-badge :value="info.notices.length" v-if="info.notices.length">
 							<i class="el-icon-message-solid" style="font-size:22px;"></i>
 						</el-badge>
 					</div>
@@ -119,7 +126,8 @@
 			:visible.sync="drawer"
 			direction="rtl"
 			size="15%"
-			:before-close="handleClose">
+			:wrapperClosable="true"
+			>
 				<div style="position:relative;padding:10px 0px;">
 					<div class="notification-header notification-header-01" id="closeNotification" @click="drawer=false">
             			<i class="el-icon-arrow-right"></i>
@@ -127,25 +135,10 @@
 					<h3 class="notificationTitle">消息中心</h3>
 				</div>
 				<div class="nitification-container">
-					<div class="item">
-						<h4>消息标题</h4>
-						<p class="desc">消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容</p>
-					</div>
-					<div class="item">
-						<h4>消息标题</h4>
-						<p class="desc">消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容</p>
-					</div>
-					<div class="item">
-						<h4>消息标题</h4>
-						<p class="desc">消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容</p>
-					</div>
-					<div class="item">
-						<h4>消息标题</h4>
-						<p class="desc">消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容</p>
-					</div>
-					<div class="item">
-						<h4>消息标题</h4>
-						<p class="desc">消息内容消息内容消息内容消息内容消息内容消息内容消息内容消息内容</p>
+					<div class="item" v-for="(item,index) in info.notices" :key="index" @click='$router.push({path:"/message/message/detail",query:{id:item.id}})'>
+						<h4>{{item.name}}</h4>
+						<p v-html="item.content" class="desc">{{item.content}}</p>
+						<p style="font-size:12px;color: rgba(107,121,142,1);text-align:right;">{{item.ctime}}</p>
 					</div>
 				</div>
 			</el-drawer>
@@ -174,7 +167,7 @@ export default {
 			checkedCompany:'',
 			menuList:[],
 			path:'',
-			info:{},
+			info:{notices:[]},
 			community_list:[],
 			community:{},
 			menu:[],
@@ -222,13 +215,13 @@ export default {
 		},
 		initNav(){
 			let data = [
-				{ act: true, to: '/index/index', name: '首页' },
-				{ act: false, to: '/journal/journal', name: '群刊导览' },
+				// { act: true, to: '/index/index', name: '首页' },
+				// { act: false, to: '/journal/journal', name: '群刊导览' },
 				{ act: false, to: '/learning/activity', name: '学术交流' },
-				{ act: false, to: '/article/article', name: '精品导读' },
-				{ act: false, to: '/conference/conference', name: '会议系统' },
+				// { act: false, to: '/article/article', name: '精品导读' },
+				// { act: false, to: '/conference/conference', name: '会议系统' },
 				{ act: false, to: '/message/message', name: '信息管理' },
-				{ act: false, to: '/system/account', name: '系统管理' },
+				// { act: false, to: '/system/account', name: '系统管理' },
 			];
 			let mod = this.$route.path.split("/")[1];
 			this.$router.options.routes.forEach((element,i) => {

+ 0 - 2
src/views/article/AddArticle.vue

@@ -232,10 +232,8 @@
 </template>
 <script>
 
-import fuEditor from "../../components/fuEditor";
 export default {
   components: {
-    fuEditor
   },
   data() {
     return {

+ 5 - 4
src/views/message/Notice.vue

@@ -158,6 +158,9 @@ a {
         <el-table-column prop="ctime" label="发送时间"> </el-table-column>
         <el-table-column prop="zip" width="150" label="操作">
           <template slot-scope="scope">
+            <el-button class="edit" type="text" @click='$router.push({path:"/message/message/detail",query:{id:scope.row.id}})'
+              >查看</el-button
+            >
             <el-button class="edit" type="text" @click="edit(scope.row)"
               >编辑</el-button
             >
@@ -287,7 +290,7 @@ a {
               <span v-else>未阅读</span>
             </template>
           </el-table-column>
-          <el-table-column prop="post_time" label="查阅时间"> </el-table-column>
+          <el-table-column prop="ctime" label="查阅时间"> </el-table-column>
           <!-- <el-table-column prop="zip" width="80" label="操作">
             <template slot-scope="scope">
               <el-button class="edit" type="text" @click="showPostResult(scope.row)"
@@ -540,14 +543,12 @@ export default {
       this.$api.getNoticeInfo({ id: row.id,type:"edit" }).then((res) => {
         this.form1 = res.data.data;
         this.fileList = res.data.data.fileurl
+        console.log(this.fileList,222222222222)
         this.dialogTitle = "编辑消息";
         let receiver_ids = this.form1.receiver_id;
         if (typeof receiver_ids == "string") {
           receiver_ids = JSON.parse(receiver_ids);
         }
-        // receiver_ids.forEach((element,index) => {
-        //     receiver_ids[index] = parseInt(element)
-        // });
         this.form1.receiver_id = receiver_ids;
         this.dialogVisible = true;
       });

+ 53 - 0
src/views/message/NoticeDetail.vue

@@ -0,0 +1,53 @@
+<style lang="scss" scoped>
+  .el-row{
+    margin-bottom:20px;
+  }
+</style>
+<template>
+  <section>
+    <p><span>信息管理></span>消息详情</p>
+    <div class="content">
+        <el-row :gutter="10">
+          <el-col :span="1">标 题:</el-col>
+          <el-col :span="22">{{form.name}}</el-col>
+        </el-row>
+        <el-row :gutter="10">
+          <el-col :span="1">内 容:</el-col>
+          <el-col :span="22" v-html="form.content">{{form.content}}</el-col>
+        </el-row>
+        <el-row :gutter="10">
+          <el-col :span="1">附 件:</el-col>
+          <el-col :span="22">
+            <a style="margin-right:20px;" v-for="(item,index) in form.fileurl" :key="index" :href="item.url" target="__blank">{{item.name}}</a>
+          </el-col>
+        </el-row>
+        <el-row :gutter="10">
+          <el-col :span="1">时 间:</el-col>
+          <el-col :span="22">{{form.ctime}}</el-col>
+        </el-row>
+    </div>
+  </section>
+</template>
+<script>
+export default {
+  components: {
+  },
+  data() {
+    return {
+      form:{}
+    }
+  },
+  methods:{
+    getData(){
+      let _this = this;
+      let id = this.$route.query.id;
+      this.$api.getNoticeInfo({id:id}).then(res=>{
+        _this.form = res.data.data;
+      })
+    }
+  },
+  created() {
+    this.getData();
+  },
+};
+</script>