|
@@ -0,0 +1,115 @@
|
|
|
+<template>
|
|
|
+ <div id="unscramble-detail">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" class="main">
|
|
|
+ <el-col :span="24" class="top">
|
|
|
+ <top topType="2" @back="$router.go(-1)" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="info" :style="{ height: clientHeight + 'px' }">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" style="text-align: center">
|
|
|
+ <h2>{{ d.title }}</h2>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row type="flex" align="middle" justify="space-between">
|
|
|
+ <el-col :span="12">
|
|
|
+ <span style="font-size: 14px; color: #666">发布时间:{{ d.publish_time }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" style="text-align: right">
|
|
|
+ <span style="font-size: 14px; color: #666">信息来源:{{ d.origin }}</span>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="margin-top: 20px">
|
|
|
+ <el-col :span="24" v-if="d.picture">
|
|
|
+ <el-image :src="d.picture" style="height: 200px" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" v-if="d.video">
|
|
|
+ <video :src="d.video" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="content" v-html="d.content"></el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="margin-top: 20px" v-if="d.filepath">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-link :href="d.filepath" type="primary">点击下载附件</el-link>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import top from '@/layout/common/top.vue';
|
|
|
+import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: news } = createNamespacedHelpers('news');
|
|
|
+export default {
|
|
|
+ name: 'unscramble-detail',
|
|
|
+ props: {},
|
|
|
+ components: {
|
|
|
+ top,
|
|
|
+ },
|
|
|
+ data: function () {
|
|
|
+ return {
|
|
|
+ clientHeight: '',
|
|
|
+ d: {},
|
|
|
+ };
|
|
|
+ },
|
|
|
+ async created() {
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ let clientHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 50;
|
|
|
+ this.$set(this, `clientHeight`, clientHeight);
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...news(['fetch']),
|
|
|
+ async search() {
|
|
|
+ const res = await this.fetch(this.id);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `d`, res.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ id() {
|
|
|
+ return this.$route.query.id;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.main {
|
|
|
+ .top {
|
|
|
+ height: 40px;
|
|
|
+ overflow: hidden;
|
|
|
+ border-bottom: 1px solid #f9f9f9;
|
|
|
+ }
|
|
|
+ .info {
|
|
|
+ overflow-x: hidden;
|
|
|
+ overflow-y: auto;
|
|
|
+ padding: 10px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+ .foot {
|
|
|
+ height: 50px;
|
|
|
+ overflow: hidden;
|
|
|
+ border-top: 1px solid #f9f9f9;
|
|
|
+ }
|
|
|
+ h2 {
|
|
|
+ font-size: 18px;
|
|
|
+ margin: 10px 0;
|
|
|
+ }
|
|
|
+ /deep/.content {
|
|
|
+ table {
|
|
|
+ float: left;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|