-
+
-
+
-
+
- 一键展开
-
-
- 一键收起
+ {{ isExpandAll ? '一键收起' : '一键展开' }}
下载模板
@@ -126,6 +123,7 @@ const { proxy } = getCurrentInstance();
const { work_order_type } = toRefs(proxy?.useDict('work_order_type'));
const tableRef = ref({});
console.log(work_order_type);
+const isExpandAll = ref(true);
// tableData
// 版本号
@@ -155,6 +153,7 @@ const state = reactive({
});
// tab切换
const handleTabChange = (tab) => {
+ isExpandAll.value = true;
console.log('tab', tab);
state.tableData = [];
state.options = [];
@@ -314,13 +313,14 @@ function handleChangeVersion(versions) {
handleQueryList();
}
// 在 openTable 方法中通过索引获取对应的表格实例
-function openTable(flag, index) {
+function openTable( index) {
+ isExpandAll.value = !isExpandAll.value;
nextTick(() => {
// 通过索引获取当前标签页的表格实例
const currentTable = tableRef.value[index];
console.log(currentTable, index);
if (currentTable) {
- handleArr(state.tableData, flag, currentTable);
+ handleArr(state.tableData, isExpandAll.value, currentTable);
}
});
}