修改商品魔方数据源处理逻辑
parent
11faca0bee
commit
23683d2dd1
|
|
@ -50,7 +50,7 @@
|
|||
<div class="mb-12">数据设置</div>
|
||||
<div class="flex-col">
|
||||
<!-- 筛选数据只有一条的时候,并且显示为true的时候才显示,否则的话不显示数据 -->
|
||||
<el-form-item v-if="(default_type_data.data_type.length == 1 && default_type_data.is_type_show) || default_type_data.data_type.length > 1" label="读取方式">
|
||||
<el-form-item v-if="(default_type_data.data_type.length == 1 && +default_type_data.is_type_show == 1) || default_type_data.data_type.length > 1" label="读取方式">
|
||||
<el-radio-group v-model="form.data_source_content.data_type">
|
||||
<el-radio v-for="(item, index) in default_type_data.data_type" :key="index" :value="item">{{ +item === 0 ? '指定数据' : '筛选数据' }}</el-radio>
|
||||
</el-radio-group>
|
||||
|
|
@ -287,7 +287,7 @@ const data_processing = () => {
|
|||
show_type: custom_config?.show_type || ['vertical', 'vertical-scroll', 'horizontal'],
|
||||
show_number: custom_config?.show_number || [1, 2, 3, 4],
|
||||
data_type: custom_config?.data_type || [0, 1],
|
||||
is_type_show: custom_config?.is_type_show || true,
|
||||
is_type_show: custom_config?.is_type_show || '1',
|
||||
};
|
||||
filter_data_handling('old');
|
||||
default_data();
|
||||
|
|
@ -418,7 +418,7 @@ const changeDataSource = (key: string) => {
|
|||
show_type: custom_config?.show_type || ['vertical', 'vertical-scroll', 'horizontal'],
|
||||
show_number: custom_config?.show_number || [1, 2, 3, 4],
|
||||
data_type: custom_config?.data_type || [0, 1],
|
||||
is_type_show: custom_config?.is_type_show || true,
|
||||
is_type_show: custom_config?.is_type_show || '1',
|
||||
};
|
||||
// 默认数据处理
|
||||
default_data();
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
<div class="mb-12">商品设置</div>
|
||||
<div class="flex-col">
|
||||
<!-- 筛选数据只有一条的时候,并且显示为true的时候才显示,否则的话不显示数据 -->
|
||||
<el-form-item v-if="(default_type_data.data_type.length == 1 && default_type_data.is_type_show) || default_type_data.data_type.length > 1" label="读取方式">
|
||||
<el-form-item v-if="(default_type_data.data_type.length == 1 && +default_type_data.is_type_show == 1) || default_type_data.data_type.length > 1" label="读取方式">
|
||||
<el-radio-group v-model="form.data_source_content.data_type">
|
||||
<el-radio v-for="(item, index) in default_type_data.data_type" :key="index" :value="item">{{ +item === 0 ? '指定数据' : '筛选数据' }}</el-radio>
|
||||
</el-radio-group>
|
||||
|
|
@ -119,7 +119,7 @@ interface custom_config {
|
|||
show_type: string[],
|
||||
show_number: number[],
|
||||
data_type: string[],
|
||||
is_type_show: boolean,
|
||||
is_type_show: string,
|
||||
filter_config: object,
|
||||
appoint_config: object,
|
||||
}
|
||||
|
|
@ -141,7 +141,7 @@ const getGoodsmagicinit = () => {
|
|||
GoodsMagicAPI.getGoodsmagicinit().then((res) => {
|
||||
const { data_source } = res.data;
|
||||
options.value = data_source;
|
||||
goods_source_store.set_data_source(data_source);
|
||||
goods_source_store.set_goods_source(data_source);
|
||||
// 接口成功之后设置true
|
||||
goods_source_store.set_is_goods_source_api(true);
|
||||
data_processing();
|
||||
|
|
@ -171,7 +171,7 @@ const data_processing = () => {
|
|||
show_type: custom_config?.show_type || ['vertical', 'vertical-scroll', 'horizontal'],
|
||||
show_number: custom_config?.show_number || [1, 2, 3, 4],
|
||||
data_type: custom_config?.data_type || [0, 1],
|
||||
is_type_show: custom_config?.is_type_show || true,
|
||||
is_type_show: custom_config?.is_type_show || '1',
|
||||
};
|
||||
filter_data_handling('old');
|
||||
default_data();
|
||||
|
|
@ -255,7 +255,7 @@ const changeDataSource = (key: string) => {
|
|||
show_type: custom_config?.show_type || ['vertical', 'vertical-scroll', 'horizontal'],
|
||||
show_number: custom_config?.show_number || [1, 2, 3, 4],
|
||||
data_type: custom_config?.data_type || [0, 1],
|
||||
is_type_show: custom_config?.is_type_show || true,
|
||||
is_type_show: custom_config?.is_type_show || '1',
|
||||
};
|
||||
// 默认数据处理
|
||||
default_data();
|
||||
|
|
|
|||
Loading…
Reference in New Issue