index.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  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">
  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 title="联系电话" :label="item.tel">
  106. </u-cell>
  107. </u-cell-group>
  108. <view style="margin-top: 20px">
  109. <rich-text
  110. v-if="REVIEW_STATUS[meetingInfo.reviewState]"
  111. :content="tips[REVIEW_STATUS[meetingInfo.reviewState].tip].content">
  112. </rich-text>
  113. </view>
  114. <view class="u-page__button-item">
  115. <u-button
  116. :disabled="[REVIEW_STATUS.pass.value].includes(meetingInfo.reviewState)"
  117. text="重新申请"
  118. size="normal"
  119. type="primary"
  120. @click="onRegistClick"
  121. ></u-button>
  122. </view>
  123. </view>
  124. </auth-wrap>
  125. </template>
  126. <script>
  127. import { fetchMeetingTips, fetchUsrApplyDetail, formCfg } from '@/common/api';
  128. import { FORM_MOD, MEETING_TYPE, REVIEW_STATUS, SYS_YES_NO, TFC_INFO, TFC_TYPE, USR_TYPE } from '@/common/EnumConst';
  129. import AuthWrap from '@/components/AuthComp/index.vue';
  130. import RichText from '@/components/RichText/index.vue';
  131. import { setStorageObj, storageKey } from '@/util';
  132. export default {
  133. name: 'content',
  134. components: {
  135. RichText,
  136. AuthWrap,
  137. },
  138. props: {},
  139. data() {
  140. return {
  141. SYS_YES_NO,
  142. REVIEW_STATUS,
  143. USR_TYPE,
  144. MEETING_TYPE,
  145. TFC_INFO,
  146. TFC_TYPE,
  147. meetingInfo: {},
  148. tips: {},
  149. rules: {},
  150. };
  151. },
  152. created() {
  153. },
  154. onLoad(res) {
  155. // 登录返回之后的页面
  156. if (res) {
  157. this.queryParams = res;
  158. }
  159. this.getRules(() => {
  160. this.getUsrMeetingInfo();
  161. this.getTips();
  162. });
  163. },
  164. onUnload() {
  165. let pages = getCurrentPages();//获取所有界面栈的实例列表
  166. let prePage = pages[pages.length - 2];//上一个界面的实例
  167. prePage.onLoad();
  168. },
  169. methods: {
  170. async getRules(callback) {
  171. const { msg } = await formCfg('meet_form_cfg');
  172. if (msg) {
  173. const cfg = JSON.parse(msg);
  174. const formatCfg = {};
  175. Object.keys(cfg).forEach(key => {
  176. formatCfg[key.split('.')[1]] = cfg[key];
  177. });
  178. this.rules = formatCfg;
  179. }
  180. callback();
  181. },
  182. async getUsrMeetingInfo() {
  183. const { data } = await fetchUsrApplyDetail(this.queryParams.id);
  184. if (!data) {
  185. return;
  186. }
  187. this.meetingInfo = data;
  188. },
  189. async getTips() {
  190. const { data } = await fetchMeetingTips();
  191. if (!data) {
  192. return;
  193. }
  194. const result = {};
  195. data.forEach((item) => {
  196. result[item.id] = item;
  197. });
  198. this.tips = result;
  199. },
  200. onRegistClick() {
  201. if (this.meetingInfo.applyType == MEETING_TYPE.meeting.value) {
  202. uni.navigateTo({
  203. url: `/pasb/pages/regist/index?mode=${FORM_MOD.modify}&apply=${this.meetingInfo.id}`,
  204. });
  205. return;
  206. }
  207. setStorageObj(storageKey.regtheme, {
  208. id: this.meetingInfo.contentId,
  209. mode: 'mod',
  210. apply: this.meetingInfo.id,
  211. });
  212. uni.navigateTo({
  213. url: `/pasbrg/pages/regtheme/index?mode=${FORM_MOD.modify}&apply=${this.meetingInfo.id}`,
  214. });
  215. },
  216. },
  217. };
  218. </script>
  219. <style lang="scss" src="./index.scss" />;