|
|
@@ -3,87 +3,87 @@
|
|
|
<div class="full-width flex mt-10">
|
|
|
<el-col :span="4" v-if="hasChildrenDept">
|
|
|
<basic-container>
|
|
|
- <left :has-children="hasChildrenDept" @change="changeDept"/>
|
|
|
+ <left :has-children="hasChildrenDept" @change="changeDept" />
|
|
|
</basic-container>
|
|
|
</el-col>
|
|
|
<el-col :span="hasChildrenDept ? 20 : 24">
|
|
|
<basic-container>
|
|
|
<div class="flex flex-align-start">
|
|
|
<el-select
|
|
|
- v-model="year"
|
|
|
- clearable
|
|
|
- style="width: 15%"
|
|
|
- @change="yearSelect"
|
|
|
+ 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 class="mt-20">
|
|
|
- <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"
|
|
|
+ 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
|
|
|
+ >投资数据统计 单位(亿元)</span
|
|
|
>
|
|
|
<div
|
|
|
- class="flex flex-center"
|
|
|
- :class="isAverage ? 'green' : 'red'"
|
|
|
+ class="flex flex-center"
|
|
|
+ :class="isAverage ? 'green' : 'red'"
|
|
|
>
|
|
|
<el-icon>
|
|
|
- <Warning/>
|
|
|
+ <Warning />
|
|
|
</el-icon>
|
|
|
<span
|
|
|
- class="full-width text-right ml-5 nowrap mr-20"
|
|
|
- v-if="isAverage"
|
|
|
- >上月已完成平均投资指标</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
|
|
|
>
|
|
|
</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"
|
|
|
+ :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
|
|
|
+ >项目入库统计 单位(个)</span
|
|
|
>
|
|
|
<div class="full-width mt-10" style="background-color: #f7fafd">
|
|
|
<chart2
|
|
|
- :dept-id="dept"
|
|
|
- :quarter="
|
|
|
+ :dept-id="dept"
|
|
|
+ :quarter="
|
|
|
yearType.value === 0 || yearType === '0' ? '' : yearType
|
|
|
"
|
|
|
- :year="year"
|
|
|
+ :year="year"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="white-bg padding"></div>
|
|
|
<div class="flex-child-average">
|
|
|
<amount
|
|
|
- v-if="user.info.viewStage === 1 && dept === null"
|
|
|
- :type="yearType"
|
|
|
- :deptId="dept"
|
|
|
- :year="year"
|
|
|
+ v-if="user.info.viewStage === 1 && dept === null"
|
|
|
+ :type="yearType"
|
|
|
+ :deptId="dept"
|
|
|
+ :year="year"
|
|
|
/>
|
|
|
- <complete v-else :type="yearType" :deptId="dept" :year="year"/>
|
|
|
+ <complete v-else :type="yearType" :deptId="dept" :year="year" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</basic-container>
|
|
|
@@ -107,14 +107,14 @@ import amount from '@/views/invest/components/amount.vue'
|
|
|
import chart from '@/views/invest/components/chart.vue'
|
|
|
import chart2 from '@/views/invest/components/chart2.vue'
|
|
|
import complete from '@/views/invest/components/complete.vue'
|
|
|
-import {useStore} from '@/store/user.js'
|
|
|
+import { useStore } from '@/store/user.js'
|
|
|
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
- components: {BasicContainer, left, years, amount, chart, chart2, complete},
|
|
|
+ components: { BasicContainer, left, years, amount, chart, chart2, complete },
|
|
|
setup() {
|
|
|
const user = useStore()
|
|
|
- return {user}
|
|
|
+ return { user }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -152,19 +152,18 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.year = new Date().getFullYear()
|
|
|
- // this.isBelowAverage()
|
|
|
this.deptDetail()
|
|
|
},
|
|
|
methods: {
|
|
|
deptDetail() {
|
|
|
this.$api.system
|
|
|
- .getDeptDetail({id: this.user.info.deptId})
|
|
|
- .then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.hasChildrenDept = res.data.hasChildren
|
|
|
- this.dept = res.data.id
|
|
|
- }
|
|
|
- })
|
|
|
+ .getDeptDetail({ id: this.user.info.deptId })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.hasChildrenDept = res.data.hasChildren
|
|
|
+ this.dept = res.data.id
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
changeDept(res) {
|
|
|
if (res === null) {
|