ds1.0
parent
b21e6859d4
commit
63957ef12a
File diff suppressed because it is too large
Load Diff
@ -1,163 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
class="addUserDialog"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="isShow"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
width="470px"
|
|
||||||
@close="handleclose"
|
|
||||||
>
|
|
||||||
<el-form
|
|
||||||
label-position="left"
|
|
||||||
ref="formInfo"
|
|
||||||
label-width="100px"
|
|
||||||
:rules="title == '新增' ? rules : xgrules"
|
|
||||||
:model="formdata"
|
|
||||||
>
|
|
||||||
<el-form-item label="用户名:" prop="userName">
|
|
||||||
<el-input
|
|
||||||
placeholder="请输入用户名"
|
|
||||||
v-model="formdata.userName"
|
|
||||||
autocomplete="off"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="角色:" prop="role">
|
|
||||||
<el-select v-model="formdata.role" placeholder="请选择">
|
|
||||||
<el-option
|
|
||||||
v-for="item in roleoptions"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="密码:" prop="password">
|
|
||||||
<el-input
|
|
||||||
placeholder="请输入密码"
|
|
||||||
v-model="formdata.password"
|
|
||||||
show-password
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button @click="isShow = false">取 消</el-button>
|
|
||||||
<el-button type="primary" @click="submitForm()">确 定</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { addUserApi, updateUserApi } from "@/utils/api/index";
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
title: String,
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
roleUser: "",
|
|
||||||
isShow: false,
|
|
||||||
roleoptions: [
|
|
||||||
{
|
|
||||||
value: 1,
|
|
||||||
label: "管理员",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 2,
|
|
||||||
label: "用户",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
|
|
||||||
formdata: {},
|
|
||||||
rules: {
|
|
||||||
userName: [
|
|
||||||
{ required: true, message: "请输入用户名", trigger: "blur" },
|
|
||||||
],
|
|
||||||
role: [{ required: true, message: "请选择角色", trigger: "blur" }],
|
|
||||||
password: [
|
|
||||||
{ required: true, message: "请输入密码", trigger: "blur" },
|
|
||||||
// { min: 6, max: 8, message: "请输入6-8位字符", trigger: "blur" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
xgrules: {
|
|
||||||
userName: [
|
|
||||||
{ required: true, message: "请输入用户名", trigger: "blur" },
|
|
||||||
],
|
|
||||||
role: [{ required: true, message: "请选择角色", trigger: "blur" }],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
//判断
|
|
||||||
getdataform(val) {
|
|
||||||
console.log(val);
|
|
||||||
if (val == null) {
|
|
||||||
return (this.formdata = {
|
|
||||||
role: 2,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//this.formdata = val;
|
|
||||||
this.formdata = JSON.parse(JSON.stringify(val));
|
|
||||||
},
|
|
||||||
// 保存确定操作
|
|
||||||
submitForm() {
|
|
||||||
this.$refs.formInfo.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.title == "新增") {
|
|
||||||
addUserApi(this.formdata)
|
|
||||||
.then((res) => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
this.$message({
|
|
||||||
duration: 1500,
|
|
||||||
showClose: true,
|
|
||||||
message: "添加成功",
|
|
||||||
type: "success",
|
|
||||||
});
|
|
||||||
this.isShow = false;
|
|
||||||
} else {
|
|
||||||
this.$message.error(res.msg);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((err) => {});
|
|
||||||
} else {
|
|
||||||
updateUserApi(this.formdata)
|
|
||||||
.then((res) => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
this.$message.success("修改成功");
|
|
||||||
this.isShow = false;
|
|
||||||
} else {
|
|
||||||
this.$message.error(res.msg);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((err) => {});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
console.log("error submit!!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
display() {
|
|
||||||
this.isShow = true;
|
|
||||||
this.roleUser = localStorage.getItem("role");
|
|
||||||
},
|
|
||||||
hide() {
|
|
||||||
this.isShow = false;
|
|
||||||
},
|
|
||||||
handleclose() {
|
|
||||||
this.$parent.deviceList();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style lang="less">
|
|
||||||
.addUserDialog {
|
|
||||||
.el-form-item {
|
|
||||||
.el-input,
|
|
||||||
.el-select,
|
|
||||||
.el-input-number {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,280 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="globalBox">
|
|
||||||
<div class="setBox">
|
|
||||||
<el-card class="box-card globalDrawLine">
|
|
||||||
<div slot="header" class="clearfix">
|
|
||||||
<span>线缆开启关闭</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<el-switch
|
|
||||||
style="display: block"
|
|
||||||
v-model="lineValue"
|
|
||||||
active-text="开启"
|
|
||||||
inactive-text="关闭"
|
|
||||||
@change="showLine"
|
|
||||||
>
|
|
||||||
</el-switch>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
<el-card class="box-card globalDrawLine">
|
|
||||||
<div slot="header" class="clearfix">
|
|
||||||
<span>设置告警通道</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<el-select v-model="channel" @change="handleChange">
|
|
||||||
<el-option
|
|
||||||
v-for="item in tdOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
<el-card class="box-card globalprob">
|
|
||||||
<div slot="header" class="clearfix">
|
|
||||||
<span>设置告警可信度</span>
|
|
||||||
</div>
|
|
||||||
<div v-for="(item, index) in probList" :key="index" class="probBox">
|
|
||||||
<label>{{ item.name }}</label>
|
|
||||||
<el-input-number
|
|
||||||
:min="0"
|
|
||||||
:max="110"
|
|
||||||
controls-position="right"
|
|
||||||
v-model="item.prob"
|
|
||||||
placeholder="请输入可信度值"
|
|
||||||
></el-input-number>
|
|
||||||
</div>
|
|
||||||
<el-button class="setbtn" type="primary" @click="setProb"
|
|
||||||
>设置</el-button
|
|
||||||
>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
|
||||||
<div class="" v-for="item in infoMl">
|
|
||||||
{{ item }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
getAlarmTypeList,
|
|
||||||
updateAlarmTypeList,
|
|
||||||
getMarkEnableStatus,
|
|
||||||
updateMarkEnableStatus,
|
|
||||||
updateAlarmChannel,
|
|
||||||
} from "@/utils/api/index";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
lineValue: false,
|
|
||||||
lineNum: 0,
|
|
||||||
probList: [],
|
|
||||||
tdOptions: [{ id: -1, name: "全部", alias: null }], //通道数据
|
|
||||||
channel: "",
|
|
||||||
infoMl: [],
|
|
||||||
tongdao: ["1", "2", "3", "4"],
|
|
||||||
cmdidArr: [
|
|
||||||
"12M10010107139801",
|
|
||||||
"12M10010107139802",
|
|
||||||
"12M10010107139803",
|
|
||||||
"12M10010107139804",
|
|
||||||
"12M10010107139805",
|
|
||||||
"12M10010107139806",
|
|
||||||
"12M10010107139807",
|
|
||||||
"12M10010107139808",
|
|
||||||
"12M10010107139809",
|
|
||||||
],
|
|
||||||
leftWater: [
|
|
||||||
"欣影-2023-10-08",
|
|
||||||
"欣影-2023-10-08",
|
|
||||||
"欣影-2023-10-08",
|
|
||||||
"欣影-2023-10-08",
|
|
||||||
"欣影-2023-10-08",
|
|
||||||
"欣影-2023-10-08",
|
|
||||||
"欣影-2023-10-08",
|
|
||||||
"欣影-2023-10-08",
|
|
||||||
"欣影-2023-10-08",
|
|
||||||
],
|
|
||||||
rightWater: [
|
|
||||||
"安庆- 输电运检一班-220kV文邓4C70线#052大号侧",
|
|
||||||
"安庆- 输电运检一班-220kV文邓4C70线#053大号侧",
|
|
||||||
"安庆- 输电运检一班-220kV文邓4C70线#053大号侧",
|
|
||||||
"安庆- 输电运检一班-220kV文邓4C70线#053大号侧",
|
|
||||||
"安庆- 输电运检一班-220kV文邓4C70线#053大号侧",
|
|
||||||
"安庆- 输电运检一班-220kV文邓4C70线#053大号侧",
|
|
||||||
"安庆- 输电运检一班-220kV文邓4C70线#053大号侧",
|
|
||||||
"安庆- 输电运检一班-220kV文邓4C70线#053大号侧",
|
|
||||||
"安庆- 输电运检一班-220kV文邓4C70线#053大号侧",
|
|
||||||
],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getalarmList();
|
|
||||||
this.getmark();
|
|
||||||
this.getWater();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
//获取图片绘制状态
|
|
||||||
getmark() {
|
|
||||||
getMarkEnableStatus()
|
|
||||||
.then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
if (res.data.imgMark === 1) {
|
|
||||||
this.lineValue = true;
|
|
||||||
console.log("绘制开启");
|
|
||||||
} else {
|
|
||||||
this.lineValue = false;
|
|
||||||
console.log("绘制关闭");
|
|
||||||
}
|
|
||||||
this.channel = res.data.alarmChannel;
|
|
||||||
console.log(this.channel);
|
|
||||||
})
|
|
||||||
.catch((err) => {});
|
|
||||||
},
|
|
||||||
//控制线缆绘制开关
|
|
||||||
showLine(val) {
|
|
||||||
if (val) {
|
|
||||||
this.lineNum = 1;
|
|
||||||
} else {
|
|
||||||
this.lineNum = 0;
|
|
||||||
}
|
|
||||||
updateMarkEnableStatus({
|
|
||||||
status: this.lineNum,
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
})
|
|
||||||
.catch((err) => {});
|
|
||||||
console.log(val, this.lineNum, "开关");
|
|
||||||
},
|
|
||||||
//获取装置可信度值
|
|
||||||
getalarmList() {
|
|
||||||
getAlarmTypeList().then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
this.probList = res.data.list;
|
|
||||||
this.tdOptions = [{ id: -1, name: "全部", alias: null }];
|
|
||||||
this.tdOptions = this.tdOptions.concat(res.data.channellist);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
setProb() {
|
|
||||||
console.log(this.probList);
|
|
||||||
updateAlarmTypeList({ list: this.probList })
|
|
||||||
.then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
if (res.code === 200) {
|
|
||||||
this.$message({
|
|
||||||
duration: 1500,
|
|
||||||
showClose: true,
|
|
||||||
message: "告警可信度设置成功",
|
|
||||||
type: "success",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.log(err);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//获取告警通道
|
|
||||||
handleChange(val) {
|
|
||||||
console.log(val);
|
|
||||||
updateAlarmChannel({ channel: this.channel })
|
|
||||||
.then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
if (res.code === 200) {
|
|
||||||
this.$message({
|
|
||||||
duration: 1500,
|
|
||||||
showClose: true,
|
|
||||||
message: "告警通道设置成功",
|
|
||||||
type: "success",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.log(err);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getWater() {
|
|
||||||
for (let j = 0; j < this.tongdao.length; j++) {
|
|
||||||
for (let i = 0; i < this.cmdidArr.length; i++) {
|
|
||||||
// console.log(this.cmdidArr[i]);
|
|
||||||
// console.log(this.leftWater[i]);
|
|
||||||
// console.log(this.rightWater[i]);
|
|
||||||
var a =
|
|
||||||
"/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=osd --cmdid=" +
|
|
||||||
this.cmdidArr[i] +
|
|
||||||
" --flag=1 --channel=" +
|
|
||||||
this.tongdao[j] +
|
|
||||||
' --leftBottom="' +
|
|
||||||
this.leftWater[i] +
|
|
||||||
'" --rightBottom="' +
|
|
||||||
this.rightWater[i] +
|
|
||||||
'" --clientid=5 --reqid=TS; sleep 0.5';
|
|
||||||
this.infoMl.push(a);
|
|
||||||
console.log(
|
|
||||||
"/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=osd --cmdid=" +
|
|
||||||
this.cmdidArr[i] +
|
|
||||||
" --flag=1 --channel=" +
|
|
||||||
this.tongdao[j] +
|
|
||||||
'" --leftBottom="' +
|
|
||||||
this.leftWater[i] +
|
|
||||||
'" --rightBottom="' +
|
|
||||||
this.rightWater[i] +
|
|
||||||
'" --clientid=5 --reqid=TS; sleep 0.5'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style lang="less">
|
|
||||||
.globalBox {
|
|
||||||
width: calc(100% - 24px);
|
|
||||||
height: calc(100% - 24px);
|
|
||||||
padding: 12px 12px;
|
|
||||||
background: #fff;
|
|
||||||
.setBox {
|
|
||||||
border: 1px solid #dddddd;
|
|
||||||
height: calc(100% - 24px);
|
|
||||||
padding: 12px;
|
|
||||||
border-radius: 4px;
|
|
||||||
display: flex;
|
|
||||||
.globalDrawLine {
|
|
||||||
width: 200px;
|
|
||||||
height: max-content;
|
|
||||||
margin-right: 24px;
|
|
||||||
}
|
|
||||||
.globalprob {
|
|
||||||
width: 378px;
|
|
||||||
height: max-content;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
.el-card__body {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
.probBox {
|
|
||||||
display: flex;
|
|
||||||
height: 40px;
|
|
||||||
line-height: 40px;
|
|
||||||
align-items: center;
|
|
||||||
label {
|
|
||||||
width: 138px;
|
|
||||||
}
|
|
||||||
.el-input-number--small {
|
|
||||||
width: 200px;
|
|
||||||
}
|
|
||||||
.el-input {
|
|
||||||
width: 200px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.setbtn {
|
|
||||||
margin-top: 24px;
|
|
||||||
margin-left: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,200 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="usermanagement">
|
|
||||||
<div class="deviceBox">
|
|
||||||
<div class="deviceBtnGroup">
|
|
||||||
<h4>用户管理</h4>
|
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdddevice()"
|
|
||||||
>新增</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div class="deviceTable">
|
|
||||||
<el-table
|
|
||||||
ref="multipleTable"
|
|
||||||
:data="deviceTableData"
|
|
||||||
stripe
|
|
||||||
tooltip-effect="dark"
|
|
||||||
style="width: 100%"
|
|
||||||
height="calc(100% - 40px)"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
@row-click="handleRowClick"
|
|
||||||
>
|
|
||||||
<!-- <el-table-column type="index" width="55"> </el-table-column>
|
|
||||||
<el-table-column type="selection" width="55"> </el-table-column> -->
|
|
||||||
<template slot="empty">
|
|
||||||
<el-empty :image-size="160" description="暂无数据"></el-empty>
|
|
||||||
</template>
|
|
||||||
<el-table-column
|
|
||||||
label="用户名"
|
|
||||||
show-overflow-tooltip
|
|
||||||
prop="userName"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column label="角色" show-overflow-tooltip prop="role">
|
|
||||||
<template slot-scope="scope">{{
|
|
||||||
scope.row.role == 1 ? "管理员" : "用户"
|
|
||||||
}}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="创建时间"
|
|
||||||
show-overflow-tooltip
|
|
||||||
prop="createTime"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">{{
|
|
||||||
$moment(scope.row.createTime).format("yy-MM-DD HH:mm:ss")
|
|
||||||
}}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column fixed="right" label="操作" width="200">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
@click.native.stop="handleResive(scope.row)"
|
|
||||||
type="text"
|
|
||||||
>修改</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
class="deleteText"
|
|
||||||
@click.native.stop="handleDelete(scope.row)"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<div class="pageNation">
|
|
||||||
<el-pagination
|
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
:current-page="page"
|
|
||||||
:page-size="pageSize"
|
|
||||||
layout="sizes, prev, pager, next, jumper,total"
|
|
||||||
:total="total"
|
|
||||||
background
|
|
||||||
>
|
|
||||||
</el-pagination>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- 新增 -->
|
|
||||||
<addUser :title="title" ref="adduserref"></addUser>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import addUser from "./components/addUser.vue";
|
|
||||||
import { getUserList, delUserApi } from "@/utils/api/index";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
addUser,
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
title: "", //弹窗标题
|
|
||||||
deviceTableData: [],
|
|
||||||
//multipleSelection: [], //获取当前选中
|
|
||||||
page: 1, // 当前页数
|
|
||||||
pageSize: 20, // 每页数量
|
|
||||||
total: 0, //总条数
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.deviceList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
//获取线路列表数据
|
|
||||||
deviceList() {
|
|
||||||
getUserList({
|
|
||||||
pageindex: this.page,
|
|
||||||
pagesize: this.pageSize,
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
this.deviceTableData = res.data.list;
|
|
||||||
this.total = res.data.total;
|
|
||||||
})
|
|
||||||
.catch((err) => {});
|
|
||||||
},
|
|
||||||
//点击行选中
|
|
||||||
handleRowClick(row, column, event) {
|
|
||||||
this.$refs.multipleTable.toggleRowSelection(row);
|
|
||||||
},
|
|
||||||
//获取选中的行
|
|
||||||
handleSelectionChange(val) {
|
|
||||||
this.multipleSelection = val;
|
|
||||||
},
|
|
||||||
|
|
||||||
// 新建
|
|
||||||
handleAdddevice() {
|
|
||||||
this.title = "新增";
|
|
||||||
this.$refs.adduserref.display();
|
|
||||||
this.$refs.adduserref.getdataform(null);
|
|
||||||
},
|
|
||||||
|
|
||||||
//修改
|
|
||||||
handleResive(data) {
|
|
||||||
this.title = "修改";
|
|
||||||
this.$refs.adduserref.display();
|
|
||||||
this.$refs.adduserref.getdataform(data);
|
|
||||||
},
|
|
||||||
|
|
||||||
//删除数据
|
|
||||||
handleDelete(data) {
|
|
||||||
this.$confirm("确定要删除记录吗,同时删除关联关系?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning",
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
delUserApi({ uid: data.userId }).then((res) => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
this.$message.success("删除成功");
|
|
||||||
this.deviceList(); //刷新
|
|
||||||
} else {
|
|
||||||
this.$message.error(res.msg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.$message({
|
|
||||||
duration: 1500,
|
|
||||||
showClose: true,
|
|
||||||
type: "info",
|
|
||||||
message: "已取消删除",
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//点击分页
|
|
||||||
handleCurrentChange(val) {
|
|
||||||
this.page = val;
|
|
||||||
this.deviceList();
|
|
||||||
},
|
|
||||||
//每页条数
|
|
||||||
handleSizeChange(val) {
|
|
||||||
this.pageSize = val;
|
|
||||||
this.deviceList();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style lang="less">
|
|
||||||
.usermanagement {
|
|
||||||
width: calc(100% - 24px);
|
|
||||||
height: calc(100% - 24px);
|
|
||||||
padding: 12px 12px;
|
|
||||||
background: #fff;
|
|
||||||
|
|
||||||
.deviceBox {
|
|
||||||
border: 1px solid #dddddd;
|
|
||||||
height: calc(100% - 24px);
|
|
||||||
padding: 12px;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
.deviceBtnGroup {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.deviceTable {
|
|
||||||
margin-top: 16px;
|
|
||||||
height: calc(100% - 48px);
|
|
||||||
//background: #fcc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
Loading…
Reference in New Issue