ds1.0
fanluyan 2 years ago
parent b21e6859d4
commit 63957ef12a

@ -33,18 +33,7 @@ const routes = [
icon: "el-icon-camera",
},
},
{
path: "/pictureRotation",
component: () =>
import(
/* webpackChunkName: "home" */ "../views/pictureRotation/index.vue"
),
meta: {
title: "图片轮巡",
permission: true,
icon: "el-icon-camera",
},
},
{
path: "/realTimeSearch",
component: () =>
@ -57,35 +46,6 @@ const routes = [
icon: "el-icon-camera",
},
},
{
path: "/photoAlarm",
component: () =>
import(
/* webpackChunkName: "home" */ "../views/alarmHandling/index.vue"
),
meta: {
title: "告警处理",
permission: true,
icon: "el-icon-camera",
},
},
{
path: "/userManagement",
component: () =>
import(
/* webpackChunkName: "tabs" */ "../views/system/userManagement.vue"
),
meta: { title: "用户管理", icon: "el-icon-monitor" },
},
{
path: "/globalTools",
component: () =>
import(
/* webpackChunkName: "tabs" */ "../views/system/globalTools/index.vue"
),
meta: { title: "全局设置" },
},
{
path: "/lineInformation",
component: () =>
@ -126,18 +86,6 @@ const routes = [
),
meta: { title: "拍照时间表设置", icon: "" },
},
{
path: "/waterMark",
component: () =>
import(/* webpackChunkName: "tabs" */ "../views/waterMark/index.vue"),
meta: { title: "水印下发", icon: "" },
},
// {
// path: "/echarts",
// component: () =>
// import(/* webpackChunkName: "tabs" */ "../echartsDemo.vue"),
// meta: { title: "echarts图表", icon: "" },
// },
],
},

@ -223,15 +223,6 @@ export function getTermLastGPSPosition(data) {
},
});
}
//图片轮巡
//获取图片轮巡接口
export function getPictureList(data) {
return request({
url: "/api/getPhotoBanner",
method: "post",
data,
});
}
//历史图片
//获取电压-线路-杆塔等信息
@ -251,32 +242,6 @@ export function getRealtimePhoto(data) {
});
}
//告警功能
//获取告警列表
export function getAlarmList(data) {
return request({
url: "/api/getTerminalAlarmList",
method: "post",
data,
});
}
//获取告警label
export function getAlarmTypeList(data) {
return request({
url: "/api/getAlarmTypeList",
method: "post",
data,
});
}
//已读未读
export function readAlarm(data) {
return request({
url: "/api/readAlarm",
method: "post",
data,
});
}
//手动拍照
export function takePicJoggle(data) {
return request({
@ -292,61 +257,7 @@ export function takePicJoggle(data) {
}
//用户管理
//用户列表查询
export function getUserList(data) {
return request({
url: "/api/userList",
method: "post",
data,
});
}
//新增用户
export function addUserApi(data) {
return request({
url: "/api/addUser",
method: "post",
data,
});
}
//删除用户
export function delUserApi(data) {
return request({
url: "/api/deleteUser",
method: "post",
data,
headers: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
},
});
}
//设置告警可信度
export function updateAlarmTypeList(data) {
return request({
url: "/api/updateAlarmTypeList",
method: "post",
data,
});
} //全局设置线缆绘制
export function getMarkEnableStatus(data) {
return request({
url: "/api/getMarkEnableStatus",
method: "post",
data,
});
}
//全局更新设置线缆绘制
export function updateMarkEnableStatus(data) {
return request({
url: "/api/updateMarkEnableStatus",
method: "post",
data,
headers: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
},
});
}
//全局设置通道
export function updateAlarmChannel(data) {
@ -667,15 +578,3 @@ export function updateTermCamera(data) {
params: data,
});
}
//郑州检测左侧树状结构接口
export function getzzdyTreeList(data) {
return request({
url: "/api/getzzdyTreeList",
method: "get",
params: data,
headers: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
},
});
}

File diff suppressed because it is too large Load Diff

@ -1,563 +0,0 @@
<template>
<div class="picRotation">
<div class="rotationBox">
<div class="picHead">
<div class="pageNation">
<el-pagination
@current-change="handleCurrentChange"
:current-page="page"
:page-size="pageSize"
layout=" prev, pager, next, jumper,total"
:total="total"
>
</el-pagination>
</div>
<div class="buttonGroup">
<span class="info">
<b> {{ isRuning ? remainingTime : "已暂停" }} </b>
</span>
<el-button type="primary" @click="toggleCountdown">{{
isRuning ? "暂停轮巡" : "开始轮巡"
}}</el-button>
<el-button type="primary" @click="setbtn"></el-button>
</div>
</div>
<div class="imageCenter" v-loading="loading" v-cloak>
<el-row
v-for="i in rowNum"
:key="'row-' + i"
:style="{ height: 100 / rowNum + '%' }"
>
<el-col
:span="24 / colNum"
v-for="(item, index) in picList"
v-if="index < colNum * i && index >= colNum * (i - 1)"
:key="'col-' + index"
>
<div class="imgList" @click="handleShowHistory(item)">
<div
v-if="item.path !== null && item.path.indexOf('videos') == -1"
class="bigpic"
>
<img :src="item.path + '!1366x768'" @error="setDefaultImage" />
</div>
<div
class="bigpic"
v-else-if="
item.path !== null && item.path.indexOf('videos') !== -1
"
>
<video
width="100%"
height="100%"
:src="item.path"
controls="controls"
></video>
</div>
<div class="bigpic" v-else>
<img src="../../assets/img/nopic.jpg" />
</div>
<div class="picInfo">
<p>
{{ item.linename }}-{{ item.towername }}-{{
item.alias !== null && item.alias !== ""
? item.alias
: item.channnelname
}}
</p>
<p class="timeinfo" v-if="item.photoTime !== null">
{{ $moment(item.photoTime).format("YYYY-MM-DD HH:mm:ss") }}
</p>
<p class="timeinfo" v-else></p>
</div>
</div>
</el-col>
</el-row>
</div>
</div>
<el-dialog
title="设置"
:visible.sync="setdialog"
width="480px"
:close-on-click-modal="false"
class="setPicShow"
>
<el-form label-position="left">
<el-form-item label="轮巡速度">
<el-select v-model="selSpeed" placeholder="请选择">
<el-option
v-for="item in speedOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="画面布局" class="layoutBox">
<!-- <el-select v-model="selLayout" placeholder="s请选择">
<el-option
v-for="item in layoutOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> -->
<div class="selectGroup">
<div class="rowbox">
<el-radio-group v-model="rowradio" class="radio1">
<el-radio-button label="1"></el-radio-button>
<el-radio-button label="2"></el-radio-button>
<el-radio-button label="3"></el-radio-button>
<el-radio-button label="4"></el-radio-button>
<!-- <el-radio-button label="5"></el-radio-button>
<el-radio-button label="6"></el-radio-button> -->
</el-radio-group>
<span class="labelinfo"></span>
</div>
<div class="colbox">
<el-radio-group v-model="colradio" class="radio2">
<el-radio-button label="1"></el-radio-button>
<el-radio-button label="2"></el-radio-button>
<el-radio-button label="3"></el-radio-button>
<el-radio-button label="4"></el-radio-button>
<!-- <el-radio-button label="5"></el-radio-button>
<el-radio-button label="6"></el-radio-button> -->
</el-radio-group>
<span class="labelinfo"></span>
</div>
</div>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="setdialog = false"> </el-button>
<el-button type="primary" @click="submitForm()"> </el-button>
</div>
</el-dialog>
<morePicPreveiw ref="morePicPreveiw_ref"></morePicPreveiw>
<!-- <el-dialog
title="历史图片"
:visible.sync="historyPicdialog"
width="1366px"
:close-on-click-modal="false"
class="showDialogHistoryPic"
>
<div class="title">
{{ picInfoData.linename }}-{{ picInfoData.towername }}-{{
picInfoData.alias !== null && picInfoData.alias !== ""
? picInfoData.alias
: picInfoData.channnelname
}} {{ $moment(picInfoData.photoTime).format("YYYY-MM-DD ") }}
</div>
<carouselChart
ref="carouselpic"
:terminalPhoto="terminalPhoto"
v-if="terminalPhoto.length > 0"
v-loading="historyPicLoading"
></carouselChart>
</el-dialog> -->
</div>
</template>
<script>
import { getPictureList, getTerminalPhotoListJoggle } from "@/utils/api/index";
// import carouselChart from "../realTimeMonitor/components/carouselChart";
import morePicPreveiw from "../realTimeMonitor/components/morePicPreveiw";
import defaultImage from "../../assets/img/nodatapic2.jpg";
export default {
components: {
morePicPreveiw,
},
data() {
return {
OptionssalseImg: {
inline: false,
button: true,
navbar: false,
title: false,
toolbar: false,
tooltip: false,
zoomable: true,
url: "src",
},
value: "选项1",
page: 1, //
pageSize: 4, //
totalPage: 0, //
total: 0, //
picList: [], //
remainingTime: 0, //
isRuning: false,
timer: null,
loading: false,
setdialog: false, //
speedOptions: [
{
value: 5,
label: "5秒",
},
{
value: 11,
label: "11秒",
},
{
value: 12,
label: "12秒",
},
{
value: 13,
label: "13秒",
},
{
value: 14,
label: "14秒",
},
{
value: 15,
label: "15秒",
},
], //
selSpeed: 5,
//
rowNum: "",
colNum: "",
rowradio: "4",
colradio: "4",
selLayout: 1,
options: [
{
value: "选项1",
label: "顺序",
},
{
value: "选项2",
label: "倒序",
},
],
//
picInfoData: {}, //
historyPicdialog: false,
historyPicLoading: false,
terminalPhoto: [], //
nopicPath: require("@/assets/img/nopic.jpg"),
};
},
methods: {
setDefaultImage(e) {
e.target.src = defaultImage;
},
//
handleShowHistory(item) {
console.log(item);
this.$refs.morePicPreveiw_ref.display(item);
// this.picInfoData = item;
// console.log(this.picInfoData);
// this.historyPicdialog = true;
// //this.getTerminalPhotoList(item.cmdid);
// this.getTerminalPhotoList(item.channelid, item.photoTime, item.termid);
},
//
getTerminalPhotoList(channelid, date, termId) {
this.terminalPhoto = [];
this.historyPicLoading = true;
getTerminalPhotoListJoggle({
channelid: channelid,
time: date,
terminalid: termId,
})
.then((res) => {
console.log(res);
this.historyPicLoading = false;
if (res.data.list.length == 0) {
this.terminalPhoto = [
{
path: this.nopicPath,
termId: termId,
mediatype: 0,
},
];
} else {
this.terminalPhoto = res.data.list;
}
})
.catch((err) => {
console.log(err); //
});
},
setbtn() {
this.isRuning = false;
this.pauseCountdown();
this.setdialog = true;
this.selSpeed = parseInt(localStorage.getItem("totalTime"))
? parseInt(localStorage.getItem("totalTime"))
: 15;
this.rowNum = parseInt(localStorage.getItem("row"))
? parseInt(localStorage.getItem("row"))
: 4;
this.colNum = parseInt(localStorage.getItem("col"))
? parseInt(localStorage.getItem("col"))
: 4;
this.rowradio = parseInt(localStorage.getItem("row"))
? parseInt(localStorage.getItem("row"))
: 4;
this.colradio = parseInt(localStorage.getItem("col"))
? parseInt(localStorage.getItem("col"))
: 4;
},
submitForm() {
localStorage.setItem("totalTime", this.selSpeed);
localStorage.setItem("row", this.rowradio);
localStorage.setItem("col", this.colradio);
this.rowNum = parseInt(localStorage.getItem("row"))
? parseInt(localStorage.getItem("row"))
: 4;
this.colNum = parseInt(localStorage.getItem("col"))
? parseInt(localStorage.getItem("col"))
: 4;
this.pageSize = this.rowradio * this.colradio;
this.setdialog = false;
this.$message.success("设置成功");
this.getPicData();
},
//
handleCurrentChange(val) {
this.isRuning = false;
this.pauseCountdown();
this.page = val;
this.getPicData();
},
//
getPicData() {
this.loading = true;
this.picList = [];
getPictureList({
pageindex: this.page,
pagesize: this.rowNum * this.colNum,
})
.then((res) => {
this.picList = res.data.list;
this.totalPage = res.data.totalpage;
this.total = res.data.total;
this.loading = false;
})
.catch((err) => {
console.log(err);
});
},
//
startCountdown() {
this.timer = setInterval(() => {
if (this.remainingTime <= 0) {
this.clearTimer();
this.page++;
if (this.page > this.totalPage) {
this.page = 0;
this.startCountdown();
} else {
this.remainingTime = parseInt(localStorage.getItem("totalTime"))
? parseInt(localStorage.getItem("totalTime"))
: 15;
this.getPicData();
this.startCountdown();
}
} else {
this.remainingTime--;
}
}, 1000);
},
clearTimer() {
//
clearInterval(this.timer);
this.timer = null;
},
pauseCountdown() {
//
clearInterval(this.timer);
this.timer = null;
},
//isRuning
toggleCountdown() {
if (this.isRuning) {
this.pauseCountdown();
} else {
this.startCountdown();
this.getPicData();
}
this.isRuning = !this.isRuning;
},
},
computed: {},
mounted() {
this.remainingTime = parseInt(localStorage.getItem("totalTime"))
? parseInt(localStorage.getItem("totalTime"))
: 15;
this.rowradio = this.rowNum = parseInt(localStorage.getItem("row"))
? parseInt(localStorage.getItem("row"))
: 4;
this.colradio = this.colNum = parseInt(localStorage.getItem("col"))
? parseInt(localStorage.getItem("col"))
: 4;
this.pageSize = this.rowradio * this.colradio;
//this.toggleCountdown();
this.getPicData();
},
created() {},
beforeDestroy() {
// console.log("");
clearInterval(this.timer);
this.timer = null;
},
};
</script>
<style lang="less">
.picRotation {
width: calc(100% - 24px);
height: calc(100% - 24px);
padding: 12px 12px;
background: #ffffff;
.rotationBox {
border: 1px solid #dddddd;
height: calc(100% - 22px);
max-height: calc(100% - 22px);
padding: 12px;
border-radius: 4px;
}
.picHead {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0px 0px 8px 0px;
.buttonGroup {
display: flex;
.el-select {
margin-left: 10px;
width: 100px;
}
.info {
width: 80px;
text-align: center;
margin-right: 16px;
line-height: 32px;
b {
font-size: 24px;
font-weight: normal;
color: #67c23a;
vertical-align: middle;
}
}
}
}
.imageCenter {
// display: flex;
// flex-wrap: wrap;
height: calc(100% - 52px);
.el-col {
height: 100%;
padding-right: 0.1%;
padding-left: 0.1%;
padding-top: 0.1%;
padding-bottom: 0.1%;
}
// justify-content: space-between;
.imgList {
border: 1px solid #eee;
width: 100%;
position: relative;
//background-color: #00eaff;
height: 100%;
.bigpic {
width: 100%;
height: 100%;
background-size: 100% 100%;
}
img {
width: 100%;
height: 100%;
cursor: pointer;
}
.picInfo {
position: absolute;
background: #169e8ca1;
color: #fff;
height: auto;
font-size: 12px;
left: 0;
bottom: 0;
width: 100%;
text-align: center;
p {
margin-top: 4px;
}
.timeinfo {
margin-bottom: 4px;
}
}
}
}
.setPicShow {
.el-select {
width: 222px;
}
.layoutBox {
display: flex;
align-items: center;
}
.selectGroup {
display: flex;
flex-direction: column;
.el-radio-button--small .el-radio-button__inner {
padding: 9px 24px;
}
.rowbox {
margin-bottom: 8px;
.labelinfo {
margin-left: 8px;
}
}
.colbox {
.labelinfo {
margin-left: 8px;
}
}
}
}
.showDialogHistoryPic {
display: flex;
align-items: center;
justify-content: center;
.el-dialog {
width: 70% !important;
height: 90%;
transform: none;
margin: auto;
left: auto;
top: auto;
}
.el-dialog__body {
height: calc(100% - 70px);
.title {
height: 32px;
padding-left: 12px;
line-height: 32px;
color: #fff;
font-size: 14px;
background: linear-gradient(180deg, #4cdbc8 10%, #128071 100%);
text-align: center;
}
.thumb-example {
//height: 100%;
}
}
}
}
[v-cloak] {
display: none;
}
</style>

@ -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>

@ -1,286 +0,0 @@
<template>
<div class="waterMarkBox">
<div class="setWater">
<h4>批量水印下发命令生成</h4>
<div class="waterForm">
<div class="channelBox">
<h5>选择通道</h5>
<el-checkbox-group
v-model="checkList"
class="groupCheck"
@change="handleCheck"
>
<el-checkbox
v-for="item in channelList"
:label="item.id"
:key="item.id"
>{{ item.name }}</el-checkbox
>
</el-checkbox-group>
</div>
<div class="cmdidBox">
<h5>装置编号</h5>
<el-input
type="textarea"
:rows="18"
placeholder="请输入装置编号"
v-model="cmdidtextarea"
>
</el-input>
</div>
<div class="leftWaterBox">
<h5>左侧水印</h5>
<el-input
type="textarea"
:rows="18"
placeholder="请输入左侧水印"
v-model="leftWatertextarea"
>
</el-input>
</div>
<div class="rghtWaterBox">
<h5>右侧水印</h5>
<el-input
type="textarea"
:rows="18"
placeholder="请输入右侧水印"
v-model="rightWatertextarea"
>
</el-input>
</div>
</div>
<el-button type="primary" @click="handleSure"> </el-button>
<el-button type="primary" @click="copyShare"> </el-button>
<el-button class="mlspan" type="text"
><i>{{ issueCommands.length }}</i
>条命令</el-button
>
<div class="commandsBox" id="copy-content">
<div class="aaa" v-for="item in issueCommands" v-html="item"></div>
</div>
</div>
</div>
</template>
<script>
export default {
components: {},
data() {
return {
channelList: [
{
id: 1,
name: "通道1",
},
{
id: 2,
name: "通道2",
},
{
id: 3,
name: "通道3",
},
{
id: 4,
name: "通道4",
},
],
checkList: [], //
cmdidtextarea: "", //
cmdidArr: [],
leftWatertextarea: "", //
leftWaterArr: [],
rightWatertextarea: "", //
rightWaterArr: [],
issueCommands: [], //
};
},
created() {
//this.getWater();
},
methods: {
handleCheck(val) {
console.log(this.checkList);
},
handleSure() {
console.log(this.checkList);
if (this.checkList.length == 0) {
this.$message({
showClose: true,
message: "请选择通道号",
type: "warning",
});
return;
}
if (this.cmdidtextarea !== "") {
this.cmdidArr = [...this.cmdidtextarea.trim().split("\n")]; //
} else {
this.$message({
showClose: true,
message: "请输入装置编号",
type: "warning",
});
return;
}
if (this.leftWatertextarea !== "") {
this.leftWaterArr = [...this.leftWatertextarea.trim().split("\n")]; //
} else {
this.$message({
showClose: true,
message: "请输入左侧水印",
type: "warning",
});
return;
}
if (this.rightWatertextarea !== "") {
this.rightWaterArr = [...this.rightWatertextarea.trim().split("\n")]; //
} else {
this.$message({
showClose: true,
message: "请输入右侧水印",
type: "warning",
});
return;
}
console.log(this.cmdidArr);
console.log(this.leftWaterArr);
console.log(this.rightWaterArr);
this.issueCommands = [];
this.getWater();
},
getWater() {
for (let j = 0; j < this.checkList.length; j++) {
for (let i = 0; i < this.cmdidArr.length; i++) {
var command =
"/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=osd --cmdid=" +
this.cmdidArr[i] +
" --flag=1 --channel=" +
this.checkList[j] +
' --leftBottom="' +
this.leftWaterArr[i] +
'" --rightBottom="' +
this.rightWaterArr[i] +
'" --clientid=5 --reqid=TS;' +
"<br/>" +
"sleep 1;" +
"<br/>" +
"/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=capture --cmdid=" +
this.cmdidArr[i] +
" --channel=" +
this.checkList[j] +
" --preset=255 --type=0;" +
"<br/>" +
"sleep 1;";
this.issueCommands.push(command); //push
}
}
},
copyShare() {
let div = document.getElementById("copy-content");
let range = "";
if (document.body.createTextRange) {
//ie
range = document.body.createTextRange();
range.moveToElementText(div);
range.select();
} else if (window.getSelection) {
// IEFirefox/chrome
let selection = window.getSelection();
range = document.createRange();
range.selectNodeContents(div);
selection.removeAllRanges();
selection.addRange(range);
}
document.execCommand("Copy"); //
console.log("已复制好,可贴粘");
},
},
};
</script>
<style lang="less">
.waterMarkBox {
width: calc(100% - 24px);
height: calc(100% - 24px);
padding: 12px 12px;
background: #fff;
.setWater {
border: 1px solid #dddddd;
height: calc(100% - 24px);
padding: 12px;
border-radius: 4px;
.waterForm {
width: 100%;
height: 50%;
margin-top: 16px;
// background: #fcc;
display: flex;
.channelBox {
width: 150px;
border: 1px solid #dddddd;
padding: 12px;
border-radius: 4px;
margin-right: 8px;
.groupCheck {
display: flex;
flex-direction: column;
margin-top: 12px;
.el-checkbox {
height: 32px;
line-height: 32px;
}
}
}
.cmdidBox {
width: 250px;
border: 1px solid #dddddd;
padding: 12px;
border-radius: 4px;
margin-right: 8px;
.el-textarea {
margin-top: 12px;
}
}
.leftWaterBox {
margin-right: 8px;
}
.leftWaterBox,
.rghtWaterBox {
flex: 1;
border: 1px solid #dddddd;
padding: 12px;
border-radius: 4px;
.el-textarea {
margin-top: 12px;
}
}
}
.el-button {
margin-top: 4px;
}
.commandsBox {
width: auto;
height: calc(50% - 106px);
margin-top: 8px;
border: 1px solid #fcc;
overflow: auto;
padding: 8px;
border-radius: 4px;
}
.mlspan {
// margin-left: 24px;
// height: 32px;
// line-height: 32px;
// margin-top: 4px;
// display: inline-block;
font-size: 14px;
color: #000;
cursor: default;
i {
color: #169e8c;
font-weight: bold;
font-style: normal;
}
}
}
}
</style>
Loading…
Cancel
Save