From c96b07c6eb048ed56aa2866e516ed5188855ad5f Mon Sep 17 00:00:00 2001
From: flower-string <2178503051@qq.com>
Date: Thu, 6 Mar 2025 15:09:24 +0800
Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E6=88=90=E6=9C=AC=E7=AE=A1?=
=?UTF-8?q?=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-ui/.env.development | 3 +-
ruoyi-ui/.env.production | 3 +-
ruoyi-ui/src/api/oa/finance.js | 47 ++
ruoyi-ui/src/utils/websocket.js | 33 +-
.../src/views/oa/finance-detail/index.vue | 768 ++++++++++++++++++
5 files changed, 836 insertions(+), 18 deletions(-)
create mode 100644 ruoyi-ui/src/views/oa/finance-detail/index.vue
diff --git a/ruoyi-ui/.env.development b/ruoyi-ui/.env.development
index 3285d81..ef39f1b 100644
--- a/ruoyi-ui/.env.development
+++ b/ruoyi-ui/.env.development
@@ -5,7 +5,8 @@ VUE_APP_TITLE = 福安德综合办公系统
ENV = 'development'
# 若依管理系统/开发环境
-VUE_APP_BASE_API = '/dev-api'
+# VUE_APP_BASE_API = '/dev-api'
+VUE_APP_BASE_API = 'http://110.41.139.73:8080'
# 应用访问路径 例如使用前缀 /admin/
VUE_APP_CONTEXT_PATH = '/'
diff --git a/ruoyi-ui/.env.production b/ruoyi-ui/.env.production
index e89ddb8..24e8b9c 100644
--- a/ruoyi-ui/.env.production
+++ b/ruoyi-ui/.env.production
@@ -5,7 +5,8 @@ VUE_APP_TITLE = 福安德综合办公系统
ENV = 'production'
# 若依管理系统/生产环境
-VUE_APP_BASE_API = '/prod-api'
+# VUE_APP_BASE_API = '/prod-api'
+VUE_APP_BASE_API = 'http://110.41.139.73:8080'
# 应用访问路径 例如使用前缀 /admin/
VUE_APP_CONTEXT_PATH = '/'
diff --git a/ruoyi-ui/src/api/oa/finance.js b/ruoyi-ui/src/api/oa/finance.js
index 6f085a2..901e1c5 100644
--- a/ruoyi-ui/src/api/oa/finance.js
+++ b/ruoyi-ui/src/api/oa/finance.js
@@ -93,3 +93,50 @@ export function delFinance(financeId) {
method: 'delete'
})
}
+
+/**
+ *
+ * @returns 获取进出账管理列表
+ */
+export function getCostDetailList() {
+ return request({
+ url: '/oa/cost/list',
+ method: 'get'
+ })
+}
+
+/**
+ * @param costId 进出账管理id
+ * @returns 根据id获取进出账管理详情
+ * */
+export function getCostDetailById(costId) {
+ return request({
+ url: `/oa/cost/${costId}`,
+ method: 'get'
+ })
+}
+
+/**
+ *
+ * @param {*} data 创建成本详情
+ * @returns
+ */
+export function createCostDetail(data) {
+ return request({
+ url: '/oa/cost/add',
+ method: 'post',
+ data: data
+ })
+}
+
+/**
+ *
+ * @param {*} costId 删除成本详情
+ * @returns
+ */
+export function deleteCostDetail(costId) {
+ return request({
+ url: `/oa/cost/${costId}`,
+ method: 'delete'
+ })
+}
\ No newline at end of file
diff --git a/ruoyi-ui/src/utils/websocket.js b/ruoyi-ui/src/utils/websocket.js
index 9b61423..e3097ac 100644
--- a/ruoyi-ui/src/utils/websocket.js
+++ b/ruoyi-ui/src/utils/websocket.js
@@ -45,7 +45,8 @@ const start = ()=> {
// socket.send("heartbeat");
} else {
//否则重连
- reconnect();
+ // 这里一直重连容易卡死浏览器
+ // reconnect();
}
serverTimeoutObj = setTimeout(function() {
//超时关闭
@@ -55,19 +56,19 @@ const start = ()=> {
}
//重新连接
-const reconnect =() => {
- if (lockReconnect) {
- return;
- }
- lockReconnect = true;
- //没连接上会一直重连,设置延迟避免请求过多
- timeoutnum && clearTimeout(timeoutnum);
- timeoutnum = setTimeout(function() {
- //新连接
- initWebSocket();
- lockReconnect = false;
- }, 1000);
-}
+// const reconnect =() => {
+// if (lockReconnect) {
+// return;
+// }
+// lockReconnect = true;
+// //没连接上会一直重连,设置延迟避免请求过多
+// timeoutnum && clearTimeout(timeoutnum);
+// timeoutnum = setTimeout(function() {
+// //新连接
+// initWebSocket();
+// lockReconnect = false;
+// }, 1000);
+// }
//重置心跳
const reset =() => {
@@ -84,7 +85,7 @@ const sendWebsocket = (message) =>{
const webSocketOnError = (e) => {
initWebSocket();
- reconnect();
+ // reconnect();
}
@@ -107,7 +108,7 @@ const webSocketOnMessage = (e)=> {
}
const closeWebsocket=(e) => {
- reconnect();
+ // reconnect();
}
//断开连接
diff --git a/ruoyi-ui/src/views/oa/finance-detail/index.vue b/ruoyi-ui/src/views/oa/finance-detail/index.vue
new file mode 100644
index 0000000..6212f05
--- /dev/null
+++ b/ruoyi-ui/src/views/oa/finance-detail/index.vue
@@ -0,0 +1,768 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 重置
+
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查看详情
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+