Bläddra i källkod

资源图标对接完成

dev
yuzongping 10 timmar sedan
förälder
incheckning
e435508b98
3 ändrade filer med 48 tillägg och 4 borttagningar
  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 Visa fil

@@ -141,4 +141,17 @@ export function Rankinganalysisofstandardcontractmanagement (deptId, year) {
method: 'get',
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 Visa fil

@@ -1,9 +1,28 @@
import BlockValue from '@/components/value/index.vue';
import data from './data.js';
import { Resources } from '../../../api/index.js'
import { mapGetters } from 'vuex'
export default {
components: {
BlockValue
},
computed: {
...mapGetters(['year', 'deptId'])
},
watch: {
year: {
handler () {
this.getData();
},
immediate: true, // 立即执行
},
deptId: {
handler () {
this.getData();
},
immediate: true, // 立即执行
}
},
data () {
return {
data
@@ -14,5 +33,21 @@ export default {
mounted () {
},
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 Visa fil

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


Laddar…
Avbryt
Spara