uu
This commit is contained in:
parent
bd526f80d2
commit
1e2bcb76d9
@ -1,43 +1,50 @@
|
|||||||
<template>
|
<template>
|
||||||
<tpx-dialog :show="show" title="选择线路" @onClose="handleCloseModal()">
|
<tpx-dialog :show="show" title="选择线路" @onClose="handleCloseModal()">
|
||||||
<view class="shet-cont">
|
<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="keyword" bgColor="#FFF"></tpx-search>
|
<!-- 关键字搜索框 -->
|
||||||
|
<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 class="mt-20 mb-10">
|
|
||||||
<tpx-tags :list="hisList" :value="value" type="single" @onItemClick="handleHisItemClick"></tpx-tags>
|
|
||||||
</view>
|
</view>
|
||||||
|
</tpx-scroll-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-dialog>
|
</tpx-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import * as apiService from "@/common/api"
|
||||||
|
import { transListKeyTitle } from "@/common/util"
|
||||||
export default {
|
export default {
|
||||||
// computed: {
|
computed: {
|
||||||
// filDataList() {
|
dataList() {
|
||||||
// return []
|
let list = transListKeyTitle({ valKey: 'id', titleKey: 'lineName', list: this.resObject.list })
|
||||||
// },
|
console.log("====list====", list)
|
||||||
// },
|
return list
|
||||||
|
},
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
show: {
|
show: {
|
||||||
default () {
|
default () {
|
||||||
@ -48,21 +55,21 @@
|
|||||||
default () {
|
default () {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
resObject: {
|
||||||
|
list: []
|
||||||
|
},
|
||||||
hisList: [
|
hisList: [
|
||||||
{ title: '柬-铁运', val: 1 },
|
|
||||||
{ title: '越-铁运', val: 2 }
|
|
||||||
],
|
],
|
||||||
dataList: [
|
searchParam: {
|
||||||
{ title: '柬埔寨-铁卡联运', val: 1 },
|
country: '', // 目的国家
|
||||||
{ title: '越南-铁卡联运', val: 2 },
|
fromCountry: '',// 发货国家
|
||||||
{ title: '泰国-铁卡联运', val: 3 },
|
keyword: ''
|
||||||
{ title: '巴厘岛-铁卡联运', val: 4 }
|
}
|
||||||
],
|
|
||||||
keyword: ''
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -74,9 +81,9 @@
|
|||||||
unmounted() {},
|
unmounted() {},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
getListFun: apiService.getTransLineList,
|
||||||
handleCloseModal() {
|
handleCloseModal() {
|
||||||
this.$emit('update:show', false)
|
this.$emit('update:show', false)
|
||||||
|
|
||||||
},
|
},
|
||||||
handleHisItemClick(res) {
|
handleHisItemClick(res) {
|
||||||
this.updateValue(res.val)
|
this.updateValue(res.val)
|
||||||
@ -88,6 +95,9 @@
|
|||||||
this.$emit('onChange', val)
|
this.$emit('onChange', val)
|
||||||
this.$emit('update:value', val)
|
this.$emit('update:value', val)
|
||||||
this.handleCloseModal()
|
this.handleCloseModal()
|
||||||
|
},
|
||||||
|
onListChange(val){
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -95,7 +105,6 @@
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.shet-cont{
|
.shet-cont{
|
||||||
min-height: 500rpx;
|
|
||||||
padding: 10rpx 0 30rpx 0;
|
padding: 10rpx 0 30rpx 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -14,7 +14,11 @@
|
|||||||
<view style="height: 1rpx;background-color: rgb(214, 215, 217);position: absolute;left: 0rpx;right: 0rpx;;"></view>
|
<view style="height: 1rpx;background-color: rgb(214, 215, 217);position: absolute;left: 0rpx;right: 0rpx;;"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="lgd-body" :style="`padding: 0rpx 30rpx;${contentStyle}`">
|
<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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -143,6 +147,8 @@
|
|||||||
.type-sheet .lgd-body {
|
.type-sheet .lgd-body {
|
||||||
position: relative;
|
position: relative;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<slot></slot>
|
<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'" />
|
:status="loadedAll ? 'nomore' : 'loading'" />
|
||||||
|
|
||||||
<!-- 空数据页 -->
|
<!-- 空数据页 -->
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user