Commit 1fcb2f54 authored by wanli's avatar wanli

🐞 fix(资源监视器前端): 修复前端显示当前页面图片列表问题

parent 1d83faad
......@@ -48,6 +48,14 @@
<el-form-item label="资源监控报告">
<el-button size="mini" @click="getReport">导出报告</el-button>
</el-form-item>
<el-form-item label="页面图片显示设置">
<el-switch
v-model="pngShowMode"
active-text="自动显示当前页面"
inactive-text="手动选择页面"
>
</el-switch>
</el-form-item>
</el-form>
</div>
</grid-item>
......@@ -508,6 +516,7 @@ export default {
lvglList: [],
image: {},
imageList: [],
pngShowMode: true,
currentPngList: [],
socket: null,
form: {
......@@ -546,7 +555,8 @@ export default {
},
methods: {
onTableRowClick(row) {
this.pngList = this.currentPngList[row.uri]
this.pngShowMode = false;
this.pngList = this.currentPngList[row.uri];
},
getTemplate() {
getTemplate()
......@@ -804,7 +814,7 @@ export default {
this.$store.dispatch("user/removeRole");
this.$store.dispatch("user/removeToken");
// this.$router.push("/login?action=refresh");
wsNotify.$emit("reconnect")
wsNotify.$emit("reconnect");
}
if (msg.type !== "report" || !msg.imei) return null;
......@@ -833,13 +843,13 @@ export default {
}
this.globalData = msg;
deepClone(msg).image.forEach(item => {
deepClone(msg).image.forEach((item) => {
if (item.png_detail && item.png_detail.length) {
this.currentPngList[item.uri] = item.png_detail
this.currentPngList[item.uri] = item.png_detail;
} else {
this.currentPngList[item.uri] = []
this.currentPngList[item.uri] = [];
}
})
});
this.resetData(m);
},
processData(msg) {
......@@ -917,9 +927,6 @@ export default {
item.highlight = false;
}
if (item.png_detail && item.png_detail.length)
this.pngList = item.png_detail;
const target = this.imageList.find((img) => img.uri === item.uri);
if (target) {
target.length = item.length;
......@@ -931,6 +938,7 @@ export default {
) {
target.highlight = true;
target.png_uncompressed_size = item.png_uncompressed_size;
if (this.pngShowMode) this.pngList = item.png_detail || [];
}
if (
item.png_file_size &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment