Przeglądaj źródła

[Mod 0000] 修改prop设置

houzekong 1 tydzień temu
rodzic
commit
2609629f2f

+ 1 - 1
src/components/Form/src/props.ts

@@ -117,7 +117,7 @@ export const basicProps = {
   rowProps: Object as PropType<RowProps>,
 
   // 当表单是查询条件的时候 当表单改变后自动查询,不需要点击查询按钮
-  autoSearch: propTypes.bool.def(true),
+  autoSearch: propTypes.bool.def(false),
 
   schemaGroupNames: {
     type: [Array] as PropType<string[]>,

+ 2 - 0
src/components/Form/src/types/form.ts

@@ -127,6 +127,8 @@ export interface FormProps {
   colon?: boolean;
 
   schemaGroupNames: string[];
+
+  autoSearch: boolean;
 }
 export interface FormSchema {
   // Field name

+ 1 - 1
src/components/Table/src/props.ts

@@ -55,7 +55,7 @@ export const basicProps = {
     },
   },
   // 立即请求接口
-  immediate: propTypes.bool.def(false),
+  immediate: propTypes.bool.def(true),
   emptyDataIsShowTable: propTypes.bool.def(true),
   // 额外的请求参数
   searchInfo: {

+ 4 - 0
src/views/analysis/warningAnalysis/airLeakStatus/index.vue

@@ -88,9 +88,11 @@
   // 注册实时数据表格
   const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
     tableProps: {
+      immediate: false,
       api: wrappedGetMineData,
       columns,
       formConfig: {
+        autoSearch: true,
         labelWidth: 120,
         schemas: [
           {
@@ -129,6 +131,7 @@
   // 注册历史数据表格
   const { tableContext, onExportXls } = useListPage({
     tableProps: {
+      immediate: false,
       columns,
       api: async (params) => {
         await initGoafOptions(params.deptId);
@@ -139,6 +142,7 @@
         return getProvinceAlarmHistory(params);
       },
       formConfig: {
+        autoSearch: true,
         model: { deptId: hiscode },
         labelWidth: 120,
         schemas: [

+ 4 - 0
src/views/analysis/warningAnalysis/autoFireAnalysis/index.vue

@@ -109,9 +109,11 @@
   // 注册实时数据表格
   const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
     tableProps: {
+      immediate: false,
       columns,
       api: wrappedGetMineData,
       formConfig: {
+        autoSearch: true,
         labelWidth: 120,
         schemas: [
           {
@@ -151,6 +153,7 @@
   // 注册历史数据表格
   const { tableContext, onExportXls } = useListPage({
     tableProps: {
+      immediate: false,
       columns,
       // columns: historyColumns,
       api: async (params) => {
@@ -162,6 +165,7 @@
         return getProvinceAlarmHistory(params);
       },
       formConfig: {
+        autoSearch: true,
         model: { deptId: hiscode },
         labelWidth: 120,
         schemas: [

+ 4 - 0
src/views/analysis/warningAnalysis/autoFireOutAnalysis/index.vue

@@ -109,9 +109,11 @@
   // 注册实时数据表格
   const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
     tableProps: {
+      immediate: false,
       columns,
       api: wrappedGetMineData,
       formConfig: {
+        autoSearch: true,
         labelWidth: 120,
         schemas: [
           {
@@ -151,6 +153,7 @@
   // 注册历史数据表格
   const { tableContext, onExportXls } = useListPage({
     tableProps: {
+      immediate: false,
       columns,
       // columns: historyColumns,
       api: async (params) => {
@@ -162,6 +165,7 @@
         return getProvinceAlarmHistory(params);
       },
       formConfig: {
+        autoSearch: true,
         model: { deptId: hiscode },
         labelWidth: 120,
         schemas: [

+ 4 - 0
src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/index.vue

@@ -99,9 +99,11 @@
   // 注册实时数据表格
   const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
     tableProps: {
+      immediate: false,
       columns,
       api: wrappedGetMineData,
       formConfig: {
+        autoSearch: true,
         labelWidth: 120,
         schemas: [
           {
@@ -142,6 +144,7 @@
   // 注册历史数据表格
   const { tableContext, onExportXls } = useListPage({
     tableProps: {
+      immediate: false,
       columns,
       // columns: historyColumns,
       api: async (params) => {
@@ -153,6 +156,7 @@
         return getProvinceAlarmHistory(params);
       },
       formConfig: {
+        autoSearch: true,
         model: { deptId: hiscode },
         labelWidth: 120,
         schemas: [

+ 4 - 0
src/views/analysis/warningAnalysis/overlimitAlarm/index.vue

@@ -109,9 +109,11 @@
   // 注册实时数据表格
   const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
     tableProps: {
+      immediate: false,
       columns,
       api: wrappedGetMineData,
       formConfig: {
+        autoSearch: true,
         model: { alarmFiled: route.query.alarmFiled },
         labelWidth: 120,
         schemas,
@@ -145,6 +147,7 @@
   // 注册历史数据表格
   const { tableContext, onExportXls } = useListPage({
     tableProps: {
+      immediate: false,
       columns,
       // columns: historyColumns,
       api: async (params) => {
@@ -156,6 +159,7 @@
         return getProvinceAlarmHistory(params);
       },
       formConfig: {
+        autoSearch: true,
         model: { deptId: hiscode },
         labelWidth: 120,
         schemas: [

+ 4 - 0
src/views/analysis/warningAnalysis/overlimitAlarmOut/index.vue

@@ -107,9 +107,11 @@
   // 注册实时数据表格
   const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
     tableProps: {
+      immediate: false,
       columns,
       api: wrappedGetMineData,
       formConfig: {
+        autoSearch: true,
         labelWidth: 120,
         schemas,
         showAdvancedButton: false,
@@ -142,6 +144,7 @@
   // 注册历史数据表格
   const { tableContext, onExportXls } = useListPage({
     tableProps: {
+      immediate: false,
       columns,
       // columns: historyColumns,
       api: async (params) => {
@@ -153,6 +156,7 @@
         return getProvinceAlarmHistory(params);
       },
       formConfig: {
+        autoSearch: true,
         model: { deptId: hiscode },
         labelWidth: 120,
         schemas: [

+ 4 - 0
src/views/analysis/warningAnalysis/pressureDiffAnalysis/index.vue

@@ -122,9 +122,11 @@
   // 注册实时数据表格
   const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
     tableProps: {
+      immediate: false,
       columns,
       api: wrappedGetMineData,
       formConfig: {
+        autoSearch: true,
         labelWidth: 120,
         schemas: [
           {
@@ -165,6 +167,7 @@
   // 注册历史数据表格
   const { tableContext, onExportXls } = useListPage({
     tableProps: {
+      immediate: false,
       columns,
       // columns: historyColumns,
       api: async (params) => {
@@ -176,6 +179,7 @@
         return getProvinceAlarmHistory(params);
       },
       formConfig: {
+        autoSearch: true,
         model: { deptId: hiscode },
         labelWidth: 120,
         schemas: [

+ 4 - 0
src/views/analysis/warningAnalysis/reportAnalysis/index.vue

@@ -63,9 +63,11 @@
   // 注册晚报数据表格
   const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
     tableProps: {
+      immediate: false,
       columns,
       api: getProvinceAlarm,
       formConfig: {
+        autoSearch: true,
         labelWidth: 120,
         schemas: [
           {
@@ -105,6 +107,7 @@
   // 注册历史数据表格
   const { tableContext, onExportXls } = useListPage({
     tableProps: {
+      immediate: false,
       columns: [
         ...columns,
         {
@@ -116,6 +119,7 @@
       // columns: historyColumns,
       api: getProvinceAlarmHistory,
       formConfig: {
+        autoSearch: true,
         model: { deptId: hiscode },
         labelWidth: 120,
         schemas: [

+ 4 - 0
src/views/analysis/warningAnalysis/sealRiskJudgeAnalysis/index.vue

@@ -112,9 +112,11 @@
   // 注册实时数据表格
   const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
     tableProps: {
+      immediate: false,
       columns,
       api: wrappedGetMineData,
       formConfig: {
+        autoSearch: true,
         labelWidth: 120,
         schemas: [
           {
@@ -154,6 +156,7 @@
   // 注册历史数据表格
   const { tableContext, onExportXls } = useListPage({
     tableProps: {
+      immediate: false,
       columns,
       // columns: historyColumns,
       api: async (params) => {
@@ -165,6 +168,7 @@
         return getProvinceAlarmHistory(params);
       },
       formConfig: {
+        autoSearch: true,
         model: { deptId: hiscode },
         labelWidth: 120,
         schemas: [

+ 4 - 4
src/views/dashboard/Overhaul/components/RootPage.vue

@@ -226,7 +226,7 @@
       // },
     },
   });
-  const [registerRealtimeTable, realtimeTable] = ctxRealtime;
+  const [registerRealtimeTable] = ctxRealtime;
 
   const handleShowDetail = (item: any) => {
     // 设置当前选中的 deptId
@@ -236,9 +236,9 @@
 
     // 关键:手动触发表格刷新,因为 api 依赖的 ref 变化可能不会自动触发 BasicTable 的内部重载
     // 使用 nextTick 确保 DOM 更新后再重载,或者直接在 modal 的 open 事件中处理
-    setTimeout(() => {
-      realtimeTable?.reload();
-    }, 100);
+    // setTimeout(() => {
+    //   realtimeTable?.reload();
+    // }, 100);
   };
 
   const handleModalClose = () => {

+ 2 - 0
src/views/dashboard/basicInfo/dataQuality/index.vue

@@ -185,6 +185,7 @@
       },
       columns: columns, // 绑定动态列
       formConfig: {
+        autoSearch: true,
         labelWidth: 120,
         schemas: searchFormSchema,
         showAdvancedButton: false,
@@ -218,6 +219,7 @@
       },
       columns: columns,
       formConfig: {
+        autoSearch: true,
         labelWidth: 120,
         schemas: searchFormSchema,
         showAdvancedButton: false,

+ 2 - 0
src/views/dashboard/basicInfo/minesInfo/index.vue

@@ -47,9 +47,11 @@
   // ========== 表格注册 ==========
   const { tableContext: ctxRealtime, onExportXls } = useListPage({
     tableProps: {
+      immediate: false,
       api: getMineData, // 数据统计接口
       columns, // 绑定动态列
       formConfig: {
+        autoSearch: true,
         model: {
           deptId: route.query.deptId,
           accessStatus: route.query.accessStatus,

+ 2 - 0
src/views/dashboard/basicInfo/problemReport/index.vue

@@ -232,6 +232,7 @@
       },
       columns: columns, // 绑定动态列
       formConfig: {
+        autoSearch: true,
         labelWidth: 120,
         schemas: searchFormSchema,
         showAdvancedButton: false,
@@ -270,6 +271,7 @@
       },
       columns: columns,
       formConfig: {
+        autoSearch: true,
         labelWidth: 120,
         schemas: searchFormSchema,
         showAdvancedButton: false,

+ 4 - 0
src/views/monitor/sealedMonitor/index.vue

@@ -79,9 +79,11 @@
   // 注册实时数据表格
   const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
     tableProps: {
+      immediate: false,
       api: wrappedGetMineData,
       columns,
       formConfig: {
+        autoSearch: true,
         model: { deptId: rawcode, alarmLevel: route.query.alarmLevel },
         schemas: [
           {
@@ -119,6 +121,7 @@
   // 注册历史数据表格
   const { tableContext: ctxHistory, onExportXls } = useListPage({
     tableProps: {
+      immediate: false,
       api: async (params) => {
         await initGoafOptions(params.deptId);
         if (!goafId.value) {
@@ -129,6 +132,7 @@
       },
       columns: historicalColumns,
       formConfig: {
+        autoSearch: true,
         model: {
           deptId: hiscode,
         },

+ 2 - 0
src/views/system/algorithm/index.vue

@@ -135,11 +135,13 @@
   // 列表页面公共参数、方法
   const { tableContext } = useListPage({
     tableProps: {
+      immediate: false,
       api: getCoalSeam,
       columns: columnsCoalAlarm,
       rowKey: 'id',
       showIndexColumn: true,
       formConfig: {
+        autoSearch: true,
         // showResetButton: false,
         schemas: searchFormSchema,
         schemaGroupNames: ['常规查询'],

+ 2 - 0
src/views/system/cadFile/index.vue

@@ -56,11 +56,13 @@
   // ========== 表格注册 ==========
   const { tableContext: mapManageTable } = useListPage({
     tableProps: {
+      immediate: false,
       api: getMineFileList, // 数据统计接口
       // dataSource: mockData,
       columns, // 绑定动态列
       rowKey: 'mineCode',
       formConfig: {
+        autoSearch: true,
         labelWidth: 120,
         schemas: searchFormSchema.value, // 绑定动态搜索表单
         showAdvancedButton: false,