From 9c6c07f471ad97f86aaab03b061fad6e56d1dde6 Mon Sep 17 00:00:00 2001 From: ylj20011123 Date: Wed, 26 Nov 2025 13:58:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=8F=90=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E5=AF=B9=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 11 + pages/commercialBI/noData.vue | 74 ++++++ pages/index/index.vue | 487 +++++++++++++++++++--------------- 3 files changed, 351 insertions(+), 221 deletions(-) create mode 100644 pages/commercialBI/noData.vue diff --git a/pages.json b/pages.json index 741958b..c630980 100644 --- a/pages.json +++ b/pages.json @@ -73,6 +73,17 @@ } ] }, + { // 商业BI + "root": "pages/commercialBI", + "pages": [ + { + "path": "noData", + "style": { + "navigationBarTitleText": "" + } + } + ] + }, { "root": "pages/everdayRenven", "pages": [ diff --git a/pages/commercialBI/noData.vue b/pages/commercialBI/noData.vue new file mode 100644 index 0000000..cd156d8 --- /dev/null +++ b/pages/commercialBI/noData.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/pages/index/index.vue b/pages/index/index.vue index 066f634..77535b1 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -154,7 +154,7 @@ - + @@ -162,26 +162,20 @@ - - - - {{ currentMoney }} - + + + {{ currentMoney }} + + + + {{ currentTotal }} {{ currentTotal ? '万笔' : '' }} + {{ $util.handleGetMonthDay(nowDay) }}/{{ howDay }} - - - - - {{ currentTotal }} {{ currentTotal ? '万笔' : '' }} - {{ $util.handleGetMonthDay(nowDay) }}/{{ howDay }} - - + - + @@ -189,15 +183,12 @@ {{ subItem.label || "" }} - - {{ subItem.value || "" }} - /{{ subItem.unit || "" }} - - - {{ subItem.totalCount || "" }} - {{ - subItem.totalCountUnit ? `/${subItem.totalCountUnit}` : "" }} - + {{ subItem.value || "" }} + {{ subItem.unit || "" }} + + + {{ subItem.totalCount || "" }} + {{ subItem.totalCountUnit ? `${subItem.totalCountUnit}` : "" }} @@ -342,6 +333,9 @@ export default { watch: { user: { handler(newValue, value) { + console.log('newValuenewValuenewValue', newValue); + console.log('valuevaluevaluevaluevalue', value); + let _this = this let userInfo = JSON.parse(JSON.stringify(newValue)); _this.useInfo = JSON.parse(JSON.stringify(newValue)); @@ -349,9 +343,10 @@ export default { if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] === 1) { _this.isReturn = false; } else if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) { - uni.redirectTo({ - url: `/pages/commercialBI/noData?type=homeIndex`, - }); + // 说明登录了 没权限 + // uni.redirectTo({ + // url: `/pages/commercialBI/noData?type=noAuthor`, + // }); } else { _this.topShowData = null _this.moneyRateList = [] @@ -407,13 +402,14 @@ export default { let userInfo = JSON.parse(JSON.stringify(this.user)); _this.useInfo = JSON.parse(JSON.stringify(this.user)); // console.log('userInfouserInfo', userInfo); - - if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] === 1) { - _this.isReturn = false; - } else if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) { - uni.redirectTo({ - url: `/pages/commercialBI/noData?type=homeIndex`, - }); + if (userInfo) { + if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] === 1) { + _this.isReturn = false; + } else if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) { + // uni.redirectTo({ + // url: `/pages/commercialBI/noData?type=noAuthor`, + // }); + } } // if (!_this.isReturn) { @@ -428,12 +424,14 @@ export default { onPullDownRefresh: function () { let _this = this; let userInfo = JSON.parse(JSON.stringify(this.user)); - if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] === 1) { - _this.isReturn = false; - } else if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) { - uni.redirectTo({ - url: `/pages/commercialBI/noData?type=homeIndex`, - }); + if (userInfo) { + if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] === 1) { + _this.isReturn = false; + } else if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) { + // uni.redirectTo({ + // url: `/pages/commercialBI/noData?type=noAuthor`, + // }); + } } if (!_this.isReturn) { // 下拉刷新时清空缓存,确保数据最新 @@ -504,59 +502,88 @@ export default { handleShowYDModal() { this.ydModal = !this.ydModal; }, - goToRobot() { - if (this.isReturn) { - let _this = this - uni.showModal({ - title: '温馨提示', - content: '请您授权登录后再操作。', - success(res) { - if (res.confirm) { - _this.$util.toNextRoute('redirectTo', '/pages/register/register') - } - } - }) - return - } - - this.$util.toNextRoute("navigateTo", `/pages/robot/index`); - // this.$util.toNextRoute("navigateTo", `/pages/testPage/index`); - }, // 跳转去出勤情况 handleGoAttendanceStatus() { if (this.isReturn) { - let _this = this - uni.showModal({ - title: '温馨提示', - content: '请您授权登录后再操作。', - success(res) { - if (res.confirm) { - _this.$util.toNextRoute('redirectTo', '/pages/register/register') + let userInfo = JSON.parse(JSON.stringify(this.user)); + if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) { + uni.showModal({ + title: '温馨提示', + content: '抱歉,您没有权限查看数智化看板,请联系管理员进行授权', + success(res) { } - } - }) - return + }) + return + } else { + let _this = this + uni.showModal({ + title: '温馨提示', + content: '请您授权登录后再操作。', + success(res) { + if (res.confirm) { + _this.$util.toNextRoute('redirectTo', '/pages/register/register') + } + } + }) + return + } } this.$util.toNextRoute("navigateTo", `/pages/attendanceStatus/index`); }, // 点击服务区信息跳转 handleGoServiceMessage() { + if (this.isReturn) { + let userInfo = JSON.parse(JSON.stringify(this.user)); + if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) { + uni.showModal({ + title: '温馨提示', + content: '抱歉,您没有权限查看数智化看板,请联系管理员进行授权', + success(res) { + } + }) + return + } else { + let _this = this + uni.showModal({ + title: '温馨提示', + content: '请您授权登录后再操作。', + success(res) { + if (res.confirm) { + _this.$util.toNextRoute('redirectTo', '/pages/register/register') + } + } + }) + return + } + } + this.$util.toNextRoute("navigateTo", `/pages/DigitalIntelligenceDashboard/index`); }, // 跳转到经营报表 handleGoOperate() { if (this.isReturn) { - let _this = this - uni.showModal({ - title: '温馨提示', - content: '请您授权登录后再操作。', - success(res) { - if (res.confirm) { - _this.$util.toNextRoute('redirectTo', '/pages/register/register') + let userInfo = JSON.parse(JSON.stringify(this.user)); + if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) { + uni.showModal({ + title: '温馨提示', + content: '抱歉,您没有权限查看数智化看板,请联系管理员进行授权', + success(res) { } - } - }) - return + }) + return + } else { + let _this = this + uni.showModal({ + title: '温馨提示', + content: '请您授权登录后再操作。', + success(res) { + if (res.confirm) { + _this.$util.toNextRoute('redirectTo', '/pages/register/register') + } + } + }) + return + } } this.$util.toNextRoute( @@ -572,17 +599,28 @@ export default { }, handleGoMap() { if (this.isReturn) { - let _this = this - uni.showModal({ - title: '温馨提示', - content: '请您授权登录后再操作。', - success(res) { - if (res.confirm) { - _this.$util.toNextRoute('redirectTo', '/pages/register/register') + let userInfo = JSON.parse(JSON.stringify(this.user)); + if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) { + uni.showModal({ + title: '温馨提示', + content: '抱歉,您没有权限查看数智化看板,请联系管理员进行授权', + success(res) { } - } - }) - return + }) + return + } else { + let _this = this + uni.showModal({ + title: '温馨提示', + content: '请您授权登录后再操作。', + success(res) { + if (res.confirm) { + _this.$util.toNextRoute('redirectTo', '/pages/register/register') + } + } + }) + return + } } this.$util.toNextRoute("navigateTo", "/pages/map/index?type=index"); }, @@ -1061,8 +1099,10 @@ export default { .searchText { font-family: 'PingFangSC'; - font-weight: 400; - font-size: 24rpx; + font-weight: 500; + /* Slightly bolder */ + font-size: 28rpx; + /* Slightly larger */ color: #9fa1aa; line-height: 40rpx; text-align: left; @@ -1101,8 +1141,10 @@ export default { .swiperItemContentMonth { font-family: 'PingFangSC'; - font-weight: 400; - font-size: 28rpx; + font-weight: 500; + /* Slightly bolder */ + font-size: 30rpx; + /* Slightly larger */ color: #160002; line-height: 40rpx; text-align: left; @@ -1110,8 +1152,10 @@ export default { .swiperItemContentUnit { font-family: 'PingFangSC'; - font-weight: 400; - font-size: 24rpx; + font-weight: 500; + /* Slightly bolder */ + font-size: 30rpx; + /* Slightly larger */ color: #A69E9F; line-height: 40rpx; text-align: left; @@ -1144,7 +1188,8 @@ export default { .addValue { font-family: 'DINAlternate'; font-weight: bold; - font-size: 28rpx; + font-size: 30rpx; + /* Slightly larger */ line-height: 40rpx; text-align: left; font-style: normal; @@ -1152,8 +1197,10 @@ export default { .rightNav { font-family: PingFangSC, PingFang SC; - font-weight: 400; - font-size: 24rpx; + font-weight: 500; + /* Slightly bolder */ + font-size: 30rpx; + /* Slightly larger */ color: #A69E9F; line-height: 40rpx; text-align: left; @@ -1174,7 +1221,7 @@ export default { .leftBox { width: 144rpx; height: 144rpx; - margin-right: 16rpx; + margin-right: 20rpx; position: relative; .rateChartsBox { @@ -1230,14 +1277,16 @@ export default { .itemIcon { width: 12rpx; height: 12rpx; - margin-right: 12rpx; + margin-right: 20rpx; border-radius: 50%; } .itemName { font-family: PingFangSC, PingFang SC; - font-weight: 400; - font-size: 28rpx; + font-weight: 500; + /* Slightly bolder */ + font-size: 30rpx; + /* Slightly larger */ color: #160002; line-height: 40rpx; text-align: left; @@ -1252,7 +1301,8 @@ export default { width: 33%; font-family: DINAlternate-Bold, DINAlternate; font-weight: bold; - font-size: 28rpx; + font-size: 30rpx; + /* Slightly larger */ color: #160002; line-height: 40rpx; text-align: right; @@ -1264,7 +1314,8 @@ export default { width: 33%; font-family: DINAlternate-Bold, DINAlternate; font-weight: bold; - font-size: 28rpx; + font-size: 30rpx; + /* Slightly larger */ color: #e83944; line-height: 40rpx; text-align: right; @@ -1287,8 +1338,10 @@ export default { .itemName { font-family: PingFangSC, PingFang SC; - font-weight: 400; - font-size: 28rpx; + font-weight: 500; + /* Slightly bolder */ + font-size: 30rpx; + /* Slightly larger */ color: #160002; line-height: 40rpx; text-align: left; @@ -1296,8 +1349,10 @@ export default { .unit { font-family: PingFangSC, PingFang SC; - font-weight: 400; - font-size: 24rpx; + font-weight: 500; + /* Slightly bolder */ + font-size: 30rpx; + /* Slightly larger */ color: #9a9a9a; line-height: 36rpx; text-align: left; @@ -1315,7 +1370,8 @@ export default { .revenueNum { font-family: DINAlternate-Bold, DINAlternate; font-weight: bold; - font-size: 28rpx; + font-size: 30rpx; + /* Slightly larger */ color: #160002; line-height: 44rpx; text-align: left; @@ -1325,15 +1381,18 @@ export default { .revenueAdd { font-family: DINAlternate-Bold, DINAlternate; font-weight: bold; - font-size: 28rpx; + font-size: 30rpx; + /* Slightly larger */ color: #e83944; line-height: 44rpx; text-align: left; font-style: normal; .revenueAddNotice { - font-size: 24rpx; - font-weight: 400; + font-size: 30rpx; + /* Slightly larger */ + font-weight: 500; + /* Slightly bolder */ color: #a69e9f; margin-right: 4px; } @@ -1355,15 +1414,14 @@ export default { box-sizing: border-box; padding: 0 32rpx; margin-top: 24rpx; + margin-bottom: 24rpx; .revenue-banner { - background: #ffffff; - color: #160002; - padding: 24rpx 24rpx 8rpx; + background: linear-gradient(180deg, #F0E4ED 0%, #F0E8F1 18%, #FFFFFF 100%); + padding: 24rpx; border-radius: 16rpx; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); + box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05); margin-bottom: 24rpx; - border: 2rpx solid #f0f0f0; .revenue-header { display: flex; @@ -1371,130 +1429,103 @@ export default { justify-content: space-between; .revenue-title { - font-weight: 400; font-size: 28rpx; - color: #160002; + font-weight: 500; } .right { width: 32rpx; height: 32rpx; + opacity: 0.7; } } .revenue-content { - display: flex; - align-items: baseline; + .revenue-amount-wrapper { + display: flex; + align-items: baseline; + margin-top: 12rpx; - .revenue-amount { - font-family: DINAlternate-Bold, DINAlternate; - font-size: 36rpx; - font-weight: 600; - margin-right: 12rpx; - color: #27B25F; + .revenue-amount { + font-size: 30rpx; + line-height: 1.5; + font-weight: 600; + color: @primary; + } + + .revenue-label { + margin-left: 4rpx; + line-height: 1.5; + font-size: 24rpx; + color: @muted; + } } - .revenue-label { + .revenue-date { + display: flex; + justify-content: space-between; font-size: 24rpx; - color: #666; + color: @muted; + margin-top: 8rpx; } } - - .revenue-date { - font-size: 24rpx; - color: #999; - } } - } - - .thingBox { - width: 100%; - box-sizing: border-box; - padding: 0 32rpx; - margin-top: 24rpx; - margin-bottom: 24rpx; .data-grid { - // display: grid; - // grid-template-columns: repeat(2, 1fr); - // gap: 16rpx; - width: 100%; - display: flex; - align-items: center; - justify-content: space-between; - flex-wrap: wrap; + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 24rpx; .data-item { - width: calc(50% - 8rpx); background: #fff; - padding: 18rpx 18rpx 18rpx 18rpx; + padding: 24rpx; border-radius: 16rpx; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); - box-sizing: border-box; - // display: flex; - // align-items: center; - // align-items: flex-start; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); .data-item-top { - width: 100%; display: flex; align-items: center; + margin-bottom: 12rpx; .data-icon { - width: 50rpx; - height: 50rpx; - background: linear-gradient(135deg, #DCE6FF, #EEF3FF); - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - margin-right: 16rpx; + width: 30rpx; + height: 30rpx; + margin-right: 8rpx; .icon { - width: 32rpx; - height: 32rpx; + width: 100%; + height: 100%; } } .data-label { font-size: 28rpx; - color: #160002; - font-weight: 600; - // margin-bottom: 8rpx; + font-weight: 500; + line-height: 1; } } .data-item-data { - margin-top: 8rpx; - // display: flex; - // align-items: center; - // justify-content: space-between; + display: flex; + align-items: baseline; - .data-value { - // width: 50%; - width: 100%; - display: flex; - justify-content: space-between; - - .value { - font-size: 28rpx; - font-weight: 600; - color: #160002; - } - - .unit { - font-size: 24rpx; - color: #160002; - margin-left: 4rpx; - font-weight: 600; - white-space: nowrap; - } - - .total { - font-size: 24rpx; - color: #A69E9F; - } + .value { + font-size: 28rpx; + font-weight: 700; + color: @primary; } + + .unit { + margin-left: 4rpx; + font-size: 24rpx; + color: @muted; + } + } + + .data-item-total { + font-size: 24rpx; + color: @muted; + margin-top: 4rpx; } } } @@ -1505,8 +1536,8 @@ export default { width: calc(100% - 80rpx); box-sizing: border-box; padding: 2rpx; - background: #fff; - border-radius: 16rpx; + border-radius: 20rpx; + /* Slightly more rounded corners */ margin-left: 40rpx; margin-bottom: 24rpx; @@ -1514,7 +1545,8 @@ export default { width: 100%; height: 100%; box-sizing: border-box; - padding: 24rpx 24rpx; + padding: 28rpx 28rpx 12rpx; + /* Adjusted padding */ background: linear-gradient(180deg, #F0E4ED 0%, #F0E8F1 18%, #FFFFFF 100%); border-radius: 16rpx; display: flex; @@ -1537,7 +1569,8 @@ export default { } .dateText { - font-size: 28rpx; + font-size: 30rpx; + /* Slightly larger */ font-family: PingFangSC, PingFang SC; font-weight: 500; color: #fc2e20; @@ -1546,9 +1579,11 @@ export default { } .day { - font-size: 24rpx; + font-size: 30rpx; + /* Slightly larger */ font-family: PingFangSC, PingFang SC; - font-weight: 400; + font-weight: 500; + /* Slightly bolder */ color: #a69e9f; line-height: 40rpx; } @@ -1561,8 +1596,9 @@ export default { align-items: center; .right { - width: 32rpx; - height: 32rpx; + width: 36rpx; + /* Slightly larger icon */ + height: 36rpx; } } } @@ -1578,7 +1614,8 @@ export default { display: inline-flex; font-family: DINAlternate-Bold, DINAlternate; font-weight: bold; - font-size: 36rpx; + font-size: 48rpx; + /* Significantly larger */ color: #160002; line-height: 40rpx; text-align: right; @@ -1587,9 +1624,11 @@ export default { .moneyLabel { height: 100%; - font-size: 24rpx; + font-size: 28rpx; + /* Slightly larger */ font-family: DINAlternate-Bold, DINAlternate; - font-weight: 400; + font-weight: 500; + /* Slightly bolder */ color: #a69e9f; display: inline-flex; align-items: center; @@ -1615,7 +1654,7 @@ export default { display: flex; align-items: center; justify-content: center; - margin-right: 16rpx; + margin-right: 20rpx; background: linear-gradient(180deg, #DCE6FF 0%, #EEF3FF 100%); .leftIcon { @@ -1628,9 +1667,11 @@ export default { width: calc(100% - 86rpx); .moneyLabel { - font-size: 28rpx; + font-size: 30rpx; + /* Slightly larger */ font-family: PingFangSC, PingFang SC; - font-weight: 400; + font-weight: 500; + /* Slightly bolder */ color: #000; line-height: 30rpx; } @@ -1643,7 +1684,8 @@ export default { justify-content: space-between; .money { - font-size: 28rpx; + font-size: 30rpx; + /* Slightly larger */ font-family: DINAlternate-Bold, DINAlternate; font-weight: bold; color: #160002; @@ -1655,9 +1697,11 @@ export default { .moneyUnit { width: 70rpx; - font-size: 24rpx; + font-size: 30rpx; + /* Slightly larger */ font-family: PingFangSC, PingFang SC; - font-weight: 400; + font-weight: 500; + /* Slightly bolder */ color: #a69e9f; line-height: 30rpx; margin-left: 8rpx; @@ -1678,15 +1722,14 @@ export default { width: calc(100% - 64rpx); margin-left: 32rpx; margin-bottom: calc(80px + env(safe-area-inset-bottom)); - background: #ffffff; border-radius: 16rpx; box-sizing: border-box; padding: 32rpx 0; display: flex; - // display: grid; // grid-template-columns: repeat(4, 1fr); // gap: 24rpx; box-shadow: @shadow; + background-color: #fff; .funItem { width: 25%; @@ -1713,9 +1756,11 @@ export default { } .funText { - font-size: 28rpx; + font-size: 30rpx; + /* Slightly larger */ font-family: PingFangSC, PingFang SC; - font-weight: 400; + font-weight: 500; + /* Slightly bolder */ color: #160002; line-height: 30rpx; }