|
|
@ -109,7 +109,7 @@ import Projectpicture from '@/views/components/ProjectDetails/Projectpicture.vue
|
|
|
|
import Projectpicturetwo22 from '@/views/components/ProjectDetails/Projectpicturetwo22.vue';
|
|
|
|
import Projectpicturetwo22 from '@/views/components/ProjectDetails/Projectpicturetwo22.vue';
|
|
|
|
import Others from '@/views/components/ProjectDetails/Others.vue';
|
|
|
|
import Others from '@/views/components/ProjectDetails/Others.vue';
|
|
|
|
import { checkPermi, checkRole } from "@/utils/permission";
|
|
|
|
import { checkPermi, checkRole } from "@/utils/permission";
|
|
|
|
import { getBasicInformationById, fillBasicInformation, auditBasicInformation, tempBasicInformation } from '@/api/ManageApi/index';
|
|
|
|
import { getBasicInformationById, fillBasicInformation, auditBasicInformation, tempBasicInformation, getqyBasicInformationPage } from '@/api/ManageApi/index';
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
@ -229,6 +229,7 @@ export default {
|
|
|
|
checkRole,
|
|
|
|
checkRole,
|
|
|
|
loadData() {
|
|
|
|
loadData() {
|
|
|
|
console.log('Loading data for project ID:', this.projectId);
|
|
|
|
console.log('Loading data for project ID:', this.projectId);
|
|
|
|
|
|
|
|
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;
|
|
|
@ -236,7 +237,12 @@ export default {
|
|
|
|
this.projectOtherInfos = data.projectOtherInfos;
|
|
|
|
this.projectOtherInfos = data.projectOtherInfos;
|
|
|
|
this.wysmxInformations = data.wysmxResponses;
|
|
|
|
this.wysmxInformations = data.wysmxResponses;
|
|
|
|
this.qyrzInformation = data.qyrzInformation;
|
|
|
|
this.qyrzInformation = data.qyrzInformation;
|
|
|
|
this.projectRemarks = data.projectRemarks
|
|
|
|
this.projectRemarks = data.projectRemarks;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 确保数据已加载
|
|
|
|
|
|
|
|
console.log('Loaded qyrzInformation111111111111:', this.qyrzInformation);
|
|
|
|
|
|
|
|
}).finally(() => {
|
|
|
|
|
|
|
|
this.loading = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
scrollToSection(id) {
|
|
|
|
scrollToSection(id) {
|
|
|
@ -266,7 +272,7 @@ export default {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this[dataKey] = updatedData;
|
|
|
|
this[dataKey] = updatedData;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
console.log(`接收到 ${dataKey} 更新:`, updatedData);
|
|
|
|
console.log(`接收到 ${dataKey} 1234更新:`, updatedData);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
isDefault(obj, defaultObj) {
|
|
|
|
isDefault(obj, defaultObj) {
|
|
|
@ -295,14 +301,21 @@ export default {
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// 获取企业入驻总数
|
|
|
|
|
|
|
|
async getEnterpriseCount() {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
const params = { xmId: this.projectId, current: 1, size: 1 }; // 只需要总数,size=1
|
|
|
|
|
|
|
|
const response = await getqyBasicInformationPage(params);
|
|
|
|
|
|
|
|
return response.data.total || 0; // 返回总数,默认为0
|
|
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
|
|
console.error('获取企业总数失败:', error);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
// 提交数据
|
|
|
|
// 提交数据
|
|
|
|
submitAll() {
|
|
|
|
async submitAll() {
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
|
|
|
|
|
|
|
|
|
// 添加调试信息
|
|
|
|
|
|
|
|
console.log('qyrzInformation:', this.qyrzInformation);
|
|
|
|
|
|
|
|
console.log('wysmxInformations:', this.wysmxInformations);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 校验 wysmxInformations 是否为空或包含 null
|
|
|
|
// 校验 wysmxInformations 是否为空或包含 null
|
|
|
|
if (this.wysmxInformations.length === 0 || this.wysmxInformations.includes(null)) {
|
|
|
|
if (this.wysmxInformations.length === 0 || this.wysmxInformations.includes(null)) {
|
|
|
|
this.$message.error('请填写模型管理信息');
|
|
|
|
this.$message.error('请填写模型管理信息');
|
|
|
@ -311,8 +324,9 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 校验 qyrzInformation 的 rzqys
|
|
|
|
// 校验 qyrzInformation 的 rzqys
|
|
|
|
if (this.qyrzInformation.rzqys === 0 || this.qyrzInformation.rzqys === null || this.qyrzInformation.rzqys === undefined) {
|
|
|
|
const rzqys = await this.getEnterpriseCount();
|
|
|
|
this.$message.error('请导入入驻信息');
|
|
|
|
if (rzqys === 0 || rzqys === null || rzqys === undefined) {
|
|
|
|
|
|
|
|
this.$message.error('请先导入企业入驻信息');
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|