|
|
@ -20,13 +20,13 @@ |
|
|
|
|
|
|
|
<div class="w-full p-4 bg-gray-100"> |
|
|
|
<!-- 日常任务面板--> |
|
|
|
<div class="content p-3 h-46 bg-white rounded-lg"> |
|
|
|
<!-- <div class="content p-3 h-46 bg-white rounded-lg"> |
|
|
|
<div class="h-6 mb-2 bg-gray-100"></div> |
|
|
|
<div class="h-6 mb-2 bg-gray-100"></div> |
|
|
|
<div class="h-6 mb-2 bg-gray-100"></div> |
|
|
|
<div class="h-6 mb-2 bg-gray-100"></div> |
|
|
|
<div class="h-6 bg-gray-100"></div> |
|
|
|
</div> |
|
|
|
</div> --> |
|
|
|
</div> |
|
|
|
<div class="task-bar h-96 w-full bg-gray-100 p-4"> |
|
|
|
<div class="flex mb-3"> |
|
|
@ -42,9 +42,9 @@ |
|
|
|
<button class="bg-blue-500 py-2 px-5 rounded text-white" onclick="alert('hello')">测试组建1</button> |
|
|
|
<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:5.375rem;width:100%"> |
|
|
|
<div data-tname="考勤" data-pid="1451447721818071040" data-uid="1217647686598135808" data-rid="rid333" data-tid="tid444" data-did="did555" style="height:30rem;width:100%"> |
|
|
|
<div data-root="p1449944565028233216" style="height:100%;width:100%;"> |
|
|
|
<div class="train-plan-check"> |
|
|
|
<!-- <div class="train-plan-check"> |
|
|
|
<div class="title"></div> |
|
|
|
<div class="flex justify-between"> |
|
|
|
<div class="text-sm">培训计划审核</div> |
|
|
@ -76,9 +76,9 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> --> |
|
|
|
|
|
|
|
<div class="train-plan-reject" style="display: none;"> |
|
|
|
<!-- <div class="train-plan-reject" style="display: none;"> |
|
|
|
<div class="title"></div> |
|
|
|
<div class="flex justify-between"> |
|
|
|
<div class="text-sm">培训计划审核</div> |
|
|
@ -94,7 +94,7 @@ |
|
|
|
<p class="w-20 flex-shrink-0" style="color: #999999;">驳回原因</p></p> |
|
|
|
<div class="reason-box"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> --> |
|
|
|
|
|
|
|
<!-- <div class="train-plan-hide"> |
|
|
|
<div class="title"></div> |
|
|
@ -102,10 +102,58 @@ |
|
|
|
<div class="text-sm">培训计划审核</div> |
|
|
|
</div> |
|
|
|
</div> --> |
|
|
|
|
|
|
|
|
|
|
|
<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="p1449944565028233216.bigImg()" src="http://test.tall.wiki/staticrec/plan.png" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="img-preview fixed z-10 inset-0 bg-black bg-opacity-60 p-4 flex justify-center items-center" style="display: none;"> |
|
|
|
<img id="img" src="http://test.tall.wiki/staticrec/plan.png" /> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="reason-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 class="w-20 flex-shrink-0 text-gray-400">驳回原因</p></p> |
|
|
|
<div class="reason-content"></div> |
|
|
|
</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="p1449944565028233216.showReject()">驳回</button> |
|
|
|
<button class="border border-blue-500 bg-blue-500 text-white rounded-sm" style="width: 45%; height: 34px;" onclick="p1449944565028233216.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);"> |
|
|
|
<div class="bg-white"> |
|
|
|
<div style="height: 13rem;overflow-y: auto;"> |
|
|
|
<p class="mt-8 text-center">驳回原因</p> |
|
|
|
<div class="pl-6 pr-6"> |
|
|
|
<div class="mt-8 border-b pt-2 pb-2"> |
|
|
|
<input type="text" class="border-none outline-none reason" style="width: 100%;" placeholder="请输入驳回原因"> |
|
|
|
</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="p1449944565028233216.hide()">取消</div> |
|
|
|
<div class="flex-1 text-center h-full" style="line-height: 3.375rem;" onclick="p1449944565028233216.submit(2)">提交</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<script> |
|
|
|
let preview = document.querySelector('.img-preview'); // 预览 |
|
|
|
preview.onclick = function(e){ |
|
|
|
e = window.event || e; |
|
|
|
let parentApp = document.getElementById('img'); |
|
|
|
if(!parentApp.contains(e.target)){ |
|
|
|
preview.style.display = 'none'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
var p1449944565028233216 = { |
|
|
|
token: '', |
|
|
|
projectId: '', |
|
|
@ -172,40 +220,7 @@ |
|
|
|
.then(function(res) { |
|
|
|
const { success, code, data, msg } = res; |
|
|
|
if (success && code === 200) { |
|
|
|
if (!data) { |
|
|
|
// that.trainPlanHide.style.display = 'block'; |
|
|
|
// that.trainPlanCheck.style.display = 'none'; |
|
|
|
that.trainPlanReject.style.display = 'none'; |
|
|
|
} else { |
|
|
|
that.dom.querySelector('.file-name').innerHTML = data.name; |
|
|
|
that.dom.querySelector('.file-name-2').innerHTML = data.name; |
|
|
|
that.planId = data.id; |
|
|
|
|
|
|
|
let pass = that.dom.querySelector('.train-pass-status'); |
|
|
|
let btns = that.dom.querySelector('.train-pass-btn'); |
|
|
|
|
|
|
|
if (data.checkStatus === 0) { |
|
|
|
// that.trainPlanHide.style.display = 'none'; |
|
|
|
// that.trainPlanCheck.style.display = 'block'; |
|
|
|
that.trainPlanReject.style.display = 'none'; |
|
|
|
|
|
|
|
pass.style.display = 'none'; |
|
|
|
btns.style.display = 'block'; |
|
|
|
} else if (data.checkStatus === 1 || data.checkStatus === 2) { |
|
|
|
that.trainPlanHide.style.display = 'none'; |
|
|
|
|
|
|
|
if (data.checkStatus === 1) { |
|
|
|
that.trainPlanCheck.style.display = 'block'; |
|
|
|
that.trainPlanReject.style.display = 'none'; |
|
|
|
pass.style.display = 'block'; |
|
|
|
btns.style.display = 'none'; |
|
|
|
} else { |
|
|
|
that.dom.querySelector('.reason-box').innerHTML = data.rejectCause; |
|
|
|
that.trainPlanCheck.style.display = 'none'; |
|
|
|
that.trainPlanReject.style.display = 'block'; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
console.log('msg: ', msg); |
|
|
|
} |
|
|
@ -213,12 +228,12 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
// 查看红头文件 |
|
|
|
checkFile(){ |
|
|
|
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}` |
|
|
|
}, |
|
|
|
// checkFile(){ |
|
|
|
// 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}` |
|
|
|
// }, |
|
|
|
|
|
|
|
// 驳回弹框 |
|
|
|
showReject(){ |
|
|
@ -257,18 +272,21 @@ |
|
|
|
.then(function(res) { |
|
|
|
const { success, code, data, msg } = res; |
|
|
|
if (success && code === 200) { |
|
|
|
var trainPlanReject = that.dom.querySelector('.train-plan-reject'); |
|
|
|
// var trainPlanReject = that.dom.querySelector('.train-plan-reject'); |
|
|
|
// var trainPlanCheck = that.dom.querySelector('.train-plan-check'); |
|
|
|
that.dom.querySelector('.btn-group').style.display = 'none'; |
|
|
|
if (type == 2) { |
|
|
|
trainPlanReject.style.display = 'block'; |
|
|
|
that.dom.querySelector('.reason-box').style.display = 'flex'; |
|
|
|
that.dom.querySelector('.reason-content').innerHTML = reason; |
|
|
|
// trainPlanReject.style.display = 'block'; |
|
|
|
// trainPlanCheck.style.display = 'none'; |
|
|
|
} else { |
|
|
|
trainPlanReject.style.display = 'none'; |
|
|
|
// trainPlanReject.style.display = 'none'; |
|
|
|
// trainPlanCheck.style.display = 'block'; |
|
|
|
let pass = that.dom.querySelector('.train-pass-status'); |
|
|
|
let btns = that.dom.querySelector('.train-pass-btn'); |
|
|
|
pass.style.display = 'block'; |
|
|
|
btns.style.display = 'none'; |
|
|
|
// let pass = that.dom.querySelector('.train-pass-status'); |
|
|
|
// let btns = that.dom.querySelector('.train-pass-btn'); |
|
|
|
// pass.style.display = 'block'; |
|
|
|
// btns.style.display = 'none'; |
|
|
|
} |
|
|
|
} else { |
|
|
|
console.log('msg: ', msg); |
|
|
@ -280,7 +298,12 @@ |
|
|
|
hide(){ |
|
|
|
var statusChoose = this.dom.querySelector('.statusChoose'); |
|
|
|
statusChoose.style.display='none'; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 预览 |
|
|
|
bigImg() { |
|
|
|
preview.style.display = 'flex'; |
|
|
|
}, |
|
|
|
} |
|
|
|
p1449944565028233216.init() |
|
|
|
</script> |
|
|
|