Commit 37ba2033 authored by 刘杰's avatar 刘杰

企业微信前端

parent 3433fecb
......@@ -56,33 +56,28 @@
<!-- 右侧数据统计 -->
<view class="statistics">
<!-- <view class="stat-row">
<view class="statistics" v-if="staffKind==='simulatedBoss'">
<view class="stat-row">
<view class="stat-item">
<view class="stat-block light-orange">
<text class="number">{{currentSearchData.overview.stats.orderCount}}</text>
<text class="rate">单量</text>
<view class="stat-block green ">
<text class="number">{{currentSearchData.overview.stats.shippingCount}}</text>
<text class="rate">运输中</text>
</view>
</view>
<view class="stat-item">
<view class="stat-block green">
<text class="number">{{currentSearchData.overview.stats.volumeCount}}</text>
<text class="rate">方量m³</text>
<view class="stat-block light-orange ">
<text class="number">{{currentSearchData.overview.stats.positionCount}}</text>
<text class="rate">开启定位</text>
</view>
</view>
<view class="stat-item">
<view class="stat-block orange">
<text class="number">{{currentSearchData.overview.stats.weightCount}}</text>
<text class="rate">重量T</text>
</view>
<view class="stat-block green ">
<text class="number">{{currentSearchData.overview.stats.podCount}}</text>
<text class="rate">回单</text>
</view>
<view class="stat-item">
<view class="stat-block orange">
<text class="number">{{currentSearchData.overview.stats.weightCount}}</text>
<text class="rate">重量T</text>
</view>
</view>
</view> -->
<view class="stat-row">
<view class="stat-item">
<view class="stat-block light-orange">
......@@ -205,7 +200,7 @@
</view>
<!-- 模拟老板对比图表区域 -->
<view class="chart-container">
<view class="chart-container" v-if="staffKind==='boss'">
<view class="chart-header">
<text class="chart-title">模拟老板对比</text>
<view class="sort-buttons">
......@@ -357,7 +352,10 @@
},
async mounted() {
await this.initData()
this.staffKind = uni.getStorageSync(`uc_staff_kind`);
if (this.staffKind === 'boss') {
this.initLeaderChart()
}
this.initProjectChart()
// 在 Vue 的下一个 DOM 更新循环中执行
this.$nextTick(() => {
......@@ -367,7 +365,9 @@
this.loading = false
}
// 对领导图表进行排序,按应收数据排序
if (this.staffKind === 'boss') {
this.sortChart('receivable', 'myLeaderChart')
}
// 对项目图表进行排序,按应收数据排序
this.sortProjectChart('receivable', 'myProjectChart')
// 监听窗口的 resize 事件,调用 onResize 方法以适应图表大小
......@@ -377,7 +377,7 @@
methods: {
async initData() {
this.staffCode = uni.getStorageSync(`staffCode`);
this.staffKind = uni.getStorageSync(`uc_staff_kind`);
const data = {
"aux": {
"activeTime": this.activeTime,
......@@ -662,6 +662,11 @@
// 更新图表数据
this.updateChartSeries()
if (this.staffKind === 'boss') {
this.sortChart('receivable', 'myLeaderChart')
}
// 对项目图表进行排序,按应收数据排序
this.sortProjectChart('receivable', 'myProjectChart')
},
onResize() {
if (this.myLeaderChart) {
......@@ -794,7 +799,7 @@
}
},
updateChartSeries() {
if (this.staffKind === 'boss') {
this.myLeaderChart.setOption({
series: [{
data: this.currentData.leaderChartData.receivable
......@@ -807,6 +812,7 @@
}
]
})
}
this.myProjectChart.setOption({
series: [{
data: this.currentData.projectChartData.receivable
......
......@@ -160,7 +160,7 @@
background: #fff;
border-radius: 8px;
padding: 15px;
margin-bottom: 15px;
margin-top: 15px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
transition: all 0.3s ease;
......
......@@ -48,25 +48,7 @@
isCarrier: false,
uc_staff_kind: '',
currentShow: '',
topUserList: [{
name: '订单查询',
key: 'orderQuery',
url: '/pages/index/index'
},
{
name: '查看日报',
key: 'dailyReport',
url: '/pages/index/index'
}, {
name: '填写日报',
key: 'dailyReportCreate',
url: '/pages/index/index'
}, {
name: '老板看板',
key: 'bossCard',
url: '/pages/index/index'
},
]
topUserList: []
}
},
onLoad() {
......@@ -89,6 +71,46 @@
uni.$off('executeChoiceItem');
},
methods: {
updateTopUserList() {
if (this.uc_staff_kind === 'boss') {
this.topUserList = [{
name: '订单查询',
key: 'orderQuery',
url: '/pages/index/index'
},
{
name: '查看日报',
key: 'dailyReport',
url: '/pages/index/index'
}, {
name: '老板看板',
key: 'bossCard',
url: '/pages/index/index'
},
];
} else {
this.topUserList = [{
name: '订单查询',
key: 'orderQuery',
url: '/pages/index/index'
},
{
name: '查看日报',
key: 'dailyReport',
url: '/pages/index/index'
}, {
name: '填写日报',
key: 'dailyReportCreate',
url: '/pages/index/index'
}, {
name: '老板看板',
key: 'bossCard',
url: '/pages/index/index'
},
];
}
},
bindGroupChatCompany() {
const that = this
......@@ -137,7 +159,7 @@
uni.setStorageSync(`username`, data.username);
uni.setStorageSync(`commonName`, res.data.data.commonName);
console.log("commonName",res.data.data.commonName)
console.log("commonName", res.data.data.commonName)
this.userInfo = {
...data
}
......@@ -151,6 +173,7 @@
uni.setStorageSync(`staffCode`, data2.staffCode);
this.uc_staff_kind = data2.uc_staff_kind
uni.setStorageSync(`uc_staff_kind`, data2.uc_staff_kind);
this.updateTopUserList();
})
// if (this.isCarrier) {
......
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