Просмотр исходного кода

[Fix 0000] 问题反馈及数据质量页面无法正确新增的问题修复

houzekong 2 месяцев назад
Родитель
Сommit
736c5914c7

+ 5 - 2
src/views/dashboard/basicInfo/dataQuality/components/DataQualityModal.vue

@@ -101,6 +101,7 @@
   import dayjs, { Dayjs } from 'dayjs';
   import MineCascader from '/@/components/Form/src/jeecg/components/MineCascader/MineCascader.vue';
   import type { FormInstance, RuleObject } from 'ant-design-vue/es/form';
+  import { useMineDepartmentStore } from '/@/store/modules/mine';
 
   // 组件映射表
   const componentMap = {
@@ -114,6 +115,8 @@
   // 定义事件发射
   const emit = defineEmits(['success']);
 
+  const mineStore = useMineDepartmentStore();
+
   // 模态框模式:查看/编辑/新增
   const mode = ref<'view' | 'edit' | 'add'>('view');
   // 当前记录数据
@@ -132,6 +135,7 @@
   const formRef = ref<FormInstance>();
   // 表单数据聚合(适配Form组件的model)
   const formData = reactive({
+    deptId: '',
     mineCode: '',
     queList: queList.value,
   });
@@ -351,13 +355,12 @@
       const now = dayjs().format('YYYY-MM-DD HH:mm:ss');
       const result = {
         ...currentRecord.value,
-        mineCode: formData.mineCode,
+        mineCode: mode.value === 'add' ? mineStore.findDepartById(formData.deptId)?.fax : formData.mineCode,
         queJson: JSON.stringify(submitQueList),
         createTime: mode.value === 'add' ? now : currentRecord.value.createTime || now,
         updateTime: now,
         isOk: mode.value === 'add' ? false : currentRecord.value.isOk,
       };
-      console.log('最终提交数据:', result);
       emit('success', result);
       closeModal();
     } catch (error: any) {

+ 1 - 1
src/views/dashboard/basicInfo/minesInfo/minesInfo.data.ts

@@ -70,7 +70,7 @@ export const columns: BasicColumn[] = [
   },
   {
     title: '自燃倾向性',
-    dataIndex: 'alarmLevel',
+    dataIndex: 'coalSeamLevel',
     width: 100,
   },
   {

+ 7 - 2
src/views/dashboard/basicInfo/problemReport/components/ProblemReportModal.vue

@@ -55,6 +55,7 @@
               :sync-to-store="false"
               :init-from-store="false"
               :change-on-select="false"
+              :allow-clear="false"
               @change="changeCascader"
             />
           </a-form-item>
@@ -105,6 +106,7 @@
   import type { FormInstance, RuleObject } from 'ant-design-vue/es/form';
   import { JEditor, JImageUpload } from '/@/components/Form';
   import { useInitForm } from '/@/views/analysis/warningAnalysis/connectAnalysis/hooks/form';
+  import { useMineDepartmentStore } from '/@/store/modules/mine';
 
   // 组件映射表
   const componentMap = {
@@ -119,6 +121,7 @@
 
   // 定义事件发射
   const emit = defineEmits(['success']);
+  const mineStore = useMineDepartmentStore();
   const { goafOptions, goafId, innerValue, initGoafOptions } = useInitForm();
 
   // 模态框模式:查看/编辑/新增
@@ -357,13 +360,15 @@
       const now = dayjs().format('YYYY-MM-DD HH:mm:ss');
       const result = {
         ...currentRecord.value,
-        mineCode: formData.mineCode,
+        deptId: innerValue.value,
+        goafId: goafId.value,
+        mineCode: mode.value === 'add' ? mineStore.findDepartById(innerValue.value)?.fax : formData.mineCode,
         queJson: JSON.stringify(submitQueList),
         createTime: mode.value === 'add' ? now : currentRecord.value.createTime || now,
         updateTime: now,
         isOk: mode.value === 'add' ? false : currentRecord.value.isOk,
       };
-      console.log('最终提交数据:', result);
+      // console.log('最终提交数据:', result);
       emit('success', result);
       closeModal();
     } catch (error: any) {

+ 3 - 7
src/views/dashboard/basicInfo/problemReport/index.vue

@@ -228,7 +228,7 @@
           ...params,
           isOk: false,
           goafId: goafId.value,
-          deptId: mineStore.getRootId,
+          deptId: innerValue.value,
         });
       },
       columns: columns, // 绑定动态列
@@ -266,7 +266,7 @@
           ...params,
           isOk: true,
           goafId: goafId.value,
-          deptId: mineStore.getRootId,
+          deptId: innerValue.value,
         });
       },
       columns: columns,
@@ -459,11 +459,7 @@
   async function handleModalSuccess(result: any) {
     try {
       if (pageMode.value === 'add') {
-        await addGoafQuestionReport({
-          ...result,
-          deptId: mineStore.getRootId,
-          mineCode: mineStore.getRoot?.fax,
-        });
+        await addGoafQuestionReport(result);
       } else if (pageMode.value === 'edit') {
         await editGoafQuestionReport(result);
       }

+ 40 - 40
src/views/dashboard/basicInfo/problemReport/problemReport.data.ts

@@ -208,46 +208,46 @@ export const formSchema: FormSchema[] = [
       { max: 500, message: '问题描述长度不能超过500个字符', trigger: 'blur' },
     ],
   },
-  {
-    label: '密闭墙问题照片',
-    field: 'queFileUrls',
-    component: 'JImageUpload',
-    componentProps: {
-      //按钮显示文字
-      text: '图片上传',
-      //支持两种基本样式picture和picture-card
-      listType: 'picture-card',
-      //用于控制文件上传的业务路径,默认temp
-      bizPath: 'webfile',
-      //是否禁用
-      disabled: false,
-      //最大上传数量
-      fileMax: 9,
-    },
-    colProps: {
-      span: 6,
-    },
-  },
-  {
-    label: '密闭墙确认照片',
-    field: 'okQueFileUrls',
-    component: 'JImageUpload',
-    componentProps: {
-      //按钮显示文字
-      text: '图片上传',
-      //支持两种基本样式picture和picture-card
-      listType: 'picture-card',
-      //用于控制文件上传的业务路径,默认temp
-      bizPath: 'webfile',
-      //是否禁用
-      disabled: false,
-      //最大上传数量
-      fileMax: 9,
-    },
-    colProps: {
-      span: 6,
-    },
-  },
+  // {
+  //   label: '密闭墙问题照片',
+  //   field: 'queFileUrls',
+  //   component: 'JImageUpload',
+  //   componentProps: {
+  //     //按钮显示文字
+  //     text: '图片上传',
+  //     //支持两种基本样式picture和picture-card
+  //     listType: 'picture-card',
+  //     //用于控制文件上传的业务路径,默认temp
+  //     bizPath: 'webfile',
+  //     //是否禁用
+  //     disabled: false,
+  //     //最大上传数量
+  //     fileMax: 9,
+  //   },
+  //   colProps: {
+  //     span: 6,
+  //   },
+  // },
+  // {
+  //   label: '密闭墙确认照片',
+  //   field: 'okQueFileUrls',
+  //   component: 'JImageUpload',
+  //   componentProps: {
+  //     //按钮显示文字
+  //     text: '图片上传',
+  //     //支持两种基本样式picture和picture-card
+  //     listType: 'picture-card',
+  //     //用于控制文件上传的业务路径,默认temp
+  //     bizPath: 'webfile',
+  //     //是否禁用
+  //     disabled: false,
+  //     //最大上传数量
+  //     fileMax: 9,
+  //   },
+  //   colProps: {
+  //     span: 6,
+  //   },
+  // },
   // {
   //   field: 'param',
   //   label: '参数',

+ 1 - 1
src/views/monitor/sealedMonitor/components/RealtimeDetailsModal.vue

@@ -133,7 +133,7 @@
         () => {
           fetchDetailData();
         },
-        2000,
+        60000,
         {
           immediate: false,
         }