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); }