youhua
This commit is contained in:
@ -16,10 +16,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="openTable(true, index)">一键展开</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="openTable(false, index)">一键收起</el-button>
|
||||
<el-button type="primary" @click="openTable(index)">{{ isExpandAll ? '一键收起' : '一键展开' }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="success" @click="downloadTemplate(1)">下载模板</el-button>
|
||||
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user