|
@@ -15,8 +15,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="page_jg_20"></div>
|
|
<div class="page_jg_20"></div>
|
|
|
<div class="page_table">
|
|
<div class="page_table">
|
|
|
- <el-table :data="tableData" stripe v-loading="tableLoading" element-loading-text="拼命加载中……" show-overflow-tooltip
|
|
|
|
|
- element-loading-spinner="el-icon-loading" element-loading-background="#ffffff" @row-click="handleRowClick">
|
|
|
|
|
|
|
+ <el-table :data="tableData" stripe v-loading="tableLoading" element-loading-text="拼命加载中……" show-overflow-tooltip highlight-current-row
|
|
|
|
|
+ element-loading-spinner="el-icon-loading" element-loading-background="#ffffff" @row-click="handleRowClick" ref="tableRef">
|
|
|
<el-table-column align="center" v-if="tableData.length" width="50">
|
|
<el-table-column align="center" v-if="tableData.length" width="50">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<el-radio v-model="selectRow.id" :value="row.id"></el-radio>
|
|
<el-radio v-model="selectRow.id" :value="row.id"></el-radio>
|
|
@@ -105,7 +105,8 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { ref, reactive, provide, onMounted } from 'vue'
|
|
|
|
|
|
|
+import { ElTable } from 'element-plus'
|
|
|
|
|
+import { ref, reactive, provide, onMounted, nextTick } from 'vue'
|
|
|
import { Search } from '@element-plus/icons-vue'
|
|
import { Search } from '@element-plus/icons-vue'
|
|
|
import { ElMessageBox, ElMessage } from 'element-plus'
|
|
import { ElMessageBox, ElMessage } from 'element-plus'
|
|
|
import AddSchool from '@/views/examination/addSchool.vue'
|
|
import AddSchool from '@/views/examination/addSchool.vue'
|
|
@@ -145,6 +146,8 @@ const handleRowClick = (row: any) => {
|
|
|
}
|
|
}
|
|
|
const selectListId = ref<string[]>([])
|
|
const selectListId = ref<string[]>([])
|
|
|
provide('selectListId', selectListId)
|
|
provide('selectListId', selectListId)
|
|
|
|
|
+
|
|
|
|
|
+const tableRef = ref<{ $el: HTMLDivElement } & InstanceType<typeof ElTable> | null>(null)
|
|
|
const GetJoinExamList = () => {
|
|
const GetJoinExamList = () => {
|
|
|
console.log(schooltName.value)
|
|
console.log(schooltName.value)
|
|
|
tableLoading.value = true
|
|
tableLoading.value = true
|
|
@@ -153,6 +156,9 @@ const GetJoinExamList = () => {
|
|
|
tableData.value = res.data
|
|
tableData.value = res.data
|
|
|
selectRow.value = tableData.value[0]
|
|
selectRow.value = tableData.value[0]
|
|
|
selectListId.value = selectRow.value?.children?.map(item => (item.tenantCode))?? []
|
|
selectListId.value = selectRow.value?.children?.map(item => (item.tenantCode))?? []
|
|
|
|
|
+ nextTick(() => {
|
|
|
|
|
+ tableRef.value.setCurrentRow(tableData.value[0]); // 高亮当前行
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
tableLoading.value = false
|
|
tableLoading.value = false
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|