main
fanfan 8 months ago
parent 2ca883ed6f
commit 0deab84ffb
  1. 18
      src/views/goods/filter/Index.vue

@ -4,17 +4,14 @@
<a-spin :spinning="isLoading">
<a-form :form="form" @submit="handleSubmit">
<a-form-item label="数据渠道" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select
allowClear
mode="multiple"
@change="getChannel"
placeholder="请选择渠道"
v-decorator="[`open_channel`, { rules: [{ required: true, message: '请至少选择1个渠道' }] }]"
>
<a-select allowClear mode="multiple" @change="getChannel" placeholder="请选择渠道">
<a-select-option :value="item.id" v-for="item in checkList" :key="item.id">
{{ item.name }}
</a-select-option>
</a-select>
<div style="color: rgba(0, 0, 0, 0.45); font-size: 12.5px; line-height: 20px">
数据渠道未选择时则代表所有渠道
</div>
</a-form-item>
<a-form-item
v-for="(k, index) in form.getFieldValue('fliter_condition')"
@ -181,7 +178,7 @@ export default {
}
if (record.open_channel) {
const list = record.open_channel
const channelAry=[]
const channelAry = []
this.checkList.map((item) => {
if (list.indexOf(item.id) != -1) {
channelAry.push(item.name)
@ -193,7 +190,7 @@ export default {
!isEmpty(form.getFieldsValue()) &&
$nextTick(() => {
form.setFieldsValue(
pick(record, ['open_channel', 'fliter_condition',...profitAry, ...profitRateAry, ...categoryAry])
pick(record, ['open_channel', 'fliter_condition', ...profitAry, ...profitRateAry, ...categoryAry])
)
this.$forceUpdate()
})
@ -278,4 +275,7 @@ export default {
.fan /deep/ .ant-form-item {
margin-bottom: 0;
}
.fan /deep/ .ant-select {
height: 35px;
}
</style>

Loading…
Cancel
Save