diff --git a/src/views/geopoliticalCustomers/geopoliticalCustomersModal.vue b/src/views/geopoliticalCustomers/geopoliticalCustomersModal.vue
index 7ac1c95..2bd4474 100644
--- a/src/views/geopoliticalCustomers/geopoliticalCustomersModal.vue
+++ b/src/views/geopoliticalCustomers/geopoliticalCustomersModal.vue
@@ -11,10 +11,8 @@
:width="850"
@cancel="handleClose"
>
-
-
+
+
@@ -430,8 +422,12 @@
-
-
+
+
重新匹配将清空预约门店信息,是否重新匹配?
@@ -473,7 +469,13 @@ const userInfoCurrent = ref('')
// required: true,
// trigger: 'change'
// }
-
+// watch(
+// () => activeKey.value,
+// (newVal, oldVal) => {
+// console.log('newVal, oldVal', newVal, oldVal)
+// },
+// { immediate: true, deep: true }
+// )
onMounted(() => {
//省市区三级下拉框列表数据
provincesAndCitiesAndAutonomousOptions.value = window.globalProvincesAndCitiesAndAutonomousRegions
@@ -496,7 +498,7 @@ onMounted(() => {
})
//当前激活 tab 面板的 key
-const activeKey = ref('1')
+const activeKey = ref('')
//tabs change事件
const tabsChange = (val: string) => {
handleMapInit()
@@ -530,7 +532,6 @@ const reservationTimeClass = computed(() => ({
//小区动态生成只读/禁用样式
const isDetailAddressDisabled = ref(false)
const isDetailAddressReadOnly = ref(false)
-
const detailAddressReadOnlyDynamicClass = computed(() => ({
'custom-disabled-style': isDetailAddressDisabled.value,
'custom-readonly-style':
@@ -555,7 +556,6 @@ const addressChange = async (value: any) => {
formModel.economize = value[0]
formModel.market = value[1]
formModel.distinguish = value[2]
- // console.log(value.length, 'value.length')
// if (value.length === 2) {
// formModel.detailAddress = value[0] + value[1]
// } else if (value.length === 3) {
@@ -733,7 +733,6 @@ const accordingAddressGetCenter = () => {
//输入详细地址去获取经纬度从而标记中心点封装的方法
const getLocation = (type: string) => {
- // console.log(address, '标记中心点address')
const addressValue =
//标记中心点
formModel.address?.toString().split(',').join('') + formModel.detailAddress
@@ -744,7 +743,6 @@ const getLocation = (type: string) => {
lng.value = result.geocodes[0].location.lng
lat.value = result.geocodes[0].location.lat
formModel.otherAddressesInfo = `${lng.value},${lat.value}`
- console.log(lng.value, lat.value, 'lng.value')
// 设置地图中心点
map.value.setCenter([lng.value, lat.value]) // 将经度和纬度作为参数传入
if (type === 'match') {
@@ -779,7 +777,6 @@ const getLocation = (type: string) => {
//标记中心点封装的方法
const getCenterMarker = (type: string, lng: number, lat: number) => {
formModel.otherAddressesInfo = `${lng},${lat}`
- console.log(lng, lat, 'lng')
// 设置地图中心点
map.value.setCenter([lng, lat]) // 将经度和纬度作为参数传入
if (type === 'match' || type === 'select') {
@@ -822,7 +819,6 @@ const getCenterMarkerAddress = () => {
// 处理搜索结果
const pois = result.poiList.pois
console.log(pois, 'pois')
- console.log(formModel.detailAddress, 'formModel.detailAddress匹配')
// 对获取到的兴趣点列表进行处理
if (pois[0].name.includes('小区')) {
const result = pois[0].name.replace('小区', '')
@@ -999,11 +995,6 @@ const pagingQuery = (lng: number | undefined, lat: number | undefined) => {
const accordingStorenameMatch = (pois: any) => {
isName.value = false
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 = () => {
@@ -1016,7 +1007,9 @@ const idThen = (detailAddress: string) => {
listData.value = []
lng.value = undefined
lat.value = undefined
+ // if (map.value && typeof map.value.clearMap === 'function') {
map.value.clearMap()
+ // }
// city.value = formModel.market?.slice(0, -1)
//标记中心点
@@ -1111,39 +1104,45 @@ const idThen = (detailAddress: string) => {
//匹配
const match = async (detailAddress: string) => {
// console.log(listData.length,'listData.length')
- console.log(title.value,'title.value')
+ console.log(title.value, 'title.value')
if (activeKey.value === '1') {
- if(title.value==='新建预约'&&formModel.customStoreEntities.length!==0){
- matchregisterVisible.value=true
- }else{
+ if (title.value === '新建预约' && formModel.customStoreEntities.length !== 0) {
+ matchregisterVisible.value = true
+ } else {
const fields = ['address', 'detailAddress', 'radius'] // 指定要校验的字段名
- formRef.value
- ?.validateFields(fields)
- .then(() => {
- idThen(detailAddress)
- })
- .catch(() => {
- // 校验失败
- console.log('校验失败')
- })
+ formRef.value
+ ?.validateFields(fields)
+ .then(() => {
+ idThen(detailAddress)
+ })
+ .catch(() => {
+ // 校验失败
+ console.log('校验失败')
+ })
}
-
} else {
- if(title.value==='新建预约'&&formModel.customStoreEntities.length!==0){
- matchregisterVisible.value=true
- }else{
- if (formModel.address && formModel.address.length === 0) {
- message.info('请输入您的地址信息')
- } if (!formModel.detailAddress) {
- message.info('请输入您的详细地址信息')
- } if(!formModel.radius){
- message.info('请选择区域半径')
- }
- if(formModel.address && formModel.address.length>0&&formModel.detailAddress&&formModel.radius){
- idThen(detailAddress)
+ if (title.value === '新建预约' && formModel.customStoreEntities.length !== 0) {
+ matchregisterVisible.value = true
+ } else {
+ if (formModel.address && formModel.address.length === 0) {
+ return message.info('请输入您的地址信息')
+ }
+ if (!formModel.detailAddress) {
+ return message.info('请输入您的详细地址信息')
+ }
+ if (!formModel.radius) {
+ return message.info('请选择区域半径')
+ }
+ if (
+ formModel.address &&
+ formModel.address.length > 0 &&
+ formModel.detailAddress &&
+ formModel.radius
+ ) {
+ idThen(detailAddress)
+ }
}
}
- }
}
//重置
const resetForm = () => {
@@ -1282,26 +1281,26 @@ const handleOk = async () => {
await submitOperate()
}
//匹配信息确认弹窗确定点击事件
-const matchhandleOk = async () => {
- matchregisterVisible.value=false
- listData.value.forEach((item:any)=>{
- item.disabled=false
+const matchhandleOk = async (detailAddress: string) => {
+ matchregisterVisible.value = false
+ listData.value.forEach((item: any) => {
+ item.disabled = false
})
if (infoWindows.value) {
- infoWindows.value.close(); // 关闭气泡卡片
-}
- formModel.customStoreEntities=[]
+ infoWindows.value.close() // 关闭气泡卡片
+ }
+ formModel.customStoreEntities = []
// listData.value=[]
const fields = ['address', 'detailAddress', 'radius'] // 指定要校验的字段名
- formRef.value
- ?.validateFields(fields)
- .then(() => {
- idThen(detailAddress)
- })
- .catch(() => {
- // 校验失败
- console.log('校验失败')
- })
+ formRef.value
+ ?.validateFields(fields)
+ .then(() => {
+ idThen(detailAddress)
+ })
+ .catch(() => {
+ // 校验失败
+ console.log('校验失败')
+ })
// await submitOperate()
}
//暂存
@@ -1413,9 +1412,9 @@ const handleSubmit = () => {
//弹窗关闭方法
const handleClose = () => {
- activeKey.value = '1'
+ // activeKey.value = '1'
//去除禁用/只读
- isAddressDisabled.value =
+ isAddressDisabled.value =
isAddressReadOnly.value =
isDetailAddressDisabled.value =
isDetailAddressReadOnly.value =
@@ -1445,22 +1444,28 @@ interface openObj {
type?: string
record?: GeopoliticalCustomersRecord
}
-const handleMapInit = () => {
- nextTick(() => {
- initMap()
+const handleMapInit = async () => {
+ await nextTick(async () => {
+ await initMap()
})
}
defineExpose({
open(opendata: openObj) {
+ console.log(activeKey.value, 'activeKey.value')
isSubmit.value = false
openModal()
- resetFields.value()
- if (userInfoCurrent.value === 'ROLE_REVIEWER') {
- formModel.customType = 1
- } else if (userInfoCurrent.value === 'ROLE_PRELIMINARY_EXAMINER') {
- formModel.customType = 0
- }
+ console.log('formModel.customType resssssssss', formModel.customType)
+ //不写resetFields.value()预约门店信息会反复追加进去,但是加了resetFields.value()会导致formModel.customType为0
+ // resetFields.value()
+ // formModel.customType = undefined
+ 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 data = res.data || {}
@@ -1494,6 +1499,7 @@ defineExpose({
formModel.distinguish = distinguish
formModel.detailAddress = detailAddress
formModel.customType = customType
+ console.log(formModel.customType, '111')
formModel.otherAddressesInfo = otherAddressesInfo
formModel.radius = radius
@@ -1502,77 +1508,86 @@ defineExpose({
formModel.customStoreEntities.forEach((i: any) => {
i.option = generateTimeSlots(i.tradeStartTime, i.tradeEndTime)
})
+ const getActiveKey = () => {
+ if (formModel.customType === 0) {
+ activeKey.value = '1'
+ } else {
+ activeKey.value = '2'
+ }
+ }
if (opendata.type === 'audit') {
- handleMapInit()
+ getActiveKey()
+ // handleMapInit()
title.value = '编辑'
// activeKey.value=formModel.customType
if (formModel.address.length !== 0) {
isAddressDisabled.value = true
// isRadiusReadOnly.value = true
- }
+ }
if (formModel.radius) {
isRadiusDisabled.value = true
- }
+ }
if (formModel.detailAddress) {
isDetailAddressDisabled.value = true
}
if (formModel.address.length !== 0 && formModel.detailAddress && formModel.radius) {
- match(formModel.detailAddress)
+ handleMapInit().then(() => {
+ match(formModel.detailAddress)
+ })
}
-
} else if (opendata.type === 'edit') {
- handleMapInit()
+ getActiveKey()
title.value = '编辑预约'
- // if(formModel.customType===0){
- // activeKey.value='1'
- // }else if(formModel.customType===1){
- // activeKey.value='2'
- // }
if (formModel.address.length !== 0) {
isAddressDisabled.value = true
- // isRadiusDisabled.value = true
- // isRadiusReadOnly.value = true
- // match(formModel.detailAddress)
}
if (formModel.radius) {
isRadiusDisabled.value = true
- }
+ }
if (formModel.detailAddress) {
isDetailAddressDisabled.value = true
}
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 = '详情'
+ console.log(formModel.customType, 'formModel.customTypeA')
+
isAddressReadOnly.value = true
isRadiusReadOnly.value = true
isDetailAddressReadOnly.value = true
isReservationTimeisReadOnly.value = true
-
} else if (opendata.type === 'distribute') {
+ getActiveKey()
title.value = '分发'
isAddressReadOnly.value = true
isRadiusReadOnly.value = true
isDetailAddressReadOnly.value = true
isReservationTimeisReadOnly.value = true
// handleMapInit()
-
+
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
}
})
@@ -1775,7 +1790,7 @@ const initMap = async () => {
// center: [120.1551, 30.2741], // 地图中心点经纬度
zoom: 18 // 缩放级别
})
- console.log(map.value, 'map.value')
+ console.log(map.value, 'initMap map.value')
// await auto('全国')
if (
(title.value === '编辑预约' && formModel.otherAddressesInfo) ||
diff --git a/src/views/system/user/SysUserPage.vue b/src/views/system/user/SysUserPage.vue
index 34d8837..ac597c2 100644
--- a/src/views/system/user/SysUserPage.vue
+++ b/src/views/system/user/SysUserPage.vue
@@ -259,9 +259,7 @@ const uploadAvatarProcessor = (fileObj: FileObject, record: SysUserPageVO) => {
return res
})
}
-// const chargingStatus = ref()
const switchChange = (record: any) => {
- console.log(record, 'record')
if (record.chargingStatus === 1) {
record.chargingStatus = 0
} else {
@@ -277,12 +275,7 @@ const switchChange = (record: any) => {
})
),
{
- onSuccess: (res: any) => {
- if (res.code === 200) {
- // message.success('操作成功')
- // reloadTable()
- }
- }
+ onSuccess: (res: any) => {}
}
)
}
diff --git a/vite.config.ts b/vite.config.ts
index 3d382a1..17cb009 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -22,13 +22,13 @@ import { antdvStyleDeps } from './src/utils/resolvers'
//项目
// export const serverAddress = 'http://admin.ballcat.cn'
//xy
-export const serverAddress = 'http://172.18.0.225:8000'
+// export const serverAddress = 'http://172.18.0.225:8000'
//jt
// export const serverAddress = 'http://172.18.1.8:8000'
//ts
// export const serverAddress = 'http://172.18.0.228:8000'
//测试
-// export const serverAddress = 'http://39.100.77.21:8000'
+export const serverAddress = 'http://39.100.77.21:8000'
//线上ip
// export const serverAddress = 'http://175.27.212.74:80'