修改内容数据
parent
42d7c62b94
commit
71aad8dacb
|
|
@ -48,7 +48,7 @@ const icon_class = computed(() => {
|
|||
if (!isEmpty(props.sourceList)) {
|
||||
let icon = '';
|
||||
// 取出数据源ID
|
||||
const data_source_id = !isEmpty(form.value?.data_source_field?.id || '') ? form.value?.data_source_field?.id : form.value.data_source_id;
|
||||
const data_source_id = !isEmpty(form.value?.data_source_field?.id || '') ? form.value?.data_source_field?.id : '';
|
||||
// 数据源内容
|
||||
const option = form.value?.data_source_field?.option || {};
|
||||
if (data_source_id.includes(';')) {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ const img = computed(() => {
|
|||
if (!isEmpty(props.sourceList)) {
|
||||
let image_url = '';
|
||||
// 取出数据源ID
|
||||
const data_source_id = !isEmpty(form.value?.data_source_field?.id || '') ? form.value?.data_source_field?.id : form.value.data_source_id;
|
||||
const data_source_id = !isEmpty(form.value?.data_source_field?.id || '') ? form.value?.data_source_field?.id : '';
|
||||
// 数据源内容
|
||||
const option = form.value?.data_source_field?.option || {};
|
||||
// 如果是商品,品牌,文章的图片, 其他的切换为从data中取数据
|
||||
|
|
|
|||
|
|
@ -73,9 +73,9 @@ const text_title = computed(() => {
|
|||
}
|
||||
}
|
||||
// 获取数据源ID
|
||||
const data_source_id = !isEmpty(formValue?.data_source_field?.id || '') ? formValue?.data_source_field?.id : [ formValue.data_source_id ];
|
||||
const data_source_id = !isEmpty(formValue?.data_source_field?.id || []) ? formValue?.data_source_field?.id : [];
|
||||
// 数据源内容
|
||||
const option = formValue?.data_source_field?.option || {};
|
||||
const option = formValue?.data_source_field?.option || [];
|
||||
// 文本信息
|
||||
let text_title = '';
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -163,7 +163,10 @@ const text_change = (key: string) => {
|
|||
if (form.value.data_source_field.id.length > 0) {
|
||||
form.value.data_source_field.option = props.options.filter((item) => item.type == 'text' && form.value.data_source_field.id.includes(item.field))
|
||||
} else {
|
||||
form.value.data_source_field = get_data_fields([], 'text', '');
|
||||
form.value.data_source_field = {
|
||||
id: [],
|
||||
option: [],
|
||||
};
|
||||
}
|
||||
} else {
|
||||
// 如果没有数据,就赋值为空
|
||||
|
|
|
|||
|
|
@ -16,12 +16,12 @@
|
|||
<el-input v-model="keyword" placeholder="请输入商品关键字" clearable @blur="keyword_blur"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品分类">
|
||||
<el-select v-model="form.category_ids" multiple collapse-tags placeholder="请选择商品分类">
|
||||
<el-select v-model="form.category_ids" multiple collapse-tags filterable placeholder="请选择商品分类">
|
||||
<el-option v-for="item in common_store.common.goods_category" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="指定品牌">
|
||||
<el-select v-model="form.brand_ids" multiple collapse-tags placeholder="请选择品牌">
|
||||
<el-select v-model="form.brand_ids" multiple collapse-tags filterable placeholder="请选择品牌">
|
||||
<el-option v-for="item in common_store.common.brand_list" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
<el-input v-model="keyword" placeholder="请输入文章关键字" clearable @blur="keyword_blur"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="文章分类">
|
||||
<el-select v-model="form.category_ids" multiple collapse-tags placeholder="请选择文章分类">
|
||||
<el-select v-model="form.category_ids" multiple collapse-tags filterable placeholder="请选择文章分类">
|
||||
<el-option v-for="item in common_store.common.article_category" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -96,7 +96,7 @@
|
|||
<el-input v-model="keyword" placeholder="请输入品牌关键字" clearable @blur="keyword_blur"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="品牌分类">
|
||||
<el-select v-model="form.category_ids" multiple collapse-tags placeholder="请选择品牌分类">
|
||||
<el-select v-model="form.category_ids" multiple collapse-tags filterable placeholder="请选择品牌分类">
|
||||
<el-option v-for="item in common_store.common.brand_list" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<!-- 商品分类 -->
|
||||
<div class="container">
|
||||
<div class="flex-row jc-e gap-20 mb-20">
|
||||
<el-select v-model="category_ids" class="search-w" placeholder="请选择" clearable @change="handle_search">
|
||||
<el-select v-model="category_ids" class="search-w" placeholder="请选择" filterable clearable @change="handle_search">
|
||||
<el-option v-for="item in article_category_list" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-input v-model="search_value" placeholder="请输入搜索内容" class="search-w" @change="handle_search">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<!-- 品牌 -->
|
||||
<div class="container">
|
||||
<div class="flex-row jc-e gap-20 mb-20">
|
||||
<el-select v-model="brand_ids" class="search-w" placeholder="品牌" clearable @change="handle_search">
|
||||
<el-select v-model="brand_ids" class="search-w" placeholder="品牌" filterable clearable @change="handle_search">
|
||||
<el-option v-for="item in brand_category" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-input v-model="search_value" placeholder="请输入搜索内容" class="search-w" @change="handle_search">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<!-- 优惠券 -->
|
||||
<div class="container">
|
||||
<div class="flex-row jc-e gap-20 mb-20">
|
||||
<el-select v-model="type" class="search-w" placeholder="请选择" clearable @change="handle_search">
|
||||
<el-select v-model="type" class="search-w" placeholder="请选择" filterable clearable @change="handle_search">
|
||||
<el-option v-for="item in coupon_type_list" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
<el-input v-model="search_value" placeholder="请输入搜索内容" class="search-w" @change="handle_search">
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
<!-- 商品 -->
|
||||
<div class="container">
|
||||
<div class="flex-row jc-e gap-20 mb-20">
|
||||
<el-cascader v-model="category_ids" :options="category_list" :props="cascader_config" placeholder="请选择" :show-all-levels="false" clearable @change="cascader_change" />
|
||||
<el-select v-model="brand_ids" class="search-w" placeholder="品牌" clearable @change="handle_search">
|
||||
<el-cascader v-model="category_ids" :options="category_list" :props="cascader_config" placeholder="请选择" :show-all-levels="false" filterable clearable @change="cascader_change" />
|
||||
<el-select v-model="brand_ids" class="search-w" placeholder="品牌" filterable clearable @change="handle_search">
|
||||
<el-option v-for="item in brand_list" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-input v-model="search_value" placeholder="请输入搜索内容" class="search-w" @change="handle_search">
|
||||
|
|
|
|||
|
|
@ -157,9 +157,9 @@ const dialog_title = computed(() => {
|
|||
} else if (props.type[0] == 'coupon') {
|
||||
name = '优惠券';
|
||||
}
|
||||
return name + '链接';
|
||||
return name + '选择';
|
||||
} else {
|
||||
return '选择链接';
|
||||
return '内容选择';
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
</template>
|
||||
<template v-else>
|
||||
<el-form-item label="类型">
|
||||
<el-select v-model="form.type" multiple collapse-tags placeholder="请选择优惠券类型">
|
||||
<el-select v-model="form.type" multiple collapse-tags filterable placeholder="请选择优惠券类型">
|
||||
<el-option v-for="item in base_list.coupon_type_list" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
|
|||
|
|
@ -419,12 +419,12 @@ watch(() => center_height.value, () => {
|
|||
...Object.assign({}, cloneDeep((defaultComData as any)[`${item.key}_com_data`]), item.com_data),
|
||||
com_height: item.com_data.staging_height,
|
||||
data_source_field: {
|
||||
...item.com_data?.data_source_field ?? { id:'', option: {} },
|
||||
id: !isEmpty(item.com_data?.data_source_field?.id || '')? item.com_data.data_source_field.id : item.com_data.data_source_id,
|
||||
...item.com_data?.data_source_field ?? { id: item.key == 'text' ? [] : '', option: item.key == 'text' ? [] : {} },
|
||||
id: !isEmpty(item.com_data?.data_source_field?.id || '') ? item.com_data.data_source_field.id : item.key == 'text' ? [] : '',
|
||||
},
|
||||
data_source_link_field: {
|
||||
...item.com_data?.data_source_link_field ?? { id: '', option: {} },
|
||||
id: !isEmpty(item.com_data?.data_source_link_field?.id || '')? item.com_data.data_source_link_field.id : item.com_data.data_source_link,
|
||||
id: !isEmpty(item.com_data?.data_source_link_field?.id || '')? item.com_data.data_source_link_field.id : '',
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
|
|
|||
Loading…
Reference in New Issue