diff --git a/src/api/minipro.js b/src/api/minipro.js new file mode 100644 index 0000000..99c71f0 --- /dev/null +++ b/src/api/minipro.js @@ -0,0 +1,138 @@ +import request from '@/utils/request' +// 小程序后台管理相关接口 +const baseURL = 'https://visitor.gd.smartlog.work' + +// 消息列表 +export function GetMessageList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `message/messageList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 消息导出 +export function messageExport(data) { + return request({ + baseURL, + url: '/message/exportList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 用户列表 +export function getUserList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `user/getUserList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 人员导入 +export function batchImportFire(fileobj) { + const param = new FormData() + param.append('multipartFile', fileobj) + return request({ + baseURL, + url: '/user/importList', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(fileName) { + return request({ + baseURL, + url: '/user/download', + method: 'get', + params: { + fileName: 'userModel.xlsx' + }, + responseType: 'blob' + }) +} + +// 访客导出 +export function userExport(data) { + return request({ + baseURL, + url: '/user/exportList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 新增 +export function addUser(data) { + return request({ + baseURL, + url: 'user/addUser', + method: 'post', + data + }) +} + +// 编辑 +export function updateUser(data) { + return request({ + baseURL, + url: 'user/updateUser', + method: 'post', + data + }) +} + +// 删除 +export function delUser(data) { + return request({ + baseURL, + url: 'user/delUser', + method: 'post', + data + }) +} + +// 访客列表 +export function getApplyList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `visitor/getApplyList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 访客导出 +export function visitorExport(data) { + return request({ + baseURL, + url: '/visitor/exportApplyList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/api/minipro.js b/src/api/minipro.js new file mode 100644 index 0000000..99c71f0 --- /dev/null +++ b/src/api/minipro.js @@ -0,0 +1,138 @@ +import request from '@/utils/request' +// 小程序后台管理相关接口 +const baseURL = 'https://visitor.gd.smartlog.work' + +// 消息列表 +export function GetMessageList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `message/messageList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 消息导出 +export function messageExport(data) { + return request({ + baseURL, + url: '/message/exportList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 用户列表 +export function getUserList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `user/getUserList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 人员导入 +export function batchImportFire(fileobj) { + const param = new FormData() + param.append('multipartFile', fileobj) + return request({ + baseURL, + url: '/user/importList', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(fileName) { + return request({ + baseURL, + url: '/user/download', + method: 'get', + params: { + fileName: 'userModel.xlsx' + }, + responseType: 'blob' + }) +} + +// 访客导出 +export function userExport(data) { + return request({ + baseURL, + url: '/user/exportList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 新增 +export function addUser(data) { + return request({ + baseURL, + url: 'user/addUser', + method: 'post', + data + }) +} + +// 编辑 +export function updateUser(data) { + return request({ + baseURL, + url: 'user/updateUser', + method: 'post', + data + }) +} + +// 删除 +export function delUser(data) { + return request({ + baseURL, + url: 'user/delUser', + method: 'post', + data + }) +} + +// 访客列表 +export function getApplyList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `visitor/getApplyList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 访客导出 +export function visitorExport(data) { + return request({ + baseURL, + url: '/visitor/exportApplyList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/router/index.js b/src/router/index.js index 6c81d9b..a29418b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -45,6 +45,9 @@ { path: '/bottom', component: () => import('@/views/popup/bottom'), hidden: true }, { path: '/floor', component: () => import('@/views/popup/floor'), hidden: true }, { path: '/board', component: () => import('@/views/popup/board'), hidden: true }, + // { path: '/messageList', component: () => import('@/views/backstage/messageList'), hidden: true }, + // { path: '/personList', component: () => import('@/views/backstage/personList'), hidden: true }, + // { path: '/visitList', component: () => import('@/views/backstage/visitList'), hidden: true }, { path: '/device/pop', component: () => import('@/views/popup/device'), hidden: true }, { path: '/case/pop', component: () => import('@/views/popup/case'), hidden: true }, diff --git a/src/api/minipro.js b/src/api/minipro.js new file mode 100644 index 0000000..99c71f0 --- /dev/null +++ b/src/api/minipro.js @@ -0,0 +1,138 @@ +import request from '@/utils/request' +// 小程序后台管理相关接口 +const baseURL = 'https://visitor.gd.smartlog.work' + +// 消息列表 +export function GetMessageList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `message/messageList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 消息导出 +export function messageExport(data) { + return request({ + baseURL, + url: '/message/exportList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 用户列表 +export function getUserList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `user/getUserList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 人员导入 +export function batchImportFire(fileobj) { + const param = new FormData() + param.append('multipartFile', fileobj) + return request({ + baseURL, + url: '/user/importList', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(fileName) { + return request({ + baseURL, + url: '/user/download', + method: 'get', + params: { + fileName: 'userModel.xlsx' + }, + responseType: 'blob' + }) +} + +// 访客导出 +export function userExport(data) { + return request({ + baseURL, + url: '/user/exportList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 新增 +export function addUser(data) { + return request({ + baseURL, + url: 'user/addUser', + method: 'post', + data + }) +} + +// 编辑 +export function updateUser(data) { + return request({ + baseURL, + url: 'user/updateUser', + method: 'post', + data + }) +} + +// 删除 +export function delUser(data) { + return request({ + baseURL, + url: 'user/delUser', + method: 'post', + data + }) +} + +// 访客列表 +export function getApplyList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `visitor/getApplyList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 访客导出 +export function visitorExport(data) { + return request({ + baseURL, + url: '/visitor/exportApplyList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/router/index.js b/src/router/index.js index 6c81d9b..a29418b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -45,6 +45,9 @@ { path: '/bottom', component: () => import('@/views/popup/bottom'), hidden: true }, { path: '/floor', component: () => import('@/views/popup/floor'), hidden: true }, { path: '/board', component: () => import('@/views/popup/board'), hidden: true }, + // { path: '/messageList', component: () => import('@/views/backstage/messageList'), hidden: true }, + // { path: '/personList', component: () => import('@/views/backstage/personList'), hidden: true }, + // { path: '/visitList', component: () => import('@/views/backstage/visitList'), hidden: true }, { path: '/device/pop', component: () => import('@/views/popup/device'), hidden: true }, { path: '/case/pop', component: () => import('@/views/popup/case'), hidden: true }, diff --git a/src/router/modules/menu.js b/src/router/modules/menu.js index 9292a60..907a6ea 100644 --- a/src/router/modules/menu.js +++ b/src/router/modules/menu.js @@ -15,7 +15,7 @@ path: '/caseList', name: 'CaseList', component: () => import('@/views/case/caseList'), - meta: { title: '安防事件管理', icon: ''} + meta: { title: '安防事件管理', icon: '' } }, { path: '/caseLevelList', @@ -263,6 +263,36 @@ meta: { title: '能源数据', icon: '' } } ] + }, + { + path: 'backstage', + component: Layout, + redirect: '/backstage', + name: 'Backstage', + meta: { + title: '', + icon: 'icon-config' // 图标 + }, + children: [ + { + path: '/messageList', + name: 'MessageList', + component: () => import('@/views/backstage/messageList'), + meta: { title: '消息后台', icon: '' } + }, + { + path: '/personList', + name: 'PersonList', + component: () => import('@/views/backstage/personList'), + meta: { title: '人员管理后台', icon: '' } + }, + { + path: '/visitAdmin', + name: 'VisitList', + component: () => import('@/views/backstage/visitList'), + meta: { title: '访客申请后台', icon: '' } + } + ] } // { // path: 'security', diff --git a/src/api/minipro.js b/src/api/minipro.js new file mode 100644 index 0000000..99c71f0 --- /dev/null +++ b/src/api/minipro.js @@ -0,0 +1,138 @@ +import request from '@/utils/request' +// 小程序后台管理相关接口 +const baseURL = 'https://visitor.gd.smartlog.work' + +// 消息列表 +export function GetMessageList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `message/messageList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 消息导出 +export function messageExport(data) { + return request({ + baseURL, + url: '/message/exportList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 用户列表 +export function getUserList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `user/getUserList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 人员导入 +export function batchImportFire(fileobj) { + const param = new FormData() + param.append('multipartFile', fileobj) + return request({ + baseURL, + url: '/user/importList', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(fileName) { + return request({ + baseURL, + url: '/user/download', + method: 'get', + params: { + fileName: 'userModel.xlsx' + }, + responseType: 'blob' + }) +} + +// 访客导出 +export function userExport(data) { + return request({ + baseURL, + url: '/user/exportList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 新增 +export function addUser(data) { + return request({ + baseURL, + url: 'user/addUser', + method: 'post', + data + }) +} + +// 编辑 +export function updateUser(data) { + return request({ + baseURL, + url: 'user/updateUser', + method: 'post', + data + }) +} + +// 删除 +export function delUser(data) { + return request({ + baseURL, + url: 'user/delUser', + method: 'post', + data + }) +} + +// 访客列表 +export function getApplyList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `visitor/getApplyList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 访客导出 +export function visitorExport(data) { + return request({ + baseURL, + url: '/visitor/exportApplyList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/router/index.js b/src/router/index.js index 6c81d9b..a29418b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -45,6 +45,9 @@ { path: '/bottom', component: () => import('@/views/popup/bottom'), hidden: true }, { path: '/floor', component: () => import('@/views/popup/floor'), hidden: true }, { path: '/board', component: () => import('@/views/popup/board'), hidden: true }, + // { path: '/messageList', component: () => import('@/views/backstage/messageList'), hidden: true }, + // { path: '/personList', component: () => import('@/views/backstage/personList'), hidden: true }, + // { path: '/visitList', component: () => import('@/views/backstage/visitList'), hidden: true }, { path: '/device/pop', component: () => import('@/views/popup/device'), hidden: true }, { path: '/case/pop', component: () => import('@/views/popup/case'), hidden: true }, diff --git a/src/router/modules/menu.js b/src/router/modules/menu.js index 9292a60..907a6ea 100644 --- a/src/router/modules/menu.js +++ b/src/router/modules/menu.js @@ -15,7 +15,7 @@ path: '/caseList', name: 'CaseList', component: () => import('@/views/case/caseList'), - meta: { title: '安防事件管理', icon: ''} + meta: { title: '安防事件管理', icon: '' } }, { path: '/caseLevelList', @@ -263,6 +263,36 @@ meta: { title: '能源数据', icon: '' } } ] + }, + { + path: 'backstage', + component: Layout, + redirect: '/backstage', + name: 'Backstage', + meta: { + title: '', + icon: 'icon-config' // 图标 + }, + children: [ + { + path: '/messageList', + name: 'MessageList', + component: () => import('@/views/backstage/messageList'), + meta: { title: '消息后台', icon: '' } + }, + { + path: '/personList', + name: 'PersonList', + component: () => import('@/views/backstage/personList'), + meta: { title: '人员管理后台', icon: '' } + }, + { + path: '/visitAdmin', + name: 'VisitList', + component: () => import('@/views/backstage/visitList'), + meta: { title: '访客申请后台', icon: '' } + } + ] } // { // path: 'security', diff --git a/src/views/backstage/messageList.vue b/src/views/backstage/messageList.vue new file mode 100644 index 0000000..b6ae4ce --- /dev/null +++ b/src/views/backstage/messageList.vue @@ -0,0 +1,250 @@ + + + + + diff --git a/src/api/minipro.js b/src/api/minipro.js new file mode 100644 index 0000000..99c71f0 --- /dev/null +++ b/src/api/minipro.js @@ -0,0 +1,138 @@ +import request from '@/utils/request' +// 小程序后台管理相关接口 +const baseURL = 'https://visitor.gd.smartlog.work' + +// 消息列表 +export function GetMessageList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `message/messageList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 消息导出 +export function messageExport(data) { + return request({ + baseURL, + url: '/message/exportList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 用户列表 +export function getUserList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `user/getUserList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 人员导入 +export function batchImportFire(fileobj) { + const param = new FormData() + param.append('multipartFile', fileobj) + return request({ + baseURL, + url: '/user/importList', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(fileName) { + return request({ + baseURL, + url: '/user/download', + method: 'get', + params: { + fileName: 'userModel.xlsx' + }, + responseType: 'blob' + }) +} + +// 访客导出 +export function userExport(data) { + return request({ + baseURL, + url: '/user/exportList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 新增 +export function addUser(data) { + return request({ + baseURL, + url: 'user/addUser', + method: 'post', + data + }) +} + +// 编辑 +export function updateUser(data) { + return request({ + baseURL, + url: 'user/updateUser', + method: 'post', + data + }) +} + +// 删除 +export function delUser(data) { + return request({ + baseURL, + url: 'user/delUser', + method: 'post', + data + }) +} + +// 访客列表 +export function getApplyList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `visitor/getApplyList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 访客导出 +export function visitorExport(data) { + return request({ + baseURL, + url: '/visitor/exportApplyList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/router/index.js b/src/router/index.js index 6c81d9b..a29418b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -45,6 +45,9 @@ { path: '/bottom', component: () => import('@/views/popup/bottom'), hidden: true }, { path: '/floor', component: () => import('@/views/popup/floor'), hidden: true }, { path: '/board', component: () => import('@/views/popup/board'), hidden: true }, + // { path: '/messageList', component: () => import('@/views/backstage/messageList'), hidden: true }, + // { path: '/personList', component: () => import('@/views/backstage/personList'), hidden: true }, + // { path: '/visitList', component: () => import('@/views/backstage/visitList'), hidden: true }, { path: '/device/pop', component: () => import('@/views/popup/device'), hidden: true }, { path: '/case/pop', component: () => import('@/views/popup/case'), hidden: true }, diff --git a/src/router/modules/menu.js b/src/router/modules/menu.js index 9292a60..907a6ea 100644 --- a/src/router/modules/menu.js +++ b/src/router/modules/menu.js @@ -15,7 +15,7 @@ path: '/caseList', name: 'CaseList', component: () => import('@/views/case/caseList'), - meta: { title: '安防事件管理', icon: ''} + meta: { title: '安防事件管理', icon: '' } }, { path: '/caseLevelList', @@ -263,6 +263,36 @@ meta: { title: '能源数据', icon: '' } } ] + }, + { + path: 'backstage', + component: Layout, + redirect: '/backstage', + name: 'Backstage', + meta: { + title: '', + icon: 'icon-config' // 图标 + }, + children: [ + { + path: '/messageList', + name: 'MessageList', + component: () => import('@/views/backstage/messageList'), + meta: { title: '消息后台', icon: '' } + }, + { + path: '/personList', + name: 'PersonList', + component: () => import('@/views/backstage/personList'), + meta: { title: '人员管理后台', icon: '' } + }, + { + path: '/visitAdmin', + name: 'VisitList', + component: () => import('@/views/backstage/visitList'), + meta: { title: '访客申请后台', icon: '' } + } + ] } // { // path: 'security', diff --git a/src/views/backstage/messageList.vue b/src/views/backstage/messageList.vue new file mode 100644 index 0000000..b6ae4ce --- /dev/null +++ b/src/views/backstage/messageList.vue @@ -0,0 +1,250 @@ + + + + + diff --git a/src/views/backstage/personList.vue b/src/views/backstage/personList.vue new file mode 100644 index 0000000..5206f7a --- /dev/null +++ b/src/views/backstage/personList.vue @@ -0,0 +1,586 @@ + + + + + diff --git a/src/api/minipro.js b/src/api/minipro.js new file mode 100644 index 0000000..99c71f0 --- /dev/null +++ b/src/api/minipro.js @@ -0,0 +1,138 @@ +import request from '@/utils/request' +// 小程序后台管理相关接口 +const baseURL = 'https://visitor.gd.smartlog.work' + +// 消息列表 +export function GetMessageList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `message/messageList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 消息导出 +export function messageExport(data) { + return request({ + baseURL, + url: '/message/exportList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 用户列表 +export function getUserList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `user/getUserList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 人员导入 +export function batchImportFire(fileobj) { + const param = new FormData() + param.append('multipartFile', fileobj) + return request({ + baseURL, + url: '/user/importList', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(fileName) { + return request({ + baseURL, + url: '/user/download', + method: 'get', + params: { + fileName: 'userModel.xlsx' + }, + responseType: 'blob' + }) +} + +// 访客导出 +export function userExport(data) { + return request({ + baseURL, + url: '/user/exportList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 新增 +export function addUser(data) { + return request({ + baseURL, + url: 'user/addUser', + method: 'post', + data + }) +} + +// 编辑 +export function updateUser(data) { + return request({ + baseURL, + url: 'user/updateUser', + method: 'post', + data + }) +} + +// 删除 +export function delUser(data) { + return request({ + baseURL, + url: 'user/delUser', + method: 'post', + data + }) +} + +// 访客列表 +export function getApplyList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `visitor/getApplyList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 访客导出 +export function visitorExport(data) { + return request({ + baseURL, + url: '/visitor/exportApplyList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/router/index.js b/src/router/index.js index 6c81d9b..a29418b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -45,6 +45,9 @@ { path: '/bottom', component: () => import('@/views/popup/bottom'), hidden: true }, { path: '/floor', component: () => import('@/views/popup/floor'), hidden: true }, { path: '/board', component: () => import('@/views/popup/board'), hidden: true }, + // { path: '/messageList', component: () => import('@/views/backstage/messageList'), hidden: true }, + // { path: '/personList', component: () => import('@/views/backstage/personList'), hidden: true }, + // { path: '/visitList', component: () => import('@/views/backstage/visitList'), hidden: true }, { path: '/device/pop', component: () => import('@/views/popup/device'), hidden: true }, { path: '/case/pop', component: () => import('@/views/popup/case'), hidden: true }, diff --git a/src/router/modules/menu.js b/src/router/modules/menu.js index 9292a60..907a6ea 100644 --- a/src/router/modules/menu.js +++ b/src/router/modules/menu.js @@ -15,7 +15,7 @@ path: '/caseList', name: 'CaseList', component: () => import('@/views/case/caseList'), - meta: { title: '安防事件管理', icon: ''} + meta: { title: '安防事件管理', icon: '' } }, { path: '/caseLevelList', @@ -263,6 +263,36 @@ meta: { title: '能源数据', icon: '' } } ] + }, + { + path: 'backstage', + component: Layout, + redirect: '/backstage', + name: 'Backstage', + meta: { + title: '', + icon: 'icon-config' // 图标 + }, + children: [ + { + path: '/messageList', + name: 'MessageList', + component: () => import('@/views/backstage/messageList'), + meta: { title: '消息后台', icon: '' } + }, + { + path: '/personList', + name: 'PersonList', + component: () => import('@/views/backstage/personList'), + meta: { title: '人员管理后台', icon: '' } + }, + { + path: '/visitAdmin', + name: 'VisitList', + component: () => import('@/views/backstage/visitList'), + meta: { title: '访客申请后台', icon: '' } + } + ] } // { // path: 'security', diff --git a/src/views/backstage/messageList.vue b/src/views/backstage/messageList.vue new file mode 100644 index 0000000..b6ae4ce --- /dev/null +++ b/src/views/backstage/messageList.vue @@ -0,0 +1,250 @@ + + + + + diff --git a/src/views/backstage/personList.vue b/src/views/backstage/personList.vue new file mode 100644 index 0000000..5206f7a --- /dev/null +++ b/src/views/backstage/personList.vue @@ -0,0 +1,586 @@ + + + + + diff --git a/src/views/backstage/visitList.vue b/src/views/backstage/visitList.vue new file mode 100644 index 0000000..08ff78e --- /dev/null +++ b/src/views/backstage/visitList.vue @@ -0,0 +1,321 @@ + + + + + diff --git a/src/api/minipro.js b/src/api/minipro.js new file mode 100644 index 0000000..99c71f0 --- /dev/null +++ b/src/api/minipro.js @@ -0,0 +1,138 @@ +import request from '@/utils/request' +// 小程序后台管理相关接口 +const baseURL = 'https://visitor.gd.smartlog.work' + +// 消息列表 +export function GetMessageList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `message/messageList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 消息导出 +export function messageExport(data) { + return request({ + baseURL, + url: '/message/exportList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 用户列表 +export function getUserList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `user/getUserList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 人员导入 +export function batchImportFire(fileobj) { + const param = new FormData() + param.append('multipartFile', fileobj) + return request({ + baseURL, + url: '/user/importList', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(fileName) { + return request({ + baseURL, + url: '/user/download', + method: 'get', + params: { + fileName: 'userModel.xlsx' + }, + responseType: 'blob' + }) +} + +// 访客导出 +export function userExport(data) { + return request({ + baseURL, + url: '/user/exportList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 新增 +export function addUser(data) { + return request({ + baseURL, + url: 'user/addUser', + method: 'post', + data + }) +} + +// 编辑 +export function updateUser(data) { + return request({ + baseURL, + url: 'user/updateUser', + method: 'post', + data + }) +} + +// 删除 +export function delUser(data) { + return request({ + baseURL, + url: 'user/delUser', + method: 'post', + data + }) +} + +// 访客列表 +export function getApplyList(data) { + const { + offset, + limit + } = data + return request({ + baseURL, + url: `visitor/getApplyList?limit=${limit}&offset=${offset}`, + method: 'post', + data + }) +} + +// 访客导出 +export function visitorExport(data) { + return request({ + baseURL, + url: '/visitor/exportApplyList', + method: 'post', + timeout: 120000, + data, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + diff --git a/src/router/index.js b/src/router/index.js index 6c81d9b..a29418b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -45,6 +45,9 @@ { path: '/bottom', component: () => import('@/views/popup/bottom'), hidden: true }, { path: '/floor', component: () => import('@/views/popup/floor'), hidden: true }, { path: '/board', component: () => import('@/views/popup/board'), hidden: true }, + // { path: '/messageList', component: () => import('@/views/backstage/messageList'), hidden: true }, + // { path: '/personList', component: () => import('@/views/backstage/personList'), hidden: true }, + // { path: '/visitList', component: () => import('@/views/backstage/visitList'), hidden: true }, { path: '/device/pop', component: () => import('@/views/popup/device'), hidden: true }, { path: '/case/pop', component: () => import('@/views/popup/case'), hidden: true }, diff --git a/src/router/modules/menu.js b/src/router/modules/menu.js index 9292a60..907a6ea 100644 --- a/src/router/modules/menu.js +++ b/src/router/modules/menu.js @@ -15,7 +15,7 @@ path: '/caseList', name: 'CaseList', component: () => import('@/views/case/caseList'), - meta: { title: '安防事件管理', icon: ''} + meta: { title: '安防事件管理', icon: '' } }, { path: '/caseLevelList', @@ -263,6 +263,36 @@ meta: { title: '能源数据', icon: '' } } ] + }, + { + path: 'backstage', + component: Layout, + redirect: '/backstage', + name: 'Backstage', + meta: { + title: '', + icon: 'icon-config' // 图标 + }, + children: [ + { + path: '/messageList', + name: 'MessageList', + component: () => import('@/views/backstage/messageList'), + meta: { title: '消息后台', icon: '' } + }, + { + path: '/personList', + name: 'PersonList', + component: () => import('@/views/backstage/personList'), + meta: { title: '人员管理后台', icon: '' } + }, + { + path: '/visitAdmin', + name: 'VisitList', + component: () => import('@/views/backstage/visitList'), + meta: { title: '访客申请后台', icon: '' } + } + ] } // { // path: 'security', diff --git a/src/views/backstage/messageList.vue b/src/views/backstage/messageList.vue new file mode 100644 index 0000000..b6ae4ce --- /dev/null +++ b/src/views/backstage/messageList.vue @@ -0,0 +1,250 @@ + + + + + diff --git a/src/views/backstage/personList.vue b/src/views/backstage/personList.vue new file mode 100644 index 0000000..5206f7a --- /dev/null +++ b/src/views/backstage/personList.vue @@ -0,0 +1,586 @@ + + + + + diff --git a/src/views/backstage/visitList.vue b/src/views/backstage/visitList.vue new file mode 100644 index 0000000..08ff78e --- /dev/null +++ b/src/views/backstage/visitList.vue @@ -0,0 +1,321 @@ + + + + + diff --git a/src/views/popup/board.vue b/src/views/popup/board.vue index 668c370..eb229cc 100644 --- a/src/views/popup/board.vue +++ b/src/views/popup/board.vue @@ -1,7 +1,8 @@