|
@@ -16,7 +16,8 @@
|
|
|
<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 highlight-current-row
|
|
<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">
|
|
|
|
|
|
|
+ element-loading-spinner="el-icon-loading" element-loading-background="#ffffff"
|
|
|
|
|
+ @row-click="handleRowClick" ref="tableRef" height="calc(100vh - 200px)">
|
|
|
<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>
|
|
@@ -63,7 +64,7 @@
|
|
|
<div class="page_jg_20"></div>
|
|
<div class="page_jg_20"></div>
|
|
|
<div class="page_table">
|
|
<div class="page_table">
|
|
|
<el-table :data="selectRow?.children" stripe v-loading="tableLoading" element-loading-text="拼命加载中……" show-overflow-tooltip
|
|
<el-table :data="selectRow?.children" stripe v-loading="tableLoading" element-loading-text="拼命加载中……" show-overflow-tooltip
|
|
|
- element-loading-spinner="el-icon-loading" element-loading-background="#ffffff">
|
|
|
|
|
|
|
+ element-loading-spinner="el-icon-loading" element-loading-background="#ffffff" height="calc(100vh - 200px)">
|
|
|
<el-table-column type="index" label="序号" align="center" width="50" />
|
|
<el-table-column type="index" label="序号" align="center" width="50" />
|
|
|
<el-table-column prop="tenantCode" label="学校编号" align="center" width="80" />
|
|
<el-table-column prop="tenantCode" label="学校编号" align="center" width="80" />
|
|
|
<el-table-column prop="tenantName" label="学校名称" align="center" />
|
|
<el-table-column prop="tenantName" label="学校名称" align="center" />
|
|
@@ -113,7 +114,6 @@ import AddSchool from '@/views/examination/addSchool.vue'
|
|
|
import { getJoinExamList, deleteSchool } from '@/api/examination'
|
|
import { getJoinExamList, deleteSchool } from '@/api/examination'
|
|
|
const schooltName = ref('')
|
|
const schooltName = ref('')
|
|
|
const tableLoading = ref(false)
|
|
const tableLoading = ref(false)
|
|
|
-const tableData = ref([])
|
|
|
|
|
interface SchoolItem {
|
|
interface SchoolItem {
|
|
|
id: number | string;
|
|
id: number | string;
|
|
|
tenantCode: string;
|
|
tenantCode: string;
|
|
@@ -124,6 +124,7 @@ interface SchoolItem {
|
|
|
childrenCount?: number;
|
|
childrenCount?: number;
|
|
|
children?: SchoolItem[];
|
|
children?: SchoolItem[];
|
|
|
}
|
|
}
|
|
|
|
|
+const tableData = ref<SchoolItem[]>([])
|
|
|
const selectRow = ref<SchoolItem>({
|
|
const selectRow = ref<SchoolItem>({
|
|
|
id: '',
|
|
id: '',
|
|
|
tenantCode: '',
|
|
tenantCode: '',
|
|
@@ -134,9 +135,9 @@ const selectRow = ref<SchoolItem>({
|
|
|
childrenCount: 0,
|
|
childrenCount: 0,
|
|
|
children: []
|
|
children: []
|
|
|
})
|
|
})
|
|
|
-const permissions = ref([]) // 权限列表
|
|
|
|
|
|
|
+const permissions = ref<string[]>([]) // 权限列表
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
- permissions.value = JSON.parse(localStorage.getItem('permissions'))
|
|
|
|
|
|
|
+ permissions.value = JSON.parse(localStorage.getItem('permissions') || '[]')
|
|
|
GetJoinExamList()
|
|
GetJoinExamList()
|
|
|
})
|
|
})
|
|
|
const checkRowKey = ref(0)
|
|
const checkRowKey = ref(0)
|
|
@@ -159,7 +160,7 @@ const GetJoinExamList = () => {
|
|
|
selectRow.value = tableData.value[checkRowKey.value]
|
|
selectRow.value = tableData.value[checkRowKey.value]
|
|
|
selectListId.value = selectRow.value?.children?.map(item => (item.tenantCode))?? []
|
|
selectListId.value = selectRow.value?.children?.map(item => (item.tenantCode))?? []
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
- tableRef.value.setCurrentRow(tableData.value[checkRowKey.value]); // 高亮当前行
|
|
|
|
|
|
|
+ tableRef.value?.setCurrentRow(tableData.value[checkRowKey.value]); // 高亮当前行
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
tableLoading.value = false
|
|
tableLoading.value = false
|