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 @@ + + +