diff --git a/src/utils/api/index.js b/src/utils/api/index.js index 6880bc0..21dc317 100644 --- a/src/utils/api/index.js +++ b/src/utils/api/index.js @@ -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, + }); +} diff --git a/src/views/components/carouselChart.vue b/src/views/components/carouselChart.vue index 803411e..aeb294c 100644 --- a/src/views/components/carouselChart.vue +++ b/src/views/components/carouselChart.vue @@ -2,6 +2,7 @@
+
+ 下载图片
{ + 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; diff --git a/src/views/devicePhotoSchedule/components/adddeviceDialog copy.vue b/src/views/devicePhotoSchedule/components/adddeviceDialog copy.vue new file mode 100644 index 0000000..d559381 --- /dev/null +++ b/src/views/devicePhotoSchedule/components/adddeviceDialog copy.vue @@ -0,0 +1,260 @@ + + + diff --git a/src/views/devicePhotoSchedule/components/adddeviceDialog.vue b/src/views/devicePhotoSchedule/components/adddeviceDialog.vue index 717a4e4..fb39916 100644 --- a/src/views/devicePhotoSchedule/components/adddeviceDialog.vue +++ b/src/views/devicePhotoSchedule/components/adddeviceDialog.vue @@ -20,12 +20,12 @@
- + @@ -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" >
@@ -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) => { diff --git a/src/views/devicePhotoSchedule/components/setdevice.vue b/src/views/devicePhotoSchedule/components/setdevice.vue index 3e6a8b4..cb1fc90 100644 --- a/src/views/devicePhotoSchedule/components/setdevice.vue +++ b/src/views/devicePhotoSchedule/components/setdevice.vue @@ -14,13 +14,29 @@

{{ - 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() }} ~ - {{ - val.endTime.substring(0, val.endTime.lastIndexOf(":")) - }} + {{ + 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() + }} 间隔:{{ val.span }}分钟

@@ -65,6 +81,10 @@ :max="9" >
+
{}); }, - //// 给数组里的每一个对象都添加一个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) { diff --git a/src/views/devicePhotoSchedule/components/setdevicebak.vue b/src/views/devicePhotoSchedule/components/setdevicebak.vue deleted file mode 100644 index d3255b3..0000000 --- a/src/views/devicePhotoSchedule/components/setdevicebak.vue +++ /dev/null @@ -1,386 +0,0 @@ - - - diff --git a/src/views/devicePhotoSchedule/index copy.vue b/src/views/devicePhotoSchedule/index copy.vue new file mode 100644 index 0000000..40c3a2c --- /dev/null +++ b/src/views/devicePhotoSchedule/index copy.vue @@ -0,0 +1,280 @@ + + + diff --git a/src/views/devicePhotoSchedule/index.vue b/src/views/devicePhotoSchedule/index.vue index 40c3a2c..a4c6dea 100644 --- a/src/views/devicePhotoSchedule/index.vue +++ b/src/views/devicePhotoSchedule/index.vue @@ -13,7 +13,7 @@
- @@ -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) => {}); }, diff --git a/src/views/management/monitoringEquipment/photographicDevice/index.vue b/src/views/management/monitoringEquipment/photographicDevice/index.vue index aca9db7..c62cc55 100644 --- a/src/views/management/monitoringEquipment/photographicDevice/index.vue +++ b/src/views/management/monitoringEquipment/photographicDevice/index.vue @@ -183,8 +183,7 @@ show-overflow-tooltip min-width="90" v-if="roleUser != 2" - > - + /> 时间表:
{{ val.substring(0, val.lastIndexOf(":")) }}{{ val.substring(val.length - 5) }} + {{ $moment(val).format("HH:mm") }} +
装置时间表:
- (偏移时间{{ offsetnum }}分钟)
{{ val.substring(val.length - 5) }} + {{ val.substring(0, val.lastIndexOf(":")) }}{{ $moment(val).format("HH:mm") }}
@@ -92,7 +111,7 @@
- + + @@ -183,8 +219,31 @@ v-for="(val, index) in scheduleInfo" :key="index" > - {{ val.startTime }} ~ - {{ val.endTime }} + {{ + 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() + }} + ~ + {{ + 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() + }} 间隔:{{ val.span }}分钟

@@ -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; diff --git a/src/views/realTimeMonitor/index.vue b/src/views/realTimeMonitor/index.vue index f0e212d..46b17be 100644 --- a/src/views/realTimeMonitor/index.vue +++ b/src/views/realTimeMonitor/index.vue @@ -20,6 +20,20 @@
+
+ + 全部 + 在线 + 离线 + + 刷新 +
+
+

焦距调节

+
+ 选择通道 + + + {{ + item.alias !== null && item.alias !== "" + ? item.alias + : item.label + }} + + +
+
+ 放大 + 缩小 +
+
@@ -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); // 如果传入的value和data中的label相同,匹配成功 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; + } + } + } } } } diff --git a/vue.config.js b/vue.config.js index 2d81f4c..31ee2c5 100644 --- a/vue.config.js +++ b/vue.config.js @@ -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的 }, }, },