Commit d9792c59 authored by xinzhedeai's avatar xinzhedeai

add:隐患管理页面检查日期显示格式为年月日处理。

parent f4f1bde7
......@@ -57,8 +57,13 @@ Page({
arr = newarr;
console.log(arr, '获取当前企业的隐患arr3')
if (res.statusCode === 200) {
const filterData = res.data.content.map((item)=>{
// 日期格式化
item.hdInspectDateFilter = item.hdInspectDate ? item.hdInspectDate.substring(0, 10) : ''
return item
})
this.setData({
dglist: [...res.data.content]
dglist: [...filterData],
})
return;
} else if (res.statusCode === 401) {
......@@ -129,8 +134,13 @@ Page({
arr = newarr;
console.log(arr, '获取当前企业的隐患arr2')
if (res.statusCode === 200) {
const filterData = res.data.content.map((item)=>{
// 日期格式化
item.hdInspectDateFilter = item.hdInspectDate ? item.hdInspectDate.substring(0, 10) : ''
return item
})
this.setData({
dglist: [...res.data.content]
dglist: [...filterData],
})
} else if (res.statusCode === 401) {
wx.redirectTo({
......
......@@ -29,7 +29,7 @@
<span >{{newMsg}}</span>
</view>
<view style="margin-bottom:12px;margin-top:-6px;">
<span >检查时间: {{item.hdInspectDate}}</span>
<span >检查时间: {{item.hdInspectDateFilter}}</span>
</view>
<view>
<button style="float:left;" type="default" class="editBtn" size="mini" bindtap="editHD" data-index="{{index}}" wx:if="{{!(item.overtime == 1)&&(item.hdstatus1===1)&&!(curRole=='企业员工')}}">查看</button>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment