Browse Source

培训计划发布

tiaosheng-msz
xuesinan 4 years ago
parent
commit
0ecdf7f30e
  1. 115
      index.html

115
index.html

@ -43,32 +43,34 @@
<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%;">
<div class="title"></div>
<div class="flex justify-between mt-4">
<div class="text-sm">培训发布</div>
<button class="nightClockBtn bg-blue-500 text-xs rounded-md py-1 px-3 text-white">发布</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">
<p style="color: #999999;">导师委派</p>
<div class="flex justify-between rounded-md startBtnBox" onclick="show()">
<div class="startBtn mr-1">请选择委派导师</div>
<img style="width:15px" src="https://www.tall.wiki/staticrec/icon/down.svg" />
<div data-root="p1449944565242142720" style="height:100%;width:100%;display: none;">
<div class="train-check">
<div class="title"></div>
<div class="flex justify-between mt-4">
<div class="text-sm">培训发布</div>
<button class="nightClockBtn bg-blue-500 text-xs rounded-md py-1 px-3 text-white">发布</button>
</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">
<span class="text-gray-400" onclick="hide()">取消</span>
<span class="font-bold">请选择委派导师</span>
<span class="text-blue-500" onclick="choose()">确定</span>
<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">
<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="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">
<span class="text-gray-400" onclick="p1449944565242142720.hide()">取消</span>
<span class="font-bold">请选择委派导师</span>
<span class="text-blue-500" onclick="p1449944565242142720.choose()">确定</span>
</div>
<div class="bg-gray-200" style="width:100%;height: 1px"></div>
<ul class="flex flex-col text-center" style="height: 240px;overflow-y: auto;"></ul>
</div>
<div class="bg-gray-200" style="width:100%;height: 1px"></div>
<ul class="flex flex-col text-center" style="height: 240px;overflow-y: auto;"></ul>
</div>
</div>
</div>
@ -81,11 +83,6 @@
roleId: '',
dom: '',
lists: [],
currentIndex: '',
memberId: '', // 打卡人id
checkerId: '', // 审核员id
checkerName: '', // 审核员
id: '', // 记录id
init() {
this.dom = document.querySelector("div[data-root=p1449944565242142720]");
@ -111,14 +108,70 @@
const { success, code, data, msg } = res;
if (success && code === 200) {
that.token = data.token;
// 查询考勤信息
that.getClockQuery()
// 查询培训计划是否待审核
that.getTrainCheck()
} else {
console.log('msg: ', msg);
}
});
},
// 查询培训计划是否待审核
getTrainPlan(){
var that = this
fetch(`https://test.tall.wiki/gateway/sports/training/get`, {
headers: new Headers({
'Authorization': 'Bearer ' + that.token,
'Content-Type': 'application/json; charset=utf-8'
}),
method: 'POST',
body: JSON.stringify({
projectId: that.projectId
})
})
.then(function(response) {
return response.json();
})
.then(function(res) {
const { success, code, data, msg } = res;
if (success && code === 200) {
var trainPlan = that.dom.querySelector('.train-check');
if (data && data.checkStatus === 1) {
trainPlan.style.display = 'block'
} else {
trainPlan.style.display = 'none'
}
} else {
console.log('msg: ', msg);
}
});
},
/**
* 培训导师列表
*/
getTeacherList() {
var that = this
fetch(`https://test.tall.wiki/gateway/sports/teacher/query`, {
headers: new Headers({
'Authorization': 'Bearer ' + that.token,
'Content-Type': 'application/json; charset=utf-8'
}),
method: 'POST'
})
.then(function(response) {
return response.json();
})
.then(function(res) {
const { success, code, data, msg } = res;
if (success && code === 200) {
console.log("导师列表:", res)
that.lists = data;
} else {
console.log('msg: ', msg);
}
});
},
// 显示选择框
show(){

Loading…
Cancel
Save