场地定位和搜索

pull/2/head
qsh 3 months ago
parent d6be0488c4
commit 57d6aa3a0e
  1. 192
      src/views/SchoolManagement/Place/index.vue

@ -71,107 +71,105 @@
</div>
<!-- 左侧场地弹框 -->
<div class="place-dialog">
<el-card v-if="placeDialogShow" :body-style="{ padding: '10px' }">
<template #header>
<div class="clearfix">
<div class="map-card-title">场地设置</div>
<el-tooltip content="取点" placement="right" effect="dark">
<el-button class="add-icon" @click="isPointing = !isPointing">
<Icon icon="ep:location" />
</el-button>
</el-tooltip>
</div>
</template>
<el-tabs v-model="placeTab">
<el-tab-pane label="场地信息" name="info">
<el-form ref="FormPlace" :model="placeForm" label-width="70px">
<el-form-item label="所属驾校" prop="schoolId">
<el-select
v-model="placeForm.schoolId"
placeholder="请选择"
clearable
class="w-full"
>
<el-option
v-for="dict in schoolList"
:key="dict.schoolId"
:label="dict.schoolName"
:value="dict.schoolId"
/>
</el-select>
</el-form-item>
<el-form-item label="名称" prop="name">
<el-input v-model="placeForm.name" placeholder="输入名称" />
</el-form-item>
<el-form-item label="旗子颜色" prop="flagColor">
<el-radio-group v-model="placeForm.flagColor">
<el-radio v-for="(item, index) in colorOptions" :key="index" :label="item">
<img :src="flagMap[item]" style="width: 20px" />
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="地址" prop="address">
<el-input v-model="placeForm.address" placeholder="输入地址" />
</el-form-item>
<el-form-item label="经度" prop="lng">
<el-input-number
v-model="placeForm.lng"
:min="1"
:controls="false"
placeholder="输入经度"
style="width: 100%"
<el-card v-if="placeDialogShow" class="place-dialog" :body-style="{ padding: '10px' }">
<template #header>
<div class="clearfix">
<div class="map-card-title">场地设置</div>
<el-tooltip content="取点" placement="right" effect="dark">
<el-button class="add-icon" @click="isPointing = !isPointing">
<Icon icon="ep:location" />
</el-button>
</el-tooltip>
</div>
</template>
<el-tabs v-model="placeTab">
<el-tab-pane label="场地信息" name="info">
<el-form ref="FormPlace" :model="placeForm" label-width="70px">
<el-form-item label="所属驾校" prop="schoolId">
<el-select v-model="placeForm.schoolId" placeholder="请选择" clearable class="w-full">
<el-option
v-for="dict in schoolList"
:key="dict.schoolId"
:label="dict.schoolName"
:value="dict.schoolId"
/>
</el-form-item>
<el-form-item label="纬度" prop="lat">
<el-input-number
v-model="placeForm.lat"
:min="1"
:controls="false"
placeholder="输入纬度"
style="width: 100%"
</el-select>
</el-form-item>
<el-form-item label="名称" prop="name">
<el-input v-model="placeForm.name" placeholder="输入名称" />
</el-form-item>
<el-form-item label="旗子颜色" prop="flagColor">
<el-radio-group v-model="placeForm.flagColor">
<el-radio v-for="(item, index) in colorOptions" :key="index" :label="item">
<img :src="flagMap[item]" style="width: 20px" />
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="地址" prop="address">
<el-input v-model="placeForm.address" placeholder="输入地址" />
</el-form-item>
<el-form-item label="经度" prop="lng">
<el-input-number
v-model="placeForm.lng"
:min="1"
:controls="false"
placeholder="输入经度"
style="width: 100%"
/>
</el-form-item>
<el-form-item label="纬度" prop="lat">
<el-input-number
v-model="placeForm.lat"
:min="1"
:controls="false"
placeholder="输入纬度"
style="width: 100%"
/>
</el-form-item>
<el-form-item label="所属区域" prop="area">
<el-select v-model="placeForm.area" placeholder="请选择" clearable class="w-full">
<el-option
v-for="dict in areaOptions"
:key="dict.id"
:label="dict.name"
:value="dict.id"
/>
</el-form-item>
<el-form-item label="所属区域" prop="area">
<el-select v-model="placeForm.area" placeholder="请选择" clearable class="w-full">
<el-option
v-for="dict in areaOptions"
:key="dict.id"
:label="dict.name"
:value="dict.id"
/>
</el-select>
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input v-model="placeForm.phone" placeholder="输入电话" />
</el-form-item>
<el-form-item label="负责人" prop="contact">
<el-input v-model="placeForm.contact" placeholder="输入负责人" />
</el-form-item>
<!-- <el-form-item label="是否推荐" prop="contact">
</el-select>
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input v-model="placeForm.phone" placeholder="输入电话" />
</el-form-item>
<el-form-item label="负责人" prop="contact">
<el-input v-model="placeForm.contact" placeholder="输入负责人" />
</el-form-item>
<!-- <el-form-item label="是否推荐" prop="contact">
<el-radio v-model="placeForm.recommend" :label="true"></el-radio>
<el-radio v-model="placeForm.recommend" :label="false"></el-radio>
</el-form-item> -->
</el-form>
</el-tab-pane>
<el-tab-pane label="描述" name="desc">
<Editor v-model:modelValue="placeForm.introduce" />
</el-tab-pane>
</el-tabs>
<div class="flex items-center justify-center mt-10px">
<el-button type="primary" @click="onSubmit">保存</el-button>
<el-button @click="closePlaceDialog">取消</el-button>
</div>
</el-card>
<el-autocomplete
class="ml-10px"
v-model="areaValue"
clearable
placeholder="输入并搜索位置"
:fetch-suggestions="remoteMethod"
@select="currentSelect"
/>
</div>
</el-form>
</el-tab-pane>
<el-tab-pane label="描述" name="desc">
<Editor v-model:modelValue="placeForm.introduce" />
</el-tab-pane>
</el-tabs>
<div class="flex items-center justify-center mt-10px">
<el-button type="primary" @click="onSubmit">保存</el-button>
<el-button @click="closePlaceDialog">取消</el-button>
</div>
</el-card>
<el-autocomplete
:style="{
position: 'absolute',
top: '20px',
left: placeDialogShow ? '380px' : '20px',
width: '200px'
}"
v-model="areaValue"
clearable
placeholder="输入并搜索位置"
:fetch-suggestions="remoteMethod"
@select="currentSelect"
/>
<!-- 底部驾校场地列表 -->
<el-card
@ -749,7 +747,7 @@ onMounted(() => {
position: absolute;
left: 20px;
top: 20px;
width: 500px;
width: 350px;
display: flex;
}

Loading…
Cancel
Save