list-1.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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.type || '暂无' }}</span>
  12. </van-col>
  13. <van-col span="24" class="otherInfo">
  14. 申请状态:<span>{{ getStu(item.status) }}</span>
  15. </van-col>
  16. </van-col>
  17. <van-col span="24" class="btn">
  18. <van-button type="info" size="small" @click="toView(item)">详细信息</van-button>
  19. <template v-if="user.role == '1'">
  20. <van-button type="info" size="small" @click="download(item.agent_url)">申请文件</van-button>
  21. <van-button type="info" size="small" @click="toAccept(item)" v-if="item.status == '2' || item.status == '5'">受理</van-button>
  22. <van-button type="info" size="small" @click="gzjSubmit(item)" v-if="item.status == '6'">确认上传</van-button>
  23. </template>
  24. <template v-else-if="user.role == '2'">
  25. <van-button type="info" size="small" @click="download(item.check_url)">审查文件</van-button>
  26. <van-button type="info" size="small" @click="fileCheck(item)" v-if="item.status == '0'">文件审批</van-button>
  27. <van-button size="small" type="info" v-if="item.status == '7'" @click="toGzj(item)">国知局反馈信息</van-button>
  28. </template>
  29. <template v-else-if="user.role == '3'">
  30. <!-- <van-button size="small" type="info" v-if="item.status == '7'" @click="toGzj(item)">国知局反馈信息</van-button> -->
  31. <van-button type="info" size="small" @click="toResult(item)">审核结果</van-button>
  32. <van-button type="info" size="small" @click="toHeavy(item)" v-if="item.status == '-1'">重申</van-button>
  33. <van-button type="info" size="small" @click="selectMech(item)" v-if="item.status == '1' || item.status == '-4' || item.status == '-6'"
  34. >选择代理机构</van-button
  35. >
  36. </template>
  37. <template v-else-if="user.role == '4'">
  38. <van-button size="small" type="info" v-if="item.status == '7'" @click="toGzj(item)">国知局反馈信息</van-button>
  39. <!-- <van-button type="info" size="small" @click="toResult(item)">审核结果</van-button> -->
  40. <van-button type="info" size="small" @click="download(item.agent_url)">申请文件</van-button>
  41. <van-button type="info" size="small" @click="toAccept(item)" v-if="item.status == '3'">受理</van-button>
  42. <van-button type="info" size="small" @click="toOneself(item, '-5')" v-if="item.status == '4'">自行上报</van-button>
  43. <van-button type="info" size="small" @click="toOneself(item, '5')" v-if="item.status == '4'">科企上报</van-button>
  44. <van-button type="info" size="small" @click="toHeavy(item)" v-if="item.status == '-6'">重申</van-button>
  45. </template>
  46. </van-col>
  47. </van-col>
  48. </van-col>
  49. </van-row>
  50. </div>
  51. </template>
  52. <script>
  53. import { mapState, createNamespacedHelpers } from 'vuex';
  54. export default {
  55. name: 'list-1',
  56. props: {
  57. list: { type: Array },
  58. },
  59. components: {},
  60. data: function () {
  61. return {};
  62. },
  63. created() {},
  64. methods: {
  65. // 详细信息
  66. toView(data) {
  67. this.$emit('toView', data);
  68. },
  69. // 科企受理
  70. toAccept(data) {
  71. this.$emit('toAccept', data);
  72. },
  73. // 机构文件审批
  74. fileCheck(data) {
  75. this.$emit('fileCheck', data);
  76. },
  77. // 用户查看审核结果
  78. toResult(data) {
  79. this.$emit('toResult', data);
  80. },
  81. // 用户重申
  82. toHeavy(data) {
  83. this.$emit('toHeavy', data);
  84. },
  85. // 用户选择代理机构
  86. selectMech(data) {
  87. this.$emit('selectMech', data);
  88. },
  89. // 确认上传国知局
  90. gzjSubmit(data) {
  91. this.$emit('gzjSubmit', data);
  92. },
  93. // 代理机构自行上报
  94. toOneself(data, status) {
  95. this.$emit('toOneself', { data, status });
  96. },
  97. // 国知局反馈信息
  98. toGzj(data) {
  99. this.$emit('toGzj', data);
  100. },
  101. // 审查文件下载
  102. download(data) {
  103. if (data.length > 0) {
  104. let url = data.map((i) => i.url);
  105. window.location.href = `${process.env.VUE_APP_HOST}${url[0]}`;
  106. } else {
  107. this.$toast({ type: `fail`, message: `未上传文件` });
  108. }
  109. },
  110. // 整理状态
  111. getStu(status) {
  112. if (status == '0') return '待审中';
  113. else if (status == '1') return '机构审批通过';
  114. else if (status == '-1') return '机构审批未通过';
  115. else if (status == '2' || status == '3') return '已选机构,待受理';
  116. else if (status == '4') return '代理机构已受理';
  117. else if (status == '-4') return '代理机构拒绝受理';
  118. else if (status == '5') return '代理机构推送科企机构,待科企机构受理';
  119. else if (status == '-5') return '代理机构自行上报';
  120. else if (status == '6') return '机构已受理,待上报国知局';
  121. else if (status == '-6') return '机构未受理,请重新选择机构';
  122. else if (status == '7') return '已上报国知局';
  123. },
  124. },
  125. computed: {
  126. ...mapState(['user']),
  127. },
  128. metaInfo() {
  129. return { title: this.$route.meta.title };
  130. },
  131. watch: {
  132. test: {
  133. deep: true,
  134. immediate: true,
  135. handler(val) {},
  136. },
  137. },
  138. };
  139. </script>
  140. <style lang="less" scoped>
  141. .main {
  142. padding: 8px 8px 0 8px;
  143. .list {
  144. background-color: #fff;
  145. margin: 0 0 8px 0;
  146. padding: 8px;
  147. border-radius: 5px;
  148. .title {
  149. font-size: 16px;
  150. font-weight: bold;
  151. margin: 0 0 5px 0;
  152. }
  153. .other {
  154. margin: 0 0 5px 0;
  155. .otherInfo {
  156. font-size: 14px;
  157. color: #666;
  158. margin: 0 0 5px 0;
  159. span {
  160. color: #000;
  161. }
  162. }
  163. }
  164. .btn {
  165. text-align: center;
  166. .van-button {
  167. margin: 0 5px;
  168. }
  169. }
  170. }
  171. }
  172. </style>