Przeglądaj źródła

资金支出排名

dev
yuzongping 15 godzin temu
rodzic
commit
d64cf094d8
4 zmienionych plików z 49 dodań i 5 usunięć
  1. +15
    -1
      src/views/capital/api/index.js
  2. +1
    -1
      src/views/capital/comps/right/bottom/1/index.html
  3. +33
    -1
      src/views/capital/comps/right/bottom/1/index.js
  4. +0
    -2
      src/views/capital/comps/right/middle/1/index.js

+ 15
- 1
src/views/capital/api/index.js Wyświetl plik

@@ -88,4 +88,18 @@ export function rankingOfFundIncome (deptId, year) {
method: 'get',
params: query
})
}
}

// 资金一张图-右下-资金支出排名
export function rankingOfCapitalExpenditure (deptId, year) {
let query = {
deptId,
year
}
return request({
url: 'api/home/xixia/finance/zjzhcpm',
method: 'get',
params: query
})
}


+ 1
- 1
src/views/capital/comps/right/bottom/1/index.html Wyświetl plik

@@ -1,3 +1,3 @@
<Pannel title="资金支出排名" height="340">
<ScrollTable></ScrollTable>
<ScrollTable v-if="isLoad" :data="data" :headers="['部门名称', '收入金额', '排名']"></ScrollTable>
</Pannel>

+ 33
- 1
src/views/capital/comps/right/bottom/1/index.js Wyświetl plik

@@ -1,19 +1,51 @@
import Pannel from '@/components/pannel/index.vue';
import ScrollTable from '@/components/scroll-table/index.vue';

import { rankingOfCapitalExpenditure } from '../../../../api/index.js';
import { mapGetters } from 'vuex';
export default {
components: {
ScrollTable,
Pannel
},
computed: {
...mapGetters(['year', 'deptId'])
},
watch: {
year: {
handler () {
this.getData();
},
immediate: true, // 立即执行
},
deptId: {
handler () {
this.getData();
},
immediate: true, // 立即执行
}
},
data () {
return {
isLoad: false
};
},
created () {
},
mounted () {

},
methods: {
getData () {
if (this.year, this.deptId) {
this.isLoad = false;
rankingOfCapitalExpenditure(this.deptId, this.year).then(res => {
let data = res.data.map(item => {
return [item.name, item.value, item.index]
})
this.data = data;
this.isLoad = true;
})
}
}
}
};

+ 0
- 2
src/views/capital/comps/right/middle/1/index.js Wyświetl plik

@@ -39,11 +39,9 @@ export default {
if (this.year, this.deptId) {
this.isLoad = false;
rankingOfFundIncome(this.deptId, this.year).then(res => {
console.log(res.data, 992);
let data = res.data.map(item => {
return [item.name, item.value, item.index]
})
console.log(data, 999);
this.data = data;
this.isLoad = true;
})


Ładowanie…
Anuluj
Zapisz