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