| | |
| | | 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> |