Files
dvcp_v2_webapp/project/pidu/app/AppSessionArchive/AppSessionArchive.vue

66 lines
1.2 KiB
Vue
Raw Normal View History

2023-04-26 14:23:45 +08:00
<template>
2023-04-26 16:16:46 +08:00
<div class="AppSessionArchive">
<keep-alive :include="['List']">
<component
ref="component"
:is="component"
@change="onChange"
:params="params"
:instance="instance"
:dict="dict"
></component>
</keep-alive>
</div>
2023-04-26 14:23:45 +08:00
</template>
<script>
2023-04-26 16:16:46 +08:00
import List from "./components/List";
import Detail from "./components/Detail";
2023-04-26 14:23:45 +08:00
export default {
2023-04-26 16:16:46 +08:00
name: "AppSessionArchive",
2023-04-26 14:23:45 +08:00
label: "会话存档",
props: {
instance: Function,
2023-04-26 16:16:46 +08:00
dict: Object,
2023-04-26 14:23:45 +08:00
},
data() {
return {
2023-04-26 16:16:46 +08:00
component: "List",
params: {},
include: [],
};
2023-04-26 14:23:45 +08:00
},
2023-04-26 16:16:46 +08:00
components: {
Detail,
List,
2023-04-26 14:23:45 +08:00
},
methods: {
2023-04-26 16:16:46 +08:00
onChange(data) {
if (data.type === "Detail") {
this.component = "Detail";
this.params = data.params;
2023-04-26 14:23:45 +08:00
}
2023-04-26 16:16:46 +08:00
if (data.type === "List") {
this.component = "List";
this.params = data.params;
2023-04-26 14:23:45 +08:00
2023-04-26 16:16:46 +08:00
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList();
2023-04-26 14:23:45 +08:00
}
2023-04-26 16:16:46 +08:00
});
2023-04-26 14:23:45 +08:00
}
},
2023-04-26 16:16:46 +08:00
},
};
2023-04-26 14:23:45 +08:00
</script>
2023-04-26 16:16:46 +08:00
<style lang="scss">
2023-04-26 14:23:45 +08:00
.AppSessionArchive {
2023-04-26 16:16:46 +08:00
height: 100%;
background: #f3f6f9;
overflow: auto;
2023-04-26 14:23:45 +08:00
}
</style>