农经大屏
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.5 KiB

  1. import BlockValue from '@/components/value/index.vue';
  2. import data from './data.js';
  3. import { fixedProjectAmountIndicator } from '../../../api/index.js';
  4. import { mapGetters } from 'vuex';
  5. export default {
  6. components: {
  7. BlockValue
  8. },
  9. computed: {
  10. ...mapGetters(['year', 'deptId'])
  11. },
  12. watch: {
  13. year: {
  14. handler () {
  15. this.getData();
  16. },
  17. immediate: true, // 立即执行
  18. },
  19. deptId: {
  20. handler () {
  21. this.getData();
  22. },
  23. immediate: true, // 立即执行
  24. }
  25. },
  26. data () {
  27. return {
  28. data
  29. };
  30. },
  31. created () {
  32. },
  33. mounted () {
  34. },
  35. methods: {
  36. getData () {
  37. if (this.year, this.deptId) {
  38. this.isLoad = false;
  39. fixedProjectAmountIndicator(this.deptId, this.year).then(res => {
  40. this.data[0][1].value = res.data.jysr; // 经营收入
  41. this.data[0][2].value = res.data.tzsy; // 投资收益
  42. this.data[0][3].value = res.data.bzsr; // 补助收入
  43. this.data[0][4].value = res.data.qtsr; // 补助收入
  44. this.data[1][0].value = res.data.jyzc; // 经营支出
  45. this.data[1][1].value = res.data.sjjfj; // 税金及附加
  46. this.data[1][2].value = res.data.glfy; // 管理费用
  47. this.data[1][3].value = res.data.gyzc; // 公益支出
  48. this.data[1][4].value = res.data.qtzc; // 其他支出
  49. this.data[1][5].value = res.data.sdsfy; // 所得税费用
  50. this.isLoad = true;
  51. })
  52. }
  53. }
  54. }
  55. };