Commit ba5312b7 authored by 刘杰's avatar 刘杰

企业微信前端

parent de3d35c0
<template> <template>
<view class="report-container"> <view class="report-container">
<scroll-view class="scroll-list" scroll-y> <!-- <scroll-view class="scroll-list" scroll-y> -->
<!-- 顶部统计卡片 --> <!-- 顶部统计卡片 -->
<view class="top-stats-wrapper"> <view class="top-stats-wrapper">
<!-- 异常统计环状进度 --> <!-- 异常统计环状进度 -->
<view class="stats-card" @click="navigateToAbnormalReport"> <view class="stats-card" @click="navigateToAbnormalReport">
<view class="circle-wrapper"> <view class="circle-wrapper">
<view class="progress-ring" :style="{ <view class="progress-ring" :style="{
background: `conic-gradient(#FF4D4F 0% ${currentSearchData.overview.eventRate}%, #f5f5f5 ${currentSearchData.overview.eventRate}% 100%)` background: `conic-gradient(
#faad14 0% ${currentSearchData.overview.rate1}%,
#1890ff ${currentSearchData.overview.rate1}% ${currentSearchData.overview.rate2}%,
#52c41a ${currentSearchData.overview.rate2}% 100%
)`
}"> }">
<view class="inner-circle"> <view class="inner-circle">
<view class="submit-info"> <view class="submit-info">
<view class="count-row"> <view class="count-row">
<text class="submitted error">{{currentSearchData.overview.unHandled}}</text> <text class="submitted error">{{currentSearchData.overview.newCount}}</text>
<text class="should-submitted">/{{currentSearchData.overview.totalEvent}}</text> <text class="submitted approving">/{{currentSearchData.overview.approving}}</text>
<text class="submitted approved">/{{currentSearchData.overview.approved}}</text>
</view> </view>
<text class="label">异常统计</text> <text class="label">异常统计</text>
</view> </view>
...@@ -162,17 +167,17 @@ ...@@ -162,17 +167,17 @@
<view class="right-section"> <view class="right-section">
<view class="main-info"> <view class="main-info">
<view class="amount-section"> <view class="amount-section">
<text class="amount">{{currentSearchData.finance.payable.total}}</text> <text class="amount">{{currentSearchData.finance.payable.totalStr}}</text>
<text class="label">应付</text> <text class="label">应付</text>
</view> </view>
<view class="extra-info"> <view class="extra-info">
<view class="info-row"> <view class="info-row">
<text class="label">现结</text> <text class="label">现结</text>
<text class="value cash">{{currentSearchData.finance.payable.cash}}</text> <text class="value cash">{{currentSearchData.finance.payable.cashStr}}</text>
</view> </view>
<view class="info-row"> <view class="info-row">
<text class="label">月结</text> <text class="label">月结</text>
<text class="value monthly">{{currentSearchData.finance.payable.monthly}}</text> <text class="value monthly">{{currentSearchData.finance.payable.monthlyStr}}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -207,17 +212,17 @@ ...@@ -207,17 +212,17 @@
<view class="sort-buttons"> <view class="sort-buttons">
<text class="sort-btn" :class="{active: sortType === 'receivable'}" <text class="sort-btn" :class="{active: sortType === 'receivable'}"
@click="sortChart('receivable','myLeaderChart')"> @click="sortChart('receivable','myLeaderChart')">
<text class="sort-icon"></text> <!-- <text class="sort-icon"></text> -->
应收 应收
</text> </text>
<text class="sort-btn" :class="{active: sortType === 'payable'}" <text class="sort-btn" :class="{active: sortType === 'payable'}"
@click="sortChart('payable','myLeaderChart')"> @click="sortChart('payable','myLeaderChart')">
<text class="sort-icon"></text> <!-- <text class="sort-icon"></text> -->
应付 应付
</text> </text>
<text class="sort-btn" :class="{active: sortType === 'profitRate'}" <text class="sort-btn" :class="{active: sortType === 'profitRate'}"
@click="sortChart('profitRate','myLeaderChart')"> @click="sortChart('profitRate','myLeaderChart')">
<text class="sort-icon"></text> <!-- <text class="sort-icon"></text> -->
利润 利润
</text> </text>
</view> </view>
...@@ -235,22 +240,22 @@ ...@@ -235,22 +240,22 @@
<view class="sort-buttons"> <view class="sort-buttons">
<text class="sort-btn" :class="{active: projectSortType === 'receivable'}" <text class="sort-btn" :class="{active: projectSortType === 'receivable'}"
@click="sortProjectChart('receivable','myProjectChart')"> @click="sortProjectChart('receivable','myProjectChart')">
<text class="sort-icon"></text> <!-- <text class="sort-icon"></text> -->
应收 应收
</text> </text>
<text class="sort-btn" :class="{active: projectSortType === 'payable'}" <text class="sort-btn" :class="{active: projectSortType === 'payable'}"
@click="sortProjectChart('payable','myProjectChart')"> @click="sortProjectChart('payable','myProjectChart')">
<text class="sort-icon"></text> <!-- <text class="sort-icon"></text> -->
应付 应付
</text> </text>
<text class="sort-btn" :class="{active: projectSortType === 'profitRate'}" <text class="sort-btn" :class="{active: projectSortType === 'profitRate'}"
@click="sortProjectChart('profitRate','myProjectChart')"> @click="sortProjectChart('profitRate','myProjectChart')">
<text class="sort-icon"></text> <!-- <text class="sort-icon"></text> -->
利润 利润
</text> </text>
</view> </view>
</view> </view>
<scroll-view class="chart-scroll" scroll-x @touchmove.prevent> <scroll-view class="chart-scroll" scroll-x @touchmove.stop>
<canvas class="chart-wrapper" id="myProjectChart"></canvas> <canvas class="chart-wrapper" id="myProjectChart"></canvas>
</scroll-view> </scroll-view>
</view> </view>
...@@ -258,7 +263,7 @@ ...@@ -258,7 +263,7 @@
<!-- 项目运营表格 --> <!-- 项目运营表格 -->
<view class="table-container"> <view class="table-container">
<text class="table-title">模拟老板运营情况</text> <text class="table-title">模拟老板运营情况</text>
<scroll-view scroll-x class="table-scroll"> <scroll-view scroll-x class="table-scroll" @touchmove.stop>
<view class="table"> <view class="table">
<view class="table-header"> <view class="table-header">
<view class="table-row"> <view class="table-row">
...@@ -289,16 +294,9 @@ ...@@ -289,16 +294,9 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
</scroll-view> <!-- </scroll-view> -->
<u-popup :show="showOrderEvent" mode="bottom">
<scroll-view scroll-y="true" class="scroll-Y">
<orderEventList ref="orderEventList" :isEdit="showOrderEvent" @close="orderEventClose"></orderEventList>
<!-- <orderInsertContent ref="orderInsertContent" :isEdit="showEdit" @close="orderEditClose">
</orderInsertContent> -->
</scroll-view>
</u-popup> <view style="height: 10vh;"></view>
</view> </view>
</template> </template>
...@@ -418,6 +416,7 @@ ...@@ -418,6 +416,7 @@
const dataCount = this.currentData.leaderChartData.receivable.length; const dataCount = this.currentData.leaderChartData.receivable.length;
// 计算所需的最小宽度(假设每个数据点需要100px) // 计算所需的最小宽度(假设每个数据点需要100px)
const minWidth = Math.max(dataCount * 60, 500); const minWidth = Math.max(dataCount * 60, 500);
console.log("minWidth:"+minWidth)
// 设置容器宽度 // 设置容器宽度
const wrapper = document.getElementById('myLeaderChart'); const wrapper = document.getElementById('myLeaderChart');
...@@ -427,7 +426,7 @@ ...@@ -427,7 +426,7 @@
} }
this.myLeaderChart = echarts.init(document.getElementById('myLeaderChart')) this.myLeaderChart = echarts.init(document.getElementById('myLeaderChart'))
console.log("echarts"+echarts.version); console.log("echarts" + echarts.version);
const option = { const option = {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
...@@ -435,15 +434,15 @@ ...@@ -435,15 +434,15 @@
type: 'shadow' type: 'shadow'
}, },
formatter: function(params) { formatter: function(params) {
const tips = params.map(item => { const tips = params.map(item => {
if (item.seriesName === '利润率') { if (item.seriesName === '利润率') {
return `${item.seriesName}: ${item.value}%`; return `${item.seriesName}: ${item.value}%`;
} }
return `${item.seriesName}: ${item.value} 万元`; return `${item.seriesName}: ${item.value} 万元`;
}).join('<br>'); // 使用 <br> 实现换行 }).join('<br>'); // 使用 <br> 实现换行
return `<div>${tips}</div>`; // 返回 HTML 格式的提示内容 return `<div>${tips}</div>`; // 返回 HTML 格式的提示内容
} }
}, },
legend: { legend: {
data: ['应收', '应付', '利润率'], data: ['应收', '应付', '利润率'],
...@@ -885,7 +884,11 @@ ...@@ -885,7 +884,11 @@
navigateToDailyReport() { navigateToDailyReport() {
console.log('点击了日报跳转按钮'); console.log('点击了日报跳转按钮');
// 直接触发父组件的 choiceItem // 直接触发父组件的 choiceItem
uni.$emit('executeChoiceItem', 'dailyReport'); // uni.$emit('executeChoiceItem', 'dailyReport');
uni.navigateTo({
url: '/pages/dailyReport/dailyReport'
});
}, },
}, },
beforeDestroy() { beforeDestroy() {
...@@ -979,16 +982,18 @@ ...@@ -979,16 +982,18 @@
} }
.report-container { .report-container {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
background-color: #F5F7FA; background-color: #F5F7FA;
min-height: calc(100vh - 60px); min-height: calc(100vh - 60px);
// max-height: 100vh; // max-height: 100vh;
padding: 10px;
>view { >view {
width: 100%; width: 100%;
max-width: 1200px; // max-width: 1200px;
margin: 0 auto; margin: 0 auto;
background-color: transparent; background-color: transparent;
} }
...@@ -1048,7 +1053,13 @@ ...@@ -1048,7 +1053,13 @@
color: #52C41A; color: #52C41A;
&.error { &.error {
color: #FF4D4F; // 异常统计使用红色 color: #faad14; // 异常统计使用红色
}
&.approving {
color: #1890ff; // 异常统计使用红色
}
&.approved {
color: #52c41a; // 异常统计使用红色
} }
} }
...@@ -1530,6 +1541,7 @@ ...@@ -1530,6 +1541,7 @@
} }
.chart-container { .chart-container {
display: block; display: block;
background-color: #fff; background-color: #fff;
border-radius: 8px; border-radius: 8px;
...@@ -1633,19 +1645,17 @@ ...@@ -1633,19 +1645,17 @@
.table-scroll { .table-scroll {
scroll-margin-left: 0; scroll-margin-left: 0;
width: 95%; width: 98%;
margin-bottom: 10px; margin-bottom: 10px;
overflow-x: auto; overflow-x: auto;
/* 允许横向滚动 */ margin: 1%;
-webkit-overflow-scrolling: touch;
/* 启用 iOS 的平滑滚动 */ /* 启用 iOS 的平滑滚动 */
touch-action: pan-x; touch-action: pan-x;
/* 允许横向滚动 */ /* 允许横向滚动 */
border: 1px solid #e8e8e8; border: 1px solid #e8e8e8;
/* 可选:为滚动条添加边框 */ /* 可选:为滚动条添加边框 */
max-width: 100%; max-width: 100%;
/* 确保容器宽度适应 */
order-radius: 3px;
white-space: nowrap; white-space: nowrap;
/deep/ .uni-table { /deep/ .uni-table {
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</view> </view>
<!-- 日报列表 --> <!-- 日报列表 -->
<scroll-view class="report-list" scroll-y :style="{ height: 'calc(100vh - 120px)' }"> <scroll-view class="report-list" scroll-y>
<view class="report-card" v-for="(report, index) in dailyReportList" :key="index"> <view class="report-card" v-for="(report, index) in dailyReportList" :key="index">
<view class="card-header"> <view class="card-header">
<view class="left"> <view class="left">
...@@ -52,7 +52,9 @@ ...@@ -52,7 +52,9 @@
</view> </view>
</view> </view>
</view> </view>
<view style="height: 10vh;"></view>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
...@@ -143,18 +145,24 @@ ...@@ -143,18 +145,24 @@
</script> </script>
<style lang="scss"> <style lang="scss">
html, body {
height: 95%; /* 确保 html 和 body 高度为 100% */
margin: 0; /* 去掉默认的 margin */
overflow: hidden; /* 禁用滚动条 */
}
.daily-report { .daily-report {
// padding: 15px; // padding: 15px;
background: #f5f7fa; background: #f5f7fa;
min-height: 100vh; // min-height: 90vh;
.report-stats { .report-stats {
position: fixed;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
background: #fff; background: #fff;
padding: 20px 15px; padding: 20px 15px;
border-radius: 8px; border-radius: 8px;
margin-bottom: 8px; // margin-bottom: 8px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
.stat-item { .stat-item {
...@@ -194,8 +202,6 @@ ...@@ -194,8 +202,6 @@
} }
.report-list { .report-list {
// 调整高度,移除分页器的空间
height: calc(100vh - 200px);
.report-card { .report-card {
display: block; display: block;
......
...@@ -83,29 +83,29 @@ ...@@ -83,29 +83,29 @@
"proxy" : { "proxy" : {
"/api" : { "/api" : {
// "target" : "http://122.112.220.204:8089", // "target" : "http://122.112.220.204:8089",
"target" : "http://localhost:8083", // "target" : "http://localhost:8083",
// "target" : "https://stms.bjzc-scs.com", "target" : "https://stms.bjzc-scs.com",
"changeOrigin" : true, "changeOrigin" : true,
"secure" : false "secure" : false
}, },
"/handler" : { "/handler" : {
// "target" : "http://122.112.220.204:8089", // "target" : "http://122.112.220.204:8089",
"target" : "http://localhost:8083", // "target" : "http://localhost:8083",
// "target" : "https://stms.bjzc-scs.com", "target" : "https://stms.bjzc-scs.com",
"changeOrigin" : true, "changeOrigin" : true,
"secure" : false "secure" : false
}, },
"/sandtable" : { "/sandtable" : {
// "target" : "http://122.112.220.204:8089", // "target" : "http://122.112.220.204:8089",
"target" : "http://localhost:8083", // "target" : "http://localhost:8083",
// "target" : "https://stms.bjzc-scs.com", "target" : "https://stms.bjzc-scs.com",
"changeOrigin" : true, "changeOrigin" : true,
"secure" : false "secure" : false
}, },
"/tmsca" : { "/tmsca" : {
// "target" : "http://122.112.220.204:8089", // "target" : "http://122.112.220.204:8089",
"target" : "http://localhost:8083", // "target" : "http://localhost:8083",
// "target" : "https://stms.bjzc-scs.com", "target" : "https://stms.bjzc-scs.com",
"changeOrigin" : true, "changeOrigin" : true,
"secure" : false "secure" : false
} }
......
...@@ -44,6 +44,14 @@ ...@@ -44,6 +44,14 @@
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"disableScroll": true "disableScroll": true
} }
},
{
"path": "pages/dailyReport/dailyReport",
"style": {
"navigationBarTitleText": "查看日报",
"enablePullDownRefresh": false,
"disableScroll": true
}
} }
], ],
"subPackages": [{ "subPackages": [{
......
<template> <template>
<view class="abnormal-detail"> <view class="abnormal-detail">
<!-- 基本信息卡片 --> <!-- 基本信息卡片 -->
<scroll-view scroll-y :style="{ height: '100vh' }"> <scroll-view scroll-y :style="{ height: '100vh' }">
<view class="detail-card"> <view class="detail-card">
<view class="card-title">基本信息</view> <view class="card-title">基本信息</view>
<view class="info-grid"> <view class="info-grid">
...@@ -187,9 +187,9 @@ ...@@ -187,9 +187,9 @@
onPreviewImage(index, images) { onPreviewImage(index, images) {
console.log("预览图片" + images) console.log("预览图片" + images)
uni.previewImage({ uni.previewImage({
current: index, current: images[index], // 当前显示的图片
urls: images urls: images // 需要预览的图片列表
}) });
}, },
copyText(text) { copyText(text) {
uni.setClipboardData({ uni.setClipboardData({
......
...@@ -62,6 +62,8 @@ ...@@ -62,6 +62,8 @@
</view> </view>
</view> </view>
</view> </view>
<view style="height: 10vh;"></view>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
...@@ -196,7 +198,7 @@ ...@@ -196,7 +198,7 @@
} }
.order-list { .order-list {
height: calc(100vh - 120px); height: calc(100vh - 180px);
.order-card { .order-card {
background: #fff; background: #fff;
...@@ -223,13 +225,13 @@ ...@@ -223,13 +225,13 @@
gap: 10px; gap: 10px;
.order-id { .order-id {
font-size: 16px; font-size: 14px;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
} }
.status { .status {
padding: 4px 12px; padding: 4px 6px;
border-radius: 10px; border-radius: 10px;
font-size: 12px; font-size: 12px;
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
<view v-if="currentShow === 'orderQuery'"> <view v-if="currentShow === 'orderQuery'">
<orderQueryContent></orderQueryContent> <orderQueryContent></orderQueryContent>
</view> </view>
<view v-if="currentShow === 'dailyReport'"> <!-- <view v-if="currentShow === 'dailyReport'">
<dailyReport></dailyReport> <dailyReport></dailyReport>
</view> </view> -->
<view v-if="currentShow === 'bossCard' && uc_staff_kind!==''"> <view v-if="currentShow === 'bossCard' && uc_staff_kind!==''">
<bossCard></bossCard> <bossCard></bossCard>
</view> </view>
...@@ -47,8 +47,9 @@ ...@@ -47,8 +47,9 @@
return { return {
isCarrier: false, isCarrier: false,
uc_staff_kind: '', uc_staff_kind: '',
currentShow: '', currentShow: 'bossCard',
topUserList: [] topUserList: [],
} }
}, },
onLoad() { onLoad() {
...@@ -72,16 +73,16 @@ ...@@ -72,16 +73,16 @@
updateTopUserList() { updateTopUserList() {
if (this.uc_staff_kind === 'boss') { if (this.uc_staff_kind === 'boss') {
this.topUserList = [ { this.topUserList = [{
name: '老板看板', name: '老板看板',
key: 'bossCard', key: 'bossCard',
url: '/pages/index/index' url: '/pages/index/index'
}, },
{ // {
name: '查看日报', // name: '查看日报',
key: 'dailyReport', // key: 'dailyReport',
url: '/pages/index/index' // url: '/pages/index/index'
}, // },
]; ];
} else if (this.uc_staff_kind === 'simulatedBoss') { } else if (this.uc_staff_kind === 'simulatedBoss') {
this.topUserList = [{ this.topUserList = [{
...@@ -90,10 +91,6 @@ ...@@ -90,10 +91,6 @@
url: '/pages/index/index' url: '/pages/index/index'
}, },
{ {
name: '查看日报',
key: 'dailyReport',
url: '/pages/index/index'
}, {
name: '填写日报', name: '填写日报',
key: 'dailyReportCreate', key: 'dailyReportCreate',
url: '/pages/index/index' url: '/pages/index/index'
......
...@@ -47,6 +47,9 @@ ...@@ -47,6 +47,9 @@
userLogin, userLogin,
SendMessage SendMessage
} from '../../api/apiList.js' } from '../../api/apiList.js'
import {
format
} from 'echarts'
const loginBehavior = require('../../mixins/loginBehavior.js') const loginBehavior = require('../../mixins/loginBehavior.js')
export default { export default {
...@@ -69,10 +72,12 @@ ...@@ -69,10 +72,12 @@
} }
}, },
onLoad() { onLoad() {
this.loginBg = 'static/img/bg/loginBg.png'
this.loginBg = 'static/img/bg/loginBg.png'
this.projectMini = getApp().globalData.projectMini this.projectMini = getApp().globalData.projectMini
this.rememberPd() this.rememberPd()
}, },
methods: { methods: {
rememberPd() { rememberPd() {
...@@ -85,6 +90,8 @@ ...@@ -85,6 +90,8 @@
console.log("rememberPd username2" + wx.getStorageSync('username2')) console.log("rememberPd username2" + wx.getStorageSync('username2'))
this.formData.password = wx.getStorageSync('password') this.formData.password = wx.getStorageSync('password')
_this.isChecked = isCheckedS _this.isChecked = isCheckedS
//自动登录
// this.submitForm()
} else { //用户没有勾选“记住密码” } else { //用户没有勾选“记住密码”
// 清除缓存,并将输入框置为空 // 清除缓存,并将输入框置为空
wx.setStorageSync('username2', ''); wx.setStorageSync('username2', '');
......
...@@ -9,9 +9,9 @@ let BASEURL = { ...@@ -9,9 +9,9 @@ let BASEURL = {
// url: 'http://192.168.1.199:7080' //唐浩然 // url: 'http://192.168.1.199:7080' //唐浩然
// url: 'http://192.168.0.230:8080' // xiaohan // url: 'http://192.168.0.230:8080' // xiaohan
// url: "https://botms-demo.logwirecloud.com", // url: "https://botms-demo.logwirecloud.com",
url: "http://localhost:8083", //开发 // url: "http://localhost:8083", //开发
// url: "http://122.112.220.204:8089", //开发 // url: "http://122.112.220.204:8089", //开发
// url: "https://stms.bjzc-scs.com", //生产 url: "https://stms.bjzc-scs.com", //生产
}; };
//当使用多域名代理服务时生效,用于统一添加API前缀以区分服务代理地址。本地开发H5注意修改manifest.json中Proxy代理规则 //当使用多域名代理服务时生效,用于统一添加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