diff --git a/src/views/capital/api/index.js b/src/views/capital/api/index.js index b17980a..b5a625a 100644 --- a/src/views/capital/api/index.js +++ b/src/views/capital/api/index.js @@ -157,3 +157,17 @@ export function rankingOfLargeFundExpenditureWarning (deptId, year) { params: query }) } + +// 资金一张图-预警分析-右下-资金往来不规范预警排名 +export function rankingOfNonStandardFundTransactionsWarning (deptId, year, type) { + let query = { + deptId, + year, + type + } + return request({ + url: 'api/home/xixia/financeWarning/zjwlbgfyjpm', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/views/capital/comps/right/bottom/2/index.html b/src/views/capital/comps/right/bottom/2/index.html index 3f2cfcf..b869f32 100644 --- a/src/views/capital/comps/right/bottom/2/index.html +++ b/src/views/capital/comps/right/bottom/2/index.html @@ -1,11 +1,16 @@ - +
- +
\ No newline at end of file diff --git a/src/views/capital/comps/right/bottom/2/index.js b/src/views/capital/comps/right/bottom/2/index.js index 75f36de..4630124 100644 --- a/src/views/capital/comps/right/bottom/2/index.js +++ b/src/views/capital/comps/right/bottom/2/index.js @@ -1,14 +1,34 @@ import Pannel from '@/components/pannel/index.vue'; import ScrollTable from '@/components/scroll-table/index.vue'; import PannelTabs from '@/components/pannel-tabs/index.vue'; +import { rankingOfNonStandardFundTransactionsWarning } from '../../../../api/index.js'; +import { mapGetters } from 'vuex'; export default { components: { PannelTabs, ScrollTable, Pannel }, + computed: { + ...mapGetters(['year', 'deptId']) + }, + watch: { + year: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + }, + deptId: { + handler () { + this.getData(); + }, + immediate: true, // 立即执行 + } + }, data () { return { + data: [], pannelTabsData: [ { id: '1', @@ -20,6 +40,7 @@ export default { } ], tabIndex: '1', + isLoad: false, headers: ['部门名称', '支出金额', '排名'] }; }, @@ -28,8 +49,21 @@ export default { mounted () { }, methods: { + getData () { + if (this.year, this.deptId) { + this.isLoad = false; + rankingOfNonStandardFundTransactionsWarning(this.deptId, this.year, this.tabIndex).then(res => { + let data = res.rows.map(item => { + return [item.name, item.value, item.index] + }) + this.data = data; + this.isLoad = true; + }) + } + }, tabChange (info) { this.tabIndex = info.id + this.getData() } } }; diff --git a/src/views/capital/comps/right/top/2/index.js b/src/views/capital/comps/right/top/2/index.js index 5e9689f..647dea1 100644 --- a/src/views/capital/comps/right/top/2/index.js +++ b/src/views/capital/comps/right/top/2/index.js @@ -39,7 +39,6 @@ export default { if (this.year, this.deptId) { this.isLoad = false; rankingOfLargeFundExpenditureWarning(this.deptId, this.year).then(res => { - console.log(1111, res); let data = res.rows.map(item => { return [item.name, item.value, item.index] })