mirror of
https://gitee.com/jeecg/JeecgBoot.git
synced 2025-12-30 09:22:26 +00:00
Merge branch 'main' of https://github.com/jeecgboot/jeecg-boot
This commit is contained in:
@@ -371,11 +371,19 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
|||||||
if (isCustomDataSource) {
|
if (isCustomDataSource) {
|
||||||
DynamicDataSourceContextHolder.push(dataSource);
|
DynamicDataSourceContextHolder.push(dataSource);
|
||||||
}
|
}
|
||||||
List<DictModel> restData = sysDictMapper.queryTableDictByKeysAndFilterSql(table, text, code, filterSql, codeValues);
|
//update-begin---author:jarysun ---date:20251020 for:[issues/#9002]解决表字典查询出现异常之后,数据源不能恢复问题------------
|
||||||
|
List<DictModel> restData = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
restData = sysDictMapper.queryTableDictByKeysAndFilterSql(table, text, code, filterSql, codeValues);
|
||||||
|
} finally {
|
||||||
// 清理自定义的数据源
|
// 清理自定义的数据源
|
||||||
if (isCustomDataSource) {
|
if (isCustomDataSource) {
|
||||||
DynamicDataSourceContextHolder.clear();
|
DynamicDataSourceContextHolder.clear();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
//update-end---author:jarysun ---date:20251020 for:[issues/#9002]解决表字典查询出现异常之后,数据源不能恢复问题------------
|
||||||
|
|
||||||
return restData;
|
return restData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,15 +45,17 @@ const render = {
|
|||||||
*/
|
*/
|
||||||
renderDict: (v, code, renderTag = false) => {
|
renderDict: (v, code, renderTag = false) => {
|
||||||
let text = '';
|
let text = '';
|
||||||
|
let color = '';
|
||||||
let array = getDictItemsByCode(code) || [];
|
let array = getDictItemsByCode(code) || [];
|
||||||
let obj = array.filter((item) => {
|
let obj = array.filter((item) => {
|
||||||
return item.value == v;
|
return item.value == v;
|
||||||
});
|
});
|
||||||
if (obj.length > 0) {
|
if (obj.length > 0) {
|
||||||
text = obj[0].text;
|
text = obj[0].text;
|
||||||
|
color = obj[0].color;
|
||||||
}
|
}
|
||||||
//【jeecgboot-vue3/issues/903】render.renderDict使用tag渲染报警告问题 #903
|
//【jeecgboot-vue3/issues/903】render.renderDict使用tag渲染报警告问题 #903
|
||||||
return isEmpty(text) || !renderTag ? h('span', text) : h(Tag, () => text);
|
return isEmpty(text) || !renderTag ? h('span', text) : h(Tag,{ color }, () => text);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 渲染图片
|
* 渲染图片
|
||||||
|
|||||||
Reference in New Issue
Block a user