Files
luos/resources/assets/js/home/XCase.vue

75 lines
1.7 KiB
Vue
Raw Normal View History

2020-12-04 13:33:23 +00:00
<template>
2021-01-21 19:24:52 +00:00
<div class="d-flex">
2020-12-04 13:33:23 +00:00
<iframe
:width="width"
ref="xIFrame"
frameborder="0"
:src="path"
:height="height"
allowfullscreen
2021-01-21 19:24:52 +00:00
@load="onLoadIframe"
2020-12-04 13:33:23 +00:00
></iframe>
2021-01-21 19:24:52 +00:00
<Debugger v-if="openDebug === true" :style="'height:' + height + 'px'" />
2020-12-04 13:33:23 +00:00
</div>
</template>
<script>
2021-01-21 19:24:52 +00:00
import Debugger from "../components/home/debugger/Debugger.vue";
import api from "../api/index";
2020-12-04 13:33:23 +00:00
export default {
name: "XCase",
2021-01-11 13:35:23 +00:00
components: {
Debugger,
},
2020-12-04 13:33:23 +00:00
props: {
data: Object,
},
mounted() {
2021-01-21 19:24:52 +00:00
let that = this;
2020-12-04 13:33:23 +00:00
this.height = window.innerHeight - this.diffHeight;
this.dataCase = this.$parent.dataCase;
2021-01-11 13:35:23 +00:00
if (this.dataCase.ACTION == "jump") {
this.path =
window.config.SYS_SERVER +
window.config.SYS_URI +
`cases/open?APP_NUMBER=${this.dataCase.APP_NUMBER}&action=${this.dataCase.ACTION}&actionFromList=${this.dataCase.ACTION_FROM_LIST}`;
} else {
this.path =
window.config.SYS_SERVER +
window.config.SYS_URI +
`cases/open?APP_UID=${this.dataCase.APP_UID}&DEL_INDEX=${this.dataCase.DEL_INDEX}&action=${this.dataCase.ACTION}`;
}
2021-01-21 19:24:52 +00:00
setTimeout(() => {
api.cases.debugStatus(this.dataCase).then((response) => {
if (response.data) {
that.openDebug = true;
}
});
}, 2000);
2020-12-04 13:33:23 +00:00
},
data() {
return {
2021-01-21 19:24:52 +00:00
openDebug: false,
dataCase: null,
2020-12-04 13:33:23 +00:00
height: "100%",
width: "100%",
diffHeight: 10,
path: "",
};
},
methods: {
classBtn(cls) {
return "btn v-btn-request " + cls;
},
2021-01-21 19:24:52 +00:00
onLoadIframe() {},
2020-12-04 13:33:23 +00:00
},
};
</script>
<style>
2021-01-21 19:24:52 +00:00
.debugger-inline-cont {
overflow: hidden;
}
2020-12-04 13:33:23 +00:00
</style>