Commit d14c800e authored by youjie's avatar youjie

旅客

parent 27d283fa
......@@ -216,6 +216,7 @@ export default {
editPassenger: '修改旅客',
deleteSuccess: '删除成功',
idCard: '身份证号',
placeholderIdCard: '请输入身份证号',
},
// HTTP 错误状态码
httpError: {
......
......@@ -43,11 +43,6 @@ const router = createRouter({
meta: { title: "page.accountCenter" },
component: () => import ('../views/personalCenter/accountCenter.vue')
},
{
path: '/commonPassengerInfo',//常用旅客信息
meta: { title: "page.commonPassengerInfo" },
component: () => import ('../views/personalCenter/commonPassengerInfo.vue')
},
{
path: '/distributionCenter',//分销中心
meta: { title: "page.distributionCenter" },
......
<template>
<div class="w-[977px] h-full flex flex-col flex-shrink-0 overflow-hidden">
常用旅客信息
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { useUserStore } from '@/stores/user'
import { useSystemConfigStore } from '@/stores/index'
// 引入订单状态枚举
import OrderStatusEnum from '@/utils/orderStautsEnum'
const { t } = useI18n()
const userStore = useUserStore()
const systemConfigStore = useSystemConfigStore()
const orderList = ref<any>([])
const currentStatus = ref(0)
orderList.value.push({
value: 0,
lable: t('personal.orderStatus.ALL'),
})
orderList.value.push({
value: OrderStatusEnum.UN_PAY.value,
lable: OrderStatusEnum.UN_PAY.desc,
})
orderList.value.push({
value: OrderStatusEnum.PAYED.value,
lable: OrderStatusEnum.PAYED.desc,
})
orderList.value.push({
value: OrderStatusEnum.FINISH.value,
lable: OrderStatusEnum.FINISH.desc,
})
orderList.value.push({
value: OrderStatusEnum.CANCEL.value,
lable: OrderStatusEnum.CANCEL.desc,
})
const queryParams = ref<any>({
pageIndex: 1,
pageSize: 10,
orderStatus: currentStatus.value,
})
const dataList = ref<any>([])
const loding = ref(false)
const noMoreData = ref(false)
const scrollContainer = ref<any>(null)
const scrollThreshold = 0 // 阈值,距离底部多少距离时触发加载
const changeStatus = (key: number) => {
currentStatus.value = key
}
const loadData = async () => {
}
// 处理 div 滚动事件(核心修改)
const handleDivScroll = (e: any) => {
if (loding.value || noMoreData.value) return;
const container = e.target;
if (!container) return;
// 计算滚动位置(兼容不同浏览器)
const scrollTop = container.scrollTop;
const clientHeight = container.clientHeight;
const scrollHeight = container.scrollHeight;
// 触底条件:滚动距离 + 可见高度 ≥ 总高度 - 阈值
if (scrollTop + clientHeight >= scrollHeight - scrollThreshold) {
noMoreData.value = false
queryParams.value.pageIndex ++
loadData(); // 加载下一页
}
}
</script>
<style scoped lang="scss">
.myOrderData{
background: #FBFBFA;
}
.myOrder-text-l{
color: rgb(var(--gray-7));
}
:deep(.arco-scrollbar-track-direction-vertical){
display: none;
}
.myOrder-time{
color: rgb(var(--gray-6));
}
</style>
\ No newline at end of file
......@@ -36,7 +36,8 @@
<a-form-item :label="t('personal.firstName')" field="name" required>
<a-input class="formData-input !w-[289px] mr-[30px]"
v-model="formData.name"
size="large">
size="large"
:placeholder="t('personal.placeholderFirstName')">
</a-input>
</a-form-item>
</a-col>
......@@ -44,7 +45,8 @@
<a-form-item :label="t('personal.lastName')" field="surName" required>
<a-input class="formData-input !w-[289px] mr-[30px]"
v-model="formData.surName"
size="large">
size="large"
:placeholder="t('personal.placeholderLastName')">
<template #suffix>
</template>
......@@ -56,7 +58,7 @@
<a-select class="formData-input !w-[289px] mr-[30px]"
v-model="formData.sex"
size="large"
:placeholder="t('personal.gender')">
:placeholder="t('personal.placeholder')">
<a-option v-for="item of genderOptions" :value="item.value" :label="item.label" />
</a-select>
</a-form-item>
......@@ -91,6 +93,7 @@
<a-select class="formData-input !w-[289px] mr-[30px]"
v-model="formData.phoneCode"
size="large"
:placeholder="t('personal.placeholder')"
allow-search>
<a-option v-for="item of AreaCodeList" :value="item.phoneCode" :label="item.phoneCode" >
<span>{{ item.name }}</span>
......
......@@ -3,30 +3,30 @@
<div v-if="!showType">
<div>
<div class="accountCenter rounded-[14px]
border-[1px] mb-[28px] flex items-center
justify-between py-[30px] pl-[43px] pr-[35px]"
v-for="(item,index) in dataList">
<div class="w-[100px]">
{{ item.name }}
</div>
<div class="w-[100px]">
{{ item.surName }}
</div>
<div class="w-[50px]">
{{ item.sex === 1 ? t('ORDER.GENDER_MALE') : t('ORDER.GENDER_FEMALE') }}
</div>
<div class="w-[200px]">
{{ item.email }}
</div>
<div class="w-[150px]">
{{item.phoneCode}}{{ item.phone }}
</div>
<div class="flex items-center justify-between">
<div class="w-[16px] h-[16px] editIcon" @click="clickItem(item,2)">&nbsp;</div>
<div class="w-[14px] h-[16px] deleteIcon ml-[17px]" @click="clickItem(item)">&nbsp;</div>
</div>
<div class="accountCenter rounded-[14px]
border-[1px] mb-[28px] flex items-center
justify-between py-[30px] pl-[43px] pr-[35px]"
v-for="(item,index) in dataList">
<div class="w-[100px]">
{{ item.name }}
</div>
<div class="w-[100px]">
{{ item.surName }}
</div>
<div class="w-[50px]">
{{ item.sex === 1 ? t('ORDER.GENDER_MALE') : t('ORDER.GENDER_FEMALE') }}
</div>
<div class="w-[200px]">
{{ item.email }}
</div>
<div class="w-[150px]">
{{item.phoneCode}}{{ item.phone }}
</div>
<div class="flex items-center justify-between">
<div class="w-[16px] h-[16px] editIcon" @click="clickItem(item,2)">&nbsp;</div>
<div class="w-[14px] h-[16px] deleteIcon ml-[17px]" @click="clickItem(item)">&nbsp;</div>
</div>
</div>
</div>
<div class="rounded-[8px] addGuestButton py-[10px] text-center text-base cursor-pointer" @click="showType = 1">{{ t('personal.addPassenger') }}</div>
</div>
......@@ -40,7 +40,8 @@
<a-form-item :label="t('personal.firstName')" field="name" required>
<a-input class="formData-input !w-[289px] mr-[30px]"
v-model="formData.name"
size="large">
size="large"
:placeholder="t('personal.placeholderFirstName')">
</a-input>
</a-form-item>
</a-col>
......@@ -48,7 +49,8 @@
<a-form-item :label="t('personal.lastName')" field="surName" required>
<a-input class="formData-input !w-[289px] mr-[30px]"
v-model="formData.surName"
size="large">
size="large"
:placeholder="t('personal.placeholderLastName')">
<template #suffix>
</template>
......@@ -60,7 +62,7 @@
<a-select class="formData-input !w-[289px] mr-[30px]"
v-model="formData.sex"
size="large"
:placeholder="t('personal.gender')">
:placeholder="t('personal.placeholder')">
<a-option v-for="item of genderOptions" :value="item.value" :label="item.label" />
</a-select>
</a-form-item>
......@@ -93,7 +95,8 @@
<a-form-item :label="t('personal.idCard')" field="surName" required>
<a-input class="formData-input !w-[289px] mr-[30px]"
v-model="formData.idCard"
size="large">
size="large"
:placeholder="t('personal.placeholderIdCard')">
<template #suffix>
</template>
......@@ -105,7 +108,8 @@
<a-select class="formData-input !w-[289px] mr-[30px]"
v-model="formData.phoneCode"
size="large"
allow-search>
allow-search
:placeholder="t('personal.placeholder')">
<a-option v-for="item of AreaCodeList" :value="item.phoneCode" :label="item.phoneCode" >
<span>{{ item.name }}</span>
<span>{{ item.phoneCode }}</span>
......@@ -125,7 +129,8 @@
<a-form-item :label="t('login.emailLogin')" field="">
<a-input class="formData-input !w-[289px] mr-[30px]"
v-model="formData.email"
size="large">
size="large"
:placeholder="t('login.emailRequiredReset')">
<template #suffix>
</template>
......
......@@ -58,11 +58,6 @@ const menuList = ref([
path: '/accountCenter',
key: 'accountCenter',
},
{
name: t('personal.menu.commonPassengerInfo'),
path: '/commonPassengerInfo',
key: 'commonPassengerInfo',
},
{
name: t('personal.menu.distributionCenter'),
path: '/distributionCenter',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment