Commit 87a2827c authored by 刘杰's avatar 刘杰

企业微信前端

parent e77f4c77
<template>
<view class="report-container">
<!-- <scroll-view class="scroll-list" scroll-y> -->
<scroll-view class="scroll-list" scroll-y>
<!-- 顶部统计卡片 -->
<view class="top-stats-wrapper">
<!-- 异常统计环状进度 -->
......@@ -8,16 +8,17 @@
<view class="circle-wrapper">
<view class="progress-ring" :style="{
background: `conic-gradient(
#faad14 0% ${currentSearchData.overview.rate1}%,
#1890ff ${currentSearchData.overview.rate1}% ${currentSearchData.overview.rate2}%,
#52c41a ${currentSearchData.overview.rate2}% 100%
#FF4D4F 0% ${currentSearchData.overview.rate1}%,
#faad14 ${currentSearchData.overview.rate1}% ${currentSearchData.overview.rate2}%,
#52C41A ${currentSearchData.overview.rate2}% 100%
)`
}">
<view class="inner-circle">
<view class="submit-info">
<view class="count-row">
<text class="submitted error">{{currentSearchData.overview.newCount}}</text>
<text class="submitted approving">/{{currentSearchData.overview.approving}}</text>
<text
class="submitted approving">/{{currentSearchData.overview.approving}}</text>
<text class="submitted approved">/{{currentSearchData.overview.approved}}</text>
</view>
<text class="label">异常统计</text>
......@@ -86,23 +87,24 @@
</view>
<view class="stat-row">
<view class="stat-item">
<view class="stat-block light-orange">
<view class="stat-block green">
<text class="number">{{currentSearchData.overview.stats.orderCount}}</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>
<text class="number">{{currentSearchData.overview.stats.weightCount}}</text>
<text class="rate">重量T</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 class="stat-block green">
<text class="number">{{currentSearchData.overview.stats.volumeCount}}</text>
<text class="rate">方量m³</text>
</view>
</view>
</view>
</view>
......@@ -115,8 +117,11 @@
<view class="finance-block">
<view class="finance-item receivable">
<!-- 左侧图标 -->
<view class="left-section">
<!-- <view class="left-section">
<view class="icon"></view>
</view> -->
<view class="left-section">
<view class="icon"><img class="shou" src="../../static/img/boss/sou.png" alt="图标" /></view>
</view>
<!-- 右侧内容 -->
......@@ -124,7 +129,7 @@
<view class="main-info">
<view class="amount-section">
<text class="amount">{{currentSearchData.finance.receivable.total}}</text>
<text class="label">应收</text>
<!-- <text class="label">应收</text> -->
</view>
<view class="extra-info">
<view class="info-row">
......@@ -159,16 +164,21 @@
<view class="finance-block">
<view class="finance-item payable">
<!-- 左侧图标 -->
<view class="left-section">
<!-- <view class="left-section">
<view class="icon"></view>
</view> -->
<view class="left-section">
<view class="icon">
<img src="../../static/img/boss/zhichu.png" alt="图标" />
</view>
</view>
<!-- 右侧内容 -->
<view class="right-section">
<view class="main-info">
<view class="amount-section">
<text class="amount">{{currentSearchData.finance.payable.totalStr}}</text>
<text class="label">应付</text>
<!-- <text class="label">应付</text> -->
</view>
<view class="extra-info">
<view class="info-row">
......@@ -177,14 +187,15 @@
</view>
<view class="info-row">
<text class="label">月结</text>
<text class="value monthly">{{currentSearchData.finance.payable.monthlyStr}}</text>
<text
class="value monthly">{{currentSearchData.finance.payable.monthlyStr}}</text>
</view>
</view>
</view>
<view class="progress-bar"
style="position: relative; height: 4px; background: #f0f0f0; border-radius: 2px; overflow: hidden;">
<view class="progress cash" :style="{
backgroundColor: '#FFA940',
backgroundColor: '#FF4D4F',
width: cashRatio,
position: 'absolute',
height: '100%',
......@@ -192,7 +203,7 @@
top: 0
}"></view>
<view class="progress monthly" :style="{
backgroundColor: '#13C2C2',
backgroundColor: '#52C41A',
position: 'absolute',
height: '100%',
left: cashRatio,
......@@ -227,7 +238,7 @@
</text>
</view>
</view>
<scroll-view class="chart-scroll" scroll-x @touchmove.prevent>
<scroll-view class="chart-scroll" scroll-x>
<canvas class="chart-wrapper" id="myLeaderChart"></canvas>
</scroll-view>
</view>
......@@ -255,7 +266,7 @@
</text>
</view>
</view>
<scroll-view class="chart-scroll" scroll-x @touchmove.stop>
<scroll-view class="chart-scroll" scroll-x>
<canvas class="chart-wrapper" id="myProjectChart"></canvas>
</scroll-view>
</view>
......@@ -268,7 +279,9 @@
<view class="table">
<view class="table-header">
<view class="table-row">
<view class="table-cell-title">{{tableName}}</view>
<view class="table-cell-title fixed-column" style="background-color: #f5f5f5;">
{{tableName}}
</view>
<view class="table-cell-title">应收(万)</view>
<view class="table-cell-title">应付(万)</view>
<view class="table-cell-title">应付现结(万)</view>
......@@ -281,7 +294,7 @@
</view>
<view class="table-body">
<view class="table-row" v-for="(item, index) in currentData.tableData" :key="index">
<view class="table-cell">{{ item.boss }}</view>
<view class="table-cell fixed-column">{{ item.boss }}</view>
<view class="table-cell">{{ item.receivable }}</view>
<view class="table-cell">{{ item.payable }}</view>
<view class="table-cell">{{ item.cashPayable }}</view>
......@@ -295,13 +308,13 @@
</view>
</scroll-view>
</view>
<!-- </scroll-view> -->
</scroll-view>
<view style="height: 10vh;"></view>
<view style="height: 10px;"></view>
</view>
</template>
<script>
<script module="test" lang="renderjs">
import {
searchBossCard
} from '../../api/apiList'
......@@ -334,7 +347,7 @@
projectSortType: 'receivable',
timeData: {},
showOrderEvent: false,
tableName:""
tableName: ""
}
},
computed: {
......@@ -371,11 +384,12 @@
this.staffKind = uni.getStorageSync(`uc_staff_kind`);
if (this.staffKind === 'boss') {
this.initLeaderChart()
this.tableName='模拟老板'
}else{
this.tableName='项目'
this.tableName = '模拟老板'
} else {
this.tableName = '项目'
}
this.initProjectChart()
// 在 Vue 的下一个 DOM 更新循环中执行
this.$nextTick(() => {
// 检查当前数据的表格数据是否存在且长度大于 0
......@@ -390,8 +404,10 @@
// 对项目图表进行排序,按应收数据排序
this.sortProjectChart('receivable', 'myProjectChart')
// 监听窗口的 resize 事件,调用 onResize 方法以适应图表大小
window.addEventListener('resize', this.onResize)
})
window.addEventListener('resize', this.onResize)
},
methods: {
orderEventClose() {
......@@ -420,8 +436,8 @@
// 获取数据点数量
const dataCount = this.currentData.leaderChartData.receivable.length;
// 计算所需的最小宽度(假设每个数据点需要100px)
const minWidth = Math.max(dataCount * 60, 500);
console.log("minWidth:"+minWidth)
const minWidth = Math.max(dataCount * 60, 300);
console.log("minWidth:" + minWidth)
// 设置容器宽度
const wrapper = document.getElementById('myLeaderChart');
......@@ -471,6 +487,7 @@
}
},
axisLabel: {
interval: 0,
color: '#666',
fontSize: 12
......@@ -490,7 +507,10 @@
color: '#666'
},
axisLabel: {
color: '#666'
color: '#666',
formatter: function(value) {
return value + 'w'; // 为纵坐标添加单位“万”
},
}
},
{
......@@ -559,7 +579,7 @@
// 获取数据点数量
const dataCount = this.currentData.projectChartData.receivable.length;
// 计算所需的最小宽度(假设每个数据点需要100px)
const minWidth = Math.max(dataCount * 60, 500);
const minWidth = Math.max(dataCount * 60, 300);
// 设置容器宽度
const wrapper = document.getElementById('myProjectChart');
......@@ -581,7 +601,7 @@
return `{name|${item.seriesName}}: {value|${item.value}${item.seriesName === '利润率' ? '%' : '万元'}}`;
}).join('<br>');
return tips;
return `<div>${tips}</div>`;
},
rich: {
name: {
......@@ -636,7 +656,10 @@
color: '#666'
},
axisLabel: {
color: '#666'
color: '#666',
formatter: function(value) {
return value + 'w'; // 为纵坐标添加单位“万”
},
}
},
{
......@@ -710,6 +733,7 @@
},
onResize() {
if (this.myLeaderChart) {
console.log("this.myLeaderChart.resize")
this.myLeaderChart.resize()
}
if (this.myProjectChart) {
......@@ -916,6 +940,22 @@
$secondary-color: #1890FF;
$circle-size: 120px;
.fixed-column {
position: sticky;
/* 使用 sticky 定位 */
left: 0;
/* 固定在左侧 */
background-color: white;
/* 背景色 */
z-index: 1;
/* 确保在其他单元格之上 */
}
.shou {
width: 25px;
height: 25px;
}
// 在样式文件顶部添加重置样式
page {
width: 100%;
......@@ -977,7 +1017,7 @@
}
.scroll-list {
height: calc(100vh - 60px);
height: calc(100vh- 45px);
touch-action: pan-x;
/* 允许横向滚动 */
overflow-x: auto;
......@@ -994,6 +1034,8 @@
min-height: calc(100vh - 60px);
// max-height: 100vh;
padding: 10px;
padding-top: 45px;
>view {
......@@ -1007,6 +1049,7 @@
display: flex;
gap: 15px;
margin-bottom: 15px;
margin-top: 10px;
.stats-card {
flex: 1;
......@@ -1058,13 +1101,15 @@
color: #52C41A;
&.error {
color: #faad14; // 异常统计使用红色
color: #FF4D4F; // 异常统计使用红色
}
&.approving {
color: #1890ff; // 异常统计使用红色
color: #faad14; // 异常统计使用红色
}
&.approved {
color: #52c41a; // 异常统计使用红色
color: #52C41A; // 异常统计使用红色
}
}
......@@ -1262,6 +1307,7 @@
display: block;
font-size: 14px;
color: #999;
font-weight: bold;
}
}
}
......@@ -1304,7 +1350,10 @@
align-items: center;
justify-content: center;
color: #fff;
}
}
.right-section {
......@@ -1475,11 +1524,11 @@
.info-row {
.value {
&.cash {
color: #FFA940;
color: #FF4D4F;
}
&.monthly {
color: #13C2C2;
color: #52C41A;
}
}
}
......@@ -1610,8 +1659,9 @@
width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
touch-action: pan-y;
height: 30vh;
overflow-y: auto;
/* 允许垂直滚动 */
&::-webkit-scrollbar {
height: 6px;
......@@ -1628,6 +1678,7 @@
width: 100%;
padding: 0 0 5px 0;
min-width: 100%;
pointer-events: auto;
}
}
}
......@@ -1724,6 +1775,11 @@
src: url('/static/fonts/icomoon.ttf') format('truetype');
}
.legend {
pointer-events: auto;
/* 确保可以接收触摸事件 */
}
.sort-icon::before {
content: '\ea4d';
font-family: "custom-icon" !important;
......
......@@ -78,7 +78,7 @@
return {
formData: {
reporterTo:'',
reporterTo: '',
reporter: '',
date: formattedDate, // 使用带时间的日期格式
todayWork: '',
......@@ -106,9 +106,9 @@
methods: {
initReporter() {
this.staffKind = uni.getStorageSync('uc_staff_kind');
const data={
"aux":{
staffKind:this.staffKind
const data = {
"aux": {
staffKind: this.staffKind
}
}
selectReporter(data).then(res => {
......@@ -209,14 +209,15 @@
<style lang="scss">
.daily-report-create {
padding: 20px;
// padding: 20px;
background-color: #f5f5f5;
min-height: 100vh;
padding-top: 45px;
.page-title {
text-align: center;
padding: 15px 0;
margin-bottom: 20px;
margin-bottom: 10px;
text {
font-size: 18px;
......
{
"name" : "兆驰运输管理系统",
"appid" : "__UNI__EFB25AB",
"description" : "TMS-承运商",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
"name": "兆驰运输管理系统",
"appid": "__UNI__EFB25AB",
"description": "TMS-承运商",
"versionName": "1.0.0",
"versionCode": "100",
"transformPx": false,
/* 5+App特有相关 */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
"app-plus": {
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
/* 模块配置 */
"modules" : {},
"modules": {},
/* 应用发布信息 */
"distribute" : {
"distribute": {
/* android打包配置 */
"android" : {
"permissions" : [
"android": {
"permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
......@@ -41,83 +41,83 @@
]
},
/* ios打包配置 */
"ios" : {},
"ios": {},
/* SDK配置 */
"sdkConfigs" : {}
"sdkConfigs": {}
}
},
/* 快应用特有相关 */
"quickapp" : {},
"quickapp": {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "ww5b68e5106ed852c5",
"setting" : {
"urlCheck" : false,
"es6" : true,
"postcss" : false,
"minified" : true
"mp-weixin": {
"appid": "ww5b68e5106ed852c5",
"setting": {
"urlCheck": false,
"es6": true,
"postcss": false,
"minified": true
},
"usingComponents" : true,
"lazyCodeLoading" : "requiredComponents",
"requiredPrivateInfos" : [ "getLocation" ],
"permission" : {}
"usingComponents": true,
"lazyCodeLoading": "requiredComponents",
"requiredPrivateInfos": ["getLocation"],
"permission": {}
},
"mp-alipay" : {
"usingComponents" : true
"mp-alipay": {
"usingComponents": true
},
"mp-baidu" : {
"usingComponents" : true
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao" : {
"usingComponents" : true
"mp-toutiao": {
"usingComponents": true
},
"uniStatistics" : {
"enable" : false
"uniStatistics": {
"enable": false
},
"vueVersion" : "2",
"h5" : {
"devServer" : {
"https" : false,
"disableHostCheck" : true,
"port" : 8083,
"proxy" : {
"/api" : {
"vueVersion": "2",
"h5": {
"devServer": {
"https": false,
"disableHostCheck": true,
"port": 8083,
"proxy": {
"/api": {
// "target" : "http://122.112.220.204:8089",
// "target" : "http://localhost:8083",
"target" : "https://stms.bjzc-scs.com",
"changeOrigin" : true,
"secure" : false
"target": "http://localhost:8083",
// "target" : "https://stms.bjzc-scs.com",
"changeOrigin": true,
"secure": false
},
"/handler" : {
"/handler": {
// "target" : "http://122.112.220.204:8089",
// "target" : "http://localhost:8083",
"target" : "https://stms.bjzc-scs.com",
"changeOrigin" : true,
"secure" : false
"target": "http://localhost:8083",
// "target" : "https://stms.bjzc-scs.com",
"changeOrigin": true,
"secure": false
},
"/sandtable" : {
"/sandtable": {
// "target" : "http://122.112.220.204:8089",
// "target" : "http://localhost:8083",
"target" : "https://stms.bjzc-scs.com",
"changeOrigin" : true,
"secure" : false
"target": "http://localhost:8083",
// "target" : "https://stms.bjzc-scs.com",
"changeOrigin": true,
"secure": false
},
"/tmsca" : {
"/tmsca": {
// "target" : "http://122.112.220.204:8089",
// "target" : "http://localhost:8083",
"target" : "https://stms.bjzc-scs.com",
"changeOrigin" : true,
"secure" : false
"target": "http://localhost:8083",
// "target" : "https://stms.bjzc-scs.com",
"changeOrigin": true,
"secure": false
}
}
},
"router" : {
"mode" : "hash",
"base" : "./"
"router": {
"mode": "hash",
"base": "./"
},
"template" : "template.h5.html",
"sdkConfigs" : {
"maps" : {}
"template": "template.h5.html",
"sdkConfigs": {
"maps": {}
}
}
}
\ No newline at end of file
......@@ -178,7 +178,7 @@ module.exports = {
uni.redirectTo({
url: "/pages/index/index",
});
_this.initWeCom();
// _this.initWeCom();
}
})
.catch((err) => {
......
......@@ -26,7 +26,7 @@
"style": {
"navigationBarTitleText": "主页",
"enablePullDownRefresh": false,
"disableScroll": true
"disableScroll": false
}
},
{
......
......@@ -9,9 +9,7 @@
</view>
</view>
<view class="content">
<view v-if="currentShow === 'orderQuery'">
<orderQueryContent></orderQueryContent>
</view>
<!-- <view v-if="currentShow === 'dailyReport'">
<dailyReport></dailyReport>
</view> -->
......@@ -74,7 +72,7 @@
if (this.uc_staff_kind === 'boss') {
this.topUserList = [{
name: '老板看板',
name: '运营监控',
key: 'bossCard',
url: '/pages/index/index'
},
......@@ -86,7 +84,7 @@
];
} else if (this.uc_staff_kind === 'simulatedBoss') {
this.topUserList = [{
name: '老板看板',
name: '运营监控',
key: 'bossCard',
url: '/pages/index/index'
},
......@@ -244,7 +242,8 @@
.transport-content {
background-color: #FAFAFA;
height: 100vh;
......@@ -255,6 +254,9 @@
align-items: center;
flex-direction: row;
justify-content: space-evenly;
position: fixed;
z-index: 999;
width: 100%;
.top-item {
height: 22px;
......@@ -273,6 +275,9 @@
.content {
padding: 0px 12px 12px 12px;
// margin-top: 45px;
// height: calc(100vh- 50px);
}
}
</style>s
\ No newline at end of file
</style>
\ No newline at end of file
......@@ -9,9 +9,9 @@ let BASEURL = {
// url: 'http://192.168.1.199:7080' //唐浩然
// url: 'http://192.168.0.230:8080' // xiaohan
// url: "https://botms-demo.logwirecloud.com",
// url: "http://localhost:8083", //开发
url: "http://localhost:8083", //开发
// url: "http://122.112.220.204:8089", //开发
url: "https://stms.bjzc-scs.com", //生产
// url: "https://stms.bjzc-scs.com", //生产
};
//当使用多域名代理服务时生效,用于统一添加API前缀以区分服务代理地址。本地开发H5注意修改manifest.json中Proxy代理规则
......
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