|
|
@ -232,8 +232,7 @@ export default {
|
|
|
|
checkPermi,
|
|
|
|
checkPermi,
|
|
|
|
checkRole,
|
|
|
|
checkRole,
|
|
|
|
loadData() {
|
|
|
|
loadData() {
|
|
|
|
// console.log('Loading data for project ID:', this.projectId);
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true; // 添加加载状态
|
|
|
|
|
|
|
|
getBasicInformationById(this.projectId).then(response => {
|
|
|
|
getBasicInformationById(this.projectId).then(response => {
|
|
|
|
const data = response.data;
|
|
|
|
const data = response.data;
|
|
|
|
this.basicInformation = data.basicInformation;
|
|
|
|
this.basicInformation = data.basicInformation;
|
|
|
@ -243,8 +242,6 @@ export default {
|
|
|
|
this.qyrzInformation = data.qyrzInformation;
|
|
|
|
this.qyrzInformation = data.qyrzInformation;
|
|
|
|
this.projectRemarks = data.projectRemarks;
|
|
|
|
this.projectRemarks = data.projectRemarks;
|
|
|
|
|
|
|
|
|
|
|
|
// 确保数据已加载
|
|
|
|
|
|
|
|
// console.log('Loaded qyrzInformation111111111111:', this.qyrzInformation);
|
|
|
|
|
|
|
|
}).finally(() => {
|
|
|
|
}).finally(() => {
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -263,9 +260,9 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
goBack() {
|
|
|
|
goBack() {
|
|
|
|
this.$router.go(-1); // 返回上一个页面
|
|
|
|
this.$router.go(-1);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 处理来自子组件的数据更新
|
|
|
|
// 子组件的
|
|
|
|
handleDataUpdate(dataKey, updatedData) {
|
|
|
|
handleDataUpdate(dataKey, updatedData) {
|
|
|
|
if (dataKey === 'projectOtherInfos' || dataKey === 'wysmxInformations') {
|
|
|
|
if (dataKey === 'projectOtherInfos' || dataKey === 'wysmxInformations') {
|
|
|
|
if (Array.isArray(updatedData)) {
|
|
|
|
if (Array.isArray(updatedData)) {
|
|
|
@ -289,7 +286,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 暂存数据
|
|
|
|
// 暂存数据
|
|
|
|
saveAll() {
|
|
|
|
saveAll() {
|
|
|
|
// 创建全局加载动画
|
|
|
|
// 全局加载动画
|
|
|
|
const loading = this.$loading({
|
|
|
|
const loading = this.$loading({
|
|
|
|
lock: true,
|
|
|
|
lock: true,
|
|
|
|
text: '正在暂存中...',
|
|
|
|
text: '正在暂存中...',
|
|
|
@ -297,19 +294,17 @@ export default {
|
|
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
const tempData = this.prepareSubmitData(); // 复用数据准备逻辑
|
|
|
|
const tempData = this.prepareSubmitData(); // 复用数据
|
|
|
|
|
|
|
|
|
|
|
|
tempBasicInformation(tempData)
|
|
|
|
tempBasicInformation(tempData)
|
|
|
|
.then(response => {
|
|
|
|
.then(response => {
|
|
|
|
// 请求成功
|
|
|
|
|
|
|
|
this.$message.success('暂存成功');
|
|
|
|
this.$message.success('暂存成功');
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(error => {
|
|
|
|
.catch(error => {
|
|
|
|
// 请求失败
|
|
|
|
|
|
|
|
this.$message.error('暂存失败');
|
|
|
|
this.$message.error('暂存失败');
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.finally(() => {
|
|
|
|
.finally(() => {
|
|
|
|
// 关闭加载动画
|
|
|
|
// 关闭动画
|
|
|
|
loading.close();
|
|
|
|
loading.close();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -370,7 +365,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
// 准备数据并提交
|
|
|
|
// 准备数据并提交
|
|
|
|
const submitData = this.prepareSubmitData();
|
|
|
|
const submitData = this.prepareSubmitData();
|
|
|
|
// console.log('准备提交的完整数据:', JSON.stringify(submitData, null, 2)); // 打印完整数据
|
|
|
|
// console.log('准备提交的完整数据:', JSON.stringify(submitData, null, 2));
|
|
|
|
|
|
|
|
|
|
|
|
fillBasicInformation(submitData)
|
|
|
|
fillBasicInformation(submitData)
|
|
|
|
.then(response => {
|
|
|
|
.then(response => {
|
|
|
|