diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js index 1eeb915..1640c25 100644 --- a/mock/deviceManage/device.js +++ b/mock/deviceManage/device.js @@ -42,18 +42,18 @@ ] const deviceTableList = [ { - 'id': '设备编号', - 'typeName': '设备类型', - 'typeDescription': '描述', + 'id': '112343243242341', + 'typeName': '井盖状态检测仪', + 'typeDescription': '检测井盖状态', 'valid': '开启', - 'watchType': '监控内容' + 'watchType': '监控检测井盖状态' }, { - 'id': '设备编号2', - 'typeName': '设备类型2', - 'typeDescription': '描述2', + 'id': '112343243242986', + 'typeName': '有害气体检测仪', + 'typeDescription': '检测气体类型', 'valid': '关闭', - 'watchType': '监控内容2' + 'watchType': '监控气体类型' } ] module.exports = [ @@ -65,21 +65,21 @@ return { code: 200, data: deviceTypeList, - 'message': '请求成功', - 'success': true + message: '请求成功', + success: true } } }, { - url: '/device/list', + url: '/deviceType/list', type: 'get', response: _ => { return { code: 200, data: deviceTableList, - 'message': '请求成功', - 'success': true + message: '请求成功', + success: true } } } -] \ No newline at end of file +] diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js index 1eeb915..1640c25 100644 --- a/mock/deviceManage/device.js +++ b/mock/deviceManage/device.js @@ -42,18 +42,18 @@ ] const deviceTableList = [ { - 'id': '设备编号', - 'typeName': '设备类型', - 'typeDescription': '描述', + 'id': '112343243242341', + 'typeName': '井盖状态检测仪', + 'typeDescription': '检测井盖状态', 'valid': '开启', - 'watchType': '监控内容' + 'watchType': '监控检测井盖状态' }, { - 'id': '设备编号2', - 'typeName': '设备类型2', - 'typeDescription': '描述2', + 'id': '112343243242986', + 'typeName': '有害气体检测仪', + 'typeDescription': '检测气体类型', 'valid': '关闭', - 'watchType': '监控内容2' + 'watchType': '监控气体类型' } ] module.exports = [ @@ -65,21 +65,21 @@ return { code: 200, data: deviceTypeList, - 'message': '请求成功', - 'success': true + message: '请求成功', + success: true } } }, { - url: '/device/list', + url: '/deviceType/list', type: 'get', response: _ => { return { code: 200, data: deviceTableList, - 'message': '请求成功', - 'success': true + message: '请求成功', + success: true } } } -] \ No newline at end of file +] diff --git a/src/api/device/deviceType.js b/src/api/device/deviceType.js new file mode 100644 index 0000000..3c10883 --- /dev/null +++ b/src/api/device/deviceType.js @@ -0,0 +1,53 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 设备类别 +export function getDevice(params) { + return request({ + url: 'device/type', + method: 'get', + params + }) +} + +// 设备查询 +export function getDeviceList(params) { + return request({ + url: 'deviceType/list', + method: 'get', + params + }) +} + +// 添加设备 +export function addDeviceType(params) { + return request({ + url: 'deviceType/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceType(params) { + return request({ + url: 'deviceType/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDevice(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js index 1eeb915..1640c25 100644 --- a/mock/deviceManage/device.js +++ b/mock/deviceManage/device.js @@ -42,18 +42,18 @@ ] const deviceTableList = [ { - 'id': '设备编号', - 'typeName': '设备类型', - 'typeDescription': '描述', + 'id': '112343243242341', + 'typeName': '井盖状态检测仪', + 'typeDescription': '检测井盖状态', 'valid': '开启', - 'watchType': '监控内容' + 'watchType': '监控检测井盖状态' }, { - 'id': '设备编号2', - 'typeName': '设备类型2', - 'typeDescription': '描述2', + 'id': '112343243242986', + 'typeName': '有害气体检测仪', + 'typeDescription': '检测气体类型', 'valid': '关闭', - 'watchType': '监控内容2' + 'watchType': '监控气体类型' } ] module.exports = [ @@ -65,21 +65,21 @@ return { code: 200, data: deviceTypeList, - 'message': '请求成功', - 'success': true + message: '请求成功', + success: true } } }, { - url: '/device/list', + url: '/deviceType/list', type: 'get', response: _ => { return { code: 200, data: deviceTableList, - 'message': '请求成功', - 'success': true + message: '请求成功', + success: true } } } -] \ No newline at end of file +] diff --git a/src/api/device/deviceType.js b/src/api/device/deviceType.js new file mode 100644 index 0000000..3c10883 --- /dev/null +++ b/src/api/device/deviceType.js @@ -0,0 +1,53 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 设备类别 +export function getDevice(params) { + return request({ + url: 'device/type', + method: 'get', + params + }) +} + +// 设备查询 +export function getDeviceList(params) { + return request({ + url: 'deviceType/list', + method: 'get', + params + }) +} + +// 添加设备 +export function addDeviceType(params) { + return request({ + url: 'deviceType/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceType(params) { + return request({ + url: 'deviceType/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDevice(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/views/deviceManage/deviceType/components/dialogDeviceType.vue b/src/views/deviceManage/deviceType/components/dialogDeviceType.vue new file mode 100644 index 0000000..cc9b395 --- /dev/null +++ b/src/views/deviceManage/deviceType/components/dialogDeviceType.vue @@ -0,0 +1,242 @@ + + + + + diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js index 1eeb915..1640c25 100644 --- a/mock/deviceManage/device.js +++ b/mock/deviceManage/device.js @@ -42,18 +42,18 @@ ] const deviceTableList = [ { - 'id': '设备编号', - 'typeName': '设备类型', - 'typeDescription': '描述', + 'id': '112343243242341', + 'typeName': '井盖状态检测仪', + 'typeDescription': '检测井盖状态', 'valid': '开启', - 'watchType': '监控内容' + 'watchType': '监控检测井盖状态' }, { - 'id': '设备编号2', - 'typeName': '设备类型2', - 'typeDescription': '描述2', + 'id': '112343243242986', + 'typeName': '有害气体检测仪', + 'typeDescription': '检测气体类型', 'valid': '关闭', - 'watchType': '监控内容2' + 'watchType': '监控气体类型' } ] module.exports = [ @@ -65,21 +65,21 @@ return { code: 200, data: deviceTypeList, - 'message': '请求成功', - 'success': true + message: '请求成功', + success: true } } }, { - url: '/device/list', + url: '/deviceType/list', type: 'get', response: _ => { return { code: 200, data: deviceTableList, - 'message': '请求成功', - 'success': true + message: '请求成功', + success: true } } } -] \ No newline at end of file +] diff --git a/src/api/device/deviceType.js b/src/api/device/deviceType.js new file mode 100644 index 0000000..3c10883 --- /dev/null +++ b/src/api/device/deviceType.js @@ -0,0 +1,53 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 设备类别 +export function getDevice(params) { + return request({ + url: 'device/type', + method: 'get', + params + }) +} + +// 设备查询 +export function getDeviceList(params) { + return request({ + url: 'deviceType/list', + method: 'get', + params + }) +} + +// 添加设备 +export function addDeviceType(params) { + return request({ + url: 'deviceType/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceType(params) { + return request({ + url: 'deviceType/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDevice(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/views/deviceManage/deviceType/components/dialogDeviceType.vue b/src/views/deviceManage/deviceType/components/dialogDeviceType.vue new file mode 100644 index 0000000..cc9b395 --- /dev/null +++ b/src/views/deviceManage/deviceType/components/dialogDeviceType.vue @@ -0,0 +1,242 @@ + + + + + diff --git a/src/views/deviceManage/deviceType/components/editDeviceType.vue b/src/views/deviceManage/deviceType/components/editDeviceType.vue deleted file mode 100644 index b22e406..0000000 --- a/src/views/deviceManage/deviceType/components/editDeviceType.vue +++ /dev/null @@ -1,272 +0,0 @@ - - - - - diff --git a/mock/deviceManage/device.js b/mock/deviceManage/device.js index 1eeb915..1640c25 100644 --- a/mock/deviceManage/device.js +++ b/mock/deviceManage/device.js @@ -42,18 +42,18 @@ ] const deviceTableList = [ { - 'id': '设备编号', - 'typeName': '设备类型', - 'typeDescription': '描述', + 'id': '112343243242341', + 'typeName': '井盖状态检测仪', + 'typeDescription': '检测井盖状态', 'valid': '开启', - 'watchType': '监控内容' + 'watchType': '监控检测井盖状态' }, { - 'id': '设备编号2', - 'typeName': '设备类型2', - 'typeDescription': '描述2', + 'id': '112343243242986', + 'typeName': '有害气体检测仪', + 'typeDescription': '检测气体类型', 'valid': '关闭', - 'watchType': '监控内容2' + 'watchType': '监控气体类型' } ] module.exports = [ @@ -65,21 +65,21 @@ return { code: 200, data: deviceTypeList, - 'message': '请求成功', - 'success': true + message: '请求成功', + success: true } } }, { - url: '/device/list', + url: '/deviceType/list', type: 'get', response: _ => { return { code: 200, data: deviceTableList, - 'message': '请求成功', - 'success': true + message: '请求成功', + success: true } } } -] \ No newline at end of file +] diff --git a/src/api/device/deviceType.js b/src/api/device/deviceType.js new file mode 100644 index 0000000..3c10883 --- /dev/null +++ b/src/api/device/deviceType.js @@ -0,0 +1,53 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 设备类别 +export function getDevice(params) { + return request({ + url: 'device/type', + method: 'get', + params + }) +} + +// 设备查询 +export function getDeviceList(params) { + return request({ + url: 'deviceType/list', + method: 'get', + params + }) +} + +// 添加设备 +export function addDeviceType(params) { + return request({ + url: 'deviceType/add', + method: 'post', + params + }) +} +// 修改设备 +export function updateDeviceType(params) { + return request({ + url: 'deviceType/update', + method: 'post', + params + }) +} +// 删除设备 +export function delDevice(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} diff --git a/src/views/deviceManage/deviceType/components/dialogDeviceType.vue b/src/views/deviceManage/deviceType/components/dialogDeviceType.vue new file mode 100644 index 0000000..cc9b395 --- /dev/null +++ b/src/views/deviceManage/deviceType/components/dialogDeviceType.vue @@ -0,0 +1,242 @@ + + + + + diff --git a/src/views/deviceManage/deviceType/components/editDeviceType.vue b/src/views/deviceManage/deviceType/components/editDeviceType.vue deleted file mode 100644 index b22e406..0000000 --- a/src/views/deviceManage/deviceType/components/editDeviceType.vue +++ /dev/null @@ -1,272 +0,0 @@ - - - - - diff --git a/src/views/deviceManage/deviceType/deviceType.vue b/src/views/deviceManage/deviceType/deviceType.vue index c06c85f..af8ff25 100644 --- a/src/views/deviceManage/deviceType/deviceType.vue +++ b/src/views/deviceManage/deviceType/deviceType.vue @@ -68,21 +68,17 @@ - - - - +