Sfoglia il codice sorgente

[Mod 0000] 修改基本信息、模型管理页面的显示效果

ruienger 5 mesi fa
parent
commit
766cff44f0

+ 1 - 1
src/components/Loading/src/Loading.vue

@@ -57,7 +57,7 @@
     height: 100%;
     justify-content: center;
     align-items: center;
-    background-color: rgba(240, 242, 245);
+    background-color: rgba(240, 242, 245, 0.4);
 
     &.absolute {
       position: absolute;

+ 14 - 22
src/views/dashboard/basicInfo/dataQuality/dataQuality.data.ts

@@ -30,7 +30,7 @@ const formatQueJson = (queJsonStr: string) => {
     // 非数组格式处理
     if (!Array.isArray(queList)) return '问题格式异常';
     // 拼接orderNum + queCon,多个问题用分号分隔
-    return queList.map(item => `${item.orderNum || ''}:${item.queCon || ''}`).join('; ');
+    return queList.map((item) => `${item.orderNum || ''}:${item.queCon || ''}`).join('; ');
   } catch (error) {
     console.error('解析质量问题JSON失败:', error);
     return '问题数据解析失败';
@@ -42,20 +42,17 @@ const formatEmptyValue = (value: any) => {
   return value === null || value === undefined || value === '' || /^\s*$/.test(String(value));
 };
 
-
 /** 表格列配置 */
 export const columns: BasicColumn[] = [
   {
     title: '煤矿名称',
     dataIndex: 'mineName',
     width: 250,
-    customRender: ({ record }) => formatEmptyValue(record?.mineCode) ? '—' : record.mineCode,
   },
   {
     title: '煤矿简称',
     dataIndex: 'mineNameAbbr',
     width: 150,
-    customRender: ({ record }) => formatEmptyValue(record?.mineCode) ? '—' : record.mineCode,
   },
   {
     title: '生产状态',
@@ -63,7 +60,6 @@ export const columns: BasicColumn[] = [
     width: 120,
     customRender: ({ record }) => {
       // 空值处理
-      if (formatEmptyValue(record?.mineProStatus)) return '—';
       // 状态映射 + 标签渲染
       const status = String(record.mineProStatus);
       const { text, color } = productionStatusMap[status] || { text: '未知状态', color: 'gray' };
@@ -76,7 +72,6 @@ export const columns: BasicColumn[] = [
     width: 100,
     customRender: ({ record }) => {
       // 未连接/空值 显示「/」
-      if (formatEmptyValue(record?.mineLinkStatus)) return '/';
       // 状态映射 + 标签渲染
       const status = String(record.mineLinkStatus);
       const text = status === '1' ? '在线' : '离线';
@@ -102,21 +97,21 @@ export const columns: BasicColumn[] = [
             },
             title: '查看详情',
             style: {
-              padding:'5px',
-            }
+              padding: '5px',
+            },
           },
           [
             h('div', {
-            style: {
-              background: `url('/@/assets/images/basicInfo/dataQuality/icon-view.svg')`,
-              width: '16px',
-              height: '16px',
-              backgroundSize: 'contain',
-              backgroundRepeat: 'no-repeat',
-            },
-            class: 'action-icon',
-            alt: '查看详情',
-          }),
+              style: {
+                background: `url('/@/assets/images/basicInfo/dataQuality/icon-view.svg')`,
+                width: '16px',
+                height: '16px',
+                backgroundSize: 'contain',
+                backgroundRepeat: 'no-repeat',
+              },
+              class: 'action-icon',
+              alt: '查看详情',
+            }),
           ]
         ),
       ]);
@@ -126,7 +121,6 @@ export const columns: BasicColumn[] = [
     title: '当前状态',
     dataIndex: 'isOk',
     width: 100,
-    customRender: ({ record }) => formatEmptyValue(record?.mineCode) ? '—' : record.mineCode,
   },
   {
     title: '处理时间',
@@ -250,12 +244,10 @@ export const topFormSchema = [
     },
     required: true,
   },
-
 ];
 
 /** 弹框表单配置 */
-export const formSchema  = [
-
+export const formSchema = [
   {
     field: 'goafName',
     label: '工作面名称',

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

@@ -32,29 +32,24 @@ export const columns: BasicColumn[] = [
   {
     title: '煤矿编号',
     dataIndex: 'mineCode',
-    customRender: ({ record }) => formatEmptyValue(record?.mineCode) ? '—' : record.mineCode,
   },
   {
     title: '所属执法处',
     dataIndex: 'managementName',
-    customRender: ({ record }) => formatEmptyValue(record?.managementName) ? '—' : record.managementName,
   },
   {
     title: '煤矿名称',
     dataIndex: 'mineName',
-    customRender: ({ record }) => formatEmptyValue(record?.mineName) ? '—' : record.mineName,
   },
   {
     title: '煤矿简称',
     dataIndex: 'mineNameAbbr',
-    customRender: ({ record }) => formatEmptyValue(record?.mineNameAbbr) ? '—' : record.mineNameAbbr,
   },
   {
     title: '生产状态',
     dataIndex: 'productionStatus',
     customRender: ({ record }) => {
       // 空值处理
-      if (formatEmptyValue(record?.productionStatus)) return '—';
       // 状态映射 + 标签渲染
       const status = String(record.productionStatus);
       const { text, color } = productionStatusMap[status] || { text: '未知状态', color: 'gray' };
@@ -64,14 +59,12 @@ export const columns: BasicColumn[] = [
   {
     title: '自燃情况',
     dataIndex: 'riskLevel',
-    customRender: ({ record }) => formatEmptyValue(record?.riskLevel) ? '—' : record.riskLevel,
   },
   {
     title: '接入状态',
     dataIndex: 'accessStatus',
     customRender: ({ record }) => {
       // 空值处理
-      if (formatEmptyValue(record?.accessStatus)) return '—';
       // 状态映射 + 标签渲染
       const status = String(record.accessStatus);
       const text = status === '1' ? '已接入' : '未接入';
@@ -84,7 +77,6 @@ export const columns: BasicColumn[] = [
     dataIndex: 'status',
     customRender: ({ record }) => {
       // 未连接/空值 显示「/」
-      if (formatEmptyValue(record?.status)) return '/';
       // 状态映射 + 标签渲染
       const status = String(record.status);
       const text = status === '1' ? '在线' : '离线';
@@ -95,17 +87,14 @@ export const columns: BasicColumn[] = [
   {
     title: '应接数量',
     dataIndex: 'yingjieNum',
-    customRender: ({ record }) => formatEmptyValue(record?.yingjieNum) ? '—' : record.yingjieNum,
   },
   {
     title: '已接数量',
     dataIndex: 'accessGoafNum',
-    customRender: ({ record }) => formatEmptyValue(record?.accessGoafNum) ? '—' : record.accessGoafNum,
   },
   {
     title: '未接数量',
     dataIndex: 'notAccessGoafNum',
-    customRender: ({ record }) => formatEmptyValue(record?.notAccessGoafNum) ? '—' : record.notAccessGoafNum,
   },
 ];
 
@@ -232,4 +221,4 @@ export const minesData = [
     accessGoafNum: '   ',
     notAccessGoafNum: undefined,
   },
-];
+];

+ 3 - 3
src/views/system/algorithm/algorithm.data.ts

@@ -74,9 +74,9 @@ export const columnsGoafLimit: BasicColumn[] = [
 
 export const searchFormSchema: FormSchema[] = [
   {
-    label: '姓名',
-    field: 'realname',
-    component: 'Input',
+    label: '煤矿名称',
+    field: 'mineCode',
+    component: 'MineCascader',
     colProps: { span: 6 },
   },
 ];

+ 5 - 10
src/views/system/algorithm/index.vue

@@ -4,13 +4,13 @@
     <!-- <EnfMineTree class="flex-grow-1" @select="onTreeSelect" /> -->
     <!--引用表格-->
     <BasicTable class="flex-grow-1" :expandedRowKeys="expandedRowKeys" :ellipsis="true" @register="registerTable">
-      <template #formTitle>
-        <!-- <a-button type="primary" @click="handleEdit({}, 'coal')">
+      <!-- <template #formTitle>
+        <a-button type="primary" @click="handleEdit({}, 'coal')">
           <PlusOutlined />
           新增
-        </a-button> -->
+        </a-button>
         矿区CODE级联选择器占位符
-      </template>
+      </template> -->
       <template #expandedRowRender>
         <BasicTable @register="registerInnerTable">
           <template #action="{ record }">
@@ -107,8 +107,6 @@
   const { prefixCls } = useDesign('algorithm-list');
   provide('prefixCls', prefixCls);
 
-  // 当前选中的矿区code
-  const mineCode = ref('');
   // 为了更好的控制展开逻辑
   const expandedRowKeys = ref<string[]>([]);
 
@@ -122,9 +120,7 @@
       formConfig: {
         showResetButton: false,
         schemas: searchFormSchema,
-      },
-      beforeFetch(p) {
-        p.mineCode = mineCode.value;
+        schemaGroupNames: ['常规查询'],
       },
       onExpand(expanded, record) {
         // 展开最多一行
@@ -151,7 +147,6 @@
       slots: { customRender: 'action' },
     },
     beforeFetch(p) {
-      p.mineCode = mineCode.value;
       p.coalSeamId = expandedRowKeys.value[0];
     },
   });