Browse Source

17静脉溶栓

detailsPage
aBin 4 years ago
parent
commit
585fea8c74
  1. 73
      index.html

73
index.html

@ -62,7 +62,7 @@
<img style="height:16px" src="https://www.tall.wiki/staticrec/photos/right.png">
</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 h-2/6 absolute w-full" style="background:#fff;bottom: 0;">
<div class="flex flex-col absolute w-full" style="background:#fff;bottom: 0;height:300px">
<div class="flex justify-between p-2 border-gray-200 border-b-2" style="height:44px;">
<div class="text-gray-500" onclick="p1419895941603008512.cancelTime()">取消</div>
<div>分诊时间</div>
@ -71,7 +71,7 @@
<div class="flex flex-1 items-center overflow-hidden">
<div class="h-full flex flex-row text-center w-1/6 overflow-x-hidden relative">
<div class="h-full mx-auto absolute" style="right:-8px">
<div class="h-full mx-auto year-box overflow-y-scroll" style="padding: 76px 16px 76px 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" style="right:-8px">
<div class="h-full month-box mx-auto overflow-y-scroll" style="padding: 76px 16px 76px 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" style="right:-8px">
<div class="h-full day-box mx-auto overflow-y-scroll" style="padding: 76px 16px 76px 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">
@ -95,7 +95,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" style="right:-8px">
<div class="h-full hour-box mx-auto overflow-y-scroll" style="padding: 76px 16px 76px 0;"></div>
<div class="h-full hour-box mx-auto overflow-y-scroll" style="padding: 116px 16px 116px 0;"></div>
</div>
</div>
<div class="flex flex-row text-center">
@ -103,7 +103,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" style="right:-8px">
<div class="h-full min-box mx-auto overflow-y-scroll" style="padding: 76px 16px 76px 0;"></div>
<div class="h-full min-box mx-auto overflow-y-scroll" style="padding: 116px 16px 116px 0;"></div>
</div>
</div>
<div class="flex flex-row text-center">
@ -116,12 +116,13 @@
</div>
<script>
const p1419895941603008512 = {
var p1419895941603008512 = {
token: '',
dom: '',
projectId: '',
planStart: '',
realStart: '',
chooseTimeValue: 0,
init() {
this.dom = document.querySelector("div[data-root=p1419895941603008512]");
@ -130,6 +131,7 @@
title.innerHTML = domBox.getAttribute('data-tname')
this.planStart = domBox.getAttribute('data-pstart')
this.realStart = domBox.getAttribute('data-rstart')
this.chooseTimeValue = +this.realStart
this.setTimeData()
// 获取父元素携带的参数
@ -147,7 +149,7 @@
return response.json();
})
.then(function(res) {
const { success, code, data, msg } = res;
var { success, code, data, msg } = res;
if (success && code === 200) {
that.token = data.token;
} else {
@ -169,9 +171,9 @@
* @param { Number } codeAndAnswerList 提交人类型(0平车 1人)
*/
choose(time){
const that = this;
var that = this;
console.log(that.token)
const params = JSON.stringify({
var params = JSON.stringify({
param: {
codeAndAnswerList: [
{
@ -199,7 +201,7 @@
that.setDate()
// TODO:
}).then(function(res){
const { success, code, data, msg } = res;
var { success, code, data, msg } = res;
if (success && code === 200) {
that.setDate()
} else {
@ -210,7 +212,7 @@
// 界面渲染
setDate(res) {
const { dom } = this;
var { dom } = this;
var startBtn = dom.querySelector('.startBtn');
var statusBtn = dom.querySelector('.statusBtn');
var startTime = dom.querySelector('.startTime');
@ -219,7 +221,7 @@
startBtn.style.display='none';
statusBtn.style.display='block';
var ms = (+this.planStart) - (+this.realStart); //时间差的毫秒数
var ms = (+this.planStart) - (+this.chooseTimeValue); //时间差的毫秒数
var morbidityTime = Math.ceil(ms/1000/60);
disparity.innerHTML = morbidityTime + "min"
startTime.innerHTML = this.setTime(this.realStart)
@ -234,21 +236,21 @@
setTime(timestamp) {
let time = new Date(+timestamp)
let year = time.getFullYear()
const month = (time.getMonth() + 1).toString().padStart(2, '0')
const date = (time.getDate()).toString().padStart(2, '0')
const hours = (time.getHours()).toString().padStart(2, '0')
const minute = (time.getMinutes()).toString().padStart(2, '0')
const second = (time.getSeconds()).toString().padStart(2, '0')
var month = (time.getMonth() + 1).toString().padStart(2, '0')
var date = (time.getDate()).toString().padStart(2, '0')
var hours = (time.getHours()).toString().padStart(2, '0')
var minute = (time.getMinutes()).toString().padStart(2, '0')
var second = (time.getSeconds()).toString().padStart(2, '0')
return minute + ':' + second
},
// 开始到场
jumpDetails(that) {
const pId = that.parentNode.parentNode.getAttribute('data-pid');
const rId = that.parentNode.parentNode.getAttribute('data-rid');
const uId = that.parentNode.parentNode.getAttribute('data-uid');
const tId = that.parentNode.parentNode.getAttribute('data-tid');
var pId = that.parentNode.parentNode.getAttribute('data-pid');
var rId = that.parentNode.parentNode.getAttribute('data-rid');
var uId = that.parentNode.parentNode.getAttribute('data-uid');
var tId = that.parentNode.parentNode.getAttribute('data-tid');
location.href = `https://www.tall.wiki/qc/vein?projectId=${pId}&roleId=${rId}&userId=${uId}&id=${tId}`;
},
@ -260,12 +262,12 @@
// 确定时间
async changeTime() {
const hourDom = this.dom.querySelector('.hour-box');
const minDom = this.dom.querySelector('.min-box');
const yearDom = this.dom.querySelector('.year-box');
const monthDom = this.dom.querySelector('.month-box');
const dayDom = this.dom.querySelector('.day-box');
const year = 2021 - Math.round(yearDom.scrollTop / 26)
var hourDom = this.dom.querySelector('.hour-box');
var minDom = this.dom.querySelector('.min-box');
var yearDom = this.dom.querySelector('.year-box');
var monthDom = this.dom.querySelector('.month-box');
var dayDom = this.dom.querySelector('.day-box');
var year = 2021 - Math.round(yearDom.scrollTop / 26)
let month = Math.round(monthDom.scrollTop / 26) + 1
let day = Math.round(dayDom.scrollTop / 26) + 1
if (month === 2) {
@ -304,7 +306,8 @@
min = '0' + min
}
console.log(`${year}-${month}-${day} ${hour}:${min}`)
const chooseTime = `${year}-${month}-${day} ${hour}:${min}`
var chooseTime = `${year}-${month}-${day} ${hour}:${min}`
this.chooseTimeValue = new Date(chooseTime).getTime()
if(chooseTime){
await this.choose(new Date(chooseTime).getTime())
console.log('new Date(chooseTime).getTime(): ', new Date(chooseTime).getTime());
@ -314,11 +317,11 @@
// 设置时间数据
setTimeData(){
const hourDom = this.dom.querySelector('.hour-box');
const minDom = this.dom.querySelector('.min-box');
const yearDom = this.dom.querySelector('.year-box');
const monthDom = this.dom.querySelector('.month-box');
const dateDom = this.dom.querySelector('.day-box');
var hourDom = this.dom.querySelector('.hour-box');
var minDom = this.dom.querySelector('.min-box');
var yearDom = this.dom.querySelector('.year-box');
var monthDom = this.dom.querySelector('.month-box');
var dateDom = this.dom.querySelector('.day-box');
/* 生成小时数组 */
for(let i=0;i<24;i++) {
var div = document.createElement('div');
@ -382,7 +385,7 @@
<!-- 示例插件2 id=100-->
<button class="bg-blue-500 py-2 px-5 rounded text-white" onclick="p100.show()">测试组建2</button>
<script>
const p100 = {
var p100 = {
name: 'hello tall plugin',
show() {
alert(this.name)

Loading…
Cancel
Save