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

66 lines
1.2 KiB
Vue
Raw Normal View History

2023-04-26 14:23:45 +08:00
<template>
2023-06-19 11:18:33 +08:00
<div class="AppSensitive">
<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-06-19 11:18:33 +08:00
import List from "./components/List";
import Detail from "./components/Detail";
2023-04-26 14:23:45 +08:00
export default {
name: "AppSensitive",
2023-06-19 11:18:33 +08:00
label: "敏感词触发",
2023-04-26 14:23:45 +08:00
props: {
instance: Function,
dict: Object,
},
data() {
return {
2023-06-19 11:18:33 +08:00
component: "List",
params: {},
include: [],
};
2023-04-26 14:23:45 +08:00
},
2023-06-19 11:18:33 +08:00
components: {
Detail,
List,
2023-04-26 14:23:45 +08:00
},
methods: {
2023-06-19 11:18:33 +08:00
onChange(data) {
if (data.type === "Detail") {
this.component = "Detail";
this.params = data.params;
2023-04-26 14:23:45 +08:00
}
2023-06-19 11:18:33 +08:00
if (data.type === "List") {
this.component = "List";
this.params = data.params;
2023-04-26 14:23:45 +08:00
2023-06-19 11:18:33 +08:00
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getTableData();
}
});
2023-04-26 14:23:45 +08:00
}
},
},
2023-06-19 11:18:33 +08:00
};
2023-04-26 14:23:45 +08:00
</script>
2023-06-19 11:18:33 +08:00
<style lang="scss">
2023-04-26 14:23:45 +08:00
.AppSensitive {
height: 100%;
2023-06-19 11:18:33 +08:00
background: #f3f6f9;
overflow: auto;
2023-04-26 14:23:45 +08:00
}
</style>