农经大屏
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.

54 lines
1.2 KiB

  1. import BlockValue from '@/components/value/index.vue';
  2. import data from './data.js';
  3. import { debtAnalysis } 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. debtAnalysis(this.deptId, this.year, this.type).then(res => {
  40. this.data[0][0].value = res.data.dqjk
  41. this.data[0][1].value = res.data.yfk
  42. this.data[0][2].value = res.data.yfgz
  43. this.data[1][0].value = res.data.yflwf
  44. this.data[1][1].value = res.data.cqjkjyfk
  45. this.data[1][2].value = res.data.ysyyzj
  46. this.data[1][3].value = res.data.zxyfk
  47. this.isLoad = true;
  48. })
  49. }
  50. }
  51. }
  52. };