|
@@ -49,6 +49,8 @@
|
|
|
</template>
|
|
|
</uni-list-item>
|
|
|
</uni-list>
|
|
|
+ <common-dialog ref="commonDialogRef" :title="deleteTitle" :content="deleteConcent"
|
|
|
+ @confirm-btn="deleteQuerenBtn"></common-dialog>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -71,7 +73,10 @@
|
|
|
id: '',
|
|
|
current: 0,
|
|
|
list: [],
|
|
|
- listYx: [],
|
|
|
+ listYx: [],
|
|
|
+ deleteTitle :'删除',
|
|
|
+ kcId :'',
|
|
|
+ deleteConcent :'你确定要执行这个操作吗',
|
|
|
tabs: [{
|
|
|
id: 1,
|
|
|
name: '未绑定课程',
|
|
@@ -106,13 +111,17 @@
|
|
|
icon: 'success'
|
|
|
});
|
|
|
} else {
|
|
|
+ uni.showToast({
|
|
|
+ title: '添加失败',
|
|
|
+ icon: 'success'
|
|
|
+ });
|
|
|
return false
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- toDelete(data) {
|
|
|
+ deleteQuerenBtn(){
|
|
|
let req = {
|
|
|
- kcId: data.kcId,
|
|
|
+ kcId: this.kcId,
|
|
|
id: this.id
|
|
|
}
|
|
|
jiazhengKcDelete(req).then(res => {
|
|
@@ -123,10 +132,18 @@
|
|
|
icon: 'success'
|
|
|
});
|
|
|
} else {
|
|
|
+ uni.showToast({
|
|
|
+ title: '删除失败',
|
|
|
+ icon: 'success'
|
|
|
+ });
|
|
|
return false
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ toDelete(data) {
|
|
|
+ this.kcId = data.kcId
|
|
|
+ this.$refs.commonDialogRef.handleShow();
|
|
|
+ },
|
|
|
changeTab(data) {
|
|
|
this.current = data
|
|
|
if (this.current == 0) {
|