diff --git a/pc/.env.development b/pc/.env.development index d718c09..2754fd2 100644 --- a/pc/.env.development +++ b/pc/.env.development @@ -1,4 +1,4 @@ NODE_ENV = 'development' # 开发环境API地址 -VUE_APP_BASE_API = http://localhost:8082/api \ No newline at end of file +VUE_APP_BASE_API = http://192.168.137.45:8080 \ No newline at end of file diff --git a/pc/src/api/building.js b/pc/src/api/building.js index 1a84d68..872224a 100644 --- a/pc/src/api/building.js +++ b/pc/src/api/building.js @@ -69,7 +69,7 @@ export function updateBuilding(data) { export function deleteBuilding(ids) { return request({ url: `/room/building/remove/${ids}`, - method: 'post' + method: 'get' }) } @@ -119,7 +119,7 @@ export function updateFloor(data) { export function deleteFloor(ids) { return request({ url: `/room/floor/remove/${ids}`, - method: 'post' + method: 'get' }) } diff --git a/pc/src/main.js b/pc/src/main.js index 2750dc4..0794d55 100644 --- a/pc/src/main.js +++ b/pc/src/main.js @@ -12,7 +12,7 @@ Vue.config.productionTip = false // 添加下载方法 Vue.prototype.download = function(res, fileName) { // 创建blob链接 - const blob = new Blob([res.data]) + const blob = new Blob([res]) const link = document.createElement('a') link.href = URL.createObjectURL(blob) link.download = fileName diff --git a/pc/src/views/asset/classification/index.vue b/pc/src/views/asset/classification/index.vue index f8c6ac6..aea1b3e 100644 --- a/pc/src/views/asset/classification/index.vue +++ b/pc/src/views/asset/classification/index.vue @@ -211,11 +211,11 @@ export default { rules: { classificationCode: [ { required: true, message: '请输入分类编码', trigger: 'blur' }, - { min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' } + { min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' } ], classificationName: [ { required: true, message: '请输入分类名称', trigger: 'blur' }, - { min: 2, max: 50, message: '长度在 2 到 50 个字符', trigger: 'blur' } + { min: 1, max: 50, message: '长度在 1 到 50 个字符', trigger: 'blur' } ], parentId: [ { required: false, message: '请选择上级分类', trigger: 'change' } diff --git a/pc/src/views/asset/inventory/index.vue b/pc/src/views/asset/inventory/index.vue index 77ab15d..5f7795d 100644 --- a/pc/src/views/asset/inventory/index.vue +++ b/pc/src/views/asset/inventory/index.vue @@ -12,44 +12,15 @@ - - - - - - - - - {{ advanced ? '收起' : '展开' }} - - - - - - - 全部 - - {{ item.label }} - - 列显示 - - - - - - + - + - + - + - + - + - 搜索 - 重置 + 搜索 + 重置 + + + 全部 + + {{ item.label }} + + 列显示 + @@ -197,7 +182,7 @@ - + @@ -281,16 +265,16 @@ export default { printOpen: false, // 遮罩层 loading: false, + // 资产清单列表 + assetList: [], // 选中数组 ids: [], + // 非单个禁用 + single: true, // 非多个禁用 multiple: true, - // 显示搜索条件 - advanced: false, // 总条数 total: 0, - // 资产表格数据 - assetList: [], // 要打印的资产数据 assetsToPrint: [], // 弹出层标题 @@ -325,7 +309,6 @@ export default { queryParams: { pageNum: 1, pageSize: 10, - keyword: '', assetStatus: '', classificationId: undefined, assetName: '', @@ -339,8 +322,7 @@ export default { upload: { // 是否显示弹出层 open: false, - // 弹出层标题 - title: '', + // 是否禁用上传 isUploading: false, // 设置上传的请求头部 headers: {}, @@ -578,17 +560,32 @@ export default { return typeMap[assetStatus] || 'info' }, - /** 切换高级搜索 */ - toggleAdvanced() { - this.advanced = !this.advanced + /** 搜索按钮操作 */ + handleQuery() { + this.queryParams.pageNum = 1 + this.getList() }, - /** 处理列显示设置 */ - handleColumnDisplay(index) { - // 资产编码列是必须显示的,不能取消 - if (index !== 0) { - this.columns[index].visible = !this.columns[index].visible + /** 重置按钮操作 */ + resetQuery() { + // 使用Element UI表单的resetFields方法重置表单 + if (this.$refs.queryForm) { + this.$refs.queryForm.resetFields() } + + this.queryParams = { + pageNum: 1, + pageSize: 10, + assetStatus: '', + classificationId: undefined, + assetName: '', + locationId: undefined, + assetCode: '', + serialNumber: '', + adminUserId: undefined, + maintenanceExpired: '' + } + this.handleQuery() }, /** 全选/取消全选处理 */ @@ -607,34 +604,6 @@ export default { } }, - /** 搜索按钮操作 */ - handleQuery() { - this.queryParams.pageNum = 1 - this.getList() - }, - - /** 重置按钮操作 */ - resetQuery() { - this.resetForm('queryForm') - if (this.advanced) { - this.resetForm('advancedQueryForm') - } - this.queryParams = { - pageNum: 1, - pageSize: 10, - keyword: '', - assetStatus: '', - classificationId: undefined, - assetName: '', - locationId: undefined, - assetCode: '', - serialNumber: '', - adminUserId: undefined, - maintenanceExpired: '' - } - this.handleQuery() - }, - /** 多选框选中数据 */ handleSelectionChange(selection) { this.ids = selection.map(item => item.id) @@ -733,11 +702,11 @@ export default { /** 导入按钮操作 */ handleImport() { this.upload.open = true - this.upload.title = '导入资产数据' + this.importTitle = '导入资产数据' }, /** 处理文件上传中 */ - handleFileUpload() { + handleFileUploadProgress() { this.upload.isUploading = true }, @@ -747,17 +716,15 @@ export default { this.$refs.upload.clearFiles() this.upload.open = false if (response.code === API_SUCCESS_CODE) { - this.$message.success('导入成功' + (response.data && response.data.successCount ? response.data.successCount : 0) + '条数据') + this.$alert(`成功导入${response.data && response.data.successCount ? response.data.successCount : 0}条数据`, { type: 'success' }) this.getList() + } else { + // 如果是文件流,则下载错误文件 + this.$alert(response.msg || '导入失败,正在下载错误文件', '导入结果', { type: 'error' }) + this.download(response, `资产导入错误文件_${new Date().getTime()}.xlsx`) } }, - /** 文件上传失败处理 */ - handleFileError() { - this.upload.isUploading = false - this.$message.error('导入失败') - }, - /** 提交上传文件 */ submitFileForm() { this.$refs.upload.submit() diff --git a/pc/src/views/asset/location/index.vue b/pc/src/views/asset/location/index.vue index c89cfb2..eb36953 100644 --- a/pc/src/views/asset/location/index.vue +++ b/pc/src/views/asset/location/index.vue @@ -216,12 +216,12 @@ export default { rules: { locationCode: [ { required: true, message: '请输入位置编码', trigger: 'blur' }, - { min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' }, + { min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' }, { validator: this.validateLocationCode, trigger: 'blur' } ], locationName: [ { required: true, message: '请输入位置名称', trigger: 'blur' }, - { min: 2, max: 50, message: '长度在 2 到 50 个字符', trigger: 'blur' } + { min: 1, max: 50, message: '长度在 1 到 50 个字符', trigger: 'blur' } ], parentId: [ { required: false, message: '请选择上级位置', trigger: 'change' } diff --git a/pc/src/views/project/building/index.vue b/pc/src/views/project/building/index.vue index 88fd531..56cf8c6 100644 --- a/pc/src/views/project/building/index.vue +++ b/pc/src/views/project/building/index.vue @@ -11,7 +11,7 @@ 管理面积 - {{ statistics.managementArea }} m² + {{ statistics.manageArea }} m² @@ -23,13 +23,13 @@ 在租合同数 - {{ statistics.contractCount }} 份 + {{ statistics.rentedContracts }} 份 待租面积 - {{ statistics.availableArea }} m² + {{ statistics.rentableArea }} m² @@ -98,18 +98,18 @@ 标准层高(m) 建筑面积(m²) 产权面积(m²) - 可租面积(m²) + 可租面积(m²) 自用面积(m²) 配套面积(m²) 车位面积(m²) - 管理面积(m²) - 房间总数(间) - 出租率(%) + 管理面积(m²) + 房间总数(间) + 出租率(%) 在租面积(m²) - 在租合同数 - 本年营收目标(万元) + 在租合同数 + 待租面积(m²) - 待租房间数 + 待租房间数 列显示 @@ -132,8 +132,34 @@ :label="col.label" :prop="col.prop" :min-width="col.width" - align="center" - /> + align="center"> + + + + + + {{ getTagNameById(tagId) }} + + + + + + + + + + {{ formatColumnValue(scope.row[col.prop], col.prop) }} + + + @@ -152,7 +178,8 @@ :page-sizes="[10, 20, 50, 100]" :page-size="queryParams.pageSize" layout="total, sizes, prev, pager, next, jumper" - :total="total"> + :total="total" + class="pagination"> @@ -191,7 +218,7 @@ - + @@ -339,7 +366,13 @@ - + - + @@ -666,9 +699,13 @@ import { getFloorList, addFloor, updateFloor, deleteFloor, getFloorListByBuildin import { getProjectList,getTagByType } from '@/api/project' import { getAccountList } from '@/api/finance' import { API_SUCCESS_CODE } from '@/utils/constants' +import RegionSelector from '@/components/RegionSelector' export default { name: 'BuildingList', + components: { + RegionSelector + }, data() { // 楼宇名称唯一性验证 const validateBuildingName = (rule, value, callback) => { @@ -719,7 +756,8 @@ export default { pageSize: 10, projectId: undefined, buildingName: undefined, - buildingCode: undefined + buildingCode: undefined, + region: undefined }, // 表单参数 form: {}, @@ -748,11 +786,11 @@ export default { ], buildingCode: [ { required: true, message: '请输入楼宇编号', trigger: 'blur' }, - { min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' } + { min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' } ], buildingName: [ { required: true, message: '请输入楼宇名称', trigger: 'blur' }, - { min: 2, max: 50, message: '长度在 2 到 50 个字符', trigger: 'blur' }, + { min: 1, max: 50, message: '长度在 1 到 50 个字符', trigger: 'blur' }, { validator: validateBuildingName, trigger: 'blur' } ], region: [ @@ -806,7 +844,7 @@ export default { ], floorName: [ { required: true, message: '请输入楼层名称', trigger: 'blur' }, - { min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' } + { min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' } ], remark: [ { max: 200, message: '长度不能超过200个字符', trigger: 'blur' } @@ -815,18 +853,17 @@ export default { // 统计数据 statistics: { buildingCount: 15, - managementArea: '37,385.14', + manageArea: '37,385.14', rentedArea: '12,487.68', - contractCount: 58, - availableArea: '24,897.46', + rentedContracts: 58, + rentableArea: '24,897.46', yearTarget: '200' }, // 列筛选相关 columnFilterVisible: false, - selectedColumns: ['buildingName', 'projectName', 'buildingCode', 'buildingArea', - 'availableArea', 'managementArea', 'roomCount', 'occupancyRate', 'rentedArea', - 'contractCount', 'address', 'propertyNature', 'yearTarget'], + selectedColumns: ['buildingName', 'projectName', 'buildingCode', 'buildingTags', + 'region', 'address', 'propertyNature', 'buildingArea', 'rentableArea'], // 所有可用列的定义 allColumns: [ @@ -840,18 +877,18 @@ export default { { prop: 'standardHeight', label: '标准层高(m)', width: '120' }, { prop: 'buildingArea', label: '建筑面积(m²)', width: '120' }, { prop: 'propertyArea', label: '产权面积(m²)', width: '120' }, - { prop: 'availableArea', label: '可租面积(m²)', width: '120' }, + { prop: 'rentableArea', label: '可租面积(m²)', width: '120' }, { prop: 'selfUseArea', label: '自用面积(m²)', width: '120' }, { prop: 'supportingArea', label: '配套面积(m²)', width: '120' }, { prop: 'parkingArea', label: '车位面积(m²)', width: '120' }, - { prop: 'managementArea', label: '管理面积(m²)', width: '120' }, - { prop: 'roomCount', label: '房间总数(间)', width: '120' }, - { prop: 'occupancyRate', label: '出租率(%)', width: '120' }, + { prop: 'manageArea', label: '管理面积(m²)', width: '120' }, + { prop: 'totalRooms', label: '房间总数(间)', width: '120' }, + { prop: 'rentalRate', label: '出租率(%)', width: '120' }, { prop: 'rentedArea', label: '在租面积(m²)', width: '120' }, - { prop: 'contractCount', label: '在租合同数', width: '120' }, - { prop: 'yearTarget', label: '本年营收目标(万元)', width: '150' }, + { prop: 'rentedContracts', label: '在租合同数', width: '120' }, + // { prop: 'yearTarget', label: '本年营收目标(万元)', width: '150' }, { prop: 'availableRentArea', label: '待租面积(m²)', width: '120' }, - { prop: 'availableRoomCount', label: '待租房间数', width: '120' } + { prop: 'waitingRooms', label: '待租房间数', width: '120' } ], // 保存原始楼宇名称,用于编辑时的对比 originalBuildingName: '', @@ -874,6 +911,14 @@ export default { if (!this.allColumns.length) return false // 判断是否所有列都被选中 return this.allColumns.every(col => this.selectedColumns.includes(col.prop)) + }, + // 标签ID到名称的映射 + tagIdToName() { + const map = {} + this.tagOptions.forEach(tag => { + map[tag.id] = tag.tagName + }) + return map } }, watch: { @@ -933,20 +978,61 @@ export default { getBuildingList(params).then(res => { if (res.code === API_SUCCESS_CODE) { + // 添加调试代码 + console.log('API返回的原始楼宇数据:', JSON.stringify(res.data)) + // 处理后端返回的数据,确保字段名映射正确 const listData = res.data.rows || res.data.list || [] + console.log('列表数据项示例:', listData.length > 0 ? listData[0] : '无数据') + this.buildingList = listData.map(item => { + // 创建一个新的对象,避免直接修改原始数据 + let newItem = {...item} + // 处理拓展信息字段 - if (item.buildingTags !== undefined) { - item.buildingTags = item.buildingTags + if (newItem.buildingTags !== undefined) { + // 确保buildingTags始终是字符串格式 + if (Array.isArray(newItem.buildingTags)) { + newItem.buildingTags = newItem.buildingTags.join(',') + } else if (typeof newItem.buildingTags === 'object' && newItem.buildingTags !== null) { + newItem.buildingTags = Object.values(newItem.buildingTags).join(',') + } else if (newItem.buildingTags === null) { + newItem.buildingTags = '' + } + } else { + newItem.buildingTags = '' } - if (item.isHot !== undefined) { - item.isHot = item.isHot === '1' || item.isHot === true + + // 转换热门楼宇标记 + if (newItem.isHot !== undefined) { + newItem.isHot = newItem.isHot === '1' || newItem.isHot === true } - if (item.imageUrl !== undefined) { - item.buildingImage = item.imageUrl + + // 处理图片URL + if (newItem.imageUrl !== undefined) { + newItem.buildingImage = newItem.imageUrl } - return item + + // 确保所有数值型字段都有默认值 + const numericFields = ['buildingArea', 'propertyArea', 'rentableArea', 'selfUseArea', + 'supportingArea', 'parkingArea', 'standardHeight', 'manageArea', + 'totalRooms', 'rentalRate', 'rentedArea', 'rentedContracts', + 'availableRentArea', 'waitingRooms'] + numericFields.forEach(field => { + if (newItem[field] === undefined || newItem[field] === null) { + newItem[field] = 0 + } + }) + + // 确保所有文本字段至少有空字符串 + const textFields = ['projectName', 'region', 'address', 'propertyNature'] + textFields.forEach(field => { + if (newItem[field] === undefined || newItem[field] === null) { + newItem[field] = '' + } + }) + + return newItem }) this.total = res.data.total } else { @@ -978,8 +1064,8 @@ export default { } }).catch(() => { this.accountOptions = [ - { id: 1, accountName: '示例账户1', company: '示例收款公司1', bankName: '中国建设银行', bankAccountNumber: '6214000012345678' }, - { id: 2, accountName: '示例账户2', company: '示例收款公司2', bankName: '中国工商银行', bankAccountNumber: '6217000087654321' } + { id: '1', accountName: '示例账户1', company: '示例收款公司1', bankName: '中国建设银行', bankAccountNumber: '6214000012345678' }, + { id: '2', accountName: '示例账户2', company: '示例收款公司2', bankName: '中国工商银行', bankAccountNumber: '6217000087654321' } ] }) }, @@ -1015,9 +1101,10 @@ export default { pageSize: 10, projectId: undefined, buildingName: undefined, - buildingCode: undefined + buildingCode: undefined, + region: undefined } - this.handleQuery() + this.getList() }, /** 新增按钮操作 */ handleAdd() { @@ -1074,16 +1161,40 @@ export default { // 处理扩展信息字段 - 处理后端命名与前端命名的映射 // 处理楼宇标签 - if (data.buildingTags) { - data.buildingTags = data.buildingTags - } - if (!data.buildingTags) data.buildingTags = [] - else if (typeof data.buildingTags === 'string') { - try { - data.buildingTags = JSON.parse(data.buildingTags) - } catch (e) { - data.buildingTags = data.buildingTags.split(',') + try { + if (data.buildingTags) { + if (typeof data.buildingTags === 'string') { + if (data.buildingTags.trim() === '') { + data.buildingTags = [] + } else { + // 尝试解析JSON字符串 + try { + let parsed = JSON.parse(data.buildingTags) + data.buildingTags = Array.isArray(parsed) ? parsed.map(id => String(id)) : [String(parsed)] + } catch (e) { + // 如果不是JSON格式,按逗号分隔处理 + data.buildingTags = data.buildingTags.split(',').filter(id => id && id.trim() !== '') + } + } + } else if (Array.isArray(data.buildingTags)) { + // 已经是数组,确保每项都是字符串 + data.buildingTags = data.buildingTags.map(id => String(id)).filter(id => id) + } else if (data.buildingTags === null || data.buildingTags === undefined) { + data.buildingTags = [] + } else if (typeof data.buildingTags === 'object') { + // 如果是对象,尝试提取值 + data.buildingTags = Object.values(data.buildingTags).map(id => String(id)).filter(id => id) + } else { + // 如果是其他类型(如数字),转成字符串数组 + data.buildingTags = [String(data.buildingTags)] + } + } else { + data.buildingTags = [] } + console.log('处理后的标签数据:', data.buildingTags) + } catch (err) { + console.error('处理楼宇标签出错:', err) + data.buildingTags = [] } // 处理设施 @@ -1211,9 +1322,14 @@ export default { }, /** 对话框打开时的处理 */ onDialogOpen() { + // 确保标签选项已经加载 if (this.tagOptions.length === 0) { this.getTagOptions() } + + console.log('编辑表单当前标签数据:', this.form.buildingTags) + console.log('可用标签选项:', this.tagOptions) + // 等待DOM更新后重置验证 this.$nextTick(() => { if (this.$refs.form) { @@ -1221,7 +1337,7 @@ export default { this.$refs.form.clearValidate() // 确保数值字段为数字类型 - const numericFields = ['sortOrder', 'buildingArea', 'propertyArea', 'availableArea', + const numericFields = ['sortOrder', 'buildingArea', 'propertyArea', 'rentableArea', 'selfUseArea', 'supportingArea', 'parkingArea'] numericFields.forEach(field => { if (this.form[field] !== undefined) { @@ -1241,8 +1357,16 @@ export default { const formData = JSON.parse(JSON.stringify(this.form)) // 处理数组和对象类型数据 + console.log('提交前的标签数据:', formData.buildingTags) + if (Array.isArray(formData.buildingTags)) { - formData.buildingTags = formData.buildingTags.join(',') + // 确保每个ID都是字符串类型 + formData.buildingTags = formData.buildingTags.map(id => String(id)).join(',') + } else if (formData.buildingTags === undefined || formData.buildingTags === null) { + formData.buildingTags = "" + } else if (typeof formData.buildingTags === 'number' || typeof formData.buildingTags === 'boolean') { + // 如果是数字或布尔值,转成字符串 + formData.buildingTags = String(formData.buildingTags) } if (Array.isArray(formData.facilities)) { @@ -1259,9 +1383,6 @@ export default { const action = formData.id ? updateBuilding : addBuilding const successMsg = formData.id ? '修改成功' : '新增成功' - // 打印action函数内部结构 - console.log("Action函数:", action.toString()) - action(formData).then(res => { console.log("API响应:", res) if (res.code === API_SUCCESS_CODE) { @@ -1337,20 +1458,20 @@ export default { // 计算总统计数据 const totalStats = { buildingCount: res.data.total || 0, - managementArea: 0, + manageArea: 0, rentedArea: 0, - contractCount: 0, - availableArea: 0, + rentedContracts: 0, + rentableArea: 0, yearTarget: 0 } // 更新统计数据显示 this.statistics = { buildingCount: totalStats.buildingCount.toString(), - managementArea: totalStats.managementArea.toFixed(2), + manageArea: totalStats.manageArea.toFixed(2), rentedArea: totalStats.rentedArea.toFixed(2), - contractCount: totalStats.contractCount.toString(), - availableArea: totalStats.availableArea.toFixed(2), + rentedContracts: totalStats.rentedContracts.toString(), + rentableArea: totalStats.rentableArea.toFixed(2), yearTarget: totalStats.yearTarget.toString() } } else { @@ -1368,10 +1489,10 @@ export default { // 使用默认数据 this.statistics = { buildingCount: '0', - managementArea: '0.00', + manageArea: '0.00', rentedArea: '0.00', - contractCount: '0', - availableArea: '0.00', + rentedContracts: '0', + rentableArea: '0.00', yearTarget: '0' } }, @@ -1607,7 +1728,7 @@ export default { this.$refs.detailForm.clearValidate() // 确保数值字段为数字类型 - const numericFields = ['rentedArea', 'rentedContracts', 'waitingArea', 'waitingRooms'] + const numericFields = ['rentedArea', 'rentedContracts', 'rentedContracts', 'waitingRooms'] numericFields.forEach(field => { if (this.detail[field] !== undefined) { this.detail[field] = Number(this.detail[field]) @@ -1669,13 +1790,80 @@ export default { // 获取楼宇标签选项 getTagOptions() { getTagByType({ tagType: "楼宇标签", tagName: "楼宇标签" }).then(res => { - this.tagOptions = res.data - }).catch(() => { + if (res.code === API_SUCCESS_CODE && Array.isArray(res.data)) { + this.tagOptions = res.data + console.log('标签选项:', this.tagOptions) + } else { + console.warn('获取标签选项失败或格式错误:', res) + this.tagOptions = [ + { id: '1', tagName: '标签1' }, + { id: '2', tagName: '标签2' } + ] + } + }).catch((err) => { + console.error('获取标签选项异常:', err) this.tagOptions = [ { id: '1', tagName: '标签1' }, { id: '2', tagName: '标签2' } ] }) + }, + + // 标签选择器可见性变化处理 + onTagSelectorVisibleChange(visible) { + if (visible && (!this.tagOptions || this.tagOptions.length === 0)) { + this.getTagOptions() + } + }, + getTagNameById(tagId) { + if (!tagId) return ''; + return this.tagIdToName[tagId] || tagId + }, + formatColumnValue(value, prop) { + // 先检查值是否为数字或可转换为数字 + const isNumericProp = [ + 'rentableArea', 'selfUseArea', 'supportingArea', 'parkingArea', + 'manageArea', 'totalRooms', 'rentedArea', 'rentedContracts', + 'availableRentArea', 'waitingRooms', 'rentalRate', 'standardHeight', + 'buildingArea', 'propertyArea' + ].includes(prop) + + // 如果属性应该是数字但值不是数字,尝试转换 + if (isNumericProp) { + if (typeof value !== 'number') { + // 尝试转换为数字 + const numValue = parseFloat(value) + if (isNaN(numValue)) { + return value || '0'; // 如果转换失败,返回原值或0 + } + value = numValue; + } + + switch (prop) { + case 'rentableArea': + case 'selfUseArea': + case 'supportingArea': + case 'parkingArea': + case 'manageArea': + case 'buildingArea': + case 'propertyArea': + case 'rentedArea': + case 'availableRentArea': + return value.toFixed(2) + case 'totalRooms': + case 'rentedContracts': + case 'waitingRooms': + return Math.round(value) + case 'rentalRate': + return value.toFixed(2) + case 'standardHeight': + return value.toFixed(2) + default: + return value + } + } + + return value } } } @@ -1812,4 +2000,8 @@ export default { flex-wrap: wrap; } } +.pagination { + margin-top: 15px; + text-align: right; + } \ No newline at end of file diff --git a/pc/src/views/project/index.vue b/pc/src/views/project/index.vue index fdb0266..a5002dd 100644 --- a/pc/src/views/project/index.vue +++ b/pc/src/views/project/index.vue @@ -62,9 +62,9 @@ - + 搜索 重置 @@ -76,10 +76,10 @@ - + - - + + 详情 @@ -97,7 +97,8 @@ :page-sizes="[10, 20, 50, 100]" :page-size="queryParams.pageSize" layout="total, sizes, prev, pager, next, jumper" - :total="total"> + :total="total" + class="pagination"> @@ -183,27 +184,27 @@ {{ detail.projectType }} {{ detail.region }} {{ detail.address }} - {{ detail.totalArea }}㎡ + {{ detail.manageArea }}㎡ {{ detail.availableArea }}㎡ - {{ detail.totalBuildings }} - {{ detail.availableBuildings }} - {{ detail.sort }} - {{ detail.completionTime }} - {{ detail.standardHeight }}m - {{ detail.property }} - {{ detail.propertyFee }}元/㎡·月 - {{ detail.parkingSpaces }} - {{ detail.parkingFee }}元/月 - {{ detail.airConditioning }} - {{ detail.airConditioningFee }}元/㎡·月 - {{ detail.airConditioningTime }} - {{ detail.elevator }} - {{ detail.network }} - {{ detail.enterprises }} - {{ detail.recruitmentPosition }} - {{ detail.recruitmentDepartment }} - {{ detail.vrLink }} - {{ detail.recruitmentTime }} + {{ detail.totalRooms }} + {{ detail.availableRooms }} + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pc/src/views/project/room/components/DetailView.vue b/pc/src/views/project/room/components/DetailView.vue index 1011c76..a5ee1f6 100644 --- a/pc/src/views/project/room/components/DetailView.vue +++ b/pc/src/views/project/room/components/DetailView.vue @@ -94,6 +94,7 @@