|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <el-dialog v-model="schoolData.showDialog" :title="`${schoolData.tenantName} 新增学校`" width="680px">
|
|
|
|
|
|
|
+ <el-dialog v-model="schoolData.showDialog" :title="`${schoolData.tenantName} 新增学校`" width="800px">
|
|
|
<div class="page_search">
|
|
<div class="page_search">
|
|
|
<div class="search_content">
|
|
<div class="search_content">
|
|
|
<div class="content_left">
|
|
<div class="content_left">
|
|
@@ -16,7 +16,7 @@
|
|
|
</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="拼命加载中……" height="500px"
|
|
|
|
|
|
|
+ <el-table :data="tableData" stripe v-loading="tableLoading" element-loading-text="拼命加载中……" height="500px" ref="tableDataRef"
|
|
|
element-loading-spinner="el-icon-loading" element-loading-background="#ffffff" @selection-change="handleSelectionChange">
|
|
element-loading-spinner="el-icon-loading" element-loading-background="#ffffff" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" align="center" />
|
|
<el-table-column type="selection" align="center" />
|
|
|
<el-table-column type="index" label="序号" align="center" />
|
|
<el-table-column type="index" label="序号" align="center" />
|
|
@@ -61,8 +61,8 @@ export default {
|
|
|
</script>
|
|
</script>
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
import { Search } from '@element-plus/icons-vue'
|
|
import { Search } from '@element-plus/icons-vue'
|
|
|
-import { ElMessage } from 'element-plus'
|
|
|
|
|
-import { ref, inject, onMounted } from 'vue'
|
|
|
|
|
|
|
+import { ElMessage, ElTable } from 'element-plus'
|
|
|
|
|
+import { ref, inject, onMounted, nextTick } from 'vue'
|
|
|
import { getSingleExamList, addSingleSchool } from '@/api/examination'
|
|
import { getSingleExamList, addSingleSchool } from '@/api/examination'
|
|
|
import { provinceTree } from '@/api/school'
|
|
import { provinceTree } from '@/api/school'
|
|
|
interface SchoolDataItem {
|
|
interface SchoolDataItem {
|
|
@@ -88,6 +88,8 @@ const provinceSelect = ref('')
|
|
|
const schooltName = ref('')
|
|
const schooltName = ref('')
|
|
|
const tableData = ref([])
|
|
const tableData = ref([])
|
|
|
const selUserList = ref([])
|
|
const selUserList = ref([])
|
|
|
|
|
+const selectListId = inject<any>('selectListId', [])
|
|
|
|
|
+const tableDataRef = ref<InstanceType<typeof ElTable>>()
|
|
|
// 提交按钮loading
|
|
// 提交按钮loading
|
|
|
const submitLoading = ref(false)
|
|
const submitLoading = ref(false)
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
@@ -114,6 +116,13 @@ const GetSingleExamList = async () => {
|
|
|
})
|
|
})
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
tableData.value = res.data
|
|
tableData.value = res.data
|
|
|
|
|
+ nextTick(() => {
|
|
|
|
|
+ tableData.value.forEach((item: any) => {
|
|
|
|
|
+ if(selectListId.value.includes(item.tenantCode)) {
|
|
|
|
|
+ tableDataRef.value?.toggleRowSelection(item, true)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}catch {} finally {
|
|
}catch {} finally {
|
|
|
tableLoading.value = false
|
|
tableLoading.value = false
|