|
|
@@ -1,5 +1,4 @@
|
|
|
import { ref } from 'vue';
|
|
|
-import { getGoafSelectOption } from '../../monitor/sealedMonitor/monitor.api';
|
|
|
import { useMineDepartmentStore } from '/@/store/modules/mine';
|
|
|
import { resolveAlarm } from '../warningAnalysis/airLeakStatus/airLeak.api';
|
|
|
import { message } from 'ant-design-vue';
|
|
|
@@ -20,23 +19,10 @@ export function useInitForm(ctx?: TableActionType) {
|
|
|
const leaf = mineStore.findDepart((e) => e.isLeaf, mineStore.getDepart || mineStore.getRoot);
|
|
|
const hiscode = leaf?.id;
|
|
|
|
|
|
- if (hiscode) {
|
|
|
- // mineStore.setDepartById(code as string);
|
|
|
- initGoafOptions(hiscode);
|
|
|
- }
|
|
|
-
|
|
|
// 采空区选择器
|
|
|
const goafId = ref('');
|
|
|
const goafOptions = ref<any[]>([]);
|
|
|
|
|
|
- function initGoafOptions(deptId) {
|
|
|
- return getGoafSelectOption({ deptId }).then(({ options, defaultValue }) => {
|
|
|
- goafOptions.value = options;
|
|
|
- if (options.some((e) => e.value === goafId.value)) return;
|
|
|
- goafId.value = defaultValue;
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
const [registerModal, modalCtx] = useModal();
|
|
|
|
|
|
function openModal(record) {
|
|
|
@@ -72,7 +58,6 @@ export function useInitForm(ctx?: TableActionType) {
|
|
|
resolveValue,
|
|
|
registerModal,
|
|
|
openModal,
|
|
|
- initGoafOptions,
|
|
|
handleResolve,
|
|
|
};
|
|
|
}
|