Przeglądaj źródła

+ 我的报名列表

chen.cheng 10 miesięcy temu
rodzic
commit
b49465020b

+ 33 - 3
common/EnumConst.js

@@ -52,6 +52,18 @@ export const USR_TYPE_LIST = [
     name: '随行人员',
   },
 ];
+
+export const USR_TYPE = {
+  1: {
+    name: '大会代表',
+    value: '1',
+  },
+  2: {
+    name: '随行人员',
+    value: '2',
+  },
+
+};
 export const FILE_ICON = {
   doc: '/profile/upload/2024/08/20/word_20240820110735A012.svg',
   docx: '/profile/upload/2024/08/20/word_20240820110735A012.svg',
@@ -81,11 +93,13 @@ export const REVIEW_STATUS = {
     name: '审核通过',
     value: '0',
     tag: 'success',
+    tip: 32,
   },
   '1': {
     name: '审核不通过',
     value: '1',
-    tag: 'danger',
+    tag: 'error',
+    tip: 33,
   },
   '2': {
     name: '待审核',
@@ -96,11 +110,12 @@ export const REVIEW_STATUS = {
     name: '审核通过',
     value: '0',
     tag: 'success',
+
   },
   'noPass': {
     name: '审核不通过',
     value: '1',
-    tag: 'danger',
+    tag: 'error',
   },
   'wait': {
     name: '待审核',
@@ -109,8 +124,23 @@ export const REVIEW_STATUS = {
   },
 };
 
+export const TFC_TYPE = {
+  1: {
+    name: '铁路',
+    value: 1,
+  },
+  2: {
+    name: '航空',
+    value: 2,
+  },
+  3: {
+    name: '公路',
+    value: 3,
+  },
+};
+
 export const TFC_INFO = {
-  // 铁路1 航空2 公路3
+
   1: {
     name: '车次',
     value: 1,

+ 18 - 0
common/api.js

@@ -27,6 +27,24 @@ export const fetchUsrMeetingInfo = (params) => {
     });
 };
 
+export const fetchUsrApplyDetail = (applyId) => {
+  return http.get(`/cp/usrApply/${applyId}`,
+    {
+      header: {
+        Authorization: `Bearer ${getToken()}`,
+      },
+    });
+};
+
+export const fetchMeetingTips = (ids = [32, 33]) => {
+  return http.get(`/cp/contentInfo/ids/${ids.join(',')}`,
+    {
+      header: {
+        Authorization: `Bearer ${getToken()}`,
+      },
+    });
+};
+
 export const fetchUsrThemeMeetingInfo = (params, type) => {
   return http.get(`/cp/usrApply/info/meeting/${type}`,
     {

+ 2 - 2
package.json

@@ -38,8 +38,8 @@
 				"title": "微信开发版",
 				"env": {
 					"UNI_PLATFORM": "mp-weixin",
-					"UNI_FILE_PREFIX": "http://192.168.0.110:18080/tfc",
-					"UNI_API_PREFIX": "http://192.168.0.110:18080/tfc"
+					"UNI_FILE_PREFIX": "http://127.0.0.1:18080/tfc",
+					"UNI_API_PREFIX": "http://127.0.0.1:18080/tfc"
 				},
 				"define": {
 					"MP-WEIXIN": true

+ 1 - 1
pages.json

@@ -87,7 +87,7 @@
         {
           "path": "pages/regmeeting/index",
           "style": {
-            "navigationBarTitleText": "我的报名"
+            "navigationBarTitleText": "报名详情"
           }
         },
         {

+ 2 - 2
pasb/pages/myApply/index.vue

@@ -13,7 +13,7 @@
               </u-tag>
             </view>
           </view>
-          <view class="apply-item-title overflow-hidden" style="height: 50px" v-if="item.contentTitle">{{ item.contentTitle }}</view>
+          <view class="apply-item-title overflow-hidden" style="height: 50px;line-height: 25px" v-if="item.contentTitle">{{ item.contentTitle }}</view>
           <view class="apply-item-footer">
             <view>参会人:{{ item.usrName }}</view>
             <view>{{ $u.timeFormat(item.createTime, 'yyyy-MM-dd hh:mm') }}</view>
@@ -57,7 +57,7 @@ export default {
   methods: {
     onContentClick(item) {
       uni.navigateTo({
-        url: `/pasb/pages/detail/index?id=${item.id}`,
+        url: `/pasbrg/pages/regmeeting/index?id=${item.id}`,
       });
     },
     async loadmore() {

+ 2 - 0
pasbrg/pages/regmeeting/index.scss

@@ -3,6 +3,8 @@
   width: 90%;
   margin: 20rpx auto;
   padding: 0 0 100rpx 0;
+  padding-bottom: 200rpx;
+
   /deep/ .u-tag-wrapper{
     flex-direction: row !important;
     margin-top: 12rpx;

+ 108 - 59
pasbrg/pages/regmeeting/index.vue

@@ -1,33 +1,31 @@
 <template>
   <auth-wrap ref="authWrap">
     <view class="regmeeting-content-info-container" slot="content">
-      <u-empty
-          mode="data"
-          text="暂未报名,前去报名"
-          v-if="isEmpty"
-      >
-      </u-empty>
-      <template v-else="isEmpty">
-        <u-cell-group :border="false">
-          <u-cell title="姓名" :label="meetingInfo.usrName">
-          </u-cell>
-        </u-cell-group>
-        <u-cell-group :border="false">
-          <u-cell title="单位名称" :label="meetingInfo.orgUnitName">
-          </u-cell>
-        </u-cell-group>
-        <u-cell-group :border="false">
-          <u-cell title="职务" :label="meetingInfo.uniLevel">
-          </u-cell>
-        </u-cell-group>
-        <u-cell-group :border="false">
-          <u-cell title="联系电话" :label="meetingInfo.tel">
-          </u-cell>
-        </u-cell-group>
-        <u-cell-group :border="false">
-          <u-cell title="邮箱" :label="meetingInfo.email">
-          </u-cell>
-        </u-cell-group>
+      <u-cell-group :border="false">
+        <u-cell title="姓名" :label="meetingInfo.usrName">
+        </u-cell>
+      </u-cell-group>
+      <u-cell-group :border="false">
+        <u-cell title="单位名称" :label="meetingInfo.orgUnitName">
+        </u-cell>
+      </u-cell-group>
+      <u-cell-group :border="false">
+        <u-cell title="职务" :label="meetingInfo.uniLevel">
+        </u-cell>
+      </u-cell-group>
+      <u-cell-group :border="false">
+        <u-cell title="联系电话" :label="meetingInfo.tel">
+        </u-cell>
+      </u-cell-group>
+      <u-cell-group :border="false">
+        <u-cell title="邮箱" :label="meetingInfo.email">
+        </u-cell>
+      </u-cell-group>
+      <u-cell-group :border="false">
+        <u-cell title="人员类型" :label="USR_TYPE[meetingInfo.usrType].name">
+        </u-cell>
+      </u-cell-group>
+      <template v-if="meetingInfo.applyType == MEETING_TYPE.meeting.value">
         <u-cell-group :border="false">
           <u-cell title="是否参加现场调研">
             <view
@@ -45,51 +43,96 @@
           <u-cell title="调研会场" :label="meetingInfo.contentTitle">
           </u-cell>
         </u-cell-group>
+      </template>
+      <template v-else>
         <u-cell-group :border="false">
-          <u-cell title="审核状态">
-            <view
-                slot="label"
-            >
-              <u-tag
-                  plain
-                  :text="REVIEW_STATUS[meetingInfo.reviewState].name"
-                  :type="REVIEW_STATUS[meetingInfo.reviewState].tag">
-              </u-tag>
-            </view>
+          <u-cell title="会议类型" :label="MEETING_TYPE[meetingInfo.applyType].name">
           </u-cell>
         </u-cell-group>
-        <u-cell-group :border="false" v-if="REVIEW_STATUS.noPass.value == meetingInfo.reviewState">
-          <u-cell title="不通过原因" :label="meetingInfo.reviewMsg">
+        <u-cell-group :border="false">
+          <u-cell title="会议信息" :label="meetingInfo.contentTitle">
           </u-cell>
         </u-cell-group>
-        <view class="u-page__button-item">
-          <u-button
-              :disabled="[REVIEW_STATUS.pass.value].includes(meetingInfo.reviewState)"
-              text="重新申请"
-              size="normal"
-              type="primary"
-          ></u-button>
-        </view>
       </template>
+      <u-cell-group :border="false">
+        <u-cell title="来程交通方式" :label="TFC_TYPE[meetingInfo.wayComing].name">
+        </u-cell>
+      </u-cell-group>
+      <u-cell-group :border="false">
+        <u-cell :title="TFC_INFO[meetingInfo.wayComing].name" :label="meetingInfo.comInfo">
+        </u-cell>
+      </u-cell-group>
+      <u-cell-group :border="false">
+        <u-cell title="回程交通方式" :label="TFC_TYPE[meetingInfo.wayBack].name">
+        </u-cell>
+      </u-cell-group>
+      <u-cell-group :border="false">
+        <u-cell :title="TFC_INFO[meetingInfo.wayBack].name" :label="meetingInfo.backInfo">
+        </u-cell>
+      </u-cell-group>
+      <u-cell-group :border="false">
+        <u-cell title="备注" :label="meetingInfo.remark">
+        </u-cell>
+      </u-cell-group>
+      <u-cell-group :border="false">
+        <u-cell title="审核状态">
+          <view
+              slot="label"
+          >
+            <u-tag
+                plain
+                :text="REVIEW_STATUS[meetingInfo.reviewState].name"
+                :type="REVIEW_STATUS[meetingInfo.reviewState].tag">
+            </u-tag>
+          </view>
+        </u-cell>
+      </u-cell-group>
+      <u-cell-group :border="false" v-if="REVIEW_STATUS.noPass.value == meetingInfo.reviewState">
+        <u-cell title="不通过原因" :label="meetingInfo.reviewMsg">
+        </u-cell>
+      </u-cell-group>
+      <view style="margin-top: 20px">
+        <rich-text
+            v-if="REVIEW_STATUS[meetingInfo.reviewState]"
+            :content="tips[REVIEW_STATUS[meetingInfo.reviewState].tip].content">
+        </rich-text>
+      </view>
+
+      <view class="u-page__button-item">
+        <u-button
+            :disabled="[REVIEW_STATUS.pass.value].includes(meetingInfo.reviewState)"
+            text="重新申请"
+            size="normal"
+            type="primary"
+        ></u-button>
+      </view>
     </view>
   </auth-wrap>
 </template>
 
 <script>
-import { fetchUsrMeetingInfo } from '@/common/api';
-import { REVIEW_STATUS, SYS_YES_NO } from '@/common/EnumConst';
+import { fetchMeetingTips, fetchUsrApplyDetail } from '@/common/api';
+import { MEETING_TYPE, REVIEW_STATUS, SYS_YES_NO, TFC_INFO, TFC_TYPE, USR_TYPE } from '@/common/EnumConst';
 import AuthWrap from '@/components/AuthComp/index.vue';
+import RichText from '@/components/RichText/index.vue';
 
 export default {
   name: 'content',
-  components: { AuthWrap },
+  components: {
+    RichText,
+    AuthWrap,
+  },
   props: {},
   data() {
     return {
       SYS_YES_NO,
       REVIEW_STATUS,
+      USR_TYPE,
+      MEETING_TYPE,
+      TFC_INFO,
+      TFC_TYPE,
       meetingInfo: {},
-      isEmpty: false,
+      tips: {},
     };
   },
   created() {
@@ -100,20 +143,26 @@ export default {
       this.queryParams = res;
     }
     this.getUsrMeetingInfo();
+    this.getTips();
   },
   methods: {
     async getUsrMeetingInfo() {
-      const { data } = await fetchUsrMeetingInfo();
+      const { data } = await fetchUsrApplyDetail(this.queryParams.id);
+      if (!data) {
+        return;
+      }
+      this.meetingInfo = data;
+    },
+    async getTips() {
+      const { data } = await fetchMeetingTips();
       if (!data) {
-        this.isEmpty = true;
         return;
       }
-      this.isEmpty = false;
-      const {
-        content,
-        ...apply
-      } = data;
-      this.meetingInfo = apply;
+      const result = {};
+      data.forEach((item) => {
+        result[item.id] = item;
+      });
+      this.tips = result;
     },
   },
 };