Преглед изворни кода

[Feat 0000] 数据质量重对接

houzekong пре 1 месец
родитељ
комит
a2ac4f4dc0

+ 11 - 5
src/views/dashboard/basicInfo/basicInfo.api.ts

@@ -7,6 +7,7 @@ enum Api {
   getGoafAccessCount = '/ventanaly-province/province/mineData/getGoafAccessCount',
   // 数据质量
   getDataQuaQueList = '/ventanaly-province/province/dataQuaQue/list',
+  getMineDataQuality = '/ventanaly-province/province/mineData/getMineDataQuality',
   addDataQuaQue = '/ventanaly-province/province/dataQuaQue/add',
   deleteDataQuaQue = '/ventanaly-province/province/dataQuaQue/delete',
   editDataQuaQue = '/ventanaly-province/province/dataQuaQue/edit',
@@ -42,11 +43,16 @@ export const getGoafAccessCount = (params) =>
  * @param params
  */
 export const getDataQuaQueList = (params) =>
-  defHttp.get({
-    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
-    url: Api.getDataQuaQueList,
-    params,
-  });
+  defHttp.post(
+    {
+      // headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
+      url: Api.getMineDataQuality,
+      params,
+    },
+    {
+      joinParamsToUrl: true,
+    }
+  );
 
 /**
  * 新增质量问题

+ 51 - 31
src/views/dashboard/basicInfo/dataQuality/dataQuality.data.ts

@@ -1,5 +1,5 @@
 import { BasicColumn, FormSchema } from '/@/components/Table';
-import { h } from 'vue';
+// import { h } from 'vue';
 // import { Ref } from 'vue';
 // import dayjs from 'dayjs';
 
@@ -34,7 +34,7 @@ export const columns: BasicColumn[] = [
     title: '煤矿简称',
     dataIndex: 'mineNameAbbr',
     width: 150,
-    ifShow: false,
+    // ifShow: false,
   },
   {
     title: '生产状态',
@@ -57,42 +57,62 @@ export const columns: BasicColumn[] = [
     // },
   },
   {
-    title: '在线状态',
-    dataIndex: 'mineLinkStatus',
-    width: 100,
-    customRender: ({ record }) => {
-      const status = record.mineLinkStatus;
-      if (status === undefined || status === null) {
-        return h('span', { style: { color: colorHexMap.black } }, '-');
-      }
-      const text = status === 1 ? '在线' : '离线';
-      const textColor = status === 1 ? colorHexMap.green : colorHexMap.red;
-      return h('span', { style: { color: textColor } }, text);
-    },
+    title: '定义数据错误',
+    dataIndex: 'cddyError',
+    width: 200,
   },
   {
-    title: '质量问题详情',
-    dataIndex: 'queJson',
-    width: 400,
-    ellipsis: true,
-    slots: { customRender: 'queJson' },
+    title: '最近定义数据错误时间',
+    dataIndex: 'lastCddyTime',
+    width: 200,
   },
   {
-    title: '当前状态',
-    dataIndex: 'isOk',
-    width: 100,
-    customRender: ({ record }) => {
-      const status = record.isOk;
-      const text = status ? '已解决' : '未解决';
-      const textColor = status ? colorHexMap.green : colorHexMap.red;
-      return h('span', { style: { color: textColor } }, text);
-    },
+    title: '实时数据错误',
+    dataIndex: 'cdssError',
+    width: 200,
   },
   {
-    title: '处理时间',
-    dataIndex: 'updateTime',
-    width: 180,
+    title: '最近实时数据错误时间',
+    dataIndex: 'lastCdssTime',
+    width: 200,
   },
+  // {
+  //   title: '在线状态',
+  //   dataIndex: 'mineLinkStatus',
+  //   width: 100,
+  //   customRender: ({ record }) => {
+  //     const status = record.mineLinkStatus;
+  //     if (status === undefined || status === null) {
+  //       return h('span', { style: { color: colorHexMap.black } }, '-');
+  //     }
+  //     const text = status === 1 ? '在线' : '离线';
+  //     const textColor = status === 1 ? colorHexMap.green : colorHexMap.red;
+  //     return h('span', { style: { color: textColor } }, text);
+  //   },
+  // },
+  // {
+  //   title: '质量问题详情',
+  //   dataIndex: 'queJson',
+  //   width: 400,
+  //   ellipsis: true,
+  //   slots: { customRender: 'queJson' },
+  // },
+  // {
+  //   title: '当前状态',
+  //   dataIndex: 'isOk',
+  //   width: 100,
+  //   customRender: ({ record }) => {
+  //     const status = record.isOk;
+  //     const text = status ? '已解决' : '未解决';
+  //     const textColor = status ? colorHexMap.green : colorHexMap.red;
+  //     return h('span', { style: { color: textColor } }, text);
+  //   },
+  // },
+  // {
+  //   title: '处理时间',
+  //   dataIndex: 'updateTime',
+  //   width: 180,
+  // },
 ];
 
 // 4. 查询表单配置(下拉框改为动态options)