@@ -42,40 +42,40 @@ export default{ | |||
init() { | |||
this.keyValue = this.GET_PARAM(); //获取页面传递参数 | |||
// console.log(this.keyValue); | |||
let _this = this; | |||
_this.LOADING('加载数据中…'); | |||
_this.HTTP_GET('learun/OpenLessonPlanOfElectiveStudent/form', _this.keyValue, '加载数据时出错').then(res => { | |||
console.log(_postData,"_postData") | |||
this.LOADING('加载数据中…'); | |||
this.HTTP_GET('learun/OpenLessonPlanOfElectiveStudent/form', this.keyValue, '加载数据时出错').then(res => { | |||
// console.log(_postData,"_postData") | |||
this.HIDE_LOADING(); | |||
// console.log(res); | |||
_this.data = res.JournalReceive; | |||
this.data = res.JournalReceive; | |||
}); | |||
}, | |||
fromBtn() { | |||
var _postData = {} | |||
let _this = this; | |||
// let _this = this; | |||
let user = this.GET_GLOBAL('loginUser');; | |||
_postData.keyValue = this.keyValue; | |||
_postData.StuNo = user.account; | |||
_this.LOADING('正在提交…'); | |||
_this.HTTP_POST('learun/OpenLessonPlanOfElectiveStudent/SignInByMobile', _postData, '加载数据时出错').then((res,info, code) => { | |||
this.LOADING('正在提交…'); | |||
this.HTTP_POST('learun/OpenLessonPlanOfElectiveStudent/SignInByMobile', _postData, '加载数据时出错').then((res,info, code) => { | |||
// this.HIDE_LOADING(); | |||
console.log(res); | |||
// console.log(info); | |||
// console.log(code); | |||
if (res) {// 表单数据保存成功 | |||
//判断队列结果 | |||
let timer = setInterval(function () { | |||
// let timer = setInterval(() => { | |||
// _this.LOADING('正在提交…'); | |||
_this.HTTP_POST('learun/OpenLessonPlanOfElectiveStudent/GetApplyResult', _postData, '加载数据时出错').then((dataresult) => { | |||
_this.HIDE_LOADING(); | |||
this.HTTP_POST('learun/OpenLessonPlanOfElectiveStudent/GetApplyResult', _postData, '选修课报名失败').then((dataresult) => { | |||
console.log(dataresult) | |||
clearInterval(timer); | |||
_this.EMIT('OpenLessonPlanOfElectiveStudent') | |||
_this.TOAST(dataresult.msg); | |||
if(!dataresult)return | |||
this.HIDE_LOADING(); | |||
this.EMIT('OpenLessonPlanOfElectiveStudent') | |||
// _this.TOAST(dataresult.msg || dataresult.info); | |||
// _this.NAV_BACK() | |||
}); | |||
}, 5000); | |||
// }, 5000); | |||
} | |||
}); | |||
@@ -47,8 +47,8 @@ | |||
<text>已报名人数:</text> | |||
{{ item.StuNumOfApplyPre }} | |||
</view> | |||
<view class="pageType">{{ typePd(item.StatusPre) }}</view> | |||
<view class="delbtn" @click.stop="delTap(item)">取消报名</view> | |||
<view class="pageType">{{ typePd(item.Status) }}</view> | |||
<view class="delbtn" v-if="item.Status == 1" @click.stop="delTap(item)">取消报名</view> | |||
</view> | |||
</l-customlist> | |||
</l-scroll-list> | |||
@@ -81,8 +81,9 @@ | |||
this.ON('OpenLessonPlanOfElectiveStudent', this.refreshList); | |||
// 拉取加载列表和数据源 | |||
Promise.all([() => {}]); | |||
var _this = this; | |||
// var _this = this; | |||
this.user = this.GET_GLOBAL('loginUser'); | |||
console.log(this.user) | |||
this.fetchList(); | |||
this.ready = true; | |||
}, | |||
@@ -91,11 +92,11 @@ | |||
if (this.page > this.total) { | |||
return; | |||
} | |||
let _this = this; | |||
// let _this = this; | |||
let _postParam = { | |||
pagination: { | |||
rows: _this.rows, | |||
page: _this.page, | |||
rows: this.rows, | |||
page: this.page, | |||
sidx: 'LessonNo', | |||
sord: 'asc' | |||
}, | |||
@@ -103,17 +104,17 @@ | |||
}; | |||
if (true) { | |||
_postParam.queryJson = JSON.stringify({ | |||
StuNo: _this.user.account, | |||
StuMajorNo: _this.user.majorno, | |||
StuGrade: _this.user.grade, | |||
StuNo: this.user.account, | |||
StuMajorNo: this.user.majorno, | |||
StuGrade: this.user.grade, | |||
}); | |||
} | |||
_this.LOADING('加载数据中…') | |||
_this.HTTP_GET('learun/OpenLessonPlanOfElectiveStudent/pagelist', _postParam, '加载数据时出错').then(res => { | |||
_this.HIDE_LOADING(); | |||
this.LOADING('加载数据中…') | |||
this.HTTP_GET('learun/OpenLessonPlanOfElectiveStudent/pagelist', _postParam, '加载数据时出错').then(res => { | |||
this.HIDE_LOADING(); | |||
this.data = this.data.concat(res.rows); | |||
_this.total = res.total; | |||
_this.records = res.records; | |||
this.total = res.total; | |||
this.records = res.records; | |||
this.page = res.page + 1; | |||
this.loadState = res.page >= res.total ? '已加载所有项目' : '向下翻以加载更多'; | |||
// console.log(_this.data); | |||
@@ -137,20 +138,20 @@ | |||
}, | |||
delTap(item) { | |||
// console.log(item) | |||
let _this = this; | |||
// let this = this; | |||
this.CONFIRM('数字化校园提示', '确定要取消报名吗?', true).then(res => { | |||
if (res) { | |||
let _postData = { | |||
keyValue: item.Id, | |||
StuNo: _this.user.account | |||
StuNo: this.user.account | |||
} | |||
_this.LOADING('正在取消报名…') | |||
_this.HTTP_POST( | |||
this.LOADING('正在取消报名…') | |||
this.HTTP_POST( | |||
'learun/OpenLessonPlanOfElectiveStudent/Cancel', | |||
_postData, | |||
'加载数据时出错' | |||
).then(data => { | |||
_this.HIDE_LOADING() | |||
this.HIDE_LOADING() | |||
// console.log(data) | |||
if (data) { // 成功 | |||
this.TOAST('取消报名成功!'); | |||
@@ -80,7 +80,6 @@ export default { | |||
this.ON('EducationalAdministrationBookBorrow-list-change', this.refreshList); | |||
// 拉取加载列表和数据源 | |||
Promise.all([() => {}]); | |||
var _this = this; | |||
this.user = this.GET_GLOBAL('loginUser'); | |||
this.fetchList(); | |||
this.ready = true; | |||
@@ -90,11 +89,10 @@ export default { | |||
if (this.page > this.total) { | |||
return; | |||
} | |||
let _this = this; | |||
let _postParam = { | |||
pagination: { | |||
rows: _this.rows, | |||
page: _this.page, | |||
rows: this.rows, | |||
page: this.page, | |||
sidx: 'LessonNo', | |||
sord: 'asc' | |||
}, | |||
@@ -102,16 +100,16 @@ export default { | |||
}; | |||
if (true) { | |||
_postParam.queryJson = JSON.stringify({ | |||
StuNo: _this.user.account | |||
StuNo: this.user.account | |||
}); | |||
} | |||
_this.LOADING('加载数据中…') | |||
_this.HTTP_GET('learun/OpenLessonPlanOfElectiveStudent/studentpagelist', _postParam, '加载数据时出错').then(res => { | |||
_this.HIDE_LOADING(); | |||
this.LOADING('加载数据中…') | |||
this.HTTP_GET('learun/OpenLessonPlanOfElectiveStudent/studentpagelist', _postParam, '加载数据时出错').then(res => { | |||
this.HIDE_LOADING(); | |||
// console.log(res); | |||
this.data = this.data.concat(res.rows); | |||
_this.total = res.total; | |||
_this.records = res.records; | |||
this.total = res.total; | |||
this.records = res.records; | |||
this.page = res.page + 1; | |||
this.loadState = res.page >= res.total ? '已加载所有项目' : '向下翻以加载更多'; | |||
// console.log(_this.data); | |||