-
+
+
{{ towertitle }}
@@ -87,6 +87,7 @@
:terminalPhoto="terminalPhoto"
v-if="terminalPhoto.length > 0"
>
+
@@ -99,7 +100,6 @@
type="date"
placeholder="选择日期"
format="yyyy 年 MM 月 dd 日"
- value-format="timestamp"
:picker-options="pickerOptions"
@change="changedate"
:clearable="false"
@@ -132,9 +132,107 @@
+
+
操作项
+
+
+
+ 主动拍照
+
+
+ {{
+ item.alias !== null && item.alias !== ""
+ ? item.alias
+ : item.label
+ }}
+
+
+
+
+ 主动录像
+
+
+ {{
+ item.alias !== null && item.alias !== ""
+ ? item.alias
+ : item.label
+ }}
+
+
+
+
+ 装置信息
+ 拍照时间表
+
+
+
+ 声光报警
+
+
+ 开启
+ 关闭
+
+
+
+
+
+ 线缆显示
+
+
+ 开启
+ 关闭
+
+
+
+ 获取GPS位置
+
+
+
+ GPS开关
+
+
+ 开启GPS
+ 关闭GPS
+
+
+
+ 历史图片
+
+
+
+
+
@@ -143,13 +241,30 @@ import {
getdyTreeListJoggle,
getChannelByTermidJoggle,
getTerminalPhotoListJoggle,
+ getTermStatus,
+ alarmMarkJoggle,
+ takePicJoggle,
+ getTakePicPhotoStatusJoggle,
+ getTakePicStatusJoggle,
+ setTermGPSJoggle,
} from "@/utils/api/index";
import previewContain from "./previewContain.vue";
import carouselChart from "../components/carouselChart.vue";
+import setschedule from "./components/setschedule.vue";
+import infoDialog from "./components/infoDialog.vue";
+import gpsPosition from "./components/gpsPosition.vue";
export default {
- components: { previewContain, carouselChart },
+ components: {
+ previewContain,
+ carouselChart,
+ setschedule,
+ infoDialog,
+ gpsPosition,
+ },
data() {
return {
+ btnpicloading: false,
+ btnvideoloading: false,
onlinestatus: "", //设备状态啊
onlineNum: "", //在线数
totalNum: "", //装置总数
@@ -165,473 +280,15 @@ export default {
currentNodekey: "", //默认选中的节点树,
previewData: [], //预览图数据
page: 1, // 当前页数
- pagesize: 16, //当前多少条数据
- total: 0, //总条数
treetimer: null, //轮询状态timer
- towerFlag: true, //判断是否是图片list
+ LineFlag: true,
+ towerFlag: false, //判断是否是图片list
towertitle: "", //装置杆塔信息
- terminalPhoto: [
- {
- id: 209654,
- termId: 10323,
- channelId: 1,
- channelName: "通道1",
- alias: "白天",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 171068,
- photoTime: "2023-07-17T08:00:02.000+00:00",
- recvTime: "2023-07-17T07:59:59.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_1_FF_20230717160002.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209646,
- termId: 10323,
- channelId: 2,
- channelName: "通道2",
- alias: "黑夜",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 229840,
- photoTime: "2023-07-17T07:47:36.000+00:00",
- recvTime: "2023-07-17T07:47:33.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_2_FF_20230717154736.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209644,
- termId: 10323,
- channelId: 1,
- channelName: "通道1",
- alias: "白天",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 173700,
- photoTime: "2023-07-17T07:47:08.000+00:00",
- recvTime: "2023-07-17T07:47:03.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_1_FF_20230717154708.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209641,
- termId: 10323,
- channelId: 2,
- channelName: "通道2",
- alias: "黑夜",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 231280,
- photoTime: "2023-07-17T07:44:32.000+00:00",
- recvTime: "2023-07-17T07:44:28.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_2_FF_20230717154432.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209638,
- termId: 10323,
- channelId: 1,
- channelName: "通道1",
- alias: "白天",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 200977,
- photoTime: "2023-07-17T07:43:34.000+00:00",
- recvTime: "2023-07-17T07:43:30.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_1_FF_20230717154334.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209633,
- termId: 10323,
- channelId: 2,
- channelName: "通道2",
- alias: "黑夜",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 244618,
- photoTime: "2023-07-17T07:38:08.000+00:00",
- recvTime: "2023-07-17T07:38:03.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_2_FF_20230717153808.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209632,
- termId: 10323,
- channelId: 1,
- channelName: "通道1",
- alias: "白天",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 227006,
- photoTime: "2023-07-17T07:37:46.000+00:00",
- recvTime: "2023-07-17T07:37:42.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_1_FF_20230717153746.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209631,
- termId: 10323,
- channelId: 2,
- channelName: "通道2",
- alias: "黑夜",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 232942,
- photoTime: "2023-07-17T07:35:44.000+00:00",
- recvTime: "2023-07-17T07:35:40.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_2_FF_20230717153544.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209629,
- termId: 10323,
- channelId: 1,
- channelName: "通道1",
- alias: "白天",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 169296,
- photoTime: "2023-07-17T07:35:10.000+00:00",
- recvTime: "2023-07-17T07:35:06.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_1_FF_20230717153510.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209606,
- termId: 10323,
- channelId: 1,
- channelName: "通道1",
- alias: "白天",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 225203,
- photoTime: "2023-07-17T07:00:02.000+00:00",
- recvTime: "2023-07-17T06:59:57.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_1_FF_20230717150002.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209601,
- termId: 10323,
- channelId: 1,
- channelName: "通道1",
- alias: "白天",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 276768,
- photoTime: "2023-07-17T06:46:41.000+00:00",
- recvTime: "2023-07-17T06:46:37.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_1_FF_20230717144641.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209595,
- termId: 10323,
- channelId: 1,
- channelName: "通道1",
- alias: "白天",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 214869,
- photoTime: "2023-07-17T06:00:02.000+00:00",
- recvTime: "2023-07-17T05:59:58.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_1_FF_20230717140002.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209580,
- termId: 10323,
- channelId: 1,
- channelName: "通道1",
- alias: "白天",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 213474,
- photoTime: "2023-07-17T05:00:02.000+00:00",
- recvTime: "2023-07-17T04:59:58.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_1_FF_20230717130002.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209549,
- termId: 10323,
- channelId: 1,
- channelName: "通道1",
- alias: "白天",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 214600,
- photoTime: "2023-07-17T04:00:02.000+00:00",
- recvTime: "2023-07-17T03:59:58.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_1_FF_20230717120002.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209535,
- termId: 10323,
- channelId: 1,
- channelName: "通道1",
- alias: "白天",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 213311,
- photoTime: "2023-07-17T03:00:02.000+00:00",
- recvTime: "2023-07-17T02:59:58.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_1_FF_20230717110002.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209529,
- termId: 10323,
- channelId: 1,
- channelName: "通道1",
- alias: "白天",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 213896,
- photoTime: "2023-07-17T02:00:05.000+00:00",
- recvTime: "2023-07-17T02:00:01.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_1_FF_20230717100005.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209521,
- termId: 10323,
- channelId: 1,
- channelName: "通道1",
- alias: "白天",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 217319,
- photoTime: "2023-07-17T01:00:02.000+00:00",
- recvTime: "2023-07-17T00:59:58.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_1_FF_20230717090002.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209512,
- termId: 10323,
- channelId: 1,
- channelName: "通道1",
- alias: "白天",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 136386,
- photoTime: "2023-07-17T00:00:02.000+00:00",
- recvTime: "2023-07-16T23:59:58.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_1_FF_20230717080002.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209505,
- termId: 10323,
- channelId: 1,
- channelName: "通道1",
- alias: "白天",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 160791,
- photoTime: "2023-07-16T23:00:02.000+00:00",
- recvTime: "2023-07-16T22:59:58.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_1_FF_20230717070002.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209493,
- termId: 10323,
- channelId: 2,
- channelName: "通道2",
- alias: "黑夜",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 1315637,
- photoTime: "2023-07-16T22:00:15.000+00:00",
- recvTime: "2023-07-16T22:00:11.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_2_FF_20230717060015.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209490,
- termId: 10323,
- channelId: 1,
- channelName: "通道1",
- alias: "白天",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 131594,
- photoTime: "2023-07-16T22:00:02.000+00:00",
- recvTime: "2023-07-16T21:59:58.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_1_FF_20230717060002.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209484,
- termId: 10323,
- channelId: 2,
- channelName: "通道2",
- alias: "黑夜",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 164643,
- photoTime: "2023-07-16T21:00:02.000+00:00",
- recvTime: "2023-07-16T21:00:00.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_2_FF_20230717050002.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209477,
- termId: 10323,
- channelId: 2,
- channelName: "通道2",
- alias: "黑夜",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 53881,
- photoTime: "2023-07-16T20:00:02.000+00:00",
- recvTime: "2023-07-16T19:59:59.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_2_FF_20230717040002.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209470,
- termId: 10323,
- channelId: 2,
- channelName: "通道2",
- alias: "黑夜",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 50555,
- photoTime: "2023-07-16T19:00:02.000+00:00",
- recvTime: "2023-07-16T18:59:59.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_2_FF_20230717030002.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209463,
- termId: 10323,
- channelId: 2,
- channelName: "通道2",
- alias: "黑夜",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 902957,
- photoTime: "2023-07-16T18:00:02.000+00:00",
- recvTime: "2023-07-16T17:59:57.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_2_FF_20230717020002.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209455,
- termId: 10323,
- channelId: 2,
- channelName: "通道2",
- alias: "黑夜",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 57962,
- photoTime: "2023-07-16T17:00:02.000+00:00",
- recvTime: "2023-07-16T16:59:59.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_2_FF_20230717010002.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- {
- id: 209449,
- termId: 10323,
- channelId: 2,
- channelName: "通道2",
- alias: "黑夜",
- presetId: 255,
- width: 1920,
- height: 1080,
- fileSize: 82371,
- photoTime: "2023-07-16T16:00:02.000+00:00",
- recvTime: "2023-07-16T16:00:00.000+00:00",
- path: "http://dev.xinyingpower.com:40080/photos/2023/07/17/00/XYIGQ10D221000100_2_FF_20230717000002.jpg",
- thumb: null,
- manualRequest: null,
- mediaType: 0,
- },
- ], //获取装置当前图片数据
+ terminalPhoto: [], //获取装置当前图片数据
+ nopicPath: require("@/assets/img/nopic.jpg"),
+ swiperLoading: false,
zzCmdid: "",
+ zztermId: "",
dateValue: "", //选择日期
pickerOptions: {
disabledDate(date) {
@@ -639,7 +296,18 @@ export default {
},
},
channelListOption: [], //通道内容
- selectChannelValue: "", //选中的通道
+ channelOption: [], //主动拍照通道
+ selectChannelValue: null, //选中的通道
+ channelId: "", //选中的通道id
+ btnpicloading: false, //主动拍照按钮loading
+ requestId: "", //请求拍照返回的requestid
+ picTime: "", //请求拍照返回的时间
+ timer: null, //获取最新图片
+ i: 0, //获取最新图片
+ CurrentData: "", //历史图片当前选中数据
+
+ statusNum: 0, //查询下发状态
+ statusTimer: null, //查询下发状态
};
},
watch: {
@@ -665,6 +333,7 @@ export default {
methods: {
//获取当前时间
getDateTime() {
+ console.log(new Date());
this.dateValue = new Date().getTime();
},
//选择时间
@@ -675,22 +344,27 @@ export default {
handleNodeClick(data) {
console.log(data);
this.selectData = data;
+ this.zztermId = data.id;
+ this.CurrentData = data;
//this.previewData = data;
if (data.dyValue) {
- this.towerFlag = true;
+ this.LineFlag = true;
+ this.towerFlag = false;
console.log("电压");
this.type = 1;
//this.getPicList(data.id, this.type);
- this.$refs.previewRef.getPicList(data.id, this.type);
+ this.$refs.previewRef.getPicList(data.id, this.type, this.page);
} else if (data.bsManufacturer) {
- this.towerFlag = true;
+ this.LineFlag = true;
+ this.towerFlag = false;
console.log("线路");
this.type = 2;
- this.$refs.previewRef.getPicList(data.id, this.type);
+ this.$refs.previewRef.getPicList(data.id, this.type, this.page);
//this.getPicList(data.id, this.type);
} else {
console.log("杆塔");
- this.towerFlag = false;
+ this.LineFlag = false;
+ this.towerFlag = true;
this.towertitle = data.name;
this.zzCmdid = data.cmdid;
this.getChannelList(data.id);
@@ -731,13 +405,18 @@ export default {
this.emptyText = "暂无数据";
this.selectData = this.lineTreeData[0]; //第一个选中的数据
this.currentNodekey = this.lineTreeData[0].id; //第一个数据
+ console.log(this.currentNodekey);
this.type = 1;
this.newCurrentId = this.lineTreeData[0].id;
this.previewData = this.lineTreeData[0]; //预览图数据
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey); //一定要加这个选中了否则样式没有出来
-
- this.$refs.previewRef.getPicList(this.currentNodekey, this.type);
+ this.channelId = this.currentNodekey;
+ this.$refs.previewRef.getPicList(
+ this.currentNodekey,
+ this.type,
+ this.page
+ );
});
}
})
@@ -753,10 +432,20 @@ export default {
console.log(res);
this.channelList = res.data.list;
console.log(this.channelList);
+ this.channelOption = [];
+ this.channelList.forEach((item) => {
+ this.channelOption.push({
+ label: item.channelname,
+ value: item.channelid,
+ termid: item.termId,
+ alias: item.alias,
+ });
+ }); // 选择通道一通道二select框
+ console.log(this.channelOption);
this.channelListOption = [];
this.channelListOption.push({
label: "全部",
- value: "-1",
+ value: -1,
termid: "",
alias: "",
});
@@ -769,17 +458,36 @@ export default {
});
});
this.selectChannelValue = this.channelListOption[0].value; //默认选中所有通道
+ this.getTerminalPhotoList(
+ this.selectChannelValue,
+ this.dateValue,
+ this.channelList[0].termId
+ ); //获取图片列表是传当前设备的 id 和termid
})
.catch((err) => {
console.log(err); //代码错误、请求失败捕获
});
},
//切换通道
- changeChannelId(val) {},
+ changeChannelId(val) {
+ console.log(val);
+ this.getTerminalPhotoList(val, this.dateValue, this.zztermId);
+ },
+ //选择时间
+ changedate() {
+ console.log(this.dateValue);
+ console.log(this.zztermId);
+ this.getTerminalPhotoList(
+ this.selectChannelValue,
+ this.dateValue,
+ this.zztermId
+ );
+ },
//获取图片
getTerminalPhotoList(id, date, termId) {
this.terminalPhoto = [];
console.log(id, date, termId);
+ this.swiperLoading = true;
getTerminalPhotoListJoggle({
channelid: id,
time: date,
@@ -787,13 +495,386 @@ export default {
})
.then((res) => {
console.log(res);
- this.terminalPhoto = res.data.list;
+ this.swiperLoading = false;
+ if (res.data.list.length == 0) {
+ this.terminalPhoto = [
+ {
+ path: this.nopicPath,
+ termId: termId,
+ mediatype: 0,
+ },
+ ];
+ } else {
+ this.terminalPhoto = res.data.list;
+ }
})
.catch((err) => {
console.log(err); //代码错误、请求失败捕获
});
},
+ //点击图片列表执行函数
+ jumpTowerPic(data) {
+ console.log("我是从子组件过来的数据");
+ console.log(data);
+ this.LineFlag = false;
+ this.towerFlag = true;
+ this.zzCmdid = data.cmdid;
+ this.towertitle = data.towername;
+ this.zztermId = data.termid;
+ this.selectChannelValue = data.channnelname;
+ this.$refs.tree.setCurrentKey(this.zztermId); //一定要加这个选中了否则样式没有出来
+ if (data.photoTime == "" || data.photoTime == null) {
+ this.getDateTime();
+ } else {
+ this.dateValue = data.photoTime;
+ }
+ console.log(this.selectChannelValue);
+ // this.getChannelList(this.zztermId);
+ getChannelByTermidJoggle({ termid: this.zztermId })
+ .then((res) => {
+ console.log(res);
+ this.channelList = res.data.list;
+ console.log(this.channelList);
+ this.channelOption = [];
+ this.channelList.forEach((item) => {
+ this.channelOption.push({
+ label: item.channelname,
+ value: item.channelid,
+ termid: item.termId,
+ alias: item.alias,
+ });
+ }); // 选择通道一通道二select框
+ console.log(this.channelOption);
+ this.channelListOption = [];
+ this.channelListOption.push({
+ label: "全部",
+ value: -1,
+ termid: "",
+ alias: "",
+ });
+ this.channelList.forEach((item) => {
+ this.channelListOption.push({
+ label: item.channelname,
+ value: item.channelid,
+ termid: item.termId,
+ alias: item.alias,
+ });
+ });
+ this.selectChannelValue = data.channnelname;
+ this.getTerminalPhotoList(
+ data.channelid,
+ this.dateValue,
+ this.zztermId
+ ); //获取图片列表是传当前设备的 id 和termid
+ })
+ .catch((err) => {
+ console.log(err); //代码错误、请求失败捕获
+ });
+ //this.getTerminalPhotoList(data.channelid, this.dateValue, this.zztermId);
+ },
+ //主动拍照
+ handleCommandpic(command) {
+ console.log(command);
+ getTermStatus({ termId: this.zztermId }).then((res) => {
+ console.log(res);
+ if (res.data.isonline) {
+ takePicJoggle({
+ captureType: 0,
+ channel: command,
+ termId: this.zztermId,
+ preset: 255,
+ })
+ .then((res) => {
+ console.log(res);
+ this.requestId = res.data.requestId; //获取requestid 判断装置是否下发
+ this.picTime = res.data.taketime; //获取时间 判断获取最新图片
+ console.log(this.requestId);
+ this.btnpicloading = true;
+ this.statusTimer = window.setInterval(() => {
+ this.getTakePicStatus(this.requestId);
+ this.statusNum++;
+ }, 2000);
+ })
+ .catch((err) => {
+ console.log(err); //代码错误、请求失败捕获
+ });
+ } else {
+ this.$message({
+ duration: 1500,
+ showClose: true,
+ message: "装置下线,发送指令失败",
+ type: "error",
+ });
+ }
+ });
+ },
+ //主动拍视频
+ handleCommandvideo(command) {
+ console.log(command);
+ getTermStatus({ termId: this.zztermId }).then((res) => {
+ console.log(res);
+ if (res.data.isonline) {
+ takePicJoggle({
+ captureType: 1,
+ channel: command,
+ termId: this.zztermId,
+ preset: 255,
+ })
+ .then((res) => {
+ console.log(res);
+ this.requestId = res.data.requestId; //获取requestid 判断装置是否下发
+ this.picTime = res.data.taketime; //获取时间 判断获取最新视频
+ console.log(this.requestId);
+ this.btnvideoloading = true;
+ this.statusTimer = window.setInterval(() => {
+ this.getTakePicStatus(this.requestId);
+ this.statusNum++;
+ }, 2000);
+ })
+ .catch((err) => {
+ console.log(err); //代码错误、请求失败捕获
+ });
+ } else {
+ this.$message({
+ duration: 1500,
+ showClose: true,
+ message: "装置下线,发送指令失败",
+ type: "error",
+ });
+ }
+ });
+ },
+ //获取装置是否下发状态
+ getTakePicStatus(data) {
+ console.log(data);
+ getTakePicStatusJoggle({
+ requestid: data,
+ })
+ .then((res) => {
+ console.log(res);
+ //res.data 0 状态未知 1 成功 2失败
+ if (res.data == 0 && this.statusNum >= 5) {
+ this.statusNum = 0;
+ clearInterval(this.statusTimer);
+ this.statusTimer = null;
+ this.btnpicloading = false;
+ this.btnvideoloading = false;
+ this.$message({
+ duration: 1500,
+ showClose: true,
+ message: "下发指令超时,请重试!",
+ type: "warning",
+ });
+ } else if (res.data == 1) {
+ this.statusNum = 0;
+ clearInterval(this.statusTimer);
+ this.statusTimer = null;
+ this.$message({
+ duration: 1500,
+ showClose: true,
+ message: "下发指令成功!",
+ type: "success",
+ });
+ this.timer = window.setInterval(() => {
+ this.newPicApi();
+ this.i++;
+ }, 8000);
+ } else if (res.data == 2) {
+ this.statusNum = 0;
+ clearInterval(this.statusTimer);
+ this.statusTimer = null;
+ this.$message({
+ duration: 1500,
+ showClose: true,
+ message: "下发指令失败!",
+ type: "error",
+ });
+ }
+ })
+ .catch((err) => {
+ console.log(err); //代码错误、请求失败捕获
+ });
+ },
+ //获取最新图片
+ newPicApi() {
+ getTakePicPhotoStatusJoggle({
+ photoTime: new Date(this.picTime).getTime(),
+ termId: this.zztermId,
+ }).then((res) => {
+ console.log(res.data);
+ // // console.log(this.i);
+ if (res.data == true && this.i < 10) {
+ console.log(res.data);
+ this.i = 0;
+ clearInterval(this.timer);
+ this.timer = null;
+ this.btnpicloading = false;
+ this.btnvideoloading = false;
+ this.getTerminalPhotoList(
+ this.selectChannelValue,
+ this.dateValue,
+ this.zztermId
+ ); //获取图片列表是传当前设备的 id 和termid
+ this.$message({
+ duration: 1500,
+ showClose: true,
+ message: "已返回最新图片!",
+ type: "success",
+ });
+ console.log("返回最新图片");
+ } else if (res.data == false && this.i > 10) {
+ this.i = 0;
+ clearInterval(this.timer);
+ this.timer = null;
+ }
+ });
+ },
+ //声光报警开启关闭
+ handleCommandWarn(command) {
+ switch (command) {
+ case "open": //开启
+ this.handleWarn(1);
+ break;
+ case "close": //关闭
+ this.handleWarn(0);
+ break;
+ }
+ },
+ //声光报警
+ handleWarn(val) {
+ console.log("声光报警");
+ console.log(this.zztermId);
+ getTermStatus({ termId: this.zztermId }).then((res) => {
+ console.log(res);
+ if (res.data.isonline) {
+ alarmMarkJoggle({
+ cmdId: this.zzCmdid,
+ ctrl: val,
+ termId: this.zztermId,
+ })
+ .then((res) => {
+ console.log(res);
+ if (res.code == 200) {
+ if (val == 1) {
+ this.$message({
+ duration: 1500,
+ showClose: true,
+ message: "声光报警开启成功",
+ type: "success",
+ });
+ } else {
+ this.$message({
+ duration: 1500,
+ showClose: true,
+ message: "声光报警关闭成功",
+ type: "success",
+ });
+ }
+ }
+ })
+ .catch((err) => {
+ this.$message({
+ duration: 1500,
+ showClose: true,
+ message: "声光报警操作失败",
+ type: "error",
+ });
+ });
+ } else {
+ this.$message({
+ duration: 1500,
+ showClose: true,
+ message: "装置下线,发送指令失败",
+ type: "error",
+ });
+ }
+ });
+ },
+ //设置时间表
+ handleSetSchedule() {
+ this.$refs.setschedule_ref.display();
+ this.$refs.setschedule_ref.getSingleAccess(this.zztermId, this.zzCmdid);
+ this.$refs.setschedule_ref.deviceList();
+ },
+ //线缆显示
+ handleCommandLine(command) {
+ switch (command) {
+ case "open": //开启
+ this.$refs.carouselpic.openline();
+ break;
+ case "close": //关闭
+ this.$refs.carouselpic.handelClear();
+ break;
+ }
+ },
+ //装置信息handleShowInfo
+ handleShowInfo() {
+ getTermStatus({ termId: this.zztermId }).then((res) => {
+ console.log(res);
+ if (res.data.isonline) {
+ this.$refs.infodialog_ref.display(this.zztermId, this.zzCmdid);
+ this.$refs.infodialog_ref.getinfo();
+ //this.$refs.infodialog_ref.getListData(this.channelId, this.cmdid);
+ } else {
+ this.$message({
+ duration: 1500,
+ showClose: true,
+ message: "装置下线,发送指令失败",
+ type: "error",
+ });
+ }
+ });
+ },
+ //获取GPS位置
+ handleShowGPS() {
+ this.$refs.gpsdialog_ref.display(this.zzCmdid, this.zztermId);
+ this.$refs.gpsdialog_ref.getgpssql();
+ },
+ //切换gps开启关闭
+ handleCommandGps(command) {
+ switch (command) {
+ case "open": //开启
+ this.changeGPS(1, this.zzCmdid);
+ break;
+ case "close": //关闭
+ this.changeGPS(0, this.zzCmdid);
+ break;
+ }
+ },
+ changeGPS(val, cmdid) {
+ console.log(val, cmdid);
+ setTermGPSJoggle({ gpsstatus: val, cmdId: cmdid })
+ .then((res) => {
+ console.log(res);
+ if (val == 0) {
+ this.$message({
+ duration: 1500,
+ message: "GPS已关闭",
+ type: "warning",
+ showClose: true,
+ });
+ } else {
+ this.$message({
+ duration: 1500,
+ message: "成功开启GPS",
+ type: "success",
+ showClose: true,
+ });
+ }
+ })
+ .catch((err) => {
+ console.log(err); //代码错误、请求失败捕获
+ });
+ },
+ handlehistoryPic() {
+ console.log(this.CurrentData);
+ this.$router.push({
+ path: "/realTimeSearch",
+ query: { lineName: this.CurrentData },
+ });
+ // sessionStorage.setItem("keyPath", " realTimeSearch");
+ },
//拖拽
dragControllerDiv() {
var resize = document.getElementsByClassName("resize");
@@ -839,14 +920,18 @@ export default {
},
destroyed() {
+ //销毁左侧树状图
clearInterval(this.treetimer);
this.treetimer = null;
+ //销毁主动拍照
+ clearInterval(this.statusTimer);
+ this.statusTimer = null;
//离开页面是销毁
- // if (this.timer) {
- // console.log(this.timer);
- // clearInterval(this.timer);
- // this.timer = null;
- // } //利用vue的生命周期函数
+ if (this.timer) {
+ console.log(this.timer);
+ clearInterval(this.timer);
+ this.timer = null;
+ } //利用vue的生命周期函数
},
};
@@ -955,11 +1040,12 @@ export default {
line-height: 32px;
color: #fff;
font-size: 12px;
- background-color: #169e8cb0;
+ //background-color: #169e8cb0;
+ background: linear-gradient(180deg, #4cdbc8 10%, #128071 100%);
.el-breadcrumb {
line-height: 32px;
color: #fff !important;
- font-size: 12px;
+ font-size: 14px;
height: 32px;
.el-breadcrumb__inner,
.el-breadcrumb__separator {
@@ -979,11 +1065,12 @@ export default {
color: #169e8c;
font-size: 14px;
font-weight: normal;
- margin-bottom: 16px;
+ //margin-bottom: 16px;
//background-color: #169e8cb0;
}
.paramsDate,
- .monitorItemBox {
+ .monitorItemBox,
+ .setTimebtn {
margin-bottom: 16px;
position: relative;
h3 {
@@ -993,8 +1080,28 @@ export default {
margin-bottom: 8px;
}
}
+ .setTimebtn {
+ .buttonGroup {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ .el-button {
+ margin-bottom: 8px;
+ width: 104px;
+ }
+ .el-button + .el-button {
+ margin-left: 0px;
+ }
+ }
+ }
}
}
}
}
+.picdropStyle,
+.videodropStyle,
+.gpsdropStyle {
+ width: 104px;
+ margin-top: 0px !important;
+}
diff --git a/src/views/realTimeMonitor/picIndex.vue b/src/views/realTimeMonitor/picIndex.vue
index 29c7f4a..c1876cf 100644
--- a/src/views/realTimeMonitor/picIndex.vue
+++ b/src/views/realTimeMonitor/picIndex.vue
@@ -375,7 +375,7 @@ export default {
console.log(this.zzstatus);
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey); //一定要加这个选中了否则样式没有出来
- this.channelId = this.currentNodekey;
+
this.getChannelList(this.channelId); //获取通道id接口
});
}
diff --git a/src/views/realTimeMonitor/previewContain.vue b/src/views/realTimeMonitor/previewContain.vue
index c5df55f..cb16500 100644
--- a/src/views/realTimeMonitor/previewContain.vue
+++ b/src/views/realTimeMonitor/previewContain.vue
@@ -1,5 +1,5 @@
-
+
@@ -14,24 +14,41 @@
:key="'col-' + index"
v-if="index < colNum * i && index >= colNum * (i - 1)"
>
-
-
-
![]()
+
+
+
![]()
+
+
![]()
+
+

+
+
+ {{ item.linename }}-{{ item.towername }}-({{
+ item.alias !== null && item.alias !== ""
+ ? item.alias
+ : item.channnelname
+ }})
+
+
+ {{ $moment(item.photoTime).format("YYYY-MM-DD HH:mm:ss") }}
+
+
无抓拍
+
-