ソースを参照

[Wip 0000] 接口对接

houzekong 1 ヶ月 前
親
コミット
422f8ccb6a

+ 3 - 0
src/components/Form/src/jeecg/components/MineCascader/MineCascader.vue

@@ -2,6 +2,7 @@
   <Cascader
     :value="innerValue"
     :options="options"
+    :disabled="disabled"
     placeholder="全部"
     :field-names="{
       label: 'departName',
@@ -44,6 +45,8 @@
     props: {
       value: propTypes.string.def(''),
       placeholder: propTypes.string.def('全部'),
+      /** 是否禁用选择(编辑态锁定矿井时由表单 dynamicDisabled 传入) */
+      disabled: propTypes.bool.def(false),
       /** 根节点ID,如果传入,组件将过滤该节点下的节点 */
       rootId: propTypes.string,
       /** 是否从已存储的信息中初始化组件值 */

+ 10 - 0
src/views/analysis/warningAnalysis/globalAlarm/globalAlarm.data.ts

@@ -48,6 +48,11 @@ export const columns: BasicColumn[] = [
     dataIndex: 'expectVal',
     width: 100,
   },
+  {
+    title: '风速波动',
+    dataIndex: 'vaChange',
+    width: 100,
+  },
   {
     title: '报警时间',
     dataIndex: 'createTime',
@@ -79,6 +84,11 @@ export const historyColumns: BasicColumn[] = [
     dataIndex: 'expectVal',
     width: 100,
   },
+  {
+    title: '风速波动',
+    dataIndex: 'vaChange',
+    width: 100,
+  },
   {
     title: '报警时间',
     dataIndex: 'createTime',

+ 5 - 4
src/views/analysis/warningAnalysis/windPointManage/index.vue

@@ -119,10 +119,11 @@
             colProps: { span: 10 },
             componentProps: {
               options: [
-                { label: '省局', value: 1 },
-                { label: '执法处', value: 2 },
-                { label: '煤矿', value: 3 },
-                { label: '测风点', value: 4 },
+                { label: '矿井进风', value: 1 },
+                { label: '采区进风', value: 2 },
+                { label: '采区用风', value: 3 },
+                { label: '采区回风', value: 4 },
+                { label: '矿井回风', value: 5 },
               ],
             },
           },

+ 12 - 8
src/views/analysis/warningAnalysis/windPointManage/windPointManage.data.ts

@@ -33,10 +33,11 @@ export const pointColumns: BasicColumn[] = [
     width: 100,
     customRender: ({ text }) => {
       const map: Record<number, string> = {
-        1: '省局',
-        2: '执法处',
-        3: '煤矿',
-        4: '测风点',
+        1: '矿井进风',
+        2: '采区进风',
+        3: '采区用风',
+        4: '采区回风',
+        5: '矿井回风',
       };
       return map[text] || text;
     },
@@ -126,6 +127,8 @@ export const formSchema: FormSchema[] = [
     field: 'mineCode',
     component: 'MineCascader',
     required: true,
+    // 编辑态(已有 id)禁用矿编码,避免误改归属矿井;新增态保持可选
+    dynamicDisabled: ({ values }) => !!values.id,
     componentProps: {
       placeholder: '请输入煤矿编号',
     },
@@ -146,10 +149,11 @@ export const formSchema: FormSchema[] = [
     componentProps: {
       placeholder: '请选择层级',
       options: [
-        { label: '省局', value: 1 },
-        { label: '执法处', value: 2 },
-        { label: '煤矿', value: 3 },
-        { label: '测风点', value: 4 },
+        { label: '矿井进风', value: 1 },
+        { label: '采区进风', value: 2 },
+        { label: '采区用风', value: 3 },
+        { label: '采区回风', value: 4 },
+        { label: '矿井回风', value: 5 },
       ],
     },
   },

+ 2 - 2
src/views/analysis/warningAnalysis/windPointManage/windTopology/windTopology.data.ts

@@ -176,12 +176,12 @@ export function collectOrgSubtree(depart?: any): OrgPathNode[] {
   return result;
 }
 
-/** API -> MineArea(测风点位,level=4 为测风点) */
+/** API -> MineArea(测风点位,level 为通风类型层级) */
 export interface MineAreaNode {
   id: string;
   mineCode: string;
   name: string;
-  level: number; // 1=省局 2=执法处 3=煤矿 4=测风点
+  level: number; // 1=矿井进风 2=采区进风 3=采区用风 4=采区回风 5=矿井回风
   airVolume: number;
   regulationId?: string;
   windrectId?: string;

+ 2 - 1
src/views/dashboard/HiddenSurface/index.vue

@@ -94,7 +94,8 @@
   });
 
   // ===== 枚举映射(CustomTable 仅展示文本,状态/结果预先转换为文案)=====
-  const windrectStatusMap: Record<string, string> = { '0': '正常', '128': '传感器故障' };
+  // WindrectData.status:1正常、0已删除
+  const windrectStatusMap: Record<string, string> = { '1': '正常', '0': '已删除' };
   const judgeResultMap: Record<string, string> = { '0': '数据不足', '1': '疑似', '2': '正常' };
   const m3ClosedMap: Record<string, string> = { '0': '数据不足', '1': '不闭合', '2': '闭合' };
 

+ 1 - 1
src/views/dashboard/basicInfo/basicInfo.api.ts

@@ -4,7 +4,7 @@ enum Api {
   // 矿山信息
   getMineData = '/workingface/mineData/getMineData',
   // 接入统计
-  getGoafAccessCount = '/ventanaly-province/province/mineData/getGoafAccessCount',
+  getGoafAccessCount = '/workingface/mineData/getMineAccessCount',
   // 数据质量
   getDataQuaQueList = '/ventanaly-province/province/dataQuaQue/list',
   getMineDataQuality = '/ventanaly-province/province/mineData/getMineDataQuality',

+ 4 - 4
src/views/monitor/sensorMonitor/sensorMonitor.data.ts

@@ -12,10 +12,10 @@ export const boardData = [
   { label: '风量异常报警', value: '-' },
 ];
 
-/** 数据状态映射(WindrectData.status:0正常、128传感器故障) */
+/** 数据状态映射(WindrectData.status:1正常、0已删除) */
 export const statusMap: Record<string, string> = {
-  '0': '正常',
-  '128': '传感器故障',
+  '1': '正常',
+  '0': '已删除',
 };
 
 /** 风速风量实时监测表格列(WindrectData) */
@@ -62,7 +62,7 @@ export const columns: BasicColumn[] = [
     width: 110,
     customRender: ({ text }) => {
       const label = statusMap[String(text)] ?? '-';
-      const color = String(text) === '0' ? StatusColorEnum.green : StatusColorEnum.red;
+      const color = String(text) === '1' ? StatusColorEnum.green : StatusColorEnum.red;
       return h('span', { style: { color, fontWeight: 'bold' } }, label);
     },
   },