Browse Source

被委派信息

ts-reviewer-agree
xuesinan 4 years ago
parent
commit
989c1d8196
  1. 67
      index.html

67
index.html

@ -43,11 +43,11 @@
<button class="bg-blue-500 py-2 px-5 rounded text-white" onclick="p100.show()">测试组建2</button>
<div data-tname="考勤" data-pid="1451447721818071040" data-uid="1217647686598135808" data-rid="rid333" data-tid="tid444" data-did="did555" style="height:50px;width:100%">
<div data-root="p1449944565271502848" style="height:100%;width:100%;">
<div data-root="p1473222210855641088" class="mt-3" style="height: 100%; width: 100%;">
<div class="certificate-box px-2 py-1.5 flex justify-between w-full border border-gray-200 rounded-sm text-sm">
<p class="w-20 flex-shrink-0 text-gray-400">红头文件</p>
<div class="certificate py-1 flex justify-end" style="max-width: 100px; max-height: 100px;">
<img style="max-width: 100%; max-height: 100%;" onclick="p1449944565271502848.bigImg()" src="http://test.tall.wiki/staticrec/plan.png" />
<img style="max-width: 100%; max-height: 100%;" onclick="p1473222210855641088.bigImg()" src="http://test.tall.wiki/staticrec/plan.png" />
</div>
</div>
@ -55,9 +55,9 @@
<img id="img" src="http://test.tall.wiki/staticrec/plan.png" />
</div>
<div class="student-box mt-2.5 px-2 py-1.5 flex justify-between items-center w-full border border-gray-200 rounded-sm text-sm">
<div class="student-box mt-2.5 px-2 py-1.5 flex justify-between items-center w-full border border-gray-200 rounded-sm text-sm" style="display: none;">
<p style="color: #999999;">报名人员</p>
<button class="check-btn text-xs text-blue-400 border border-blue-400 rounded-full w-10 h-5" onclick="p1449944565271502848.peopleList()">查看</button>
<button class="check-btn text-xs text-blue-400 border border-blue-400 rounded-full w-10 h-5" onclick="p1473222210855641088.peopleList()">查看</button>
</div>
<div class="refuse-reason mt-2.5 px-2 py-1.5 flex justify-between w-full border border-gray-200 rounded-sm text-sm" style="display: none;">
@ -66,8 +66,8 @@
</div>
<div class="btn-group mt-4 flex justify-between items-center w-full text-sm">
<button class="border border-blue-500 text-blue-500 rounded-sm" style="width: 45%; height: 34px;" onclick="p1449944565271502848.refuse()">拒绝</button>
<button class="border border-blue-500 bg-blue-500 text-white rounded-sm" style="width: 45%; height: 34px;" onclick="p1449944565271502848.submit(1)">接受</button>
<button class="border border-blue-500 text-blue-500 rounded-sm" style="width: 45%; height: 34px;" onclick="p1473222210855641088.refuse()">拒绝</button>
<button class="border border-blue-500 bg-blue-500 text-white rounded-sm" style="width: 45%; height: 34px;" onclick="p1473222210855641088.submit(1)">接受</button>
</div>
<div class="pl-7 pr-7 pt fixed z-10 statusChoose bg-black bg-opacity-50" style="display:none;top: 0;bottom: 0;left: 0;right: 0; padding-top: calc((100vh - 250px) / 2);">
@ -80,8 +80,8 @@
</div>
</div>
<div class="border-t btn mt-6 flex justify-between">
<div class="flex-1 text-center border-r h-full" style="line-height: 3.375rem;" onclick="p1449944565271502848.hide()">取消</div>
<div class="flex-1 text-center h-full" style="line-height: 3.375rem;" onclick="p1449944565271502848.submit(2)">提交</div>
<div class="flex-1 text-center border-r h-full" style="line-height: 3.375rem;" onclick="p1473222210855641088.hide()">取消</div>
<div class="flex-1 text-center h-full" style="line-height: 3.375rem;" onclick="p1473222210855641088.submit(2)">提交</div>
</div>
</div>
</div>
@ -90,10 +90,6 @@
</div>
<script>
// let btns = document.querySelector('.btn-group'); // 通过拒绝按钮
// let refuse = document.querySelector('.refuse-status'); // 已拒绝
// let checkBtnDisabled = document.querySelector('.check-btn-disabled'); // 查看 -- 不可点击
// let checkBtn = document.querySelector('.check-btn'); // 查看
document.querySelector('.img-preview').onclick = function(e){
e = window.event || e;
let parentApp = document.getElementById('img');
@ -102,7 +98,7 @@
}
}
var p1449944565271502848 = {
var p1473222210855641088 = {
token: '',
projectId: '',
roleId: '',
@ -111,12 +107,11 @@
planTeacherId: '',
remark: '',
status: 0,
isStu: 0, // 是否已有学员报名
isAccept: 0, // 是否接受委派
refuseReason: '',
init() {
this.dom = document.querySelector("div[data-root=p1449944565271502848]");
this.dom = document.querySelector("div[data-root=p1473222210855641088]");
var domBox = this.dom.parentNode;
var title = this.dom.querySelector('.title');
@ -182,10 +177,6 @@
// 查询委派信息
getAppointStatus() {
var that = this;
// var teacherTitle = that.dom.querySelector('.teacher-title');
// var teacherBox = that.dom.querySelector('.teacher-box');
// teacherTitle.style.display = 'none';
// teacherBox.style.display = 'block';
fetch(`https://test.tall.wiki/gateway/sports/teacher/getAppoint`, {
headers: new Headers({
@ -213,29 +204,18 @@
if (that.status == 0) {
// 未接受
isAccept = 0;
// btns.style.display = 'block';
// refuse.style.display = 'none';
refuseReason.style.display = 'none';
} else if (that.status === 1) {
// 已接受
isAccept = 1;
// btns.style.display = 'none';
// refuse.style.display = 'block';
refuseReason.style.display = 'none';
this.getStudentList();
} else {
// 已拒绝
isAccept = 0;
// btns.style.display = 'none';
// refuse.style.display = 'none';
refuseReason.style.display = 'block';
refuseReason.innerHTML = data.remark;
}
// var teacherTitle = that.dom.querySelector('.teacher-title');
// var teacherBox = that.dom.querySelector('.teacher-box');
// teacherTitle.style.display = 'none';
// teacherBox.style.display = 'block';
}
}
}
@ -256,6 +236,10 @@
var that = this;
that.hide();
if (type === 1) {
that.dom.querySelector('.student-box').style.display='flex';
}
let reason = that.dom.querySelector(".reason").value;
if (type === 2 && !reason) {
window.alert("请填写驳回原因");
@ -288,13 +272,10 @@
// .then(function(res) {
// const { success, code, data, msg } = res;
// if (success && code === 200) {
// // btns.style.display = 'none';
// if (type === 1) {
// refuseReason.style.display = 'none';
// // refuse.style.display = 'none';
// } else {
// refuseReason.style.display = 'flex';
// // refuse.style.display = 'block';
// }
// } else {
// console.log('msg: ', msg);
@ -328,17 +309,7 @@
.then(function(res) {
const { success, code, data, msg } = res;
if (success && code === 200) {
if (!data) {
isStu = 1;
}
if (isStu === 1 && isAccept === 1) {
// checkBtnDisabled.style.display = 'none';
// checkBtn.style.display = 'block';
} else {
// checkBtnDisabled.style.display = 'block';
// checkBtn.style.display = 'none';
}
} else {
console.log('msg: ', msg);
}
@ -350,14 +321,6 @@
document.querySelector('.img-preview').style.display = 'flex';
},
// 查看红头文件
// lookFile() {
// const pId = this.dom.parentNode.getAttribute('data-pid');
// const uId = this.dom.parentNode.getAttribute('data-uid');
// const rId = this.dom.parentNode.getAttribute('data-rid');
// location.href=`https://test.tall.wiki/ts/file?pid=${pId}&uid=${uId}&rid=${rId}`
// },
// 查看学员列表
peopleList(){
const pId = this.dom.parentNode.getAttribute('data-pid');
@ -366,7 +329,7 @@
location.href=`https://test.tall.wiki/ts/peopleList?pid=${pId}&uid=${uId}&rid=${rId}`
}
}
p1449944565271502848.init()
p1473222210855641088.init()
</script>
</div>
</div>

Loading…
Cancel
Save