预算填报页面添加字段

This commit is contained in:
2026-03-09 15:35:58 +08:00
parent 418c29095b
commit d379d7bb5b
2 changed files with 13 additions and 6 deletions

View File

@@ -17,7 +17,7 @@
grid-template-columns:416px 1192px;
">
<indicatorCalendar :timeType="timeType" :calendarObj='calendarObj'/>
<indicatorDetails :timeType="timeType" @updateLeft='getData'/>
<indicatorDetails :timeType="timeType" @updateLeft='getData' @updateLevel='getLevel'/>
</div>
</div>
<!-- <div class="top" style="margin-top: -20px; display: flex; gap: 16px">
@@ -79,7 +79,8 @@ export default {
selectDate:{},
monthData: {},
ytdData: {},
calendarObj:{}
calendarObj:{},
levelId: null
};
},
@@ -145,20 +146,25 @@ export default {
this.beilv = _this.clientWidth / 1920;
})();
};
this.getData()
// this.getData()
},
methods: {
getData() {
if(this.timeType == 'month'){
getCalendar().then((res) => {
getCalendar({levelId: this.levelId}).then((res) => {
this.calendarObj = res.data
})
}else{
getCalendarYear().then((res) => {
getCalendarYear({levelId: this.levelId}).then((res) => {
this.calendarObj = res.data
})
}
},
// 层级变动
getLevel(id) {
this.levelId = id
this.getData()
},
handleTimeChange(obj) {
console.log(obj, 'obj');
this.timeType = obj

View File

@@ -313,7 +313,7 @@ export default {
// 清空并重新请求数据,恢复原始状态
this.$nextTick(() => {
this.tableData = [];
this.getData();
this.getDataPage();
});
this.$modal.msgSuccess("保存成功");
}).catch(() => { });
@@ -328,6 +328,7 @@ export default {
getLevelStruc().then((res) => {
this.levelLList = res.data || [];
this.form.levelId = this.levelLList[0].id;
this.$emit('updateLevel', this.levelLList[0].id)
this.getDataPage()
}).catch(err => {
console.error('获取所属层级失败:', err);