digital-questionnaire.vue 2.06 KB
<!--
 * @Description: 
 * @Date: 2022-03-23 16:47:37
-->
<template>
  <div class="template-container">
    <Header :from="from" :projectType="projectType" :resData="resData"></Header>
    <Configurable :resData="resData" :projectType="projectType">
      <template v-slot:information>
        <div>
          <!-- <div class="information">
            <img :src="resData.channelInformation.picUrl" />
            <div style="margin:10px">
              <span>资讯标题:</span>
              <strong>
                {{ resData.channelInformation.title }}
              </strong>
            </div>
          </div> -->
          <div
            class="information-content"
            v-html="resData.channelInformation.content"
          ></div>
        </div>
      </template>
    </Configurable>
    <Footer></Footer>
  </div>
</template>

<script>
import Footer from '../components/base/footer.vue';
import Header from '../components/base/header.vue';
import Configurable from '../components/base/configurable.vue';
import { numQuestTaskInfo } from '../api';
export default {
  name: 'digital-questionnaire',
  props: {
    from: {
      type: String,
      default: '2'
    },
    projectType: {
      type: [Number, String]
    },
    taskId: {
      type: [String, Number],
      default: ''
    }
  },
  components: {
    Footer,
    Header,
    Configurable
  },
  data() {
    return {
      resData: {}
    };
  },
  created() {
    numQuestTaskInfo({ taskId: this.taskId }).then(res => {
      this.resData = res.data;
    });
  }
};
</script>

<style scoped lang="scss">
@import url('../style/index.css');
.template-container {
  text-align: left;
}
.information {
  display: flex;
  align-items: center;
  margin: 15px;
  img {
    width: 300px;
    height: 150px;
  }
  &-content {
    margin: 0 auto;
    width: 1000px;
    video {
      width: 100%;
      object-fit: contain;
      height: 100%;
    }
  }
}
</style>
<style lang="scss">
.information-content {
  img {
    width: 1000px;
    object-fit: contain;
    height: 100%;
  }
  p {
    line-height: 1.5 !important;
  }
}
</style>