diff --git a/common/api.js b/common/api.js
index 1ed3a34..0b23ce9 100644
--- a/common/api.js
+++ b/common/api.js
@@ -45,4 +45,4 @@ export function getRoomCheckRecDetail(query) {
method: "get",
params: query,
});
-}
\ No newline at end of file
+}
diff --git a/common/system/config.js b/common/system/config.js
new file mode 100644
index 0000000..a404d82
--- /dev/null
+++ b/common/system/config.js
@@ -0,0 +1,60 @@
+import request from '@/utils/request'
+
+// 查询参数列表
+export function listConfig(query) {
+ return request({
+ url: '/system/config/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询参数详细
+export function getConfig(configId) {
+ return request({
+ url: '/system/config/' + configId,
+ method: 'get'
+ })
+}
+
+// 根据参数键名查询参数值
+export function getConfigKey(configKey) {
+ return request({
+ url: '/system/config/configKey/' + configKey,
+ method: 'get'
+ })
+}
+
+// 新增参数配置
+export function addConfig(data) {
+ return request({
+ url: '/system/config',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改参数配置
+export function updateConfig(data) {
+ return request({
+ url: '/system/config',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除参数配置
+export function delConfig(configId) {
+ return request({
+ url: '/system/config/' + configId,
+ method: 'delete'
+ })
+}
+
+// 刷新参数缓存
+export function refreshCache() {
+ return request({
+ url: '/system/config/refreshCache',
+ method: 'delete'
+ })
+}
diff --git a/common/system/dept.js b/common/system/dept.js
new file mode 100644
index 0000000..9f8864b
--- /dev/null
+++ b/common/system/dept.js
@@ -0,0 +1,72 @@
+import request from '@/utils/request'
+
+// 查询部门列表
+export function listDept(query) {
+ return request({
+ url: '/system/dept/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询部门列表(排除节点)
+export function listDeptExcludeChild(deptId) {
+ return request({
+ url: '/system/dept/list/exclude/' + deptId,
+ method: 'get'
+ })
+}
+
+// 查询部门详细
+export function getDept(deptId) {
+ return request({
+ url: '/system/dept/' + deptId,
+ method: 'get'
+ })
+}
+
+// 新增部门
+export function addDept(data) {
+ return request({
+ url: '/system/dept',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改部门
+export function updateDept(data) {
+ return request({
+ url: '/system/dept/edit',
+ method: 'post',
+ data: data
+ })
+}
+
+// 删除部门
+export function delDept(deptId) {
+ return request({
+ url: "/mz/apartment/delete/" + deptId,
+ method: "post",
+ });
+}
+
+// 上传部门图片
+export function uploadDeptImages(data) {
+ return request({
+ url: '/system/dept/upload',
+ method: 'post',
+ data: data,
+ headers: {
+ 'Content-Type': 'multipart/form-data'
+ }
+ })
+}
+
+// 房屋专属左侧组织树
+export function getdeptList() {
+ return request({
+ url: '/mz/building/getdeptList',
+ method: 'get'
+ })
+}
\ No newline at end of file
diff --git a/common/system/dict/data.js b/common/system/dict/data.js
new file mode 100644
index 0000000..8e3c63a
--- /dev/null
+++ b/common/system/dict/data.js
@@ -0,0 +1,52 @@
+import request from '@/utils/request'
+
+// 查询字典数据列表
+export function listData(query) {
+ return request({
+ url: '/system/dict/data/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询字典数据详细
+export function getData(dictCode) {
+ return request({
+ url: '/system/dict/data/' + dictCode,
+ method: 'get'
+ })
+}
+
+// 根据字典类型查询字典数据信息
+export function getDicts(dictType) {
+ return request({
+ url: '/system/dict/data/type/' + dictType,
+ method: 'get'
+ })
+}
+
+// 新增字典数据
+export function addData(data) {
+ return request({
+ url: '/system/dict/data',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改字典数据
+export function updateData(data) {
+ return request({
+ url: '/system/dict/data/updata',
+ method: 'post',
+ data: data
+ })
+}
+
+// 删除字典数据
+export function delData(dictCode) {
+ return request({
+ url: '/system/dict/data/' + dictCode,
+ method: 'delete'
+ })
+}
diff --git a/common/system/dict/type.js b/common/system/dict/type.js
new file mode 100644
index 0000000..16e6aac
--- /dev/null
+++ b/common/system/dict/type.js
@@ -0,0 +1,60 @@
+import request from '@/utils/request'
+
+// 查询字典类型列表
+export function listType(query) {
+ return request({
+ url: '/system/dict/type/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询字典类型详细
+export function getType(dictId) {
+ return request({
+ url: '/system/dict/type/' + dictId,
+ method: 'get'
+ })
+}
+
+// 新增字典类型
+export function addType(data) {
+ return request({
+ url: '/system/dict/type',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改字典类型
+export function updateType(data) {
+ return request({
+ url: '/system/dict/type/edit',
+ method: 'post',
+ data: data
+ })
+}
+
+// 删除字典类型
+export function delType(dictId) {
+ return request({
+ url: '/system/dict/type/delete/' + dictId,
+ method: 'post'
+ })
+}
+
+// 刷新字典缓存
+export function refreshCache() {
+ return request({
+ url: '/system/dict/type/refreshCache',
+ method: 'post'
+ })
+}
+
+// 获取字典选择框列表
+export function optionselect() {
+ return request({
+ url: '/system/dict/type/optionselect',
+ method: 'get'
+ })
+}
\ No newline at end of file
diff --git a/common/system/menu.js b/common/system/menu.js
new file mode 100644
index 0000000..6e70be1
--- /dev/null
+++ b/common/system/menu.js
@@ -0,0 +1,74 @@
+import request from '@/utils/request'
+
+// 查询菜单列表
+export function listMenu(query) {
+ return request({
+ url: '/system/menu/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询菜单详细
+export function getMenu(menuId) {
+ return request({
+ url: '/system/menu/' + menuId,
+ method: 'get'
+ })
+}
+
+// 查询菜单下拉树结构
+export function treeselect() {
+ return request({
+ url: '/system/menu/treeselect',
+ method: 'get'
+ })
+}
+
+// 根据角色ID查询菜单下拉树结构
+export function roleMenuTreeselect(roleId) {
+ return request({
+ url: '/system/menu/roleMenuTreeselect/' + roleId,
+ method: 'get'
+ })
+}
+
+// 新增菜单
+export function addMenu(data) {
+ return request({
+ url: '/system/menu',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改菜单
+export function updateMenu(data) {
+ return request({
+ url: '/system/menu/update',
+ method: 'post',
+ data: data
+ })
+}
+
+// 删除菜单
+export function delMenu(menuId) {
+ return request({
+ url: '/system/menu/delete/' + menuId,
+ method: 'post'
+ })
+}
+// 清除缓存
+export const clearCache = () => {
+ return request({
+ url: '/cache/clearAll',
+ method: 'get'
+ })
+}
+// 清除缓存
+export const clearCache1 = () => {
+ return request({
+ url: '/static/count',
+ method: 'get'
+ })
+}
\ No newline at end of file
diff --git a/common/system/notice.js b/common/system/notice.js
new file mode 100644
index 0000000..c274ea5
--- /dev/null
+++ b/common/system/notice.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询公告列表
+export function listNotice(query) {
+ return request({
+ url: '/system/notice/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询公告详细
+export function getNotice(noticeId) {
+ return request({
+ url: '/system/notice/' + noticeId,
+ method: 'get'
+ })
+}
+
+// 新增公告
+export function addNotice(data) {
+ return request({
+ url: '/system/notice',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改公告
+export function updateNotice(data) {
+ return request({
+ url: '/system/notice',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除公告
+export function delNotice(noticeId) {
+ return request({
+ url: '/system/notice/' + noticeId,
+ method: 'delete'
+ })
+}
\ No newline at end of file
diff --git a/common/system/post.js b/common/system/post.js
new file mode 100644
index 0000000..1a8e9ca
--- /dev/null
+++ b/common/system/post.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询岗位列表
+export function listPost(query) {
+ return request({
+ url: '/system/post/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询岗位详细
+export function getPost(postId) {
+ return request({
+ url: '/system/post/' + postId,
+ method: 'get'
+ })
+}
+
+// 新增岗位
+export function addPost(data) {
+ return request({
+ url: '/system/post',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改岗位
+export function updatePost(data) {
+ return request({
+ url: '/system/post',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除岗位
+export function delPost(postId) {
+ return request({
+ url: '/system/post/' + postId,
+ method: 'delete'
+ })
+}
diff --git a/common/system/role.js b/common/system/role.js
new file mode 100644
index 0000000..aadd9ff
--- /dev/null
+++ b/common/system/role.js
@@ -0,0 +1,119 @@
+import request from '@/utils/request'
+
+// 查询角色列表
+export function listRole(query) {
+ return request({
+ url: '/system/role/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询角色详细
+export function getRole(roleId) {
+ return request({
+ url: '/system/role/' + roleId,
+ method: 'get'
+ })
+}
+
+// 新增角色
+export function addRole(data) {
+ return request({
+ url: '/system/role',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改角色
+export function updateRole(data) {
+ return request({
+ url: '/system/role/update',
+ method: 'post',
+ data: data
+ })
+}
+
+// 角色数据权限
+export function dataScope(data) {
+ return request({
+ url: '/system/role/dataScope',
+ method: 'post',
+ data: data
+ })
+}
+
+// 角色状态修改
+export function changeRoleStatus(roleId, status) {
+ const data = {
+ roleId,
+ status
+ }
+ return request({
+ url: '/system/role/changeStatus',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除角色
+export function delRole(roleId) {
+ return request({
+ url: '/system/role/delete/' + roleId,
+ method: 'post'
+ })
+}
+
+// 查询角色已授权用户列表
+export function allocatedUserList(query) {
+ return request({
+ url: '/system/role/authUser/allocatedList',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询角色未授权用户列表
+export function unallocatedUserList(query) {
+ return request({
+ url: '/system/role/authUser/unallocatedList',
+ method: 'get',
+ params: query
+ })
+}
+
+// 取消用户授权角色
+export function authUserCancel(data) {
+ return request({
+ url: '/system/role/authUser/cancel',
+ method: 'post',
+ data: data
+ })
+}
+
+// 批量取消用户授权角色
+export function authUserCancelAll(data) {
+ return request({
+ url: '/system/role/authUser/cancelAll',
+ method: 'post',
+ params: data
+ })
+}
+
+// 授权用户选择
+export function authUserSelectAll(data) {
+ return request({
+ url: '/system/role/authUser/selectAll',
+ method: 'get',
+ params: data
+ })
+}
+
+// 根据角色ID查询部门树结构
+export function deptTreeSelect(roleId) {
+ return request({
+ url: '/system/role/deptTree/' + roleId,
+ method: 'get'
+ })
+}
diff --git a/common/system/user.js b/common/system/user.js
new file mode 100644
index 0000000..f3f5a06
--- /dev/null
+++ b/common/system/user.js
@@ -0,0 +1,136 @@
+import request from '@/utils/request'
+import { parseStrEmpty } from "@/utils/ruoyi";
+
+// 查询用户列表
+export function listUser(query) {
+ return request({
+ url: '/system/user/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询用户详细
+export function getUser(userId) {
+ return request({
+ url: '/system/user/' + parseStrEmpty(userId),
+ method: 'get'
+ })
+}
+
+// 新增用户
+export function addUser(data) {
+ return request({
+ url: '/system/user',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改用户
+export function updateUser(data) {
+ return request({
+ url: '/system/user/update',
+ method: 'post',
+ data: data
+ })
+}
+
+// 删除用户
+export function delUser(userId) {
+ return request({
+ url: '/system/user/delete/' + userId,
+ method: 'post'
+ })
+}
+
+// 用户密码重置
+export function resetUserPwd(userId, password) {
+ const data = {
+ userId,
+ password
+ }
+ return request({
+ url: '/system/user/resetPwd',
+ method: 'post',
+ data: data
+ })
+}
+
+// 用户状态修改
+export function changeUserStatus(userId, status) {
+ const data = {
+ userId,
+ status
+ }
+ return request({
+ url: '/system/user/changeStatus',
+ method: 'post',
+ data: data
+ })
+}
+
+// 查询用户个人信息
+export function getUserProfile() {
+ return request({
+ url: '/system/user/profile',
+ method: 'get'
+ })
+}
+
+// 修改用户个人信息
+export function updateUserProfile(data) {
+ return request({
+ url: '/system/user/profile',
+ method: 'put',
+ data: data
+ })
+}
+
+// 用户密码重置
+export function updateUserPwd(oldPassword, newPassword) {
+ const data = {
+ oldPassword,
+ newPassword
+ }
+ return request({
+ url: '/system/user/profile/updatePwd',
+ method: 'put',
+ params: data
+ })
+}
+
+// 用户头像上传
+export function uploadAvatar(data) {
+ return request({
+ url: '/system/user/profile/avatar',
+ method: 'post',
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
+ data: data
+ })
+}
+
+// 查询授权角色
+export function getAuthRole(userId) {
+ return request({
+ url: '/system/user/authRole/' + userId,
+ method: 'get'
+ })
+}
+
+// 保存授权角色
+export function updateAuthRole(data) {
+ return request({
+ url: '/system/user/authRole',
+ method: 'get',
+ params: data
+ })
+}
+
+// 查询部门下拉树结构
+export function deptTreeSelect() {
+ return request({
+ url: '/system/user/deptTree',
+ method: 'get'
+ })
+}
diff --git a/pages/api.js b/pages/api.js
index e0184e8..69d80bf 100644
--- a/pages/api.js
+++ b/pages/api.js
@@ -1,15 +1,15 @@
-import request from "../utils/request.js";
+import request, { uploadFile } from "../utils/request.js";
// 获取验证码
export function getCodeImg() {
return request({
- url: '/captchaImage',
+ url: "/captchaImage",
header: {
- isToken: false
+ isToken: false,
},
- method: 'get',
- timeout: 20000
- })
+ method: "get",
+ timeout: 20000,
+ });
}
export function login({ username, password, code, uuid, client }) {
return request({
@@ -29,4 +29,32 @@ export function listCheckoutAlert(query) {
method: "get",
params: query,
});
-}
\ No newline at end of file
+}
+export function getRoomFacilities(query) {
+ return request({
+ url: "/apartment/manager/facilitiesByRoomId",
+ method: "get",
+ params: query,
+ });
+}
+// 办理退房
+export function submitCheckout(data) {
+ return request({
+ url: "/apartment/manager/confirmCheckOut",
+ method: "put",
+ data: data,
+ });
+}
+export function uploadImage(filePath, formData = {}) {
+ return uploadFile(filePath, {
+ formData: formData,
+ });
+}
+// 暂存提交退房
+export function tempSaveCheckOut(data) {
+ return request({
+ url: "/apartment/manager/tempSaveCheckOut",
+ method: "post",
+ data: data,
+ });
+}
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 0128129..ac2ba5e 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -73,8 +73,8 @@ export default {
data() {
return {
form: {
- username: "",
- password: "",
+ username: "admin",
+ password: "!Aa12345",
code: "",
uuid: "",
rememberMe: false,
diff --git a/pages/tabBar/xjPage/xj.vue b/pages/tabBar/xjPage/xj.vue
index 256c20c..1ad2f97 100644
--- a/pages/tabBar/xjPage/xj.vue
+++ b/pages/tabBar/xjPage/xj.vue
@@ -9,13 +9,13 @@
-
+
-
+
@@ -68,7 +68,7 @@
-
+
@@ -77,20 +77,22 @@
import {
queryDeptDropdownList,
} from "@/common/rec";
-import { getdeptList,addInspection } from '@/common/api.js';
+import { getdeptList,addInspection,uploadFile } from '@/common/api.js';
+import { getDicts } from "@/common/system/dict/data";
+import { baseUrl } from "@/utils/config";
export default {
data () {
return {
+ uploadUlr: baseUrl + '/common/upload',
wtlxShow: false,
lysqShow: false,
deptOptions: [],
- actions1: [
- { name: '问题1', },
- { name: '问题2', },
- ],
+ questionTypeList: [],
form: {
apartmentId: '',
+ apartmentName:'',
questionType: '',
+ questionName: '',
title: '',
content: '',
inspector: '',
@@ -110,14 +112,28 @@ export default {
},
onLoad () {
this.getTree()
+ this.getDictType()
},
methods: {
afterRead(event) {
- let files = Array.isArray(event) ? event : [event]
+ let files = Array.isArray(event) ? event.file : [event.file]
this.fileList = this.fileList.concat(files)
+ // console.log(this.fileList);
+ this.fileList.forEach( item => {
+ this.uploadFile(item[0])
+ });
},
onDelete(event) {
this.fileList.splice(event.index, 1)
+ this.form.imageList.splice(event.index, 1)
+ },
+ getDictType(){
+ getDicts('inspection_question_type').then((res) => {
+ this.questionTypeList = res.data.map(item=>{
+ item.name = item.dictLabel
+ return item
+ })
+ });
},
getTree(){
getdeptList().then(async (res) => {
@@ -143,17 +159,61 @@ export default {
});
});
},
+
+ uploadFile(file){
+ let that = this
+ console.log('uploadFile',file);
+ uni.uploadFile({
+ url: this.uploadUlr,
+ filePath: file.url,
+ name: 'file', //对应后台接口参数名
+ method: 'post',
+ header: {
+ "Authorization": uni.getStorageSync('token')
+ },
+ formData: {
+ //要上传的文件
+ file: file
+ },
+ success(res) {
+ let data = JSON.parse(res.data)
+ console.log(data);
+ if (data.url) {
+ that.form.imageList.push({
+ url:data.url,
+ name: '',
+ format: file.type
+ })
+ }
+ },
+ fail(res) {
+ uni.showToast({
+ icon: 'error',
+ title: '图片上传失败!'
+ })
+ }
+ })
+ },
handleBtn () {
- addInspection().then(res=>{
- console.log(res);
+ // console.log(this.form);
+ let parmas = JSON.parse(JSON.stringify(this.form))
+ delete parmas.apartmentName
+ delete parmas.questionName
+ addInspection(parmas).then(res=>{
+ uni.showToast({
+ icon: 'success',
+ title: '提交成功!'
+ })
})
},
handleTreeSelect (e) {
- console.log(e);
-
- // this.model1.userInfo.sex = e.name
- // this.$refs.uForm.validateField('userInfo.sex')
+ this.form.apartmentName = e.name
+ this.form.apartmentId = e.id
},
+ handleQuestionSelect(e){
+ this.form.questionName = e.dictLabel
+ this.form.questionType = e.dictValue
+ }
}
}
diff --git a/pagesA/checkout/detail/detail.vue b/pagesA/checkout/detail/detail.vue
index 419f84e..518dc01 100644
--- a/pagesA/checkout/detail/detail.vue
+++ b/pagesA/checkout/detail/detail.vue
@@ -1,3 +1,4 @@
+import { detail } from '@/api/mz/contract';
@@ -8,14 +9,21 @@
>
- 5号楼1单元101 房间1
- 居住人王静
- 性别女
+ {{ info.roomNamePath }}
联系电话187****0001居住人{{ info.graduateName }}
居住日期2025-04-04 至 2025-05-06性别{{ info.gender == 1 ? "男" : "女" }}
+ 联系电话{{ info.telephone }}
+ 居住日期{{ info.checkInDate }}至{{
+ info.checkOutDate
+ }}
@@ -28,17 +36,17 @@
>
{{ item.name }}
@@ -49,7 +57,7 @@
水表数
电表数
其他说明
@@ -108,39 +115,146 @@