detail.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. fields: [
  41. { label: '审核类型', prop: 'step', showTip: true },
  42. { label: '审核人', prop: 'verify', showTip: true },
  43. { label: '审核电话', prop: 'verify_phone', showTip: true },
  44. { label: '审核时间', prop: 'create_time', showTip: true },
  45. {
  46. label: '状态',
  47. prop: 'status',
  48. format: item => {
  49. return item === '0'
  50. ? '待审中'
  51. : item === '1'
  52. ? '初审通过'
  53. : item === '-1'
  54. ? '初审未通过'
  55. : item === '2'
  56. ? '评分通过'
  57. : item === '-2'
  58. ? '评分未通过'
  59. : '1';
  60. },
  61. },
  62. ],
  63. list: [],
  64. total: 0,
  65. // 意见详情
  66. dialog: false,
  67. form: {},
  68. };
  69. },
  70. async created() {
  71. await this.search();
  72. },
  73. methods: {
  74. ...verifyRecord(['query']),
  75. // 查询列表
  76. async search({ skip = 0, limit = 10, ...info } = {}) {
  77. const res = await this.query({ skip, limit, apply_id: this.id, ...info, step: '评分' });
  78. if (this.$checkRes(res)) {
  79. this.$set(this, 'list', res.data);
  80. this.$set(this, `total`, res.total);
  81. }
  82. },
  83. // 意见查看
  84. toView({ data }) {
  85. this.$set(this, `form`, data);
  86. this.dialog = true;
  87. },
  88. // 取消查看
  89. handleClose() {
  90. this.form = {};
  91. this.dialog = false;
  92. },
  93. // 返回
  94. back() {
  95. this.$router.push({ path: '/noExpertScore' });
  96. },
  97. },
  98. computed: {
  99. ...mapState(['user']),
  100. id() {
  101. return this.$route.query.id;
  102. },
  103. },
  104. metaInfo() {
  105. return { title: this.$route.meta.title };
  106. },
  107. };
  108. </script>
  109. <style lang="less" scoped>
  110. .main {
  111. .top {
  112. text-align: right;
  113. margin: 0 0 10px 0;
  114. }
  115. }
  116. .dialog {
  117. /deep/.el-dialog__body {
  118. min-height: 330px;
  119. padding: 0px 0px 10px 20px;
  120. }
  121. .one {
  122. .text {
  123. font-size: 18px;
  124. font-weight: bold;
  125. margin: 0 0 5px 0;
  126. }
  127. .info {
  128. font-size: 16px;
  129. height: 325px;
  130. overflow-y: auto;
  131. line-height: 30px;
  132. }
  133. }
  134. }
  135. </style>