|
|
@ -53,6 +53,7 @@ |
|
|
|
data-rid="1473556018582790144" |
|
|
|
data-token="eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2NTM2MTQwOTksInN1YiI6IjE0ODE0NTg3NDEyOTU3MTQzMDQiLCJhdXRoSWQiOiIxNDgxNDU4NzQxNTMwNTk1MzI4IiwiZXhwIjoxNjUzNjIxMjk5fQ.kM15-gERv5j5qWBeWEG0kDxLWMJesHInnwFQnUaKcGg" |
|
|
|
data-url="http://101.201.226.163:7320/v1.0" |
|
|
|
data-tTime="1660492800000" |
|
|
|
data-type="1" |
|
|
|
data-tid="tid444" |
|
|
|
data-did="did555" |
|
|
@ -60,36 +61,39 @@ |
|
|
|
> |
|
|
|
<div data-root="p1541234829630377984" class="w-full h-full flex justify-between items-center"> |
|
|
|
<div class="title" style="font-size: 14px;"></div> |
|
|
|
<button style="width: 50px; height: 24px; font-size: 14px; line-height: 24px; background-color: #1890FF; color: #fff; border-radius: 4px;" onclick="p1541234829630377984.jumpDetails(this)">查看</button> |
|
|
|
<button class="bg-blue-500 text-xs rounded py-1 px-3 text-white border-none" onclick="p1541234829630377984.jumpDetails(this)">查看</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<script> |
|
|
|
// (function() { |
|
|
|
// var salary_title = document.querySelector("div[data-root=p1541234829630377984]>div[class=title]"); |
|
|
|
// var myDate = new Date(); |
|
|
|
// var tMonth = myDate.getMonth(); |
|
|
|
// if (salary_title) { |
|
|
|
// salary_title.innerHTML = tMonth === 0 ? '12月份工资汇总' : tMonth + '月份工资汇总'; |
|
|
|
// } |
|
|
|
// })(); |
|
|
|
</script> |
|
|
|
|
|
|
|
<script> |
|
|
|
var p1541234829630377984 = { |
|
|
|
dom: '', |
|
|
|
|
|
|
|
init() { |
|
|
|
this.dom = document.querySelector("div[data-root=p1541234829630377984]"); |
|
|
|
if (this.dom) { |
|
|
|
var summary_title = this.dom.querySelector('.title'); |
|
|
|
var summary_title = this.dom.querySelector('.title'); |
|
|
|
|
|
|
|
var myDate = new Date(); |
|
|
|
var tMonth = myDate.getMonth(); |
|
|
|
summary_title.innerHTML = tMonth === 0 ? '12月份工资汇总' : tMonth + '月份工资汇总'; |
|
|
|
} |
|
|
|
const currTime = this.dom.parentNode.getAttribute('data-tTime'); // 任务时间 |
|
|
|
let tMonth = ''; |
|
|
|
|
|
|
|
if (currTime) { |
|
|
|
tMonth = this.format(currTime); |
|
|
|
} else { |
|
|
|
var myDate = new Date(); |
|
|
|
tMonth = myDate.getMonth(); |
|
|
|
} |
|
|
|
|
|
|
|
summary_title.innerHTML = tMonth === 0 ? '12月份工资汇总' : tMonth + '月份工资汇总'; |
|
|
|
}, |
|
|
|
|
|
|
|
// 时间戳转时间格式 |
|
|
|
format(shijianchuo){ |
|
|
|
//shijianchuo是整数,否则要parseInt转换 |
|
|
|
var time = new Date(+shijianchuo); |
|
|
|
var m = time.getMonth(); |
|
|
|
return m; |
|
|
|
}, |
|
|
|
|
|
|
|
jumpDetails(that) { |
|
|
|
const pId = this.dom.parentNode.getAttribute('data-pid'); |
|
|
|
const uId = this.dom.parentNode.getAttribute('data-uid'); |
|
|
|