|
|
@@ -76,7 +76,7 @@
|
|
|
<script setup lang="ts">
|
|
|
import { ref, reactive } from 'vue';
|
|
|
import dayjs from 'dayjs';
|
|
|
- import { Select, SelectOption, Row, Col, DatePicker, Button } from 'ant-design-vue';
|
|
|
+ import { Select, SelectOption, Row, Col, DatePicker, Button, message } from 'ant-design-vue';
|
|
|
import MineCascader from '@/components/Form/src/jeecg/components/MineCascader/MineCascader.vue';
|
|
|
import CheckboxNav from './components/checkbox-nav.vue';
|
|
|
import echartLengend from './components/echart-lengend.vue';
|
|
|
@@ -127,11 +127,15 @@
|
|
|
async function generateChart() {
|
|
|
echartData.yData.length = 0;
|
|
|
echartData.flag = false;
|
|
|
- let startTime = dateRange.value[0].format('YYYY-MM-DD HH:mm:ss');
|
|
|
- let endTime = dateRange.value[1].format('YYYY-MM-DD HH:mm:ss');
|
|
|
- let res = await getGoafHistory({ pageNo: 1, pageSize: 1000, startTime: startTime, endTime: endTime, goafId: goafId.value });
|
|
|
+ if (!goafId.value) {
|
|
|
+ return message.info('请先选择煤矿及老空区');
|
|
|
+ }
|
|
|
+
|
|
|
+ const startTime = dateRange.value[0].format('YYYY-MM-DD HH:mm:ss');
|
|
|
+ const endTime = dateRange.value[1].format('YYYY-MM-DD HH:mm:ss');
|
|
|
+ const res = await getGoafHistory({ pageNo: 1, pageSize: 1000, startTime: startTime, endTime: endTime, goafId: goafId.value });
|
|
|
if (res) {
|
|
|
- let data = res.records || [];
|
|
|
+ const data = res.records || [];
|
|
|
if (data.length) {
|
|
|
echartData.xData = data.map((e) => e.createTime);
|
|
|
if (checkList.value.length) {
|
|
|
@@ -159,8 +163,6 @@
|
|
|
// }) || [];
|
|
|
// goafId.value = goafOption.value.length ? (goafId.value ? goafId.value : goafOption.value[0]['value']) : '';
|
|
|
// }
|
|
|
-
|
|
|
- generateChart();
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|