This commit is contained in:
Vinjor 2025-06-30 17:31:55 +08:00
commit dff83d59c0
3 changed files with 15 additions and 5 deletions

View File

@ -74,9 +74,7 @@ public class BusiCategoryServiceImpl extends ServiceImpl<BusiCategoryMapper, Bus
List<BusiCategory> categoryList = list(lambdaQueryWrapper);
//遍历赋值
categoryList.forEach(item -> {
if (idToProdsJunior.containsKey(item.getId())) {
item.setProdsJunior(idToProdsJunior.get(item.getId()));
}
item.setProdsJunior(idToProdsJunior.getOrDefault(item.getId(), 0));
});
List<BusiCategory> saveResult = computeProdsAll(categoryList);
updateBatchById(saveResult);

View File

@ -50,12 +50,12 @@
<el-row v-if="form.catgType == 'cp'" :gutter="20">
<el-col :span="12">
<el-form-item label="产品上方内容html" prop="prodUp">
<el-input type="textarea" v-model="form.prodUp" placeholder="请输入产品上方内容html" />
<editor v-model="form.prodUp" :min-height="160"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产品下方内容html" prop="prodDown">
<el-input type="textarea" v-model="form.prodDown" placeholder="请输入产品下方内容html" />
<editor v-model="form.prodDown" :min-height="160"/>
</el-form-item>
</el-col>
</el-row>

View File

@ -42,6 +42,18 @@
<dict-tag :options="dict.type.category_type" :value="scope.row.catgType"/>
</template>
</el-table-column>
<el-table-column label="直接下级数" align="center" prop="prodsJunior">
<template slot-scope="scope">
<span v-if="scope.row.catgType == 'cp' || scope.row.catgType == 'wz'">{{scope.row.prodsJunior}}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="递归数" align="center" prop="prodsAll">
<template slot-scope="scope">
<span v-if="scope.row.catgType == 'cp' || scope.row.catgType == 'wz'">{{scope.row.prodsAll}}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="排序" align="center" prop="sort" />
<el-table-column label="修改时间" align="center" prop="updateTime">
<template slot-scope="scope">