dataInfo.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <div id="dataInfo">
  3. <el-row>
  4. <el-col :span="24" class="main">
  5. <el-col :span="24" class="top">
  6. <el-button type="primary" size="mini" @click="back">返回</el-button>
  7. </el-col>
  8. <el-col :span="24" class="down">
  9. <el-tabs v-model="active" type="card">
  10. <el-tab-pane label="(一)基本信息" name="first">
  11. <basic :info="form.basic"></basic>
  12. </el-tab-pane>
  13. <el-tab-pane label="(二)内容简介" name="second">
  14. <brief :info="form.brief"></brief>
  15. </el-tab-pane>
  16. <el-tab-pane label="(三)主研人员名单" name="third">
  17. <research :list="form.research"></research>
  18. </el-tab-pane>
  19. <el-tab-pane label="(四)评价委托方提供资料清单" name="fourth">
  20. <detailed :linkInfo="form.datalist"></detailed>
  21. </el-tab-pane>
  22. </el-tabs>
  23. </el-col>
  24. </el-col>
  25. </el-row>
  26. </div>
  27. </template>
  28. <script>
  29. import basic from './parts/basic.vue';
  30. import brief from './parts/brief.vue';
  31. import research from './parts/research.vue';
  32. import detailed from './parts/detailed.vue';
  33. import { mapState, createNamespacedHelpers } from 'vuex';
  34. const { mapActions: achieveApply } = createNamespacedHelpers('achieveApply');
  35. const { mapActions: verifyRecord } = createNamespacedHelpers('verifyRecord');
  36. export default {
  37. metaInfo() {
  38. return { title: this.$route.meta.title };
  39. },
  40. name: 'dataInfo',
  41. props: {},
  42. components: {
  43. basic,
  44. brief,
  45. research,
  46. detailed,
  47. },
  48. data: function() {
  49. return {
  50. // 标签
  51. active: 'first',
  52. form: {
  53. basic: {},
  54. brief: {},
  55. research: [],
  56. datalist: {},
  57. },
  58. };
  59. },
  60. created() {
  61. if (this.id) this.search();
  62. },
  63. methods: {
  64. ...achieveApply(['fetch']),
  65. async search() {
  66. const res = await this.fetch(this.id);
  67. if (this.$checkRes(res)) {
  68. console.log(res.data);
  69. this.$set(this, 'form', res.data);
  70. }
  71. },
  72. // 返回
  73. back() {
  74. window.history.back();
  75. },
  76. },
  77. computed: {
  78. ...mapState(['user']),
  79. id() {
  80. return this.$route.query.id;
  81. },
  82. },
  83. watch: {},
  84. };
  85. </script>
  86. <style lang="less" scoped>
  87. .main {
  88. .top {
  89. margin: 0 0 10px 0;
  90. text-align: right;
  91. }
  92. .down {
  93. .fiveth {
  94. padding: 0 20%;
  95. .btn {
  96. text-align: center;
  97. }
  98. }
  99. }
  100. }
  101. </style>