list-1.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <div id="list-1">
  3. <van-row>
  4. <van-col span="24" class="main">
  5. <van-col span="24" class="list" v-for="(item, index) in list" :key="index">
  6. <van-col span="24" class="title textOver">
  7. {{ item.name }}
  8. </van-col>
  9. <van-col span="24" class="other">
  10. <van-col span="24" class="otherInfo">
  11. 申请人:<span>{{ item.apply_name || '暂无' }}</span>
  12. </van-col>
  13. <van-col span="24" class="otherInfo">
  14. 申请类型:<span>{{ item.type || '暂无' }}</span>
  15. </van-col>
  16. <van-col span="24" class="otherInfo">
  17. 申请状态:<span>{{ getStu(item.status) }}</span>
  18. </van-col>
  19. </van-col>
  20. <van-col span="24" class="btn">
  21. <van-button size="small" type="info" @click="view(item)">查看信息</van-button>
  22. <van-button size="small" type="info" @click="examine(item)" v-if="item.status == '0'">审核申请</van-button>
  23. <van-button size="small" type="info" @click="toFile(item)" v-if="item.status == '1' || item.status == '2'">报告文件</van-button>
  24. </van-col>
  25. </van-col>
  26. </van-col>
  27. </van-row>
  28. </div>
  29. </template>
  30. <script>
  31. import { mapState, createNamespacedHelpers } from 'vuex';
  32. export default {
  33. name: 'list-1',
  34. props: {
  35. list: { type: Array },
  36. },
  37. components: {},
  38. data: function () {
  39. return {};
  40. },
  41. created() {},
  42. methods: {
  43. view(data) {
  44. this.$emit('view', data);
  45. },
  46. examine(data) {
  47. this.$emit('examine', data);
  48. },
  49. toFile(data) {
  50. this.$emit('toFile', data);
  51. },
  52. // 整理状态
  53. getStu(status) {
  54. if (status == '0') return '已提交给相应机构,请等待审核';
  55. else if (status == '1') return '管理员审核通过,请及时发送相应文件!';
  56. else if (status == '-1') return '管理员审核未通过,请查看审核意见,并重新提交申请';
  57. else if (status == '2') return '文件已发送';
  58. },
  59. },
  60. computed: {
  61. ...mapState(['user']),
  62. },
  63. metaInfo() {
  64. return { title: this.$route.meta.title };
  65. },
  66. watch: {
  67. test: {
  68. deep: true,
  69. immediate: true,
  70. handler(val) {},
  71. },
  72. },
  73. };
  74. </script>
  75. <style lang="less" scoped>
  76. .main {
  77. padding: 8px 8px 0 8px;
  78. .list {
  79. background-color: #fff;
  80. margin: 0 0 8px 0;
  81. padding: 8px;
  82. border-radius: 5px;
  83. .title {
  84. font-size: 16px;
  85. font-weight: bold;
  86. margin: 0 0 5px 0;
  87. }
  88. .other {
  89. margin: 0 0 5px 0;
  90. .otherInfo {
  91. font-size: 14px;
  92. color: #666;
  93. margin: 0 0 5px 0;
  94. span {
  95. color: #000;
  96. }
  97. }
  98. }
  99. .btn {
  100. text-align: center;
  101. .van-button {
  102. margin: 0 5px;
  103. }
  104. }
  105. }
  106. }
  107. </style>