驾驶舱报表&指标填报&接口添加loading
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<div style="width: 4px;height: 16px;background: #0B58FF;border-radius: 1px;margin-top: 10px;"></div>
|
||||
<el-form :inline="true" :model="form" class="demo-form-inline">
|
||||
<el-form-item label="所属层级">
|
||||
<el-select v-model="form.levelId" placeholder="请选择">
|
||||
<el-select v-model="form.levelId" placeholder="请选择" @change='handleLevelChange'>
|
||||
<el-option v-for="item in levelLList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
@@ -214,9 +214,10 @@ export default {
|
||||
// 清空并重新请求数据,恢复原始状态
|
||||
this.$nextTick(() => {
|
||||
this.tableData = [];
|
||||
this.getData();
|
||||
this.getDataPage();
|
||||
});
|
||||
this.$modal.msgSuccess("保存成功");
|
||||
this.$emit('updateLeft')
|
||||
}).catch(() => { });
|
||||
},
|
||||
// 取消编辑,恢复只读模式
|
||||
@@ -227,7 +228,7 @@ export default {
|
||||
// 清空并重新请求数据,恢复原始状态
|
||||
this.$nextTick(() => {
|
||||
this.tableData = [];
|
||||
this.getData();
|
||||
this.getDataPage();
|
||||
});
|
||||
console.log('已取消编辑,恢复原始数据');
|
||||
},
|
||||
@@ -238,7 +239,7 @@ export default {
|
||||
// 清空并重新请求数据,恢复原始状态
|
||||
this.$nextTick(() => {
|
||||
this.tableData = [];
|
||||
this.getData();
|
||||
this.getDataPage();
|
||||
});
|
||||
},
|
||||
|
||||
@@ -290,6 +291,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);
|
||||
@@ -320,6 +322,9 @@ export default {
|
||||
});
|
||||
|
||||
},
|
||||
handleLevelChange(id) {
|
||||
this.$emit('updateLevel', id)
|
||||
},
|
||||
|
||||
// 查询按钮点击事件(可根据需求扩展逻辑)
|
||||
onSubmit() {
|
||||
@@ -372,7 +377,8 @@ export default {
|
||||
this.upload.open = false
|
||||
this.upload.isUploading = false
|
||||
this.$refs.upload.clearFiles();
|
||||
this.getData()
|
||||
this.getDataPage();
|
||||
this.$emit('updateLeft')
|
||||
} else {
|
||||
this.$message.error(`上传失败:${response.data.msg || '未知错误'}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user