hn2.0
fanluyan 2 years ago
commit 061b2dee0f

@ -54,8 +54,11 @@ export function alarmMarkJoggle(data) {
export function getdyTreeListJoggle(data) {
return request({
url: "/api/getdyTreeList",
method: "post",
data,
method: "get",
params: data,
headers: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
},
});
}
//获取图片接口
@ -803,3 +806,13 @@ export function getOnlineTerminalListExcel() {
responseType: "blob",
});
}
//调节焦距
export function updateTermCamera(data) {
return request({
url: "/api/updateTermCamera",
method: "get",
params: data,
});
}

@ -2,6 +2,7 @@
<div class="thumb-example">
<div class="picTop">
<!-- 判断是否是图片并且不为空 -->
<div
class="bigimg"
v-if="
@ -10,6 +11,16 @@
"
:style="bigPicPath ? 'backgroundImage:url(' + bigPicPath + ')' : ''"
>
<el-button
class="downBtn"
@click.stop="
downLoadPic(
bigPicPath.substring(0, bigPicPath.length - 9),
bigPicPath.substring(0, bigPicPath.length - 9)
)
"
>下载图片</el-button
>
<!-- @click="handleBigPicbox(bigPicPath)" v-viewer="OptionssalseImg"-->
<div
class="nosee"
@ -271,6 +282,31 @@ export default {
},
created() {},
methods: {
downLoadPic(url, name) {
const image = new Image();
image.setAttribute("crossOrigin", "anonymous");
image.src = url;
image.onload = () => {
const canvas = document.createElement("canvas");
canvas.width = image.width;
canvas.height = image.height;
const ctx = canvas.getContext("2d");
ctx.drawImage(image, 0, 0, image.width, image.height);
canvas.toBlob((blob) => {
const url = URL.createObjectURL(blob);
this.download(url, name);
// URL
URL.revokeObjectURL(url);
});
};
},
download(href, name) {
const eleLink = document.createElement("a");
eleLink.download = name;
eleLink.href = href;
eleLink.click();
eleLink.remove();
},
// showbigpicPath(data) {
// console.log(data);
// if (data.includes("!")) {
@ -582,6 +618,19 @@ export default {
overflow: hidden;
margin-bottom: 4px;
position: relative;
.downBtn {
position: absolute;
background: rgba(0, 0, 0, 0.5);
border: none;
right: 8px;
bottom: 16px;
color: #fff;
z-index: 5;
&:hover {
background: rgba(0, 0, 0, 0.9);
color: #169e8c;
}
}
&:hover {
.arrow {
opacity: 1;

@ -0,0 +1,260 @@
<template>
<el-dialog
class="adddeviceDialog"
:title="title"
:visible.sync="isShow"
:close-on-click-modal="false"
width="670px"
@close="handleclose"
>
<el-form
label-position="left"
ref="formInfo"
label-width="auto"
:rules="rules"
:model="ruleForm"
>
<el-form-item label="名称" prop="name">
<el-input v-model="ruleForm.name" autocomplete="off"></el-input>
</el-form-item>
<div class="addtimeBox" ref="timescrollref">
<div
class="timeBoxArr"
v-for="(item, index) in ruleForm.list"
:key="index"
>
<el-form-item
label="时间"
:prop="'list.' + index + '.time'"
:rules="{ required: true, message: '请选择时间', trigger: 'blur' }"
>
<el-time-picker
is-range
v-model="item.time"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
format="HH:mm"
value-format="HH:mm"
>
</el-time-picker>
</el-form-item>
<el-form-item label="间隔(分)" :prop="'list.' + index + '.span'">
<!-- <el-input v-model="ruleForm.span" autocomplete="off" type="number"></el-input> -->
<el-input-number v-model="item.span" :min="1"></el-input-number>
</el-form-item>
<div class="btngrop">
<el-button
v-if="index !== 0"
type="danger"
icon="el-icon-minus"
@click="deleteModule(item, index)"
></el-button>
<el-button
icon="el-icon-plus"
type="primary"
@click="addModule()"
v-if="index + 1 == ruleForm.list.length"
></el-button>
</div>
</div>
</div>
<el-form-item label="备注" prop="remark">
<el-input v-model="ruleForm.remark" autocomplete="off"></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 { addScheduleRulel, updateScheduleRulel } from "@/utils/api/index";
import moment from "moment";
export default {
props: {
title: String,
},
data() {
return {
isShow: false,
rules: {
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
},
ruleForm: {},
};
},
methods: {
//
getdataform(val) {
console.log(val);
if (val == null) {
return (this.ruleForm = {
name: "",
list: [
{
time: "",
span: "",
},
],
remark: "",
});
}
//this.ruleForm = val;
this.ruleForm = JSON.parse(JSON.stringify(val));
this.ruleForm.list.forEach((val) => {
this.$set(val, "time", [val.startTime, val.endTime]);
console.log(val.startTime);
console.log(val.endTime);
});
},
addModule() {
//
this.ruleForm.list.push({
time: "",
span: "",
});
console.log(this.$refs.timescrollref);
this.$nextTick(() => {
console.log(this.$refs.timescrollref);
if (this.$refs.timescrollref) {
console.log(this.$refs.timescrollref.scrollHeight);
this.$refs.timescrollref.scrollTop =
this.$refs.timescrollref.scrollHeight;
}
});
},
//
deleteModule(item, index) {
console.log(item, index);
const itemList = this.ruleForm.list.indexOf(item);
if (itemList !== -1) {
this.ruleForm.list.splice(index, 1);
}
},
//
submitForm() {
this.$refs.formInfo.validate((valid) => {
if (valid) {
// delete this.ruleForm.time;
this.ruleForm.list.forEach((val) => {
this.$set(val, "startTime", val.time[0]);
this.$set(val, "endTime", val.time[1]);
});
// console.log(this.ruleForm.list[0].startTime);
let arr = [];
for (var i = 0; i < this.ruleForm.list.length; i++) {
console.log(this.ruleForm.list[i].startTime.split(":")[0]);
console.log(this.ruleForm.list[i].startTime.split(":")[1]);
console.log(this.ruleForm.list[i].endTime.split(":")[0]);
console.log(this.ruleForm.list[i].endTime.split(":")[1]);
// let str = moment(new Date()).format("hh:mm");
// console.log(typeof str);
// console.log(this.ruleForm.list[i].startTime);
// console.log(typeof this.ruleForm.list[i].startTime);
// var Stime = this.ruleForm.list[i].startTime;
// var Etime = this.ruleForm.list[i].endTime;
// console.log(Stime, Etime);
// var date = new Date(Stime);
// console.log(date);
// moment(date).format("YYYY-MM-DD HH:mm:ss")
arr.push(
{
hour: Math.floor(this.ruleForm.list[i].span / 60),
minute: this.ruleForm.list[i].span % 60,
preset: 255,
},
{
hour: this.ruleForm.list[i].startTime.split(":")[0],
minute: this.ruleForm.list[i].startTime.split(":")[1],
preset: 255,
},
{
hour: this.ruleForm.list[i].endTime.split(":")[0],
minute: this.ruleForm.list[i].endTime.split(":")[1],
preset: 255,
}
);
}
this.ruleForm.list = arr;
if (this.title == "新增") {
addScheduleRulel(this.ruleForm)
.then((res) => {
this.isShow = false;
this.$message({
duration: 1500,
showClose: true,
message: "添加成功",
type: "success",
});
this.$parent.deviceList();
})
.catch((err) => {
this.$message({
duration: 1500,
showClose: true,
message: "添加失败",
type: "error",
});
});
} else {
updateScheduleRulel(this.ruleForm)
.then((res) => {
this.isShow = false;
this.$message.success("修改成功");
this.$parent.deviceList();
})
.catch((err) => {
this.$message.error("修改失败");
});
}
} else {
return false;
}
});
},
display() {
this.isShow = true;
},
hide() {
this.isShow = false;
},
handleclose() {
this.$parent.deviceList();
},
},
mounted() {},
};
</script>
<style lang="less">
.adddeviceDialog {
.el-form {
.addtimeBox {
max-height: 205px;
overflow: auto;
}
.timeBoxArr {
display: flex;
.el-date-editor.el-input,
.el-date-editor.el-input__inner {
width: 226px;
margin-right: 16px;
}
.btngrop {
margin-bottom: 16px;
margin-left: 16px;
height: 32px;
.el-button--small {
padding: 9px 8px;
width: 30px;
}
}
}
}
}
</style>

@ -20,12 +20,12 @@
<div class="addtimeBox" ref="timescrollref">
<div
class="timeBoxArr"
v-for="(item, index) in ruleForm.list"
v-for="(item, index) in ruleForm.listTime"
:key="index"
>
<el-form-item
label="时间"
:prop="'list.' + index + '.time'"
:prop="'listTime.' + index + '.time'"
:rules="{ required: true, message: '请选择时间', trigger: 'blur' }"
>
<el-time-picker
@ -35,11 +35,13 @@
start-placeholder="开始时间"
end-placeholder="结束时间"
format="HH:mm"
value-format="HH:mm:ss"
>
</el-time-picker>
</el-form-item>
<el-form-item label="间隔(分)" :prop="'list.' + index + '.span'">
<el-form-item
label="间隔(分)"
:prop="'listTime.' + index + '.span'"
>
<!-- <el-input v-model="ruleForm.span" autocomplete="off" type="number"></el-input> -->
<el-input-number v-model="item.span" :min="1"></el-input-number>
</el-form-item>
@ -54,7 +56,7 @@
icon="el-icon-plus"
type="primary"
@click="addModule()"
v-if="index + 1 == ruleForm.list.length"
v-if="index + 1 == ruleForm.listTime.length"
></el-button>
</div>
</div>
@ -91,24 +93,25 @@ export default {
if (val == null) {
return (this.ruleForm = {
name: "",
list: [
listTime: [
{
time: "",
span: "",
},
],
list: [],
remark: "",
});
}
//this.ruleForm = val;
this.ruleForm = JSON.parse(JSON.stringify(val));
this.ruleForm.list.forEach((val) => {
this.ruleForm.listTime.forEach((val) => {
this.$set(val, "time", [val.startTime, val.endTime]);
});
},
addModule() {
//
this.ruleForm.list.push({
this.ruleForm.listTime.push({
time: "",
span: "",
});
@ -135,10 +138,42 @@ export default {
this.$refs.formInfo.validate((valid) => {
if (valid) {
// delete this.ruleForm.time;
this.ruleForm.list.forEach((val) => {
this.$set(val, "startTime", val.time[0]);
this.$set(val, "endTime", val.time[1]);
this.ruleForm.listTime.forEach((val) => {
this.$set(val, "startTime", new Date(val.time[0]));
this.$set(val, "endTime", new Date(val.time[1]));
// console.log(val.time[0]);
// console.log(typeof val.time[0]);
// console.log(new Date(val.time[0]));
// console.log(new Date(val.time[1]));
// console.log(new Date(val.time[0]).getHours());
// console.log(new Date(val.time[0]).getMinutes());
});
let arr = [];
for (var i = 0; i < this.ruleForm.listTime.length; i++) {
console.log(this.ruleForm.listTime);
arr.push(
{
hour: Math.floor(this.ruleForm.listTime[i].span / 60),
minute: this.ruleForm.listTime[i].span % 60,
preset: 255,
},
{
hour: this.ruleForm.listTime[i].startTime.getHours(),
minute: this.ruleForm.listTime[i].startTime.getMinutes(),
preset: 255,
},
{
hour: this.ruleForm.listTime[i].endTime.getHours(),
minute: this.ruleForm.listTime[i].endTime.getMinutes(),
preset: 255,
}
);
}
console.log(arr);
this.ruleForm.list = arr;
if (this.title == "新增") {
addScheduleRulel(this.ruleForm)
.then((res) => {

@ -14,13 +14,29 @@
<p class="timeGz" v-for="(val, index) in ruleSchedule" :key="index">
<span>
{{
val.startTime.substring(0, val.startTime.lastIndexOf(":"))
new Date(val.startTime).getHours() < 10
? "0" + new Date(val.startTime).getHours()
: new Date(val.startTime).getHours()
}}:
{{
new Date(val.startTime).getMinutes() < 10
? "0" + new Date(val.startTime).getMinutes()
: new Date(val.startTime).getMinutes()
}}</span
>
~
<span>{{
val.endTime.substring(0, val.endTime.lastIndexOf(":"))
}}</span>
<span
>{{
new Date(val.endTime).getHours() < 10
? "0" + new Date(val.endTime).getHours()
: new Date(val.endTime).getHours()
}}:
{{
new Date(val.endTime).getMinutes() < 10
? "0" + new Date(val.endTime).getMinutes()
: new Date(val.endTime).getMinutes()
}}</span
>
间隔<b>{{ val.span }}分钟</b>
</p>
</div>
@ -65,6 +81,10 @@
:max="9"
></el-input-number>
</div>
<!-- <div class="math">
规约
{{ data.protocol }}
</div> -->
<div
class="deStatus"
v-if="allCheckNode.indexOf(data) != -1 && showtag"
@ -99,6 +119,7 @@ import {
getTermListByChannelJoggle,
getCmaSchelduleUpload,
} from "@/utils/api/index";
import moment from "moment";
export default {
props: {
title: String,
@ -148,15 +169,18 @@ export default {
flag: false,
sureloading: false,
showtag: false,
checkOffset: "",
};
},
mounted() {},
methods: {
//
getdataform(val) {
console.log(val);
this.selid = val.id;
this.ruleSchedule = val.list;
console.log(this.ruleSchedule, "时间规则");
this.ruleSchedule = val.listTime;
console.log(this.ruleSchedule);
// console.log(this.ruleSchedule, "");
this.getlistnr();
},
//
@ -188,7 +212,7 @@ export default {
})
.catch((err) => {});
},
//// isEdit
// isEdit
getChildren(data) {
console.log(data);
return data.map((item) => {
@ -211,10 +235,34 @@ export default {
this.allCheckNode = this.$refs.tree.getCheckedNodes();
// console.log(this.allCheckNode);
console.log(nodeObj);
console.log(this.allCheckNode);
this.isactive = nodeObj.id;
this.isCheck = this.$refs.tree.getCheckedNodes().indexOf(nodeObj) > -1;
console.log(this.isCheck);
},
// //
// getruleSchedule() {
// for (var j = 0; j < this.allCheckNode.length; j++) {
// console.log(this.allCheckNode[j].offsetNum);
// for (var i = 0; i < this.ruleSchedule.length; i++) {
// console.log(typeof this.ruleSchedule[i].startTime);
// console.log(this.ruleSchedule[i].startTime);
// var Stime = moment(this.ruleSchedule[i].startTime).format("HH:mm");
// var Etime = moment(this.ruleSchedule[i].endTime).format("HH:mm");
// console.log(Stime, Etime);
// // this.ruleSchedule[i].startTime = new Date(
// // this.ruleSchedule[i].startTime
// // );
// // this.ruleSchedule[i].endTime = new Date(this.ruleSchedule[i].endTime);
// // console.log(this.ruleSchedule[i].startTime);
// // console.log(this.ruleSchedule[i].endTime);
// // moment().add(offsetSeconds, "seconds").toObject();
// // console.log(time);
// }
// }
// },
//
submitForm() {
@ -224,19 +272,168 @@ export default {
},
//
sureSum() {
//console.log(this.termidArr);
console.log(this.checkedAisle);
var ruleBox = [];
//
for (var i = 0; i < this.allCheckNode.length; i++) {
var parmsobj = {
termid: this.allCheckNode[i].id,
channelidlist: [this.checkedAisle],
offset: this.allCheckNode[i].offsetNum,
};
console.log(parmsobj);
ruleBox.push(parmsobj);
console.log(this.allCheckNode[i].bsManufacturer);
if (
this.allCheckNode[i].bsManufacturer == null ||
this.allCheckNode[i].bsManufacturer == undefined
) {
console.log(this.allCheckNode[i].offsetNum);
//
let timearr = [];
let dayArr = [];
for (var j = 0; j < this.ruleSchedule.length; j++) {
console.log(this.ruleSchedule);
console.log(this.ruleSchedule[j].startTime);
// var Stime = moment(this.ruleSchedule[j].startTime).format("HH:mm");
// var Etime = moment(this.ruleSchedule[j].endTime).format("HH:mm");
var Stime = moment(this.ruleSchedule[j].startTime)
.add(this.allCheckNode[i].offsetNum, "minute")
.format();
var Etime = moment(this.ruleSchedule[j].endTime)
.add(this.allCheckNode[i].offsetNum, "minute")
.format();
var lastETime = moment(this.ruleSchedule[j].endTime).format();
var spanTime = this.ruleSchedule[j].span;
console.log(spanTime);
console.log(moment(this.ruleSchedule[j].endTime).hour());
//
if (this.allCheckNode[i].protocol == "65283") {
console.log("湖南规约");
console.log(Stime, Etime);
console.log(typeof Stime);
console.log(
moment(this.ruleSchedule[j].endTime)
.add(this.allCheckNode[i].offsetNum, "minute")
.hour()
);
console.log(
moment(this.ruleSchedule[j].endTime)
.add(this.allCheckNode[i].offsetNum, "minute")
.minute()
);
//
console.log(moment().isSame(moment(Etime), "day"));
//
if (moment().isSame(moment(Etime), "day")) {
//
timearr.push(
{
hour: Math.floor(this.ruleSchedule[j].span / 60),
minute: this.ruleSchedule[j].span % 60,
preset: 255,
},
{
hour: moment(this.ruleSchedule[j].startTime)
.add(this.allCheckNode[i].offsetNum, "minute")
.hour(),
minute: moment(this.ruleSchedule[j].startTime)
.add(this.allCheckNode[i].offsetNum, "minute")
.minute(),
preset: 255,
},
{
hour: moment(this.ruleSchedule[j].endTime)
.add(this.allCheckNode[i].offsetNum, "minute")
.hour(),
minute: moment(this.ruleSchedule[j].endTime)
.add(this.allCheckNode[i].offsetNum, "minute")
.minute(),
preset: 255,
}
);
} else {
timearr.push(
{
hour: Math.floor(this.ruleSchedule[j].span / 60),
minute: this.ruleSchedule[j].span % 60,
preset: 255,
},
{
hour: moment(this.ruleSchedule[j].startTime)
.add(this.allCheckNode[i].offsetNum, "minute")
.hour(),
minute: moment(this.ruleSchedule[j].startTime)
.add(this.allCheckNode[i].offsetNum, "minute")
.minute(),
preset: 255,
},
{
hour: moment(this.ruleSchedule[j].endTime).hour(),
minute: moment(this.ruleSchedule[j].endTime).minute(),
preset: 255,
}
);
}
console.log(timearr);
}
////
if (
this.allCheckNode[i].protocol == "65286" ||
this.allCheckNode[i].protocol == "65282"
) {
console.log("河南规约");
//
//this.getDayArr(startDay, endDay);
let startDay = Stime;
let endDay = Etime;
var lastendDay = lastETime;
console.log(lastETime);
console.log(startDay, endDay);
let startVal = this.$moment(new Date(startDay)).format(
"YYYY-MM-DD HH:mm"
);
console.log(startVal);
console.log(moment().isSame(moment(endDay), "day"));
while (this.$moment(startVal).isBefore(endDay)) {
dayArr.push(startVal);
//
startVal = this.$moment(new Date(startVal))
.add(spanTime, "minute")
.format("YYYY-MM-DD HH:mm");
console.log(startVal);
}
// //
if (!moment().isSame(moment(endDay), "day")) {
dayArr.push(
this.$moment(new Date(lastETime)).format("YYYY-MM-DD HH:mm")
);
}
console.log(dayArr);
for (var k = 0; k < dayArr.length; k++) {
//console.log(moment(dayArr[k]).hour());
timearr.push({
hour: moment(dayArr[k]).hour(),
minute: moment(dayArr[k]).minute(),
preset: 255,
});
}
// return dayArr;
}
}
var parmsobj = {
termid: this.allCheckNode[i].id,
channelid: this.checkedAisle,
offset: this.allCheckNode[i].offsetNum,
list: timearr,
};
console.log(parmsobj);
ruleBox.push(parmsobj);
}
console.log(ruleBox);
}
console.log(ruleBox);
setScheduleRulel({
list: ruleBox,
scheduleid: this.selid,
@ -252,14 +449,19 @@ export default {
}, 3000);
})
.catch((err) => {
this.$message({
duration: 1500,
showClose: true,
message: "添加失败",
type: "error",
});
// this.$message({
// duration: 1500,
// showClose: true,
// message: "",
// type: "error",
// });
});
},
//
//
getHnTime() {},
//
getZzTime() {},
//requestid
requestTime() {
this.sureloading = true;
@ -274,7 +476,6 @@ export default {
arr
) {
console.log(value, index, arr);
return value.status !== 1;
});
if (this.requestList.length == 0) {

@ -1,386 +0,0 @@
<template>
<el-dialog
class="photoSetDialog"
title="设置"
:visible.sync="isShow"
:close-on-click-modal="false"
width="1020px"
@close="handleclose"
>
<div class="setTimeTd">
<h3>时间表规则</h3>
<div class="flexTimeGz">
<p class="timeGz" v-for="(val, index) in ruleSchedule" :key="index">
<span>
{{
val.startTime.substring(0, val.startTime.lastIndexOf(":"))
}}</span
>
~
<span>{{
val.endTime.substring(0, val.endTime.lastIndexOf(":"))
}}</span>
间隔<b>{{ val.span }}分钟</b>
</p>
</div>
<h3>设置通道</h3>
<div class="chooseTDBox">
<label>选择通道:</label>
<div class="checkBox">
<el-radio-group v-model="checkedAisle" @change="handleChange">
<el-radio
:label="val.id"
border
v-for="val in aisleList"
:key="val.id"
>{{ val.name }}</el-radio
>
</el-radio-group>
</div>
</div>
<div class="flexnr" v-loading="loading" v-if="newzzList.length !== 0">
<el-tree
:data="newzzList"
show-checkbox
:props="defaultProps"
ref="tree"
node-key="id"
:default-expand-all="true"
@check-change="getCheckedNodes"
>
<span
v-if="!data.list"
class="custom-tree-node"
slot-scope="{ data }"
>
<span class="mr10">{{ data.name }}</span>
<!-- <el-tag size="mini" type="success" v-if="zzsuccess"
>装置下发成功</el-tag
>
<el-tag size="mini" v-if="zzpending"
><i class="el-icon-loading"></i>装置下发中</el-tag
>
<el-tag size="mini" type="danger" v-if="zzerror"
>装置下发失败</el-tag
> -->
</span>
<span v-else class="custom-tree-node" slot-scope="{ data }">
<span>{{ data.name }}</span>
</span>
</el-tree>
</div>
<div class="flexnr" v-else>
<p class="nochannel">图像监测装置</p>
</div>
</div>
<div slot="footer" class="dialog-footer">
<!-- <el-button @click="getCheckedNodes"></el-button> -->
<el-button @click="handleclose"> </el-button>
<el-button type="primary" @click="submitForm()" :loading="sureloading"
> </el-button
>
</div>
</el-dialog>
</template>
<script>
import {
setScheduleRulel,
getScheduleRulelAccessList,
getTermListByChannelJoggle,
getCmaSchelduleUpload,
} from "@/utils/api/index";
export default {
props: {
title: String,
},
data() {
return {
contentStyle: { width: "90px" },
isShow: false,
selid: 0, //id
ruleSchedule: [], //
checkedAisle: "", //
aisleList: [], //
listnr: [], //
defaultProps: {
children: "list",
label: "name",
},
termidArr: [],
ruleid: "",
parmsList: [], //
multipleSelection: [],
//
newzzList: [],
zzListCheck: [],
loading: false,
//
checkAll: true,
isIndeterminate: true, //
timer: null,
termidArrNum: -1,
requestList: [],
timer: null,
i: 0,
zzsuccess: false,
zzpending: false,
zzerror: false,
allCheckNode: [], //
requestArr: [], //requestid
termzzid: [],
flag: false,
sureloading: false,
};
},
mounted() {},
methods: {
//
getdataform(val) {
this.selid = val.id;
this.ruleSchedule = val.list;
console.log(this.ruleSchedule, "时间规则");
this.getlistnr();
},
//
getlistnr() {
getScheduleRulelAccessList({})
.then((res) => {
this.listnr = res.data.list;
this.aisleList = res.data.channellist;
})
.catch((err) => {});
},
//
handleChange() {
console.log(this.checkedAisle);
this.loading = true;
getTermListByChannelJoggle({
id: this.checkedAisle,
})
.then((res) => {
console.log(res);
this.newzzList = res.data.list;
console.log(this.listnr);
console.log(this.newzzList);
console.log(this.zzListCheck);
this.loading = false;
})
.catch((err) => {});
},
handleCheckBox() {
console.log(this.zzListCheck);
},
// //
getCheckedNodes() {
this.allCheckNode = this.$refs.tree.getCheckedNodes();
console.log(this.allCheckNode);
},
//
submitForm() {
//console.log(this.termidArr);
this.sureSum();
},
//
sureSum() {
//console.log(this.termidArr);
console.log(this.checkedAisle);
var ruleBox = [];
for (var i = 0; i < this.allCheckNode.length; i++) {
var parmsobj = {
termid: this.allCheckNode[i].id,
channelidlist: [this.checkedAisle],
offset: Math.floor(Math.random() * 10),
};
console.log(parmsobj);
ruleBox.push(parmsobj);
}
console.log(ruleBox);
setScheduleRulel({
list: ruleBox,
scheduleid: this.selid,
})
.then((res) => {
console.log(res);
this.requestList = res.data.list;
this.requestTime();
this.timer = window.setInterval(() => {
//console.log(this.requestList);
this.requestTime();
this.i++;
}, 3000);
})
.catch((err) => {
this.$message({
showClose: true,
message: "添加失败",
type: "error",
});
});
},
//requestid
requestTime() {
this.sureloading = true;
getCmaSchelduleUpload({
list: this.requestList,
})
.then((res) => {
this.requestArr = res.data.list;
this.requestList = this.requestArr.filter(function (
value,
index,
arr
) {
console.log(value, index, arr);
return value.status !== 1;
});
if (this.requestList.length == 0) {
this.zzsuccess = true;
this.$message.success("下发成功");
clearInterval(this.timer);
this.timer = null;
this.isShow = false;
this.sureloading = false;
} else if (this.i > 9) {
this.zzerror = true;
this.i = 0;
this.$message.warning("下发失败,请稍后再试!");
clearInterval(this.timer);
this.timer = null;
this.isShow = false;
this.sureloading = false;
}
})
.catch((err) => {});
},
display() {
this.isShow = true;
},
handleclose() {
this.isShow = false;
this.newzzList = [];
this.checkedAisle = "";
console.log(this.allCheckNode, "1111111111");
clearTimeout(this.timer);
this.timer = null;
},
},
};
</script>
<style lang="less" scoped>
.photoSetDialog {
.el-dialog__body {
// height: 360px;
// overflow: auto;
}
.flexnr {
height: 360px;
overflow: auto;
display: flex;
align-items: flex-start;
border: 1px solid #eee;
padding: 16px;
border-radius: 4px;
.mr10 {
margin-right: 10px;
}
.dybox {
h4 {
font-size: 14px;
color: #333;
line-height: 24px;
font-weight: normal;
}
.xlbox {
h4 {
font-size: 14px;
color: #333;
line-height: 24px;
font-weight: normal;
}
margin-left: 16px;
.zzbox {
h4 {
}
.el-checkbox-group {
// display: flex;
// flex-direction: column;
margin-left: 22px;
.el-checkbox {
line-height: 28px;
//width: 196px;
.el-checkbox__label {
b {
margin-left: 18px;
font-weight: normal;
font-size: 12px;
}
}
}
}
}
}
}
.nochannel {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
}
.w50 {
width: 50px;
}
.setTimeTd {
h3 {
margin: 8px 0px;
font-size: 16px;
line-height: 24px;
}
.flexTimeGz {
display: flex;
flex-wrap: wrap;
.timeGz {
line-height: 32px;
margin-right: 16px;
b {
font-weight: normal;
color: @color-primary;
}
span {
margin: 0px 8px;
}
}
}
.setCheckbox {
.el-table__header .el-table-column--selection .cell .el-checkbox:after {
color: #333;
content: "全选";
font-size: 16px;
margin-left: 12px;
font-weight: bold;
}
}
}
.chooseTDBox {
display: flex;
align-items: center;
margin-bottom: 8px;
label {
margin-right: 8px;
}
}
.treeTable {
margin-top: 16px;
}
}
</style>

@ -0,0 +1,280 @@
<template>
<div class="deviceInformation">
<div class="deviceBox">
<div class="deviceBtnGroup">
<h4>拍照时间表设置</h4>
<el-button
type="primary"
icon="el-icon-plus"
@click.native.stop="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"
v-loading="loading"
>
<!-- <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>
<template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column>
<!-- <el-table-column label="时间表类型" show-overflow-tooltip>
<template>时间表类型</template>
</el-table-column> -->
<el-table-column label="时间表规则">
<template slot-scope="scope">
<p
class="timeGz"
v-for="(val, index) in scope.row.list"
:key="index"
>
<span>
{{
val.startTime.substring(0, val.startTime.lastIndexOf(":"))
}}</span
>
~
<span>{{
val.endTime.substring(0, val.endTime.lastIndexOf(":"))
}}</span>
间隔<b>{{ val.span }}分钟</b>
</p>
<!-- <ul
class="rulesBox"
v-for="(item, value) in scope.row.list"
:key="value"
>
<li><span>开始时间</span>{{ item.startTime }}</li>
<li><span>结束时间</span>{{ item.endTime }}</li>
<li>
<span>时间间隔:</span>
<el-tag>{{ item.span }}</el-tag>
</li>
</ul> -->
</template>
</el-table-column>
<el-table-column
prop="remark"
label="备注"
show-overflow-tooltip
></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
>
<el-button type="text" @click.native.stop="handleSet(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>
<!-- 新增时间表 -->
<adddeviceDialog :title="title" ref="adddeviceDialogref"></adddeviceDialog>
<!-- 设置时间表 -->
<setdevice ref="setdeviceDialogref"></setdevice>
</div>
</template>
<script>
import {
getScheduleRulelListJoggle,
deleteScheduleRulel,
} from "@/utils/api/index";
import adddeviceDialog from "./components/adddeviceDialog.vue";
import setdevice from "./components/setdevice.vue";
export default {
components: {
adddeviceDialog,
setdevice,
},
data() {
return {
title: "", //
deviceTableData: [],
//multipleSelection: [], //
page: 1, //
pageSize: 20, //
total: 0, //
loading: true,
};
},
created() {
this.deviceList();
},
methods: {
//
deviceList() {
this.loading = true;
getScheduleRulelListJoggle({
pageindex: this.page,
pagesize: this.pageSize,
})
.then((res) => {
this.deviceTableData = res.data.list;
this.total = res.data.total;
this.loading = false;
})
.catch((err) => {});
},
//
handleRowClick(row, column, event) {
this.$refs.multipleTable.toggleRowSelection(row);
},
//
handleSelectionChange(val) {
this.multipleSelection = val;
},
//
handleAdddevice() {
this.title = "新增";
this.$refs.adddeviceDialogref.display();
this.$refs.adddeviceDialogref.getdataform(null);
},
//
handleResive(data) {
this.title = "修改";
this.$refs.adddeviceDialogref.display();
this.$refs.adddeviceDialogref.getdataform(data);
},
//
handleSet(data) {
this.$refs.setdeviceDialogref.display();
this.$refs.setdeviceDialogref.getdataform(data);
},
//
handleDelete(data) {
let deleteArr = [];
deleteArr.push({
id: data.id,
});
this.$confirm("确定要删除记录吗,同时删除关联关系?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteScheduleRulel({ list: deleteArr }).then((res) => {
this.deviceList(); //
});
this.$message({
duration: 1500,
showClose: true,
type: "success",
message: "删除成功!",
});
})
.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">
.deviceInformation {
width: calc(100% - 24px);
height: calc(100% - 24px);
padding: 12px 12px;
background: @color-white;
.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;
.rulesBox {
display: flex;
flex-direction: row;
li {
list-style: none;
margin-right: 24px;
line-height: 24px;
span {
margin-right: 4px;
}
.el-tag--small {
height: 16px;
padding: 0 8px;
line-height: 16px;
}
}
}
.timeGz {
line-height: 32px;
b {
font-weight: normal;
color: @color-primary;
}
span {
margin: 0px 8px;
}
}
}
}
</style>

@ -13,7 +13,7 @@
<div class="deviceTable">
<el-table
ref="multipleTable"
:data="deviceTableData"
:data="newList"
stripe
tooltip-effect="dark"
style="width: 100%"
@ -30,39 +30,41 @@
<el-table-column label="名称" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column>
<!-- <el-table-column label="时间表类型" show-overflow-tooltip>
<template>时间表类型</template>
</el-table-column> -->
<el-table-column label="时间表规则">
<template slot-scope="scope">
<p
class="timeGz"
v-for="(val, index) in scope.row.list"
v-for="(val, index) in scope.row.listTime"
:key="index"
>
<span>
{{
val.startTime.substring(0, val.startTime.lastIndexOf(":"))
new Date(val.startTime).getHours() < 10
? "0" + new Date(val.startTime).getHours()
: new Date(val.startTime).getHours()
}}:
{{
new Date(val.startTime).getMinutes() < 10
? "0" + new Date(val.startTime).getMinutes()
: new Date(val.startTime).getMinutes()
}}</span
>
~
<span>{{
val.endTime.substring(0, val.endTime.lastIndexOf(":"))
}}</span>
<span
>{{
new Date(val.endTime).getHours() < 10
? "0" + new Date(val.endTime).getHours()
: new Date(val.endTime).getHours()
}}:
{{
new Date(val.endTime).getMinutes() < 10
? "0" + new Date(val.endTime).getMinutes()
: new Date(val.endTime).getMinutes()
}}</span
>
间隔<b>{{ val.span }}分钟</b>
</p>
<!-- <ul
class="rulesBox"
v-for="(item, value) in scope.row.list"
:key="value"
>
<li><span>开始时间</span>{{ item.startTime }}</li>
<li><span>结束时间</span>{{ item.endTime }}</li>
<li>
<span>时间间隔:</span>
<el-tag>{{ item.span }}</el-tag>
</li>
</ul> -->
</template>
</el-table-column>
@ -127,6 +129,8 @@ export default {
return {
title: "", //
deviceTableData: [],
newList: [],
listTime: [],
//multipleSelection: [], //
page: 1, //
pageSize: 20, //
@ -146,9 +150,94 @@ export default {
pagesize: this.pageSize,
})
.then((res) => {
this.newList = [];
this.deviceTableData = res.data.list;
this.total = res.data.total;
this.loading = false;
// for (var i = 0; i < this.deviceTableData.list.length; i++) {
// console.log(this.deviceTableData.list[i]);
// }
console.log(this.deviceTableData);
for (var i = 0; i < this.deviceTableData.length; i++) {
var arr = [];
console.log(this.deviceTableData[i]);
for (var k = 0; k < this.deviceTableData[i].list.length; k++) {
if (k % 3 == 0) {
var obj = {};
obj.span =
this.deviceTableData[i].list[k].hour * 60 +
this.deviceTableData[i].list[k].minute;
console.log("时间间隔");
} else if (k % 3 == 1) {
console.log("开始时间");
console.log("a");
// obj.startTime =
// this.deviceTableData[i].list[k].hour +
// ":" +
// this.deviceTableData[i].list[k].minute;
// console.log(new Date());
let timeDate = new Date();
timeDate.setHours(this.deviceTableData[i].list[k].hour);
timeDate.setMinutes(this.deviceTableData[i].list[k].minute);
console.log(timeDate);
// console.log(new Date().getHours());
// console.log(
// new Date().setHours(this.deviceTableData[i].list[k].hour)
// );
// console.log(d.getHours() + ":" + d.getMinutes());
// if (timeDate.getHours() < 10) {
// console.log(timeDate.getHours());
// obj.startTime =
// "0" + timeDate.getHours() + ":" + timeDate.getMinutes();
// } else {
// }
// let timeHour =
// timeDate.getHours() < 10
// ? "0" + timeDate.getHours()
// : timeDate.getHours();
// let timeMinute =
// timeDate.getMinutes() < 10
// ? "0" + timeDate.getMinutes()
// : timeDate.getMinutes();
obj.startTime = timeDate.toUTCString();
} else if (k % 3 == 2) {
console.log("结束时间");
obj.endTime =
this.deviceTableData[i].list[k].hour +
":" +
this.deviceTableData[i].list[k].minute;
let timeDate = new Date();
timeDate.setHours(this.deviceTableData[i].list[k].hour);
timeDate.setMinutes(this.deviceTableData[i].list[k].minute);
// obj.endTime = c.toJSON();
let timeHour =
timeDate.getHours() < 10
? "0" + timeDate.getHours()
: timeDate.getHours();
let timeMinute =
timeDate.getMinutes() < 10
? "0" + timeDate.getMinutes()
: timeDate.getMinutes();
//obj.startTime = timeHour + ":" + timeMinute;
// obj.endTime = timeHour + ":" + timeMinute;
obj.endTime = timeDate.toUTCString();
arr.push(obj);
}
console.log(this.deviceTableData[i].list[k]);
}
this.newList.push({
id: this.deviceTableData[i].id,
list: this.deviceTableData[i].list,
name: this.deviceTableData[i].name,
remark: this.deviceTableData[i].remark,
listTime: arr,
});
}
console.log("this.newList");
console.log(this.newList);
})
.catch((err) => {});
},

@ -183,8 +183,7 @@
show-overflow-tooltip
min-width="90"
v-if="roleUser != 2"
>
</el-table-column>
/>
<el-table-column
prop="lastHeartbeat"
label="最后一次心跳时间"

@ -50,26 +50,45 @@
<div class="w8">时间表:</div>
<div class="w80 flexonly" v-loading="timeloading">
<el-tag
v-if="timeProtocol == '65283'"
class="mr10 mt10"
size="mini"
v-for="(val, index) in this.shedulenr"
:key="index"
>{{ val.substring(0, val.lastIndexOf(":")) }}</el-tag
>{{ val.substring(val.length - 5) }}</el-tag
>
<el-tag
v-if="timeProtocol == '65286' || timeProtocol == '65282'"
class="mr10 mt10"
size="mini"
v-for="(val, index) in this.shedulenr"
:key="index"
>{{ $moment(val).format("HH:mm") }}</el-tag
>
<!-- {{ val.substring(val.length - 5) }} -->
</div>
</div>
<div class="rightTime" v-if="newshedulenr.length !== 0">
<div class="w8">装置时间表:</div>
<span class="offtime" v-if="offsetnum !== ''"
<span class="offtime" v-if="offsetnum !== null"
>(偏移时间{{ offsetnum }}分钟)</span
>
<div class="w80 flexonly" v-loading="timeloading">
<el-tag
v-if="timeProtocol == '65283'"
class="mr10 mt10"
size="mini"
v-for="(val, index) in this.newshedulenr"
:key="index"
>{{ val.substring(val.length - 5) }}</el-tag
>
<el-tag
v-if="timeProtocol == '65286' || timeProtocol == '65282'"
class="mr10 mt10"
size="mini"
v-for="(val, index) in this.newshedulenr"
:key="index"
>{{ val.substring(0, val.lastIndexOf(":")) }}</el-tag
>{{ $moment(val).format("HH:mm") }}</el-tag
>
</div>
</div>
@ -92,7 +111,7 @@
<div class="deviceTable">
<el-table
ref="multipleTable"
:data="deviceTableData"
:data="newList"
tooltip-effect="dark"
stripe
style="width: 100%"
@ -101,25 +120,42 @@
<el-table-column label="名称" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column>
<el-table-column label="时间表类型" show-overflow-tooltip>
<!-- <el-table-column label="时间表类型" show-overflow-tooltip>
<template>按时间段</template>
</el-table-column>
<el-table-column label="时间表规则" width="300">
</el-table-column> -->
<el-table-column label="时间表规则" width="360px">
<template slot-scope="scope">
<p
class="timeGz"
v-for="(val, index) in scope.row.list"
v-for="(val, index) in scope.row.listTime"
:key="index"
>
<span>
{{
val.startTime.substring(0, val.startTime.lastIndexOf(":"))
new Date(val.startTime).getHours() < 10
? "0" + new Date(val.startTime).getHours()
: new Date(val.startTime).getHours()
}}:
{{
new Date(val.startTime).getMinutes() < 10
? "0" + new Date(val.startTime).getMinutes()
: new Date(val.startTime).getMinutes()
}}</span
>
~
<span>{{
val.endTime.substring(0, val.endTime.lastIndexOf(":"))
}}</span>
<span
>{{
new Date(val.endTime).getHours() < 10
? "0" + new Date(val.endTime).getHours()
: new Date(val.endTime).getHours()
}}:
{{
new Date(val.endTime).getMinutes() < 10
? "0" + new Date(val.endTime).getMinutes()
: new Date(val.endTime).getMinutes()
}}</span
>
间隔<b>{{ val.span }}分钟</b>
</p>
</template>
@ -183,8 +219,31 @@
v-for="(val, index) in scheduleInfo"
:key="index"
>
<span>{{ val.startTime }}</span> ~
<span>{{ val.endTime }}</span>
<span
>{{
new Date(val.startTime).getHours() < 10
? "0" + new Date(val.startTime).getHours()
: new Date(val.startTime).getHours()
}}:
{{
new Date(val.startTime).getMinutes() < 10
? "0" + new Date(val.startTime).getMinutes()
: new Date(val.startTime).getMinutes()
}}</span
>
~
<span
>{{
new Date(val.endTime).getHours() < 10
? "0" + new Date(val.endTime).getHours()
: new Date(val.endTime).getHours()
}}:
{{
new Date(val.endTime).getMinutes() < 10
? "0" + new Date(val.endTime).getMinutes()
: new Date(val.endTime).getMinutes()
}}</span
>
间隔<b>{{ val.span }}分钟</b>
</p>
</div>
@ -245,6 +304,7 @@ import {
getCmaSchelduleUpload,
getTermStatus,
} from "@/utils/api/index";
import moment from "moment";
export default {
props: {
title: String,
@ -259,6 +319,8 @@ export default {
selaccess: "", //
shedulenr: [], //
deviceTableData: [], //-
newList: [],
listTime: [],
page: 1, //
pageSize: 10, //
total: 0, //
@ -295,6 +357,7 @@ export default {
offsetnum: "",
setNum: Math.floor(Math.random() * 10),
compareloading: false,
timeProtocol: "",
};
},
mounted() {
@ -305,9 +368,11 @@ export default {
console.log(tab, event);
},
//
getSingleAccess(id, zzid) {
getSingleAccess(id, zzid, protocol) {
this.newcmdzzid = zzid;
this.selfacilityId = id;
this.timeProtocol = protocol;
console.log(this.timeProtocol);
getChannelListJoggle({ termid: id })
.then((res) => {
this.accesslist = res.data.list;
@ -321,10 +386,103 @@ export default {
terminalid: this.selfacilityId,
})
.then((res) => {
// this.$message.success("");
// this.shedulenr = res.data.list.join("; ")
this.shedulenr = res.data.list;
console.log(res.data.offset);
this.offsetnum = res.data.offset;
console.log(this.offsetnum);
console.log("aaaaa");
console.log(this.shedulenr);
//
if (this.timeProtocol == "65283") {
console.log("1111111111111111111111111111111111111");
var hnarr = [];
for (var i = 0; i < this.shedulenr.length; i++) {
if (i % 3 == 0) {
var hnobj = {};
hnobj.span =
this.shedulenr[i].hour * 60 + this.shedulenr[i].minute;
console.log("时间间隔");
} else if (i % 3 == 1) {
console.log("开始时间");
console.log("a");
let timeDate = new Date();
timeDate.setHours(this.shedulenr[i].hour);
timeDate.setMinutes(this.shedulenr[i].minute);
console.log(timeDate);
hnobj.startTime = timeDate;
} else if (i % 3 == 2) {
console.log("结束时间");
hnobj.endTime =
this.shedulenr[i].hour + ":" + this.shedulenr[i].minute;
let timeDate = new Date();
timeDate.setHours(this.shedulenr[i].hour);
timeDate.setMinutes(this.shedulenr[i].minute);
// hnobj.endTime = c.toJSON();
let timeHour =
timeDate.getHours() < 10
? "0" + timeDate.getHours()
: timeDate.getHours();
let timeMinute =
timeDate.getMinutes() < 10
? "0" + timeDate.getMinutes()
: timeDate.getMinutes();
hnobj.endTime = timeDate;
hnarr.push(hnobj);
}
}
console.log("222222222222222222");
console.log(hnarr);
console.log("22222222222222222222222");
let dayArr = [];
//
for (let k = 0; k < hnarr.length; k++) {
console.log(hnarr[k].startTime);
console.log(hnarr[k].endTime);
console.log(hnarr[k].span);
let startDay = hnarr[k].startTime;
let endDay = hnarr[k].endTime;
console.log(startDay, endDay);
let startVal = this.$moment(new Date(startDay)).format(
"YYYY-MM-DD HH:mm"
);
console.log(startVal);
while (this.$moment(startVal).isBefore(endDay)) {
dayArr.push(startVal);
//
startVal = this.$moment(new Date(startVal))
.add(hnarr[k].span, "minute")
.format("YYYY-MM-DD HH:mm");
console.log(startVal);
}
// //
dayArr.push(
this.$moment(new Date(endDay)).format("YYYY-MM-DD HH:mm")
);
console.log(dayArr);
this.shedulenr = dayArr;
}
}
//
if (
this.timeProtocol == "65286" ||
this.timeProtocol == "65282"
) {
console.log("河南规约");
var hnarr = [];
for (var i = 0; i < this.shedulenr.length; i++) {
console.log(this.shedulenr[i].hour);
let timeDate = new Date();
timeDate.setHours(this.shedulenr[i].hour);
timeDate.setMinutes(this.shedulenr[i].minute);
console.log(timeDate);
hnarr.push(timeDate);
}
console.log(hnarr);
this.shedulenr = hnarr;
}
this.loading = false;
})
.catch((err) => {
@ -343,9 +501,95 @@ export default {
terminalid: this.selfacilityId,
})
.then((res) => {
// this.$message.success("");
// this.shedulenr = res.data.list.join("; ")
this.shedulenr = res.data.list;
console.log(this.shedulenr);
//
if (this.timeProtocol == "65283") {
console.log("1111111111111111111111111111111111111");
var hnarr = [];
for (var i = 0; i < this.shedulenr.length; i++) {
if (i % 3 == 0) {
var hnobj = {};
hnobj.span =
this.shedulenr[i].hour * 60 + this.shedulenr[i].minute;
console.log("时间间隔");
} else if (i % 3 == 1) {
console.log("开始时间");
console.log("a");
let timeDate = new Date();
timeDate.setHours(this.shedulenr[i].hour);
timeDate.setMinutes(this.shedulenr[i].minute);
console.log(timeDate);
hnobj.startTime = timeDate;
} else if (i % 3 == 2) {
console.log("结束时间");
hnobj.endTime =
this.shedulenr[i].hour + ":" + this.shedulenr[i].minute;
let timeDate = new Date();
timeDate.setHours(this.shedulenr[i].hour);
timeDate.setMinutes(this.shedulenr[i].minute);
// hnobj.endTime = c.toJSON();
let timeHour =
timeDate.getHours() < 10
? "0" + timeDate.getHours()
: timeDate.getHours();
let timeMinute =
timeDate.getMinutes() < 10
? "0" + timeDate.getMinutes()
: timeDate.getMinutes();
hnobj.endTime = timeDate;
hnarr.push(hnobj);
}
}
console.log("222222222222222222");
console.log(hnarr);
console.log("22222222222222222222222");
let dayArr = [];
//
for (let k = 0; k < hnarr.length; k++) {
console.log(hnarr[k].startTime);
console.log(hnarr[k].endTime);
console.log(hnarr[k].span);
let startDay = hnarr[k].startTime;
let endDay = hnarr[k].endTime;
console.log(startDay, endDay);
let startVal = this.$moment(new Date(startDay)).format(
"YYYY-MM-DD HH:mm"
);
console.log(startVal);
while (this.$moment(startVal).isBefore(endDay)) {
dayArr.push(startVal);
//
startVal = this.$moment(new Date(startVal))
.add(hnarr[k].span, "minute")
.format("YYYY-MM-DD HH:mm");
console.log(startVal);
}
// //
dayArr.push(
this.$moment(new Date(endDay)).format("YYYY-MM-DD HH:mm")
);
console.log(dayArr);
this.shedulenr = dayArr;
}
}
//
if (this.timeProtocol == "65286" || this.timeProtocol == "65282") {
console.log("河南规约");
var hnarr = [];
for (var i = 0; i < this.shedulenr.length; i++) {
console.log(this.shedulenr[i].hour);
let timeDate = new Date();
timeDate.setHours(this.shedulenr[i].hour);
timeDate.setMinutes(this.shedulenr[i].minute);
console.log(timeDate);
hnarr.push(timeDate);
}
console.log(hnarr);
this.shedulenr = hnarr;
}
this.offsetnum = res.data.offset;
this.loading = false;
})
@ -386,6 +630,105 @@ export default {
// this.shedulenr = res.data.list.join("; ")
this.compareloading = false;
this.newshedulenr = res.data.list;
this.offsetnum = res.data.offset;
console.log("qqqqqqqqqqqqqqqqqqqqqq");
console.log(this.offsetnum);
//
if (this.timeProtocol == "65283") {
console.log("湖南规约");
console.log("1111111111111111111111111111111111111");
var hnarr = [];
for (var i = 0; i < this.newshedulenr.length; i++) {
if (i % 3 == 0) {
var hnobj = {};
hnobj.span =
this.newshedulenr[i].hour * 60 +
this.newshedulenr[i].minute;
console.log("时间间隔");
} else if (i % 3 == 1) {
console.log("开始时间");
console.log("a");
let timeDate = new Date();
timeDate.setHours(this.newshedulenr[i].hour);
timeDate.setMinutes(this.newshedulenr[i].minute);
console.log(timeDate);
hnobj.startTime = timeDate;
} else if (i % 3 == 2) {
console.log("结束时间");
hnobj.endTime =
this.newshedulenr[i].hour +
":" +
this.newshedulenr[i].minute;
let timeDate = new Date();
timeDate.setHours(this.newshedulenr[i].hour);
timeDate.setMinutes(this.newshedulenr[i].minute);
// hnobj.endTime = c.toJSON();
let timeHour =
timeDate.getHours() < 10
? "0" + timeDate.getHours()
: timeDate.getHours();
let timeMinute =
timeDate.getMinutes() < 10
? "0" + timeDate.getMinutes()
: timeDate.getMinutes();
hnobj.endTime = timeDate;
hnarr.push(hnobj);
}
}
console.log("222222222222222222");
console.log(hnarr);
console.log("22222222222222222222222");
let dayArr = [];
//
for (let k = 0; k < hnarr.length; k++) {
console.log(hnarr[k].startTime);
console.log(hnarr[k].endTime);
console.log(hnarr[k].span);
let startDay = hnarr[k].startTime;
let endDay = hnarr[k].endTime;
console.log(startDay, endDay);
let startVal = this.$moment(new Date(startDay)).format(
"YYYY-MM-DD HH:mm"
);
console.log(startVal);
while (this.$moment(startVal).isBefore(endDay)) {
dayArr.push(startVal);
//
startVal = this.$moment(new Date(startVal))
.add(hnarr[k].span, "minute")
.format("YYYY-MM-DD HH:mm");
console.log(startVal);
}
// //
dayArr.push(
this.$moment(new Date(endDay)).format("YYYY-MM-DD HH:mm")
);
console.log(dayArr);
this.newshedulenr = dayArr;
}
}
//
if (
this.timeProtocol == "65286" ||
this.timeProtocol == "65282"
) {
console.log("河南规约");
var hnarr = [];
for (var i = 0; i < this.newshedulenr.length; i++) {
console.log(this.newshedulenr[i].hour);
let timeDate = new Date();
timeDate.setHours(this.newshedulenr[i].hour);
timeDate.setMinutes(this.newshedulenr[i].minute);
console.log(timeDate);
hnarr.push(timeDate);
}
console.log(hnarr);
this.newshedulenr = hnarr;
}
this.timernum = 0;
// this.$message.success("");
clearInterval(this.timer);
@ -416,10 +759,98 @@ export default {
pagesize: this.pageSize,
})
.then((res) => {
// this.deviceTableData = res.data.list;
// this.total = res.data.total;
// console.log(this.deviceTableData);
// this.loading = false;
this.newList = [];
this.deviceTableData = res.data.list;
this.total = res.data.total;
console.log(this.deviceTableData);
this.loading = false;
// for (var i = 0; i < this.deviceTableData.list.length; i++) {
// console.log(this.deviceTableData.list[i]);
// }
// console.log(this.deviceTableData);
for (var i = 0; i < this.deviceTableData.length; i++) {
var arr = [];
console.log(this.deviceTableData[i]);
for (var k = 0; k < this.deviceTableData[i].list.length; k++) {
if (k % 3 == 0) {
var obj = {};
obj.span =
this.deviceTableData[i].list[k].hour * 60 +
this.deviceTableData[i].list[k].minute;
console.log("时间间隔");
} else if (k % 3 == 1) {
console.log("开始时间");
console.log("a");
// obj.startTime =
// this.deviceTableData[i].list[k].hour +
// ":" +
// this.deviceTableData[i].list[k].minute;
// console.log(new Date());
let timeDate = new Date();
timeDate.setHours(this.deviceTableData[i].list[k].hour);
timeDate.setMinutes(this.deviceTableData[i].list[k].minute);
console.log(timeDate);
// console.log(new Date().getHours());
// console.log(
// new Date().setHours(this.deviceTableData[i].list[k].hour)
// );
// console.log(d.getHours() + ":" + d.getMinutes());
// if (timeDate.getHours() < 10) {
// console.log(timeDate.getHours());
// obj.startTime =
// "0" + timeDate.getHours() + ":" + timeDate.getMinutes();
// } else {
// }
// let timeHour =
// timeDate.getHours() < 10
// ? "0" + timeDate.getHours()
// : timeDate.getHours();
// let timeMinute =
// timeDate.getMinutes() < 10
// ? "0" + timeDate.getMinutes()
// : timeDate.getMinutes();
obj.startTime = timeDate.toUTCString();
} else if (k % 3 == 2) {
console.log("结束时间");
obj.endTime =
this.deviceTableData[i].list[k].hour +
":" +
this.deviceTableData[i].list[k].minute;
let timeDate = new Date();
timeDate.setHours(this.deviceTableData[i].list[k].hour);
timeDate.setMinutes(this.deviceTableData[i].list[k].minute);
// obj.endTime = c.toJSON();
let timeHour =
timeDate.getHours() < 10
? "0" + timeDate.getHours()
: timeDate.getHours();
let timeMinute =
timeDate.getMinutes() < 10
? "0" + timeDate.getMinutes()
: timeDate.getMinutes();
//obj.startTime = timeHour + ":" + timeMinute;
// obj.endTime = timeHour + ":" + timeMinute;
obj.endTime = timeDate.toUTCString();
arr.push(obj);
}
console.log(this.deviceTableData[i].list[k]);
}
this.newList.push({
id: this.deviceTableData[i].id,
list: this.deviceTableData[i].list,
name: this.deviceTableData[i].name,
remark: this.deviceTableData[i].remark,
listTime: arr,
});
}
console.log("this.newList");
console.log(this.newList);
})
.catch((err) => {});
},
@ -430,11 +861,14 @@ export default {
},
//-
handleSet(val) {
console.log(this.setNum);
var deviceOffsetnum = this.setNum;
this.loading = true;
this.scheduleid = val.id;
this.isShowset = true;
console.log(val);
this.scheduleInfo = val.list;
this.scheduleInfo = val.listTime;
console.log("1111111", deviceOffsetnum);
this.timeName = val.name;
getScheduleRulelAccessList({ termid: this.selfacilityId })
.then((res) => {
@ -446,9 +880,14 @@ export default {
dyid: this.listnr[0].id,
xlname: this.listnr[0].list[0].name,
xlid: this.listnr[0].list[0].id,
zzname: this.listnr[0].list[0].list[0].name,
zzname:
this.listnr[0].list[0].list[0].name == null
? this.listnr[0].list[0].list[0].cmdid
: this.listnr[0].list[0].list[0].name,
zzcmid: this.listnr[0].list[0].list[0].cmdid,
zzid: this.listnr[0].list[0].list[0].id,
zzprotocol: this.timeProtocol,
offsetNum: deviceOffsetnum,
};
this.zzchannel = this.listnr[0].list[0].list[0].list;
console.log(this.deviceListData);
@ -518,15 +957,152 @@ export default {
getTermStatus({ termId: this.deviceListData.zzid }).then((res) => {
console.log(res);
if (res.data.isonline) {
var ruleBox = [];
//
//
let timearr = [];
let dayArr = [];
console.log(this.scheduleInfo);
for (var j = 0; j < this.scheduleInfo.length; j++) {
var Stime = moment(this.scheduleInfo[j].startTime)
.add(this.deviceListData.offsetNum, "minute")
.format();
var Etime = moment(this.scheduleInfo[j].endTime)
.add(this.deviceListData.offsetNum, "minute")
.format();
var lastETime = moment(this.scheduleInfo[j].endTime).format();
var spanTime = this.scheduleInfo[j].span;
console.log(Stime, Etime, spanTime);
console.log(moment(this.scheduleInfo[j].endTime).hour());
//
if (this.deviceListData.zzprotocol == "65283") {
console.log("湖南规约");
console.log(Stime, Etime);
console.log(typeof Stime);
console.log(
moment(this.scheduleInfo[j].endTime)
.add(this.deviceListData.offsetNum, "minute")
.hour()
);
console.log(
moment(this.scheduleInfo[j].endTime)
.add(this.deviceListData.offsetNum, "minute")
.minute()
);
if (moment().isSame(moment(Etime), "day")) {
//
timearr.push(
{
hour: Math.floor(this.scheduleInfo[j].span / 60),
minute: this.scheduleInfo[j].span % 60,
preset: 255,
},
{
hour: moment(this.scheduleInfo[j].startTime)
.add(this.deviceListData.offsetNum, "minute")
.hour(),
minute: moment(this.scheduleInfo[j].startTime)
.add(this.deviceListData.offsetNum, "minute")
.minute(),
preset: 255,
},
{
hour: moment(this.scheduleInfo[j].endTime)
.add(this.deviceListData.offsetNum, "minute")
.hour(),
minute: moment(this.scheduleInfo[j].endTime)
.add(this.deviceListData.offsetNum, "minute")
.minute(),
preset: 255,
}
);
} else {
timearr.push(
{
hour: Math.floor(this.scheduleInfo[j].span / 60),
minute: this.scheduleInfo[j].span % 60,
preset: 255,
},
{
hour: moment(this.scheduleInfo[j].startTime)
.add(this.deviceListData.offsetNum, "minute")
.hour(),
minute: moment(this.scheduleInfo[j].startTime)
.add(this.deviceListData.offsetNum, "minute")
.minute(),
preset: 255,
},
{
hour: moment(this.scheduleInfo[j].endTime).hour(),
minute: moment(this.scheduleInfo[j].endTime).minute(),
preset: 255,
}
);
}
console.log(timearr);
}
}
////
if (
this.deviceListData.zzprotocol == "65286" ||
this.timeProtocol == "65282"
) {
console.log("河南规约");
//
//this.getDayArr(startDay, endDay);
let startDay = Stime;
let endDay = Etime;
var lastendDay = lastETime;
console.log(startDay, endDay);
let startVal = this.$moment(new Date(startDay)).format(
"YYYY-MM-DD HH:mm"
);
console.log(startVal);
while (this.$moment(startVal).isBefore(endDay)) {
dayArr.push(startVal);
//
startVal = this.$moment(new Date(startVal))
.add(spanTime, "minute")
.format("YYYY-MM-DD HH:mm");
console.log(startVal);
}
// //
if (!moment().isSame(moment(endDay), "day")) {
dayArr.push(
this.$moment(new Date(lastETime)).format("YYYY-MM-DD HH:mm")
);
}
console.log(dayArr);
for (var k = 0; k < dayArr.length; k++) {
//console.log(moment(dayArr[k]).hour());
timearr.push({
hour: moment(dayArr[k]).hour(),
minute: moment(dayArr[k]).minute(),
preset: 255,
});
}
// return dayArr;
}
var parmsobj = {
termid: this.deviceListData.zzid,
channelid: this.checkList,
offset: this.deviceListData.offsetNum,
list: timearr,
};
console.log(parmsobj);
ruleBox.push(parmsobj);
console.log(ruleBox);
setScheduleRulel({
scheduleid: this.scheduleid,
list: [
{
termid: this.deviceListData.zzid,
channelidlist: [this.checkList],
offset: this.setNum,
},
],
list: ruleBox,
})
.then((res) => {
console.log(res);
@ -595,8 +1171,9 @@ export default {
},
closebtn() {
this.isShowset = false;
this.deviceListData = [];
this.checkList = "";
this.setNum = Math.floor(Math.random() * 10);
// this.setNum = this.offsetnum;
this.deviceList();
clearInterval(this.timers);
@ -654,12 +1231,14 @@ export default {
}
}
.timeShow {
display: flex;
//display: flex;
.leftTime {
width: 50%;
float: left;
}
.rightTime {
width: 50%;
float: right;
position: relative;
.offtime {
position: absolute;

@ -20,6 +20,20 @@
</template>
</el-statistic>
</div>
<div class="radioFilter">
<el-radio-group v-model="zzradio" @input="getRadio">
<el-radio :label="-1">全部</el-radio>
<el-radio :label="1">在线</el-radio>
<el-radio :label="0">离线</el-radio>
</el-radio-group>
<el-button
class="refresh"
@click="getLineTreeStatus"
type="text"
icon="el-icon-refresh-right"
>刷新</el-button
>
</div>
<el-tree
ref="tree"
:data="lineTreeData"
@ -235,6 +249,49 @@
>
</div>
</div>
<div class="setfocalLength" v-if="zzprotocol == '65286'">
<h3>焦距调节</h3>
<div class="selectChannel">
<span class="labelname">选择通道</span>
<el-select
v-model="channelarrValue"
placeholder="请选择通道"
@change="changeChannelarrValue"
ref="multiSelect"
>
<el-option
v-for="item in channelOption"
:key="item.value"
:label="
item.alias !== null && item.alias !== ''
? item.alias
: item.label
"
:value="item.value"
>
{{
item.alias !== null && item.alias !== ""
? item.alias
: item.label
}}
</el-option>
</el-select>
</div>
<div class="buttonGroup">
<el-button
type="primary"
icon="el-icon-zoom-in"
@click="amplify()"
>放大</el-button
>
<el-button
type="primary"
icon="el-icon-zoom-out"
@click="reduce()"
>缩小</el-button
>
</div>
</div>
</div>
</div>
</div>
@ -255,6 +312,7 @@ import {
getTakePicPhotoStatusJoggle,
getTakePicStatusJoggle,
setTermGPSJoggle,
updateTermCamera,
} from "@/utils/api/index";
import previewContain from "./previewContain.vue";
import carouselChart from "../components/carouselChart.vue";
@ -299,6 +357,7 @@ export default {
swiperLoading: false,
zzCmdid: "",
zztermId: "",
zzprotocol: "", //
dateValue: "", //
pickerOptions: {
disabledDate(date) {
@ -307,6 +366,8 @@ export default {
},
channelListOption: [], //
channelOption: [], //
channelarr: [],
channelarrValue: null,
selectChannelValue: null, //
channelId: "", //id
btnpicloading: false, //loading
@ -322,6 +383,7 @@ export default {
selectLineId: "",
selectTowerId: "",
currentData: "", //
zzradio: -1,
};
},
watch: {
@ -338,12 +400,23 @@ export default {
},
created() {
//
this.zzradio =
JSON.parse(localStorage.getItem("radio")) !== null
? JSON.parse(localStorage.getItem("radio"))
: -1;
this.getRadio();
this.getLineTreeList();
this.treetimer = window.setInterval(() => {
setTimeout(this.getLineTreeStatus(), 0);
}, 300000);
},
methods: {
//radio
getRadio() {
console.log(this.zzradio);
localStorage.setItem("radio", JSON.stringify(this.zzradio));
this.getLineTreeStatus();
},
//
getDateTime() {
console.log(new Date());
@ -360,6 +433,7 @@ export default {
console.log(data);
this.selectData = data;
this.zztermId = data.id;
this.zzprotocol = data.protocol;
this.CurrentData = data;
//this.previewData = data;
if (data.dyValue) {
@ -390,26 +464,34 @@ export default {
},
//
getLineTreeStatus() {
getdyTreeListJoggle()
.then((res) => {
console.log(res);
this.lineTreeData = res.data.list;
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.selectData.id); //
console.log("11111111");
console.log(this.filterText);
if (this.filterText !== "") {
this.$refs.tree.filter(this.filterText);
} else {
getdyTreeListJoggle({ type: this.zzradio })
.then((res) => {
console.log(res);
this.lineTreeData = res.data.list;
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.selectData.id); //
});
})
.catch((err) => {
console.log(err); //
});
})
.catch((err) => {
console.log(err); //
});
}
},
//
filterNode(value, data, node) {
console.log(value, data, node);
//console.log(value, data, node);
this.filterText = value;
console.log(this.filterText);
//
if (!value) return true;
this.searchName = data.name + data.cmdid;
console.log(this.searchName);
//console.log(this.searchName);
// valuedatalabel
if (this.searchName.indexOf(value) !== -1) {
return true;
@ -417,11 +499,13 @@ export default {
},
//
getLineTreeList() {
getdyTreeListJoggle()
console.log(this.zzradio);
getdyTreeListJoggle({ type: this.zzradio })
.then((res) => {
console.log(res);
this.lineTreeData = res.data.list;
console.log(this.lineTreeData);
this.onlineNum = res.data.onlineNum;
this.totalNum = res.data.totalNum;
this.currentData = JSON.parse(localStorage.getItem("currentData"));
@ -454,6 +538,45 @@ export default {
this.$refs.tree.setCurrentKey(this.currentNodekey); //
});
}
// if (this.zzradio == -1) {
// this.lineTreeData = this.lineTreeData;
// } else if (this.zzradio == 1) {
// //线
// var data = JSON.parse(JSON.stringify(this.lineTreeData));
// console.log(data);
// const filterId = (data, id) => {
// if (!Array.isArray(data)) {
// return data;
// }
// return data.filter((item) => {
// if ("list" in item) {
// item.list = filterId(item.list, id);
// }
// return item.onlinestatus !== 0;
// });
// };
// const filtredData = filterId(data);
// console.log(filtredData);
// this.lineTreeData = filtredData;
// } else if (this.zzradio == 0) {
// //线
// var data = JSON.parse(JSON.stringify(this.lineTreeData));
// console.log(data);
// const filterId = (data, id) => {
// if (!Array.isArray(data)) {
// return data;
// }
// return data.filter((item) => {
// if ("list" in item) {
// item.list = filterId(item.list, id);
// }
// return item.onlinestatus !== 1;
// });
// };
// const filtredData = filterId(data);
// console.log(filtredData);
// this.lineTreeData = filtredData;
// }
})
.catch((err) => {
console.log(err); //
@ -466,12 +589,14 @@ export default {
.then((res) => {
console.log(res);
this.channelList = res.data.list;
this.channelarr = res.data.list;
if (this.channelList.length == 0) {
console.log("没有通道");
this.getTerminalPhotoList(-1, this.dateValue, this.zztermId); // id termid
} else {
console.log(this.channelList);
this.channelOption = [];
this.channelList.forEach((item) => {
this.channelOption.push({
label: item.channelname,
@ -497,6 +622,7 @@ export default {
});
});
this.selectChannelValue = this.channelListOption[0].value; //
this.channelarrValue = this.channelOption[0].value;
this.getTerminalPhotoList(
this.selectChannelValue,
this.dateValue,
@ -516,6 +642,10 @@ export default {
console.log(val);
this.getTerminalPhotoList(val, this.dateValue, this.zztermId);
},
//
changeChannelarrValue(val) {
console.log(val);
},
//
changedate() {
console.log(this.dateValue.getTime());
@ -687,9 +817,9 @@ export default {
this.picTime = res.data.taketime; //
console.log(this.requestId);
this.btnvideoloading = true;
this.getTakePicStatus(this.requestId);
this.getTakePicStatus(res.data);
this.statusTimer = window.setInterval(() => {
this.getTakePicStatus(this.requestId);
this.getTakePicStatus(res.data);
this.statusNum++;
}, 2000);
})
@ -869,7 +999,11 @@ export default {
handleSetSchedule() {
this.clearfun();
this.$refs.setschedule_ref.display();
this.$refs.setschedule_ref.getSingleAccess(this.zztermId, this.zzCmdid);
this.$refs.setschedule_ref.getSingleAccess(
this.zztermId,
this.zzCmdid,
this.zzprotocol
);
this.$refs.setschedule_ref.deviceList();
},
//线
@ -1034,6 +1168,53 @@ export default {
this.timer = null;
} //vue
},
//
amplify() {
getTermStatus({ termId: this.zztermId }).then((res) => {
console.log(res);
if (res.data.isonline) {
updateTermCamera({
termId: this.zztermId,
channelId: this.channelarrValue,
type: 6,
})
.then((res) => {})
.catch();
//this.$refs.infodialog_ref.getListData(this.channelId, this.cmdid);
} else {
this.$message({
duration: 1500,
showClose: true,
message: "装置下线,发送指令失败",
type: "error",
});
}
});
console.log(this.channelarrValue, this.zztermId);
},
//
reduce() {
getTermStatus({ termId: this.zztermId }).then((res) => {
console.log(res);
if (res.data.isonline) {
updateTermCamera({
termId: this.zztermId,
channelId: this.channelarrValue,
type: 7,
})
.then((res) => {})
.catch();
//this.$refs.infodialog_ref.getListData(this.channelId, this.cmdid);
} else {
this.$message({
duration: 1500,
showClose: true,
message: "装置下线,发送指令失败",
type: "error",
});
}
});
},
},
destroyed() {
@ -1094,6 +1275,24 @@ export default {
}
}
}
.radioFilter {
width: 94%;
margin: 0 auto;
margin-bottom: 8px;
font-size: 12px;
display: flex;
justify-content: space-around;
.refresh {
}
.el-radio-group {
display: flex;
align-items: center;
justify-content: center;
.el-radio {
margin-right: 16px;
}
}
}
.el-tree {
overflow-y: auto;
overflow-x: hidden;
@ -1202,7 +1401,8 @@ export default {
}
.paramsDate,
.monitorItemBox,
.setTimebtn {
.setTimebtn,
.setfocalLength {
margin-bottom: 16px;
position: relative;
h3 {
@ -1226,6 +1426,31 @@ export default {
}
}
}
.setfocalLength {
.selectChannel {
display: flex;
align-items: center;
margin-bottom: 12px;
.labelname {
font-size: 14px;
margin-right: 4px;
width: 80px;
color: #666;
}
}
.buttonGroup {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.el-button {
margin-bottom: 8px;
width: 104px;
}
.el-button + .el-button {
margin-left: 0px;
}
}
}
}
}
}

@ -29,11 +29,11 @@ module.exports = defineConfig({
proxy: {
"/api": {
//表示拦截以/api开头的请求路径
//target: "http://47.96.238.157:8093", //阿里云服务器环境
target: "http://180.166.218.222:40080", //dell
target: "http://47.96.238.157:8093", //阿里云服务器环境
// target: "http://180.166.218.222:40080", //dell
changOrigin: true, //是否开启跨域
pathRewrite: {
"^/api": "/api", //重写api把api变成空字符因为我们真正请求的路径是没有api的
"^/api": "", //重写api把api变成空字符因为我们真正请求的路径是没有api的
},
},
},

Loading…
Cancel
Save