mirror of
https://github.com/dataease/dataease.git
synced 2026-06-09 21:27:21 +08:00
refactor: 智能问数优化 (#17224)
This commit is contained in:
@@ -158,7 +158,7 @@ public class DatasetSQLBotManage {
|
||||
}
|
||||
|
||||
|
||||
public List<DataSQLBotAssistantVO> getDatasourceList(Long dsId, Long datasetId, String dvInfo) {
|
||||
public List<DataSQLBotAssistantVO> getDatasourceList(Long dsId, Long datasetId) {
|
||||
TokenUserBO user = Objects.requireNonNull(AuthUtils.getUser());
|
||||
Long oid = user.getDefaultOid();
|
||||
Long uid = user.getUserId();
|
||||
@@ -175,12 +175,6 @@ public class DatasetSQLBotManage {
|
||||
if (ObjectUtils.isNotEmpty(dsId)) {
|
||||
queryWrapper.eq("cd.id", dsId);
|
||||
}
|
||||
if(ObjectUtils.isNotEmpty(dvInfo)){
|
||||
List<Long> targetDsGroupIds = extChartViewMapper.findDatasetGroupIdByDvId(dvInfo);
|
||||
if(CollectionUtils.isNotEmpty(targetDsGroupIds)){
|
||||
queryWrapper.in("cdg.id", targetDsGroupIds);
|
||||
}
|
||||
}
|
||||
if (ObjectUtils.isEmpty(model)) {
|
||||
if (!isAdmin) {
|
||||
return null;
|
||||
|
||||
@@ -17,8 +17,8 @@ public class DatasetSQLBotServer implements DataAssistantApi {
|
||||
@Resource
|
||||
private DatasetSQLBotManage datasetSQLBotManage;
|
||||
@Override
|
||||
public List<DataSQLBotAssistantVO> getDatasourceList(Long dsId, Long datasetId, String dvInfo) {
|
||||
return datasetSQLBotManage.getDatasourceList(dsId, datasetId,dvInfo);
|
||||
public List<DataSQLBotAssistantVO> getDatasourceList(Long dsId, Long tableId) {
|
||||
return datasetSQLBotManage.getDatasourceList(dsId, tableId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -65,10 +65,7 @@ const themeAttrChange = (custom, property, value) => {
|
||||
}
|
||||
merge(viewInfo['customAttr'], tmpValue)
|
||||
} else {
|
||||
console.log('viewInfo=' + JSON.stringify(viewInfo['customAttr']))
|
||||
console.log('value=' + JSON.stringify(value))
|
||||
merge(viewInfo['customAttr'], value)
|
||||
console.log('merge=' + JSON.stringify(viewInfo['customAttr']))
|
||||
}
|
||||
} else {
|
||||
Object.keys(value).forEach(function (key) {
|
||||
|
||||
@@ -1503,7 +1503,6 @@ export const dvMainStore = defineStore('dataVisualization', {
|
||||
})
|
||||
})
|
||||
element.linkageFilters = currentFilters
|
||||
console.log('===test===' + JSON.stringify(element.linkageFilters))
|
||||
},
|
||||
|
||||
clearPanelLinkageInfo() {
|
||||
|
||||
@@ -215,7 +215,6 @@ const switchTab = (name: string) => {
|
||||
activeName.value = name || 'simple'
|
||||
}
|
||||
const autoCallback = (param: any) => {
|
||||
console.log(param)
|
||||
activeName.value = param.activeName || 'simple'
|
||||
preheat.value = param.preheat
|
||||
if (param.loadingText) {
|
||||
|
||||
@@ -43,7 +43,7 @@ const loadSqlbotInfo = () => {
|
||||
}
|
||||
|
||||
const loadSqlbotPage = () => {
|
||||
const scriptId = `sqlbot-assistant-float-script-${state.assistantId}`
|
||||
const scriptId = `sqlbot-assistant-float-script-${state.id}`
|
||||
const exitsScript = document.getElementById(scriptId)
|
||||
if (exitsScript && window['sqlbot_assistant_handler']) {
|
||||
mountedEmbeddedPage()
|
||||
|
||||
@@ -70,7 +70,6 @@ const mountedEmbeddedPage = () => {
|
||||
}
|
||||
const tempTimer = setTimeout(() => {
|
||||
if (window['sqlbot_embedded_handler']) {
|
||||
console.log('===test===111')
|
||||
window['sqlbot_embedded_handler'].mounted('#dataease-v2-embedded-sqlbot', {
|
||||
embeddedId: state.id,
|
||||
online: true,
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.List;
|
||||
|
||||
public interface DataAssistantApi {
|
||||
@GetMapping("/datasource")
|
||||
List<DataSQLBotAssistantVO> getDatasourceList(@RequestParam(required = false) Long dsId, @RequestParam(required = false) Long datasetId, @RequestParam(required = false) String dvInfo);
|
||||
List<DataSQLBotAssistantVO> getDatasourceList(@RequestParam(required = false) Long dsId, @RequestParam(required = false) Long tableId);
|
||||
|
||||
@GetMapping("/dataset/{dvInfo}")
|
||||
List<DataSQLBotDatasetVO> getDatasetList(@PathVariable String dvInfo);
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.io.Serializable;
|
||||
@Data
|
||||
public class DataSQLBotDatasetVO implements Serializable {
|
||||
|
||||
private Long tableId;
|
||||
private String tableId;
|
||||
|
||||
private String tableName;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user