From 9ea2e86512bdcb5608b20d01cd6e95a02a9d3f7a Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Fri, 23 May 2025 19:14:20 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/records/roomselection/index.vue | 26 ++++++++++++++++------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/views/records/roomselection/index.vue b/src/views/records/roomselection/index.vue index d4a9387..cb37feb 100644 --- a/src/views/records/roomselection/index.vue +++ b/src/views/records/roomselection/index.vue @@ -54,7 +54,12 @@ - + + + + + + 搜索 @@ -83,11 +88,11 @@ - + @@ -120,8 +125,8 @@ 退房日期:{{ info.checkOutDate }} 入住办理时间:{{ info.handleCheckInDate }} - + 当前状态:{{ stateComp(info.state) }} + 确 定 @@ -176,6 +181,11 @@ export default { unitOptions: [], houseOptions: [], open: false, + statusOptions: [ + { value: "0", label: "未入住" }, + { value: "1", label: "入住中" }, + { value: "2", label: "已退房" }, + ], }; }, watch: { @@ -248,9 +258,9 @@ export default { }); }); }, - // stateComp(val) { - // return this.statusOptions.find((item) => item.value == val)?.label; - // }, + stateComp(val) { + return this.statusOptions.find((item) => item.value == val)?.label; + }, /** 转换公寓数据结构 */ normalizer(node) { if (node.children && !node.children.length) { From 4d8f2dc2761fee2a2620ebed49f6138e4026a90f Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Mon, 26 May 2025 09:20:14 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=80=80=E6=88=BF?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=8E=A5=E5=8F=A3=E5=8A=A0=E5=85=A5=E5=8F=82?= =?UTF-8?q?=E6=88=BF=E5=B1=8BId=E8=B7=9F=E6=AF=95=E4=B8=9A=E7=94=9FId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mz/rec.js | 56 ++++++++++++++++----------- src/views/residence/checkIn/index.vue | 2 + 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/src/api/mz/rec.js b/src/api/mz/rec.js index 1568537..f1d4ae5 100644 --- a/src/api/mz/rec.js +++ b/src/api/mz/rec.js @@ -1,44 +1,56 @@ import request from '@/utils/request' // 查询选房记录列表 -export function listRec(query) { +export function listRecselect(data) { return request({ - url: '/mz/rec/list', - method: 'get', - params: query + url: '/apartment/manager/chooseRoomRecs', + method: 'post', + data }) } // 查询选房记录详细 -export function getRec(id) { +export function getRecSelectInfo(id) { return request({ - url: '/mz/rec/' + id, + url: '/apartment/manager/chooseRoomRecDetail?chooseRoomRecId=' + id, method: 'get' }) } - -// 新增选房记录 -export function addRec(data) { +// 查询入住记录列表 +export function listRecCheckin(data) { return request({ - url: '/mz/rec', + url: '/apartment/manager/listCheckInRecs', method: 'post', - data: data + data }) } - -// 修改选房记录 -export function updateRec(data) { +// 查询选房记录详细 +export function getRecCheckinInfo(id) { return request({ - url: '/mz/rec', - method: 'put', - data: data + url: '/apartment/manager/checkInRecDetail?checkInRecId=' + id, + method: 'get' }) } - -// 删除选房记录 -export function delRec(id) { +// 查询退房记录列表 +export function listCheckOutRec(data) { + return request({ + url: '/apartment/manager/listCheckOutRec', + method: 'post', + data + }) +} +// 查询退房记录详细 +export function getRecCheckOutInfo(id) { return request({ - url: '/mz/rec/' + id, - method: 'delete' + url: '/apartment/manager/checkOutRecDetail?checkOutRecId=' + id, + method: 'get' + }) +} +// 房屋三级联动 +export function queryDeptDropdownList(query) { + return request({ + url: '/system/dept/queryDeptDropdownList', + method: 'get', + params: query }) } diff --git a/src/views/residence/checkIn/index.vue b/src/views/residence/checkIn/index.vue index 53a0038..e33e51a 100644 --- a/src/views/residence/checkIn/index.vue +++ b/src/views/residence/checkIn/index.vue @@ -366,6 +366,8 @@ export default { id: this.userInfo.chooseRecId, // 记录Id checkInDate: this.userInfo.checkInTime, // 入住时间 checkOutDate: this.userInfo.checkOutTime, // 退房时间 + houseId: this.userInfo.houseId, // 房屋Id + graduateId: this.userInfo.graduateId, // 毕业生Id }) if (res.code === 200) { } From 4ad4061a07b9dcbf07d2696846ff857f8968c4b1 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Mon, 26 May 2025 16:24:28 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=88=BF=E5=B1=8B?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- vue.config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.development b/.env.development index 3a34b4b..c1eedfb 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ VUE_APP_TITLE = 青岛免租金住房服务平台 ENV = 'development' # 青岛市免租金住宿保障平台/开发环境 -VUE_APP_BASE_API = 'http://192.168.1.144:8080/mz-api' +VUE_APP_BASE_API = 'http://219.146.91.110:30801/mz-api' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/vue.config.js b/vue.config.js index fc2fbdc..7eb9ac7 100644 --- a/vue.config.js +++ b/vue.config.js @@ -36,7 +36,7 @@ module.exports = { proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - target: `http://192.168.1.144:8088`, + target: `http://219.146.91.110:30801`, changeOrigin: true, pathRewrite: { ["^" + process.env.VUE_APP_BASE_API]: "", From 149177aa67f8f3ac284147fa30f22f04ee7b5535 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Tue, 27 May 2025 10:08:36 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mz/dept/index.vue | 4 +- src/views/mz/house/index.vue | 93 ++++++--------------------- src/views/residence/checkIn/index.vue | 1 - 3 files changed, 22 insertions(+), 76 deletions(-) diff --git a/src/views/mz/dept/index.vue b/src/views/mz/dept/index.vue index fe1380c..25b044b 100644 --- a/src/views/mz/dept/index.vue +++ b/src/views/mz/dept/index.vue @@ -50,9 +50,9 @@ diff --git a/src/views/mz/house/index.vue b/src/views/mz/house/index.vue index 6592bb8..2065c33 100644 --- a/src/views/mz/house/index.vue +++ b/src/views/mz/house/index.vue @@ -2,9 +2,7 @@
- +
- + + + + + + + @@ -235,7 +239,8 @@ export default { houseTypeId: null, remark: null, floor: 0, - hire:'1', + hire:'', + days:null, }, // 表单校验 rules: { @@ -260,7 +265,9 @@ export default { hire: [ { required: true, message: '请选择长租房/短租房', trigger: 'change' } ], - + days: [ + { validator: validateDays, trigger: 'blur' } + ], }, deptList: [], defaultProps: { @@ -273,10 +280,7 @@ export default { buildingOption: [], unitOptions: [], disabled:false, - treeList:[], - expandedKeys: [],// 展开的节点的 key 数组 - checkedKeys: [],// 选中的节点的 key 数组 - showTree: true, + treeList:[] }; }, components: { @@ -374,7 +378,11 @@ export default { remark: null, floor: 0, hire:'1', + days:null, }; + this.buildingOption = []; + this.unitOptions = []; + this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -488,70 +496,9 @@ export default { this.form.unitId = ''; this.unitOptions = []; await this.getUnitbyBuddingId(this.form.buildingId) - }, - // 新增方法:处理树展开逻辑 - handleExpandTree(apartmentId) { - if (!apartmentId) return; - const targetId = Number(apartmentId); - const findParents = (node, targetId, parents = []) => { - if (Number(node.deptId) === targetId) { - return [...parents, node.deptId]; - } - if (node.children) { - for (let child of node.children) { - const result = findParents(child, targetId, [...parents, node.deptId]); - if (result) return result; - } - } - return null; - }; - - let path = null; - for (let node of this.treeList) { - path = findParents(node, targetId); - if (path) break; - } - - if (path) { - // 直接设置展开路径,由于 :accordion="true",其他节点会自动收起 - this.expandedKeys = path; - this.checkedKeys = [path[path.length - 1]]; - } else { - console.warn('未找到匹配的节点路径'); - } - }, + } }, - watch:{ - $route: { - handler: function (newVal, oldVal) { - if (newVal.query) { - this.queryParams = { - ...this.queryParams, - ...newVal.query, - }; - this.treeList = []; - this.showTree = false; - this.$nextTick(() => { - // 重新渲染 el-tree 实例 - this.showTree = true; - this.getList(); - // 等待 deptList 加载完成 - if (this.treeList.length === 0) { - this.getDeptList().then(() => { - this.handleExpandTree(newVal.query.deptId); - }); - } else { - this.handleExpandTree(newVal.query.deptId); - } - }); - } else { - this.getDeptList() - } - }, - immediate: true, - deep: true, - }, - } + watch:{} };