|
@@ -9,20 +9,21 @@ |
|
|
{{popupTitle}} |
|
|
{{popupTitle}} |
|
|
</view> |
|
|
</view> |
|
|
<view v-if="filterable" style="padding: 0rpx 30rpx 30rpx 30rpx;"> |
|
|
<view v-if="filterable" style="padding: 0rpx 30rpx 30rpx 30rpx;"> |
|
|
<u-search height="90rpx" :inputStyle="{fontSize:'30rpx'}" v-model="searchText" :placeholder="searchPlaceholder" shape="square" |
|
|
|
|
|
:showAction="false"></u-search> |
|
|
|
|
|
|
|
|
<u-search height="90rpx" :inputStyle="{fontSize:'30rpx'}" v-model="searchText" |
|
|
|
|
|
:placeholder="searchPlaceholder" shape="square" :showAction="false"></u-search> |
|
|
</view> |
|
|
</view> |
|
|
<u-radio-group v-if="!multiple" v-model="value_" iconPlacement="right" placement="column" borderBottom> |
|
|
<u-radio-group v-if="!multiple" v-model="value_" iconPlacement="right" placement="column" borderBottom> |
|
|
<u-radio labelSize="30rpx" v-show="item.label.includes(searchText)" v-for="(item,index) in options" :key="index" |
|
|
|
|
|
:label="item.label" :name="item.value"></u-radio> |
|
|
|
|
|
|
|
|
<u-radio labelSize="30rpx" v-show="item.label.includes(searchText)" v-for="(item,index) in options" |
|
|
|
|
|
:key="index" :label="item.label" :name="item.value"></u-radio> |
|
|
</u-radio-group> |
|
|
</u-radio-group> |
|
|
<u-checkbox-group v-else v-model="value_" iconPlacement="right" placement="column" borderBottom> |
|
|
<u-checkbox-group v-else v-model="value_" iconPlacement="right" placement="column" borderBottom> |
|
|
<u-checkbox labelSize="30rpx" v-show="item.label.includes(searchText)" v-for="(item, index) in options" :key="index" |
|
|
|
|
|
:label="item.label" :name="item.value"> |
|
|
|
|
|
|
|
|
<u-checkbox labelSize="30rpx" v-show="item.label.includes(searchText)" |
|
|
|
|
|
v-for="(item, index) in options" :key="index" :label="item.label" :name="item.value"> |
|
|
</u-checkbox> |
|
|
</u-checkbox> |
|
|
</u-checkbox-group> |
|
|
</u-checkbox-group> |
|
|
<view style="padding: 36rpx 50rpx"> |
|
|
<view style="padding: 36rpx 50rpx"> |
|
|
<u-button @click="cofirm" type="primary" style="border-radius: 45rpx;height: 90rpx;font-weight: 700;font-size: 32rpx;" |
|
|
|
|
|
|
|
|
<u-button @click="cofirm" type="primary" |
|
|
|
|
|
style="border-radius: 45rpx;height: 90rpx;font-weight: 700;font-size: 32rpx;" |
|
|
text="确定"></u-button> |
|
|
text="确定"></u-button> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@@ -86,13 +87,19 @@ |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
if (this.multiple) this.value_ = [] |
|
|
|
|
|
|
|
|
this.value_ = JSON.parse(JSON.stringify(this.value)) |
|
|
if (!this.multiple) { |
|
|
if (!this.multiple) { |
|
|
let obj = this.options.find(e1 => e1.value == this.value) |
|
|
|
|
|
if (obj) this.title_ = obj.label |
|
|
|
|
|
|
|
|
let obj = this.options.find(e1 => e1.value == this.value_) |
|
|
|
|
|
if (obj) { |
|
|
|
|
|
this.title_ = obj.label |
|
|
|
|
|
this.$emit("update:title", this.title_) |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$emit("update:title", '') |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
let arr = this.options.filter(e1 => this.value.includes(e1.value)) |
|
|
|
|
|
|
|
|
let arr = this.options.filter(e1 => this.value_.includes(e1.value)) |
|
|
this.cellValue = arr.map(e => e.label) |
|
|
this.cellValue = arr.map(e => e.label) |
|
|
|
|
|
this.$emit("update:title", this.cellValue) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
@@ -100,15 +107,7 @@ |
|
|
this.show = false |
|
|
this.show = false |
|
|
}, |
|
|
}, |
|
|
open() { |
|
|
open() { |
|
|
if (this.multiple) this.value_ = [] |
|
|
|
|
|
if (!this.multiple) { |
|
|
|
|
|
let obj = this.options.find(e1 => e1.value == this.value) |
|
|
|
|
|
if (obj) this.title_ = obj.label |
|
|
|
|
|
} else { |
|
|
|
|
|
let arr = this.options.filter(e1 => this.value.includes(e1.value)) |
|
|
|
|
|
this.cellValue = arr.map(e => e.label) |
|
|
|
|
|
} |
|
|
|
|
|
this.value_ = this.value |
|
|
|
|
|
|
|
|
this.value_ = JSON.parse(JSON.stringify(this.value)) |
|
|
this.searchText = '' |
|
|
this.searchText = '' |
|
|
this.show = true |
|
|
this.show = true |
|
|
}, |
|
|
}, |
|
@@ -117,10 +116,16 @@ |
|
|
this.$emit("change", this.value_) |
|
|
this.$emit("change", this.value_) |
|
|
if (!this.multiple) { |
|
|
if (!this.multiple) { |
|
|
let obj = this.options.find(e1 => e1.value == this.value_) |
|
|
let obj = this.options.find(e1 => e1.value == this.value_) |
|
|
if (obj) this.title_ = obj.label |
|
|
|
|
|
|
|
|
if (obj) { |
|
|
|
|
|
this.title_ = obj.label |
|
|
|
|
|
this.$emit("update:title", this.title_ ) |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$emit("update:title", '') |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
let arr = this.options.filter(e1 => this.value_.includes(e1.value)) |
|
|
let arr = this.options.filter(e1 => this.value_.includes(e1.value)) |
|
|
this.cellValue = arr.map(e => e.label) |
|
|
this.cellValue = arr.map(e => e.label) |
|
|
|
|
|
this.$emit("update:title", this.cellValue) |
|
|
} |
|
|
} |
|
|
this.close() |
|
|
this.close() |
|
|
}, |
|
|
}, |
|
@@ -136,18 +141,20 @@ |
|
|
line-height: 100rpx; |
|
|
line-height: 100rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.u-checkbox-group,.u-radio-group { |
|
|
|
|
|
|
|
|
.u-checkbox-group, |
|
|
|
|
|
.u-radio-group { |
|
|
width: 92%; |
|
|
width: 92%; |
|
|
height: 780rpx; |
|
|
height: 780rpx; |
|
|
overflow-y: auto; |
|
|
overflow-y: auto; |
|
|
padding: 0 30rpx; |
|
|
padding: 0 30rpx; |
|
|
box-shadow: inset 0 0 20rpx rgba(0, 0, 0, 0.08); |
|
|
box-shadow: inset 0 0 20rpx rgba(0, 0, 0, 0.08); |
|
|
|
|
|
|
|
|
.u-radio,.u-checkbox { |
|
|
|
|
|
|
|
|
.u-radio, |
|
|
|
|
|
.u-checkbox { |
|
|
height: 98rpx; |
|
|
height: 98rpx; |
|
|
box-sizing: border-box; |
|
|
box-sizing: border-box; |
|
|
padding-bottom: 0rpx!important; |
|
|
|
|
|
margin-top: 0rpx!important; |
|
|
|
|
|
|
|
|
padding-bottom: 0rpx !important; |
|
|
|
|
|
margin-top: 0rpx !important; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|