|
@@ -5,9 +5,6 @@
|
|
|
<span>
|
|
|
{{$t('cusMgt.join.title')}}
|
|
|
</span>
|
|
|
- <!-- <Divider dashed plain class="join-title">
|
|
|
- 加入课程名单
|
|
|
- </Divider> -->
|
|
|
</p>
|
|
|
<p class="course-name">{{cusName || $t('cusMgt.join.errorInfo')}}</p>
|
|
|
<div style="width:fit-content;margin: auto;">
|
|
@@ -29,7 +26,7 @@
|
|
|
</p>
|
|
|
</div>
|
|
|
|
|
|
- <div class="join-btn" @click="joinList()">
|
|
|
+ <div class="join-btn" @click="findList()">
|
|
|
{{$t('cusMgt.join.joinBtn')}}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -44,11 +41,52 @@ export default {
|
|
|
listId: '',
|
|
|
listName: '',
|
|
|
cusName: '',
|
|
|
+ tmid: ''
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- joinList() {
|
|
|
- this.$Message.warning('暂未对接API')
|
|
|
+ joinList(stulist) {
|
|
|
+ if (stulist) {
|
|
|
+ stulist.tmids.push(this.tmid)
|
|
|
+ this.$api.courseMgmt.upsertStulist({
|
|
|
+ scope: 'private',
|
|
|
+ stuList: stulist
|
|
|
+ }).then(
|
|
|
+ res => {
|
|
|
+ if (!res.error) {
|
|
|
+ this.$Message.success(this.$t('cusMgt.join.joinOk'))
|
|
|
+ } else {
|
|
|
+ this.$Message.error(this.$t('cusMgt.join.joinErr'))
|
|
|
+ }
|
|
|
+ },
|
|
|
+ err => {
|
|
|
+ this.$Message.error(this.$t('cusMgt.join.joinErr'))
|
|
|
+ }
|
|
|
+ )
|
|
|
+ } else {
|
|
|
+ this.$Message.error(this.$t('cusMgt.join.getListErr'))
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //查询名单详细信息
|
|
|
+ findList() {
|
|
|
+ let params = {
|
|
|
+ code: this.tId,
|
|
|
+ ids: [this.listId],
|
|
|
+ scope: 'private'
|
|
|
+ }
|
|
|
+ this.$api.courseMgmt.findListSummary(params).then(
|
|
|
+ res => {
|
|
|
+ if (!res.error && res.stulist && res.stulist.length) {
|
|
|
+ console.log(res)
|
|
|
+ this.joinList(res.stulist[0])
|
|
|
+ } else {
|
|
|
+ this.$Message.error(this.$t('cusMgt.join.getListErr'))
|
|
|
+ }
|
|
|
+ },
|
|
|
+ err => {
|
|
|
+ this.$Message.error(this.$t('cusMgt.join.getListErr'))
|
|
|
+ }
|
|
|
+ )
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -77,29 +115,26 @@ export default {
|
|
|
background-image: url("../../assets/image/bak_light.jpg");
|
|
|
}
|
|
|
.join-btn {
|
|
|
- // width: fit-content;
|
|
|
width: 100%;
|
|
|
margin: auto;
|
|
|
margin-top: 60px;
|
|
|
text-align: center;
|
|
|
border: 1px solid rgba(25, 190, 107, 0.5);
|
|
|
- color: rgba(25, 190, 107, 1);
|
|
|
+ // color: rgba(25, 190, 107, 1);
|
|
|
+ color: white;
|
|
|
padding: 4px 30px;
|
|
|
border-radius: 5px;
|
|
|
font-size: 16px;
|
|
|
letter-spacing: 2px;
|
|
|
font-weight: 400;
|
|
|
user-select: none;
|
|
|
- &:hover {
|
|
|
- background: rgba(25, 190, 107, 0.5);
|
|
|
- color: white;
|
|
|
- }
|
|
|
+ background: rgba(25, 190, 107, 0.5);
|
|
|
}
|
|
|
.course-name {
|
|
|
color: white;
|
|
|
margin-bottom: 15px;
|
|
|
font-size: 30px;
|
|
|
- font-family: cursive;
|
|
|
+ // font-family: cursive;
|
|
|
}
|
|
|
.join-main-box {
|
|
|
max-width: 90%;
|