|
@@ -6,23 +6,10 @@
|
6
|
6
|
{{ ruleForm.announcementContent }}
|
7
|
7
|
</div>
|
8
|
8
|
<div>
|
9
|
|
- <template v-for="site in ruleForm.contentImg">
|
10
|
|
- <img :src="site.url" width="500" height="500" >
|
11
|
|
- </template>
|
12
|
|
-
|
13
|
|
- <!-- <img :src="item" width="500" height="500" > -->
|
|
9
|
+ <template v-for="site in ruleForm.contentImg">
|
|
10
|
+ <img :src="site.url" width="500" height="500" >
|
|
11
|
+ </template>
|
14
|
12
|
</div>
|
15
|
|
- <!-- <div class="progress">
|
16
|
|
- <div class="text-progress">
|
17
|
|
- <span class="people-number">已报名人数 {{ ruleForm.signUpCount }}</span>
|
18
|
|
- <div class="outer-layer"/>
|
19
|
|
- <div class="inner-layer"/>
|
20
|
|
- </div>
|
21
|
|
- <div class="circular"/>
|
22
|
|
- <div class="people-limit">限制{{ ruleForm.signUpMax }}人</div>
|
23
|
|
- <el-button type="primary" style="float: left;">查看报名名单</el-button>
|
24
|
|
- </div> -->
|
25
|
|
- <!-- <span>报名截止时间:{{ formatDate(ruleForm.registrationEndTime) }}</span> -->
|
26
|
13
|
<div class="bom-button">
|
27
|
14
|
<el-button type="primary" style="width: 150px;" @click="edi">修改</el-button>
|
28
|
15
|
</div>
|
|
@@ -50,21 +37,18 @@ export default {
|
50
|
37
|
},
|
51
|
38
|
mounted() {
|
52
|
39
|
this.getById(this.$route.params.id)
|
53
|
|
- console.log("id",this.id)
|
54
|
40
|
},
|
55
|
41
|
methods: {
|
56
|
42
|
getById(id) { // 根据ID获取活动信息
|
57
|
|
- console.log(123)
|
58
|
|
- console.log(id)
|
59
|
|
- this.ruleForm.id=this.$route.params.id
|
|
43
|
+ this.ruleForm.id = this.$route.params.id
|
60
|
44
|
this.$store.dispatch('AnnouncementById', this.ruleForm).then((res) => {
|
61
|
|
- const resData = res.data
|
62
|
|
- this.ruleForm.announcementTitle=resData.tpAnnouncement.announcementTitle// 标题
|
63
|
|
- this.ruleForm.announcementContent=resData.tpAnnouncement.announcementContent// 内容
|
64
|
|
- this.ruleForm.announcementCarouselImg=resData.tpAnnouncement.announcementCarouselImg // 轮播图
|
65
|
|
- this.sort=resData.tpAnnouncement.sort// 权重
|
66
|
|
- //多张图片进行遍历
|
67
|
|
- for (let i = 0; i <resData.studentList.length; i++) {
|
|
45
|
+ const resData = res.data
|
|
46
|
+ this.ruleForm.announcementTitle = resData.tpAnnouncement.announcementTitle // 标题
|
|
47
|
+ this.ruleForm.announcementContent = resData.tpAnnouncement.announcementContent // 内容
|
|
48
|
+ this.ruleForm.announcementCarouselImg = resData.tpAnnouncement.announcementCarouselImg // 轮播图
|
|
49
|
+ this.sort = resData.tpAnnouncement.sort
|
|
50
|
+ // 多张图片进行遍历
|
|
51
|
+ for (let i = 0; i < resData.studentList.length; i++) {
|
68
|
52
|
this.ruleForm.contentImg.push({ url: resData.studentList[i].imageUrl })
|
69
|
53
|
}
|
70
|
54
|
})
|
|
@@ -81,10 +65,7 @@ export default {
|
81
|
65
|
return year + '-' + month + '-' + day
|
82
|
66
|
},
|
83
|
67
|
edi() { // 修改活动
|
84
|
|
- this.$router.push({ name: 'announcement-edit' , params: { id: this.ruleForm.id }})
|
85
|
|
- console.log("123")
|
86
|
|
- // this.$router.push({ name: 'announcement-edit', params: { id: this.ruleForm.id }})
|
87
|
|
-
|
|
68
|
+ this.$router.push({ name: 'announcement-edit', params: { id: this.ruleForm.id }})
|
88
|
69
|
}
|
89
|
70
|
}
|
90
|
71
|
}
|