Commit df96e93b2c900a1e582f6f637af575c91e6baed1
1 parent
485477a1
活动展示项
Showing
4 changed files
with
47 additions
and
53 deletions
src/views/event/config.ts
| @@ -45,7 +45,7 @@ export const onlineStatus: EnumArrayItem[] = [ | @@ -45,7 +45,7 @@ export const onlineStatus: EnumArrayItem[] = [ | ||
| 45 | label: '上线', | 45 | label: '上线', |
| 46 | value: 2 | 46 | value: 2 |
| 47 | } | 47 | } |
| 48 | -] | 48 | +] |
| 49 | 49 | ||
| 50 | // 活动参与人员退费状态 | 50 | // 活动参与人员退费状态 |
| 51 | export const refundStatus: EnumArrayItem[] = [ | 51 | export const refundStatus: EnumArrayItem[] = [ |
src/views/event/feedback/index.vue
| @@ -221,7 +221,7 @@ onMounted(() => { | @@ -221,7 +221,7 @@ onMounted(() => { | ||
| 221 | </el-table-column> | 221 | </el-table-column> |
| 222 | <el-table-column prop="status" label="状态" align="center"> | 222 | <el-table-column prop="status" label="状态" align="center"> |
| 223 | <template #default="scope"> | 223 | <template #default="scope"> |
| 224 | - {{ globalFilters(scope.row.status, data.onlineStatus) }} | 224 | + {{ scope.row.status === 2 ? "已上线" : "未上线" }} |
| 225 | </template> | 225 | </template> |
| 226 | </el-table-column> | 226 | </el-table-column> |
| 227 | <el-table-column prop="createTime" label="评价时间" align="center"> | 227 | <el-table-column prop="createTime" label="评价时间" align="center"> |
src/views/event/handwork/index.vue
| 1 | <script setup lang="ts"> | 1 | <script setup lang="ts"> |
| 2 | import { reactive, ref, onMounted } from "vue"; | 2 | import { reactive, ref, onMounted } from "vue"; |
| 3 | -import { | ||
| 4 | - handworkList, | ||
| 5 | - eventCategory, | ||
| 6 | - handworkDelete, | ||
| 7 | - handworkCancel, | ||
| 8 | -} from "@/api/event"; | 3 | +import { handworkList, handworkDelete, handworkCancel } from "@/api/event"; |
| 9 | import { parseTime, globalFilters } from "@/utils/tool"; | 4 | import { parseTime, globalFilters } from "@/utils/tool"; |
| 10 | import { statusData, publishData } from "./../config"; | 5 | import { statusData, publishData } from "./../config"; |
| 11 | import { useLoginStore } from "@/pinia/login"; | 6 | import { useLoginStore } from "@/pinia/login"; |
| @@ -28,13 +23,11 @@ interface Params { | @@ -28,13 +23,11 @@ interface Params { | ||
| 28 | interface Data { | 23 | interface Data { |
| 29 | loading: boolean; | 24 | loading: boolean; |
| 30 | list: any[] | null; | 25 | list: any[] | null; |
| 31 | - category: any[] | null; | ||
| 32 | params: Params; | 26 | params: Params; |
| 33 | } | 27 | } |
| 34 | const value1 = ref([]); | 28 | const value1 = ref([]); |
| 35 | let data = reactive({ | 29 | let data = reactive({ |
| 36 | list: [], | 30 | list: [], |
| 37 | - category: [], | ||
| 38 | loading: false, | 31 | loading: false, |
| 39 | params: { | 32 | params: { |
| 40 | total: 0, | 33 | total: 0, |
| @@ -75,25 +68,6 @@ const handleTimeChange = (value: array) => { | @@ -75,25 +68,6 @@ const handleTimeChange = (value: array) => { | ||
| 75 | getList(); | 68 | getList(); |
| 76 | }; | 69 | }; |
| 77 | /** | 70 | /** |
| 78 | - * 活动分类 | ||
| 79 | - * @param {number | null} pageSize 一次请求多少条数据 | ||
| 80 | - */ | ||
| 81 | -const getCategory = async (pageSize: number = 20) => { | ||
| 82 | - try { | ||
| 83 | - const res = await eventCategory({ | ||
| 84 | - page: 1, | ||
| 85 | - pageSize: pageSize, | ||
| 86 | - oId: useLoginStore()?.getOid ?? 0, | ||
| 87 | - }); | ||
| 88 | - data.category = res?.data?.data?.list; | ||
| 89 | - if (res?.data?.data?.total > pageSize) { | ||
| 90 | - getCategory(res?.data?.data?.total); | ||
| 91 | - } | ||
| 92 | - } catch (e) { | ||
| 93 | - console.log(e); | ||
| 94 | - } | ||
| 95 | -}; | ||
| 96 | -/** | ||
| 97 | * 取消发布 | 71 | * 取消发布 |
| 98 | */ | 72 | */ |
| 99 | const handleCancel = (id: number) => { | 73 | const handleCancel = (id: number) => { |
| @@ -161,7 +135,6 @@ const handleDelete = (id: number | string) => { | @@ -161,7 +135,6 @@ const handleDelete = (id: number | string) => { | ||
| 161 | }; | 135 | }; |
| 162 | onMounted(() => { | 136 | onMounted(() => { |
| 163 | getList(); | 137 | getList(); |
| 164 | - getCategory(); | ||
| 165 | }); | 138 | }); |
| 166 | </script> | 139 | </script> |
| 167 | 140 | ||
| @@ -227,14 +200,11 @@ onMounted(() => { | @@ -227,14 +200,11 @@ onMounted(() => { | ||
| 227 | label="活动名称" | 200 | label="活动名称" |
| 228 | align="center" | 201 | align="center" |
| 229 | ></el-table-column> | 202 | ></el-table-column> |
| 230 | - <el-table-column prop="craftId" label="活动分类" align="center"> | ||
| 231 | - <template #default="scope"> | ||
| 232 | - {{ | ||
| 233 | - data.category.find((item) => ~~item.id === ~~scope.row.craftId) | ||
| 234 | - ?.name | ||
| 235 | - }} | ||
| 236 | - </template> | ||
| 237 | - </el-table-column> | 203 | + <el-table-column |
| 204 | + prop="craftName" | ||
| 205 | + label="活动分类" | ||
| 206 | + align="center" | ||
| 207 | + ></el-table-column> | ||
| 238 | <el-table-column | 208 | <el-table-column |
| 239 | prop="personLimit" | 209 | prop="personLimit" |
| 240 | label="活动人数" | 210 | label="活动人数" |
| @@ -245,24 +215,31 @@ onMounted(() => { | @@ -245,24 +215,31 @@ onMounted(() => { | ||
| 245 | label="参与人数" | 215 | label="参与人数" |
| 246 | align="center" | 216 | align="center" |
| 247 | ></el-table-column> | 217 | ></el-table-column> |
| 218 | + <el-table-column | ||
| 219 | + prop="signupResidueNum" | ||
| 220 | + label="富余人数" | ||
| 221 | + align="center" | ||
| 222 | + ></el-table-column> | ||
| 248 | <el-table-column prop="startTime" label="活动报名时间" align="center"> | 223 | <el-table-column prop="startTime" label="活动报名时间" align="center"> |
| 249 | <template #default="scope"> | 224 | <template #default="scope"> |
| 250 | {{ parseTime(new Date(scope.row.signupStartTime).getTime()) }} ~ | 225 | {{ parseTime(new Date(scope.row.signupStartTime).getTime()) }} ~ |
| 251 | {{ parseTime(new Date(scope.row.signupEndTime).getTime()) }} | 226 | {{ parseTime(new Date(scope.row.signupEndTime).getTime()) }} |
| 252 | </template> | 227 | </template> |
| 253 | </el-table-column> | 228 | </el-table-column> |
| 229 | + <el-table-column prop="startTime" label="活动时间" align="center"> | ||
| 230 | + <template #default="scope"> | ||
| 231 | + {{ parseTime(new Date(scope.row.startTime).getTime()) }} ~ | ||
| 232 | + {{ parseTime(new Date(scope.row.endTime).getTime()) }} | ||
| 233 | + </template> | ||
| 234 | + </el-table-column> | ||
| 254 | <el-table-column | 235 | <el-table-column |
| 255 | prop="duration" | 236 | prop="duration" |
| 256 | label="活动时长/小时" | 237 | label="活动时长/小时" |
| 257 | align="center" | 238 | align="center" |
| 258 | ></el-table-column> | 239 | ></el-table-column> |
| 259 | - <el-table-column | ||
| 260 | - prop="unitPrice" | ||
| 261 | - label="单价/元" | ||
| 262 | - align="center" | ||
| 263 | - > | 240 | + <el-table-column prop="unitPrice" label="单价/元" align="center"> |
| 264 | <template #default="scope"> | 241 | <template #default="scope"> |
| 265 | - {{(~~scope.row.unitPrice / 100).toFixed(2)}} | 242 | + {{ (~~scope.row.unitPrice / 100).toFixed(2) }} |
| 266 | </template> | 243 | </template> |
| 267 | </el-table-column> | 244 | </el-table-column> |
| 268 | <el-table-column | 245 | <el-table-column |
| @@ -294,12 +271,6 @@ onMounted(() => { | @@ -294,12 +271,6 @@ onMounted(() => { | ||
| 294 | {{ globalFilters(scope.row.status, publishData) }} | 271 | {{ globalFilters(scope.row.status, publishData) }} |
| 295 | </template> | 272 | </template> |
| 296 | </el-table-column> | 273 | </el-table-column> |
| 297 | - <el-table-column prop="startTime" label="活动时间" align="center"> | ||
| 298 | - <template #default="scope"> | ||
| 299 | - {{ parseTime(new Date(scope.row.startTime).getTime()) }} ~ | ||
| 300 | - {{ parseTime(new Date(scope.row.endTime).getTime()) }} | ||
| 301 | - </template> | ||
| 302 | - </el-table-column> | ||
| 303 | <el-table-column label="操作" align="center"> | 274 | <el-table-column label="操作" align="center"> |
| 304 | <template #default="scope"> | 275 | <template #default="scope"> |
| 305 | <!-- 已发布的活动不能编辑和删除。 --> | 276 | <!-- 已发布的活动不能编辑和删除。 --> |
| @@ -315,7 +286,14 @@ onMounted(() => { | @@ -315,7 +286,14 @@ onMounted(() => { | ||
| 315 | <!-- 活动取消发布了以后,只能查看人员 --> | 286 | <!-- 活动取消发布了以后,只能查看人员 --> |
| 316 | <el-button type="text" | 287 | <el-button type="text" |
| 317 | ><router-link | 288 | ><router-link |
| 318 | - :to="{ path: '/event/signup', query: { id: scope.row.id, eName: scope.row.name } }" | 289 | + :to="{ |
| 290 | + path: '/event/signup', | ||
| 291 | + query: { | ||
| 292 | + id: scope.row.id, | ||
| 293 | + eName: scope.row.name, | ||
| 294 | + unitPrice: scope.row.unitPrice, | ||
| 295 | + }, | ||
| 296 | + }" | ||
| 319 | >查看人员</router-link | 297 | >查看人员</router-link |
| 320 | ></el-button | 298 | ></el-button |
| 321 | > | 299 | > |
src/views/event/handwork/signup.vue
| @@ -139,11 +139,27 @@ onMounted(() => { | @@ -139,11 +139,27 @@ onMounted(() => { | ||
| 139 | label="联系方式" | 139 | label="联系方式" |
| 140 | align="center" | 140 | align="center" |
| 141 | ></el-table-column> | 141 | ></el-table-column> |
| 142 | - <el-table-column prop="refundStatus" label="退费状态" align="center"> | 142 | + <!-- 收费活动展示退费状态,免费活动展示报名状态 --> |
| 143 | + <el-table-column | ||
| 144 | + prop="refundStatus" | ||
| 145 | + label="退费状态" | ||
| 146 | + align="center" | ||
| 147 | + v-if="~~useRoute().query.unitPrice > 0" | ||
| 148 | + > | ||
| 143 | <template #default="scope"> | 149 | <template #default="scope"> |
| 144 | {{ globalFilters(scope.row.refundStatus, refundStatus) }} | 150 | {{ globalFilters(scope.row.refundStatus, refundStatus) }} |
| 145 | </template> | 151 | </template> |
| 146 | </el-table-column> | 152 | </el-table-column> |
| 153 | + <el-table-column | ||
| 154 | + prop="refundStatus" | ||
| 155 | + label="报名状态" | ||
| 156 | + align="center" | ||
| 157 | + v-if="~~useRoute().query.unitPrice === 0" | ||
| 158 | + > | ||
| 159 | + <template #default="scope"> | ||
| 160 | + {{ ~~scope.row.refundStatus === 0 ? "已报名" : "取消报名" }} | ||
| 161 | + </template> | ||
| 162 | + </el-table-column> | ||
| 147 | <el-table-column label="操作" align="center"> | 163 | <el-table-column label="操作" align="center"> |
| 148 | <template #default="scope"> | 164 | <template #default="scope"> |
| 149 | <!-- 未退费和退费失败的参与人员可以移除 --> | 165 | <!-- 未退费和退费失败的参与人员可以移除 --> |
| @@ -151,7 +167,7 @@ onMounted(() => { | @@ -151,7 +167,7 @@ onMounted(() => { | ||
| 151 | type="text" | 167 | type="text" |
| 152 | @click="handleRemove(scope.row)" | 168 | @click="handleRemove(scope.row)" |
| 153 | v-show="[0, 4].includes(~~scope.row.refundStatus)" | 169 | v-show="[0, 4].includes(~~scope.row.refundStatus)" |
| 154 | - >移除</el-button | 170 | + >取消报名</el-button |
| 155 | > | 171 | > |
| 156 | </template> | 172 | </template> |
| 157 | </el-table-column> | 173 | </el-table-column> |