expertExam.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <div id="expertExam">
  3. <el-row>
  4. <el-col :span="24" class="main">
  5. <el-col :span="24" class="down">
  6. <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search"></data-table>
  7. </el-col>
  8. </el-col>
  9. </el-row>
  10. </div>
  11. </template>
  12. <script>
  13. import dataTable from '@common/src/components/frame/filter-page-table.vue';
  14. import { mapState, createNamespacedHelpers } from 'vuex';
  15. const { mapActions: achieveApply } = createNamespacedHelpers('achieveApply');
  16. export default {
  17. name: 'expertExam',
  18. props: {},
  19. components: { dataTable },
  20. data: function() {
  21. return {
  22. opera: [],
  23. fields: [
  24. { label: '成果编号', prop: 'basic.achieve_num', filter: 'input', showTip: true },
  25. { label: '成果名称', prop: 'basic.achieve_name', showTip: true },
  26. { label: '成果类别', prop: 'basic.achieve_type', showTip: true },
  27. {
  28. label: '状态',
  29. prop: 'status',
  30. format: item => {
  31. return item === '1' ? '待专家评分' : '未识别';
  32. },
  33. },
  34. ],
  35. list: [],
  36. total: 0,
  37. };
  38. },
  39. async created() {
  40. await this.search();
  41. },
  42. methods: {
  43. ...achieveApply(['query']),
  44. // 查询列表
  45. async search({ skip = 0, limit = 10, ...info } = {}) {
  46. const res = await this.query({ skip, limit, status: 1, user_id: this.user.id, ...info });
  47. if (this.$checkRes(res)) {
  48. this.$set(this, 'list', res.data);
  49. this.$set(this, `total`, res.total);
  50. }
  51. },
  52. },
  53. computed: {
  54. ...mapState(['user']),
  55. pageTitle() {
  56. return `${this.$route.meta.title}`;
  57. },
  58. },
  59. metaInfo() {
  60. return { title: this.$route.meta.title };
  61. },
  62. };
  63. </script>
  64. <style lang="less" scoped></style>