Browse Source

图表完成

xiaohaizhao 11 tháng trước cách đây
mục cha
commit
c7844f63dc

+ 9 - 1
salesPanel/dataOverview/Project/XMSMZQFX.js

@@ -86,7 +86,6 @@ Component({
             content.type = type;
             content.username = username;
             content.where.isleave = isleave;
-            console.log(12312312)
             _Http.basic({
                 "id": 20231023092304,
                 content
@@ -104,6 +103,12 @@ Component({
                             "合同": "#FFAE02",
                             "订单": "#F53F3F",
                         } [v.end]
+
+                        v.tips = {
+                            "报价": "项目报价审核",
+                            "订单": "项目订单审核",
+                        } [v.start] || "项目报备审核"
+                        v.dateavg = v.dateavg.toFixed(2)
                         return v
                     })
                 })
@@ -137,5 +142,8 @@ Component({
             })
             this.getList(true)
         },
+        showTips() {
+            getApp().globalData.Language.showToast('统计项目生命周期中的各个关键节点之间平均周期')
+        }
     }
 })

+ 60 - 0
salesPanel/dataOverview/Project/XMSMZQFX.scss

@@ -1,9 +1,69 @@
+.range {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    position: relative;
+    line-height: 34rpx;
+    font-family: PingFang SC, PingFang SC;
+    font-size: 30rpx;
+    font-weight: bold;
+    color: #333333;
+    margin-bottom: 10rpx;
+    padding-left: 20rpx;
+
+    .iconfont {
+        font-weight: normal;
+        font-size: 24rpx;
+    }
+}
+
+
 .chart {
     height: 964rpx;
     display: flex;
     flex-direction: column;
+    padding-bottom: 40rpx;
+
+
 
     .item {
+        position: relative;
+        display: flex;
+        align-items: center;
+        justify-content: center;
         width: 200rpx;
+        font-family: PingFang SC, PingFang SC;
+        font-size: 24rpx;
+        color: #FFFFFF;
+
+        .text {
+            display: flex;
+            position: absolute;
+            top: 0;
+            left: 220rpx;
+            width: 400rpx;
+            line-height: 44rpx;
+
+            .label {
+                font-weight: bold;
+                font-size: 30rpx;
+                color: #333333;
+            }
+
+            .tips {
+                font-size: 24rpx;
+                color: #999999;
+                margin-left: 10rpx;
+            }
+        }
+
+        .text1 {
+            position: absolute;
+            /* Ensure consistent positioning */
+            top: auto;
+            /* Reset top to avoid conflict */
+            bottom: -40rpx;
+        }
     }
+
 }

+ 36 - 5
salesPanel/dataOverview/Project/XMSMZQFX.wxml

@@ -1,8 +1,39 @@
-<filtrate id='Filtrate' iconName='icon-kehuleixing' wx:if='{{types.length}}' list='{{types}}' type="{{content.where.type}}" title='客户类型' bind:onChange='changeType2' />
-<filtrate id='Filtrate' iconName='icon-kehudengji' wx:if='{{grades.length}}' list='{{grades}}' type="{{content.where.grade}}" title='客户等级' bind:onChange='changeType3' />
-<filtrate id='Filtrate' iconName='icon-chengjiaozhuangtai' list='{{tradingstatus}}' type="{{content.where.tradingstatus}}" title='成交状态' bind:onChange='changeType1' />
-<view class="global-card chart">
-	<view class="item" wx:for="{{list}}" wx:key="end" style="background-color: {{item.bgColor}}; flex: {{item.avg}};"></view>
+<filtrate id='Filtrate' iconName='icon-kehuleixing' wx:if='{{types.length}}' list='{{types}}'
+	type="{{content.where.type}}" title='客户类型' bind:onChange='changeType2' />
+<filtrate id='Filtrate' iconName='icon-kehudengji' wx:if='{{grades.length}}' list='{{grades}}'
+	type="{{content.where.grade}}" title='客户等级' bind:onChange='changeType3' />
+<filtrate id='Filtrate' iconName='icon-chengjiaozhuangtai' list='{{tradingstatus}}'
+	type="{{content.where.tradingstatus}}" title='成交状态' bind:onChange='changeType1' />
+<view class="global-card">
+	<view class="range">
+		{{language['平均周期']||'平均周期'}}
+		<view class="iconfont icon-wenhao" bindtap="showTips" />
+	</view>
+	<view class="chart">
+		<view class="item" wx:for="{{list}}" wx:key="end"
+			style="background-color: {{item.bgColor}}; flex: {{item.avg}};">
+			{{item.dateavg}}{{language['天']||'天'}}
+
+			<view class="text">
+				<view class="label">
+					{{language[item.start]||item.start}}
+				</view>
+				<view class="tips">
+					{{language[item.tips]||item.tips}}
+				</view>
+			</view>
+
+			<view wx:if="{{index == list.length-1}}" class="text text1">
+				<view class="label">
+					{{language[item.end]||item.end}}
+				</view>
+				<view class="tips">
+					{{language[item.tips]||item.tips}}
+				</view>
+			</view>
+		</view>
+	</view>
+
 </view>
 <My_empty wx:if="{{list.length==0}}" />
 <view style="height: 100rpx;" />