| | |
| | | |
| | | export const getHelemtData = (data: any) => { |
| | | return request({ |
| | | url: "/temp/iotdata/devices", |
| | | url: "/iotdata/devices", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | |
| | | export const sendAudio = (id,data: any) => { |
| | | return request({ |
| | | url: `/temp/iotdata/audio/?sn=${id}`, |
| | | url: `/iotdata/audio/?sn=${id}`, |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | |
| | | export const getBanner = () => { |
| | | return request({ |
| | | url: `/temp/iotdata/banner-info`, |
| | | url: `/iotdata/banner-info`, |
| | | method: "get", |
| | | }) |
| | | } |
| | | |
| | | export const getChart = () => { |
| | | return request({ |
| | | url: `/temp/iotdata/seven-day`, |
| | | url: `/iotdata/seven-day`, |
| | | method: "get", |
| | | }) |
| | | } |
| | | |
| | | export const lowBattery = () => { |
| | | return request({ |
| | | url: `/temp/iotdata/low-battery`, |
| | | url: `/iotdata/low-battery`, |
| | | method: "post", |
| | | }) |
| | | } |
| | | |
| | | export const outBound = () => { |
| | | return request({ |
| | | url: `/temp/iotdata/out-bound`, |
| | | url: `/iotdata/out-bound`, |
| | | method: "post", |
| | | }) |
| | | } |
| | | |
| | | export const historyWarn = () => { |
| | | return request({ |
| | | url: `/temp/iotdata/history`, |
| | | url: `/iotdata/history`, |
| | | method: "post", |
| | | }) |
| | | } |
| | | |
| | | export const handleWarn = (data) => { |
| | | return request({ |
| | | url: `/temp/iotdata/handle-warn`, |
| | | url: `/iotdata/handle-warn`, |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | |
| | | export const getZones = (data) => { |
| | | return request({ |
| | | url: `/temp/iotdata/zones`, |
| | | url: `/iotdata/zones`, |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | |
| | | export const createZones = (data) => { |
| | | return request({ |
| | | url: `/temp/iotdata/create-zone`, |
| | | url: `/iotdata/create-zone`, |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | <template> |
| | | <div class="realTimeItem"> |
| | | <warnDescription/> |
| | | <warnDescription /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import warnDescription from '@/pages/internetEquipment/components/warnDescription' |
| | | import warnDescription from "@/pages/internetEquipment/components/warnDescription"; |
| | | |
| | | export default { |
| | | props :{ |
| | | warnObj:{ |
| | | type:Object |
| | | }, |
| | | props: { |
| | | boundArr: { |
| | | type: Object, |
| | | }, |
| | | components :{ |
| | | warnDescription |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | | warnDescription, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .realTimeItem { |
| | | display: flex; |
| | | flex-direction: column; |
| | | width: 167px; |
| | | height: 134px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | width: 167px; |
| | | height: 134px; |
| | | } |
| | | </style> |
| | |
| | | .colobox { |
| | | position: absolute; |
| | | top: 2px; |
| | | left: 10px; |
| | | left: 5px; |
| | | width: 29px; |
| | | height: 15px; |
| | | border-radius: 2px; |
| | |
| | | return { |
| | | name, |
| | | dots: data, |
| | | id: item.id, |
| | | id: +item.id, |
| | | }; |
| | | }); |
| | | const res = await createZones({ dots_arr: arrData }); |
| | |
| | | <template> |
| | | <div class="real-time-module"> |
| | | <div class="title">实时抓拍预警</div> |
| | | <div class="real-time-item" v-for="(item, index) in warnArr" :key="index"> |
| | | <img src="/images/settings/background.png" alt="" class="warnArea" /> |
| | | <div class="real-time-item" v-for="(item, index) in boundArr" :key="index"> |
| | | <img :src="item.snap_shot" alt="" class="warnArea" /> |
| | | <warnDescription |
| | | :warnDes="{ |
| | | code: item.device_sn, |
| | |
| | | import warnDescription from "@/pages/internetEquipment/components/warnDescription"; |
| | | export default { |
| | | props: { |
| | | warnArr: { |
| | | boundArr: { |
| | | type: Array, |
| | | }, |
| | | }, |
| | |
| | | } |
| | | |
| | | .real-time-item { |
| | | margin-right: 14px; |
| | | margin-right: 13px; |
| | | } |
| | | .warnArea { |
| | | width: 167px; |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | boundArr: [], |
| | | warnArr: [], |
| | | lowBatteryArr: [], |
| | | }; |
| | |
| | | .footer { |
| | | height: 292px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | justify-content: start; |
| | | color: #4f4f4f; |
| | | |
| | | .elec-module { |
| | | margin: 0 20px; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | // } |
| | | }); |
| | | |
| | | // const serverUrl = "http://58.118.225.79:41243" // 羊五 |
| | | // const serverUrl = "http://192.168.20.189/:7009"; // 羊五 |
| | | const serverUrl = "http://192.168.8.10:7009"; |
| | | const serverUrl2 = "http://192.168.8.10:9000"; |
| | | // const serverUrl = "http://192.168.20.10:7009"; |
| | |
| | | target: serverUrl, |
| | | changeOrigin: true, //开启代理 |
| | | }, |
| | | "/temp": { |
| | | "/iotdata": { |
| | | target: serverUrl2, |
| | | changeOrigin: true, //开启代理, |
| | | pathRewrite: { |
| | | "/temp": "", |
| | | }, |
| | | }, |
| | | }, |
| | | }, |