|
@@ -30,7 +30,7 @@
|
30
|
30
|
prop="tel"
|
31
|
31
|
label="活动时间">
|
32
|
32
|
<template slot-scope="scope">
|
33
|
|
- <span>{{scope.row.startDate}} ~ {{scope.row.startDate}}</span>
|
|
33
|
+ <span>{{ formateDate(scope.row.startDate)}} ~ {{ formateDate(scope.row.startDate)}}</span>
|
34
|
34
|
</template>
|
35
|
35
|
</el-table-column>
|
36
|
36
|
<el-table-column
|
|
@@ -55,7 +55,9 @@
|
55
|
55
|
</el-table-column>
|
56
|
56
|
<el-table-column label="状态">
|
57
|
57
|
<template slot-scope="scope">
|
58
|
|
- <span :style="{color:(scope.row.status == 1?'':'red')}" >{{scope.row.status == 1 ? '启用' : '禁用'}}</span>
|
|
58
|
+ <span v-if="scope.row.isEnlist == '0'">未开始</span>
|
|
59
|
+ <span v-if="scope.row.isEnlist == '1'">进行中</span>
|
|
60
|
+ <span v-if="scope.row.isEnlist == '2'">已结束</span>
|
59
|
61
|
</template>
|
60
|
62
|
</el-table-column>
|
61
|
63
|
<el-table-column
|
|
@@ -63,9 +65,9 @@
|
63
|
65
|
label="操作">
|
64
|
66
|
<template slot-scope="scope">
|
65
|
67
|
<!-- <el-button type="text" @click="toDetail(scope.row)" size="small">{{scope.row.status == 1?'停用':'启用'}}</el-button> -->
|
66
|
|
- <el-button type="text" @click="getSignList(scope.row.dynamicId)" size="small">报名记录</el-button>
|
67
|
|
- <el-button type="text" @click="toDetail(scope.row.dynamicId)" size="small">编辑</el-button>
|
68
|
|
- <el-button type="text" @click="finish(scope.row.dynamicId)" size="small">结束活动</el-button>
|
|
68
|
+ <el-button type="text" @click="getSignList(scope.row.dynamicId)" size="small" v-if="scope.row.isEnlist == '1' || scope.row.isEnlist === '2'">报名记录</el-button>
|
|
69
|
+ <el-button type="text" @click="toDetail(scope.row.dynamicId)" size="small" v-if="scope.row.isEnlist == '0'">编辑</el-button>
|
|
70
|
+ <el-button type="text" @click="finish(scope.row.dynamicId)" size="small" v-if="scope.row.isEnlist == '1'">结束活动</el-button>
|
69
|
71
|
<el-button type="text" @click="top(scope.row.dynamicId)" size="small">置顶</el-button>
|
70
|
72
|
</template>
|
71
|
73
|
</el-table-column>
|
|
@@ -84,6 +86,7 @@
|
84
|
86
|
</template>
|
85
|
87
|
|
86
|
88
|
<script>
|
|
89
|
+import dayjs from 'dayjs'
|
87
|
90
|
import { createNamespacedHelpers } from "vuex";
|
88
|
91
|
const { mapState: mapBuildingState, mapActions: mapBuildingActions } = createNamespacedHelpers('building')
|
89
|
92
|
const { mapActions: mapActivity } = createNamespacedHelpers("activity");
|
|
@@ -142,18 +145,21 @@ export default {
|
142
|
145
|
this.filterData.dynamicId = id
|
143
|
146
|
this.finishActivity(
|
144
|
147
|
JSON.stringify(this.filterData)
|
145
|
|
- )
|
146
|
|
- this.getList();
|
|
148
|
+ ).then((res) => {
|
|
149
|
+ this.getList();
|
147
|
150
|
this.getBuildList()
|
|
151
|
+ })
|
|
152
|
+
|
148
|
153
|
},
|
149
|
154
|
top(id){
|
150
|
155
|
this.filterData.dynamicId = id
|
151
|
156
|
this.filterData.top = 1
|
152
|
157
|
this.finishActivity(
|
153
|
158
|
JSON.stringify(this.filterData)
|
154
|
|
- )
|
155
|
|
- this.getList();
|
|
159
|
+ ).then((res) => {
|
|
160
|
+ this.getList();
|
156
|
161
|
this.getBuildList()
|
|
162
|
+ })
|
157
|
163
|
},
|
158
|
164
|
addDynamic() {
|
159
|
165
|
this.$router.push({ name: "activity-add" });
|
|
@@ -179,7 +185,10 @@ export default {
|
179
|
185
|
},
|
180
|
186
|
getSignList(id){
|
181
|
187
|
this.$router.push({ name: "activity-signList",query: { id } });
|
182
|
|
- }
|
|
188
|
+ },
|
|
189
|
+ formateDate(dt) {
|
|
190
|
+ return !dt ? '' : dayjs(dt).format('YYYY-MM-DD HH:mm')
|
|
191
|
+ },
|
183
|
192
|
},
|
184
|
193
|
created() {
|
185
|
194
|
this.pageNavi.current = this.$route.query.page || 1;
|