|
@@ -22,8 +22,10 @@
|
|
|
<!-- 时间选择 -->
|
|
<!-- 时间选择 -->
|
|
|
<div class="filter-section param-section">
|
|
<div class="filter-section param-section">
|
|
|
<span class="filter-label">老空区永久密闭:</span>
|
|
<span class="filter-label">老空区永久密闭:</span>
|
|
|
- <Select ref="select" v-model:value="goafId" style="width: 300px" placeholder="请选择老空区">
|
|
|
|
|
- <SelectOption v-for="(item, index) in goafOptions" :key="index" :value="item.value">{{ item.label }} </SelectOption>
|
|
|
|
|
|
|
+ <Select ref="select" v-model:value="goafId" style="width: 300px" placeholder="请选择老空区" @change="generateChart">
|
|
|
|
|
+ <SelectOption v-for="(item, index) in goafOptions" :key="index" :value="item.value">
|
|
|
|
|
+ {{ item.label }}
|
|
|
|
|
+ </SelectOption>
|
|
|
</Select>
|
|
</Select>
|
|
|
</div>
|
|
</div>
|
|
|
</Col>
|
|
</Col>
|
|
@@ -83,10 +85,9 @@
|
|
|
import echartContent from './components/echart-content.vue';
|
|
import echartContent from './components/echart-content.vue';
|
|
|
import echartDivider from './components/echart-divider.vue';
|
|
import echartDivider from './components/echart-divider.vue';
|
|
|
import { getGoafHistory } from './connectAnalysis.api';
|
|
import { getGoafHistory } from './connectAnalysis.api';
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
import { SvgIcon } from '/@/components/Icon';
|
|
import { SvgIcon } from '/@/components/Icon';
|
|
|
import { useInitForm } from './hooks/form';
|
|
import { useInitForm } from './hooks/form';
|
|
|
|
|
+ import { useMineDepartmentStore } from '/@/store/modules/mine.js';
|
|
|
|
|
|
|
|
// 这个页面被其他的页面需要,故添加部分props以作复用
|
|
// 这个页面被其他的页面需要,故添加部分props以作复用
|
|
|
const props = withDefaults(
|
|
const props = withDefaults(
|
|
@@ -120,6 +121,7 @@
|
|
|
}
|
|
}
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
|
|
+ const mineStore = useMineDepartmentStore();
|
|
|
const { goafOptions, goafId, innerValue, loading, filters, initGoafOptions } = useInitForm();
|
|
const { goafOptions, goafId, innerValue, loading, filters, initGoafOptions } = useInitForm();
|
|
|
|
|
|
|
|
// 组件注册
|
|
// 组件注册
|
|
@@ -137,18 +139,19 @@
|
|
|
|
|
|
|
|
//煤矿选项切换
|
|
//煤矿选项切换
|
|
|
function changeCascader(val) {
|
|
function changeCascader(val) {
|
|
|
|
|
+ const dept = mineStore.findDepartById(innerValue.value);
|
|
|
|
|
+ if (!dept || !dept?.isLeaf) return;
|
|
|
|
|
+
|
|
|
innerValue.value = val;
|
|
innerValue.value = val;
|
|
|
initGoafOptions(val).then(() => {
|
|
initGoafOptions(val).then(() => {
|
|
|
- if (echartData.flag) {
|
|
|
|
|
- goafId.value;
|
|
|
|
|
- generateChart();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ generateChart();
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
//时间选择选项切换
|
|
//时间选择选项切换
|
|
|
function changeTime(val) {
|
|
function changeTime(val) {
|
|
|
dateRange.value[0] = val[0];
|
|
dateRange.value[0] = val[0];
|
|
|
dateRange.value[1] = val[1];
|
|
dateRange.value[1] = val[1];
|
|
|
|
|
+ generateChart();
|
|
|
}
|
|
}
|
|
|
//图表选项标签切换
|
|
//图表选项标签切换
|
|
|
function checkBoxChange(val) {
|
|
function checkBoxChange(val) {
|
|
@@ -162,6 +165,7 @@
|
|
|
return message.info('请先选择煤矿及老空区');
|
|
return message.info('请先选择煤矿及老空区');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ loading.value = true;
|
|
|
echartData.yData.length = 0;
|
|
echartData.yData.length = 0;
|
|
|
echartData.flag = false;
|
|
echartData.flag = false;
|
|
|
|
|
|
|
@@ -177,6 +181,9 @@
|
|
|
sort: 'asc',
|
|
sort: 'asc',
|
|
|
...(props.requestParams || {}),
|
|
...(props.requestParams || {}),
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ loading.value = false;
|
|
|
|
|
+
|
|
|
if (res) {
|
|
if (res) {
|
|
|
const data = res.records || [];
|
|
const data = res.records || [];
|
|
|
if (data.length) {
|
|
if (data.length) {
|