企业入驻

xuhongjie
严飞永 7 days ago
parent 22eaa5ba54
commit b600c2f76c

@ -5,4 +5,4 @@ VUE_APP_TITLE = 苏州工业园区工业上楼管理系统
ENV = 'production'
# 苏州工业园区工业上楼管理系统/生产环境
# VUE_APP_BASE_API = 'http://39.101.188.84:7071'
VUE_APP_BASE_API = 'http://39.101.188.84:7071'

@ -192,13 +192,32 @@ export default {
};
},
created() {
console.log('xmId:', this.xmId);
this.fetchTableData();
this.fetchTableData(); //
},
methods: {
async fetchTableData() {
const params = { xmId: this.xmId, current: 1, size: 10 };
try {
const response = await getqyBasicInformationPage(params);
this.tableData = response.data.records.map(item => ({ ...item, isEditing: false }));
this.pagination.total = response.data.total;
// form.rzqys
this.form.rzqys = this.tableData.length;
this.$emit('update-data', { ...this.form }); //
} catch (error) {
console.error('获取数据失败:', error);
}
}
},
watch: {
qyrzInfo: {
handler(newVal) {
this.form = { ...newVal };
// tableData rzqys
this.form = {
...newVal,
rzqys: this.tableData.length // 使 rzqys
};
},
immediate: true,
deep: true
@ -213,13 +232,13 @@ export default {
size: this.pagination.pageSize
};
return getqyBasicInformationPage(params).then(response => {
console.log('Fetched Data:', response.data.records); //
console.log('Fetched Data:', response.data.records);
this.tableData = response.data.records.map(item => ({
...item,
isEditing: false
}));
console.log('Table Data:', this.tableData); //
this.pagination.total = response.data.total; //
console.log('Table Data:', this.tableData);
this.pagination.total = response.data.total;
}).catch(error => {
console.error('获取数据失败:', error);
});
@ -292,23 +311,23 @@ export default {
this.upload.isUploading = true;
},
handleFileSuccess(response) {
this.upload.isUploading = false;
this.upload.open = false;
this.$refs.upload.clearFiles();
this.upload.isUploading = false;
this.upload.open = false;
this.$refs.upload.clearFiles();
if (response.code === 200) {
if (response.code === 200) {
this.$modal.msgSuccess(response.msg);
//
this.fetchTableData().then(() => {
// form
this.form.rzqys = this.tableData.length;
// save
this.save();
// form
this.form.rzqys = this.tableData.length;
// save
this.save();
});
} else {
} else {
this.$modal.msgError(response.msg || "导入失败");
}
},
}
},
submitFileForm() {
if (this.$refs.upload.uploadFiles.length === 0) {
this.$modal.msgWarning("请先选择文件");

@ -8,7 +8,7 @@
</el-table-column>
<el-table-column prop="name" width="300">
<template slot-scope="scope">
<span :style="{ color: scope.row.isRead === 2 ? 'gray' : 'inherit' }">
<span :style="{ color: scope.row.isRead === 2 ? '#ccc' : 'inherit' }">
{{ scope.row.name }}
</span>
</template>
@ -16,7 +16,7 @@
<el-table-column prop="date" width="100">
</el-table-column>
</el-table>
<!-- 详情弹窗 -->
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="40%">
<div>
@ -56,7 +56,7 @@ export default {
const response = await getAllMessages();
if (response && response.code === 200 && response.data) {
this.tableData = this.processData(response.data);
this.sortTableData(); //
this.tableData.reverse(); //
}
},
processData(data) {
@ -67,17 +67,6 @@ export default {
isRead: item.isRead // isRead
}));
},
sortTableData() {
this.tableData.sort((a, b) => {
if (a.isRead === 2 && b.isRead !== 2) {
return 1;
} else if (a.isRead !== 2 && b.isRead === 2) {
return -1;
} else {
return 0;
}
});
},
getIcon(index) {
return index === 0 ? require('@/assets/images/new@2x.png') : require('@/assets/images/other.png');
},

@ -16,7 +16,7 @@
<el-table-column prop="date" width="100">
</el-table-column>
</el-table>
<!-- 详情弹窗 -->
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="40%">
<div>
@ -56,7 +56,7 @@ export default {
const response = await getAllMessagestwo();
if (response && response.code === 200 && response.data) {
this.tableData = this.processData(response.data);
this.sortTableData(); //
this.tableData.reverse(); //
}
},
processData(data) {
@ -67,17 +67,6 @@ export default {
isRead: item.isRead // isRead
}));
},
sortTableData() {
this.tableData.sort((a, b) => {
if (a.isRead === 2 && b.isRead !== 2) {
return 1;
} else if (a.isRead !== 2 && b.isRead === 2) {
return -1;
} else {
return 0;
}
});
},
getIcon(index) {
return index === 0 ? require('@/assets/images/new@2x.png') : require('@/assets/images/other.png');
},

@ -109,7 +109,7 @@ import Projectpicture from '@/views/components/ProjectDetails/Projectpicture.vue
import Projectpicturetwo22 from '@/views/components/ProjectDetails/Projectpicturetwo22.vue';
import Others from '@/views/components/ProjectDetails/Others.vue';
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 {
components: {
@ -229,6 +229,7 @@ export default {
checkRole,
loadData() {
console.log('Loading data for project ID:', this.projectId);
this.loading = true; //
getBasicInformationById(this.projectId).then(response => {
const data = response.data;
this.basicInformation = data.basicInformation;
@ -236,7 +237,12 @@ export default {
this.projectOtherInfos = data.projectOtherInfos;
this.wysmxInformations = data.wysmxResponses;
this.qyrzInformation = data.qyrzInformation;
this.projectRemarks = data.projectRemarks
this.projectRemarks = data.projectRemarks;
//
console.log('Loaded qyrzInformation111111111111:', this.qyrzInformation);
}).finally(() => {
this.loading = false;
});
},
scrollToSection(id) {
@ -266,7 +272,7 @@ export default {
} else {
this[dataKey] = updatedData;
}
console.log(`接收到 ${dataKey} 更新:`, updatedData);
console.log(`接收到 ${dataKey} 1234更新:`, updatedData);
},
isDefault(obj, defaultObj) {
@ -295,14 +301,21 @@ export default {
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;
//
console.log('qyrzInformation:', this.qyrzInformation);
console.log('wysmxInformations:', this.wysmxInformations);
// wysmxInformations null
if (this.wysmxInformations.length === 0 || this.wysmxInformations.includes(null)) {
this.$message.error('请填写模型管理信息');
@ -311,8 +324,9 @@ export default {
}
// qyrzInformation rzqys
if (this.qyrzInformation.rzqys === 0 || this.qyrzInformation.rzqys === null || this.qyrzInformation.rzqys === undefined) {
this.$message.error('请导入入驻信息');
const rzqys = await this.getEnterpriseCount();
if (rzqys === 0 || rzqys === null || rzqys === undefined) {
this.$message.error('请先导入企业入驻信息');
this.loading = false;
return;
}

@ -37,8 +37,8 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://192.168.0.108:7071/`,
// target: `http://39.101.188.84:7071/`,
// target: `http://192.168.0.108:7071/`,
target: `http://39.101.188.84:7071/`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save