提交代码
parent
576a947282
commit
2645ad9a43
|
@ -25,7 +25,7 @@
|
|||
<view class="inspect_list_info">
|
||||
<view class="inspect_list_info_details">
|
||||
<view class="inspect_list_info_img">
|
||||
<van-image wx:if="{{item.credentialType != 'PDF'}}" width="120rpx" height="120rpx" fit="cover" src="{{request+item.mainImage+'.min.jpg'}}"/>
|
||||
<van-image wx:if="{{item.credentialType != 'PDF'}}" width="120rpx" height="120rpx" fit="cover" src="{{request+item.credentialFile+'.min.jpg'}}"/>
|
||||
<van-image wx:if="{{item.credentialType == 'PDF'}}" width="120rpx" height="120rpx" fit="cover" src="https://cf.makalu.cc/profile/wechat/icon/pdf.png"/>
|
||||
</view>
|
||||
<view class="inspect_list_info_data">
|
||||
|
|
|
@ -200,17 +200,29 @@ Page({
|
|||
res = res.data;
|
||||
if(res.code == 200 && res.data){
|
||||
let sum=0;
|
||||
let otherSum=0;
|
||||
let flag=true;
|
||||
res.data.forEach((it,idx)=>{
|
||||
sum+=it.total;
|
||||
if(idx>4 && res.data.length>6){
|
||||
otherSum+=it.total;
|
||||
}
|
||||
});
|
||||
let materialSealStatistics=[];
|
||||
res.data.forEach((it,idx)=>{
|
||||
let typeName = it.type;
|
||||
if(typeName.length>6){
|
||||
//字符串截取
|
||||
typeName = typeName.substring(typeName.length-7,typeName.length);
|
||||
if(flag){
|
||||
let typeName = it.type;
|
||||
if(typeName.length>6){
|
||||
//字符串截取
|
||||
typeName = typeName.substring(typeName.length-7,typeName.length);
|
||||
}
|
||||
materialSealStatistics.push({ name: typeName, value: it.total, prop: (it.total / sum * 100).toFixed(2)});
|
||||
if(idx>3 && res.data.length>6){
|
||||
//防止变形,这里统计剩余所有
|
||||
materialSealStatistics.push({ name: "其它部位", value: otherSum, prop: (otherSum / sum * 100).toFixed(2)});
|
||||
flag=false;
|
||||
}
|
||||
}
|
||||
materialSealStatistics.push({ name: typeName, value: it.total, prop: (it.total / sum * 100).toFixed(2)});
|
||||
});
|
||||
//数据绑定
|
||||
this.setData({
|
||||
|
@ -385,9 +397,10 @@ Page({
|
|||
},
|
||||
//跳转到进度管理
|
||||
JDGL:function(){
|
||||
wx.redirectTo({
|
||||
url:'../../pageage/Progress-management/index'
|
||||
})
|
||||
app.toast("敬请期待!");
|
||||
//wx.redirectTo({
|
||||
// url:'../../pageage/Progress-management/index'
|
||||
//})
|
||||
},
|
||||
/**
|
||||
* 更多功能
|
||||
|
|
|
@ -36,6 +36,7 @@ Page({
|
|||
specialCheckNumber: 0,//专项检查次数
|
||||
},
|
||||
menuList:[],
|
||||
request:app.globalData.reqUrl
|
||||
},
|
||||
|
||||
//项目切换 返回值
|
||||
|
@ -149,12 +150,23 @@ Page({
|
|||
res = res.data;
|
||||
if(res.code == 200 && res.data){
|
||||
let sum=0;
|
||||
let otherSum=0;
|
||||
let flag=true;
|
||||
res.data.forEach((it,idx)=>{
|
||||
sum+=it.total;
|
||||
if(idx>4 && res.data.length>6){
|
||||
otherSum+=it.total;
|
||||
}
|
||||
});
|
||||
let specialStatistics=[];
|
||||
res.data.forEach((it,idx)=>{
|
||||
specialStatistics.push({ name: it.typeName, value: it.total, prop: (it.total / sum * 100).toFixed(2)});
|
||||
if(flag){
|
||||
specialStatistics.push({ name: it.typeName, value: it.total, prop: (it.total / sum * 100).toFixed(2)});
|
||||
if(idx>3 && res.data.length>6){
|
||||
specialStatistics.push({ name: "其它工种", value: otherSum, prop: (otherSum / sum * 100).toFixed(2)});
|
||||
flag=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
//数据绑定
|
||||
this.setData({
|
||||
|
@ -404,9 +416,10 @@ Page({
|
|||
},
|
||||
//跳转到进度管理
|
||||
JDGL:function(){
|
||||
wx.redirectTo({
|
||||
url:'../../pageage/Progress-management/index'
|
||||
})
|
||||
app.toast("敬请期待!");
|
||||
//wx.redirectTo({
|
||||
// url:'../../pageage/Progress-management/index'
|
||||
//})
|
||||
},
|
||||
/**
|
||||
* 更多功能
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
<van-row>
|
||||
<swiper circular indicator-dots="{{true}}" autoplay="true" indicator-active-color="#028ffb">
|
||||
<swiper-item wx:for="{{trainList}}" wx:key="index" wx:if="{{index<5}}">
|
||||
<image src="{{item.mainImage}}" style="width: 100%;height: 100%;"/>
|
||||
<image src="{{request+item.mainImage+'.min.jpg'}}" style="width: 100%;height: 100%;"/>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</van-row>
|
||||
|
@ -169,7 +169,7 @@
|
|||
<van-row>
|
||||
<swiper circular indicator-dots="{{true}}" autoplay="true" indicator-active-color="#028ffb">
|
||||
<swiper-item wx:for="{{emergencyDrillList}}" wx:key="index" wx:if="{{index<5}}">
|
||||
<image src="{{item.mainImage}}" style="width: 100%;height: 100%;"/>
|
||||
<image src="{{request+item.mainImage+'.min.jpg'}}" style="width: 100%;height: 100%;"/>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</van-row>
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
<view><image src="/images/s_3.png"></image>项目类型:<text>{{projectInfo.projectType}}</text></view>
|
||||
<view><image src="/images/s_12.png"></image>项目进度:<text>{{projectInfo.projectSchedule}}</text></view>
|
||||
<view><image src="/images/s_4.png"></image>总建筑面积:<text>{{projectInfo.totalBuildingArea}}</text></view>
|
||||
<view><image src="/images/s_5.png"></image>计划开工日期<text>{{projectInfo.planStartTime}}</text></view>
|
||||
<view><image src="/images/s_5.png"></image>计划开工日期:<text>{{projectInfo.planStartTime}}</text></view>
|
||||
<view><image src="/images/s_6.png"></image>实际开工日期:<text>{{projectInfo.actualStartTime}}</text></view>
|
||||
<view><image src="/images/s_7.png"></image>计划竣工日期:<text>{{projectInfo.planCompletedTime}}</text></view>
|
||||
<view><image src="/images/s_8.png"></image>总工期:<text>{{projectInfo.projectTimeLimit}}</text></view>
|
||||
|
|
Loading…
Reference in New Issue