index.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <div id="index">
  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" @view="toView"></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. export default {
  16. metaInfo() {
  17. return { title: this.$route.meta.title };
  18. },
  19. name: 'index',
  20. props: {},
  21. components: {
  22. dataTable,
  23. },
  24. data: function() {
  25. return {
  26. opera: [
  27. {
  28. label: '资料查看',
  29. method: 'view',
  30. },
  31. ],
  32. fields: [
  33. { label: '成果编号', prop: 'basic.achieve_num', filter: 'input', showTip: true },
  34. { label: '成果名称', prop: 'basic.achieve_name', showTip: true },
  35. { label: '成果类别', prop: 'basic.achieve_type', showTip: true },
  36. { label: '状态', prop: 'status' },
  37. ],
  38. list: [
  39. {
  40. basic: {
  41. achieve_num: '成果编号',
  42. achieve_name: '成果名称',
  43. achieve_type: '成果类别',
  44. },
  45. status: '0',
  46. },
  47. ],
  48. total: 0,
  49. };
  50. },
  51. async created() {
  52. await this.search();
  53. },
  54. methods: {
  55. // 查询列表
  56. async search({ skip = 0, limit = 10, ...info } = {}) {},
  57. // 资料审核
  58. toView({ data }) {
  59. this.$router.push({ path: '/adminPerfect/detail', query: { id: data.id } });
  60. },
  61. },
  62. computed: {
  63. ...mapState(['user']),
  64. },
  65. watch: {},
  66. };
  67. </script>
  68. <style lang="less" scoped></style>