Browse Source

备注修改

16-plugin-tanhua
aBin 4 years ago
parent
commit
371b6b5e6b
  1. 36
      index.html

36
index.html

@ -52,10 +52,10 @@
<div data-root="p1419895899999707136" class="flex flex-row items-center" style="height:100%;width:100%;"> <div data-root="p1419895899999707136" class="flex flex-row items-center" style="height:100%;width:100%;">
<div class="flex-1 title" onclick="p1419895899999707136.jumpDetails(this)"></div> <div class="flex-1 title" onclick="p1419895899999707136.jumpDetails(this)"></div>
<div class="flex flex-nowrap startBtn mr-2"> <div class="flex flex-nowrap startBtn mr-2">
<button class="bg-blue-500 text-xs rounded-full py-1 px-5 text-white" onclick="p1419895899999707136.show()">开始</button> <button class="bg-blue-500 text-xs rounded-full py-1 px-5 text-white" onclick="p1419895899999707136.show(this)">开始</button>
</div> </div>
<div class="flex flex-nowrap statusBtn mr-2 font-bold" style="display:none" onclick="p1419895899999707136.show()"> <div class="flex flex-nowrap statusBtn mr-2 font-bold" style="display:none">
<span class="mr-3 startTime"></span> <span class="mr-3 startTime" onclick="p1419895899999707136.show(this)"></span>
<span class="text-red-500 disparity"></span> <span class="text-red-500 disparity"></span>
</div> </div>
<div class="flex flex-row-reverse items-center" onclick="p1419895899999707136.jumpDetails(this)"> <div class="flex flex-row-reverse items-center" onclick="p1419895899999707136.jumpDetails(this)">
@ -63,15 +63,15 @@
</div> </div>
<div class="time-box w-screen h-screen fixed z-10" style="background: rgba(0,0,0,0.65);top:0;left:0;display:none"> <div class="time-box w-screen h-screen fixed z-10" style="background: rgba(0,0,0,0.65);top:0;left:0;display:none">
<div class="flex flex-col absolute w-full" style="background:#fff;bottom: 0;height:300px;border-radius:8px 8px 0 0"> <div class="flex flex-col absolute w-full" style="background:#fff;bottom: 0;height:300px;border-radius:8px 8px 0 0">
<div class="flex justify-between p-2 border-gray-200 border-b-2" style="height:44px"> <div class="flex justify-between p-2 border-gray-200 border-b-2" style="height:44px;">
<div class="text-gray-500" onclick="p1419895899999707136.cancelTime()">取消</div> <div class="text-gray-500" onclick="p1419895899999707136.cancelTime()">取消</div>
<div>介入时间</div> <div>谈话时间</div>
<div class="text-blue-500" onclick="p1419895899999707136.changeTime()">确定</div> <div class="text-blue-500" onclick="p1419895899999707136.changeTime()">确定</div>
</div> </div>
<div class="flex flex-1 items-center overflow-hidden" style="padding:0 16px"> <div class="flex flex-1 items-center overflow-hidden" style="padding:0 16px">
<div class="h-full flex flex-row text-center w-1/6 overflow-x-hidden relative"> <div class="h-full flex flex-row text-center w-1/6 overflow-x-hidden relative">
<div class="h-full mx-auto absolute w-full" style="right:-8px"> <div class="h-full mx-auto absolute w-full" style="right:-8px">
<div class="h-full mx-auto year-box overflow-y-scroll" style="padding: 116px 16px 116px 0;"></div> <div class="h-full mx-auto year-box overflow-y-scroll" style="padding: 116px 16px 116px 0"></div>
</div> </div>
</div> </div>
<div class="flex flex-row text-center"> <div class="flex flex-row text-center">
@ -79,7 +79,7 @@
</div> </div>
<div class="h-full flex flex-row text-center w-1/6 overflow-x-hidden relative"> <div class="h-full flex flex-row text-center w-1/6 overflow-x-hidden relative">
<div class="h-full mx-auto absolute w-full" style="right:-8px"> <div class="h-full mx-auto absolute w-full" style="right:-8px">
<div class="h-full month-box mx-auto overflow-y-scroll" style="padding: 116px 16px 116px 0;"></div> <div class="h-full month-box mx-auto overflow-y-scroll" style="padding: 116px 16px 116px 0"></div>
</div> </div>
</div> </div>
<div class="flex flex-row text-center"> <div class="flex flex-row text-center">
@ -87,7 +87,7 @@
</div> </div>
<div class="h-full flex flex-row text-center w-1/6 overflow-x-hidden relative"> <div class="h-full flex flex-row text-center w-1/6 overflow-x-hidden relative">
<div class="h-full mx-auto absolute w-full" style="right:-8px"> <div class="h-full mx-auto absolute w-full" style="right:-8px">
<div class="h-full day-box mx-auto overflow-y-scroll" style="padding: 116px 16px 116px 0;"></div> <div class="h-full day-box mx-auto overflow-y-scroll" style="padding: 116px 16px 116px 0"></div>
</div> </div>
</div> </div>
<div class="flex flex-row text-center"> <div class="flex flex-row text-center">
@ -125,8 +125,8 @@
chooseTimeValue: 0, chooseTimeValue: 0,
init() { init() {
this.dom = document.querySelector("div[data-root=p1419895899999707136]"); this.dom = document.querySelector("div[data-root=p1419895899999707136]");
var domBox = this.dom.parentNode; var domBox = this.dom.parentNode;
var title = this.dom.querySelector('.title'); var title = this.dom.querySelector('.title');
title.innerHTML = domBox.getAttribute('data-tname') title.innerHTML = domBox.getAttribute('data-tname')
this.planStart = domBox.getAttribute('data-pstart') this.planStart = domBox.getAttribute('data-pstart')
@ -172,13 +172,12 @@
*/ */
choose(time){ choose(time){
var that = this; var that = this;
console.log(that.token)
var params = JSON.stringify({ var params = JSON.stringify({
param: { param: {
codeAndAnswerList: [ codeAndAnswerList: [
{ {
answer: [time], answer: [time],
questionCode: 'ZQTH-THSJ' questionCode: 'JMRSSJ'
} }
], ],
projectId: that.projectId, projectId: that.projectId,
@ -224,7 +223,7 @@
var ms = (+this.planStart) - (+this.chooseTimeValue); //时间差的毫秒数 var ms = (+this.planStart) - (+this.chooseTimeValue); //时间差的毫秒数
var morbidityTime = Math.ceil(ms/1000/60); var morbidityTime = Math.ceil(ms/1000/60);
disparity.innerHTML = morbidityTime + "min" disparity.innerHTML = morbidityTime + "min"
startTime.innerHTML = this.setTime(this.realStart) startTime.innerHTML = this.setTime(this.chooseTimeValue)
if(morbidityTime >= 0){ if(morbidityTime >= 0){
disparity.className="text-red-500 disparity" disparity.className="text-red-500 disparity"
}else{ }else{
@ -242,7 +241,7 @@
var minute = (time.getMinutes()).toString().padStart(2, '0') var minute = (time.getMinutes()).toString().padStart(2, '0')
var second = (time.getSeconds()).toString().padStart(2, '0') var second = (time.getSeconds()).toString().padStart(2, '0')
return minute + ':' + second return hours + ':' + minute
}, },
// 开始到场 // 开始到场
@ -308,7 +307,7 @@
var chooseTime = `${year}-${month}-${day} ${hour}:${min}` var chooseTime = `${year}-${month}-${day} ${hour}:${min}`
this.chooseTimeValue = new Date(chooseTime.replace(/-/g,'/')).getTime() this.chooseTimeValue = new Date(chooseTime.replace(/-/g,'/')).getTime()
if(chooseTime){ if(chooseTime){
await this.choose(new Date(chooseTime).getTime()) await this.choose(this.chooseTimeValue)
this.cancelTime() this.cancelTime()
} }
}, },
@ -320,6 +319,12 @@
var yearDom = this.dom.querySelector('.year-box'); var yearDom = this.dom.querySelector('.year-box');
var monthDom = this.dom.querySelector('.month-box'); var monthDom = this.dom.querySelector('.month-box');
var dateDom = this.dom.querySelector('.day-box'); var dateDom = this.dom.querySelector('.day-box');
// 清空
hourDom.innerHTML = '';
minDom.innerHTML = '';
yearDom.innerHTML = '';
monthDom.innerHTML = '';
dateDom.innerHTML = '';
var nowYear = new Date().getFullYear(); var nowYear = new Date().getFullYear();
var nowMonth = new Date().getMonth(); var nowMonth = new Date().getMonth();
var nowDay = new Date().getDate()-1; var nowDay = new Date().getDate()-1;
@ -330,7 +335,6 @@
var dayTop = 0; var dayTop = 0;
var hourTop = 0; var hourTop = 0;
var minTop = 0; var minTop = 0;
console.log(nowYear,nowMonth,nowDay,nowHour,nowMin)
/* 生成小时数组 */ /* 生成小时数组 */
for(let i=0;i<24;i++) { for(let i=0;i<24;i++) {
var div = document.createElement('div'); var div = document.createElement('div');

Loading…
Cancel
Save