|
|
@@ -1,18 +1,14 @@
|
|
|
<template>
|
|
|
<div class="main_container">
|
|
|
<div class="page_item end_item">
|
|
|
- <div class="page_search">
|
|
|
- <div class="search_content">
|
|
|
- <div class="content_left">
|
|
|
- <SearchBlock :searchList="blockSearchList" @searchChange="HandleSearchChange"></SearchBlock>
|
|
|
- </div>
|
|
|
- <div v-if="userInfo.roles.includes('Admin')" class="content_right">
|
|
|
- <el-button class="button_refresh" @click="OpenBatchImportDialog">批量导入</el-button>
|
|
|
- <el-button class="button_background" @click="OpenSchoolFormDialog()">新增学校</el-button>
|
|
|
- </div>
|
|
|
+
|
|
|
+ <DefaultBlockSearch @searchChange="HandleSearchChange">
|
|
|
+ <div v-if="userInfo.roles.includes('Admin')" class="content_right">
|
|
|
+ <el-button class="button_refresh" @click="OpenBatchImportDialog">批量导入</el-button>
|
|
|
+ <el-button class="button_background" @click="OpenSchoolFormDialog()">新增学校</el-button>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <FormSearchGroup :searchList="formSearchList" @searchChange="HandleSearchChange"></FormSearchGroup>
|
|
|
+ </DefaultBlockSearch>
|
|
|
+
|
|
|
<Table :tableColumns="publicSeasTableColumns" :tableData="tableData"
|
|
|
:currentPage="currentPage" :pageSize="pageSize" :totalNum="totalNum"
|
|
|
:showPageSize="true" @paginationChange="HandlePaginationChange">
|
|
|
@@ -80,9 +76,10 @@ import { computed, onMounted, ref } from 'vue';
|
|
|
import { useRouter } from 'vue-router';
|
|
|
import {ElMessage} from 'element-plus'
|
|
|
|
|
|
-import FormSearchGroup from '@/baseComponents/FormSearchGroup.vue';
|
|
|
-import {formSearchList} from './formSearchGroup';
|
|
|
-import SearchBlock from '@/baseComponents/SearchBlock.vue';
|
|
|
+import DefaultBlockSearch from '@/components/HighSeasCustomerHeaderSearch/DefaultBlockSearch/index.vue'
|
|
|
+import {stageOptions, regionOptions } from '@/components/HighSeasCustomerHeaderSearch/commonVar'
|
|
|
+import {defaultPageSearchParams as searchParams} from '@/components/HighSeasCustomerHeaderSearch/commonVar'
|
|
|
+
|
|
|
import Table from '@/baseComponents/Table.vue';
|
|
|
import {publicSeasTableColumns,templateTableColumns} from './table'
|
|
|
|
|
|
@@ -109,59 +106,6 @@ const userInfo = computed(()=>{
|
|
|
return JSON.parse(localStorage.getItem('userInfo') || '{}')
|
|
|
})
|
|
|
|
|
|
-/** 1. 头部筛选 有关操作 */
|
|
|
-const searchParams = ref({
|
|
|
- stage:'all',
|
|
|
- province:'all',
|
|
|
- area:'all',
|
|
|
- queryStr:'',
|
|
|
-})
|
|
|
-// 获取头部筛选数据
|
|
|
-const stageOptions = ref([])
|
|
|
-const regionOptions = ref([])
|
|
|
-const blockSearchList = computed(()=>{
|
|
|
- let areaOptions = []
|
|
|
- if(searchParams.value.province !== 'all'){
|
|
|
- areaOptions = regionOptions.value.find(item=>item.value === searchParams.value.province)?.subData || []
|
|
|
- }else{
|
|
|
- areaOptions = regionOptions.value.map(item=>{
|
|
|
- return item.subData || []
|
|
|
- }).flat()
|
|
|
- }
|
|
|
- return [
|
|
|
- {
|
|
|
- label: '学段',
|
|
|
- key: 'stage',
|
|
|
- type: 'single',
|
|
|
- defaultValue: searchParams.value.stage,
|
|
|
- options: [
|
|
|
- { label: '全部', value: 'all' },
|
|
|
- ...(stageOptions.value),
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- label: '省份',
|
|
|
- key: 'province',
|
|
|
- type: 'single',
|
|
|
- options: [
|
|
|
- { label: '全部', value: 'all' },
|
|
|
- ...(regionOptions.value),
|
|
|
- ],
|
|
|
- defaultValue: searchParams.value.province,
|
|
|
- },
|
|
|
- {
|
|
|
- label: '地区',
|
|
|
- key: 'area',
|
|
|
- type: 'single',
|
|
|
- options: [
|
|
|
- { label: '全部', value: 'all' },
|
|
|
- ...(areaOptions),
|
|
|
- ],
|
|
|
- hidden:searchParams.value.province == 'all' ? true : false,
|
|
|
- defaultValue: searchParams.value.area,
|
|
|
- }
|
|
|
- ]
|
|
|
-});
|
|
|
// 获取头部筛选数据
|
|
|
const GetHeaderSearchParams = async ()=>{
|
|
|
let res = await getHeaderSearchParamsApi()
|
|
|
@@ -418,9 +362,6 @@ onMounted( async()=>{
|
|
|
<style lang="scss" scoped>
|
|
|
.end_item{
|
|
|
gap:16px;
|
|
|
- .search_content{
|
|
|
- align-items: flex-start;
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
.batch_import_form{
|