|
|
@@ -53,6 +53,19 @@
|
|
|
<SvgIcon name="details" />
|
|
|
</button>
|
|
|
</template>
|
|
|
+ <template #form-mine-cascader>
|
|
|
+ <MineCascader
|
|
|
+ v-model:value="innerValue"
|
|
|
+ style="width: 330px"
|
|
|
+ :sync-to-store="false"
|
|
|
+ :init-from-store="false"
|
|
|
+ :change-on-select="false"
|
|
|
+ @change="changeCascader"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template #form-goaf-select>
|
|
|
+ <a-select v-model:value="goafId" :options="goafOptions" placeholder="请选择" />
|
|
|
+ </template>
|
|
|
</BasicTable>
|
|
|
</TabPane>
|
|
|
<TabPane key="resolved" tab="已解决">
|
|
|
@@ -75,6 +88,19 @@
|
|
|
<SvgIcon name="details" />
|
|
|
</button>
|
|
|
</template>
|
|
|
+ <template #form-mine-cascader>
|
|
|
+ <MineCascader
|
|
|
+ v-model:value="innerValue"
|
|
|
+ style="width: 330px"
|
|
|
+ :sync-to-store="false"
|
|
|
+ :init-from-store="false"
|
|
|
+ :change-on-select="false"
|
|
|
+ @change="changeCascader"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template #form-goaf-select>
|
|
|
+ <a-select v-model:value="goafId" :options="goafOptions" placeholder="请选择" />
|
|
|
+ </template>
|
|
|
</BasicTable>
|
|
|
</TabPane>
|
|
|
</Tabs>
|
|
|
@@ -127,17 +153,22 @@
|
|
|
import ProblemReportModal from './components/ProblemReportModal.vue';
|
|
|
import { SvgIcon } from '/@/components/Icon';
|
|
|
import { columns, searchFormSchema, exportFormSchema } from './problemReport.data';
|
|
|
- import { getDataQuaQueList, addDataQuaQue, deleteDataQuaQue, editDataQuaQue } from '../basicInfo.api';
|
|
|
+ import { getGoafQuestionReportList, addGoafQuestionReport, deleteGoafQuestionReport, editGoafQuestionReport } from '../basicInfo.api';
|
|
|
import { findNode } from '/@/utils/helper/treeHelper';
|
|
|
import { useMineDepartmentStore } from '/@/store/modules/mine';
|
|
|
// import { getDictItemsByCode } from '/@/utils/dict';
|
|
|
import dayjs, { Dayjs } from 'dayjs';
|
|
|
import { useListPage } from '/@/hooks/system/useListPage';
|
|
|
+ import { useInitForm } from '/@/views/analysis/warningAnalysis/connectAnalysis/hooks/form';
|
|
|
+ import MineCascader from '@/components/Form/src/jeecg/components/MineCascader/MineCascader.vue';
|
|
|
|
|
|
// 路由实例
|
|
|
const router = useRouter();
|
|
|
// 实例化矿井Store
|
|
|
const mineStore = useMineDepartmentStore();
|
|
|
+
|
|
|
+ const { goafOptions, goafId, innerValue, initGoafOptions } = useInitForm();
|
|
|
+
|
|
|
// 响应式数据
|
|
|
const activeKey = ref('unresolved'); // 激活的Tab键
|
|
|
const pageMode = ref('add');
|
|
|
@@ -148,12 +179,14 @@
|
|
|
const exportConfirmLoading = ref(false);
|
|
|
const exportType = ref<'resolved' | 'unresolved'>('unresolved'); // 记录当前导出类型
|
|
|
const exportConfig = ref({
|
|
|
- url: '/province/dataQuaQue/exportDataQuaQueList',
|
|
|
+ url: '/province/goafQuestionReport/exportDataQuaQueList',
|
|
|
name: '数据质量',
|
|
|
params: {
|
|
|
isOk: 0,
|
|
|
startTime: '',
|
|
|
endTime: '',
|
|
|
+ goafId: '',
|
|
|
+ deptId: '',
|
|
|
},
|
|
|
});
|
|
|
|
|
|
@@ -183,7 +216,12 @@
|
|
|
const { tableContext: tableContextA, onExportXls: onExportXlsA } = useListPage({
|
|
|
tableProps: {
|
|
|
api: async (params: any) => {
|
|
|
- return await getDataQuaQueList({ ...params, isOk: false });
|
|
|
+ return await getGoafQuestionReportList({
|
|
|
+ ...params,
|
|
|
+ isOk: false,
|
|
|
+ goafId: goafId.value,
|
|
|
+ deptId: innerValue.value,
|
|
|
+ });
|
|
|
},
|
|
|
columns: columns, // 绑定动态列
|
|
|
formConfig: {
|
|
|
@@ -216,7 +254,12 @@
|
|
|
const { tableContext: tableContextB, onExportXls: onExportXlsB } = useListPage({
|
|
|
tableProps: {
|
|
|
api: async (params: any) => {
|
|
|
- return await getDataQuaQueList({ ...params, isOk: true });
|
|
|
+ return await getGoafQuestionReportList({
|
|
|
+ ...params,
|
|
|
+ isOk: true,
|
|
|
+ goafId: goafId.value,
|
|
|
+ deptId: innerValue.value,
|
|
|
+ });
|
|
|
},
|
|
|
columns: columns,
|
|
|
formConfig: {
|
|
|
@@ -290,6 +333,8 @@
|
|
|
isOk: exportType.value === 'resolved' ? 1 : 0,
|
|
|
startTime,
|
|
|
endTime,
|
|
|
+ goafId: goafId.value,
|
|
|
+ deptId: innerValue.value,
|
|
|
};
|
|
|
|
|
|
if (exportType.value === 'unresolved') {
|
|
|
@@ -389,7 +434,14 @@
|
|
|
*/
|
|
|
function handleOpenModal(record: any, mode: 'view' | 'edit' | 'add' = 'view') {
|
|
|
pageMode.value = mode;
|
|
|
- openModal(true, { record, mode });
|
|
|
+ openModal(true, {
|
|
|
+ record: {
|
|
|
+ deptId: innerValue.value,
|
|
|
+ goafId: goafId.value,
|
|
|
+ ...record,
|
|
|
+ },
|
|
|
+ mode,
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -399,9 +451,9 @@
|
|
|
async function handleModalSuccess(result: any) {
|
|
|
try {
|
|
|
if (pageMode.value === 'add') {
|
|
|
- await addDataQuaQue(result);
|
|
|
+ await addGoafQuestionReport(result);
|
|
|
} else if (pageMode.value === 'edit') {
|
|
|
- await editDataQuaQue(result);
|
|
|
+ await editGoafQuestionReport(result);
|
|
|
}
|
|
|
await safeReloadActiveTable();
|
|
|
} catch (error) {
|
|
|
@@ -455,7 +507,7 @@
|
|
|
*/
|
|
|
async function handleDeleteRecord(record: any) {
|
|
|
try {
|
|
|
- await deleteDataQuaQue({ id: record.id });
|
|
|
+ await deleteGoafQuestionReport({ id: record.id });
|
|
|
await nextTick();
|
|
|
await safeReloadActiveTable();
|
|
|
} catch (error) {
|
|
|
@@ -474,7 +526,7 @@
|
|
|
updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
|
|
};
|
|
|
try {
|
|
|
- await editDataQuaQue(copyRecord);
|
|
|
+ await editGoafQuestionReport(copyRecord);
|
|
|
await safeReloadActiveTable();
|
|
|
message.success('标记为已解决成功');
|
|
|
} catch (error) {
|
|
|
@@ -483,6 +535,11 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ function changeCascader(val) {
|
|
|
+ innerValue.value = val;
|
|
|
+ initGoafOptions(val);
|
|
|
+ }
|
|
|
+
|
|
|
// ========== 初始化:先获取状态数据,再加载表格 ==========
|
|
|
onMounted(async () => {
|
|
|
await safeReloadActiveTable();
|