|
@@ -3,8 +3,15 @@
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="24" class="main">
|
|
<el-col :span="24" class="main">
|
|
<el-col :span="24" class="top">
|
|
<el-col :span="24" class="top">
|
|
- <el-button type="primary" size="mini" @click="back">返回</el-button>
|
|
|
|
- <el-button type="primary" size="mini" @click="add">添加专家</el-button>
|
|
|
|
|
|
+ <template v-if="view === 'list'">
|
|
|
|
+ <el-button type="primary" size="mini" @click="back">返回</el-button>
|
|
|
|
+ <el-button type="primary" size="mini" @click="add">添加专家</el-button>
|
|
|
|
+ <el-button type="success" size="mini" @click="view = 'pdf'">预览PDF</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="view === 'pdf'">
|
|
|
|
+ <el-button type="primary" size="mini" @click="view = 'list'">返回</el-button>
|
|
|
|
+ <el-button type="success" size="mini" @click="toPdf">生成PDF</el-button>
|
|
|
|
+ </template>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="down">
|
|
<el-col :span="24" class="down">
|
|
<data-table
|
|
<data-table
|
|
@@ -19,7 +26,9 @@
|
|
:useSum="true"
|
|
:useSum="true"
|
|
:sumcol="['verify.score']"
|
|
:sumcol="['verify.score']"
|
|
sumres="avg"
|
|
sumres="avg"
|
|
|
|
+ v-if="view === 'list'"
|
|
></data-table>
|
|
></data-table>
|
|
|
|
+ <listpdf :list="list" v-else></listpdf>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -40,6 +49,8 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
const _ = require('lodash');
|
|
const _ = require('lodash');
|
|
|
|
+import htmlToPdf from '@/unit/htmlToPdf.js';
|
|
|
|
+import listpdf from './parts/listpdf.vue';
|
|
import scoreInfo from './parts/scoreInfo.vue';
|
|
import scoreInfo from './parts/scoreInfo.vue';
|
|
import dataTable from '@common/src/components/frame/filter-page-table.vue';
|
|
import dataTable from '@common/src/components/frame/filter-page-table.vue';
|
|
import dataForm from '@common/src/components/frame/form.vue';
|
|
import dataForm from '@common/src/components/frame/form.vue';
|
|
@@ -56,6 +67,7 @@ export default {
|
|
dataTable,
|
|
dataTable,
|
|
dataForm,
|
|
dataForm,
|
|
scoreInfo,
|
|
scoreInfo,
|
|
|
|
+ listpdf,
|
|
},
|
|
},
|
|
data: function() {
|
|
data: function() {
|
|
return {
|
|
return {
|
|
@@ -95,6 +107,8 @@ export default {
|
|
scoreDialog: false,
|
|
scoreDialog: false,
|
|
info: {},
|
|
info: {},
|
|
expertList: [],
|
|
expertList: [],
|
|
|
|
+ // 当前视图
|
|
|
|
+ view: 'list',
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async created() {
|
|
async created() {
|
|
@@ -161,6 +175,9 @@ export default {
|
|
const res = await this.getExpert({ status: '0' });
|
|
const res = await this.getExpert({ status: '0' });
|
|
if (this.$checkRes(res)) this.$set(this, 'expertList', res.data);
|
|
if (this.$checkRes(res)) this.$set(this, 'expertList', res.data);
|
|
},
|
|
},
|
|
|
|
+ toPdf() {
|
|
|
|
+ htmlToPdf.downloadPDF(document.querySelector('#listpdf'), '专家意见');
|
|
|
|
+ },
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState(['user']),
|
|
...mapState(['user']),
|