|
@@ -228,7 +228,7 @@ const themeConfigCpt = computed(() => {
|
|
|
if (v.isMain == 1) {
|
|
|
state.chartData.layout = v.chartLayout
|
|
|
res.main = {
|
|
|
- type: v.type,
|
|
|
+ __type: v.type,
|
|
|
indexTableName: v.indexTableName,
|
|
|
indexId: v.indexId,
|
|
|
indexStyle: v.indexStyle ? JSON.parse(v.indexStyle) : '',
|
|
@@ -241,7 +241,7 @@ const themeConfigCpt = computed(() => {
|
|
|
weight: v.weight || 100,
|
|
|
num: 0,
|
|
|
name: v.indexNameShort,
|
|
|
- type: v.type,
|
|
|
+ __type: v.type,
|
|
|
indexTableName: v.indexTableName,
|
|
|
indexId: v.indexId,
|
|
|
searchParam: getSearchParam(v),
|
|
@@ -254,7 +254,7 @@ const themeConfigCpt = computed(() => {
|
|
|
weight: v.weight,
|
|
|
num: 0,
|
|
|
name: v.indexNameShort,
|
|
|
- type: v.type,
|
|
|
+ __type: v.type,
|
|
|
indexTableName: v.indexTableName,
|
|
|
indexId: v.indexId,
|
|
|
searchParam: getSearchParam(v),
|
|
@@ -263,7 +263,7 @@ const themeConfigCpt = computed(() => {
|
|
|
res.chart.edges.push({source: String(v.relateIndexId), target: String(v.id), labelText: v.description || '关系描述'})
|
|
|
} else {
|
|
|
res.tabs.set(v.indexTableName, {
|
|
|
- type: v.type,
|
|
|
+ __type: v.type,
|
|
|
indexName: v.indexName,
|
|
|
indexTableName: v.indexTableName,
|
|
|
indexId: v.indexId,
|
|
@@ -362,6 +362,7 @@ const initWS = () => {
|
|
|
lastMainParams = ''
|
|
|
}
|
|
|
const params = {
|
|
|
+ __type: themeConfigCpt.value.main.__type,
|
|
|
pageNumber: 1,
|
|
|
pageSize: 1,
|
|
|
type: 'list-fix',
|
|
@@ -394,6 +395,7 @@ const initWS = () => {
|
|
|
lastTabParams = ''
|
|
|
}
|
|
|
const params = {
|
|
|
+ __type: themeConfigCpt.value.tabs.get(state.activeTab).__type,
|
|
|
pageNumber: state.tabTable.page.pageNum,
|
|
|
pageSize: state.tabTable.page.pageSize,
|
|
|
type: 'list-fix',
|
|
@@ -456,6 +458,7 @@ const initWS = () => {
|
|
|
lastChartPageParams = ''
|
|
|
}
|
|
|
const params = {
|
|
|
+ __type: themeConfigCpt.value.chart.nodes.filter(v => v.id == state.chartTable.chartId)[0].__type,
|
|
|
pageNumber: state.chartTable.page.pageNum,
|
|
|
pageSize: state.chartTable.page.pageSize,
|
|
|
type: 'list-fix',
|
|
@@ -482,6 +485,10 @@ const initWS = () => {
|
|
|
ws.onmessage = (e) => {
|
|
|
try {
|
|
|
const json = JSON.parse(e.data)
|
|
|
+ if (json.respCode == -1) {
|
|
|
+ ElMessage.error(json.respMsg)
|
|
|
+ return
|
|
|
+ }
|
|
|
if (json.type === 'session') {
|
|
|
sessionId = json.sessionId
|
|
|
// 左侧
|
|
@@ -503,8 +510,13 @@ const initWS = () => {
|
|
|
const pTab = JSON.parse(lastTabParams)
|
|
|
// 返回为最新批次的
|
|
|
if (json.timestamp == pTab.timestamp) {
|
|
|
- state.tabTable.result.data = json.datas
|
|
|
- state.tabTable.result.total = json.records
|
|
|
+ if (pTab.__type === 'inner_index') {
|
|
|
+ state.tabTable.result.data = json.datas
|
|
|
+ state.tabTable.result.total = json.records
|
|
|
+ } else {
|
|
|
+ state.tabTable.result.data = json.datas.data
|
|
|
+ state.tabTable.result.total = json.datas.pathForm.total
|
|
|
+ }
|
|
|
state.tabTable.loading = false
|
|
|
lastTabParams = ''
|
|
|
}
|
|
@@ -513,8 +525,13 @@ const initWS = () => {
|
|
|
const pChartPage = JSON.parse(lastChartPageParams)
|
|
|
// 返回为最新批次的
|
|
|
if (json.timestamp == pChartPage.timestamp) {
|
|
|
- state.chartTable.result.data = json.datas
|
|
|
- state.chartTable.result.total = json.records
|
|
|
+ if (pChartPage.__type === 'inner_index') {
|
|
|
+ state.chartTable.result.data = json.datas
|
|
|
+ state.chartTable.result.total = json.records
|
|
|
+ } else {
|
|
|
+ state.chartTable.result.data = json.datas.data
|
|
|
+ state.chartTable.result.total = json.datas.pathForm.total
|
|
|
+ }
|
|
|
state.chartTable.loading = false
|
|
|
lastChartPageParams = ''
|
|
|
}
|
|
@@ -528,7 +545,7 @@ const initWS = () => {
|
|
|
const obj = {
|
|
|
edges: [...themeConfigCpt.value.chart.edges],
|
|
|
nodes: themeConfigCpt.value.chart.nodes.map(v => {
|
|
|
- if (v.type === 'inner_index') {
|
|
|
+ if (v.__type === 'inner_index') {
|
|
|
v.num = json.datas.filter(s => s.indexCode === v.indexTableName)?.[0]?.data || 0
|
|
|
} else {
|
|
|
v.num = json.datas.filter(s => s.serviceId === v.indexId)?.[0]?.data || 0
|