jhprjv2/ruoyi-ui/src/views/project/costOutput/costYear.vue

46 lines
1.3 KiB
Vue
Raw Normal View History

2023-08-30 00:45:08 +08:00
<template>
<div class="cost-year" style="border:solid 1px #409eff;margin: 12px 0px;padding: 12px 12px 0px;position: relative;">
<el-button size="small" type="primary" style="position: absolute;top:10px;right:12px;">增加年份</el-button>
<el-tabs v-model="activeName">
<el-tab-pane v-for="(it,idx) in yearInv" :label="''+it.year" :name="''+it.year" :key="idx">
<el-form-item label="年度投资" class="w400">
<el-input-number :precision="4" v-model="it.money" placeholder="年度投资">
</el-input-number>
<span class="sp-unit">万元</span>
</el-form-item>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
export default {
name: 'RuoyiUiCostYear',
data() {
return {
activeName:'',
yearInv:[]
};
},
mounted() {
},
methods: {
init(d){
this.yearInv=d;
if(d.filter(it=>it.year==new Date().getFullYear()).length>0){
this.activeName=""+new Date().getFullYear()
}else{
this.activeName=""+d.year;
}
}
},
};
</script>
<style lang="scss" scoped>
</style>