view.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. <template>
  2. <view class="container main">
  3. <view class="one">
  4. <view class="text">参赛结果信息</view>
  5. <view class="list">
  6. <view class="value">
  7. <view class="title">编号:</view>
  8. <view class="label"> <text :user-select="true">{{info.no||'暂无'}}</text> </view>
  9. </view>
  10. <view class="value">
  11. <view class="title">报名时间:</view>
  12. <view class="label">{{info.time||'暂无'}}</view>
  13. </view>
  14. <view class="value" v-if="info.start_time">
  15. <view class="title">初审时间:</view>
  16. <view class="label">{{info.start_time||'暂无'}}</view>
  17. </view>
  18. <view class="value" v-if="info.score">
  19. <view class="title">初审分数:</view>
  20. <view class="label">{{info.score||'暂无'}}</view>
  21. </view>
  22. <view class="value" v-if="info.final_start_time">
  23. <view class="title">决赛时间:</view>
  24. <view class="label">{{info.final_start_time||'暂无'}}</view>
  25. </view>
  26. <view class="value" v-if="info.final_score">
  27. <view class="title">决赛分数:</view>
  28. <view class="label">{{info.final_score||'暂无'}}</view>
  29. </view>
  30. <view class="value">
  31. <view class="title">是否进入决赛:</view>
  32. <view class="label">{{getDict(info,'final_confirm')||'暂无'}}</view>
  33. </view>
  34. <view class="value" v-if="info.last_order_no">
  35. <view class="title">最后名次:</view>
  36. <view class="label">{{info.last_order_no||'暂无'}}</view>
  37. </view>
  38. <view class="value">
  39. <view class="title">流程状态:</view>
  40. <view class="label">{{getDict(info,'ext_status')||'暂无'}}</view>
  41. </view>
  42. <view class="value">
  43. <view class="title">状态:</view>
  44. <view class="label">{{getDict(info,'status')||'暂无'}}</view>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="one">
  49. <view class="text">项目详情信息</view>
  50. <view class="list" v-for="(item, index) in investigate" :key="index">
  51. <view class="value_1">
  52. <view class="title">{{item.problem}}:</view>
  53. <view class="label"
  54. v-if="item.type == '0' || item.type == '2' || item.type == '3' || item.type == '4' || item.type == '5'">
  55. {{item.reply||'暂无'}}
  56. </view>
  57. <view class="label" v-if="item.type == '1' && item.reply">
  58. {{ item.reply.join(',')||'暂无' }}
  59. </view>
  60. <view class="label" v-if="item.type == '6'">
  61. <div v-for="(as, img) in item.reply" :key="img">
  62. <uni-link :href="getUrl(as)" color="#007BFF">{{ as.name }}</uni-link>
  63. </div>
  64. </view>
  65. <view class="label" v-if="item.type == '7'">
  66. <div class="arr">
  67. <div v-for="(aa, ina) in item.answer" :key="ina" class="name">{{ aa.text }}</div>
  68. </div>
  69. <div class="arr" v-for="(gg, inx) in item.reply" :key="inx">
  70. <div v-for="(aa, ina) in item.answer" :key="ina" class="input">
  71. {{ gg[aa.text] }}
  72. </div>
  73. </div>
  74. </view>
  75. <view class="label" v-if="item.type == '8'">
  76. <div v-for="(as, img) in item.answer" :key="img">
  77. <uni-link :href="getUrl(as)" color="#007BFF">{{ as.name }}</uni-link>
  78. </div>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. </template>
  85. <script>
  86. import upload from '../../components/upload/index.vue';
  87. import moment from 'moment';
  88. export default {
  89. components: {
  90. upload
  91. },
  92. data() {
  93. return {
  94. id: '',
  95. user: {},
  96. info: {},
  97. investigate: [],
  98. statusList: [{
  99. value: '0',
  100. label: '待审核'
  101. }, {
  102. value: '1',
  103. label: '已通过'
  104. },
  105. {
  106. value: '-1',
  107. label: '已退回'
  108. }
  109. ],
  110. isList: [{
  111. value: '0',
  112. label: '是'
  113. }, {
  114. value: '1',
  115. label: '否'
  116. }],
  117. extList: [],
  118. }
  119. },
  120. onLoad: async function(e) {
  121. const that = this;
  122. that.$set(that, `id`, e && e.id || '');
  123. await that.searchToken();
  124. await that.searchOther();
  125. await that.search();
  126. },
  127. methods: {
  128. // 用户信息
  129. searchToken() {
  130. const that = this;
  131. try {
  132. const res = uni.getStorageSync('token');
  133. if (res) {
  134. const user = that.$jwt(res);
  135. that.$set(that, `user`, user);
  136. }
  137. } catch (e) {}
  138. },
  139. async searchOther() {
  140. const that = this;
  141. let res;
  142. // 查询证件类型
  143. res = await that.$api(`/dictData`, 'GET', {
  144. code: 'extStatus',
  145. is_use: '0',
  146. })
  147. if (res.errcode == '0') {
  148. that.$set(that, `extList`, res.data)
  149. }
  150. },
  151. // 查询
  152. async search() {
  153. const that = this;
  154. if (that.id) {
  155. let res;
  156. res = await that.$api(`/matchReg/${that.id}`, 'GET', {})
  157. if (res.errcode == '0') {
  158. that.$set(that, `info`, res.data)
  159. if (res.data.info && res.data.info.length > 0) {
  160. for (let val of res.data.info) {
  161. if (val.type == '2') {
  162. for (let s of val.answer) {
  163. s.value = s.text
  164. }
  165. }
  166. }
  167. that.$set(that, `investigate`, res.data.info)
  168. }
  169. } else {
  170. uni.showToast({
  171. title: res.errmsg,
  172. icon: 'none'
  173. });
  174. }
  175. }
  176. },
  177. // 图片处理
  178. getUrl(e) {
  179. const that = this;
  180. if (e && e.length > 0) return that.$config.serverFile + e.uri
  181. },
  182. // 处理字典表
  183. getDict(item, model) {
  184. if (item) {
  185. const that = this;
  186. let res;
  187. if (model == 'status') res = that.statusList.find(i => i.value == item.status)
  188. if (model == 'ext_status') res = that.extList.find(i => i.value == item.ext_status)
  189. if (model == 'final_confirm') res = that.isList.find(i => i.value == item.final_confirm)
  190. if (res) return res.label
  191. else return '暂无'
  192. }
  193. },
  194. }
  195. }
  196. </script>
  197. <style lang="scss" scoped>
  198. .main {
  199. .one {
  200. padding: 2vw;
  201. .text {
  202. margin: 2vw 4vw;
  203. text-indent: 10px;
  204. border-left: 3px solid var(--f3CColor);
  205. font-weight: bold;
  206. font-size: var(--font16Size);
  207. }
  208. .list {
  209. background-color: var(--mainColor);
  210. border: 1px solid var(--f5Color);
  211. margin: 2vw 2vw 0 2vw;
  212. border-radius: 4px;
  213. padding: 3vw;
  214. .value {
  215. display: flex;
  216. align-items: center;
  217. .title {
  218. min-width: 70px;
  219. font-size: var(--font14Size);
  220. font-weight: bold;
  221. }
  222. .label {
  223. font-size: var(--font12Size);
  224. color: var(--f85Color);
  225. }
  226. }
  227. .value_1 {
  228. .title {
  229. font-size: var(--font14Size);
  230. font-weight: bold;
  231. }
  232. .label {
  233. margin: 10px 0 0 0;
  234. font-size: var(--font12Size);
  235. color: var(--f85Color);
  236. .arr {
  237. display: flex;
  238. align-items: center;
  239. justify-content: center;
  240. margin: 10px 0;
  241. .name {
  242. width: 50%;
  243. text-align: center;
  244. }
  245. .input {
  246. width: 50%;
  247. margin: 0 5px 0 0;
  248. border: 1px solid #e5e5e5;
  249. border-radius: 5px;
  250. text-align: center;
  251. .name {
  252. width: 50%;
  253. text-align: center;
  254. margin: 0 0 10px 0;
  255. }
  256. }
  257. }
  258. }
  259. }
  260. }
  261. }
  262. }
  263. </style>