|
@@ -107,7 +107,7 @@
|
|
</el-form>
|
|
</el-form>
|
|
<hc-card-item class="year-detail mt-3">
|
|
<hc-card-item class="year-detail mt-3">
|
|
<template #header>
|
|
<template #header>
|
|
- <el-select v-model="selectYear" class="select-year w-[100px]" placeholder="选择年份" @change="changeYear">
|
|
|
|
|
|
+ <el-select v-model="selectYear" class="select-year w-[100px]" placeholder="选择年份" :disabled="yearOptions.length <= 1" @change="changeYear">
|
|
<el-option v-for="(item) in yearOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
<el-option v-for="(item) in yearOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
@@ -321,8 +321,24 @@ const endYearBlur = () => {
|
|
selectYear.value = yearOptions.value[0].value
|
|
selectYear.value = yearOptions.value[0].value
|
|
}
|
|
}
|
|
//选择年份
|
|
//选择年份
|
|
-const selectIndex = ref(-1)
|
|
|
|
-const yearOptions = ref([])
|
|
|
|
|
|
+const selectIndex = ref(0)
|
|
|
|
+const yearOptions = ref([{
|
|
|
|
+ value: '',
|
|
|
|
+ label: '',
|
|
|
|
+ yearForm: {
|
|
|
|
+ yearlyInvest: '',
|
|
|
|
+ oneInvest: '',
|
|
|
|
+ twoInvest: '',
|
|
|
|
+ threeInvest: '',
|
|
|
|
+ fourInvest: '',
|
|
|
|
+ yearlyTarget: '',
|
|
|
|
+ onePlan: '',
|
|
|
|
+ twoPlan: '',
|
|
|
|
+ threePlan: '',
|
|
|
|
+ fourPlan: '',
|
|
|
|
+ planYear: '',
|
|
|
|
+ },
|
|
|
|
+}])
|
|
const selectYear = ref(null)
|
|
const selectYear = ref(null)
|
|
const changeYear = (val) => {
|
|
const changeYear = (val) => {
|
|
selectIndex.value = arrIndex(yearOptions.value, 'value', val)
|
|
selectIndex.value = arrIndex(yearOptions.value, 'value', val)
|