预算填报页面添加字段

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

View File

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