企业入驻

xuhongjie
严飞永 1 week ago
parent 22eaa5ba54
commit b600c2f76c

@ -5,4 +5,4 @@ VUE_APP_TITLE = 苏州工业园区工业上楼管理系统
ENV = 'production' 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() { 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: { watch: {
qyrzInfo: { qyrzInfo: {
handler(newVal) { handler(newVal) {
this.form = { ...newVal }; // tableData rzqys
this.form = {
...newVal,
rzqys: this.tableData.length // 使 rzqys
};
}, },
immediate: true, immediate: true,
deep: true deep: true
@ -213,13 +232,13 @@ export default {
size: this.pagination.pageSize size: this.pagination.pageSize
}; };
return getqyBasicInformationPage(params).then(response => { 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 => ({ this.tableData = response.data.records.map(item => ({
...item, ...item,
isEditing: false isEditing: false
})); }));
console.log('Table Data:', this.tableData); // console.log('Table Data:', this.tableData);
this.pagination.total = response.data.total; // this.pagination.total = response.data.total;
}).catch(error => { }).catch(error => {
console.error('获取数据失败:', error); console.error('获取数据失败:', error);
}); });
@ -292,23 +311,23 @@ export default {
this.upload.isUploading = true; this.upload.isUploading = true;
}, },
handleFileSuccess(response) { handleFileSuccess(response) {
this.upload.isUploading = false; this.upload.isUploading = false;
this.upload.open = false; this.upload.open = false;
this.$refs.upload.clearFiles(); this.$refs.upload.clearFiles();
if (response.code === 200) { if (response.code === 200) {
this.$modal.msgSuccess(response.msg); this.$modal.msgSuccess(response.msg);
// //
this.fetchTableData().then(() => { this.fetchTableData().then(() => {
// form // form
this.form.rzqys = this.tableData.length; this.form.rzqys = this.tableData.length;
// save // save
this.save(); this.save();
}); });
} else { } else {
this.$modal.msgError(response.msg || "导入失败"); this.$modal.msgError(response.msg || "导入失败");
} }
}, },
submitFileForm() { submitFileForm() {
if (this.$refs.upload.uploadFiles.length === 0) { if (this.$refs.upload.uploadFiles.length === 0) {
this.$modal.msgWarning("请先选择文件"); this.$modal.msgWarning("请先选择文件");

@ -8,7 +8,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="name" width="300"> <el-table-column prop="name" width="300">
<template slot-scope="scope"> <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 }} {{ scope.row.name }}
</span> </span>
</template> </template>
@ -56,7 +56,7 @@ export default {
const response = await getAllMessages(); const response = await getAllMessages();
if (response && response.code === 200 && response.data) { if (response && response.code === 200 && response.data) {
this.tableData = this.processData(response.data); this.tableData = this.processData(response.data);
this.sortTableData(); // this.tableData.reverse(); //
} }
}, },
processData(data) { processData(data) {
@ -67,17 +67,6 @@ export default {
isRead: item.isRead // isRead 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) { getIcon(index) {
return index === 0 ? require('@/assets/images/new@2x.png') : require('@/assets/images/other.png'); return index === 0 ? require('@/assets/images/new@2x.png') : require('@/assets/images/other.png');
}, },

@ -56,7 +56,7 @@ export default {
const response = await getAllMessagestwo(); const response = await getAllMessagestwo();
if (response && response.code === 200 && response.data) { if (response && response.code === 200 && response.data) {
this.tableData = this.processData(response.data); this.tableData = this.processData(response.data);
this.sortTableData(); // this.tableData.reverse(); //
} }
}, },
processData(data) { processData(data) {
@ -67,17 +67,6 @@ export default {
isRead: item.isRead // isRead 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) { getIcon(index) {
return index === 0 ? require('@/assets/images/new@2x.png') : require('@/assets/images/other.png'); 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 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;
} }

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

Loading…
Cancel
Save