From 316de611c7c289c70599ec1ce9197f119c9cb014 Mon Sep 17 00:00:00 2001
From: zmj <1493694146@qq.com>
Date: Thu, 13 Jun 2024 14:11:33 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug=EF=BC=8C=E6=9B=B4?=
=?UTF-8?q?=E6=96=B0=E4=BB=A3=E7=A0=81=EF=BC=8C=E4=BC=98=E5=8C=96=E9=94=AE?=
=?UTF-8?q?=E7=9B=98=E7=9B=91=E5=90=AC=E5=92=8C=E8=AE=A2=E5=8D=95=E7=BB=9F?=
=?UTF-8?q?=E8=AE=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
helper.json | 8 +++++++
src/layout/index.vue | 41 ++++++++++++++++++----------------
src/layout/myAside.vue | 6 +++++
src/router/index.js | 6 +++++
src/views/statistics/index.vue | 8 +++++++
5 files changed, 50 insertions(+), 19 deletions(-)
create mode 100644 helper.json
create mode 100644 src/views/statistics/index.vue
diff --git a/helper.json b/helper.json
new file mode 100644
index 0000000..44d4a24
--- /dev/null
+++ b/helper.json
@@ -0,0 +1,8 @@
+{
+ "path": {
+ "root": "@=src",
+ "api": "src/api",
+ "request": "../utils/request"
+ },
+ "api": []
+}
\ No newline at end of file
diff --git a/src/layout/index.vue b/src/layout/index.vue
index 4018f35..ee29318 100644
--- a/src/layout/index.vue
+++ b/src/layout/index.vue
@@ -19,49 +19,49 @@ const user_channel = connection.subscribe(`store_merchant_${userStore.userInfo.s
// 当user-2频道有message事件的消息时
user_channel.on('message', function (data) {
- console.log("收到消息--",data);
+ console.log("收到消息--", data);
try {
- if(data?.content?.type=='cash_register'&&data?.content?.msg=="您有一笔订单已支付"){
+ if (data?.content?.type == 'cash_register' && data?.content?.msg == "您有一笔订单已支付") {
mitt.emit('pay_success', data?.content?.data);
}
- if(data?.content?.type=='store_merchant'&&data?.content?.msg=="您有一笔新的订单"){
+ if (data?.content?.type == 'store_merchant' && data?.content?.msg == "您有一笔新的订单") {
mitt.emit('new_order', data?.content);
}
- if(data?.content?.type=='platform_print'){
+ if (data?.content?.type == 'platform_print') {
mitt.emit('letPrintReceipt', data?.content?.data);
}
} catch (error) {
-
+
}
});
// 断线事件
user_channel.on('close', function () {
-
+
});
// setTimeout(()=>{
// mitt.emit('new_order');
// }, 2000)
-const KeyboardEvent = (e)=>{
+const KeyboardEvent = (e) => {
console.log('按下', e.keyCode);
- if(e.keyCode == 16) mitt.emit('shift');
- if(e.keyCode == 120) mitt.emit('F9');
- if(e.keyCode == 13) mitt.emit('enter');
- if(e.keyCode == 37) mitt.emit('left');
- if(e.keyCode == 39) mitt.emit('right');
- if(e.keyCode == 38) mitt.emit('up');
- if(e.keyCode == 40) mitt.emit('down');
- if(e.keyCode == 46) mitt.emit('delete');
- if(e.keyCode == 45) mitt.emit('insert');
+ if (e.keyCode == 16) mitt.emit('shift');
+ if (e.keyCode == 120) mitt.emit('F9');
+ if (e.keyCode == 13) mitt.emit('enter');
+ if (e.keyCode == 37) mitt.emit('left');
+ if (e.keyCode == 39) mitt.emit('right');
+ if (e.keyCode == 38) mitt.emit('up');
+ if (e.keyCode == 40) mitt.emit('down');
+ if (e.keyCode == 46) mitt.emit('delete');
+ if (e.keyCode == 45) mitt.emit('insert');
}
-onMounted(()=>{
+onMounted(() => {
window.addEventListener('keydown', KeyboardEvent);
console.log('开启键盘监听');
})
-onUnmounted(()=>{
+onUnmounted(() => {
window.removeEventListener('keydown', KeyboardEvent);
console.log('关闭键盘监听');
})
@@ -97,13 +97,16 @@ onUnmounted(()=>{
width: 100vw;
height: 100vh;
background-color: #001529;
+
.el-header {
color: #fff;
height: 4rem;
}
+
.el-aside {
color: #fff;
}
+
.el-main {
background-color: #f5f5f5;
width: calc(100vw - 6.25rem);
@@ -111,7 +114,7 @@ onUnmounted(()=>{
border-radius: 2rem 0 0 0;
overflow-y: scroll;
padding: 1rem;
-
+
.my-main {
height: 100%;
width: 100%;
diff --git a/src/layout/myAside.vue b/src/layout/myAside.vue
index f49fdb9..57f844f 100644
--- a/src/layout/myAside.vue
+++ b/src/layout/myAside.vue
@@ -70,6 +70,12 @@ const list = ref([
ico: "FullScreen",
count: 0,
},
+ {
+ name: "statistics",
+ title: "盈收统计 ",
+ ico: "TrendCharts",
+ count: 0,
+ },
// { name: "purchaseOrder", title: "采购订单", ico: "Van", count: 0 },
// { name: "orderCount", title: "订单统计", ico: "DocumentRemove", count: 0 },
// { name: "wallet", title: "余额提现", ico: "Wallet", count: 0 },
diff --git a/src/router/index.js b/src/router/index.js
index 02872a2..5703e48 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -53,6 +53,12 @@ const routes = [
meta: { title: '订单核销' },
component: () => import('@/views/convert/index.vue'),
},
+ {
+ path: '/statistics',
+ name: 'statistics',
+ meta: { title: '盈收统计' },
+ component: () => import('@/views/statistics/index.vue'),
+ },
{
path: '/test',
name: 'test',
diff --git a/src/views/statistics/index.vue b/src/views/statistics/index.vue
new file mode 100644
index 0000000..cc066f1
--- /dev/null
+++ b/src/views/statistics/index.vue
@@ -0,0 +1,8 @@
+
+ 我是统计
+
+
+
\ No newline at end of file