Ver a proveniência

资源图标对接完成

dev
yuzongping há 1 dia
ascendente
cometimento
e435508b98
3 ficheiros alterados com 48 adições e 4 eliminações
  1. +13
    -0
      src/views/resources/api/index.js
  2. +35
    -0
      src/views/resources/comps/buttom/1/index.js
  3. +0
    -4
      src/views/resources/comps/right/bottom/1/index.js

+ 13
- 0
src/views/resources/api/index.js Ver ficheiro

@@ -141,4 +141,17 @@ export function Rankinganalysisofstandardcontractmanagement (deptId, year) {
method: 'get', method: 'get',
params: query params: query
}) })
}

// 资源一张图-中下-资源分析
export function Resources (deptId, year) {
let query = {
deptId,
year
}
return request({
url: 'api/home/xixia/resource/zyfx',
method: 'get',
params: query
})
} }

+ 35
- 0
src/views/resources/comps/buttom/1/index.js Ver ficheiro

@@ -1,9 +1,28 @@
import BlockValue from '@/components/value/index.vue'; import BlockValue from '@/components/value/index.vue';
import data from './data.js'; import data from './data.js';
import { Resources } from '../../../api/index.js'
import { mapGetters } from 'vuex'
export default { export default {
components: { components: {
BlockValue BlockValue
}, },
computed: {
...mapGetters(['year', 'deptId'])
},
watch: {
year: {
handler () {
this.getData();
},
immediate: true, // 立即执行
},
deptId: {
handler () {
this.getData();
},
immediate: true, // 立即执行
}
},
data () { data () {
return { return {
data data
@@ -14,5 +33,21 @@ export default {
mounted () { mounted () {
}, },
methods: { methods: {
getData () {
if (this.year, this.deptId) {
this.isLoad = false;
Resources(this.deptId, this.year).then(res => {
this.data[0][0].value = res.data.nyd
this.data[0][1].value = res.data.jsyd
this.data[0][2].value = res.data.wlydjlm
this.data[0][3].value = res.data.numWlydjlm
this.data[0][4].value = res.data.nyd
this.data[0][5].value = res.data.wlydjlm

this.data = data
this.isLoad = true;
})
}
},
} }
}; };

+ 0
- 4
src/views/resources/comps/right/bottom/1/index.js Ver ficheiro

@@ -31,10 +31,6 @@ export default {
headers: ['部门名称', '合同数量', '排名'] headers: ['部门名称', '合同数量', '排名']
}; };
}, },
created () {
},
mounted () {
},
methods: { methods: {
getData () { getData () {
if (this.year, this.deptId) { if (this.year, this.deptId) {


Carregando…
Cancelar
Guardar