|
- import BlockValue from '@/components/value/index.vue';
- import data from './data.js';
- import { fixedProjectAmountIndicator } from '../../../api/index.js';
- import { mapGetters } from 'vuex';
- export default {
- components: {
- BlockValue
- },
- computed: {
- ...mapGetters(['year', 'deptId'])
- },
- watch: {
- year: {
- handler () {
- this.getData();
- },
- immediate: true, // 立即执行
- },
- deptId: {
- handler () {
- this.getData();
- },
- immediate: true, // 立即执行
- }
- },
- data () {
- return {
- data
- };
- },
- created () {
- },
- mounted () {
- },
- methods: {
- getData () {
- if (this.year, this.deptId) {
- this.isLoad = false;
- fixedProjectAmountIndicator(this.deptId, this.year).then(res => {
- this.data[0][1].value = res.data.jysr; // 经营收入
- this.data[0][2].value = res.data.tzsy; // 投资收益
- this.data[0][3].value = res.data.bzsr; // 补助收入
- this.data[0][4].value = res.data.qtsr; // 补助收入
-
- this.data[1][0].value = res.data.jyzc; // 经营支出
- this.data[1][1].value = res.data.sjjfj; // 税金及附加
- this.data[1][2].value = res.data.glfy; // 管理费用
- this.data[1][3].value = res.data.gyzc; // 公益支出
- this.data[1][4].value = res.data.qtzc; // 其他支出
- this.data[1][5].value = res.data.sdsfy; // 所得税费用
- this.isLoad = true;
- })
- }
- }
- }
- };
|