|
- import { mapGetters } from 'vuex'
- export default {
- props: {
- data: {
- type: Object,
- default: function () {
- return {}
- }
- }
- },
- components: {
- },
- computed: {
- ...mapGetters(['year', 'deptId'])
- },
-
- watch: {
- // year: {
- // handler () {
- // this.getData();
- // },
- // immediate: true, // 立即执行
- // },
- // deptId: {
- // handler () {
- // this.getData();
- // },
- // immediate: true, // 立即执行
- // }
- },
- data () {
- return {
- };
- },
- created () {
- },
- mounted () {
- },
- methods: {
- getData () {
- if (this.year, this.deptId) {
- this.isLoad = false;
- // Resources(this.deptId, this.year).then(res => {
- // this.data[0][0].value = res.data.nyd
- // this.data[0][1].value = res.data.jsyd
- // this.data[0][2].value = res.data.wlydjlm
- // this.data[0][3].value = res.data.numNyd
- // this.data[0][4].value = res.data.numJsyd
- // this.data[0][5].value = res.data.numWlydjlm
- //
- // this.data = data
- // this.isLoad = true;
- // })
- }
- },
- }
- };
|