初始化
This commit is contained in:
10
api/inspection/inspectionManage.js
Normal file
10
api/inspection/inspectionManage.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
|
||||
// 查询水电校园安全不良事件详细
|
||||
export function getInspectionManage(id) {
|
||||
return request({
|
||||
url: '/inspection/manage/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
53
api/inspection/record.js
Normal file
53
api/inspection/record.js
Normal file
@@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询巡检记录列表
|
||||
export function listRecord(query) {
|
||||
return request({
|
||||
url: '/inspection/record/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询巡检记录详细
|
||||
export function getRecord(id) {
|
||||
return request({
|
||||
url: '/inspection/record/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增巡检记录
|
||||
export function addRecord(data) {
|
||||
return request({
|
||||
url: '/inspection/record',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改巡检记录
|
||||
export function updateRecord(data) {
|
||||
return request({
|
||||
url: '/inspection/record',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除巡检记录
|
||||
export function delRecord(id) {
|
||||
return request({
|
||||
url: '/inspection/record/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询巡检记录列表
|
||||
export function listRecordView(query) {
|
||||
return request({
|
||||
url: '/inspection/record/view',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
68
api/login.js
Normal file
68
api/login.js
Normal file
@@ -0,0 +1,68 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 登录方法
|
||||
export function login(username, password, code, uuid) {
|
||||
const data = {
|
||||
username,
|
||||
password,
|
||||
code,
|
||||
uuid
|
||||
}
|
||||
return request({
|
||||
'url': '/login',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
'method': 'post',
|
||||
'data': data
|
||||
})
|
||||
}
|
||||
|
||||
// 注册方法
|
||||
export function register(data) {
|
||||
return request({
|
||||
url: '/register',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户详细信息
|
||||
export function getInfo() {
|
||||
return request({
|
||||
'url': '/getInfo',
|
||||
'method': 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 退出方法
|
||||
export function logout() {
|
||||
return request({
|
||||
'url': '/logout',
|
||||
'method': 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取验证码
|
||||
export function getCodeImg() {
|
||||
return request({
|
||||
'url': '/captchaImage',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'get',
|
||||
timeout: 20000
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获取路由
|
||||
export const getRouters = () => {
|
||||
return request({
|
||||
url: '/getRouters',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
47
api/sidebar/sidebar.js
Normal file
47
api/sidebar/sidebar.js
Normal file
@@ -0,0 +1,47 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询水电校园安全不良事件列表
|
||||
export function listSafetyDeclaration(query) {
|
||||
return request({
|
||||
url: '/sidebarApp/safetyDeclaration/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询水电校园安全不良事件详细
|
||||
export function getSafetyDeclaration(id) {
|
||||
return request({
|
||||
url: '/sidebarApp/safetyDeclaration/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增水电校园安全不良事件
|
||||
|
||||
export function addSafetyDeclaration(data) {
|
||||
return request({
|
||||
url: '/sidebarApp/safetyDeclaration',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改水电校园安全不良事件
|
||||
|
||||
export function updateSafetyDeclaration(data) {
|
||||
return request({
|
||||
url: '/sidebarApp/safetyDeclaration',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除水电校园安全不良事件
|
||||
|
||||
export function delSafetyDeclaration(id) {
|
||||
return request({
|
||||
url: '/sidebarApp/safetyDeclaration/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
52
api/system/dict/data.js
Normal file
52
api/system/dict/data.js
Normal file
@@ -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',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除字典数据
|
||||
export function delData(dictCode) {
|
||||
return request({
|
||||
url: '/system/dict/data/' + dictCode,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
58
api/system/user.js
Normal file
58
api/system/user.js
Normal file
@@ -0,0 +1,58 @@
|
||||
import upload from '@/utils/upload'
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 用户密码重置
|
||||
export function updateUserPwd(oldPassword, newPassword) {
|
||||
const data = {
|
||||
oldPassword,
|
||||
newPassword
|
||||
}
|
||||
return request({
|
||||
url: '/system/user/profile/updatePwd',
|
||||
method: 'put',
|
||||
params: 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 uploadAvatar(data) {
|
||||
return upload({
|
||||
url: '/system/user/profile/avatar',
|
||||
name: data.name,
|
||||
filePath: data.filePath
|
||||
})
|
||||
}
|
||||
|
||||
// // 图片上传
|
||||
// export function uploadImg(data) {
|
||||
// return upload({
|
||||
// url: '/common/upload',
|
||||
// name: data.name,
|
||||
// filePath: data.filePath
|
||||
// })
|
||||
// }
|
||||
|
||||
export function uploadImg(data) {
|
||||
return upload({
|
||||
url: '/common/upload',
|
||||
method: 'post',
|
||||
filePath: data.filePath
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user