From 0ac28faa2e56b2e9af5b06f9be761f7f0cb39bf2 Mon Sep 17 00:00:00 2001 From: Kobin <2686591467@qq.com> Date: Wed, 17 Jan 2024 21:19:44 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BC=A0=E6=A0=87=E6=94=BE=E5=85=A5=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=A1=8C=EF=BC=8C=E6=94=B9=E5=8F=98=E8=AF=A5=E8=A1=8C?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E9=A2=9C=E8=89=B2=E4=BB=A3=E7=A0=81=E5=9B=9E?= =?UTF-8?q?=E9=80=80=E5=90=8E=E9=87=8D=E6=96=B0=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 10 +- src/store/index.js | 15 +- src/utils/payM.js | 14 +- src/views/root.vue | 72 ++--- src/views/test/guahao/shoufei.vue | 362 +++++++++++++---------- src/views/test/guahao/tuihao.vue | 434 ++++++++++++++++++++-------- src/views/test/guahao/xianchang.vue | 120 +++++++- vue.config.js | 27 +- 8 files changed, 720 insertions(+), 334 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index ce5da50..8f361b0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -19,7 +19,6 @@ let router = new VueRouter({ component: ()=>import('@/views/home.vue'), children:[ { - path: '/user', component: ()=>import('@/views/user'), }, @@ -152,19 +151,19 @@ let router = new VueRouter({ }, {path:'/yaopinguanli', component:()=>import('@/views/test/yaofangguanli/yaopinguanli.vue'), - }, {path:'/file', component:()=>import('@/views/file.vue'), - }, - { path: '/test/teacher', component: ()=>import('@/views/test/teacher'), } ,{ path: '/test/student', component: ()=>import('@/views/test/student'), + } ,{ + path: '/room/detail', + component: ()=>import('@/views/test/guahao/roomdetail'), } ] }, @@ -181,9 +180,6 @@ let whitelist = [ router.beforeEach((to,from,next)=>{ - // console.log("to:",to) - // console.log("from",from) - // console.log("next:",next); let token = store.getters.getToken; //如果登录状态不存在,需要跳转到登录页 let toPath = to.path; //不在白名单中 diff --git a/src/store/index.js b/src/store/index.js index 508096f..f827842 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -7,28 +7,23 @@ Vue.use(Vuex) const store = new Vuex.Store({ //设置插件 createPersistedState 将状态默认放到localStorage(浏览器关闭之后还在), 可以设置 为 storage: window.sessionStorage - plugins: [createPersistedState()], + plugins: [createPersistedState()], //state是数据 ,不提供外部直接访问 state: { - num:100, + num:100, token: '' }, //操作,用于操作state ,类似于Java实体类中的 setter mutations: { setToken (state,token) { state.token = token;//将外部传递过来的 token,放到公共的内存中 - // window.localStorage 本地存储 每个应用独立使用控件 http://localhost:80 http://localhost:9090 - // window.localStorage.put("token",token) } }, //用于获取状态中的属性值 getters:{ - getToken:function(state){ - // if(!state.token){ - // return window.localStorage.getItem("token") - // } - return state.token; - } + getToken:function(state){ + return state.token; + } } }) diff --git a/src/utils/payM.js b/src/utils/payM.js index 30994ba..e4a6070 100644 --- a/src/utils/payM.js +++ b/src/utils/payM.js @@ -11,4 +11,16 @@ export const saveRoom = (params) => { return req("post", "/api/room/save", param //删除房屋 export const dealRoom = (params) => { return req("post", "/api/room/deleteById", params)}; //编辑房屋 -export const updateRoom = (params) => { return req("post", "/api/room/update", params)}; \ No newline at end of file +export const updateRoom = (params) => { return req("post", "/api/room/update", params)}; + +//所有房屋汇总查询 +export const listAll = (params) => { return req("post", "/api/room/listAll", params)}; + +//审批房间状态 +export const approve = (params) => { return req("post", "/api/room/approve", params)}; + +//发布房间 +export const release = (params) => { return req("post", "/api/room/release", params)}; + +//取消发布房间 +export const cancelrelease = (params) => { return req("post", "/api/room/cancelrelease", params)}; \ No newline at end of file diff --git a/src/views/root.vue b/src/views/root.vue index fda507c..4edb3f2 100644 --- a/src/views/root.vue +++ b/src/views/root.vue @@ -1,44 +1,44 @@ diff --git a/src/views/test/guahao/shoufei.vue b/src/views/test/guahao/shoufei.vue index d825350..4e26df6 100644 --- a/src/views/test/guahao/shoufei.vue +++ b/src/views/test/guahao/shoufei.vue @@ -1,152 +1,222 @@ - + \ No newline at end of file diff --git a/src/views/test/guahao/tuihao.vue b/src/views/test/guahao/tuihao.vue index 31d7273..2718e54 100644 --- a/src/views/test/guahao/tuihao.vue +++ b/src/views/test/guahao/tuihao.vue @@ -1,122 +1,324 @@ - +/** +* 房屋管理 房屋汇总 +*/ - + \ No newline at end of file diff --git a/src/views/test/guahao/xianchang.vue b/src/views/test/guahao/xianchang.vue index 205ddaf..09268f9 100644 --- a/src/views/test/guahao/xianchang.vue +++ b/src/views/test/guahao/xianchang.vue @@ -13,6 +13,13 @@ + + + + + + + 搜索 添加 @@ -41,14 +48,18 @@ - + + - + @@ -101,11 +112,30 @@ 保存 + + + + + + + + + + + + + + + + diff --git a/vue.config.js b/vue.config.js index 3c5c42d..8027dda 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,17 +1,16 @@ module.exports = { lintOnSave:false, //关闭代码格式化校验工具 - //80 - devServer:{ - port:80, - proxy: { - // /api/channel http://localhost:8080/his/channel - // /api/user/list http://localhost:8080/his/user/list - '/api': { - target: "http://localhost:8080/", - changeOrigin: true, - //logLevel:'debug', - pathRewrite: { ['^/api']:'' } - } - } - } + devServer:{ + port:80, + proxy: { + // /api/channel http://localhost:8080/his/channel + // /api/user/list http://localhost:8080/his/user/list + '/api': { + target: "http://localhost:8080/", + changeOrigin: true, + //logLevel:'debug', + pathRewrite: { ['^/api']:'' } + } + } + } } -- Gitee