diff --git a/src/api/date/chatbi.ts b/src/api/date/chatbi.ts new file mode 100644 index 0000000..3d3774e --- /dev/null +++ b/src/api/date/chatbi.ts @@ -0,0 +1,65 @@ +import request from '@/utils/request'; +import axios from 'axios'; +/** + * 获取设备生命周期系统的设备档案树 + */ +export function getDevicesTree() { + return request({ + url: "/aibot/devices/tree", + method: "get", + }); +} + + +export function getDevicesMonitors(data:{deviceCode:string,rows:number,page:number}) { + return axios.post( import.meta.env.VITE_APP_BASE_API+"/aibot/devices/ep_monitors",data); +} + +// 获取ChatBI列表 +export function getChatBIList() { + return request({ + url: '/aibot/chatbi/list', + method: 'get', + }); +} + +// 创建ChatBI +export function newChatBI(data: any) { + return request({ + url: '/aibot/chatbi/new', + method: 'post', + data: data + }); +} + +// 编辑ChatBI +export function editChatBI(data: any) { + return request({ + url: '/aibot/chatbi/edit', + method: 'post', + data: data + }); +} + +// 删除ChatBI +export function delChatBI(data: any) { + return request({ + url: '/aibot/chatbi/del', + method: 'post', + data: data + }); +} + +export interface askChatBIRequest { + user_query:string; + db_type?:string; + db_config?:Object; +} +// 调用chatbi +export function askChatBI(data: askChatBIRequest, mode:string) { + return request({ + url: '/aibot/chatbi/api?mode='+mode, + method: 'post', + data: data + }); +} \ No newline at end of file diff --git a/src/views/date/chatbi.vue b/src/views/date/chatbi.vue new file mode 100644 index 0000000..2dd1a92 --- /dev/null +++ b/src/views/date/chatbi.vue @@ -0,0 +1,156 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/views/date/chatbi_setting_panel.vue b/src/views/date/chatbi_setting_panel.vue new file mode 100644 index 0000000..ddc8db5 --- /dev/null +++ b/src/views/date/chatbi_setting_panel.vue @@ -0,0 +1,145 @@ + + + + + + + + + diff --git a/src/views/date/chatbit_ask_panel.vue b/src/views/date/chatbit_ask_panel.vue new file mode 100644 index 0000000..962f8cc --- /dev/null +++ b/src/views/date/chatbit_ask_panel.vue @@ -0,0 +1,352 @@ + + + + + + diff --git a/src/views/date/device_panel.vue b/src/views/date/device_panel.vue new file mode 100644 index 0000000..0a624eb --- /dev/null +++ b/src/views/date/device_panel.vue @@ -0,0 +1,119 @@ + + + + + + + + + + diff --git a/src/views/doc/spacePermission.vue b/src/views/doc/spacePermission.vue index b26ce10..37b79bf 100644 --- a/src/views/doc/spacePermission.vue +++ b/src/views/doc/spacePermission.vue @@ -256,7 +256,7 @@ function addNode(key:string,node:Tree){ } function checkNode(key:string,node:Tree):boolean{ - for (const ch of node.child||[]) { + for (const ch of node.child??[]) { if(ch.id==key){ return true }