农经大屏
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

53 wiersze
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. methods: {
  32. getData () {
  33. if (this.year, this.deptId) {
  34. this.isLoad = false;
  35. fixedProjectAmountIndicator(this.deptId, this.year).then(res => {
  36. this.data[0][1].value = res.data.jysr; // 经营收入
  37. this.data[0][2].value = res.data.tzsy; // 投资收益
  38. this.data[0][3].value = res.data.bzsr; // 补助收入
  39. this.data[0][4].value = res.data.qtsr; // 补助收入
  40. this.data[1][0].value = res.data.jyzc; // 经营支出
  41. this.data[1][1].value = res.data.sjjfj; // 税金及附加
  42. this.data[1][2].value = res.data.glfy; // 管理费用
  43. this.data[1][3].value = res.data.gyzc; // 公益支出
  44. this.data[1][4].value = res.data.qtzc; // 其他支出
  45. this.data[1][5].value = res.data.sdsfy; // 所得税费用
  46. this.isLoad = true;
  47. })
  48. }
  49. }
  50. }
  51. };