|
@@ -3,9 +3,22 @@
|
|
|
<navbar :user="userInfo" @openLoginDialog="openLoginDialog"></navbar>
|
|
|
<div class="banner-box">
|
|
|
<div class="p-wrap-full clear pt30">
|
|
|
- <div class="training-category opacity-bg fl ">
|
|
|
- <img alt="" class="mimg" src="/static/swiper/1.jpg"/>
|
|
|
- </div>
|
|
|
+ <el-card class="training-category opacity-bg fl" style="border-radius: 20px;" >
|
|
|
+ <!-- <img alt="" class="mimg" src="/static/swiper/1.jpg"/> -->
|
|
|
+ <h1 align="center" style="background-color: white; color: #000000; padding-top: 10px;">文件通知</h1>
|
|
|
+ <el-table :data="postList" highlight-current-row :show-header="false" max-height="300px" >
|
|
|
+ <el-table-column label="Id" min-width="600px">
|
|
|
+ <template slot-scope="{row, $index}">
|
|
|
+ <span @click="gotoDetail(row.postId)">{{$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-card>
|
|
|
|
|
|
<div class="m-login opacity-bg fr">
|
|
|
<is-login v-if="loginOk" :user="userInfo" @logout="logout"></is-login>
|
|
@@ -52,6 +65,26 @@
|
|
|
<un-login @login="login" :err="err"></un-login>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ class="fc tc"
|
|
|
+ :visible.sync="postDialog"
|
|
|
+ :fullscreen="true"
|
|
|
+ style="padding:0px;"
|
|
|
+ @close="closeDialog"
|
|
|
+ >
|
|
|
+ <div class="postDialog">
|
|
|
+ <p class="tc" style="font-size: 50px;">{{postInfo.title}}</p>
|
|
|
+ <p 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>
|
|
|
+ </p>
|
|
|
+ <span v-html="postInfo.content" style="padding-top: -50px;"></span>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -79,6 +112,9 @@ export default {
|
|
|
userName: "",
|
|
|
idNum: "",
|
|
|
},
|
|
|
+ postInfo:{},
|
|
|
+ postDialog:false,
|
|
|
+ postList:[],
|
|
|
loginDialog: false,
|
|
|
err: {},
|
|
|
};
|
|
@@ -87,13 +123,15 @@ export default {
|
|
|
...mapGetters("user", ["typeList", "userInfo"])
|
|
|
},
|
|
|
beforeMount(){
|
|
|
- console.log("beforeMount", this.userInfo )
|
|
|
if( this.userInfo && this.userInfo.token){
|
|
|
this.loginOk = true
|
|
|
}else{
|
|
|
this.loginOk = false
|
|
|
}
|
|
|
},
|
|
|
+ created(){
|
|
|
+ this.getPostList()
|
|
|
+ },
|
|
|
methods: {
|
|
|
...mapActions("user", ["loadBaseInfo", "doLogout", "doLogin"]),
|
|
|
logout() {
|
|
@@ -113,6 +151,21 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ getPostList(){
|
|
|
+ httpServer("course.getPostList", {page:1,type:'操作指南'}).then( res=>{
|
|
|
+ this.postList = res.data.list.splice(0,5)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ gotoDetail(postId){
|
|
|
+ httpServer("Course.getPostInfo", {postId}).then(({
|
|
|
+ data,
|
|
|
+ code
|
|
|
+ }) => {
|
|
|
+ this.postInfo = data
|
|
|
+ this.postDialog = true
|
|
|
+ })
|
|
|
+ // window.open(`https://oa.hqedust.com/#/file-info?articalId=${postId}`, '_brank')
|
|
|
+ },
|
|
|
gotoCourse(item){
|
|
|
if ( !localStorage.token ) {
|
|
|
this.$message.successMsg("请先登入", 1)
|