shenbao.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <template>
  2. <view>
  3. <view class="navbar">
  4. <view class="back">
  5. <text class="iconfont icon-fanhui " @click="backLast()"></text>
  6. </view>
  7. <text>提交申报</text>
  8. </view>
  9. <view class="shenbaoList">
  10. <view class="list_li" v-for="(item,index) in list" :key="index">
  11. <view class="title">{{item.name}}</view>
  12. <view class="li_bottom" v-if="item.is_one==1 && item.examine">
  13. <view>
  14. 状态:<text style="color: #19b83b;" v-if="item.examine.check_status==2">审核通过</text>
  15. <text style="color: #007AFF;" v-else-if="item.examine.check_status==1">待审核</text>
  16. <text style="color: red;" v-else>审核失败</text>
  17. </view>
  18. <view style="display: flex;align-items: center;justify-content: flex-end;"
  19. v-if="item.examine && item.examine.check_status==1">
  20. 得分:{{ item.examine ? item.examine.point : 0 }}
  21. </view>
  22. <view style="display: flex;align-items: center;justify-content: flex-end;"
  23. v-if="item.examine && item.examine.check_status==2">
  24. 得分:{{ item.examine ? item.examine.check_point : 0 }}
  25. </view>
  26. </view>
  27. <view class="li_bottom">
  28. <view>状态:{{item.examine ? '已申报' : '未申报'}}</view>
  29. <view style="display: flex;align-items: center;justify-content: flex-end;">
  30. <view v-if="is_open" class="button upload" @click="upload(item)">
  31. <text>上传</text>
  32. </view>
  33. <view class="button none" @click="detail(item)" v-if="item.examine" style="margin-left: 20upx;">
  34. <text>详情</text>
  35. </view>
  36. <view class="button none" @click="deletes(item)" v-if="item.is_one==1 && is_open && item.examine && item.examine.check_status==1 "
  37. style="background: red;margin-left: 20upx;">
  38. <text>删除</text>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. var app = getApp()
  48. import navBar from '../../components/navBar/navbar.vue';
  49. export default {
  50. components: {
  51. navBar
  52. },
  53. data() {
  54. return {
  55. list: [],
  56. show: false,
  57. uploadPdf: '',
  58. is_open: false, //是否再上传时间段
  59. };
  60. },
  61. onLoad() {
  62. },
  63. onShow() {
  64. this.getList()
  65. this.getSettings()
  66. },
  67. methods: {
  68. //获取配置项
  69. async getSettings() {
  70. let params = {
  71. keys: ["EMAMINE_START_TIME", "EMAMINE_END_TIME"]
  72. }
  73. app.request('/setting/keys', params, 'post').then(res => {
  74. let data = res.data.data
  75. console.log(data, "配置项----");
  76. let now_time = new Date().valueOf();
  77. let start_time = data.EMAMINE_START_TIME;
  78. start_time = new Date(start_time).valueOf();
  79. let end_time = data.EMAMINE_END_TIME;
  80. end_time = new Date(end_time).valueOf();
  81. console.log(end_time, "-----", start_time, "======", now_time);
  82. if (now_time >= start_time && now_time <= end_time) {
  83. this.is_open = true
  84. } else {
  85. this.is_open = false
  86. }
  87. console.log(now_time >= start_time, 'this.is_openthis.is_openthis.is_open', now_time <=
  88. end_time)
  89. })
  90. },
  91. getList() {
  92. app.request('/examine/lists', 'get').then(res => {
  93. console.log(res)
  94. this.list = res.data.data.examine
  95. })
  96. },
  97. backLast: function() {
  98. uni.reLaunch({
  99. url: './index'
  100. })
  101. },
  102. upload: function(item) {
  103. console.log(item)
  104. uni.navigateTo({
  105. url: './upload?id=' + item.id + '&verification=' + JSON.stringify(item.verification) +
  106. '&number=' + item.is_one + '&extra=' + JSON.stringify(item.extra)
  107. })
  108. },
  109. detail(item) {
  110. // this.show = true
  111. // var obj = e.examine.resources
  112. // var arr = Object.values(obj);
  113. // console.log(arr)
  114. // this.uploadPdf = arr[0]
  115. if (item.type == 1) {
  116. uni.navigateTo({
  117. url: './shenbaoDetail?id=' + item.id
  118. })
  119. } else {
  120. uni.navigateTo({
  121. url: './fileList?id=' + item.id
  122. })
  123. }
  124. },
  125. deletes(item) {
  126. var data = {
  127. examine_question_id: item.id,
  128. id: item.examine.id,
  129. staff_id: item.examine.staff.id
  130. }
  131. app.request('/examine/delete', data, 'post').then(res => {
  132. console.log(res)
  133. uni.showToast({
  134. title: '删除成功',
  135. icon: 'none'
  136. })
  137. this.getList()
  138. })
  139. },
  140. }
  141. }
  142. </script>
  143. <style lang="scss">
  144. page {
  145. background: #f5f5f5;
  146. }
  147. .iframe {
  148. width: 100%;
  149. height: 100%;
  150. position: fixed;
  151. z-index: 222;
  152. top: 0;
  153. left: 0;
  154. }
  155. .title {
  156. font-size: 16px;
  157. font-weight: 550;
  158. color: #4d4d4d;
  159. border-bottom: dashed 1px #EFF1F6;
  160. padding-bottom: 10px;
  161. }
  162. .navbar {
  163. font-size: 32upx;
  164. height: 100upx;
  165. line-height: 100upx;
  166. color: #888888;
  167. position: relative;
  168. position: fixed;
  169. top: 0;
  170. z-index: 9999999;
  171. width: 100%;
  172. background-color: #FFFFFF;
  173. text-align: center;
  174. border-bottom: solid 2upx #EFF1F6;
  175. .back {
  176. height: 100upx;
  177. width: 100upx;
  178. text-align: center;
  179. // background-color: #007AFF;
  180. position: absolute;
  181. float: left;
  182. left: 0upx;
  183. font-size: 32upx;
  184. }
  185. }
  186. .shenbaoList {
  187. padding-top: 100upx;
  188. display: flex;
  189. flex-direction: column;
  190. width: 100%;
  191. align-items: center;
  192. .list_li {
  193. display: flex;
  194. flex-direction: column;
  195. width: 90%;
  196. margin-top: 20upx;
  197. padding: 20upx;
  198. font-size: 26upx;
  199. background: white;
  200. .text1 {
  201. padding-top: 10upx;
  202. }
  203. .li_bottom {
  204. display: flex;
  205. padding-top: 10px;
  206. align-items: center;
  207. justify-content: space-between;
  208. // padding-top: 10upx;
  209. .button {
  210. border-radius: 3px;
  211. }
  212. .none {
  213. background: #1c85f1;
  214. color: white;
  215. display: flex;
  216. align-items: center;
  217. justify-content: center;
  218. padding: 8upx 15upx;
  219. }
  220. .upload {
  221. background: #19b83b;
  222. color: white;
  223. display: flex;
  224. align-items: center;
  225. justify-content: center;
  226. padding: 8upx 15upx;
  227. }
  228. }
  229. }
  230. }
  231. </style>