Commit c689f47a by llj

feat:数字问卷任务记录pdf

1 parent fff0e692
......@@ -69,18 +69,7 @@
/>
</div>
</div>
<div>
<div class="block_box information" v-if="+projectType === 21">
<img :src="resData.channelInformation.picUrl" />
<div style="margin:10px">
<span>资讯标题:</span>
<strong>
{{ resData.channelInformation.title }}
</strong>
</div>
</div>
<div v-html="resData.channelInformation.content"></div>
</div>
<slot name="information"></slot>
<div v-for="(item, index) in resData.contentTitleList" :key="item.id">
<!-- 单选题/多选/投票题 -->
<div v-if="[1, 2, 3].includes(item.type)" class="question-item">
......
<!--
* @Description:
* @Date: 2022-03-23 16:47:37
-->
<template>
<div class="template-container">
<Header :from="from" :projectType="projectType" :resData="resData"></Header>
<component
:is="componentName"
:resData="resData"
:projectType="projectType"
>
<template v-slot:information>
<div>
<div class="block_box information" v-if="+projectType === 21">
<img :src="resData.channelInformation.picUrl" />
<div style="margin:10px">
<span>资讯标题:</span>
<strong>
{{ resData.channelInformation.title }}
</strong>
</div>
</div>
<div v-html="resData.channelInformation.content"></div>
</div>
</template>
</component>
<Footer></Footer>
</div>
</template>
<script>
import Footer from './components/footer.vue';
import Header from './components/header.vue';
import Configurable from './components/configurable.vue';
import { numQuestTaskInfo } from './api';
export default {
name: 'XrkTaskRecordPdf',
props: {
from: {
type: String,
default: '2'
},
projectType: {
type: [Number, String]
},
taskId: {
type: [String, Number],
default: ''
}
},
components: {
Footer,
Header,
Configurable
},
data() {
return {
resData: {},
componentName: 'Configurable'
};
},
created() {
numQuestTaskInfo({ taskId: this.taskId }).then(res => {
this.resData = res.data;
});
}
};
</script>
<style scoped>
@import url('./style/index.css');
.template-container {
text-align: left;
}
</style>
......@@ -18,7 +18,7 @@
import Footer from './components/footer.vue';
import Header from './components/header.vue';
import Configurable from './components/configurable.vue';
import { makeSceneTaskInfo, numQuestTaskInfo } from './api';
import { makeSceneTaskInfo } from './api';
export default {
name: 'XrkTaskRecordPdf',
props: {
......@@ -46,15 +46,9 @@ export default {
};
},
created() {
if ([20, 5].includes(this.projectType)) {
makeSceneTaskInfo({ taskId: this.taskId }).then(res => {
this.resData = res.data;
});
} else if ([21].includes(this.projectType)) {
numQuestTaskInfo({ taskId: this.taskId }).then(res => {
this.resData = res.data;
});
}
}
};
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!