|
|
@ -43,24 +43,37 @@ |
|
|
|
<button class="bg-blue-500 py-2 px-5 rounded text-white" onclick="p100.show()">测试组建2</button> |
|
|
|
|
|
|
|
<div data-tname="考勤" data-pid="1433332016270811136" data-uid="1217647686598135808" data-rid="rid333" data-tid="tid444" data-did="did555" style="height:50px;width:100%"> |
|
|
|
<div data-root="p1449944565242142720" style="height:100%;width:100%;display: none;"> |
|
|
|
<div class="train-check"> |
|
|
|
<div data-root="p1449944565242142720" style="height:100%;width:100%;"> |
|
|
|
<div class="train-check" style="display: none;"> |
|
|
|
<div class="title"></div> |
|
|
|
<div class="flex justify-between mt-4"> |
|
|
|
<div class="flex justify-between"> |
|
|
|
<div class="text-sm">培训发布</div> |
|
|
|
<button class="nightClockBtn bg-blue-500 text-xs rounded-md py-1 px-3 text-white">发布</button> |
|
|
|
<button class="release-btn bg-blue-500 text-xs rounded-md py-1 px-3 text-white" onclick="p1449944565242142720.release()">发布</button> |
|
|
|
</div> |
|
|
|
<div class="border-2 w-full mt-2.5 flex justify-between p-2 text-sm"> |
|
|
|
<p style="color: #999999;">山西跳协**培训红头文件</p> |
|
|
|
<button class="text-xs text-blue-400 border border-blue-400 rounded-full w-10 h-5">查看</button> |
|
|
|
</div> |
|
|
|
<div class="border-2 w-full mt-2.5 flex justify-between p-2 text-sm"> |
|
|
|
<div class="border-2 w-full mt-2.5 flex justify-between p-2 text-sm select-teacher"> |
|
|
|
<p style="color: #999999;">导师委派</p> |
|
|
|
<div class="flex justify-between rounded-md startBtnBox" onclick="p1449944565242142720.show()"> |
|
|
|
<div class="startBtn mr-1">请选择委派导师</div> |
|
|
|
<img style="width:15px" src="https://www.tall.wiki/staticrec/icon/down.svg" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="border-2 w-full mt-2.5 flex justify-between p-2 text-sm selected-teacher" style="display: none;"> |
|
|
|
<p style="color: #999999;">导师委派</p> |
|
|
|
<div class="flex justify-between rounded-md"> |
|
|
|
<div class="startBtn mr-1">导师</div> |
|
|
|
<div class="text-yellow-400">未接受</div> |
|
|
|
</div> |
|
|
|
<div class="flex justify-between rounded-md"> |
|
|
|
<div class="startBtn mr-1">导师</div> |
|
|
|
<div class="text-yellow-400">已接受</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="w-screen h-screen fixed z-10 statusChoose bg-black bg-opacity-50" style="display:none;top: 0;left: 0;"> |
|
|
|
<div class="flex flex-col absolute w-full bg-white" style="bottom: 0;"> |
|
|
|
<div class="flex flex-row justify-between px-5 py-4"> |
|
|
@ -109,7 +122,9 @@ |
|
|
|
if (success && code === 200) { |
|
|
|
that.token = data.token; |
|
|
|
// 查询培训计划是否待审核 |
|
|
|
that.getTrainCheck() |
|
|
|
that.getTrainPlan() |
|
|
|
// 委派导师列表 |
|
|
|
that.getTeacherList() |
|
|
|
} else { |
|
|
|
console.log('msg: ', msg); |
|
|
|
} |
|
|
@ -136,6 +151,7 @@ |
|
|
|
const { success, code, data, msg } = res; |
|
|
|
if (success && code === 200) { |
|
|
|
var trainPlan = that.dom.querySelector('.train-check'); |
|
|
|
// trainPlan.style.display = 'block' |
|
|
|
if (data && data.checkStatus === 1) { |
|
|
|
trainPlan.style.display = 'block' |
|
|
|
} else { |
|
|
@ -173,6 +189,38 @@ |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 发布 |
|
|
|
release() { |
|
|
|
var that = this; |
|
|
|
fetch(`https://test.tall.wiki/gateway/sports/teacher/appoint`, { |
|
|
|
headers: new Headers({ |
|
|
|
'Authorization': 'Bearer ' + that.token, |
|
|
|
'Content-Type': 'application/json; charset=utf-8' |
|
|
|
}), |
|
|
|
method: 'POST', |
|
|
|
body: JSON.stringify({ |
|
|
|
planId: '', |
|
|
|
teacherIds: [] |
|
|
|
}) |
|
|
|
}) |
|
|
|
.then(function(response) { |
|
|
|
return response.json(); |
|
|
|
}) |
|
|
|
.then(function(res) { |
|
|
|
const { success, code, data, msg } = res; |
|
|
|
if (success && code === 200) { |
|
|
|
var teacherList = that.dom.querySelector('.selected-teacher'); |
|
|
|
var teacherSelect = that.dom.querySelector('.select-teacher'); |
|
|
|
var releaseBtn = that.dom.querySelector('.release-btn'); |
|
|
|
teacherSelect.style.display = 'none'; |
|
|
|
teacherList.style.display = 'block'; |
|
|
|
releaseBtn.style.display = 'none'; |
|
|
|
} else { |
|
|
|
console.log('msg: ', msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 显示选择框 |
|
|
|
show(){ |
|
|
|
var statusChoose = this.dom.querySelector('.statusChoose'); |
|
|
@ -208,12 +256,12 @@ |
|
|
|
* @param { Number } codeAndAnswerList 提交人类型(0平车 1人) |
|
|
|
*/ |
|
|
|
choose(){ |
|
|
|
// const that = this; |
|
|
|
const that = this; |
|
|
|
// const { dom } = that; |
|
|
|
// var startBtn = document.querySelector('.startBtn'); |
|
|
|
// startBtn.innerHTML = that.lists[that.currentIndex].name; |
|
|
|
var startBtn = document.querySelector('.startBtn'); |
|
|
|
startBtn.innerHTML = that.lists[that.currentIndex].name; |
|
|
|
// that.checkerId = that.lists[that.currentIndex].memberId |
|
|
|
that.hide() |
|
|
|
that.hide(); |
|
|
|
}, |
|
|
|
|
|
|
|
// 取消 |
|
|
|