feat: 🚀 角色权限-首页默认选择-父级半选中传给后台

This commit is contained in:
2025-10-27 15:35:16 +08:00
parent 5f423ba282
commit 3aadf27102
9 changed files with 458 additions and 96 deletions

View File

@@ -3,11 +3,23 @@
<!-- 封面图 -->
<div>
<h5 style="margin: 0; margin-bottom: 16px; font-size: 14px">封面图</h5>
<UploadImg v-model:image-url="imgInfoDataStore.cover_image">
<template #tip>
<div style="width: 150px; text-align: center">图片尺寸800x800</div>
</template>
</UploadImg>
<div style="display: flex">
<div>
<UploadImg v-model:image-url="imgInfoDataStore.cover_image">
<template #tip>
<div style="width: 150px; text-align: center">图片尺寸800x800</div>
</template>
</UploadImg>
</div>
<!-- <div style="margin-left: 20px">
<UploadImg v-model:image-url="imgInfoDataStore.cover_image">
<template #tip>
<div style="width: 150px; text-align: center">图片尺寸800x800</div>
</template>
</UploadImg>
</div> -->
</div>
</div>
<el-divider />
<!-- 属性 -->
@@ -116,7 +128,6 @@ const findAttrById = (id: any) => {
// 在 row 的 attrs 数组中查找对应 attrId 的对象
const findAttrObjInRow = (row: any, attrId: any) => {
console.log(row.attrs, "=======row===========");
let obj = row.attrs.find((item: any) => item.attr_id === attrId.toString());
if (!obj) {
obj = { attr_id: attrId.toString(), attr_value: "" };

View File

@@ -35,27 +35,10 @@ export const FORM_DATA: FormItem[] = [
prop: "treeIds",
prop1: "category_id",
placeholder: "请选择",
type: "treeSelect",
type: "treeSelect", //treeSelect
isArray: true,
label: "产品分类: ",
options: [
{
value: "1",
label: "Level one 1",
children: [
{
value: "1-1",
label: "Level two 1-1",
children: [
{
value: "1-1-1",
label: "Level three 1-1-1"
}
]
}
]
}
]
options: []
},
{
prop: "Time",

View File

@@ -76,7 +76,6 @@ export const initDetailParams = (dataStore: any, data: any, editorRef: any) => {
editorRef?.value?.clearEditor(); // 调用子组件的清空方法
} else {
dataStore.detail = htmlDecode(data.detail); //htmlDecode(data.detail);
console.log(data.detail, "=======detail========");
}
//图片