|
|
@@ -34,10 +34,13 @@
|
|
|
<span class="card-title">内部数据</span>
|
|
|
</template>
|
|
|
<template v-slot:extra>
|
|
|
- <lay-button class="card-button" @click="handleDownData()">下载</lay-button>
|
|
|
+ <lay-button class="card-button" @click="handleReloadIframe()">刷新</lay-button>
|
|
|
+ <lay-button class="card-button" @click="handleOtherOpen()">站外打开</lay-button>
|
|
|
</template>
|
|
|
<template v-slot:body>
|
|
|
- <div class="card-body-wp">内部数据较大,请下载观看。</div>
|
|
|
+ <div class="card-body-wp">
|
|
|
+ <iframe class="chart" :src="robotRunData" frameborder="0"></iframe>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</lay-card>
|
|
|
|
|
|
@@ -110,6 +113,7 @@ let balanceList = ref([]);
|
|
|
let balanceChart = shallowRef();
|
|
|
let predictorChart = shallowRef();
|
|
|
let timer = ref();
|
|
|
+let robotRunData = ref();
|
|
|
|
|
|
// 获取机器人详情
|
|
|
const getRobotDetail = () => {
|
|
|
@@ -121,9 +125,11 @@ const getRobotDetail = () => {
|
|
|
robotDetail.value = data.data;
|
|
|
document.title = data.data.name;
|
|
|
getBalanceInfo(data.data.accId);
|
|
|
+ robotRunData.value = `https://4lapi.skyfffire.com/downloadDataFile?url=http://${robotDetail.value.serverIp}:3000/downloadDataFile?id=${robotDetail.value.id}`;
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
+
|
|
|
const getBalanceInfo = (id: number) => {
|
|
|
const params = { id: id };
|
|
|
pageConfig.balanceLoading = true;
|
|
|
@@ -251,7 +257,13 @@ timer.value = setInterval(() => {
|
|
|
|
|
|
getLogsInfo();
|
|
|
|
|
|
-const handleDownData = () => {
|
|
|
+const handleReloadIframe = () => {
|
|
|
+ robotRunData.value = ``;
|
|
|
+ setTimeout(() => {
|
|
|
+ robotRunData.value = `https://4lapi.skyfffire.com/downloadDataFile?url=http://${robotDetail.value.serverIp}:3000/downloadDataFile?id=${robotDetail.value.id}`; // 重新赋值
|
|
|
+ }, 0);
|
|
|
+};
|
|
|
+const handleOtherOpen = () => {
|
|
|
window.open(`https://4lapi.skyfffire.com/downloadDataFile?url=http://${robotDetail.value.serverIp}:3000/downloadDataFile?id=${robotDetail.value.id}`, "_blank");
|
|
|
};
|
|
|
|
|
|
@@ -267,8 +279,13 @@ onUnmounted(() => {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-.card-body-wp{
|
|
|
+.card-body-wp {
|
|
|
+ height: 1200px;
|
|
|
text-align: center;
|
|
|
+ .chart {
|
|
|
+ height: 100%;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
}
|
|
|
.card-button {
|
|
|
padding: 2px 18px;
|