var _this; var nowTime; new Vue({ el: '#app', data: function() { return { lidarLi: [{ value: 'alivesb', label: '心跳识别' },{ value: 'cameraoffline', label: '摄像头掉线' },{ value: 'cameraonline', label: '摄像头重连' },{ value: 'breakin', label: '目标闯入' },{ value: 'leave', label: '目标离开' },{ value: 'collision', label: '目标碰撞' }], wiraData: [], queryParem: { user: "", msgType: "", enddate: "", startdate: "", pageNum: 1, pageSize: 20 }, allTotal: 0, wramImg: "", dialogVisible: false, showPreview: false, imagePreview: [], endPicker: false, starPicker: false } }, created() { _this = this; nowTime = parseTime(new Date(), '{y}-{m}-{d}'); _this.getList(); }, methods: { getList(){ const loading = _this.$toast({ type: 'loading', loadingType: 'spinner', duration: 0 }); setTimeout(()=>{ // let _opts = { // url: vipUrl + "/receive", // type:"GET" // }; // _this.queryParem.user = "yzkj"; // let _data = _this.queryParem; // let _hea = {}; // getAxios(_opts, _data, _hea).then((res) => { let res = { data: [{ createDate: "2023/07/10 18:13:44", camera: "摄像头左", type: "alivesb", msgType: "心跳", level: 1 },{ createDate: "2023/07/10 18:03:44", camera: "摄像头左", type: "cameraonline", msgType: "重连", level: 1 },{ createDate: "2023/07/10 17:53:29", camera: "摄像头左", type: "cameraoffline", msgType: "掉线", level: 1, imgUrl: "" },{ createDate: "2023/07/10 17:43:52", camera: "摄像头左", type: "breakin", msgType: "闯入", level: 2, imgUrl: "http://210.76.81.182//hwService/cos/getObject/d4c2646fcd343d2c8f01e4d3b5555f140010.jpg" },{ createDate: "2023/07/10 17:03:34", camera: "摄像头左", type: "leave", msgType: "离开", level: 2, imgUrl: "http://210.76.81.182//hwService/cos/getObject/d4c2646fcd343d2c8f01e4d3b5555f140010.jpg" },{ createDate: "2023/07/10 16:07:20", camera: "摄像头左", type: "collision", msgType: "碰撞", level: 2, imgUrl: "http://210.76.81.182//hwService/cos/getObject/d4c2646fcd343d2c8f01e4d3b5555f140010.jpg" }], success: true, total: 6 }; if(res.success&&res.data.length){ _this.allTotal = res.total; _this.wiraData = res.data; }else{ _this.allTotal = 0; _this.wiraData = []; } loading.close(); // }) },200) }, seachLi(){ _this.queryParem.pageNum = 1; _this.checkQuery(); }, handleCurrentChange(){ if(val != _this.queryParem.pageNum){ _this.queryParem.pageNum = val; _this.initAjax(); } }, checkQuery(){ if((isNaN(_this.queryParem.enddate)&&!isNaN(Date.parse(_this.queryParem.enddate)))&&(!isNaN(_this.queryParem.startdate)||isNaN(Date.parse(_this.queryParem.startdate)))){ _this.$message({ message: '请选择开始时间!', type: 'warning' }); return; } if((isNaN(_this.queryParem.enddate)&&!isNaN(Date.parse(_this.queryParem.enddate)))&&(isNaN(_this.queryParem.startdate)&&!isNaN(Date.parse(_this.queryParem.startdate)))){ if(new Date(_this.queryParem.enddate).getTime()