fix: 🧩 bug修复
This commit is contained in:
@@ -159,7 +159,7 @@
|
|||||||
show-checkbox
|
show-checkbox
|
||||||
check-strictly
|
check-strictly
|
||||||
@change="handleSelectChange(_ruleForm[`${item.prop}`], item.prop)"
|
@change="handleSelectChange(_ruleForm[`${item.prop}`], item.prop)"
|
||||||
style="max-width: 240px"
|
style="max-width: 340px"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.type === 'treeSelects'">
|
<template v-if="item.type === 'treeSelects'">
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
show-checkbox
|
show-checkbox
|
||||||
check-strictly
|
check-strictly
|
||||||
check-on-click-node
|
check-on-click-node
|
||||||
style="width: 240px"
|
style="width: 340px"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.type === 'treeSelectInput'">
|
<template v-if="item.type === 'treeSelectInput'">
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ const getArticleClassData = async () => {
|
|||||||
const result = await getArticleClassDataApi();
|
const result = await getArticleClassDataApi();
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
const { data } = result;
|
const { data } = result;
|
||||||
|
console.log(data, "============>>>>>");
|
||||||
dataStore.formData[1].options = addLabelValue(data);
|
dataStore.formData[1].options = addLabelValue(data);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export const FORM_DATA: FormItem[] = [
|
|||||||
{
|
{
|
||||||
prop: "category_id",
|
prop: "category_id",
|
||||||
placeholder: "请选择",
|
placeholder: "请选择",
|
||||||
type: "select",
|
type: "treeSelect",
|
||||||
isArray: true,
|
isArray: true,
|
||||||
label: "文章分类: ",
|
label: "文章分类: ",
|
||||||
options: []
|
options: []
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ export const EDIT_FORM_DATA1: FormItem[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "否",
|
label: "否",
|
||||||
value: 0
|
value: -1
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -219,7 +219,8 @@ export const EDIT_FORM_DATA1: FormItem[] = [
|
|||||||
|
|
||||||
export const EDIT_RULE_FORM = {
|
export const EDIT_RULE_FORM = {
|
||||||
type: "image",
|
type: "image",
|
||||||
sort: 1
|
sort: 1,
|
||||||
|
status: 1
|
||||||
};
|
};
|
||||||
// editRuleForm: {},
|
// editRuleForm: {},
|
||||||
//editFormData: [],
|
//editFormData: [],
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ const getProductCategoryList = async () => {
|
|||||||
const result = await getProductCategoryListApi();
|
const result = await getProductCategoryListApi();
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
let dataClone: any = cloneDeep(result?.data);
|
let dataClone: any = cloneDeep(result?.data);
|
||||||
dataStore.editFormData[6].options = addLabelValue(dataClone);
|
dataStore.editFormData[7].options = addLabelValue(dataClone);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -280,12 +280,12 @@ const getBannerUp = async () => {
|
|||||||
const getBannerClassEditList = async () => {
|
const getBannerClassEditList = async () => {
|
||||||
const result = await getBannerClassListApi();
|
const result = await getBannerClassListApi();
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
// let arr: any = [];
|
|
||||||
// result?.data?.forEach((item: any) => {
|
|
||||||
// arr.push({ value: item.id, label: item.name });
|
|
||||||
// });
|
|
||||||
dataStore.formData[1].options = addLabelValue(result?.data);
|
dataStore.formData[1].options = addLabelValue(result?.data);
|
||||||
dataStore.editFormData[5].options = addLabelValue(result?.data);
|
dataStore.editFormData.forEach((item: any) => {
|
||||||
|
if (item.prop === "banner_id") {
|
||||||
|
item.options = addLabelValue(result?.data);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
getBannerClassEditList();
|
getBannerClassEditList();
|
||||||
@@ -334,6 +334,7 @@ const resetFields = () => {
|
|||||||
// 抽屉重置
|
// 抽屉重置
|
||||||
const handleResetClick = () => {
|
const handleResetClick = () => {
|
||||||
if (dataStore.title === "添加Banner") {
|
if (dataStore.title === "添加Banner") {
|
||||||
|
console.log("12323");
|
||||||
resetFields();
|
resetFields();
|
||||||
} else {
|
} else {
|
||||||
getBannerRead(dataStore.editRuleForm.id);
|
getBannerRead(dataStore.editRuleForm.id);
|
||||||
@@ -343,14 +344,17 @@ const handleResetClick = () => {
|
|||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
dataStore.title = "添加Banner";
|
dataStore.title = "添加Banner";
|
||||||
dataStore.visible = true;
|
dataStore.visible = true;
|
||||||
getBannerClassEditList();
|
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
|
||||||
|
(dataStore.editFormData = cloneDeep(EDIT_FORM_DATA)), // 抽屉表单配置项
|
||||||
|
getBannerClassEditList();
|
||||||
// getBannerClassList();
|
// getBannerClassList();
|
||||||
getProductCategoryList();
|
getProductCategoryList();
|
||||||
};
|
};
|
||||||
// 抽屉关闭前的钩子
|
// 抽屉关闭前的钩子
|
||||||
const handleBeforeClone = () => {
|
const handleBeforeClone = () => {
|
||||||
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
|
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
|
||||||
resetFields();
|
(dataStore.editFormData = cloneDeep(EDIT_FORM_DATA)), // 抽屉表单配置项
|
||||||
|
resetFields();
|
||||||
dataStore.visible = false;
|
dataStore.visible = false;
|
||||||
dataStore.isFirstRequest = true;
|
dataStore.isFirstRequest = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<el-input v-model="_ruleFormParam.short_name" style="width: 440px" />
|
<el-input v-model="_ruleFormParam.short_name" style="width: 440px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="型号" required>
|
<el-form-item label="型号" required>
|
||||||
<el-input v-model="_ruleFormParam.spu" style="width: 440px" />
|
<el-input v-model="_ruleFormParam.spu" style="width: 440px" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="产品分类" style="width: 440px" required>
|
<el-form-item label="产品分类" style="width: 440px" required>
|
||||||
<!-- <el-input v-model="_ruleFormParam.category_id" /> -->
|
<!-- <el-input v-model="_ruleFormParam.category_id" /> -->
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ getProductAttrsList();
|
|||||||
const getProductList = async (query: any) => {
|
const getProductList = async (query: any) => {
|
||||||
const result: any = await getProductListApi({
|
const result: any = await getProductListApi({
|
||||||
spu: query,
|
spu: query,
|
||||||
|
is_show: 1,
|
||||||
page: 1,
|
page: 1,
|
||||||
size: 1000
|
size: 1000
|
||||||
});
|
});
|
||||||
@@ -165,6 +166,7 @@ const handleRelatedAdd = () => {
|
|||||||
};
|
};
|
||||||
//相关信息及下载远程搜索
|
//相关信息及下载远程搜索
|
||||||
const handleRemote = debounce((params: any) => {
|
const handleRemote = debounce((params: any) => {
|
||||||
|
console.log(params, "============>>>>");
|
||||||
getProductList(params.query);
|
getProductList(params.query);
|
||||||
}, 800);
|
}, 800);
|
||||||
//产品属性接口
|
//产品属性接口
|
||||||
|
|||||||
Reference in New Issue
Block a user