uu
This commit is contained in:
parent
bd526f80d2
commit
1e2bcb76d9
@ -1,43 +1,50 @@
|
||||
<template>
|
||||
<tpx-dialog :show="show" title="选择线路" @onClose="handleCloseModal()">
|
||||
<view class="shet-cont">
|
||||
<!-- 关键字搜索框 -->
|
||||
<tpx-search placeholder="请输入" v-model:value="keyword" bgColor="#FFF"></tpx-search>
|
||||
|
||||
<view class="mt-20 mb-10">
|
||||
<tpx-tags :list="hisList" :value="value" type="single" @onItemClick="handleHisItemClick"></tpx-tags>
|
||||
<tpx-scroll-view v-model:resObject="resObject" :searchParam="searchParam" :getListFun="getListFun" size="sm" :showLoadedAll="false" @onListChange="onListChange">
|
||||
<view class="shet-cont">
|
||||
<!-- 关键字搜索框 -->
|
||||
<tpx-search placeholder="请输入" v-model:value="searchParam.keyword" bgColor="#FFF"></tpx-search>
|
||||
|
||||
<view v-if="hisList.length > 0" class="mt-20 mb-10">
|
||||
<tpx-tags :list="hisList" :value="value" type="single" @onItemClick="handleHisItemClick"></tpx-tags>
|
||||
</view>
|
||||
|
||||
<view class="">
|
||||
<tpx-checkitems :list="dataList" :value="value" v-slot="dlCurrent" min-checked="1" type="single"
|
||||
@onChange="handleDataItemChange"
|
||||
>
|
||||
<view slot class="mt-20" :style="`background-color: #F6F6F6;padding: 12rpx;border-radius: 8rpx;border: 1rpx solid ${dlCurrent.checked?'#B12D29':'transparent'};`">
|
||||
<u-row justify="between">
|
||||
<u-col span="10">
|
||||
<u-text size="28" :text="dlCurrent.item.title"></u-text>
|
||||
</u-col>
|
||||
<view span="2" class="com-chk-icon">
|
||||
<u-checkbox-group>
|
||||
<u-checkbox :checked="dlCurrent.checked" shape="circle" size="32" activeColor="#B12D29"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
</view>
|
||||
</u-row>
|
||||
</view>
|
||||
</tpx-checkitems>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="">
|
||||
<tpx-checkitems :list="dataList.filter(v=> !keyword || (v.title.indexOf(keyword) > -1))" :value="value" v-slot="dlCurrent" min-checked="1" type="single"
|
||||
@onChange="handleDataItemChange"
|
||||
>
|
||||
<view slot class="mt-20" :style="`background-color: #F6F6F6;padding: 12rpx;border-radius: 8rpx;border: 1rpx solid ${dlCurrent.checked?'#B12D29':'transparent'};`">
|
||||
<u-row justify="between">
|
||||
<u-col span="10">
|
||||
<u-text size="28" :text="dlCurrent.item.title"></u-text>
|
||||
</u-col>
|
||||
<view span="2" class="com-chk-icon">
|
||||
<u-checkbox-group>
|
||||
<u-checkbox :checked="dlCurrent.checked" shape="circle" size="32" activeColor="#B12D29"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
</view>
|
||||
</u-row>
|
||||
</view>
|
||||
</tpx-checkitems>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</tpx-scroll-view>
|
||||
|
||||
</tpx-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as apiService from "@/common/api"
|
||||
import { transListKeyTitle } from "@/common/util"
|
||||
export default {
|
||||
// computed: {
|
||||
// filDataList() {
|
||||
// return []
|
||||
// },
|
||||
// },
|
||||
computed: {
|
||||
dataList() {
|
||||
let list = transListKeyTitle({ valKey: 'id', titleKey: 'lineName', list: this.resObject.list })
|
||||
console.log("====list====", list)
|
||||
return list
|
||||
},
|
||||
},
|
||||
props: {
|
||||
show: {
|
||||
default () {
|
||||
@ -48,21 +55,21 @@
|
||||
default () {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
resObject: {
|
||||
list: []
|
||||
},
|
||||
hisList: [
|
||||
{ title: '柬-铁运', val: 1 },
|
||||
{ title: '越-铁运', val: 2 }
|
||||
|
||||
],
|
||||
dataList: [
|
||||
{ title: '柬埔寨-铁卡联运', val: 1 },
|
||||
{ title: '越南-铁卡联运', val: 2 },
|
||||
{ title: '泰国-铁卡联运', val: 3 },
|
||||
{ title: '巴厘岛-铁卡联运', val: 4 }
|
||||
],
|
||||
keyword: ''
|
||||
searchParam: {
|
||||
country: '', // 目的国家
|
||||
fromCountry: '',// 发货国家
|
||||
keyword: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -74,9 +81,9 @@
|
||||
unmounted() {},
|
||||
|
||||
methods: {
|
||||
getListFun: apiService.getTransLineList,
|
||||
handleCloseModal() {
|
||||
this.$emit('update:show', false)
|
||||
|
||||
},
|
||||
handleHisItemClick(res) {
|
||||
this.updateValue(res.val)
|
||||
@ -88,6 +95,9 @@
|
||||
this.$emit('onChange', val)
|
||||
this.$emit('update:value', val)
|
||||
this.handleCloseModal()
|
||||
},
|
||||
onListChange(val){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -95,7 +105,6 @@
|
||||
|
||||
<style scoped lang="scss">
|
||||
.shet-cont{
|
||||
min-height: 500rpx;
|
||||
padding: 10rpx 0 30rpx 0;
|
||||
}
|
||||
</style>
|
||||
@ -14,7 +14,11 @@
|
||||
<view style="height: 1rpx;background-color: rgb(214, 215, 217);position: absolute;left: 0rpx;right: 0rpx;;"></view>
|
||||
</view>
|
||||
<view class="lgd-body" :style="`padding: 0rpx 30rpx;${contentStyle}`">
|
||||
<slot></slot>
|
||||
<view class="pos-rlt" style="flex: 1;">
|
||||
<view class="pos-abt-all">
|
||||
<slot></slot>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -143,6 +147,8 @@
|
||||
.type-sheet .lgd-body {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<slot></slot>
|
||||
|
||||
<!-- 加载更多 -->
|
||||
<u-loadmore icon-size="28" font-size="28" margin-top="30" v-if="showLoadMore || loadedAll"
|
||||
<u-loadmore icon-size="28" font-size="28" margin-top="20" margin-bottom="20" v-if="showLoadMore || loadedAll"
|
||||
:status="loadedAll ? 'nomore' : 'loading'" />
|
||||
|
||||
<!-- 空数据页 -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user