|
|
@ -2,21 +2,16 @@ |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-form :model="searchForm" ref="searchRef" inline label-width="0"> |
|
|
|
<el-form :model="searchForm" ref="searchRef" inline label-width="0"> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-input |
|
|
|
<el-cascader |
|
|
|
v-model="searchForm.schoolName" |
|
|
|
:options="schoolOption" |
|
|
|
placeholder="请输入驾校名称" |
|
|
|
v-model="searchForm.schPlace" |
|
|
|
clearable |
|
|
|
|
|
|
|
style="width: 180px" |
|
|
|
|
|
|
|
@keyup.enter="handleQuery" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="searchForm.placeName" |
|
|
|
|
|
|
|
placeholder="请输入场地名称" |
|
|
|
|
|
|
|
clearable |
|
|
|
clearable |
|
|
|
style="width: 180px" |
|
|
|
filterable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
show-all-levels |
|
|
|
|
|
|
|
style="width: 300px" |
|
|
|
|
|
|
|
placeholder="选择驾校/场地" |
|
|
|
|
|
|
|
:props="{ expandTrigger: 'hover', multiple: false, checkStrictly: true }" |
|
|
|
|
|
|
|
@change="handleQuery" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
@ -69,21 +64,6 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
|
|
|
<el-col :span="6" :offset="0"> |
|
|
|
|
|
|
|
<div class="head-container" style="max-height: 700px; overflow-y: auto"> |
|
|
|
|
|
|
|
<el-tree |
|
|
|
|
|
|
|
ref="tree" |
|
|
|
|
|
|
|
:data="schoolOption" |
|
|
|
|
|
|
|
accordion |
|
|
|
|
|
|
|
node-key="id" |
|
|
|
|
|
|
|
highlight-current |
|
|
|
|
|
|
|
:default-expanded-keys="selectNodes.map((item) => item.id)" |
|
|
|
|
|
|
|
@node-click="handleNodeClick" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="18" :offset="0"> |
|
|
|
|
|
|
|
<el-table |
|
|
|
<el-table |
|
|
|
:data="tableList" |
|
|
|
:data="tableList" |
|
|
|
v-loading="loading" |
|
|
|
v-loading="loading" |
|
|
@ -139,15 +119,12 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
<!-- 分页 --> |
|
|
|
|
|
|
|
<Pagination |
|
|
|
<Pagination |
|
|
|
v-model:limit="searchForm.pageSize" |
|
|
|
v-model:limit="searchForm.pageSize" |
|
|
|
v-model:page="searchForm.pageNo" |
|
|
|
v-model:page="searchForm.pageNo" |
|
|
|
:total="total" |
|
|
|
:total="total" |
|
|
|
@pagination="getList" |
|
|
|
@pagination="getList" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
<Dialog title="批量修改" v-model="batchStatusDialogShow" width="400px"> |
|
|
|
<Dialog title="批量修改" v-model="batchStatusDialogShow" width="400px"> |
|
|
|
<el-form :model="statusForm" ref="statusRef" label-width="80px"> |
|
|
|
<el-form :model="statusForm" ref="statusRef" label-width="80px"> |
|
|
|
<el-form-item label="选择状态" prop="status"> |
|
|
|
<el-form-item label="选择状态" prop="status"> |
|
|
@ -186,8 +163,7 @@ const total = ref(0) |
|
|
|
const tableList = ref([]) |
|
|
|
const tableList = ref([]) |
|
|
|
|
|
|
|
|
|
|
|
const searchForm = ref({ |
|
|
|
const searchForm = ref({ |
|
|
|
schoolName: undefined, |
|
|
|
schPlace: undefined, |
|
|
|
placeName: undefined, |
|
|
|
|
|
|
|
typeName: undefined, |
|
|
|
typeName: undefined, |
|
|
|
licenseType: undefined, |
|
|
|
licenseType: undefined, |
|
|
|
pageNo: 1, |
|
|
|
pageNo: 1, |
|
|
@ -195,41 +171,24 @@ const searchForm = ref({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const schoolOption = ref([]) |
|
|
|
const schoolOption = ref([]) |
|
|
|
const selectNodes = ref([]) |
|
|
|
// const selectNodes = ref([]) |
|
|
|
|
|
|
|
|
|
|
|
async function getSchoolList() { |
|
|
|
async function getSchoolList() { |
|
|
|
try { |
|
|
|
try { |
|
|
|
const data = await PlaceApi.getPlaceList() |
|
|
|
const data = await PlaceApi.getPlaceList() |
|
|
|
schoolOption.value = data.schoolList.map((item) => ({ |
|
|
|
schoolOption.value = data.schoolList.map((item) => ({ |
|
|
|
id: item.schoolId, |
|
|
|
value: item.schoolId, |
|
|
|
label: item.schoolName, |
|
|
|
label: item.schoolName, |
|
|
|
level: 1, |
|
|
|
|
|
|
|
children: data.placeList |
|
|
|
children: data.placeList |
|
|
|
.filter((place) => item.schoolId === place.schoolId) |
|
|
|
.filter((place) => item.schoolId === place.schoolId) |
|
|
|
.map((place) => ({ |
|
|
|
.map((place) => ({ |
|
|
|
id: place.placeId, |
|
|
|
value: place.placeId, |
|
|
|
label: place.name, |
|
|
|
label: place.name |
|
|
|
level: 2 |
|
|
|
|
|
|
|
})) |
|
|
|
})) |
|
|
|
})) |
|
|
|
})) |
|
|
|
} catch {} |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function handleNodeClick(data, node) { |
|
|
|
|
|
|
|
if (data.level === 1) { |
|
|
|
|
|
|
|
selectNodes.value = [{ id: data.id, name: data.label }] |
|
|
|
|
|
|
|
searchForm.value.schoolName = data.label |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
selectNodes.value = [ |
|
|
|
|
|
|
|
{ id: node.parent.data.id, name: node.parent.data.label }, |
|
|
|
|
|
|
|
{ id: data.id, name: data.label } |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
searchForm.value.schoolName = node.parent.data.label |
|
|
|
|
|
|
|
searchForm.value.placeName = data.label |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
handleQuery() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const columns = [ |
|
|
|
const columns = [ |
|
|
|
{ props: 'schoolName', label: '驾校', width: '100px' }, |
|
|
|
{ props: 'schoolName', label: '驾校', width: '100px' }, |
|
|
|
{ props: 'placeName', label: '场地' }, |
|
|
|
{ props: 'placeName', label: '场地' }, |
|
|
@ -248,7 +207,15 @@ function handleQuery() { |
|
|
|
async function getList() { |
|
|
|
async function getList() { |
|
|
|
loading.value = true |
|
|
|
loading.value = true |
|
|
|
try { |
|
|
|
try { |
|
|
|
const data = await ClassApi.getClassTypePage(searchForm.value) |
|
|
|
const params = { ...searchForm.value } |
|
|
|
|
|
|
|
if (params.schPlace && params.schPlace.length) { |
|
|
|
|
|
|
|
params.schoolId = params.schPlace[0] |
|
|
|
|
|
|
|
if (params.schPlace.length == 2) { |
|
|
|
|
|
|
|
params.placeId = params.schPlace[1] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
delete params.schPlace |
|
|
|
|
|
|
|
const data = await ClassApi.getClassTypePage(params) |
|
|
|
tableList.value = data.list |
|
|
|
tableList.value = data.list |
|
|
|
total.value = data.total |
|
|
|
total.value = data.total |
|
|
|
} finally { |
|
|
|
} finally { |
|
|
@ -263,8 +230,7 @@ function handleOpenDialog(type, id = null) { |
|
|
|
|
|
|
|
|
|
|
|
function handleReset() { |
|
|
|
function handleReset() { |
|
|
|
searchForm.value = { |
|
|
|
searchForm.value = { |
|
|
|
schoolName: undefined, |
|
|
|
schPlace: undefined, |
|
|
|
placeName: undefined, |
|
|
|
|
|
|
|
typeName: undefined, |
|
|
|
typeName: undefined, |
|
|
|
licenseType: undefined, |
|
|
|
licenseType: undefined, |
|
|
|
pageNo: 1, |
|
|
|
pageNo: 1, |
|
|
|