|
@@ -1,109 +1,110 @@
|
|
|
<script>
|
|
|
import CoreData from "@/components/common/coreData.vue";
|
|
|
-import InvestDistributeChart from "@/components/dashboard/portrait/money/investDistributeChart.vue";
|
|
|
-import InvestYearChart from "@/components/dashboard/portrait/money/investYearChart.vue";
|
|
|
+import InvestCategoryNum from "@/components/dashboard/portrait/money/investCategoryNum.vue";
|
|
|
import api from "@/api/dashboard/apiDashboard";
|
|
|
|
|
|
export default {
|
|
|
- data() {
|
|
|
- let range = this.$util.dateUtil.getNearlyMonthRange();
|
|
|
- return {
|
|
|
- queryData: {
|
|
|
- companyId: '0',
|
|
|
- deptId: '0',
|
|
|
- timeRange: range
|
|
|
- },
|
|
|
- coreData: [
|
|
|
- {
|
|
|
- type: 0,
|
|
|
- title: '年度投资总额(万元)',
|
|
|
- num: 0,
|
|
|
- historyDesc: '同比',
|
|
|
- historyNum: '0'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 0,
|
|
|
- title: '资产总额(万元)',
|
|
|
- num: 0,
|
|
|
- historyDesc: '同比',
|
|
|
- historyNum: '0'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 0,
|
|
|
- title: '人均资产总额(万元)',
|
|
|
- num: 0,
|
|
|
- historyDesc: '同比',
|
|
|
- historyNum: '0'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 0,
|
|
|
- title: '资产平均使用年限(年)',
|
|
|
- num: 0,
|
|
|
- historyDesc: '同比',
|
|
|
- historyNum: '0'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 1,
|
|
|
- showStar: true,
|
|
|
- title: '值得关注',
|
|
|
- content: ''
|
|
|
- },
|
|
|
- ]
|
|
|
- }
|
|
|
- },
|
|
|
- props: {
|
|
|
- chartHeight: Number
|
|
|
- },
|
|
|
- components: {
|
|
|
- CoreData,
|
|
|
- InvestDistributeChart,
|
|
|
- InvestYearChart,
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- this.init();
|
|
|
- },
|
|
|
- methods: {
|
|
|
- init() {
|
|
|
- this.getCoreData();
|
|
|
+ data() {
|
|
|
+ let range = this.$util.dateUtil.getNearlyMonthRange();
|
|
|
+ return {
|
|
|
+ queryData: {
|
|
|
+ companyId: '0',
|
|
|
+ deptId: '0',
|
|
|
+ timeRange: range
|
|
|
+ },
|
|
|
+ coreData: [
|
|
|
+ {
|
|
|
+ type: 0,
|
|
|
+ title: '固定资产总数量(件)',
|
|
|
+ num: 0,
|
|
|
+ historyDesc: '同比',
|
|
|
+ historyNum: '0'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 0,
|
|
|
+ title: '今年维修预算(万元)',
|
|
|
+ num: 0,
|
|
|
+ historyDesc: '同比',
|
|
|
+ historyNum: '0'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 0,
|
|
|
+ title: '今年维修固定资产(件)',
|
|
|
+ num: 0,
|
|
|
+ historyDesc: '同比',
|
|
|
+ historyNum: '0'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 0,
|
|
|
+ title: '今年报废固定资产(件)',
|
|
|
+ num: 0,
|
|
|
+ historyDesc: '同比',
|
|
|
+ historyNum: '0'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 1,
|
|
|
+ showStar: true,
|
|
|
+ title: '值得关注',
|
|
|
+ content: ''
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ }
|
|
|
},
|
|
|
- getCoreData() {
|
|
|
- api.getMoneyCoreData(this.queryData).then(res => {
|
|
|
- this.coreData[0].num = res.list[0].value
|
|
|
- this.coreData[0].historyNum = res.list[0].compare
|
|
|
- this.coreData[1].num = res.list[1].value
|
|
|
- this.coreData[1].historyNum = res.list[1].compare
|
|
|
- this.coreData[2].num = res.list[2].value
|
|
|
- this.coreData[2].historyNum = res.list[2].compare
|
|
|
- this.coreData[3].num = res.list[3].value
|
|
|
- this.coreData[3].historyNum = res.list[3].compare
|
|
|
- this.coreData[4].content = res.worthAttention
|
|
|
- })
|
|
|
+ props: {
|
|
|
+ chartHeight: Number
|
|
|
},
|
|
|
- getTrendData() {
|
|
|
+ components: {
|
|
|
+ CoreData,
|
|
|
+ InvestCategoryNum,
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init() {
|
|
|
+ this.getCoreData();
|
|
|
+ },
|
|
|
+ getCoreData() {
|
|
|
+ api.getMoneyCoreData(this.queryData).then(res => {
|
|
|
+ this.coreData[0].num = res.list[0].value
|
|
|
+ this.coreData[0].historyNum = res.list[0].compare
|
|
|
+ this.coreData[1].num = res.list[1].value
|
|
|
+ this.coreData[1].historyNum = res.list[1].compare
|
|
|
+ this.coreData[2].num = res.list[2].value
|
|
|
+ this.coreData[2].historyNum = res.list[2].compare
|
|
|
+ this.coreData[3].num = res.list[3].value
|
|
|
+ this.coreData[3].historyNum = res.list[3].compare
|
|
|
+ this.coreData[4].content = res.worthAttention
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getTrendData() {
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
- <div class="supermarketPortrait">
|
|
|
- <div class="portrait-coreData">
|
|
|
- <CoreData :data-list="coreData"></CoreData>
|
|
|
- </div>
|
|
|
- <div style="padding: 15px">
|
|
|
- <a-row>
|
|
|
- <a-col :span="12">
|
|
|
- <div class="supermarketPortrait-title">投资分布</div>
|
|
|
- <InvestDistributeChart :height="chartHeight-50" :query-data="queryData"></InvestDistributeChart>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <div class="supermarketPortrait-title">资产年限</div>
|
|
|
- <InvestYearChart :height="chartHeight-50" :query-data="queryData"></InvestYearChart>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
+ <div class="supermarketPortrait">
|
|
|
+ <div class="portrait-coreData">
|
|
|
+ <CoreData :data-list="coreData"></CoreData>
|
|
|
+ </div>
|
|
|
+ <div style="padding: 15px">
|
|
|
+ <a-row>
|
|
|
+ <!--<a-col :span="12">-->
|
|
|
+ <!-- <div class="supermarketPortrait-title">投资分布</div>-->
|
|
|
+ <!-- <InvestDistributeChart :height="chartHeight-50" :query-data="queryData"></InvestDistributeChart>-->
|
|
|
+ <!--</a-col>-->
|
|
|
+ <!--<a-col :span="12">-->
|
|
|
+ <!-- <div class="supermarketPortrait-title">资产年限</div>-->
|
|
|
+ <!-- <InvestYearChart :height="chartHeight-50" :query-data="queryData"></InvestYearChart>-->
|
|
|
+ <!--</a-col>-->
|
|
|
+ <a-col>
|
|
|
+ <InvestCategoryNum :height="chartHeight" :query-data="queryData" ></InvestCategoryNum>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
</template>
|
|
|
|
|
|
<style lang="less" scoped>
|