Commit ab7e061d by pangchong

feat: 全局组件优化

parent 2b2cf7f6
<template>
<!-- 全局自定义navbar -->
<view class="mocp-navbar">
<up-navbar :title="title" :fixed="false" :bgColor="bgColor" :safeAreaInsetTop="false"
:titleStyle="getTitleStyle" :leftIconSize="0">
<up-navbar :title="title" :fixed="false" :bgColor="bgColor" :safeAreaInsetTop="false" :titleStyle="getTitleStyle" :leftIconSize="0">
<template #left>
<slot name="left"></slot>
</template>
......@@ -16,6 +15,7 @@
<script setup>
import { computed } from 'vue'
const es = defineEmits(['handleLeftClick', 'handleRightClick', 'handleFooterClick'])
const ps = defineProps({
title: {
type: String,
......@@ -25,6 +25,14 @@ const ps = defineProps({
type: String,
default: '#f7f8fa'
},
size: {
type: [String, Number],
default: 34
},
color: {
type: String,
default: '#4e5969'
},
titleStyle: {
type: Object,
default: () => {
......@@ -38,8 +46,8 @@ const ps = defineProps({
})
const getTitleStyle = computed(() => {
return {
color: '#4e5969',
fontSize: '34rpx',
color: ps.color,
fontSize: ps.size + 'rpx',
...ps.titleStyle
}
})
......
......@@ -11,23 +11,21 @@
show-refresher-update-time
v-if="firstLoaded || isCurrentPage"
ref="paging"
v-model="dataList"
v-model="getDataList"
@query="queryList"
:fixed="false"
>
<template #empty v-if="!dataList.length && refresherEnabled">
<template #empty v-if="!getDataList.length">
<global-empty></global-empty>
</template>
<slot :dataList="dataList">
<up-skeleton v-if="showSkeleton" rows="100" :loading="true" :animate="true"
:title="false"></up-skeleton>
</slot>
<slot :dataList="getDataList"></slot>
</z-paging>
</view>
</template>
<script setup>
import { ref, watch } from 'vue'
import { filterEmptyValues } from 'mocp/utils/tool'
import { computed, ref, watch } from 'vue'
const paging = ref()
const dataList = ref([])
......@@ -35,7 +33,6 @@ const dataList = ref([])
const firstLoaded = ref(false)
// 是否滚动到当前页
const isCurrentPage = ref(false)
const ps = defineProps({
//是否自动加载
auto: {
......@@ -59,6 +56,13 @@ const ps = defineProps({
type: String,
default: 'status'
},
//查询参数
params: {
type: Object,
default: () => {
return {}
}
},
//查询接口
api: {
type: Function,
......@@ -86,21 +90,22 @@ const ps = defineProps({
type: [Number, String],
default: '160rpx'
},
//是否本地分页
localPaging: {
type: Boolean,
default: false
},
localPagingCB: {
//数据转换
transformData: {
type: Function,
default: () => {
}
default: null
},
//分页页码
pageSize: {
type: Number,
default: 10
}
})
watch(
() => ps.currentIndex,
(newVal) => {
......@@ -118,42 +123,52 @@ watch(
immediate: true
}
)
//是否显示骨架屏
const showSkeleton = ref(true)
const queryList = (pageIndex, pageSize) => {
if (!dataList.value.length) {
paging.value?.complete(dataList.value)
}
const params = {
pageIndex,
pageSize
...filterEmptyValues(ps.params)
}
//是否开启本地分页
if (!ps.localPaging) {
params['pageIndex'] = pageIndex
params['pageSize'] = pageSize
}
if (ps.tabValue != null) {
params[ps.tabValueField] = ps.tabValue
}
if (Object.prototype.toString.call(ps.api) == '[object Function]') {
ps.api(params, {loading: true}).then((res) => {
ps.api(params, { loading: true })
.then((res) => {
if (res.code == 200 || res.list?.length) {
if (!ps.localPaging) {
paging.value?.complete(res.list || res.data?.list || res?.data || [])
const data = res.list || res.data?.list || res?.data || []
if (ps.localPaging) {
paging.value?.setLocalPaging(data)
} else {
const data = res.data || []
paging.value?.setLocalPaging(ps.localPagingCB(data))
paging.value?.complete(data)
}
firstLoaded.value = true
} else {
uni.$mocpMessage.error(res.message)
}
}).catch(() => {
showSkeleton.value = false
})
.catch(() => {
paging.value?.complete(false)
})
} else {
showSkeleton.value = false
paging.value?.complete(false)
}
}
//获取数据
const getDataList = computed({
get: () => {
if (ps.transformData) {
return ps.transformData(dataList.value)
} else {
return dataList.value
}
},
set: (value) => {
dataList.value = value
}
})
defineExpose({
reload: () => {
paging.value?.reload()
......
......@@ -3,11 +3,25 @@
<z-paging-swiper :swiper-style="getSwiperStyle">
<!-- 头部 -->
<template #top>
<view :style="{ height: safeAreaInsets?.top + 'px' }" v-if="custom"></view>
<view
style="position: relative; z-index: -2"
:style="{ height: safeAreaInsets?.top + 'px', background: navbgColor }"
v-if="custom"
></view>
<!-- 自定义导航栏 -->
<global-navbar :title="title" v-if="showNavbar">
<template #left>
<up-icon name="arrow-left" size="16" @tap="goBack"></up-icon>
<global-navbar :title="title" v-if="showNavbar" :bgColor="navbgColor" :color="navColor">
<template #left v-if="pages.length > 1 && showNavLeft">
<up-icon v-if="navLeftType == 'icon'" :name="navLeftIcon" size="16" @tap="handleLeftClick" :color="navColor"></up-icon>
<view v-if="navLeftType == 'text'" class="cancel" @tap="handleLeftClick">{{ navLeftText }}</view>
</template>
<template #right v-if="showNavRight">
<global-button type="text" size="small" v-if="navRightType == 'text'" @tap="handleRightClick">
{{ navRightText }}
</global-button>
<global-button type="primary" size="small" v-if="navRightType == 'button'" style="padding: 0 32rpx" @tap="handleRightClick">
{{ navRightText }}
</global-button>
<global-icon v-if="navRightType == 'icon'" :icon="navRightIcon" @tap="handleRightClick"></global-icon>
</template>
</global-navbar>
<!-- tab切换 -->
......@@ -40,14 +54,15 @@
:tabIndex="index"
:tabValueField="tabValueField"
:currentIndex="current"
:params="params"
:api="api"
:refresher-enabled="refresherEnabled"
:refresher-threshold="refresherThreshold"
:auto-show-back-to-top="autoShowBackToTop"
:loading-more-enabled="loadingMoreEnabled"
:back-to-top-bottom="backToTopBottom"
:localPaging="$attrs.localPaging"
:localPagingCB="$attrs.localPagingCB"
:localPaging="localPaging"
:transformData="transformData"
>
<template #="{ dataList }">
<slot :dataList="dataList"></slot>
......@@ -55,6 +70,13 @@
</global-page-swiper-item>
</swiper-item>
</swiper>
<!-- 底部 -->
<template #bottom>
<view class="footer-btn" v-if="showFooterBtn">
<global-button type="primary" size="large" @tap="handleFooterClick">{{ footerBtnText }}</global-button>
</view>
<slot name="bottom"></slot>
</template>
<!-- 消息提醒 -->
<up-toast ref="uToastRef"></up-toast>
</z-paging-swiper>
......@@ -64,7 +86,8 @@
import { computed, nextTick, onUnmounted, ref } from 'vue'
// 获取屏幕边界到安全区域距离
const {safeAreaInsets} = uni.getSystemInfoSync()
const { safeAreaInsets } = uni.getSystemInfoSync()
const es = defineEmits(['handleLeftClick', 'handleRightClick', 'handleFooterClick'])
const ps = defineProps({
background: {
type: String,
......@@ -113,6 +136,71 @@ const ps = defineProps({
type: Boolean,
default: true
},
//导航栏背景色
navbgColor: {
type: String,
default: '#f7f8fa'
},
//导航栏字体颜色
navColor: {
type: String,
default: '#4e5969'
},
//是否显示nav左边插槽
showNavLeft: {
type: Boolean,
default: true
},
//nav左边插槽类型:icon,text
navLeftType: {
type: String,
default: 'icon'
},
//nav左边插槽图标
navLeftIcon: {
type: String,
default: 'arrow-left'
},
//nav左边插槽文字
navLeftText: {
type: String,
default: '取消'
},
//点击nav左边插槽default,emit
navLeftClick: {
type: String,
default: 'default'
},
//是否显示nav右边插槽
showNavRight: {
type: Boolean,
default: false
},
//nav右边插槽类型:icon,text,button
navRightType: {
type: String,
default: 'text'
},
//nav右边插槽图标
navRightIcon: {
type: String,
default: 'navbarright'
},
//nav右边插槽文字
navRightText: {
type: String,
default: '编辑'
},
//是否显示底部按钮
showFooterBtn: {
type: Boolean,
default: false
},
//底部按钮文字内容
footerBtnText: {
type: String,
default: '保存'
},
//页面标题
title: {
type: String,
......@@ -123,6 +211,13 @@ const ps = defineProps({
type: Boolean,
default: true
},
//查询参数
params: {
type: Object,
default: () => {
return {}
}
},
//查询接口
api: {
type: Function,
......@@ -153,6 +248,21 @@ const ps = defineProps({
tabsWidth: {
type: [Number, String],
default: '250'
},
//是否本地分页
localPaging: {
type: Boolean,
default: false
},
//数据转换
transformData: {
type: Function,
default: null
},
//分页页码
pageSize: {
type: Number,
default: 10
}
})
// z-swiper样式
......@@ -173,10 +283,6 @@ const getStyle = computed(() => {
return style
})
const current = ref(ps.current)
//返回
const goBack = () => {
uni.$mocpJump.navigateBack()
}
// tabs通知swiper切换
const tabsChange = (item) => {
current.value = item.index
......@@ -198,6 +304,25 @@ uni.$on('useMessage', (params) => openToast(params))
onUnmounted(() => {
uni.$off('useMessage', openToast)
})
//点击左边插槽
const handleLeftClick = () => {
if (ps.navLeftClick == 'default') {
uni.$mocpJump.navigateBack()
es('handleLeftClick')
} else {
es('handleLeftClick')
}
}
//点击右边插槽
const handleRightClick = () => {
es('handleRightClick')
}
//点击底部按钮
const handleFooterClick = () => {
es('handleFooterClick')
}
// 获取页面栈
const pages = getCurrentPages()
//获取列表刷新对象
const pagingArr = ref([])
defineExpose({
......
......@@ -2,7 +2,7 @@
<!-- 全局page 不带tab切换-->
<z-paging
ref="paging"
v-model="dataList"
v-model="getDataList"
:auto="auto"
:fixed="fixed"
:height="height"
......@@ -18,37 +18,37 @@
:paging-style="getPagingStyle"
:default-page-size="pageSize"
>
<template #empty v-if="refresherEnabled || loadingMoreEnabled">
<template #empty v-if="auto && !getDataList.length">
<global-empty></global-empty>
</template>
<!-- 头部 -->
<template #top>
<view :style="{ height: safeAreaInsets?.top + 'px' }" v-if="custom"></view>
<view
style="position: relative; z-index: -2"
:style="{ height: safeAreaInsets?.top + 'px', background: navbgColor }"
v-if="custom"
></view>
<!-- 自定义导航栏 -->
<global-navbar :title="title" v-if="showNavbar" :bgColor="$attrs.navBarBackground"
:titleStyle="$attrs.titleStyle">
<global-navbar :title="title" v-if="showNavbar" :bgColor="navbgColor" :color="navColor">
<template #left v-if="pages.length > 1 && showNavLeft">
<up-icon v-if="navLeftType == 'icon'" :name="navLeftIcon" size="16"
@tap="handleLeftClick"></up-icon>
<up-icon v-if="navLeftType == 'icon'" :name="navLeftIcon" size="16" @tap="handleLeftClick" :color="navColor"></up-icon>
<view v-if="navLeftType == 'text'" class="cancel" @tap="handleLeftClick">{{ navLeftText }}</view>
</template>
<template #right v-if="showNavRight">
<global-button type="text" size="small" v-if="navRightType == 'text'" @tap="handleRightClick">
{{ navRightText }}
</global-button>
<global-button type="primary" size="small" v-if="navRightType == 'button'" style="padding: 0 32rpx"
@tap="handleRightClick">
<global-button type="primary" size="small" v-if="navRightType == 'button'" style="padding: 0 32rpx" @tap="handleRightClick">
{{ navRightText }}
</global-button>
<global-icon v-if="navRightType == 'icon'" :icon="navRightIcon"
@tap="handleRightClick"></global-icon>
<global-icon v-if="navRightType == 'icon'" :icon="navRightIcon" @tap="handleRightClick"></global-icon>
</template>
</global-navbar>
<slot name="top"></slot>
</template>
<!-- 滚动内容 -->
<view class="mocp-content" :style="getStyle">
<slot :dataList="dataList" v-if="isDataList"></slot>
<slot :dataList="getDataList" v-if="isDataList"></slot>
<slot></slot>
</view>
<!-- 底部 -->
......@@ -102,6 +102,16 @@ const ps = defineProps({
type: Boolean,
default: true
},
//导航栏背景色
navbgColor: {
type: String,
default: '#f7f8fa'
},
//导航栏字体颜色
navColor: {
type: String,
default: '#4e5969'
},
//是否显示nav左边插槽
showNavLeft: {
type: Boolean,
......@@ -206,15 +216,22 @@ const ps = defineProps({
type: [Number, String],
default: '160rpx'
},
//静态数据
localData: {
type: [Object, Array],
default: null
},
//是否本地分页
localPaging: {
type: Boolean,
default: false
},
localPagingCB: {
//数据转换
transformData: {
type: Function,
default: () => {
}
default: null
},
//分页页码
pageSize: {
type: Number,
default: 10
......@@ -250,24 +267,27 @@ const scroll = () => {
// #endif
}
// 获取屏幕边界到安全区域距离
const {safeAreaInsets} = uni.getSystemInfoSync()
const { safeAreaInsets } = uni.getSystemInfoSync()
//列表加载
const queryList = (pageIndex, pageSize) => {
if (ps.isDataList) {
const params = {
pageIndex,
pageSize,
...filterEmptyValues(ps.params)
}
//是否开启本地分页
if (!ps.localPaging) {
params['pageIndex'] = pageIndex
params['pageSize'] = pageSize
}
if (Object.prototype.toString.call(ps.api) == '[object Function]') {
ps.api(params, {loading: true})
ps.api(params, { loading: true })
.then((res) => {
if (res.code == 200 || res.list?.length) {
if (!ps.localPaging) {
paging.value?.complete(res.list || res.data?.list || res?.data || [])
const data = res.list || res.data?.list || res?.data || []
if (ps.localPaging) {
paging.value?.setLocalPaging(data)
} else {
const data = res.data || []
paging.value?.setLocalPaging(ps.localPagingCB(data))
paging.value?.complete(data)
}
} else {
uni.$mocpMessage.error(res.message)
......@@ -280,9 +300,29 @@ const queryList = (pageIndex, pageSize) => {
paging.value?.complete(false)
}
} else {
es('query', {pageIndex, pageSize})
if (ps.localData) {
if (Array.isArray(ps.localData)) {
paging.value?.complete(ps.localData)
} else {
paging.value?.complete([])
}
}
}
es('query', { pageIndex, pageSize })
}
//获取数据
const getDataList = computed({
get: () => {
if (ps.transformData) {
return ps.transformData(dataList.value)
} else {
return dataList.value
}
},
set: (value) => {
dataList.value = value
}
})
//点击左边插槽
const handleLeftClick = () => {
if (ps.navLeftClick == 'default') {
......
......@@ -26,6 +26,7 @@ const useAogStore = defineStore('aog', {
happenAddr: '',
faultDesc: ''
},
workbenchId: '',
details: undefined,
workBench: undefined, //工作台详情
disposalPlan: [], //处置方案
......@@ -41,7 +42,7 @@ const useAogStore = defineStore('aog', {
bbData: [], //施工情况
bbIndex: -1, //施工情况详情的下标
oData: undefined, //其他特殊保障
oData: [], //其他特殊保障
oIndex: -1 //其他特殊保障的下标
}
},
......@@ -164,22 +165,22 @@ const useAogStore = defineStore('aog', {
}
},
actions: {
async getWorkBenchList() {
const res = await getWorkBenchListApi({ workbenchId: this.details?.workbenchId })
async getWorkBenchList(workbenchId) {
const res = await getWorkBenchListApi({ workbenchId })
if (res.code == 200) {
this.workBench = res.data?.list[0]
}
},
async getAogDisposalPlan() {
const res = await getAogDisposalPlanApi({ workbenchId: this.details?.workbenchId })
async getAogDisposalPlan(workbenchId) {
const res = await getAogDisposalPlanApi({ workbenchId })
if (res.code == 200) {
this.disposalPlan = res.data
} else {
this.disposalPlan = []
}
},
async getAogMaterialList(materialType) {
const res = await getAogMaterialListApi({ workbenchId: this.details?.workbenchId, materialType })
async getAogMaterialList(workbenchId, materialType) {
const res = await getAogMaterialListApi({ workbenchId, materialType })
if (res.code == 200 && res.data.materialMap) {
if (materialType == 1) {
this.avData = Object.values(res.data.materialMap).flat()
......@@ -191,22 +192,22 @@ const useAogStore = defineStore('aog', {
this.toolData = []
}
},
async getAogSupBase() {
const res = await getAogSupBaseApi({ workbenchId: this.details?.workbenchId })
async getAogSupBase(workbenchId) {
const res = await getAogSupBaseApi({ workbenchId })
if (res.code == 200 && res.data.mapList) {
this.pData = Object.values(res.data.mapList).flat()
} else {
this.pData = []
}
},
async getAogConstruction() {
const res = await getAogConstructionApi({ workbenchId: this.details?.workbenchId })
async getAogConstruction(workbenchId) {
const res = await getAogConstructionApi({ workbenchId })
if (res.code == 200) {
this.bbData = res.data.constructionList || []
}
},
async getAogOtherSup() {
const res = await getAogOtherSupApi({ workbenchId: this.details?.workbenchId })
async getAogOtherSup(workbenchId) {
const res = await getAogOtherSupApi({ workbenchId })
if (res.code == 200 && res.data) {
this.oData = Object.entries(res.data).reduce((q, w) => {
if (w[0] !== 'otherData') {
......
import useUserStore from 'mocp/store/user'
const baseURL = 'https://hna-platform.anyremote.cn'
// const baseURL = 'https://moc.hnatechnic.com/api'
// const baseURL = 'https://hna-platform.anyremote.cn'
const baseURL = 'https://moc.hnatechnic.com/api'
class ServiceLoading {
open(loading) {
......
......@@ -81,6 +81,8 @@ const baseStore = useBaseStore()
const aogStore = useAogStore()
const { getWorkBenchList, getAogDisposalPlan, getAogMaterialList, getAogSupBase, getAogConstruction, getAogOtherSup } = aogStore
const { details, disposalPlan, workBench, materialType } = storeToRefs(aogStore)
const query = defineProps(['workbenchId'])
const workbenchId = query.workbenchId
onLoad(() => {
nextTick(async () => {
uni.showLoading({
......@@ -88,13 +90,13 @@ onLoad(() => {
mask: true
})
await Promise.all([
getWorkBenchList(),
getAogDisposalPlan(),
getAogMaterialList(1),
getAogMaterialList(2),
getAogSupBase(),
getAogConstruction(),
getAogOtherSup()
getWorkBenchList(workbenchId),
getAogDisposalPlan(workbenchId),
getAogMaterialList(workbenchId, 1),
getAogMaterialList(workbenchId, 2),
getAogSupBase(workbenchId),
getAogConstruction(workbenchId),
getAogOtherSup(workbenchId)
])
uni.hideLoading()
})
......@@ -109,10 +111,10 @@ const goTo = (url, params) => {
}
}
uni.$on('updateMaterialData', () => {
getAogMaterialList(materialType.value)
getAogMaterialList(workbenchId, materialType.value)
})
uni.$on('updateBbData', () => {
getAogConstruction()
getAogConstruction(workbenchId)
})
</script>
<style lang="scss" scoped>
......
......@@ -56,7 +56,7 @@ const baseStore = useBaseStore()
const aogStore = useAogStore()
const { searchData } = storeToRefs(aogStore)
const goDetails = (data) => {
uni.$mocpJump.navigateTo('/panel/aog/details', { id: data.id }).then(() => {
uni.$mocpJump.navigateTo('/panel/aog/details', { workbenchId: data.workbenchId }).then(() => {
aogStore.setState('details', data)
})
}
......
<template>
<global-page :padding="24" :title="getTitle">
<global-page :padding="24" :title="getTitle" auto :localData="getMaterialData">
<template v-for="(item, index) in getMaterialData" :key="item.id">
<global-card :title="item.pn" titleSuffix="查看详情" @handleTitleClick="goTo(index)">
<global-text-status :value="item.actualArrivalTime ? '1' : '0'" dictkey="aogDetails_status"></global-text-status>
</global-card>
</template>
<!-- <template #="{ dataList }">
<template v-for="(item, index) in dataList" :key="item.id">
<global-card :title="item.pn" titleSuffix="查看详情" @handleTitleClick="goTo(index)">
<global-text-status :value="item.actualArrivalTime ? '1' : '0'" dictkey="aogDetails_status"></global-text-status>
</global-card>
</template>
</template> -->
</global-page>
</template>
......
<template>
<global-page title="航班详情" navBarBackground="#0e42d2" :titleStyle="{color: '#fff'}">
<global-page title="航班详情" navbgColor="#0e42d2" navColor="#fff">
<view class="flightSupportDetails">
<view class="details_header">
<view class="header_no flex">
<image
class="flight-no-image"
:src="HnaPic"
mode="widthFix" />
<image class="flight-no-image" :src="HnaPic" mode="widthFix" />
<text>B9999</text>
</view>
......@@ -26,7 +23,8 @@
v-for="(item, index) of tabList"
:key="item"
@click="tabCurrent = index"
class="f-flex-1 tabItem" :class="index == tabCurrent ? 'active' : ''"
class="f-flex-1 tabItem"
:class="index == tabCurrent ? 'active' : ''"
>
{{ item }}--{{ tabCurrent }}
</view>
......@@ -34,11 +32,8 @@
<detailsFlightInfo v-if="tabCurrent === 0" />
<detailsOtherInfo v-else />
</view>
</view>
</global-page>
</template>
......@@ -54,7 +49,6 @@ import detailsSwiper from '../components/DetailsSwiper.vue'
import detailsFlightInfo from '../components/DetailsFlightInfo.vue'
import detailsOtherInfo from '../components/DetailsOtherInfo.vue'
const currentAllRelatedFlights = reactive([
{
flightNo: 'B7777',
......@@ -80,9 +74,7 @@ const currentAllRelatedFlights = reactive([
])
const tabList = ['航班信息', '其他信息']
const tabCurrent = ref(0)
</script>
<style lang="scss" scoped>
@import "../constants/details";
@import '../constants/details';
</style>
......@@ -14,24 +14,17 @@
:api="getFlyToAppletsApi"
localPaging
:pageSize="20"
:localPagingCB="localPagingCB"
:transformData="transformData"
>
<template #="{ dataList }">
<view
v-for="item in dataList"
:key="item.keyValue"
class="inforDisclosureItem flex">
<view v-for="item in dataList" :key="item.keyValue" class="inforDisclosureItem flex">
<TableTow :itemMsg="item" />
</view>
</template>
<template v-slot:top>
<view class="flex listTopTab text-center">
<view
v-for="item of getSelectedList"
:key="item.id"
class="topTabItem"
:style="{flex: item.flex}">
<view v-for="item of getSelectedList" :key="item.id" class="topTabItem" :style="{ flex: item.flex }">
{{ item.label }}
</view>
</view>
......@@ -52,7 +45,6 @@
</view>
</template>
</global-page>
</template>
<script setup>
......@@ -67,15 +59,17 @@ import { currentInBoundModeForFlightTablePage, allInBoundMode } from './utils/cu
const paging = ref(null)
const flightSupportStore = useFlightSupportStore()
const {searchData, getSearchData, listScreen, getSelectedList, listTab} = storeToRefs(flightSupportStore)
const { searchData, getSearchData, listScreen, getSelectedList, listTab } = storeToRefs(flightSupportStore)
const handleRightClick = () => {
uni.$mocpJump.navigateTo('/panel/flight-support/components/Screen')
}
const localPagingCB = (data) => {
const transformData = (data) => {
const currentTime = Date.now()
const listMsg = data?.reduce((q, w) => {
const listMsg = data
?.reduce(
(q, w) => {
if (finishedStatus.includes(w.status)) {
w.isFinished = true
q[2].push(w)
......@@ -88,7 +82,9 @@ const localPagingCB = (data) => {
}
}
return q
}, [[], [], []])
},
[[], [], []]
)
.map((q, w) => {
if (w === 0) {
q.sort((a, s) => {
......@@ -109,7 +105,7 @@ const subsectionChange = (e) => {
if (searchData.value.isOut == e) return
searchData.value.isOut = e
currentInBoundModeForFlightTablePage.value = e
const ind = listTab.value.findIndex(item => item.label == '出发地' || item.label == '目的地')
const ind = listTab.value.findIndex((item) => item.label == '出发地' || item.label == '目的地')
const isCurrentIn = currentInBoundModeForFlightTablePage.value + 1 == allInBoundMode.In
if (ind > -1) {
console.log(currentInBoundModeForFlightTablePage.value, allInBoundMode.In, ind)
......@@ -121,7 +117,6 @@ const subsectionChange = (e) => {
uni.$on('screenReload', () => {
paging.value?.reload()
})
</script>
<style scoped lang="scss">
......
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