|
|
@ -11,10 +11,8 @@
|
|
|
|
:width="850"
|
|
|
|
:width="850"
|
|
|
|
@cancel="handleClose"
|
|
|
|
@cancel="handleClose"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<a-tabs
|
|
|
|
<a-tabs
|
|
|
|
v-if="
|
|
|
|
v-if="title === '新建预约'"
|
|
|
|
title === '新建预约'
|
|
|
|
|
|
|
|
"
|
|
|
|
|
|
|
|
v-model:activeKey="activeKey"
|
|
|
|
v-model:activeKey="activeKey"
|
|
|
|
centered
|
|
|
|
centered
|
|
|
|
@change="tabsChange"
|
|
|
|
@change="tabsChange"
|
|
|
@ -22,14 +20,8 @@
|
|
|
|
<a-tab-pane key="1" tab="A类型客户"> </a-tab-pane>
|
|
|
|
<a-tab-pane key="1" tab="A类型客户"> </a-tab-pane>
|
|
|
|
<a-tab-pane key="2" tab="B类型客户" force-render> </a-tab-pane>
|
|
|
|
<a-tab-pane key="2" tab="B类型客户" force-render> </a-tab-pane>
|
|
|
|
</a-tabs>
|
|
|
|
</a-tabs>
|
|
|
|
<a-tabs
|
|
|
|
|
|
|
|
v-else-if="
|
|
|
|
<a-tabs v-else v-model:activeKey="activeKey" centered>
|
|
|
|
title !== '新建预约'
|
|
|
|
|
|
|
|
"
|
|
|
|
|
|
|
|
v-model:activeKey="activeKey"
|
|
|
|
|
|
|
|
centered
|
|
|
|
|
|
|
|
@change="tabsChange"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<a-tab-pane v-if="formModel.customType === 0" key="1" tab="A类型客户"> </a-tab-pane>
|
|
|
|
<a-tab-pane v-if="formModel.customType === 0" key="1" tab="A类型客户"> </a-tab-pane>
|
|
|
|
<a-tab-pane v-if="formModel.customType === 1" key="2" tab="B类型客户" force-render>
|
|
|
|
<a-tab-pane v-if="formModel.customType === 1" key="2" tab="B类型客户" force-render>
|
|
|
|
</a-tab-pane>
|
|
|
|
</a-tab-pane>
|
|
|
@ -430,8 +422,12 @@
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</a-modal>
|
|
|
|
</a-modal>
|
|
|
|
<!-- 匹配信息确认弹窗 -->
|
|
|
|
<!-- 匹配信息确认弹窗 -->
|
|
|
|
<a-modal v-model:visible="matchregisterVisible" title="确认信息" @ok="matchhandleOk">
|
|
|
|
<a-modal
|
|
|
|
|
|
|
|
v-model:visible="matchregisterVisible"
|
|
|
|
|
|
|
|
title="确认信息"
|
|
|
|
|
|
|
|
@ok="matchhandleOk(formModel.detailAddress)"
|
|
|
|
|
|
|
|
>
|
|
|
|
<p>重新匹配将清空预约门店信息,是否重新匹配?</p>
|
|
|
|
<p>重新匹配将清空预约门店信息,是否重新匹配?</p>
|
|
|
|
</a-modal>
|
|
|
|
</a-modal>
|
|
|
|
</a-modal>
|
|
|
|
</a-modal>
|
|
|
@ -473,7 +469,13 @@ const userInfoCurrent = ref<string | undefined>('')
|
|
|
|
// required: true,
|
|
|
|
// required: true,
|
|
|
|
// trigger: 'change'
|
|
|
|
// trigger: 'change'
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// watch(
|
|
|
|
|
|
|
|
// () => activeKey.value,
|
|
|
|
|
|
|
|
// (newVal, oldVal) => {
|
|
|
|
|
|
|
|
// console.log('newVal, oldVal', newVal, oldVal)
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// { immediate: true, deep: true }
|
|
|
|
|
|
|
|
// )
|
|
|
|
onMounted(() => {
|
|
|
|
onMounted(() => {
|
|
|
|
//省市区三级下拉框列表数据
|
|
|
|
//省市区三级下拉框列表数据
|
|
|
|
provincesAndCitiesAndAutonomousOptions.value = window.globalProvincesAndCitiesAndAutonomousRegions
|
|
|
|
provincesAndCitiesAndAutonomousOptions.value = window.globalProvincesAndCitiesAndAutonomousRegions
|
|
|
@ -496,7 +498,7 @@ onMounted(() => {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
//当前激活 tab 面板的 key
|
|
|
|
//当前激活 tab 面板的 key
|
|
|
|
const activeKey = ref('1')
|
|
|
|
const activeKey = ref('')
|
|
|
|
//tabs change事件
|
|
|
|
//tabs change事件
|
|
|
|
const tabsChange = (val: string) => {
|
|
|
|
const tabsChange = (val: string) => {
|
|
|
|
handleMapInit()
|
|
|
|
handleMapInit()
|
|
|
@ -530,7 +532,6 @@ const reservationTimeClass = computed(() => ({
|
|
|
|
//小区动态生成只读/禁用样式
|
|
|
|
//小区动态生成只读/禁用样式
|
|
|
|
const isDetailAddressDisabled = ref(false)
|
|
|
|
const isDetailAddressDisabled = ref(false)
|
|
|
|
const isDetailAddressReadOnly = ref(false)
|
|
|
|
const isDetailAddressReadOnly = ref(false)
|
|
|
|
|
|
|
|
|
|
|
|
const detailAddressReadOnlyDynamicClass = computed(() => ({
|
|
|
|
const detailAddressReadOnlyDynamicClass = computed(() => ({
|
|
|
|
'custom-disabled-style': isDetailAddressDisabled.value,
|
|
|
|
'custom-disabled-style': isDetailAddressDisabled.value,
|
|
|
|
'custom-readonly-style':
|
|
|
|
'custom-readonly-style':
|
|
|
@ -555,7 +556,6 @@ const addressChange = async (value: any) => {
|
|
|
|
formModel.economize = value[0]
|
|
|
|
formModel.economize = value[0]
|
|
|
|
formModel.market = value[1]
|
|
|
|
formModel.market = value[1]
|
|
|
|
formModel.distinguish = value[2]
|
|
|
|
formModel.distinguish = value[2]
|
|
|
|
// console.log(value.length, 'value.length')
|
|
|
|
|
|
|
|
// if (value.length === 2) {
|
|
|
|
// if (value.length === 2) {
|
|
|
|
// formModel.detailAddress = value[0] + value[1]
|
|
|
|
// formModel.detailAddress = value[0] + value[1]
|
|
|
|
// } else if (value.length === 3) {
|
|
|
|
// } else if (value.length === 3) {
|
|
|
@ -733,7 +733,6 @@ const accordingAddressGetCenter = () => {
|
|
|
|
|
|
|
|
|
|
|
|
//输入详细地址去获取经纬度从而标记中心点封装的方法
|
|
|
|
//输入详细地址去获取经纬度从而标记中心点封装的方法
|
|
|
|
const getLocation = (type: string) => {
|
|
|
|
const getLocation = (type: string) => {
|
|
|
|
// console.log(address, '标记中心点address')
|
|
|
|
|
|
|
|
const addressValue =
|
|
|
|
const addressValue =
|
|
|
|
//标记中心点
|
|
|
|
//标记中心点
|
|
|
|
formModel.address?.toString().split(',').join('') + formModel.detailAddress
|
|
|
|
formModel.address?.toString().split(',').join('') + formModel.detailAddress
|
|
|
@ -744,7 +743,6 @@ const getLocation = (type: string) => {
|
|
|
|
lng.value = result.geocodes[0].location.lng
|
|
|
|
lng.value = result.geocodes[0].location.lng
|
|
|
|
lat.value = result.geocodes[0].location.lat
|
|
|
|
lat.value = result.geocodes[0].location.lat
|
|
|
|
formModel.otherAddressesInfo = `${lng.value},${lat.value}`
|
|
|
|
formModel.otherAddressesInfo = `${lng.value},${lat.value}`
|
|
|
|
console.log(lng.value, lat.value, 'lng.value')
|
|
|
|
|
|
|
|
// 设置地图中心点
|
|
|
|
// 设置地图中心点
|
|
|
|
map.value.setCenter([lng.value, lat.value]) // 将经度和纬度作为参数传入
|
|
|
|
map.value.setCenter([lng.value, lat.value]) // 将经度和纬度作为参数传入
|
|
|
|
if (type === 'match') {
|
|
|
|
if (type === 'match') {
|
|
|
@ -779,7 +777,6 @@ const getLocation = (type: string) => {
|
|
|
|
//标记中心点封装的方法
|
|
|
|
//标记中心点封装的方法
|
|
|
|
const getCenterMarker = (type: string, lng: number, lat: number) => {
|
|
|
|
const getCenterMarker = (type: string, lng: number, lat: number) => {
|
|
|
|
formModel.otherAddressesInfo = `${lng},${lat}`
|
|
|
|
formModel.otherAddressesInfo = `${lng},${lat}`
|
|
|
|
console.log(lng, lat, 'lng')
|
|
|
|
|
|
|
|
// 设置地图中心点
|
|
|
|
// 设置地图中心点
|
|
|
|
map.value.setCenter([lng, lat]) // 将经度和纬度作为参数传入
|
|
|
|
map.value.setCenter([lng, lat]) // 将经度和纬度作为参数传入
|
|
|
|
if (type === 'match' || type === 'select') {
|
|
|
|
if (type === 'match' || type === 'select') {
|
|
|
@ -822,7 +819,6 @@ const getCenterMarkerAddress = () => {
|
|
|
|
// 处理搜索结果
|
|
|
|
// 处理搜索结果
|
|
|
|
const pois = result.poiList.pois
|
|
|
|
const pois = result.poiList.pois
|
|
|
|
console.log(pois, 'pois')
|
|
|
|
console.log(pois, 'pois')
|
|
|
|
console.log(formModel.detailAddress, 'formModel.detailAddress匹配')
|
|
|
|
|
|
|
|
// 对获取到的兴趣点列表进行处理
|
|
|
|
// 对获取到的兴趣点列表进行处理
|
|
|
|
if (pois[0].name.includes('小区')) {
|
|
|
|
if (pois[0].name.includes('小区')) {
|
|
|
|
const result = pois[0].name.replace('小区', '')
|
|
|
|
const result = pois[0].name.replace('小区', '')
|
|
|
@ -999,11 +995,6 @@ const pagingQuery = (lng: number | undefined, lat: number | undefined) => {
|
|
|
|
const accordingStorenameMatch = (pois: any) => {
|
|
|
|
const accordingStorenameMatch = (pois: any) => {
|
|
|
|
isName.value = false
|
|
|
|
isName.value = false
|
|
|
|
getCenterMarker('match', pois[0].location.lng, pois[0].location.lat)
|
|
|
|
getCenterMarker('match', pois[0].location.lng, pois[0].location.lat)
|
|
|
|
console.log(
|
|
|
|
|
|
|
|
pois[0].location.lng,
|
|
|
|
|
|
|
|
pois[0].location.lat,
|
|
|
|
|
|
|
|
'pois[0].location.lng, pois[0].location.lat'
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//匹配时根据详细地址区获取中心点
|
|
|
|
//匹配时根据详细地址区获取中心点
|
|
|
|
const accordingAddressMatch = () => {
|
|
|
|
const accordingAddressMatch = () => {
|
|
|
@ -1016,7 +1007,9 @@ const idThen = (detailAddress: string) => {
|
|
|
|
listData.value = []
|
|
|
|
listData.value = []
|
|
|
|
lng.value = undefined
|
|
|
|
lng.value = undefined
|
|
|
|
lat.value = undefined
|
|
|
|
lat.value = undefined
|
|
|
|
|
|
|
|
// if (map.value && typeof map.value.clearMap === 'function') {
|
|
|
|
map.value.clearMap()
|
|
|
|
map.value.clearMap()
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// city.value = formModel.market?.slice(0, -1)
|
|
|
|
// city.value = formModel.market?.slice(0, -1)
|
|
|
|
//标记中心点
|
|
|
|
//标记中心点
|
|
|
@ -1111,39 +1104,45 @@ const idThen = (detailAddress: string) => {
|
|
|
|
//匹配
|
|
|
|
//匹配
|
|
|
|
const match = async (detailAddress: string) => {
|
|
|
|
const match = async (detailAddress: string) => {
|
|
|
|
// console.log(listData.length,'listData.length')
|
|
|
|
// console.log(listData.length,'listData.length')
|
|
|
|
console.log(title.value,'title.value')
|
|
|
|
console.log(title.value, 'title.value')
|
|
|
|
if (activeKey.value === '1') {
|
|
|
|
if (activeKey.value === '1') {
|
|
|
|
if(title.value==='新建预约'&&formModel.customStoreEntities.length!==0){
|
|
|
|
if (title.value === '新建预约' && formModel.customStoreEntities.length !== 0) {
|
|
|
|
matchregisterVisible.value=true
|
|
|
|
matchregisterVisible.value = true
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
const fields = ['address', 'detailAddress', 'radius'] // 指定要校验的字段名
|
|
|
|
const fields = ['address', 'detailAddress', 'radius'] // 指定要校验的字段名
|
|
|
|
formRef.value
|
|
|
|
formRef.value
|
|
|
|
?.validateFields(fields)
|
|
|
|
?.validateFields(fields)
|
|
|
|
.then(() => {
|
|
|
|
.then(() => {
|
|
|
|
idThen(detailAddress)
|
|
|
|
idThen(detailAddress)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
.catch(() => {
|
|
|
|
// 校验失败
|
|
|
|
// 校验失败
|
|
|
|
console.log('校验失败')
|
|
|
|
console.log('校验失败')
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if(title.value==='新建预约'&&formModel.customStoreEntities.length!==0){
|
|
|
|
if (title.value === '新建预约' && formModel.customStoreEntities.length !== 0) {
|
|
|
|
matchregisterVisible.value=true
|
|
|
|
matchregisterVisible.value = true
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
if (formModel.address && formModel.address.length === 0) {
|
|
|
|
if (formModel.address && formModel.address.length === 0) {
|
|
|
|
message.info('请输入您的地址信息')
|
|
|
|
return message.info('请输入您的地址信息')
|
|
|
|
} if (!formModel.detailAddress) {
|
|
|
|
}
|
|
|
|
message.info('请输入您的详细地址信息')
|
|
|
|
if (!formModel.detailAddress) {
|
|
|
|
} if(!formModel.radius){
|
|
|
|
return message.info('请输入您的详细地址信息')
|
|
|
|
message.info('请选择区域半径')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!formModel.radius) {
|
|
|
|
if(formModel.address && formModel.address.length>0&&formModel.detailAddress&&formModel.radius){
|
|
|
|
return message.info('请选择区域半径')
|
|
|
|
idThen(detailAddress)
|
|
|
|
}
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
|
|
|
formModel.address &&
|
|
|
|
|
|
|
|
formModel.address.length > 0 &&
|
|
|
|
|
|
|
|
formModel.detailAddress &&
|
|
|
|
|
|
|
|
formModel.radius
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
idThen(detailAddress)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//重置
|
|
|
|
//重置
|
|
|
|
const resetForm = () => {
|
|
|
|
const resetForm = () => {
|
|
|
@ -1282,26 +1281,26 @@ const handleOk = async () => {
|
|
|
|
await submitOperate()
|
|
|
|
await submitOperate()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//匹配信息确认弹窗确定点击事件
|
|
|
|
//匹配信息确认弹窗确定点击事件
|
|
|
|
const matchhandleOk = async () => {
|
|
|
|
const matchhandleOk = async (detailAddress: string) => {
|
|
|
|
matchregisterVisible.value=false
|
|
|
|
matchregisterVisible.value = false
|
|
|
|
listData.value.forEach((item:any)=>{
|
|
|
|
listData.value.forEach((item: any) => {
|
|
|
|
item.disabled=false
|
|
|
|
item.disabled = false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
if (infoWindows.value) {
|
|
|
|
if (infoWindows.value) {
|
|
|
|
infoWindows.value.close(); // 关闭气泡卡片
|
|
|
|
infoWindows.value.close() // 关闭气泡卡片
|
|
|
|
}
|
|
|
|
}
|
|
|
|
formModel.customStoreEntities=[]
|
|
|
|
formModel.customStoreEntities = []
|
|
|
|
// listData.value=[]
|
|
|
|
// listData.value=[]
|
|
|
|
const fields = ['address', 'detailAddress', 'radius'] // 指定要校验的字段名
|
|
|
|
const fields = ['address', 'detailAddress', 'radius'] // 指定要校验的字段名
|
|
|
|
formRef.value
|
|
|
|
formRef.value
|
|
|
|
?.validateFields(fields)
|
|
|
|
?.validateFields(fields)
|
|
|
|
.then(() => {
|
|
|
|
.then(() => {
|
|
|
|
idThen(detailAddress)
|
|
|
|
idThen(detailAddress)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
.catch(() => {
|
|
|
|
// 校验失败
|
|
|
|
// 校验失败
|
|
|
|
console.log('校验失败')
|
|
|
|
console.log('校验失败')
|
|
|
|
})
|
|
|
|
})
|
|
|
|
// await submitOperate()
|
|
|
|
// await submitOperate()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//暂存
|
|
|
|
//暂存
|
|
|
@ -1413,9 +1412,9 @@ const handleSubmit = () => {
|
|
|
|
|
|
|
|
|
|
|
|
//弹窗关闭方法
|
|
|
|
//弹窗关闭方法
|
|
|
|
const handleClose = () => {
|
|
|
|
const handleClose = () => {
|
|
|
|
activeKey.value = '1'
|
|
|
|
// activeKey.value = '1'
|
|
|
|
//去除禁用/只读
|
|
|
|
//去除禁用/只读
|
|
|
|
isAddressDisabled.value =
|
|
|
|
isAddressDisabled.value =
|
|
|
|
isAddressReadOnly.value =
|
|
|
|
isAddressReadOnly.value =
|
|
|
|
isDetailAddressDisabled.value =
|
|
|
|
isDetailAddressDisabled.value =
|
|
|
|
isDetailAddressReadOnly.value =
|
|
|
|
isDetailAddressReadOnly.value =
|
|
|
@ -1445,22 +1444,28 @@ interface openObj {
|
|
|
|
type?: string
|
|
|
|
type?: string
|
|
|
|
record?: GeopoliticalCustomersRecord
|
|
|
|
record?: GeopoliticalCustomersRecord
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const handleMapInit = () => {
|
|
|
|
const handleMapInit = async () => {
|
|
|
|
nextTick(() => {
|
|
|
|
await nextTick(async () => {
|
|
|
|
initMap()
|
|
|
|
await initMap()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
defineExpose({
|
|
|
|
defineExpose({
|
|
|
|
open(opendata: openObj) {
|
|
|
|
open(opendata: openObj) {
|
|
|
|
|
|
|
|
console.log(activeKey.value, 'activeKey.value')
|
|
|
|
isSubmit.value = false
|
|
|
|
isSubmit.value = false
|
|
|
|
openModal()
|
|
|
|
openModal()
|
|
|
|
resetFields.value()
|
|
|
|
console.log('formModel.customType resssssssss', formModel.customType)
|
|
|
|
if (userInfoCurrent.value === 'ROLE_REVIEWER') {
|
|
|
|
//不写resetFields.value()预约门店信息会反复追加进去,但是加了resetFields.value()会导致formModel.customType为0
|
|
|
|
formModel.customType = 1
|
|
|
|
// resetFields.value()
|
|
|
|
} else if (userInfoCurrent.value === 'ROLE_PRELIMINARY_EXAMINER') {
|
|
|
|
// formModel.customType = undefined
|
|
|
|
formModel.customType = 0
|
|
|
|
formModel.customStoreEntities = []
|
|
|
|
}
|
|
|
|
console.log('formModel.customType ddddddddddd', formModel.customType)
|
|
|
|
|
|
|
|
// if (userInfoCurrent.value === 'ROLE_REVIEWER') {
|
|
|
|
|
|
|
|
// formModel.customType = 1
|
|
|
|
|
|
|
|
// } else if (userInfoCurrent.value === 'ROLE_PRELIMINARY_EXAMINER') {
|
|
|
|
|
|
|
|
// formModel.customType = 0
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
const handleSuccess = (res: any) => {
|
|
|
|
const handleSuccess = (res: any) => {
|
|
|
|
const data = res.data || {}
|
|
|
|
const data = res.data || {}
|
|
|
@ -1494,6 +1499,7 @@ defineExpose({
|
|
|
|
formModel.distinguish = distinguish
|
|
|
|
formModel.distinguish = distinguish
|
|
|
|
formModel.detailAddress = detailAddress
|
|
|
|
formModel.detailAddress = detailAddress
|
|
|
|
formModel.customType = customType
|
|
|
|
formModel.customType = customType
|
|
|
|
|
|
|
|
console.log(formModel.customType, '111')
|
|
|
|
|
|
|
|
|
|
|
|
formModel.otherAddressesInfo = otherAddressesInfo
|
|
|
|
formModel.otherAddressesInfo = otherAddressesInfo
|
|
|
|
formModel.radius = radius
|
|
|
|
formModel.radius = radius
|
|
|
@ -1502,77 +1508,86 @@ defineExpose({
|
|
|
|
formModel.customStoreEntities.forEach((i: any) => {
|
|
|
|
formModel.customStoreEntities.forEach((i: any) => {
|
|
|
|
i.option = generateTimeSlots(i.tradeStartTime, i.tradeEndTime)
|
|
|
|
i.option = generateTimeSlots(i.tradeStartTime, i.tradeEndTime)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
const getActiveKey = () => {
|
|
|
|
|
|
|
|
if (formModel.customType === 0) {
|
|
|
|
|
|
|
|
activeKey.value = '1'
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
activeKey.value = '2'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
if (opendata.type === 'audit') {
|
|
|
|
if (opendata.type === 'audit') {
|
|
|
|
handleMapInit()
|
|
|
|
getActiveKey()
|
|
|
|
|
|
|
|
// handleMapInit()
|
|
|
|
title.value = '编辑'
|
|
|
|
title.value = '编辑'
|
|
|
|
// activeKey.value=formModel.customType
|
|
|
|
// activeKey.value=formModel.customType
|
|
|
|
if (formModel.address.length !== 0) {
|
|
|
|
if (formModel.address.length !== 0) {
|
|
|
|
isAddressDisabled.value = true
|
|
|
|
isAddressDisabled.value = true
|
|
|
|
// isRadiusReadOnly.value = true
|
|
|
|
// isRadiusReadOnly.value = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (formModel.radius) {
|
|
|
|
if (formModel.radius) {
|
|
|
|
isRadiusDisabled.value = true
|
|
|
|
isRadiusDisabled.value = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (formModel.detailAddress) {
|
|
|
|
if (formModel.detailAddress) {
|
|
|
|
isDetailAddressDisabled.value = true
|
|
|
|
isDetailAddressDisabled.value = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (formModel.address.length !== 0 && formModel.detailAddress && formModel.radius) {
|
|
|
|
if (formModel.address.length !== 0 && formModel.detailAddress && formModel.radius) {
|
|
|
|
match(formModel.detailAddress)
|
|
|
|
handleMapInit().then(() => {
|
|
|
|
|
|
|
|
match(formModel.detailAddress)
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} else if (opendata.type === 'edit') {
|
|
|
|
} else if (opendata.type === 'edit') {
|
|
|
|
handleMapInit()
|
|
|
|
getActiveKey()
|
|
|
|
title.value = '编辑预约'
|
|
|
|
title.value = '编辑预约'
|
|
|
|
// if(formModel.customType===0){
|
|
|
|
|
|
|
|
// activeKey.value='1'
|
|
|
|
|
|
|
|
// }else if(formModel.customType===1){
|
|
|
|
|
|
|
|
// activeKey.value='2'
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
if (formModel.address.length !== 0) {
|
|
|
|
if (formModel.address.length !== 0) {
|
|
|
|
isAddressDisabled.value = true
|
|
|
|
isAddressDisabled.value = true
|
|
|
|
// isRadiusDisabled.value = true
|
|
|
|
|
|
|
|
// isRadiusReadOnly.value = true
|
|
|
|
|
|
|
|
// match(formModel.detailAddress)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (formModel.radius) {
|
|
|
|
if (formModel.radius) {
|
|
|
|
isRadiusDisabled.value = true
|
|
|
|
isRadiusDisabled.value = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (formModel.detailAddress) {
|
|
|
|
if (formModel.detailAddress) {
|
|
|
|
isDetailAddressDisabled.value = true
|
|
|
|
isDetailAddressDisabled.value = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (formModel.address.length !== 0 && formModel.detailAddress && formModel.radius) {
|
|
|
|
if (formModel.address.length !== 0 && formModel.detailAddress && formModel.radius) {
|
|
|
|
match(formModel.detailAddress)
|
|
|
|
handleMapInit().then(() => {
|
|
|
|
|
|
|
|
match(formModel.detailAddress)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else if (opendata.type === 'view') {
|
|
|
|
|
|
|
|
if (formModel.customType === 0) {
|
|
|
|
|
|
|
|
activeKey.value = '1'
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
activeKey.value = '2'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (opendata.newFormAction === FormAction.CREATE) {
|
|
|
|
|
|
|
|
handleMapInit()
|
|
|
|
|
|
|
|
title.value = '新建预约'
|
|
|
|
|
|
|
|
formModel.customStoreEntities.length = 0
|
|
|
|
|
|
|
|
} else if (opendata.newFormAction === FormAction.UPDATE) {
|
|
|
|
|
|
|
|
doRequest(getDetail({ id: opendata.record?.customId }), {
|
|
|
|
|
|
|
|
onSuccess: handleSuccess
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if (opendata.type === 'view') {
|
|
|
|
|
|
|
|
title.value = '详情'
|
|
|
|
title.value = '详情'
|
|
|
|
|
|
|
|
console.log(formModel.customType, 'formModel.customTypeA')
|
|
|
|
|
|
|
|
|
|
|
|
isAddressReadOnly.value = true
|
|
|
|
isAddressReadOnly.value = true
|
|
|
|
isRadiusReadOnly.value = true
|
|
|
|
isRadiusReadOnly.value = true
|
|
|
|
isDetailAddressReadOnly.value = true
|
|
|
|
isDetailAddressReadOnly.value = true
|
|
|
|
isReservationTimeisReadOnly.value = true
|
|
|
|
isReservationTimeisReadOnly.value = true
|
|
|
|
|
|
|
|
|
|
|
|
} else if (opendata.type === 'distribute') {
|
|
|
|
} else if (opendata.type === 'distribute') {
|
|
|
|
|
|
|
|
getActiveKey()
|
|
|
|
title.value = '分发'
|
|
|
|
title.value = '分发'
|
|
|
|
isAddressReadOnly.value = true
|
|
|
|
isAddressReadOnly.value = true
|
|
|
|
isRadiusReadOnly.value = true
|
|
|
|
isRadiusReadOnly.value = true
|
|
|
|
isDetailAddressReadOnly.value = true
|
|
|
|
isDetailAddressReadOnly.value = true
|
|
|
|
isReservationTimeisReadOnly.value = true
|
|
|
|
isReservationTimeisReadOnly.value = true
|
|
|
|
// handleMapInit()
|
|
|
|
// handleMapInit()
|
|
|
|
|
|
|
|
|
|
|
|
formModel.description = 1
|
|
|
|
formModel.description = 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (opendata.newFormAction === FormAction.CREATE) {
|
|
|
|
|
|
|
|
activeKey.value = '1'
|
|
|
|
|
|
|
|
handleMapInit()
|
|
|
|
|
|
|
|
title.value = '新建预约'
|
|
|
|
|
|
|
|
formModel.customStoreEntities.length = 0
|
|
|
|
|
|
|
|
} else if (opendata.newFormAction === FormAction.UPDATE) {
|
|
|
|
|
|
|
|
doRequest(getDetail({ id: opendata.record?.customId }), {
|
|
|
|
|
|
|
|
onSuccess: handleSuccess
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
formAction.value = opendata.newFormAction
|
|
|
|
formAction.value = opendata.newFormAction
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -1775,7 +1790,7 @@ const initMap = async () => {
|
|
|
|
// center: [120.1551, 30.2741], // 地图中心点经纬度
|
|
|
|
// center: [120.1551, 30.2741], // 地图中心点经纬度
|
|
|
|
zoom: 18 // 缩放级别
|
|
|
|
zoom: 18 // 缩放级别
|
|
|
|
})
|
|
|
|
})
|
|
|
|
console.log(map.value, 'map.value')
|
|
|
|
console.log(map.value, 'initMap map.value')
|
|
|
|
// await auto('全国')
|
|
|
|
// await auto('全国')
|
|
|
|
if (
|
|
|
|
if (
|
|
|
|
(title.value === '编辑预约' && formModel.otherAddressesInfo) ||
|
|
|
|
(title.value === '编辑预约' && formModel.otherAddressesInfo) ||
|
|
|
|