y595705120 1 rok temu
rodzic
commit
c9e4bf65a5

+ 4 - 1
src/App.vue

@@ -1,7 +1,10 @@
 <template>
   <div class="app">
     <div>
-        <router-view />
+        <keep-alive>
+          <router-view v-if="$route.meta.keepAlive"></router-view>
+        </keep-alive>
+        <router-view v-if="!$route.meta.keepAlive"></router-view>
     </div>
 
     <div class="p-wrap-full">

+ 5 - 0
src/assets/css/m-account.css

@@ -10,12 +10,17 @@
   box-sizing: content-box;
 }
 .m-account .account-tit a {
+  font-weight: 700;
   font-size: 16px;
   display: inline-block;
   line-height: 29px;
   margin-right: 30px;
   padding: 0 15px 5px;
 }
+.m-account .account-tit a.white {
+   color: white;
+}
+
 .m-account .account-tit a:hover {
   color: #3290d4;
   text-decoration: none;

+ 110 - 0
src/components/info/post.vue

@@ -0,0 +1,110 @@
+<template>
+  <div>
+    <h1 class="tc m20" style="font-size: 2rem; color: #000000;">
+      {{postInfo.title}}
+    </h1>
+    <div v-if="postInfo.postType=='交流互动'">
+      <div class="rsx-bg rsx-bg-pc mt20">
+        <p class="ldxx-tit">
+          <img src="../../../static/images/ask-icon.png" alt="">
+          <span class="barrier-free-text">来信详情</span>
+        </p>
+        <table class="xxdet_table xxdet_table1">
+          <tbody>
+            <tr>
+              <td class="info-t b-free-read-leaf">信件标题:</td>
+              <td colspan="3" ms-text="info.title">{{postInfo.title}}</td>
+            </tr>
+            <tr>
+              <td class="info-t b-free-read-leaf">姓  名:</td>
+              <td>{{postInfo.author}}</td>
+              <td class="info-t b-free-read-leaf">受理单位:</td>
+              <td class="b-free-read-leaf">福建鸿锵教育科技有限公司</td>
+            </tr>
+            <tr>
+              <td class="info-t b-free-read-leaf">信件类型:</td>
+              <td ms-text="info.chnlName">低压电工作业</td>
+              <td class="info-t b-free-read-leaf" tabindex="0" barrier-free-leaf-idx="54">来信时间:</td>
+              <td ms-text="info.postTime">{{postInfo.createTime}}</td>
+            </tr>
+            <tr>
+              <td class="info-t b-free-read-leaf">信件内容:</td>
+              <td colspan="3" ms-text="info.content">
+                <span v-html="postInfo.subTitle"></span>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </div>
+
+      <div class="rsx-bg rsx-bg-pc mt20">
+        <p class="ldxx-tit">
+          <img src="../../../static/images/reply-icon.png" alt="" barrier-free-idx="123">
+          <span class="barrier-free-text">回复详情</span>
+        </p>
+        <p v-if="!postInfo.content" class="tc mt30 fs32 red-r"> 等待回复中 </p>
+        <table v-else class="xxdet_table xxdet_table1">
+          <tbody>
+            <tr>
+              <td class="info-t b-free-read-leaf">回复单位:</td>
+              <td class="b-free-read-leaf">福建省住房和城乡建设厅</td>
+              <td class="info-t b-free-read-leaf">回复时间:</td>
+              <td>{{postInfo.replyTime}}</td>
+            </tr>
+            <tr barrier-free-idx="131">
+              <td class="info-t b-free-read-leaf" barrier-free-idx="132" tabindex="0" barrier-free-leaf-idx="59">回复内容:</td>
+              <td colspan="3">
+                <span v-html="postInfo.content"></span>
+              </td>
+            </tr>
+
+          </tbody>
+        </table>
+      </div>
+
+    </div>
+    <div v-else>
+      <h2 class="tc mt20" style="font-size: 30px;">
+        发布时间:{{postInfo.publishTime}}
+        <span class="ml30 ng-binding">来源:{{postInfo.author}}</span>
+        <span class="ml30 ng-binding">阅读数:{{postInfo.viewCount}}</span>
+      </h2>
+      <span v-html="postInfo.content" class="mt30 tl" style="margin-top: 1rem; margin-left: 1rem; white-space: pre-line;line-height: 2rem;"></span>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    props: ['postInfo']
+  }
+</script>
+
+<style>
+  .post-item .el-form-item__label{
+    color: #000000;
+  }
+  .ldxx-tit {
+      padding-bottom: 14px;
+      font-size: 20px;
+      font-weight: bold;
+      border-bottom: 3px #1658a0 solid;
+  }
+  .ldxx-tit img {
+      margin-right: 14px;
+  }
+  .xl-main .myzj_xl_tit {
+      margin-bottom: 10px;
+  }
+  .xxdet_table tbody tr td {
+      border-bottom: 1px #e8e8e8 solid;
+      padding: 18px 6px 18px 10px;
+      border-left: 1px #e8e8e8 solid;
+      line-height: 30px;
+  }
+  .xxdet_table tbody tr td.info-t {
+      width: 12%;
+      background: #f8f8f8;
+      text-align: right;
+  }
+</style>

+ 1 - 1
src/containers/center/class/train/index.vue

@@ -20,7 +20,7 @@
 
               <div class="hover-block">
                 <div class="mask-bg tc"></div>
-                <el-button @click="gotoPlay(item.courseId)" class="ui-btn">进入学习</el-button>
+                <el-button @click="gotoPlay(item.courseId)" class="ui-btn btn-o">进入学习</el-button>
               </div>
             </div>
 

+ 6 - 1
src/containers/center/components/menu/menu.js

@@ -6,7 +6,7 @@ const menu = [
    },
 	{
 	  path: '/center/setting',
-	  name: '账号设置',
+	  name: '档案中心',
 	  icon: 'ico-set'
 	},
    {
@@ -38,6 +38,11 @@ const menu = [
      path: '/center/myOrder',
      name: '我的订单',
      icon: 'ico-order'
+   },
+   {
+     path: '/center/message',
+     name: '交流互动',
+     icon: 'ico-news'
    }
  ]
 

+ 78 - 33
src/containers/center/message/index.vue

@@ -3,43 +3,39 @@
     <div class="right-block-bd">
 
       <div class="right mh500 mt30" v-if="isPost">
-        
          <div class="tr">
            <a class="ui-btn btn-gr btn-m" @click="isPost=false">
              返回</a>
         </div>
-        
-        <div class="m-notice-detail ">
-          <p class="fs18 tc bor-b mb30 pb20 pt20 b rel ng-binding">
-            {{info.title}}
-           </p>
-          <p class="notice-info tc ng-binding">
-            发布时间:{{info.publishTime}}
-            <span class="ml30 ng-binding">来源:{{info.author}}</span>
-            <span class="ml30 ng-binding">阅读数:{{info.viewCount}}</span>
-          </p>
-
-          <span v-html="info.content"></span>
-        </div>
+        <i-post-info :post-info="info" />
       </div>
 
       <div v-else class="ng-scope">
         <div class="m-account">
-          <div class="account-tit">
-            <a @click="type='通知'" :class="{'current':type=='通知'}"  href="javascript:void(0)">通知</a>
-            <a @click="type='常见问题'" :class="{'current':type=='常见问题'}"  href="javascript:void(0)">常见问题</a>
+          <div class="account-tit tr">
+            <el-button type="text" size="medium" icon="el-icon-plus" @click="addPost()"> 添加互动</el-button>
           </div>
         </div>
 
-        <ul class="m-notice ng-scope" v-for="item in list" :key="item.postId">
-          <li class="done">
-            <span class="p-ico2" style="top: -2px"></span>
-            <a href="javascript:void(0)" @click="gotoDetail(item.postId)" class="ng-binding">
-              {{item.title}}
-            </a>
-            <span class="time ng-binding">{{item.publishTime|dateformat}}</span>
-          </li>
-        </ul>
+        <el-table v-loading="listLoading" :data="list" border fit highlight-current-row>
+          <el-table-column label="互动流水号" prop="postId" width="100"/>
+          <el-table-column label="信件标题:" min-width="220">
+            <template slot-scope="{row}">
+              <el-button type="text" @click="gotoDetail(row.postId)">
+                {{row.title}}
+              </el-button>
+            </template>
+          </el-table-column>
+
+          <el-table-column label="信件状态:">
+            <template slot-scope="{row}">
+              <span>{{row.publishStatus|toStatus}}</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column label="发送时间" prop="createTime" />
+        </el-table>
+
         <el-pagination
           @current-change="handleCurrentChange"
           :current-page="page"
@@ -49,33 +45,70 @@
           :total="total">
         </el-pagination>
       </div>
-
     </div>
 
+    <el-dialog title="添加互动" center :visible.sync="dialogFormVisible" width="800px">
+    	<el-form :model="postForm" :rules="rules" label-width="100px" ref="elForm">
+    		<el-row>
+    			<el-col :span="24">
+    				<el-form-item label="信件标题" prop="title">
+    					<el-input v-model="postForm.title" type="text" class="user-form-item" clearable></el-input>
+    				</el-form-item>
+    			</el-col>
+
+          <el-col :span="24">
+          	<el-form-item label="信件内容" prop="subTitle">
+          		<el-input v-model="postForm.subTitle" type="textarea" class="user-form-item" clearable></el-input>
+          	</el-form-item>
+          </el-col>
+
+    		</el-row>
+
+    	</el-form>
+    	<div class="dialog-footer" slot="footer">
+    		<el-button @click="dialogFormVisible = false">取 消</el-button>
+    		<el-button @click="doAddPost" type="primary">确 定</el-button>
+    	</div>
+    </el-dialog>
+
   </div>
 </template>
 
-
 <script>
-    import {httpServer} from "@/components/httpServer/httpServer.js";
-    import {parseTime} from "@/utils/index.js";
+  const defForm= {
+    title:'',
+    subTitle:'',
+  }
+  import {httpServer} from "@/components/httpServer/httpServer.js";
+  import {parseTime} from "@/utils/index.js";
+  import IPostInfo from '@/components/info/post.vue'
   export default {
     name: 'cert',
+    components:{IPostInfo},
     data() {
       return {
         page: 1, //初始页
         size: 10, //    每页的数据
-        type:'通知',
+        type:'交流互动',
+        dialogFormVisible: false,
         isPost:false,
+        postForm: Object.assign( {}, defForm),
         info:{},
         list: [],
         total: 0,
-        listLoading: true
+        listLoading: true,
+        rules:{
+
+        }
       }
     },
     filters:{
       dateformat(val){
         return parseTime( +new Date(val), '{y}-{m}-{d}')
+      },
+      toStatus(val){
+        const status ={'edit':'等待回复', 'publish':'已回复', 'reply':'已回复'}
+        return status[val]||'处理中';
       }
     },
     beforeMount() {
@@ -92,7 +125,7 @@
         this.listLoading = true
         let page = this.page
         let type= this.type
-        httpServer("Course.getPostList", {page,type }).then( ({data, code}) => {
+        httpServer("Course.getUserPostList", {page,type }).then( ({data, code}) => {
           let { total, list } = data
           if (!list) list = [];
           this.list = list.map(v => {
@@ -103,6 +136,18 @@
           this.listLoading = false
         })
       },
+      addPost(){
+        this.postForm = Object.assign({}, defForm);
+        this.dialogFormVisible = true
+      },
+      doAddPost(){
+        let param = Object.assign({}, this.postForm);
+        httpServer("Course.addPostInfo", param).then(res=>{
+          this.$message.successMsg("添加成功")
+          this.dialogFormVisible = false
+          this.getList()
+        })
+      },
       gotoDetail(postId) {
         httpServer("Course.getPostInfo", {postId}).then(({
           data,

+ 128 - 0
src/containers/center/message/index.vue.bak

@@ -0,0 +1,128 @@
+<template>
+  <div class="m-right-block fr mh576" style="position: relative;">
+    <div class="right-block-bd">
+
+      <div class="right mh500 mt30" v-if="isPost">
+        
+         <div class="tr">
+           <a class="ui-btn btn-gr btn-m" @click="isPost=false">
+             返回</a>
+        </div>
+        
+        <div class="m-notice-detail ">
+          <p class="fs18 tc bor-b mb30 pb20 pt20 b rel ng-binding">
+            {{info.title}}
+           </p>
+          <p class="notice-info tc ng-binding">
+            发布时间:{{info.publishTime}}
+            <span class="ml30 ng-binding">来源:{{info.author}}</span>
+            <span class="ml30 ng-binding">阅读数:{{info.viewCount}}</span>
+          </p>
+
+          <span v-html="info.content"></span>
+        </div>
+      </div>
+
+      <div v-else class="ng-scope">
+        <div class="m-account">
+          <div class="account-tit">
+            <a @click="type='交流互动'" :class="{'current':type=='交流互动'}"  href="javascript:void(0)">交流互动</a>
+            <a @click="type='常见问题'" :class="{'current':type=='常见问题'}"  href="javascript:void(0)">常见问题</a>
+          </div>
+        </div>
+
+        <ul class="m-notice ng-scope" v-for="item in list" :key="item.postId">
+          <li class="done">
+            <span class="p-ico2" style="top: -2px"></span>
+            <a href="javascript:void(0)" @click="gotoDetail(item.postId)" class="ng-binding">
+              {{item.title}}
+            </a>
+            <span class="time ng-binding">{{item.publishTime|dateformat}}</span>
+          </li>
+        </ul>
+        <el-pagination
+          @current-change="handleCurrentChange"
+          :current-page="page"
+          :page-size="size"
+          layout="total, prev, pager, next"
+          class="m-pages"
+          :total="total">
+        </el-pagination>
+      </div>
+
+    </div>
+
+  </div>
+</template>
+
+
+<script>
+    import {httpServer} from "@/components/httpServer/httpServer.js";
+    import {parseTime} from "@/utils/index.js";
+  export default {
+    name: 'cert',
+    data() {
+      return {
+        page: 1, //初始页
+        size: 10, //    每页的数据
+        type:'通知',
+        isPost:false,
+        info:{},
+        list: [],
+        total: 0,
+        listLoading: true
+      }
+    },
+    filters:{
+      dateformat(val){
+        return parseTime( +new Date(val), '{y}-{m}-{d}')
+      }
+    },
+    beforeMount() {
+      this.getList()
+    },
+    watch: {
+      type(res) {
+        this.currentPage = 1
+        this.getList()
+      }
+    },
+    methods: {
+      getList() {
+        this.listLoading = true
+        let page = this.page
+        let type= this.type
+        httpServer("Course.getPostList", {page,type }).then( ({data, code}) => {
+          let { total, list } = data
+          if (!list) list = [];
+          this.list = list.map(v => {
+            this.$set(v, 'edit', false)
+            return v
+          })
+          this.total = total || 0;
+          this.listLoading = false
+        })
+      },
+      gotoDetail(postId) {
+        httpServer("Course.getPostInfo", {postId}).then(({
+          data,
+          code
+        }) => {
+          this.info = data
+          this.isPost = true
+          this.listLoading = false
+        })
+      },
+      handleCurrentChange: function(currentPage) {
+        this.page = currentPage;
+        this.getList()
+      }
+    }
+  }
+</script>
+
+<style>
+    @import url("./index.css");
+    @import url("../../../assets/css/m-account.css");
+    @import url("../../../assets/css/m-notice.css");
+</style>

+ 3 - 3
src/containers/center/setting/index.vue

@@ -4,7 +4,7 @@
       <div class="m-account">
         <div class="account-tit" style="height:30px">
           <a :class="{'current':show===1}" style="text-decoration: none;padding-bottom: 5px" @click="show=1" class="">基础资料</a>
-          <!-- <a :class="{'current':show===2}" style="text-decoration: none;padding-bottom: 5px" @click="show=2" class="">实名认证</a> -->
+          <a :class="{'current':show===2}" style="text-decoration: none;padding-bottom: 5px" @click="show=2" class="">实名认证</a>
           <a :class="{'current':show===3}" style="text-decoration: none;padding-bottom: 5px" @click="show=3" class="">额外信息</a>
           <!-- <a :class="{'current':show===4}" style="text-decoration: none;padding-bottom: 5px" @click="show=4" class="">密码修改</a> -->
           <!-- <a :class="{'current':show===5}" style="text-decoration: none;padding-bottom: 5px" @click="show=5" class="">手机修改</a> -->
@@ -58,10 +58,10 @@
                   <span class="p-ico2"></span>手机格式不对
                 </span>
               </li>
-              <!-- <li class="mt20">
+              <li class="mt20">
                 <span class="l-t"></span>
                 <el-button type="primary" class="confirm" @click="doSaveBaseInfo()">保 存</el-button>
-              </li> -->
+              </li>
             </ul>
 
           </form>

+ 89 - 0
src/containers/login/components/noticeList/index.vue

@@ -0,0 +1,89 @@
+<template>
+    <div>
+
+
+      <el-card class="training-category opacity-bg fl" style="border-radius: 20px;padding-top: -5px;">
+        <div class="m-account" style="color: white;font-size: 1.5rem;">
+          <div class="account-tit">
+            <a @click="type='文件通知'" class="white" :class="{'current':type=='文件通知'}"  href="javascript:void(0)">文件通知</a>
+            <a @click="type='交流互动'" class="white" :class="{'current':type=='交流互动'}"  href="javascript:void(0)">交流互动</a>
+            <a @click="type='远程教学'" class="white" :class="{'current':type=='远程教学'}"  href="javascript:void(0)">远程教学</a>
+          </div>
+        </div>
+
+        <el-table :data="postList" highlight-current-row :show-header="false" height="240px">
+          <el-table-column min-width="600px">
+            <template slot-scope="{row, $index}">
+              <a @click="gotoDetail(row.postId)">{{(page*size)-size+$index+1}}、{{ row.title }}</a>
+            </template>
+          </el-table-column>
+          <el-table-column width="160px">
+            <template slot-scope="{row}">
+              <span>{{ row.publishTime  }}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+        <el-pagination class="tc m-page" @current-change="handlePageChange" :current-page="page" :page-size="size"
+          layout="total, prev, pager, next" :total="total">
+        </el-pagination>
+
+      </el-card>
+    </div>
+</template>
+
+<script>
+  import { httpServer } from "@/components/httpServer/httpServer.js";
+  import { mapGetters,mapActions } from "vuex";
+  import settings from '@/settings';
+  export default {
+    data() {
+      return {
+        settings,
+        postList:[],
+        page:1,
+        size: 5,
+        total:0,
+        type:'文件通知',
+        loginDialog: false,
+        err: {},
+      };
+    },
+    created(){
+      this.getPostList()
+    },
+    computed: {
+    	...mapGetters("user", ["typeList", "userInfo"])
+    },
+    watch:{
+      type(){
+        this.page = 1
+        this.getPostList()
+      }
+    },
+    methods: {
+      ...mapActions("user", ["loadBaseInfo", "doLogout", "doLogin"]),
+      getPostList(){
+        let {page,size,type} = this;
+        let param = {page,size,type}
+        httpServer("course.getPostList", param).then( res=>{
+          if( res.code == 200){
+            this.postList = res.data.list
+            this.total = res.data.total;
+          }
+        })
+      },
+      gotoDetail(postId){
+        this.$router.push({name:'news', query:{postId}})
+      },
+      handlePageChange(page){
+        this.page = page;
+        this.getPostList()
+      }
+    }
+  }
+</script>
+
+<style>
+  @import url("../../../../assets/css/m-account.css");
+  @import url("../../../../assets/css/m-notice.css");
+</style>

+ 6 - 51
src/containers/login/login.vue

@@ -3,31 +3,9 @@
     <navbar :user="userInfo" @openLoginDialog="openLoginDialog"></navbar>
     <div class="banner-box">
       <div class="p-wrap-full clear pt30">
-        <el-card class="training-category opacity-bg fl" style="border-radius: 20px;padding-top: -5px;" >
-          <h2 align="center" style="background-color: white; color: #000000;padding-top:5px;">文件通知</h2>
-          <el-table :data="postList"  highlight-current-row
-          :show-header="false" height="240px" >
-            <el-table-column min-width="600px">
-              <template slot-scope="{row, $index}">
-                <span @click="gotoDetail(row.postId)">{{(page*size)-size+$index+1}}、{{ row.title }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column  width="160px">
-              <template slot-scope="{row}">
-                <span>{{ row.publishTime  }}</span>
-              </template>
-            </el-table-column>
-          </el-table>
-          <el-pagination class="tc m-page"
-            @current-change="handlePageChange"
-            :current-page="page"
-            :page-size="size"
-            layout="total, prev, pager, next"
-            :total="total">
-          </el-pagination>
-
-        </el-card>
-
+        <keep-alive>
+          <NoticeList/>
+        </keep-alive>
         <div class="m-login opacity-bg fr">
           <is-login v-if="loginOk" :user="userInfo" @logout="logout"></is-login>
           <un-login v-else @login="login" :err="err"></un-login>
@@ -86,8 +64,9 @@
 <script>
 import isLogin from "./components/isLogin.vue";
 import unLogin from "./components/unLogin.vue";
-import LearnTime from "./components/learnTime/learnTime.vue";
+import NoticeList from "./components/noticeList/index.vue";
 import navbar from "@/components/nav/navbar.vue";
+import LearnTime from "./components/learnTime/learnTime.vue";
 import Friendlink from "./components/friendlink/friendlink.vue";
 import { httpServer } from "@/components/httpServer/httpServer.js";
 import { mapGetters,mapActions } from "vuex";
@@ -96,6 +75,7 @@ import settings from '@/settings';
 export default {
   components: {
     LearnTime,
+    NoticeList,
     isLogin,
     unLogin,
     Friendlink,
@@ -120,15 +100,7 @@ export default {
   computed: {
   	...mapGetters("user", ["typeList", "userInfo"])
   },
-  // beforeMount(){
-  //    if( this.userInfo && this.userInfo.token){
-  //      this.loginOk = true
-  //    }else{
-  //      this.loginOk = false
-  //    }
-  // },
   created(){
-    this.getPostList()
     this.loginOk = false
     if( this.userInfo && this.userInfo.token && this.userInfo.uid){
       this.loadBaseInfo().then(res=>{
@@ -162,23 +134,6 @@ export default {
         }
       })
     },
-    getPostList(){
-      let {page,size} = this;
-      let param = {page,size,type:'操作指南'}
-      httpServer("course.getPostList", param).then( res=>{
-        if( res.code == 200){
-          this.postList = res.data.list
-          this.total = res.data.total;
-        }
-      })
-    },
-    handlePageChange(page){
-      this.page = page;
-      this.getPostList()
-    },
-    gotoDetail(postId){
-      this.$router.push({name:'news', query:{postId}})
-    },
     gotoCourse(item){
       if( item.link ){
         window.open(item.link)

+ 4 - 10
src/containers/post/info.vue

@@ -3,15 +3,7 @@
     <navbar :user="userInfo"></navbar>
     <div style="width: 1094px;background-color: white;margin: 0 auto; border-radius: 10px;">
       <div class="postDialog">
-        <h1 class="tc mt20" style="font-size: 50px; color: #000000;">
-        {{postInfo.title}}
-        </h1>
-        <h2 class="tc mt20" style="font-size: 30px;">
-          发布时间:{{postInfo.publishTime}}
-          <span class="ml30 ng-binding">来源:{{postInfo.author}}</span>
-          <span class="ml30 ng-binding">阅读数:{{postInfo.viewCount}}</span>
-        </h2>
-        <span v-html="postInfo.content" class="mt30 tl"></span>
+        <i-post-info :post-info="postInfo"></i-post-info>
       </div>
     </div>
   </div>
@@ -21,12 +13,14 @@
     httpServer
   } from "@/components/httpServer/httpServer.js";
   import navbar from "@/components/nav/navbar.vue";
+  import IPostInfo from "@/components/info/post.vue";
   import {
     mapGetters
   } from "vuex";
   export default {
     components: {
-      navbar
+      navbar,
+      IPostInfo
     },
     data() {
       return {

+ 3 - 0
src/router/index.js

@@ -49,6 +49,9 @@ export default new Router({
       path: '/',
       name: 'login',
       component: login,
+      meta:{
+        keepAlive: true
+      }
     },
     {
       path: '/register',

BIN
static/images/ask-icon.png


BIN
static/images/reply-icon.png