Files
dvcp_v2_webapp/packages/work/AppAssessment/AppAssessment.vue

67 lines
1.2 KiB
Vue
Raw Normal View History

2022-03-25 18:41:15 +08:00
<template>
2022-03-28 09:54:18 +08:00
<div class="doc-circulation ailist-wrapper">
<keep-alive :include="['List']">
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
</keep-alive>
</div>
2022-03-25 18:41:15 +08:00
</template>
<script>
2022-03-28 09:54:18 +08:00
import Statistics from './components/Statistics'
import List from './components/List'
2022-03-25 18:41:15 +08:00
export default {
name: 'AppAssessment',
2022-03-26 15:34:50 +08:00
label: '工作考核',
2022-03-28 09:54:18 +08:00
2022-03-25 18:41:15 +08:00
props: {
instance: Function,
dict: Object
},
2022-03-28 09:54:18 +08:00
data () {
2022-03-25 18:41:15 +08:00
return {
2022-03-28 09:54:18 +08:00
component: 'Statistics',
params: {},
include: []
2022-03-25 18:41:15 +08:00
}
},
2022-03-28 09:54:18 +08:00
components: {
Statistics,
List
2022-03-25 18:41:15 +08:00
},
2022-03-28 09:54:18 +08:00
mounted () {
2022-03-25 18:41:15 +08:00
},
methods: {
2022-03-28 09:54:18 +08:00
onChange (data) {
if (data.type === 'List') {
this.component = 'List'
this.params = data.params
}
2022-03-26 16:56:22 +08:00
2022-03-28 09:54:18 +08:00
if (data.type === 'Statistics') {
this.component = 'Statistics'
this.params = data.params
2022-03-25 18:41:15 +08:00
2022-03-28 09:54:18 +08:00
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList()
2022-03-25 18:41:15 +08:00
}
})
2022-03-28 09:54:18 +08:00
}
2022-03-25 18:41:15 +08:00
}
}
}
</script>
2022-03-28 09:54:18 +08:00
<style lang="scss">
.doc-circulation {
height: 100%;
background: #F3F6F9;
overflow: auto;
2022-03-25 18:41:15 +08:00
}
</style>