diff --git a/src/api/device.js b/src/api/device.js index 63fe6ec..1e22a69 100644 --- a/src/api/device.js +++ b/src/api/device.js @@ -68,6 +68,7 @@ return request({ url: 'device/batchImport', method: 'post', + timeout: 240000, headers: { 'Content-Type': 'multipart/form-data' }, data: param }) diff --git a/src/api/device.js b/src/api/device.js index 63fe6ec..1e22a69 100644 --- a/src/api/device.js +++ b/src/api/device.js @@ -68,6 +68,7 @@ return request({ url: 'device/batchImport', method: 'post', + timeout: 240000, headers: { 'Content-Type': 'multipart/form-data' }, data: param }) diff --git a/src/main.js b/src/main.js index 306b2e0..5b3d3ac 100644 --- a/src/main.js +++ b/src/main.js @@ -27,13 +27,14 @@ import 'babel-polyfill' // import '../mock' // simulation data -import { hasPermission, showWellType, showDeviceType, showIpConfig, isOperation } from './utils/permission' +import { hasPermission, showWellType, showDeviceType, showIpConfig, isOperation, isAdministrator } from './utils/permission' Vue.prototype.hasPerm = hasPermission Vue.prototype.showWellType = showWellType Vue.prototype.showDeviceType = showDeviceType Vue.prototype.showIpConfig = showIpConfig Vue.prototype.isOperation = isOperation +Vue.prototype.isAdministrator = isAdministrator // 引入Element-ui Vue.use(ElementUI, { locale }) diff --git a/src/api/device.js b/src/api/device.js index 63fe6ec..1e22a69 100644 --- a/src/api/device.js +++ b/src/api/device.js @@ -68,6 +68,7 @@ return request({ url: 'device/batchImport', method: 'post', + timeout: 240000, headers: { 'Content-Type': 'multipart/form-data' }, data: param }) diff --git a/src/main.js b/src/main.js index 306b2e0..5b3d3ac 100644 --- a/src/main.js +++ b/src/main.js @@ -27,13 +27,14 @@ import 'babel-polyfill' // import '../mock' // simulation data -import { hasPermission, showWellType, showDeviceType, showIpConfig, isOperation } from './utils/permission' +import { hasPermission, showWellType, showDeviceType, showIpConfig, isOperation, isAdministrator } from './utils/permission' Vue.prototype.hasPerm = hasPermission Vue.prototype.showWellType = showWellType Vue.prototype.showDeviceType = showDeviceType Vue.prototype.showIpConfig = showIpConfig Vue.prototype.isOperation = isOperation +Vue.prototype.isAdministrator = isAdministrator // 引入Element-ui Vue.use(ElementUI, { locale }) diff --git a/src/views/deviceManage/listDevice.vue b/src/views/deviceManage/listDevice.vue index 94de28b..408b535 100644 --- a/src/views/deviceManage/listDevice.vue +++ b/src/views/deviceManage/listDevice.vue @@ -19,6 +19,15 @@ + + + + + 搜索 @@ -104,6 +113,7 @@ listQuery: { keywords: '', deviceType: '', + isOnline: '', offset: 1, limit: 20, sort: 'id', @@ -181,6 +191,10 @@ detailShow: false, // 是否显示编辑框 filename: 'device_template.xlsx', deptShowTop: false, // 是否显示顶级 + onlineStates: [ + { value: '1', name: '在线' }, + { value: '0', name: '离线' } + ], // 在线情况 wellShow: false } },