|
|
@@ -1,55 +1,90 @@
|
|
|
<template>
|
|
|
- <div class='flex flex-center full-width'>
|
|
|
- <div class='ml-10 mr-10 mt-10 flex flex-align-start full-width'>
|
|
|
- <basic-container style='flex: 1;padding: 0' v-if='user.info.viewStage === 1'>
|
|
|
- <left @change='changeDept'/>
|
|
|
+ <div class="flex flex-center full-width">
|
|
|
+ <div class="ml-10 mr-10 mt-10 flex flex-align-start full-width">
|
|
|
+ <basic-container
|
|
|
+ style="flex: 1; padding: 0"
|
|
|
+ v-if="user.info.viewStage === 1"
|
|
|
+ >
|
|
|
+ <left @change="changeDept" />
|
|
|
</basic-container>
|
|
|
- <div class='full-width ml-5' style='flex:4;'>
|
|
|
- <basic-container class='full-width'>
|
|
|
+ <div class="full-width ml-5" style="flex: 4">
|
|
|
+ <basic-container class="full-width">
|
|
|
<div class="flex flex-align-start mb-15">
|
|
|
- <el-select v-model="year" clearable
|
|
|
- style="width: 15%"
|
|
|
- @change="yearSelect"
|
|
|
+ <el-select
|
|
|
+ v-model="year"
|
|
|
+ clearable
|
|
|
+ style="width: 15%"
|
|
|
+ @change="yearSelect"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in years"
|
|
|
- :key="item.value"
|
|
|
- :label="item.value"
|
|
|
- :value="item.value"
|
|
|
+ v-for="item in years"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.value"
|
|
|
+ :value="item.value"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <years :dept-id='dept' :year="year" @change='change'/>
|
|
|
+ <years :dept-id="dept" :year="year" @change="change" />
|
|
|
</div>
|
|
|
</basic-container>
|
|
|
<basic-container>
|
|
|
- <div class='flex '>
|
|
|
- <div class='flex-child-average full-width flex flex-col flex-justify-start'>
|
|
|
+ <div class="flex">
|
|
|
+ <div
|
|
|
+ class="flex-child-average full-width flex flex-col flex-justify-start"
|
|
|
+ >
|
|
|
<div class="flex flex-center flex-justify-between">
|
|
|
- <span class='font-16 bold full-width text-left '>投资数据统计 单位(亿元)</span>
|
|
|
- <div class="flex flex-center" :class='isAverage ? "red" :"blue" '>
|
|
|
+ <span class="font-16 bold full-width text-left"
|
|
|
+ >投资数据统计 单位(亿元)</span
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ class="flex flex-center"
|
|
|
+ :class="isAverage ? 'red' : 'blue'"
|
|
|
+ >
|
|
|
<el-icon>
|
|
|
- <Warning/>
|
|
|
+ <Warning />
|
|
|
</el-icon>
|
|
|
- <span class='full-width text-right ml-5 nowrap mr-20' v-if='isAverage'>上月未完成平均投资指标</span>
|
|
|
- <span class='full-width text-right ml-5 nowrap mr-20' v-else>上月已完成平均投资指标</span>
|
|
|
+ <span
|
|
|
+ class="full-width text-right ml-5 nowrap mr-20"
|
|
|
+ v-if="isAverage"
|
|
|
+ >上月未完成平均投资指标</span
|
|
|
+ >
|
|
|
+ <span class="full-width text-right ml-5 nowrap mr-20" v-else
|
|
|
+ >上月已完成平均投资指标</span
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class='full-width mt-10' style='background-color: #F7FAFD'>
|
|
|
- <chart :dept-id='dept' :quarter='yearType.value === 0 ? "":yearType ' :year="year" @avg='avg'/>
|
|
|
+ <div class="full-width mt-10" style="background-color: #f7fafd">
|
|
|
+ <chart
|
|
|
+ :dept-id="dept"
|
|
|
+ :quarter="yearType.value === 0 ? '' : yearType"
|
|
|
+ :year="year"
|
|
|
+ @avg="avg"
|
|
|
+ />
|
|
|
</div>
|
|
|
|
|
|
- <span class='font-16 bold full-width text-left mt-20'>项目入库统计 单位(个)</span>
|
|
|
- <div class='full-width mt-10' style='background-color: #F7FAFD'>
|
|
|
- <chart2 :dept-id='dept' :quarter='yearType.value === 0 || yearType === "0" ? "":yearType '
|
|
|
- :year="year"/>
|
|
|
+ <span class="font-16 bold full-width text-left mt-20"
|
|
|
+ >项目入库统计 单位(个)</span
|
|
|
+ >
|
|
|
+ <div class="full-width mt-10" style="background-color: #f7fafd">
|
|
|
+ <chart2
|
|
|
+ :dept-id="dept"
|
|
|
+ :quarter="
|
|
|
+ yearType.value === 0 || yearType === '0' ? '' : yearType
|
|
|
+ "
|
|
|
+ :year="year"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class='white-bg padding'></div>
|
|
|
- <div class='flex-child-average'>
|
|
|
- <amount v-if='dept===null && user.info.viewStage === 1' :type='yearType' :deptId='dept' :year="year"/>
|
|
|
- <complete v-else :type='yearType' :deptId='dept' :year="year"/>
|
|
|
+ <div class="white-bg padding"></div>
|
|
|
+ <div class="flex-child-average">
|
|
|
+ <amount
|
|
|
+ v-if="dept === null && user.info.viewStage === 1"
|
|
|
+ :type="yearType"
|
|
|
+ :deptId="dept"
|
|
|
+ :year="year"
|
|
|
+ />
|
|
|
+ <complete v-else :type="yearType" :deptId="dept" :year="year" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</basic-container>
|
|
|
@@ -78,11 +113,11 @@ import { useStore } from '@/store/user.js'
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
components: { BasicContainer, left, years, amount, chart, chart2, complete },
|
|
|
- setup () {
|
|
|
+ setup() {
|
|
|
const user = useStore()
|
|
|
return { user }
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
yearType: {
|
|
|
value: 0
|
|
|
@@ -115,32 +150,32 @@ export default {
|
|
|
isAverage: true
|
|
|
}
|
|
|
},
|
|
|
- created () {
|
|
|
+ created() {
|
|
|
this.year = new Date().getFullYear()
|
|
|
this.isBelowAverage()
|
|
|
},
|
|
|
methods: {
|
|
|
- changeDept (res) {
|
|
|
+ changeDept(res) {
|
|
|
if (res === null) {
|
|
|
this.dept = null
|
|
|
return
|
|
|
}
|
|
|
this.dept = res.id
|
|
|
},
|
|
|
- change (index) {
|
|
|
+ change(index) {
|
|
|
this.yearType = index
|
|
|
},
|
|
|
- yearSelect (res) {
|
|
|
+ yearSelect(res) {
|
|
|
this.year = res
|
|
|
},
|
|
|
- isBelowAverage () {
|
|
|
+ isBelowAverage() {
|
|
|
this.$api.invest.belowAverage().then(res => {
|
|
|
if (res.code === 200) {
|
|
|
// this.isAverage = res.data
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- avg (res) {
|
|
|
+ avg(res) {
|
|
|
console.log(res)
|
|
|
this.isAverage = res
|
|
|
}
|
|
|
@@ -148,6 +183,4 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
-
|
|
|
-</style>
|
|
|
+<style scoped></style>
|