|
|
@ -52,10 +52,10 @@ |
|
|
|
<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 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 class="flex flex-nowrap statusBtn mr-2 font-bold" style="display:none" onclick="p1419895899999707136.show()"> |
|
|
|
<span class="mr-3 startTime"></span> |
|
|
|
<div class="flex flex-nowrap statusBtn mr-2 font-bold" style="display:none"> |
|
|
|
<span class="mr-3 startTime" onclick="p1419895899999707136.show(this)"></span> |
|
|
|
<span class="text-red-500 disparity"></span> |
|
|
|
</div> |
|
|
|
<div class="flex flex-row-reverse items-center" onclick="p1419895899999707136.jumpDetails(this)"> |
|
|
@ -63,15 +63,15 @@ |
|
|
|
</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="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>介入时间</div> |
|
|
|
<div>谈话时间</div> |
|
|
|
<div class="text-blue-500" onclick="p1419895899999707136.changeTime()">确定</div> |
|
|
|
</div> |
|
|
|
<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 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 class="flex flex-row text-center"> |
|
|
@ -79,7 +79,7 @@ |
|
|
|
</div> |
|
|
|
<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 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 class="flex flex-row text-center"> |
|
|
@ -87,7 +87,7 @@ |
|
|
|
</div> |
|
|
|
<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 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 class="flex flex-row text-center"> |
|
|
@ -125,8 +125,8 @@ |
|
|
|
chooseTimeValue: 0, |
|
|
|
|
|
|
|
init() { |
|
|
|
this.dom = document.querySelector("div[data-root=p1419895899999707136]"); |
|
|
|
var domBox = this.dom.parentNode; |
|
|
|
this.dom = document.querySelector("div[data-root=p1419895899999707136]"); |
|
|
|
var domBox = this.dom.parentNode; |
|
|
|
var title = this.dom.querySelector('.title'); |
|
|
|
title.innerHTML = domBox.getAttribute('data-tname') |
|
|
|
this.planStart = domBox.getAttribute('data-pstart') |
|
|
@ -172,13 +172,12 @@ |
|
|
|
*/ |
|
|
|
choose(time){ |
|
|
|
var that = this; |
|
|
|
console.log(that.token) |
|
|
|
var params = JSON.stringify({ |
|
|
|
param: { |
|
|
|
codeAndAnswerList: [ |
|
|
|
{ |
|
|
|
answer: [time], |
|
|
|
questionCode: 'ZQTH-THSJ' |
|
|
|
questionCode: 'JMRSSJ' |
|
|
|
} |
|
|
|
], |
|
|
|
projectId: that.projectId, |
|
|
@ -224,7 +223,7 @@ |
|
|
|
var ms = (+this.planStart) - (+this.chooseTimeValue); //时间差的毫秒数 |
|
|
|
var morbidityTime = Math.ceil(ms/1000/60); |
|
|
|
disparity.innerHTML = morbidityTime + "min" |
|
|
|
startTime.innerHTML = this.setTime(this.realStart) |
|
|
|
startTime.innerHTML = this.setTime(this.chooseTimeValue) |
|
|
|
if(morbidityTime >= 0){ |
|
|
|
disparity.className="text-red-500 disparity" |
|
|
|
}else{ |
|
|
@ -242,7 +241,7 @@ |
|
|
|
var minute = (time.getMinutes()).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}` |
|
|
|
this.chooseTimeValue = new Date(chooseTime.replace(/-/g,'/')).getTime() |
|
|
|
if(chooseTime){ |
|
|
|
await this.choose(new Date(chooseTime).getTime()) |
|
|
|
await this.choose(this.chooseTimeValue) |
|
|
|
this.cancelTime() |
|
|
|
} |
|
|
|
}, |
|
|
@ -320,6 +319,12 @@ |
|
|
|
var yearDom = this.dom.querySelector('.year-box'); |
|
|
|
var monthDom = this.dom.querySelector('.month-box'); |
|
|
|
var dateDom = this.dom.querySelector('.day-box'); |
|
|
|
// 清空 |
|
|
|
hourDom.innerHTML = ''; |
|
|
|
minDom.innerHTML = ''; |
|
|
|
yearDom.innerHTML = ''; |
|
|
|
monthDom.innerHTML = ''; |
|
|
|
dateDom.innerHTML = ''; |
|
|
|
var nowYear = new Date().getFullYear(); |
|
|
|
var nowMonth = new Date().getMonth(); |
|
|
|
var nowDay = new Date().getDate()-1; |
|
|
@ -330,7 +335,6 @@ |
|
|
|
var dayTop = 0; |
|
|
|
var hourTop = 0; |
|
|
|
var minTop = 0; |
|
|
|
console.log(nowYear,nowMonth,nowDay,nowHour,nowMin) |
|
|
|
/* 生成小时数组 */ |
|
|
|
for(let i=0;i<24;i++) { |
|
|
|
var div = document.createElement('div'); |
|
|
|