| | |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | <el-select v-model="positionSearch" :teleported="false" class="m-2" placeholder="Select" size="small" @change="changeGas1"> |
| | | <el-option |
| | | v-for="item in positionOptions" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | <div class="checkMore" @click="toNdPage()"><el-icon><DArrowRight /></el-icon></div> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import {toRefs, reactive, onMounted, ref, defineComponent, onUnmounted} from 'vue'; |
| | | import {toRefs, reactive, onMounted, ref, defineComponent, onUnmounted, nextTick} from 'vue'; |
| | | import { ElMessage, ElMessageBox } from 'element-plus'; |
| | | import { useRouter} from "vue-router"; |
| | | import * as echarts from "echarts"; |
| | |
| | | infoParams: {} |
| | | gasSearch: number | null |
| | | tlGasSearch: number | null |
| | | positionSearch: number | null |
| | | positionOptions: Array<gasType> |
| | | gasOptions: Array<gasType> |
| | | monthAgo: string, |
| | | today: string, |
| | |
| | | startTime: '', |
| | | endTime: '' |
| | | }, |
| | | positionSearch: null, |
| | | gasSearch: null, |
| | | tlGasSearch: null, |
| | | gasOptions: [], |
| | | positionOptions: [ |
| | | { |
| | | id: null, |
| | | name: '全部' |
| | | }, |
| | | { |
| | | id: 1, |
| | | name: '方位1' |
| | | }, |
| | | { |
| | | id: 2, |
| | | name: '方位2' |
| | | }, |
| | | { |
| | | id: 3, |
| | | name: '方位3' |
| | | } |
| | | ], |
| | | monthAgo: '', |
| | | today: '', |
| | | gasData: [], |
| | |
| | | } |
| | | |
| | | const getGasNdData = async ()=>{ |
| | | const res = await bigScreenApi().getGasNdData({startTime: state.today+' 00:00:00',endTime: state.today+' 23:59:59',gasName: state.gasSearch}) |
| | | const res = await bigScreenApi().getGasNdData({startTime: state.today+' 00:00:00',endTime: state.today+' 23:59:59',gasName: state.gasSearch,position: state.positionSearch}) |
| | | if(res.data.code == 100){ |
| | | if(res.data.data && res.data.data.length>0){ |
| | | state.hasNd = true |
| | |
| | | } |
| | | |
| | | const initgasN =(data:Array<string>,time: Array<string>)=>{ |
| | | nextTick(() => { |
| | | let dom = document.getElementById(gasN.value); |
| | | let myChart = echarts.init(dom); |
| | | let option: EChartsOption; |
| | |
| | | option && myChart.setOption(option); |
| | | window.addEventListener("resize",function (){ |
| | | myChart.resize(); |
| | | }); |
| | | }); |
| | | } |
| | | const initgasT =(time: Array<string>,data: Array<any>)=>{ |
| | |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | </style> |