index.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <template>
  2. <auth-wrap ref="authWrap">
  3. <view class="regmeeting-content-info-container" slot="content">
  4. <u-cell-group :border="false">
  5. <u-cell title="姓名" :label="meetingInfo.usrName">
  6. </u-cell>
  7. </u-cell-group>
  8. <u-cell-group :border="false">
  9. <u-cell title="单位名称" :label="meetingInfo.orgUnitName">
  10. </u-cell>
  11. </u-cell-group>
  12. <u-cell-group :border="false">
  13. <u-cell title="职务" :label="meetingInfo.uniLevel">
  14. </u-cell>
  15. </u-cell-group>
  16. <u-cell-group :border="false">
  17. <u-cell title="联系电话" :label="meetingInfo.tel">
  18. </u-cell>
  19. </u-cell-group>
  20. <u-cell-group :border="false" v-if="rules.email">
  21. <u-cell title="邮箱" :label="meetingInfo.email">
  22. </u-cell>
  23. </u-cell-group>
  24. <u-cell-group :border="false">
  25. <u-cell title="人员类型" :label="USR_TYPE[meetingInfo.usrType].name">
  26. </u-cell>
  27. </u-cell-group>
  28. <u-cell-group :border="false"
  29. v-if="rules.conferenceFlag && meetingInfo.conferenceFlag && [0,1].includes(meetingInfo.conferenceFlag)">
  30. <u-cell title="是否参加现场调研">
  31. <view
  32. slot="label"
  33. >
  34. <u-tag
  35. plain
  36. :text="SYS_YES_NO[meetingInfo.conferenceFlag].name"
  37. :type="meetingInfo.conferenceFlag == SYS_YES_NO['0'].value ? 'success' : 'warning'">
  38. </u-tag>
  39. </view>
  40. </u-cell>
  41. </u-cell-group>
  42. <u-cell-group :border="false" v-if="rules.contentId && meetingInfo.contentTitle">
  43. <u-cell title="调研会场" :label="meetingInfo.contentTitle">
  44. </u-cell>
  45. </u-cell-group>
  46. <u-cell-group :border="false" v-if="rules.themeFlag">
  47. <u-cell title="是否参加主题研讨">
  48. <view
  49. slot="label"
  50. >
  51. <u-tag
  52. plain
  53. :text="SYS_YES_NO[meetingInfo.themeFlag].name"
  54. :type="meetingInfo.themeFlag == SYS_YES_NO['0'].value ? 'success' : 'warning'">
  55. </u-tag>
  56. </view>
  57. </u-cell>
  58. </u-cell-group>
  59. <u-cell-group :border="false" v-if="rules.themeId && meetingInfo.themeTitle">
  60. <u-cell title="研讨主题" :label="meetingInfo.themeTitle">
  61. </u-cell>
  62. </u-cell-group>
  63. <u-cell-group :border="false">
  64. <u-cell title="来程交通方式" :label="TFC_TYPE[meetingInfo.wayComing].name">
  65. </u-cell>
  66. </u-cell-group>
  67. <u-cell-group :border="false" v-if="meetingInfo.comInfo && meetingInfo.wayComing!='3'">
  68. <u-cell :title="TFC_INFO[meetingInfo.wayComing].name" :label="meetingInfo.comInfo">
  69. </u-cell>
  70. </u-cell-group>
  71. <u-cell-group :border="false">
  72. <u-cell title="返程交通方式" :label="TFC_TYPE[meetingInfo.wayBack].name">
  73. </u-cell>
  74. </u-cell-group>
  75. <u-cell-group :border="false" v-if="meetingInfo.backInfo && meetingInfo.wayBack!='3'">
  76. <u-cell :title="TFC_INFO[meetingInfo.wayBack].name" :label="meetingInfo.backInfo">
  77. </u-cell>
  78. </u-cell-group>
  79. <u-cell-group :border="false">
  80. <u-cell title="备注" :label="meetingInfo.remark">
  81. </u-cell>
  82. </u-cell-group>
  83. <u-cell-group :border="false">
  84. <u-cell title="审核状态">
  85. <view
  86. slot="label"
  87. >
  88. <u-tag
  89. plain
  90. :text="REVIEW_STATUS[meetingInfo.reviewState].name"
  91. :color="REVIEW_STATUS[meetingInfo.reviewState].color"
  92. :borderColor="REVIEW_STATUS[meetingInfo.reviewState].color"
  93. >
  94. </u-tag>
  95. </view>
  96. </u-cell>
  97. </u-cell-group>
  98. <u-cell-group :border="false" v-if="REVIEW_STATUS.noPass.value == meetingInfo.reviewState">
  99. <u-cell title="不通过原因" :label="meetingInfo.reviewMsg">
  100. </u-cell>
  101. </u-cell-group>
  102. <u-cell-group :border="false" v-for="(item,index) in meetingInfo.follows" :key="index">
  103. <u-cell :border="false" :title="`随行人员${index+1}`" :label="item.usrName">
  104. </u-cell>
  105. <u-cell :border="false" title="单位职务" :label="item.usrLevel">
  106. </u-cell>
  107. <u-cell title="联系电话" :label="item.tel">
  108. </u-cell>
  109. </u-cell-group>
  110. <view style="margin-top: 20px">
  111. <rich-text
  112. v-if="REVIEW_STATUS[meetingInfo.reviewState]"
  113. :content="tips[REVIEW_STATUS[meetingInfo.reviewState].tip].content">
  114. </rich-text>
  115. </view>
  116. <view class="u-page__button-item">
  117. <u-button
  118. :disabled="[REVIEW_STATUS.pass.value].includes(meetingInfo.reviewState)"
  119. text="重新申请"
  120. size="normal"
  121. type="primary"
  122. @click="onRegistClick"
  123. ></u-button>
  124. </view>
  125. </view>
  126. </auth-wrap>
  127. </template>
  128. <script>
  129. import { fetchMeetingTips, fetchUsrApplyDetail, formCfg } from '@/common/api';
  130. import { FORM_MOD, MEETING_TYPE, REVIEW_STATUS, SYS_YES_NO, TFC_INFO, TFC_TYPE, USR_TYPE } from '@/common/EnumConst';
  131. import AuthWrap from '@/components/AuthComp/index.vue';
  132. import RichText from '@/components/RichText/index.vue';
  133. import { setStorageObj, storageKey } from '@/util';
  134. export default {
  135. name: 'content',
  136. components: {
  137. RichText,
  138. AuthWrap,
  139. },
  140. props: {},
  141. data() {
  142. return {
  143. SYS_YES_NO,
  144. REVIEW_STATUS,
  145. USR_TYPE,
  146. MEETING_TYPE,
  147. TFC_INFO,
  148. TFC_TYPE,
  149. meetingInfo: {},
  150. tips: {},
  151. rules: {},
  152. };
  153. },
  154. created() {
  155. },
  156. onLoad(res) {
  157. // 登录返回之后的页面
  158. if (res) {
  159. this.queryParams = res;
  160. }
  161. this.getRules(() => {
  162. this.getUsrMeetingInfo();
  163. this.getTips();
  164. });
  165. },
  166. onUnload() {
  167. let pages = getCurrentPages();//获取所有界面栈的实例列表
  168. let prePage = pages[pages.length - 2];//上一个界面的实例
  169. prePage.onLoad();
  170. },
  171. methods: {
  172. async getRules(callback) {
  173. const { msg } = await formCfg('meet_form_cfg');
  174. if (msg) {
  175. const cfg = JSON.parse(msg);
  176. const formatCfg = {};
  177. Object.keys(cfg).forEach(key => {
  178. formatCfg[key.split('.')[1]] = cfg[key];
  179. });
  180. this.rules = formatCfg;
  181. }
  182. callback();
  183. },
  184. async getUsrMeetingInfo() {
  185. const { data } = await fetchUsrApplyDetail(this.queryParams.id);
  186. if (!data) {
  187. return;
  188. }
  189. this.meetingInfo = data;
  190. },
  191. async getTips() {
  192. const { data } = await fetchMeetingTips();
  193. if (!data) {
  194. return;
  195. }
  196. const result = {};
  197. data.forEach((item) => {
  198. result[item.id] = item;
  199. });
  200. this.tips = result;
  201. },
  202. onRegistClick() {
  203. if (this.meetingInfo.applyType == MEETING_TYPE.meeting.value) {
  204. uni.navigateTo({
  205. url: `/pasb/pages/regist/index?mode=${FORM_MOD.modify}&apply=${this.meetingInfo.id}`,
  206. });
  207. return;
  208. }
  209. setStorageObj(storageKey.regtheme, {
  210. id: this.meetingInfo.contentId,
  211. mode: 'mod',
  212. apply: this.meetingInfo.id,
  213. });
  214. uni.navigateTo({
  215. url: `/pasbrg/pages/regtheme/index?mode=${FORM_MOD.modify}&apply=${this.meetingInfo.id}`,
  216. });
  217. },
  218. },
  219. };
  220. </script>
  221. <style lang="scss" src="./index.scss" />;