设备管理权限
This commit is contained in:
@ -52,3 +52,11 @@ export function saveDeviceFirmware(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 导出设备列表
|
||||||
|
export function exportEquipment(params) {
|
||||||
|
return request({
|
||||||
|
url: '/system/device/export',
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
@ -23,20 +23,22 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button size="mini" type="primary" icon="el-icon-plus" @click="handleAdd" v-hasPermi="['system:device:add']">增加</el-button>
|
<el-button size="mini" type="primary" icon="el-icon-plus" @click="handleAdd" v-hasPermi="['hardware:device:add']">增加</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
<!-- <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||||
v-hasPermi="['monitor:job:remove']">批量删除</el-button>
|
v-hasPermi="['monitor:job:remove']">批量删除</el-button> -->
|
||||||
|
<el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||||
|
v-hasPermi="['hardware:device:remove']">批量删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleClean" v-hasPermi="['monitor:job:remove']">清空
|
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleClean" v-hasPermi="['monitor:job:remove']">清空
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<!-- <el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['monitor:job:export']">导出
|
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['hardware:device:export']">导出
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col> -->
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@ -73,14 +75,14 @@
|
|||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="250">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="250">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" icon="el-icon-plus" @click="handleAddnode(scope.row)">新增节点
|
<el-button size="mini" type="text" icon="el-icon-plus" @click="handleAddnode(scope.row)" v-hasPermi="['hardware:device:add']">新增节点
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:device:edit']">修改
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['hardware:device:edit']">修改
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-view" @click="handleview(scope.row)">查看节点
|
<el-button size="mini" type="text" icon="el-icon-view" @click="handleview(scope.row)">查看节点
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button class="text-danger" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
<el-button class="text-danger" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['system:device:edit']">删除</el-button>
|
v-hasPermi="['hardware:device:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -213,6 +215,7 @@ import {
|
|||||||
update,
|
update,
|
||||||
del,
|
del,
|
||||||
saveDeviceFirmware,
|
saveDeviceFirmware,
|
||||||
|
exportEquipment
|
||||||
} from "@/api/hardware/device";
|
} from "@/api/hardware/device";
|
||||||
// import { nodeList, addNode, nodeInfo, delNode, nodeSelect } from "@/api/system/device/node";
|
// import { nodeList, addNode, nodeInfo, delNode, nodeSelect } from "@/api/system/device/node";
|
||||||
import { select as productSelect } from "@/api/hardware/product";
|
import { select as productSelect } from "@/api/hardware/product";
|
||||||
@ -347,6 +350,20 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport () {
|
||||||
|
const queryParams = this.queryParams;
|
||||||
|
this.$confirm('是否确认导出所有用户数据项?', "警告", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(function () {
|
||||||
|
return exportEquipment(queryParams);
|
||||||
|
}).then(response => {
|
||||||
|
this.download(response.msg);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
getDeviceTypeLabel (deviceType) {
|
getDeviceTypeLabel (deviceType) {
|
||||||
let snap = '';
|
let snap = '';
|
||||||
this.deviceTypeList.map(v => {
|
this.deviceTypeList.map(v => {
|
||||||
|
@ -37,6 +37,7 @@ module.exports = {
|
|||||||
// target: `http://47.115.73.110:8080`,
|
// target: `http://47.115.73.110:8080`,
|
||||||
target: `http://121.37.250.170:8080`,
|
target: `http://121.37.250.170:8080`,
|
||||||
// target: `http://192.168.0.129:8080`,
|
// target: `http://192.168.0.129:8080`,
|
||||||
|
// target: `http://192.168.0.131:8080`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||||
|
Reference in New Issue
Block a user