Update AI assistant
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// export const ip = 'http://localhost:57966'
|
||||
export const ip = 'http://localhost:57966'
|
||||
export const ip = 'http://localhost:10050'
|
||||
// export const ip = 'http://10.81.128.42:8011'
|
||||
// export const ip = 'http://10.81.128.42:8011'
|
||||
// export const ip = 'http://124.220.15.242:8154' // AP
|
||||
|
||||
@@ -116,7 +116,7 @@ export default {
|
||||
this.collapsed = !this.collapsed
|
||||
this.$nextTick(() => {
|
||||
this.keepInViewport()
|
||||
this.resizeCharts()
|
||||
this.resizeChartsAfterLayout()
|
||||
})
|
||||
},
|
||||
toggleSize() {
|
||||
@@ -125,7 +125,7 @@ export default {
|
||||
this.size = sizes[(index + 1) % sizes.length]
|
||||
this.$nextTick(() => {
|
||||
this.keepInViewport()
|
||||
this.resizeCharts()
|
||||
this.resizeChartsAfterLayout()
|
||||
})
|
||||
},
|
||||
clearMessages() {
|
||||
@@ -156,9 +156,9 @@ export default {
|
||||
},
|
||||
getPanelSize() {
|
||||
const sizes = {
|
||||
small: { width: 360, height: 460 },
|
||||
medium: { width: 440, height: 580 },
|
||||
large: { width: 760, height: 700 }
|
||||
small: { width: 520, height: 560 },
|
||||
medium: { width: 720, height: 680 },
|
||||
large: { width: 960, height: 780 }
|
||||
}
|
||||
return this.collapsed ? { width: 56, height: 48 } : sizes[this.size] || sizes.medium
|
||||
},
|
||||
@@ -169,7 +169,7 @@ export default {
|
||||
},
|
||||
handleResize() {
|
||||
this.keepInViewport()
|
||||
this.resizeCharts()
|
||||
this.resizeChartsAfterLayout()
|
||||
},
|
||||
scrollToBottom() {
|
||||
this.$nextTick(() => {
|
||||
@@ -231,6 +231,10 @@ export default {
|
||||
if (!Array.isArray(actions)) return
|
||||
actions.forEach(action => {
|
||||
if (!action || action.type !== 'navigate' || !action.path) return
|
||||
if (action.url) {
|
||||
window.location.href = action.url
|
||||
return
|
||||
}
|
||||
this.$router.push({ path: action.path }).catch(() => {})
|
||||
})
|
||||
},
|
||||
@@ -244,11 +248,19 @@ export default {
|
||||
instance.setOption(chart.option)
|
||||
this.chartInstances[chart.id] = instance
|
||||
})
|
||||
this.resizeChartsAfterLayout()
|
||||
},
|
||||
resizeCharts() {
|
||||
Object.keys(this.chartInstances).forEach(key => {
|
||||
this.chartInstances[key].resize()
|
||||
})
|
||||
},
|
||||
resizeChartsAfterLayout() {
|
||||
this.$nextTick(() => {
|
||||
this.resizeCharts()
|
||||
window.setTimeout(this.resizeCharts, 80)
|
||||
window.setTimeout(this.resizeCharts, 220)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -266,18 +278,18 @@ export default {
|
||||
transition: width .18s ease, height .18s ease, box-shadow .18s ease;
|
||||
|
||||
&.is-small {
|
||||
width: 360px;
|
||||
height: 460px;
|
||||
width: 520px;
|
||||
height: 560px;
|
||||
}
|
||||
|
||||
&.is-medium {
|
||||
width: 440px;
|
||||
height: 580px;
|
||||
width: 720px;
|
||||
height: 680px;
|
||||
}
|
||||
|
||||
&.is-large {
|
||||
width: 760px;
|
||||
height: 700px;
|
||||
width: 960px;
|
||||
height: 780px;
|
||||
}
|
||||
|
||||
&.is-collapsed {
|
||||
@@ -402,14 +414,57 @@ export default {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ai-chart-wrap {
|
||||
margin: 10px 0;
|
||||
border: 1px solid #ebeef5;
|
||||
.ai-detail-table-wrap {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
margin: 6px 0 12px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.ai-detail-table {
|
||||
width: 100%;
|
||||
min-width: 704px;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
background: #fff;
|
||||
color: #303133;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.ai-detail-table th,
|
||||
.ai-detail-table td {
|
||||
border: 1px solid #d8dee9;
|
||||
padding: 6px 8px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
line-height: 18px;
|
||||
word-break: break-word;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.ai-detail-table th {
|
||||
background: #eef3fb;
|
||||
color: #4b5563;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ai-detail-table .ai-status-ng {
|
||||
color: #ff0000;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ai-chart-wrap {
|
||||
margin: 12px 0;
|
||||
padding: 10px;
|
||||
border: 1px solid #d8dee9;
|
||||
border-radius: 6px;
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 8px rgba(31, 41, 55, 0.06);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ai-chart {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
height: 340px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user