From 094a7ba0f00d1518674dbb3a6b769e9340d47b5b Mon Sep 17 00:00:00 2001
From: fengsen <2548667232@qq.com>
Date: Fri, 15 Aug 2025 18:26:36 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E9=87=8F=E6=B8=85=E5=8D=95?=
=?UTF-8?q?=E7=9A=84=E5=B1=95=E5=BC=80=E5=92=8C=E6=8A=98=E5=8F=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 2 +-
src/views/design/billofQuantities/index.vue | 24 ++++++++++-----------
2 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/.env.development b/.env.development
index 1c549fa..fe20df3 100644
--- a/.env.development
+++ b/.env.development
@@ -5,7 +5,7 @@ VITE_APP_TITLE = 新能源项目管理平台
VITE_APP_ENV = 'development'
# 开发环境
-VITE_APP_BASE_API = 'http://192.168.110.180:8899'
+VITE_APP_BASE_API = 'http://192.168.110.159:8898'
# 无人机接口地址
diff --git a/src/views/design/billofQuantities/index.vue b/src/views/design/billofQuantities/index.vue
index 2cc7bc1..a791844 100644
--- a/src/views/design/billofQuantities/index.vue
+++ b/src/views/design/billofQuantities/index.vue
@@ -70,8 +70,9 @@
:row-class-name="state.tableData.length === 0 ? 'table-null' : ''"
style="width: 100%; margin-bottom: 20px; height: calc(100vh - 305px)"
row-key="id"
+ lazy
border
- :default-expand-all="state.isOpen"
+ :default-expand-all="true"
>
@@ -132,10 +133,6 @@ const state = reactive({
error: null,
// 前三个
tableData: [],
- // 物质设备清单
- // tableData_sdsqd: [],
- // 展开收起
- isOpen: true,
// 版本号
versionsData: {}
});
@@ -155,7 +152,6 @@ const handleTabChange = (tab) => {
};
onMounted(async () => {
await getVersionNums();
- openTable(true, state.work_order_type);
});
// 获取版本号
async function getVersionNums(isSheet = true) {
@@ -268,18 +264,19 @@ function importExcel(options) {
if (code == 200) {
proxy.$modal.msgSuccess(res.msg || '导入成功');
// 更新列表
- getVersionNums(false);
+ if (state.work_order_type == 3) {
+ getVersionNums(false);
+ }else{
+ getVersionNums();
+ }
} else {
- getVersionNums();
proxy.$modal.msgError(res.msg || '导入失败');
}
- })
- .finally(() => {
+ }).catch(()=>{
+ proxy.$modal.msgError(res.msg || '导入失败');
+ }).finally(() => {
state.loading.list = false;
})
- .finally(() => {
- // loading.close();
- });
}
// 切换表名
function handleChange(sheet) {
@@ -299,6 +296,7 @@ function openTable(flag, index) {
nextTick(() => {
// 通过索引获取当前标签页的表格实例
const currentTable = tableRef.value[index];
+ console.log(currentTable, index);
if (currentTable) {
handleArr(state.tableData, flag, currentTable);
}