| | |
| | | // 跨域请求 |
| | | axios.defaults.baseURL = 'http://110.40.173.177:8005/'; |
| | | } else { |
| | | //axios.defaults.baseURL = location.protocol + '//' + location.host + '/envir/'; |
| | | axios.defaults.baseURL = "http://110.40.173.177:8005/"; |
| | | axios.defaults.baseURL = location.protocol + '//' + location.hostname + ':8005/'; |
| | | } |
| | | |
| | | // 添加请求拦截器 |
| | | axios.interceptors.request.use(function (config) { |
| | | // 在发送请求之前做些什么 |
| | |
| | | const getNormalBar = (data)=>{ |
| | | const defaultOption = { |
| | | minRatio: 0, |
| | | maxRatio: 1.2, |
| | | maxRatio: 1.1, |
| | | grid: { |
| | | top: '15%', |
| | | right: '3%', |
| | |
| | | if(isNaN(min)) { |
| | | return 0; |
| | | }else { |
| | | return min * option.minRatio; |
| | | return (min * option.minRatio).toHold(3); |
| | | } |
| | | }, |
| | | max(data) { |
| | |
| | | if(isNaN(max)) { |
| | | return 1; |
| | | }else { |
| | | return (max * option.maxRatio).toHold(0); |
| | | return (max * option.maxRatio).toHold(3); |
| | | } |
| | | }, |
| | | axisLabel: { |
| | |
| | | data: [], |
| | | type: 'bar', |
| | | showBackground: true, |
| | | symbolSize: 0, |
| | | backgroundStyle: { |
| | | color: 'rgba(180, 180, 180, 0.2)' |
| | | }, |
| | |
| | | if(isNaN(min)) { |
| | | return 0; |
| | | }else { |
| | | return (min * option.minRatio).toHold(0); |
| | | return (min * option.minRatio).toHold(2); |
| | | } |
| | | }, |
| | | max(data) { |
| | |
| | | if(isNaN(max)) { |
| | | return 1; |
| | | }else { |
| | | return (max * option.maxRatio).toHold(0); |
| | | return (max * option.maxRatio).toHold(2); |
| | | } |
| | | }, |
| | | axisLabel: { |
| | |
| | | } |
| | | }); |
| | | const volBarOption = getNormalBar({ |
| | | minRatio: 0.999, |
| | | maxRatio: 1.001, |
| | | grid: { |
| | | top: '15%', |
| | | right: '3%', |
| | |
| | | const tempNum = getBarNum(tempData); |
| | | tempBarOption.option.min = tempNum.min; |
| | | tempBarOption.option.max = tempNum.max; |
| | | tempBarOption.title.text = "最大值="+tempNum.max+"℃;最小值="+tempNum.min+"℃;平均值="+tempNum.avg+"℃" |
| | | tempBarOption.title.text = "最大值="+tempNum.max+"℃;最小值="+tempNum.min+"℃;平均值="+tempNum.avg+"℃"; |
| | | tempBarOption.series[0].data = tempData; |
| | | |
| | | let volData = data.monomerVol.split(",").map((item, key) => { |
| | |
| | | const volNum = getBarNum(volData); |
| | | volBarOption.option.min = volNum.min; |
| | | volBarOption.option.max = volNum.max; |
| | | volBarOption.title.text = "最大值="+volNum.max+"V;最小值="+volNum.min+"V;平均值="+volNum.avg+"V" |
| | | volBarOption.title.text = "最大值="+volNum.max+"V;最小值="+volNum.min+"V;平均值="+volNum.avg+"V"; |
| | | volBarOption.series[0].type="line"; |
| | | volBarOption.series[0].markPoint= { |
| | | data: [ |
| | | { |
| | | type: 'max', |
| | | name: 'Max', |
| | | itemStyle: { |
| | | color: "#FF0000" |
| | | } |
| | | }, |
| | | { type: 'min', name: 'Min' } |
| | | ] |
| | | }; |
| | | volBarOption.series[0].data = volData; |
| | | }else { |
| | | tempBarOption.series[0].data = []; |
| | |
| | | } |
| | | |
| | | const alarmLineOption = getNormalLine({ |
| | | minRatio: 0.9 |
| | | minRatio: 1, |
| | | maxRatio: 1, |
| | | }); |
| | | const totalVolLineOption = getNormalLine({ |
| | | minRatio: 0.9 |
| | | minRatio: 1, |
| | | maxRatio: 1, |
| | | }); |
| | | |
| | | let lineData = { |
| | |
| | | import VideoItemIcon from "@/components/videoItemIcon.vue"; |
| | | import videoContent from "@/assets/images/video-content.jpeg"; |
| | | const num = ref([]); |
| | | const imgSrc = ref("http://192.168.1.109:8080/?action=stream"); |
| | | |
| | | const changeVideoState = (data)=>{ |
| | | num.value.forEach(item=>{ |
| | |
| | | <flex-box> |
| | | <abs-pos-layout> |
| | | <div class="img-container"> |
| | | <img :src="videoContent" alt="" /> |
| | | <img :src="imgSrc" alt="" /> |
| | | </div> |
| | | </abs-pos-layout> |
| | | </flex-box> |