detail.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <template>
  2. <div id="detail">
  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. <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @view="toView"></data-table>
  10. </el-col>
  11. </el-col>
  12. </el-row>
  13. <el-dialog class="dialog" title="意见详情" width="40%" :visible.sync="dialog" @closed="handleClose" :destroy-on-close="true">
  14. <el-col :span="24" class="one">
  15. <el-col :span="24" class="info">
  16. {{ form.desc }}
  17. </el-col>
  18. </el-col>
  19. </el-dialog>
  20. </div>
  21. </template>
  22. <script>
  23. import dataTable from '@common/src/components/frame/filter-page-table.vue';
  24. import { mapState, createNamespacedHelpers } from 'vuex';
  25. const { mapActions: verifyRecord } = createNamespacedHelpers('verifyRecord');
  26. export default {
  27. name: 'detail',
  28. props: {},
  29. components: {
  30. dataTable,
  31. },
  32. data: function() {
  33. return {
  34. opera: [
  35. {
  36. label: '意见查看',
  37. method: 'view',
  38. },
  39. {
  40. label: '专家意见查看',
  41. method: 'expertView',
  42. display: item => {
  43. return item.status == '-2' ? true : false;
  44. },
  45. },
  46. ],
  47. fields: [
  48. { label: '审核类型', prop: 'step', showTip: true },
  49. { label: '审核人', prop: 'verify', showTip: true },
  50. { label: '审核电话', prop: 'verify_phone', showTip: true },
  51. { label: '审核时间', prop: 'create_time', showTip: true },
  52. {
  53. label: '状态',
  54. prop: 'status',
  55. format: item => {
  56. return item === '0'
  57. ? '待审中'
  58. : item === '1'
  59. ? '初审通过'
  60. : item === '-1'
  61. ? '初审未通过'
  62. : item === '2'
  63. ? '评分通过'
  64. : item === '-2'
  65. ? '评分未通过'
  66. : '1';
  67. },
  68. },
  69. ],
  70. list: [],
  71. total: 0,
  72. // 意见详情
  73. dialog: false,
  74. form: {},
  75. };
  76. },
  77. async created() {
  78. await this.search();
  79. },
  80. methods: {
  81. ...verifyRecord(['query']),
  82. // 查询列表
  83. async search({ skip = 0, limit = 10, ...info } = {}) {
  84. const res = await this.query({ skip, limit, apply_id: this.id, ...info });
  85. if (this.$checkRes(res)) {
  86. this.$set(this, 'list', res.data);
  87. this.$set(this, `total`, res.total);
  88. }
  89. },
  90. // 意见查看
  91. toView({ data }) {
  92. this.$set(this, `form`, data);
  93. this.dialog = true;
  94. },
  95. // 取消查看
  96. handleClose() {
  97. this.form = {};
  98. this.dialog = false;
  99. },
  100. // 返回
  101. back() {
  102. this.$router.push({ path: '/updateApply' });
  103. },
  104. },
  105. computed: {
  106. ...mapState(['user']),
  107. id() {
  108. return this.$route.query.id;
  109. },
  110. },
  111. metaInfo() {
  112. return { title: this.$route.meta.title };
  113. },
  114. };
  115. </script>
  116. <style lang="less" scoped>
  117. .main {
  118. .top {
  119. text-align: right;
  120. margin: 0 0 10px 0;
  121. }
  122. }
  123. .dialog {
  124. /deep/.el-dialog__body {
  125. min-height: 330px;
  126. padding: 0px 0px 10px 20px;
  127. }
  128. .one {
  129. .text {
  130. font-size: 18px;
  131. font-weight: bold;
  132. margin: 0 0 5px 0;
  133. }
  134. .info {
  135. font-size: 16px;
  136. height: 325px;
  137. overflow-y: auto;
  138. line-height: 30px;
  139. }
  140. }
  141. }
  142. </style>