| | |
| | | </el-button> |
| | | </el-form> |
| | | </div> |
| | | <div id="gasChart" style="height: 500px;width: auto"></div> |
| | | <div :id="gasChart" style="height: 500px;width: auto"></div> |
| | | <el-table :data="state.tableData.data" style="width: 100%;margin-top: 20px" v-loading="loading"> |
| | | <el-table-column type="index" label="序号" width="80" /> |
| | | <el-table-column align="center" prop="time" label="采集时间"/> |
| | |
| | | gasList: [] |
| | | } |
| | | }); |
| | | const gasChart = ref("eChartgasN" + Date .now() + Math .random()) |
| | | |
| | | const chooseTime = (val: any) => { |
| | | let sTime = Date.parse(new Date(val[0])); |
| | |
| | | return item.gasValue; |
| | | }) |
| | | dataZoomEnd.value = xData.value.length > 25 ? 30 : 100; |
| | | markLines.value = 110; |
| | | |
| | | }else { |
| | | xData.value = []; |
| | | yData.value = []; |
| | |
| | | let res = await gasManageApi().getGas({}); |
| | | if(res.data.code == 100) { |
| | | state.tableData.gasList = res.data.data; |
| | | console.log("气体",state.tableData.gasList) |
| | | //默认选择第一个气体 |
| | | state.tableData.listQuery.searchParams.gas = state.tableData.gasList[0].id; |
| | | markLines.value = state.tableData.gasList[0].threshold; |
| | | initInfoData(); |
| | | }else { |
| | | ElMessage({ |
| | |
| | | }; |
| | | const search = () => { |
| | | state.tableData.listQuery.pageIndex = 1; |
| | | const gasObj = state.tableData.gasList.filter(item => { |
| | | return item.id == state.tableData.listQuery.searchParams.gas |
| | | }); |
| | | markLines.value = gasObj[0].threshold; |
| | | |
| | | initInfoData(); |
| | | console.log("vla",state.tableData.listQuery.searchParams) |
| | | } |
| | | const reset = () => { |
| | | getNowTime(); |
| | | state.tableData.listQuery.searchParams.gas = state.tableData.gasList[0].id; |
| | | markLines.value = state.tableData.gasList[0].threshold; |
| | | state.tableData.listQuery.pageIndex = 1; |
| | | initInfoData(); |
| | | } |
| | |
| | | if (myChart.value != null && myChart.value != "" && myChart.value != undefined) { |
| | | myChart.value.dispose(); |
| | | } |
| | | myChart.value = echarts.init(document.getElementById('gasChart')); |
| | | myChart.value = echarts.init(document.getElementById(gasChart.value)); |
| | | // 指定图表的配置项和数据 |
| | | const option = { |
| | | tooltip: { |