|
@@ -70,45 +70,45 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
- import { onMounted, ref } from 'vue';
|
|
|
+ import { computed, onMounted, ref } from 'vue';
|
|
|
// import { CaretDownOutlined } from '@ant-design/icons-vue';
|
|
|
// import MonitorCenter from './components/MonitorCenter.vue';
|
|
|
- // import { useInitConfigs } from './hooks/useInit';
|
|
|
+ import { useInitConfigs } from './hooks/useInit';
|
|
|
import ModuleBD from './components/ModuleBD.vue';
|
|
|
import ModuleBDDual from './components/ModuleBDDual.vue';
|
|
|
- import { testConfigBDFire } from './configurable.data';
|
|
|
+ // import { testConfigBDFire } from './configurable.data';
|
|
|
import VentModal from '/@/components/vent/micro/ventModal.vue';
|
|
|
import { getBDFireData } from './configurable.api';
|
|
|
- import { getToken } from '/@/utils/auth';
|
|
|
+ // import { getToken } from '/@/utils/auth';
|
|
|
|
|
|
// import FramePage from '/@/views/sys/iframe/index.vue';
|
|
|
- const frameRef = ref();
|
|
|
+ // const frameRef = ref();
|
|
|
const mainTitle = ref('保德煤矿火灾预警系统');
|
|
|
const pageType = 'BD_fire';
|
|
|
- const loading = ref(true);
|
|
|
+ // const loading = ref(true);
|
|
|
|
|
|
// const url = ref('http://localhost:8088/');
|
|
|
// const moduleCodes = ['fanlocal', 'fanmain' /** 'vc', 'ar', 'va', 'ws', 'dw' */];
|
|
|
|
|
|
- const configs = ref(
|
|
|
- testConfigBDFire.filter(({ moduleName }) => {
|
|
|
- return moduleName !== '工作面光纤监测' && moduleName !== '工作面束管监测';
|
|
|
+ const configs = computed(() =>
|
|
|
+ cfgs.value.filter((_, index) => {
|
|
|
+ return index !== 4 && index !== 3;
|
|
|
})
|
|
|
);
|
|
|
- const configA = ref<any>(
|
|
|
- testConfigBDFire.find(({ moduleName }) => {
|
|
|
- return moduleName === '工作面束管监测';
|
|
|
+ const configA = computed<any>(() =>
|
|
|
+ cfgs.value.find((_, index) => {
|
|
|
+ return index === 3;
|
|
|
})
|
|
|
);
|
|
|
- const configB = ref<any>(
|
|
|
- testConfigBDFire.find(({ moduleName }) => {
|
|
|
- return moduleName === '工作面光纤监测';
|
|
|
+ const configB = computed<any>(() =>
|
|
|
+ cfgs.value.find((_, index) => {
|
|
|
+ return index === 4;
|
|
|
})
|
|
|
);
|
|
|
- // const { configs, fetchConfigs } = useInitConfigs();
|
|
|
- function hideLoading() {
|
|
|
- loading.value = false;
|
|
|
- }
|
|
|
+ const { configs: cfgs, fetchConfigs } = useInitConfigs();
|
|
|
+ // function hideLoading() {
|
|
|
+ // loading.value = false;
|
|
|
+ // }
|
|
|
const homedata = ref<any>({});
|
|
|
|
|
|
onMounted(() => {
|
|
@@ -117,7 +117,7 @@
|
|
|
getBDFireData({}).then((r) => {
|
|
|
homedata.value = r;
|
|
|
});
|
|
|
- // fetchConfigs(pageType);
|
|
|
+ fetchConfigs(pageType);
|
|
|
});
|
|
|
|
|
|
function redirectTo(url) {
|