diff --git a/src/assets/styles/ruoyi.scss b/src/assets/styles/ruoyi.scss
index d9b3a411..f5da3c16 100644
--- a/src/assets/styles/ruoyi.scss
+++ b/src/assets/styles/ruoyi.scss
@@ -143,7 +143,7 @@ h6 {
.pagination-container .el-pagination {
right: 0;
- position: absolute;
+ position: absolute !important;
}
@media (max-width: 768px) {
diff --git a/src/utils/request.js b/src/utils/request.js
index 772fee96..877bdfb1 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -1,5 +1,5 @@
import axios from 'axios'
-import {Message, MessageBox, Notification} from 'element-ui'
+import {Message, MessageBox, Notification, Loading} from 'element-ui'
import store from '@/store'
import {getAccessToken, getRefreshToken, getTenantId, setToken, getVisitTenantId} from '@/utils/auth'
import errorCode from '@/utils/errorCode'
@@ -31,8 +31,36 @@ const service = axios.create({
// 禁用 Cookie 等信息
withCredentials: false,
})
+
+
+let loadingInstance = null
+function startLoading() {
+ loadingInstance = Loading.service({
+ fullscreen: false,
+ text: '拼命加载中...',
+ background: 'rgba(0, 0, 0, 0.1)'
+ })
+}
+function endLoading() {
+ loadingInstance.close()
+}
+let needLoadingRequestCount = 0
+function showFullScreenLoading() {
+ if (needLoadingRequestCount === 0) {
+ startLoading()
+ }
+ needLoadingRequestCount++
+}
+function tryHideFullScreenLoading() {
+ if (needLoadingRequestCount <= 0) return
+ needLoadingRequestCount--
+ if (needLoadingRequestCount === 0) {
+ endLoading()
+ }
+}
// request拦截器
service.interceptors.request.use(config => {
+ showFullScreenLoading()
// 是否需要设置 token
const isToken = (config.headers || {}).isToken === false
if (getAccessToken() && !isToken) {
@@ -88,12 +116,14 @@ service.interceptors.request.use(config => {
}
return config
}, error => {
+ tryHideFullScreenLoading()
console.log(error)
Promise.reject(error)
})
// 响应拦截器
service.interceptors.response.use(async res => {
+ tryHideFullScreenLoading()
let { data } = res
// 未设置状态码则默认成功状态
// 二进制数据则直接返回,例如说 Excel 导出
@@ -202,6 +232,7 @@ service.interceptors.response.use(async res => {
}
}, error => {
console.log('err' + error)
+ tryHideFullScreenLoading()
let {message} = error;
if (message === "Network Error") {
message = "后端接口连接异常";
diff --git a/src/views/home/components/budgetDetails.vue b/src/views/home/components/budgetDetails.vue
index bf6b600f..12695e42 100644
--- a/src/views/home/components/budgetDetails.vue
+++ b/src/views/home/components/budgetDetails.vue
@@ -8,7 +8,7 @@
-
+
@@ -358,6 +358,9 @@ export default {
this.tableData = [];
});
},
+ handleLevelChange(id) {
+ this.$emit('updateLevel', id)
+ },
// 表格单元格数据变更回调
inputChange(val) {
// 安全修改:判断索引是否存在,避免数组越界
@@ -377,7 +380,7 @@ export default {
// 清空并重新请求数据,恢复原始状态
this.$nextTick(() => {
this.tableData = [];
- this.getData();
+ this.getDataPage();
});
},
// 初始化表格列配置(核心:精准控制inputArea挂载)
@@ -498,7 +501,8 @@ export default {
this.upload.open = false
this.upload.isUploading = false
this.$refs.upload.clearFiles();
- this.getData()
+ this.getDataPage();
+ this.$emit('updateLeft')
} else {
this.$message.error(`上传失败:${response.data.msg || '未知错误'}`)
}
diff --git a/src/views/home/components/indicatorDetails.vue b/src/views/home/components/indicatorDetails.vue
index 1762087d..e7ee524c 100644
--- a/src/views/home/components/indicatorDetails.vue
+++ b/src/views/home/components/indicatorDetails.vue
@@ -8,7 +8,7 @@
-
+
@@ -214,9 +214,10 @@ export default {
// 清空并重新请求数据,恢复原始状态
this.$nextTick(() => {
this.tableData = [];
- this.getData();
+ this.getDataPage();
});
this.$modal.msgSuccess("保存成功");
+ this.$emit('updateLeft')
}).catch(() => { });
},
// 取消编辑,恢复只读模式
@@ -227,7 +228,7 @@ export default {
// 清空并重新请求数据,恢复原始状态
this.$nextTick(() => {
this.tableData = [];
- this.getData();
+ this.getDataPage();
});
console.log('已取消编辑,恢复原始数据');
},
@@ -238,7 +239,7 @@ export default {
// 清空并重新请求数据,恢复原始状态
this.$nextTick(() => {
this.tableData = [];
- this.getData();
+ this.getDataPage();
});
},
@@ -290,6 +291,7 @@ export default {
getLevelStruc().then((res) => {
this.levelLList = res.data || [];
this.form.levelId = this.levelLList[0].id;
+ this.$emit('updateLevel', this.levelLList[0].id)
this.getDataPage()
}).catch(err => {
console.error('获取所属层级失败:', err);
@@ -320,6 +322,9 @@ export default {
});
},
+ handleLevelChange(id) {
+ this.$emit('updateLevel', id)
+ },
// 查询按钮点击事件(可根据需求扩展逻辑)
onSubmit() {
@@ -372,7 +377,8 @@ export default {
this.upload.open = false
this.upload.isUploading = false
this.$refs.upload.clearFiles();
- this.getData()
+ this.getDataPage();
+ this.$emit('updateLeft')
} else {
this.$message.error(`上传失败:${response.data.msg || '未知错误'}`)
}
diff --git a/src/views/home/costComponents/costOverview.vue b/src/views/home/costComponents/costOverview.vue
index b8f8d067..d13e7138 100644
--- a/src/views/home/costComponents/costOverview.vue
+++ b/src/views/home/costComponents/costOverview.vue
@@ -27,7 +27,7 @@ export default {
chart: null,
// 固定3条默认数据,作为展示模板
parentItemList: [
- { name: "总制造成本", targetValue: 0, value: 0, proportion: 0, flag: 0 },
+ { name: "制造成本", targetValue: 0, value: 0, proportion: 0, flag: 0 },
{ name: "原片成本", targetValue: 0, value: 0, proportion: 0, flag: 0 },
{ name: "加工成本", targetValue: 0, value: 0, proportion: 0, flag: 0 },
]
diff --git a/src/views/home/indicatorSubmissionDetails.vue b/src/views/home/indicatorSubmissionDetails.vue
index f1e699fb..55facaa9 100644
--- a/src/views/home/indicatorSubmissionDetails.vue
+++ b/src/views/home/indicatorSubmissionDetails.vue
@@ -17,7 +17,7 @@
grid-template-columns:416px 1192px;
">
-
+
+
+
diff --git a/src/views/report/cockpitReport/index.vue b/src/views/report/cockpitReport/index.vue
index c0ac4400..9c3dc135 100644
--- a/src/views/report/cockpitReport/index.vue
+++ b/src/views/report/cockpitReport/index.vue
@@ -1,34 +1,29 @@