| | |
| | | key="1">{{website.indexTitle}} </span> |
| | | </template> |
| | | </transition-group> |
| | | |
| | | <div> |
| | | <el-dialog title="警情处置" :visible.sync="dialogTableVisible" append-to-body="true"> |
| | | <el-form :model="form" label-position="right" size="mini" label-width="100px"> |
| | | <el-row> |
| | | <el-col span="12"> |
| | | <el-form-item label="报警人" > |
| | | <el-input disabled="true" v-model="form.alarmPeople" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col span="12"> |
| | | <el-form-item label="联系电话" > |
| | | <el-input disabled="true" v-model="form.phoneNumber" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </el-dialog> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | export default { |
| | | name: "logo", |
| | | data() { |
| | | return {}; |
| | | return { |
| | | dialogTableVisible:false, |
| | | deviceId:null, |
| | | form: {}, |
| | | }; |
| | | }, |
| | | created() {}, |
| | | created() { |
| | | this.getData(); |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["website", "keyCollapse"]) |
| | | }, |
| | | methods: {} |
| | | methods: { |
| | | getData() { |
| | | var that = this; |
| | | |
| | | axios({ |
| | | url: 'http://192.168.0.103:1888/api/blade-jfpts/alarm/alarm/page?current=1&size=1', |
| | | method: 'get', |
| | | }).then(function (response) { |
| | | that.deviceId = response.data.data.records[0].id; |
| | | //获得最新ID,开启实时报警循环 |
| | | that.layerRealtime(); |
| | | }); |
| | | |
| | | |
| | | },layerRealtime(){ |
| | | var that = this; |
| | | window.clearTimeout(window.realTimeQuery); |
| | | window.realTimeQuery = setInterval(function () { |
| | | axios({ |
| | | url: 'http://192.168.0.103:1888/api/blade-jfpts/alarm/alarm/selecttx?id='+that.deviceId, |
| | | method: 'post', |
| | | }).then(function (response) { |
| | | if (response.data.data.length > 0){ |
| | | that.deviceId = response.data.data.records[0].id; |
| | | that.form = response.data.data.records[0]; |
| | | |
| | | } |
| | | that.dialogTableVisible = true; |
| | | }); |
| | | |
| | | //that.dialogTableVisible = true; |
| | | }, 5000); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | |
| | | color: #fff; |
| | | } |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | export default { |
| | | name: "tcgl.vue", |
| | | created() { |
| | | this.getData(); |
| | | //this.getData(); |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogTableVisible:false, |
| | | form: {}, |
| | | } |
| | | }, |
| | | methods: { |
| | | getData() { |
| | | |
| | | window.clearTimeout(window.realTimeQuery); |
| | | |
| | | window.realTimeQuery = setInterval(function () { |
| | | console.log("222222222222"); |
| | | }, 3000); |
| | | } |
| | | // getData() { |
| | | // var that = this; |
| | | // |
| | | // window.clearTimeout(window.realTimeQuery); |
| | | // |
| | | // window.realTimeQuery = setInterval(function () { |
| | | // //that.dialogTableVisible = true; |
| | | // }, 3000); |
| | | // } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | height: 100%; |
| | | padding: 0px 5px !important; |
| | | } |
| | | |
| | | </style> |
| | |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot="menuRight"> |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | |
| | | <el-date-picker |
| | | v-model="form.czTime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd hh:mm:ss" |
| | | placeholder="选择日期时间" |
| | | > |
| | | </el-date-picker> |
| | |
| | | <el-row :align="center"> |
| | | <el-col :offset="4"> |
| | | <el-form-item> |
| | | <el-button type="success">一件呼叫</el-button> |
| | | <el-button type="success">一键呼叫</el-button> |
| | | <el-button type="success">视频对讲</el-button> |
| | | <el-button type="primary">生成警单</el-button> |
| | | <el-button type="warning">警情撤销</el-button> |
| | | <el-button type="primary" @click.stop="generate(form)" |
| | | >生成警单</el-button |
| | | > |
| | | <el-button type="warning" @click.stop="revoke(form)" |
| | | >警情撤销</el-button |
| | | > |
| | | <el-button type="danger">推送110</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | end: endY + endM + endD + endH + endm + ends |
| | | }; |
| | | }, |
| | | queryOldVideo(data) { |
| | | console.log(data); |
| | | var newAxios = axios.create({ |
| | | baseURL: "http://s16s652780.51mypc.cn", |
| | | withCredentials: false, |
| | | headers: { |
| | | "Content-type": "application/x-www-form-urlencoded" |
| | | } |
| | | handleStart(row) { |
| | | this.$router.push({ |
| | | path: `/real/video/${row.channelNumber}/${row.serialNumber}` |
| | | }); |
| | | |
| | | //s16s652780.51mypc.cn/api_control |
| | | |
| | | var time = this.beginTimeOrEndTime(data.alarmTime); |
| | | |
| | | newAxios |
| | | .post( |
| | | "/api_control", |
| | | {}, |
| | | { |
| | | params: { |
| | | param: JSON.stringify({ PktType: "GetAccessToken" }) |
| | | } |
| | | }, |
| | | handleHistory(row) { |
| | | this.$router.push({ path: `/real/history/${row.deviceNumber}` }); |
| | | }, |
| | | handleAdd11() { |
| | | this.qwe = true; |
| | | }, |
| | | handleManage(row) { |
| | | this.form = row; |
| | | this.dialogTableVisible = true; |
| | | }, |
| | | generate(row) { |
| | | var that = this; |
| | | if (row.czTime == "" || row.czTime == null) { |
| | | this.$message({ |
| | | message: "请选择处置时间", |
| | | type: "warning" |
| | | }); |
| | | } else { |
| | | axios({ |
| | | url: |
| | | "http://192.168.0.103:1888/api/blade-jfpts/jingdan/jingdan/submit", |
| | | method: "post", |
| | | data: { |
| | | rName: row.rname, |
| | | galarmPeople: row.galarmPeople, |
| | | phoneNumber: row.phoneNumber, |
| | | place: row.place, |
| | | content: row.content, |
| | | galarmTime: row.alarmTime, |
| | | waringType: row.waringType, |
| | | deviceNumber: row.deviceNumber, |
| | | type: "0", |
| | | handleP: null, |
| | | handleTime: null, |
| | | handName: null, |
| | | level: row.level, |
| | | coordinate: null, |
| | | jd: row.jd, |
| | | wd: row.wd, |
| | | addvcd: row.district, |
| | | czTime: row.czTime, |
| | | jjTime: row.jjTime, |
| | | bz: row.bz |
| | | } |
| | | ) |
| | | .then(res => { |
| | | console.log(res.data.data.accessToken); |
| | | |
| | | newAxios |
| | | .get( |
| | | `/GetPlayUrl?deviceCode=${data.channelNumber}&chl=${data.serialNumber}` |
| | | ) |
| | | .then(result => { |
| | | |
| | | this.innerVisibleVideo = true; |
| | | |
| | | this.videoSource = result.data.data.m3u8; |
| | | |
| | | }) |
| | | .then(function(response) { |
| | | that.$message({ |
| | | message: "生成警单成功", |
| | | type: "success" |
| | | }); |
| | | |
| | | // newAxios |
| | | // .post( |
| | | // "/api_control", |
| | | // {}, |
| | | // { |
| | | // params: { |
| | | // param: JSON.stringify({ |
| | | // PktType: "RemotePlayback", |
| | | // accessToken: res.data.data.accessToken, |
| | | // deviceCode: data.channelNumber, |
| | | // startTime: time.end, |
| | | // endTime: time.begin, |
| | | // chl: data.serialNumber |
| | | // }) |
| | | // } |
| | | // } |
| | | // ) |
| | | // .then(result => { |
| | | |
| | | // this.videoSource = result.data.data.m3u8 |
| | | |
| | | // this.innerVisibleVideo = true |
| | | |
| | | // }); |
| | | }); |
| | | }, |
| | | openOldVideoBox() { |
| | | if (Hls.isSupported()) { |
| | | var dom = document.getElementById("old_video"); |
| | | |
| | | // if (dom.volume) dom.volume = 1.0; |
| | | |
| | | this.hls = new Hls(); |
| | | |
| | | var m3u8Url = decodeURIComponent(this.videoSource); |
| | | |
| | | this.hls.loadSource(m3u8Url); |
| | | |
| | | this.hls.attachMedia(dom); |
| | | |
| | | this.hls.on(Hls.Events.MANIFEST_PARSED, function() { |
| | | dom.play(); |
| | | }); |
| | | that.updateJtyep(row); |
| | | that.dialogTableVisible = false; |
| | | }) |
| | | .catch(function(error) { |
| | | that.dialogTableVisible = false; |
| | | }); |
| | | } |
| | | }, |
| | | closeOldVideoBox() { |
| | | var dom = document.getElementById("old_video"); |
| | | |
| | | if (dom.getAttribute("src") != "") { |
| | | dom.pause(); |
| | | |
| | | dom.setAttribute(""); |
| | | } |
| | | revoke(row) { |
| | | var that = this; |
| | | axios({ |
| | | url: |
| | | "http://192.168.0.103:1888/api/blade-jfpts/alarm/alarm/deletejj?id=" + |
| | | row.id, |
| | | method: "post" |
| | | }).then(function() { |
| | | that.dialogTableVisible = false; |
| | | that.onLoad(that.page, that.query); |
| | | }); |
| | | }, |
| | | updateJtyep(row) { |
| | | var that = this; |
| | | axios({ |
| | | url: |
| | | "http://192.168.0.103:1888/api/blade-jfpts/alarm/alarm/updateJtype?id=" + |
| | | row.id + |
| | | "&czTime=" + |
| | | row.czTime + |
| | | "&bz=" + |
| | | row.bz, |
| | | method: "post" |
| | | }).then(function() { |
| | | that.onLoad(that.page, that.query); |
| | | }); |
| | | } |
| | | } |
| | | }; |