|
@@ -28,15 +28,16 @@
|
|
|
<div class='flex-child-average full-width flex flex-col flex-justify-start'>
|
|
<div class='flex-child-average full-width flex flex-col flex-justify-start'>
|
|
|
<div class="flex flex-center flex-justify-between">
|
|
<div class="flex flex-center flex-justify-between">
|
|
|
<span class='font-16 bold full-width text-left '>投资数据统计 单位(亿元)</span>
|
|
<span class='font-16 bold full-width text-left '>投资数据统计 单位(亿元)</span>
|
|
|
- <div v-if="isAverage === false" class="flex flex-center red">
|
|
|
|
|
|
|
+ <div class="flex flex-center" :class='isAverage ? "red" :"blue" '>
|
|
|
<el-icon>
|
|
<el-icon>
|
|
|
<Warning/>
|
|
<Warning/>
|
|
|
</el-icon>
|
|
</el-icon>
|
|
|
- <span class='full-width text-right ml-5 nowrap mr-20'>上月未完成平均投资指标</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>
|
|
</div>
|
|
|
<div class='full-width mt-10' style='background-color: #F7FAFD'>
|
|
<div class='full-width mt-10' style='background-color: #F7FAFD'>
|
|
|
- <chart :dept-id='dept' :quarter='yearType.value === 0 ? "":yearType ' :year="year"/>
|
|
|
|
|
|
|
+ <chart :dept-id='dept' :quarter='yearType.value === 0 ? "":yearType ' :year="year" @avg='avg'/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<span class='font-16 bold full-width text-left mt-20'>项目入库统计 单位(个)</span>
|
|
<span class='font-16 bold full-width text-left mt-20'>项目入库统计 单位(个)</span>
|
|
@@ -72,16 +73,16 @@ import amount from '@/views/invest/components/amount.vue'
|
|
|
import chart from '@/views/invest/components/chart.vue'
|
|
import chart from '@/views/invest/components/chart.vue'
|
|
|
import chart2 from '@/views/invest/components/chart2.vue'
|
|
import chart2 from '@/views/invest/components/chart2.vue'
|
|
|
import complete from '@/views/invest/components/complete.vue'
|
|
import complete from '@/views/invest/components/complete.vue'
|
|
|
-import {useStore} from '@/store/user.js'
|
|
|
|
|
|
|
+import { useStore } from '@/store/user.js'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'index',
|
|
name: 'index',
|
|
|
- components: {BasicContainer, left, years, amount, chart, chart2, complete},
|
|
|
|
|
- setup() {
|
|
|
|
|
|
|
+ components: { BasicContainer, left, years, amount, chart, chart2, complete },
|
|
|
|
|
+ setup () {
|
|
|
const user = useStore()
|
|
const user = useStore()
|
|
|
- return {user}
|
|
|
|
|
|
|
+ return { user }
|
|
|
},
|
|
},
|
|
|
- data() {
|
|
|
|
|
|
|
+ data () {
|
|
|
return {
|
|
return {
|
|
|
yearType: {
|
|
yearType: {
|
|
|
value: 0
|
|
value: 0
|
|
@@ -114,31 +115,35 @@ export default {
|
|
|
isAverage: true
|
|
isAverage: true
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- created() {
|
|
|
|
|
|
|
+ created () {
|
|
|
this.year = new Date().getFullYear()
|
|
this.year = new Date().getFullYear()
|
|
|
this.isBelowAverage()
|
|
this.isBelowAverage()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- changeDept(res) {
|
|
|
|
|
|
|
+ changeDept (res) {
|
|
|
if (res === null) {
|
|
if (res === null) {
|
|
|
this.dept = null
|
|
this.dept = null
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
this.dept = res.id
|
|
this.dept = res.id
|
|
|
},
|
|
},
|
|
|
- change(index) {
|
|
|
|
|
|
|
+ change (index) {
|
|
|
this.yearType = index
|
|
this.yearType = index
|
|
|
},
|
|
},
|
|
|
- yearSelect(res) {
|
|
|
|
|
|
|
+ yearSelect (res) {
|
|
|
this.year = res
|
|
this.year = res
|
|
|
},
|
|
},
|
|
|
- isBelowAverage() {
|
|
|
|
|
|
|
+ isBelowAverage () {
|
|
|
this.$api.invest.belowAverage().then(res => {
|
|
this.$api.invest.belowAverage().then(res => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
- this.isAverage = res.data
|
|
|
|
|
|
|
+ // this.isAverage = res.data
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ avg (res) {
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ this.isAverage = res
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|