Browse Source

1. 解决巷道设备监测页面,人员定位搜索框实时加载数据时清空输入框正在输入内容的bug
2. 布尔台人员定位部门查询数据接口对接

hongrunxia 9 months ago
parent
commit
aa5e2d1b4b

+ 1 - 0
src/components/Form/src/BasicForm.vue

@@ -130,6 +130,7 @@
       const getBindValue = computed(() => ({ ...attrs, ...props, ...unref(getProps) }) as Recordable);
 
       const getSchema = computed((): FormSchema[] => {
+        debugger;
         const schemas: FormSchema[] = unref(schemaRef) || (unref(getProps).schemas as any);
         for (const schema of schemas) {
           const { defaultValue, component, componentProps } = schema;

+ 1 - 1
src/components/Form/src/components/ApiSelect.vue

@@ -113,7 +113,7 @@
         },
         { deep: true }
       );
-     //监听数值修改,查询数据
+      //监听数值修改,查询数据
       watchEffect(() => {
         props.value && handleFetch();
       });

+ 5 - 3
src/components/Form/src/hooks/useAutoFocus.ts

@@ -13,13 +13,15 @@ interface UseAutoFocusContext {
 }
 export async function useAutoFocus({ getSchema, getProps, formElRef, isInitedDefault }: UseAutoFocusContext) {
   watchEffect(async () => {
-    if (unref(isInitedDefault) || !unref(getProps).autoFocusFirstItem) {
-      return;
-    }
+    debugger;
+    // if (unref(isInitedDefault) || !unref(getProps).autoFocusFirstItem) {
+    //   return;
+    // }
     await nextTick();
     const schemas = unref(getSchema);
     const formEl = unref(formElRef);
     const el = (formEl as any)?.$el as HTMLElement;
+
     if (!formEl || !el || !schemas || schemas.length === 0) {
       return;
     }

+ 1547 - 30
src/components/Form/src/jeecg/components/MTreeSelect.vue

@@ -1,8 +1,12 @@
 <template>
-  <a-tree-select class="tree-select" allowClear style="width: 100%" :virtual="virtual" :multiple="multiple"
+  <a-tree-select v-if="isGetPopupContainer" class="tree-select" allowClear style="width: 100%" :virtual="virtual" :multiple="multiple"
     :showSearch="false" :getPopupContainer="(node) => node.parentNode"
     :dropdownStyle="{ maxHeight: '400px', overflow: 'auto', zIndex: 99999 }" :placeholder="placeholder"
     :treeData="treeData" :value="treeValue" :field-names="fieldNames" @change="onChange" @search="onSearch" />
+  <a-tree-select v-else class="tree-select" allowClear style="width: 100%" :virtual="virtual" :multiple="multiple"
+    :showSearch="false"
+    :dropdownStyle="{ maxHeight: '400px', overflow: 'auto', zIndex: 99999 }" :placeholder="placeholder"
+    :treeData="treeData" :value="treeValue" :field-names="fieldNames" @change="onChange" @search="onSearch" />
 </template>
 <script lang="ts" setup>
   /*
@@ -28,7 +32,8 @@
     reload: propTypes.number.def(1),
     isSearch: propTypes.bool.def(true),
     virtual: propTypes.bool.def(true),
-    api: propTypes.string.def('')
+    api: propTypes.string.def(''),
+    isGetPopupContainer:propTypes.bool.def(true),
   });
   const emit = defineEmits(['change', 'update:value']);
   const { createMessage } = useMessage();
@@ -74,35 +79,1547 @@
         treeData.value = treeDataValue;
       }
     }else{
-      
-      // try {
-      //   let res = await defHttp.get({ url: props.api, params });
-      //   if (res && res.success) {
-      //     const result = res.result
-      //     const datas = []
-      //     for (const key in result) {
-      //       datas.push(result[key])
-      //     }
-      //     const { buildTree } = toTree('id', 'parentId', 'name')
-      //     const treeDataList: any = buildTree(datas)
-      //     treeData.value = treeDataList;
-      //   }
-      // } catch (error) {
-      //   const datas = []
-      //   for (const key in result) {
-      //     datas.push(result[key])
-      //   }
-      //   const { buildTree } = toTree('id', 'parentId', 'name')
-      //   const treeDataList: any = buildTree(datas)
-      //   treeData.value = treeDataList;  
-      // }
-      const datas = []
-      for (const key in result) {
-        datas.push(result[key])
+      try {
+        let result;
+        const res = await defHttp.get({ url: props.api, params });
+        if (res && res.success) {
+          result = res.result
+        }else if(res){
+          result = res
+        }
+
+          result = {
+  "1": {
+    "leader": "",
+    "parentDepartment": "",
+    "departmentTypeId": "0",
+    "parentId": "0",
+    "number": "75",
+    "path": ",1,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "布尔台煤矿",
+    "departmentTypeName": "其他部门",
+    "id": "1",
+    "position": "1",
+    "companyUnitId": "1"
+  },
+  "2": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "21224",
+    "path": ",1,2,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "行政办",
+    "departmentTypeName": "其他部门",
+    "id": "2",
+    "position": "10",
+    "companyUnitId": "1"
+  },
+  "3": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "0",
+    "path": ",1,3,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "矿领导",
+    "departmentTypeName": "其他部门",
+    "id": "3",
+    "position": "2",
+    "companyUnitId": "1"
+  },
+  "5": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "86",
+    "path": ",1,5,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "经营办",
+    "departmentTypeName": "其他部门",
+    "id": "5",
+    "position": "9",
+    "companyUnitId": "1"
+  },
+  "6": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "0",
+    "path": ",1,6,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "安全监察管理办公室",
+    "departmentTypeName": "其他部门",
+    "id": "6",
+    "position": "5",
+    "companyUnitId": "1"
+  },
+  "7": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "81",
+    "path": ",1,7,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "生产办",
+    "departmentTypeName": "其他部门",
+    "id": "7",
+    "position": "8",
+    "companyUnitId": "1"
+  },
+  "8": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "0",
+    "path": ",1,8,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "调度指挥中心",
+    "departmentTypeName": "其他部门",
+    "id": "8",
+    "position": "4",
+    "companyUnitId": "1"
+  },
+  "9": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "87",
+    "path": ",1,9,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "综采一队",
+    "departmentTypeName": "其他部门",
+    "id": "9",
+    "position": "13",
+    "companyUnitId": "1"
+  },
+  "10": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "82",
+    "path": ",1,10,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "机电办",
+    "departmentTypeName": "其他部门",
+    "id": "10",
+    "position": "11",
+    "companyUnitId": "1"
+  },
+  "11": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "88",
+    "path": ",1,11,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "综采二队",
+    "departmentTypeName": "其他部门",
+    "id": "11",
+    "position": "14",
+    "companyUnitId": "1"
+  },
+  "12": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "10220",
+    "path": ",1,12,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "综采三队",
+    "departmentTypeName": "其他部门",
+    "id": "12",
+    "position": "15",
+    "companyUnitId": "1"
+  },
+  "13": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "89",
+    "path": ",1,13,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "掘锚一队",
+    "departmentTypeName": "其他部门",
+    "id": "13",
+    "position": "16",
+    "companyUnitId": "1"
+  },
+  "14": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "10213",
+    "path": ",1,14,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "掘锚二队",
+    "departmentTypeName": "其他部门",
+    "id": "14",
+    "position": "17",
+    "companyUnitId": "1"
+  },
+  "15": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "10317",
+    "path": ",1,15,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "掘锚三队",
+    "departmentTypeName": "其他部门",
+    "id": "15",
+    "position": "18",
+    "companyUnitId": "1"
+  },
+  "16": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "10302",
+    "path": ",1,16,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "掘锚六队",
+    "departmentTypeName": "其他部门",
+    "id": "16",
+    "position": "20",
+    "companyUnitId": "1"
+  },
+  "18": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "10217",
+    "path": ",1,18,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "通风队",
+    "departmentTypeName": "其他部门",
+    "id": "18",
+    "position": "27",
+    "companyUnitId": "1"
+  },
+  "19": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "10214",
+    "path": ",1,19,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "运转一队",
+    "departmentTypeName": "其他部门",
+    "id": "19",
+    "position": "22",
+    "companyUnitId": "1"
+  },
+  "20": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "10215",
+    "path": ",1,20,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "运转二队",
+    "departmentTypeName": "其他部门",
+    "id": "20",
+    "position": "23",
+    "companyUnitId": "1"
+  },
+  "21": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "10216",
+    "path": ",1,21,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "机电一队",
+    "departmentTypeName": "其他部门",
+    "id": "21",
+    "position": "24",
+    "companyUnitId": "1"
+  },
+  "24": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "84",
+    "path": ",1,24,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "车队",
+    "departmentTypeName": "其他部门",
+    "id": "24",
+    "position": "30",
+    "companyUnitId": "1"
+  },
+  "25": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "10352",
+    "path": ",1,25,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "砼底板队",
+    "departmentTypeName": "其他部门",
+    "id": "25",
+    "position": "31",
+    "companyUnitId": "1"
+  },
+  "26": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "21228",
+    "path": ",1,26,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "准备二队",
+    "departmentTypeName": "其他部门",
+    "id": "26",
+    "position": "32",
+    "companyUnitId": "1"
+  },
+  "28": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "21044",
+    "path": ",1,28,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "掘锚五队",
+    "departmentTypeName": "其他部门",
+    "id": "28",
+    "position": "19",
+    "companyUnitId": "1"
+  },
+  "29": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "25539",
+    "path": ",1,29,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "党委办",
+    "departmentTypeName": "其他部门",
+    "id": "29",
+    "position": "33",
+    "companyUnitId": "1"
+  },
+  "30": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "24829",
+    "path": ",1,30,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "工程队",
+    "departmentTypeName": "其他部门",
+    "id": "30",
+    "position": "37",
+    "companyUnitId": "1"
+  },
+  "31": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "24823",
+    "path": ",1,31,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "安装队",
+    "departmentTypeName": "其他部门",
+    "id": "31",
+    "position": "29",
+    "companyUnitId": "1"
+  },
+  "32": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "24824",
+    "path": ",1,32,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "钻探准备队",
+    "departmentTypeName": "其他部门",
+    "id": "32",
+    "position": "39",
+    "companyUnitId": "1"
+  },
+  "34": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "25824",
+    "path": ",1,34,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "机电二队",
+    "departmentTypeName": "其他部门",
+    "id": "34",
+    "position": "25",
+    "companyUnitId": "1"
+  },
+  "35": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "0",
+    "path": ",1,35,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "掘锚七队",
+    "departmentTypeName": "其他部门",
+    "id": "35",
+    "position": "21",
+    "companyUnitId": "1"
+  },
+  "162": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "9305",
+    "path": ",311,162,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-[地]安管办",
+    "departmentTypeName": "其他部门",
+    "id": "162",
+    "position": "194",
+    "companyUnitId": "1"
+  },
+  "164": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "9306",
+    "path": ",311,164,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-[地]钻探队",
+    "departmentTypeName": "其他部门",
+    "id": "164",
+    "position": "195",
+    "companyUnitId": "1"
+  },
+  "167": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "20903",
+    "path": ",311,167,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-[地]物探队",
+    "departmentTypeName": "其他部门",
+    "id": "167",
+    "position": "196",
+    "companyUnitId": "1"
+  },
+  "169": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "21896",
+    "path": ",311,169,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-[地]大柳塔站",
+    "departmentTypeName": "其他部门",
+    "id": "169",
+    "position": "197",
+    "companyUnitId": "1"
+  },
+  "170": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "21897",
+    "path": ",311,170,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-[地]补连塔站",
+    "departmentTypeName": "其他部门",
+    "id": "170",
+    "position": "198",
+    "companyUnitId": "1"
+  },
+  "171": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "21898",
+    "path": ",311,171,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-[地]上湾站",
+    "departmentTypeName": "其他部门",
+    "id": "171",
+    "position": "199",
+    "companyUnitId": "1"
+  },
+  "172": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "21899",
+    "path": ",311,172,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-[地]哈拉沟站",
+    "departmentTypeName": "其他部门",
+    "id": "172",
+    "position": "200",
+    "companyUnitId": "1"
+  },
+  "173": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "21900",
+    "path": ",311,173,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-[地]石圪台站",
+    "departmentTypeName": "其他部门",
+    "id": "173",
+    "position": "201",
+    "companyUnitId": "1"
+  },
+  "175": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "21902",
+    "path": ",311,175,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-[地]锦界站",
+    "departmentTypeName": "其他部门",
+    "id": "175",
+    "position": "202",
+    "companyUnitId": "1"
+  },
+  "185": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "21912",
+    "path": ",311,185,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-[地]榆家梁站",
+    "departmentTypeName": "其他部门",
+    "id": "185",
+    "position": "203",
+    "companyUnitId": "1"
+  },
+  "276": {
+    "leader": "",
+    "parentDepartment": "",
+    "departmentTypeId": "0",
+    "parentId": "0",
+    "number": "0",
+    "path": ",276,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "贵宾",
+    "departmentTypeName": "其他部门",
+    "id": "276",
+    "position": "298",
+    "companyUnitId": "1"
+  },
+  "284": {
+    "leader": "李政15",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "0",
+    "path": ",1,284,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "智能运维队",
+    "departmentTypeName": "其他部门",
+    "id": "284",
+    "position": "28",
+    "companyUnitId": "1"
+  },
+  "285": {
+    "leader": "",
+    "parentDepartment": "",
+    "departmentTypeId": "0",
+    "parentId": "0",
+    "number": "0",
+    "path": ",285,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "本矿车辆",
+    "departmentTypeName": "其他部门",
+    "id": "285",
+    "position": "294",
+    "companyUnitId": "1"
+  },
+  "288": {
+    "leader": "",
+    "parentDepartment": "",
+    "departmentTypeId": "0",
+    "parentId": "0",
+    "number": "0",
+    "path": ",288,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "外委车辆",
+    "departmentTypeName": "其他部门",
+    "id": "288",
+    "position": "295",
+    "companyUnitId": "1"
+  },
+  "311": {
+    "leader": "",
+    "parentDepartment": "",
+    "departmentTypeId": "0",
+    "parentId": "0",
+    "number": "0",
+    "path": ",311,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司",
+    "departmentTypeName": "其他部门",
+    "id": "311",
+    "position": "163",
+    "companyUnitId": "1"
+  },
+  "380": {
+    "leader": "白国勇",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "0",
+    "path": ",1,380,",
+    "companyUnit": "本矿",
+    "telphone": "18047388802",
+    "name": "车辆管理组",
+    "departmentTypeName": "其他部门",
+    "id": "380",
+    "position": "12",
+    "companyUnitId": "1"
+  },
+  "393": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "15011",
+    "path": ",311,393,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-[地]布尔台站",
+    "departmentTypeName": "其他部门",
+    "id": "393",
+    "position": "193",
+    "companyUnitId": "1"
+  },
+  "399": {
+    "leader": "高平",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "0",
+    "path": ",1,399,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地质防治水办",
+    "departmentTypeName": "其他部门",
+    "id": "399",
+    "position": "3",
+    "companyUnitId": "1"
+  },
+  "400": {
+    "leader": "任建慧33",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "0",
+    "path": ",1,400,",
+    "companyUnit": "本矿",
+    "telphone": "18047388848",
+    "name": "矿压办",
+    "departmentTypeName": "其他部门",
+    "id": "400",
+    "position": "7",
+    "companyUnitId": "1"
+  },
+  "402": {
+    "leader": "潘吉成",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "0",
+    "path": ",1,402,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "通风办",
+    "departmentTypeName": "其他部门",
+    "id": "402",
+    "position": "6",
+    "companyUnitId": "1"
+  },
+  "405": {
+    "leader": "",
+    "parentDepartment": "",
+    "departmentTypeId": "0",
+    "parentId": "0",
+    "number": "0",
+    "path": ",405,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "核算中心",
+    "departmentTypeName": "其他部门",
+    "id": "405",
+    "position": "277",
+    "companyUnitId": "1"
+  },
+  "406": {
+    "leader": "",
+    "parentDepartment": "核算中心",
+    "departmentTypeId": "0",
+    "parentId": "405",
+    "number": "100",
+    "path": ",405,406,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "核算中心-中心领导",
+    "departmentTypeName": "其他部门",
+    "id": "406",
+    "position": "289",
+    "companyUnitId": "1"
+  },
+  "412": {
+    "leader": "",
+    "parentDepartment": "核算中心",
+    "departmentTypeId": "0",
+    "parentId": "405",
+    "number": "100",
+    "path": ",405,412,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "核算中心-寸草塔二矿",
+    "departmentTypeName": "其他部门",
+    "id": "412",
+    "position": "288",
+    "companyUnitId": "1"
+  },
+  "413": {
+    "leader": "",
+    "parentDepartment": "核算中心",
+    "departmentTypeId": "0",
+    "parentId": "405",
+    "number": "101",
+    "path": ",405,413,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "核算中心-寸草塔二矿财务科",
+    "departmentTypeName": "其他部门",
+    "id": "413",
+    "position": "287",
+    "companyUnitId": "1"
+  },
+  "414": {
+    "leader": "",
+    "parentDepartment": "核算中心",
+    "departmentTypeId": "0",
+    "parentId": "405",
+    "number": "102",
+    "path": ",405,414,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "核算中心-大柳塔煤矿财务科",
+    "departmentTypeName": "其他部门",
+    "id": "414",
+    "position": "286",
+    "companyUnitId": "1"
+  },
+  "415": {
+    "leader": "",
+    "parentDepartment": "核算中心",
+    "departmentTypeId": "0",
+    "parentId": "405",
+    "number": "103",
+    "path": ",405,415,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "核算中心-哈拉沟煤矿财务科",
+    "departmentTypeName": "其他部门",
+    "id": "415",
+    "position": "285",
+    "companyUnitId": "1"
+  },
+  "416": {
+    "leader": "",
+    "parentDepartment": "核算中心",
+    "departmentTypeId": "0",
+    "parentId": "405",
+    "number": "104",
+    "path": ",405,416,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "核算中心-锦界煤矿管理处财务科",
+    "departmentTypeName": "其他部门",
+    "id": "416",
+    "position": "284",
+    "companyUnitId": "1"
+  },
+  "417": {
+    "leader": "",
+    "parentDepartment": "核算中心",
+    "departmentTypeId": "0",
+    "parentId": "405",
+    "number": "105",
+    "path": ",405,417,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "核算中心-上湾煤矿财务科",
+    "departmentTypeName": "其他部门",
+    "id": "417",
+    "position": "283",
+    "companyUnitId": "1"
+  },
+  "418": {
+    "leader": "",
+    "parentDepartment": "核算中心",
+    "departmentTypeId": "0",
+    "parentId": "405",
+    "number": "106",
+    "path": ",405,418,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "核算中心-神东露天煤矿财务科",
+    "departmentTypeName": "其他部门",
+    "id": "418",
+    "position": "282",
+    "companyUnitId": "1"
+  },
+  "419": {
+    "leader": "",
+    "parentDepartment": "核算中心",
+    "departmentTypeId": "0",
+    "parentId": "405",
+    "number": "107",
+    "path": ",405,419,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "核算中心-乌兰木伦矿财务科",
+    "departmentTypeName": "其他部门",
+    "id": "419",
+    "position": "281",
+    "companyUnitId": "1"
+  },
+  "420": {
+    "leader": "",
+    "parentDepartment": "核算中心",
+    "departmentTypeId": "0",
+    "parentId": "405",
+    "number": "108",
+    "path": ",405,420,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "核算中心-驻大柳塔煤矿财务科",
+    "departmentTypeName": "其他部门",
+    "id": "420",
+    "position": "280",
+    "companyUnitId": "1"
+  },
+  "467": {
+    "leader": "",
+    "parentDepartment": "核算中心",
+    "departmentTypeId": "0",
+    "parentId": "405",
+    "number": "0",
+    "path": ",405,467,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "核算中心-补连塔财务科",
+    "departmentTypeName": "其他部门",
+    "id": "467",
+    "position": "279",
+    "companyUnitId": "1"
+  },
+  "469": {
+    "leader": "",
+    "parentDepartment": "核算中心",
+    "departmentTypeId": "0",
+    "parentId": "405",
+    "number": "0",
+    "path": ",405,469,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "核算中心--驻布尔台矿财务科",
+    "departmentTypeName": "其他部门",
+    "id": "469",
+    "position": "278",
+    "companyUnitId": "1"
+  },
+  "470": {
+    "leader": "张新祯25",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "0",
+    "path": ",1,470,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "巷道维修队",
+    "departmentTypeName": "其他部门",
+    "id": "470",
+    "position": "34",
+    "companyUnitId": "1"
+  },
+  "471": {
+    "leader": "",
+    "parentDepartment": "",
+    "departmentTypeId": "0",
+    "parentId": "0",
+    "number": "0",
+    "path": ",471,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "生产服务中心车队",
+    "departmentTypeName": "其他部门",
+    "id": "471",
+    "position": "291",
+    "companyUnitId": "1"
+  },
+  "489": {
+    "leader": "",
+    "parentDepartment": "",
+    "departmentTypeId": "0",
+    "parentId": "0",
+    "number": "0",
+    "path": ",489,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "布尔台煤矿-[地]布尔台站",
+    "departmentTypeName": "其他部门",
+    "id": "489",
+    "position": "297",
+    "companyUnitId": "1"
+  },
+  "499": {
+    "leader": "姚涛",
+    "parentDepartment": "开拓准备中心",
+    "departmentTypeId": "0",
+    "parentId": "310",
+    "number": "0",
+    "path": ",310,499,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "综掘六队",
+    "departmentTypeName": "作业部门",
+    "id": "499",
+    "position": "42",
+    "companyUnitId": "1"
+  },
+  "501": {
+    "leader": "郝斌",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "0",
+    "path": ",1,501,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "机电三队",
+    "departmentTypeName": "作业部门",
+    "id": "501",
+    "position": "26",
+    "companyUnitId": "1"
+  },
+  "503": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "0",
+    "path": ",1,503,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "中铁十一局",
+    "departmentTypeName": "其他部门",
+    "id": "503",
+    "position": "40",
+    "companyUnitId": "1"
+  },
+  "524": {
+    "leader": "",
+    "parentDepartment": "",
+    "departmentTypeId": "0",
+    "parentId": "0",
+    "number": "0",
+    "path": ",524,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "专业化单位",
+    "departmentTypeName": "作业部门",
+    "id": "524",
+    "position": "301",
+    "companyUnitId": "1"
+  },
+  "525": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "0",
+    "path": ",1,525,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "准备三队",
+    "departmentTypeName": "其他部门",
+    "id": "525",
+    "position": "35",
+    "companyUnitId": "1"
+  },
+  "536": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200111",
+    "path": ",311,536,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-地测领导",
+    "departmentTypeName": "其他部门",
+    "id": "536",
+    "position": "192",
+    "companyUnitId": "1"
+  },
+  "537": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200112",
+    "path": ",311,537,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-党委办公室?(行政办公室)",
+    "departmentTypeName": "其他部门",
+    "id": "537",
+    "position": "191",
+    "companyUnitId": "1"
+  },
+  "538": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200113",
+    "path": ",311,538,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-经营办公室",
+    "departmentTypeName": "其他部门",
+    "id": "538",
+    "position": "190",
+    "companyUnitId": "1"
+  },
+  "539": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200114",
+    "path": ",311,539,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-生产技术办公室",
+    "departmentTypeName": "其他部门",
+    "id": "539",
+    "position": "189",
+    "companyUnitId": "1"
+  },
+  "540": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200115",
+    "path": ",311,540,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-安全监察管理办公室",
+    "departmentTypeName": "其他部门",
+    "id": "540",
+    "position": "188",
+    "companyUnitId": "1"
+  },
+  "541": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200116",
+    "path": ",311,541,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-设备管理办公室",
+    "departmentTypeName": "其他部门",
+    "id": "541",
+    "position": "187",
+    "companyUnitId": "1"
+  },
+  "542": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200117",
+    "path": ",311,542,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-大柳塔地测站",
+    "departmentTypeName": "其他部门",
+    "id": "542",
+    "position": "186",
+    "companyUnitId": "1"
+  },
+  "543": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200119",
+    "path": ",311,543,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-补连塔地测站",
+    "departmentTypeName": "其他部门",
+    "id": "543",
+    "position": "185",
+    "companyUnitId": "1"
+  },
+  "544": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200120",
+    "path": ",311,544,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-布尔台地测站",
+    "departmentTypeName": "其他部门",
+    "id": "544",
+    "position": "184",
+    "companyUnitId": "1"
+  },
+  "545": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200121",
+    "path": ",311,545,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-锦界地测站",
+    "departmentTypeName": "其他部门",
+    "id": "545",
+    "position": "183",
+    "companyUnitId": "1"
+  },
+  "546": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200122",
+    "path": ",311,546,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-哈拉沟地测站",
+    "departmentTypeName": "其他部门",
+    "id": "546",
+    "position": "182",
+    "companyUnitId": "1"
+  },
+  "547": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200124",
+    "path": ",311,547,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-石圪台地测站",
+    "departmentTypeName": "其他部门",
+    "id": "547",
+    "position": "181",
+    "companyUnitId": "1"
+  },
+  "548": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200125",
+    "path": ",311,548,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-上湾地测站",
+    "departmentTypeName": "其他部门",
+    "id": "548",
+    "position": "180",
+    "companyUnitId": "1"
+  },
+  "549": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200126",
+    "path": ",311,549,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-榆家梁地测站",
+    "departmentTypeName": "其他部门",
+    "id": "549",
+    "position": "179",
+    "companyUnitId": "1"
+  },
+  "550": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200123",
+    "path": ",311,550,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-乌兰木伦地测站",
+    "departmentTypeName": "其他部门",
+    "id": "550",
+    "position": "178",
+    "companyUnitId": "1"
+  },
+  "551": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200128",
+    "path": ",311,551,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-柳塔地测站",
+    "departmentTypeName": "其他部门",
+    "id": "551",
+    "position": "177",
+    "companyUnitId": "1"
+  },
+  "552": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200129",
+    "path": ",311,552,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-寸草塔地测站",
+    "departmentTypeName": "其他部门",
+    "id": "552",
+    "position": "176",
+    "companyUnitId": "1"
+  },
+  "553": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200130",
+    "path": ",311,553,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-寸草塔二矿地测站",
+    "departmentTypeName": "其他部门",
+    "id": "553",
+    "position": "175",
+    "companyUnitId": "1"
+  },
+  "554": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200131",
+    "path": ",311,554,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-地方煤矿监测站",
+    "departmentTypeName": "其他部门",
+    "id": "554",
+    "position": "174",
+    "companyUnitId": "1"
+  },
+  "555": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200132",
+    "path": ",311,555,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-大柳塔三盘区管理处地测站",
+    "departmentTypeName": "其他部门",
+    "id": "555",
+    "position": "173",
+    "companyUnitId": "1"
+  },
+  "556": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200133",
+    "path": ",311,556,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-测量队",
+    "departmentTypeName": "其他部门",
+    "id": "556",
+    "position": "172",
+    "companyUnitId": "1"
+  },
+  "557": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200134",
+    "path": ",311,557,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-勘探队",
+    "departmentTypeName": "其他部门",
+    "id": "557",
+    "position": "171",
+    "companyUnitId": "1"
+  },
+  "558": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200135",
+    "path": ",311,558,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-物探队",
+    "departmentTypeName": "其他部门",
+    "id": "558",
+    "position": "170",
+    "companyUnitId": "1"
+  },
+  "559": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200136",
+    "path": ",311,559,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-地测探放水一队",
+    "departmentTypeName": "其他部门",
+    "id": "559",
+    "position": "169",
+    "companyUnitId": "1"
+  },
+  "560": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200137",
+    "path": ",311,560,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-地测探放水二队",
+    "departmentTypeName": "其他部门",
+    "id": "560",
+    "position": "168",
+    "companyUnitId": "1"
+  },
+  "561": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200138",
+    "path": ",311,561,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-维修队",
+    "departmentTypeName": "其他部门",
+    "id": "561",
+    "position": "167",
+    "companyUnitId": "1"
+  },
+  "562": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200139",
+    "path": ",311,562,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-防灭火队",
+    "departmentTypeName": "其他部门",
+    "id": "562",
+    "position": "166",
+    "companyUnitId": "1"
+  },
+  "563": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200140",
+    "path": ",311,563,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-大龄转岗人员",
+    "departmentTypeName": "其他部门",
+    "id": "563",
+    "position": "165",
+    "companyUnitId": "1"
+  },
+  "564": {
+    "leader": "",
+    "parentDepartment": "地测公司",
+    "departmentTypeId": "0",
+    "parentId": "311",
+    "number": "200110",
+    "path": ",311,564,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "地测公司-党委办公室",
+    "departmentTypeName": "其他部门",
+    "id": "564",
+    "position": "164",
+    "companyUnitId": "1"
+  },
+  "565": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "0",
+    "path": ",1,565,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "安装二队",
+    "departmentTypeName": "其他部门",
+    "id": "565",
+    "position": "38",
+    "companyUnitId": "1"
+  },
+  "566": {
+    "leader": "",
+    "parentDepartment": "布尔台煤矿",
+    "departmentTypeId": "0",
+    "parentId": "1",
+    "number": "0",
+    "path": ",1,566,",
+    "companyUnit": "本矿",
+    "telphone": "",
+    "name": "砼底板二队",
+    "departmentTypeName": "其他部门",
+    "id": "566",
+    "position": "36",
+    "companyUnitId": "1"
+  }
+          }
+          
+
+        if(result && JSON.stringify(result) !== "{}"){
+          const datas:any[] = []
+          for (const key in result) {
+            datas.push(result[key])
+          }
+          const { buildTree } = toTree('id', 'parentId', 'name')
+          const treeDataList: any = buildTree(datas)
+          treeData.value = treeDataList;     
+        }
+          
+      } catch (error) {
+        //
       }
-      const { buildTree } = toTree('id', 'parentId', 'name')
-      const treeDataList: any = buildTree(datas)
-      treeData.value = treeDataList;  
       
     }
     

+ 0 - 1
src/utils/ventutil.ts

@@ -93,7 +93,6 @@ export function toTree(idName = 'id', parentIdName: 'parentId', titleName = 'nam
   return { buildTree };
 }
 
-
 // 模型监测加载视频
 export function deviceCameraInit(cameraAddrs, player: HTMLElement, webRtcServerList: any[] = []) {
   const playerDoms: (HTMLVideoElement | undefined | null)[] = [];

+ 1 - 5
src/views/system/dict/index.vue

@@ -30,11 +30,7 @@
         <!-- <TableAction :actions="getTableAction(record)" /> -->
         <a class="table-action-link" @click="handleEdit(record)">编辑</a>
         <a class="table-action-link" @click="handleItem(record)">字典配置</a>
-        <a-popconfirm
-          title="确定删除?"
-          @confirm="handleDelete(record)"
-          style="display: inline-block"
-        >
+        <a-popconfirm title="确定删除?" @confirm="handleDelete(record)" style="display: inline-block">
           <a class="table-action-link">删除</a>
         </a-popconfirm>
       </template>

+ 199 - 202
src/views/vent/home/colliery/components/EchartLineCharacter3.vue

@@ -5,7 +5,7 @@
 </template>
 
 <script lang="ts" setup>
-   import { ref, reactive, onMounted, nextTick, defineProps, watch } from 'vue';
+  import { ref, reactive, onMounted, nextTick, defineProps, watch } from 'vue';
   // import Utils from '@/utils/utils'
   // const echarts = require('echarts')
   import * as echarts from 'echarts';
@@ -13,182 +13,180 @@
   let props = defineProps({
     setid: String,
   });
-  
-  let myChart=ref<any>(null)
-  let title1=ref<any>('')
-  let title2=ref('')
-  let legend=reactive(['风阻', '负压'])
-  let min= 0
-  let yname=ref('负压(Pa)')
-  let xname=ref('风量\r\n(m³/min)\r\n')
-  let ymax=ref( 3000)
-  let ymax2=ref(200)
-  let xMax=ref(300)
-  let xMin=ref(0)
-  let xdata1=reactive([])
-  let xdata2=reactive([])
-  let xdata3=reactive([])
-  let xdata4=reactive([])
-  let xdata5=reactive([])
-  let xdata6=reactive([])
-  let ynametextcolor=ref( '#3df6ff')
-  let linecolor=ref( '#0092d5')
-  let gridlinecolor=ref('#006c9d')
-  let textcolor=ref('#ffffff')
-  let myWidth=ref( window.innerWidth - 500 + 'px')
-  let padding=reactive( ['auto', 'auto', '40', '50'])
 
+  let myChart = ref<any>(null);
+  let title1 = ref<any>('');
+  let title2 = ref('');
+  let legend = reactive(['风阻', '负压']);
+  let min = 0;
+  let yname = ref('负压(Pa)');
+  let xname = ref('风量\r\n(m³/min)\r\n');
+  let ymax = ref(3000);
+  let ymax2 = ref(200);
+  let xMax = ref(300);
+  let xMin = ref(0);
+  let xdata1 = reactive([]);
+  let xdata2 = reactive([]);
+  let xdata3 = reactive([]);
+  let xdata4 = reactive([]);
+  let xdata5 = reactive([]);
+  let xdata6 = reactive([]);
+  let ynametextcolor = ref('#3df6ff');
+  let linecolor = ref('#0092d5');
+  let gridlinecolor = ref('#006c9d');
+  let textcolor = ref('#ffffff');
+  let myWidth = ref(window.innerWidth - 500 + 'px');
+  let padding = reactive(['auto', 'auto', '40', '50']);
 
-        // 风速曲线图各种参数设置
+  // 风速曲线图各种参数设置
   function optionFun() {
     var option = {
       title: {
         textStyle: {
           color: textcolor.value,
-          fontSize: 14 // 字体颜色
+          fontSize: 14, // 字体颜色
         },
-        text:title.value
+        text: title.value,
       },
       grid: {
         top: '20%',
         left: '3%',
         right: '16%',
         bottom: '5%',
-        containLabel: true
+        containLabel: true,
       },
       legend: {
         // x:'right',
         top: '1%',
         textStyle: {
           color: '#ffffff',
-          fontSize: 14// 字体颜色
+          fontSize: 14, // 字体颜色
         },
-        data: legend
+        data: legend,
       },
       tooltip: {
         backgroundColor: 'rgba(0,0,0,0.8)',
         textStyle: {
           color: textcolor.value,
-          fontSize: 14 // 字体颜色
+          fontSize: 14, // 字体颜色
         },
         formatter: function (params, ticket, callback) {
-          console.log(params,'params1')
+          console.log(params, 'params1');
           // var res = '风量' + ' : ' + Math.round(params.data[0] * 60 * 10) / 10 + '(m³/min)<br/>'
           // res = res + '&emsp;&emsp;&emsp;' + params.data[0] + '(m³/s)<br/>'
-          var res = '风量' + ' : ' + params.data[0]*60 + '(m³/min)<br/>'
-          res = res + '&emsp;&emsp;&emsp;' + params.data[0].toFixed(2) + '(m³/s)<br/>'
-          res = res + '负压' + ' : ' + params.data[1] + '(Pa)<br/>'
+          var res = '风量' + ' : ' + params.data[0] * 60 + '(m³/min)<br/>';
+          res = res + '&emsp;&emsp;&emsp;' + params.data[0].toFixed(2) + '(m³/s)<br/>';
+          res = res + '负压' + ' : ' + params.data[1] + '(Pa)<br/>';
           // lxh
           // var res = '风量' + ' : ' + 13600 + '(m³/min)<br/>'
           // res = res + '&emsp;&emsp;&emsp;' + (13600 / 60).toFixed(2) + '(m³/s)<br/>'
           // res = res + '负压' + ' : ' + params.data[1] + '(Pa)<br/>'
 
-          return res
+          return res;
         },
-        trigger: 'item'
+        trigger: 'item',
       },
-      color: ['#00bb00',
-        '#ffbb00',
-        '#ff0000',
-        '#0000ff'],
-      xAxis: [{
-        name: xname.value,
-        nameTextStyle: {
-          color: ynametextcolor.value,
-          fontSize: 14
-        },
-        axisLine: {
-          lineStyle: {
-            color: linecolor.value,
-            width: 1 // 这里是为了突出显示加上的
-          }
-        },
-        splitLine: {
-          show: false, // 网格线
-          lineStyle: {
-            color: gridlinecolor.value,
-            type: 'dashed' // 设置网格线类型 dotted:虚线   solid:实线
-          }
-        },
-        axisLabel: {
-          show: true,
-          position: 'bottom',
-          textStyle: {
-            color:textcolor.value,
-            fontSize: 14
-          }
-        },
-        type: 'value',
-        min: xMin.value * 60,
-        max: xMax.value * 60
-      },
-      {
-        name: '',
-        nameTextStyle: {
-          color: ynametextcolor.value,
-          fontSize: 14
-        },
-        axisTick: {
-          show: false
-        },
-        axisLine: {
-          show: false,
-          lineStyle: {
-            color:linecolor.value,
-            width: 1 // 这里是为了突出显示加上的
-          }
-        },
-        splitLine: {
-          show: false, // 网格线
-          lineStyle: {
-            color: gridlinecolor.value,
-            type: 'dashed' // 设置网格线类型 dotted:虚线   solid:实线
-          }
+      color: ['#00bb00', '#ffbb00', '#ff0000', '#0000ff'],
+      xAxis: [
+        {
+          name: xname.value,
+          nameTextStyle: {
+            color: ynametextcolor.value,
+            fontSize: 14,
+          },
+          axisLine: {
+            lineStyle: {
+              color: linecolor.value,
+              width: 1, // 这里是为了突出显示加上的
+            },
+          },
+          splitLine: {
+            show: false, // 网格线
+            lineStyle: {
+              color: gridlinecolor.value,
+              type: 'dashed', // 设置网格线类型 dotted:虚线   solid:实线
+            },
+          },
+          axisLabel: {
+            show: true,
+            position: 'bottom',
+            textStyle: {
+              color: textcolor.value,
+              fontSize: 14,
+            },
+          },
+          type: 'value',
+          min: xMin.value * 60,
+          max: xMax.value * 60,
         },
-        axisLabel: {
-          show: false,
-          textStyle: {
-            color: textcolor.value,
-            fontSize: 14
-          }
+        {
+          name: '',
+          nameTextStyle: {
+            color: ynametextcolor.value,
+            fontSize: 14,
+          },
+          axisTick: {
+            show: false,
+          },
+          axisLine: {
+            show: false,
+            lineStyle: {
+              color: linecolor.value,
+              width: 1, // 这里是为了突出显示加上的
+            },
+          },
+          splitLine: {
+            show: false, // 网格线
+            lineStyle: {
+              color: gridlinecolor.value,
+              type: 'dashed', // 设置网格线类型 dotted:虚线   solid:实线
+            },
+          },
+          axisLabel: {
+            show: false,
+            textStyle: {
+              color: textcolor.value,
+              fontSize: 14,
+            },
+          },
+          type: 'value',
+          min: xMin.value,
+          max: xMax.value,
         },
-        type: 'value',
-        min: xMin.value,
-        max: xMax.value
-      }
       ],
-      yAxis: [{
-        name: yname.value,
-        splitNumber: 5,
-        nameTextStyle: {
-          color: ynametextcolor.value,
-          fontSize: 14
-        },
-        axisLine: {
-          show: true,
-          lineStyle: {
-            color:linecolor.value,
-            width: 1 // 这里是为了突出显示加上的
-          }
-        },
-        splitLine: {
-          show: true, // 网格线
-          lineStyle: {
-            color: gridlinecolor.value,
-            type: 'dashed' // 设置网格线类型 dotted:虚线   solid:实线
-          }
-        },
-        axisLabel: {
-          show: true,
-          textStyle: {
-            color: textcolor.value,
-            fontSize: 14
-          }
+      yAxis: [
+        {
+          name: yname.value,
+          splitNumber: 5,
+          nameTextStyle: {
+            color: ynametextcolor.value,
+            fontSize: 14,
+          },
+          axisLine: {
+            show: true,
+            lineStyle: {
+              color: linecolor.value,
+              width: 1, // 这里是为了突出显示加上的
+            },
+          },
+          splitLine: {
+            show: true, // 网格线
+            lineStyle: {
+              color: gridlinecolor.value,
+              type: 'dashed', // 设置网格线类型 dotted:虚线   solid:实线
+            },
+          },
+          axisLabel: {
+            show: true,
+            textStyle: {
+              color: textcolor.value,
+              fontSize: 14,
+            },
+          },
+          type: 'value',
+          min: 0,
+          max: ymax.value,
         },
-        type: 'value',
-        min: 0,
-        max: ymax.value
-      }
       ],
       series: [
         {
@@ -199,7 +197,7 @@
           smooth: true,
           animationDuration: 1000,
           showSymbol: false,
-          data: xdata1
+          data: xdata1,
         },
         {
           name: legend[1],
@@ -210,7 +208,7 @@
           animationDuration: 1000,
           showSymbol: false,
 
-          data: xdata2
+          data: xdata2,
         },
 
         {
@@ -221,8 +219,8 @@
           smooth: true,
           animationDuration: 1000,
           symbolSize: 10,
-          data: xdata3
-        }
+          data: xdata3,
+        },
         // {
         //   name: this.legend[3],
         //   yAxisIndex: 0,
@@ -232,115 +230,114 @@
         //   showSymbol: false,
         //   data: this.xdata4
         // },
-      ]
-    }
+      ],
+    };
     // 将option返回
-    return option
+    return option;
   }
 
-
-  function initCharts () {
+  function initCharts() {
     // 图表控件
-    myChart.value = echarts.init(document.getElementById('echartsMain'))
+    myChart.value = echarts.init(document.getElementById('echartsMain'));
     // document.getElementById(this.setid).style.width = this.myWidth;
     // document.getElementById(this.setid).style.height = "100px";
     // 每个仪表盘参数设置
-  // let option = optionFun()
+    // let option = optionFun()
     // 绘制图表,设置参数信息
-    myChart.value.setOption( optionFun())
+    myChart.value.setOption(optionFun());
   }
   function setYMax(data, data2) {
-    ymax.value = data
-    ymax2.value = data2
+    ymax.value = data;
+    ymax2.value = data2;
     // let option = optionFun()
     // 绘制图表,设置参数信息
-    myChart.value.setOption(optionFun())
+    myChart.value.setOption(optionFun());
   }
-  function setLegend (data) {
-    legend = data
+  function setLegend(data) {
+    legend = data;
     // let option = optionFun()
     // 绘制图表,设置参数信息
-    myChart.value.setOption(optionFun())
+    myChart.value.setOption(optionFun());
   }
-  function setXMax (data) {
-    xMax.value = data
+  function setXMax(data) {
+    xMax.value = data;
     // let option = optionFun()
     // 绘制图表,设置参数信息
-    myChart.value.setOption(optionFun())
+    myChart.value.setOption(optionFun());
   }
-  function setXMin (data) {
-    xMin.value = data
+  function setXMin(data) {
+    xMin.value = data;
     // let option = optionFun()
     // 绘制图表,设置参数信息
-    myChart.value.setOption(optionFun())
+    myChart.value.setOption(optionFun());
   }
   function setXData(data) {
-    xdata1 = data
+    xdata1 = data;
     // let option = optionFun()
     // 绘制图表,设置参数信息
-    myChart.value.setOption(optionFun())
+    myChart.value.setOption(optionFun());
   }
-  function setXData1 (data) {
-    xdata1 = data
+  function setXData1(data) {
+    xdata1 = data;
     // let option = optionFun()
     // 绘制图表,设置参数信息
-    myChart.value.setOption(optionFun())
+    myChart.value.setOption(optionFun());
   }
-  function setXData2 (data) {
-    xdata2 = data
+  function setXData2(data) {
+    xdata2 = data;
     // let option = optionFun()
     // 绘制图表,设置参数信息
-    myChart.value.setOption(optionFun())
+    myChart.value.setOption(optionFun());
   }
-  function setXData3 (data) {
-    xdata3 = data
+  function setXData3(data) {
+    xdata3 = data;
     // let option = optionFun()
     // 绘制图表,设置参数信息
-    myChart.value.setOption(optionFun())
+    myChart.value.setOption(optionFun());
   }
-  function setXData4 (data) {
-    xdata4 = data
+  function setXData4(data) {
+    xdata4 = data;
     // let option = optionFun()
     // 绘制图表,设置参数信息
-    myChart.value.setOption(optionFun())
+    myChart.value.setOption(optionFun());
   }
-  function clear () {
-    myChart.value.clear()
+  function clear() {
+    myChart.value.clear();
   }
-  function setTextColor (color) {
-    textcolor.value = color
+  function setTextColor(color) {
+    textcolor.value = color;
     // let option = optionFun()
     // 绘制图表,设置参数信息
-    myChart.value.setOption(optionFun())
+    myChart.value.setOption(optionFun());
   }
-  function setTitle (title1) {
-    title1.value = title1
+  function setTitle(title1) {
+    title1.value = title1;
     // let option = optionFun()
     // 绘制图表,设置参数信息
-    myChart.value.setOption(optionFun())
+    myChart.value.setOption(optionFun());
   }
-  function resize () {
-    myChart.value.resize()
+  function resize() {
+    myChart.value.resize();
   }
 
-// computed: {
-//   scale () {
-//     return [
-//       {
-//         dataKey: 'y',
-//         alias: this.yaxisText
-//       }
-//     ]
-//   }
-// },
+  // computed: {
+  //   scale () {
+  //     return [
+  //       {
+  //         dataKey: 'y',
+  //         alias: this.yaxisText
+  //       }
+  //     ]
+  //   }
+  // },
 
-onMounted (()=>{
-  // initCharts()
-})
+  onMounted(() => {
+    // initCharts()
+  });
 
-defineExpose({
-  setXMax,
-  setYMax,
-  setXData
-});
+  defineExpose({
+    setXMax,
+    setYMax,
+    setXData,
+  });
 </script>

+ 47 - 45
src/views/vent/monitorManager/comment/MonitorTable.vue

@@ -38,6 +38,7 @@
     },
     dataSource: {
       type: Array,
+      // default: () => [],
       required: true,
     },
     deviceType: {
@@ -83,7 +84,50 @@
   const tableMaxHeight = 150;
   const columns = ref([])
   const tableScroll = props.scroll.y ?  ref({y: props.scroll.y}) : ref({})
-  
+   //注册table数据
+     // 列表页面公共参数、方法
+  const { prefixCls, tableContext, doRequest } = useListPage({
+    designScope: props.designScope,
+    tableProps: {
+      title: props.title,
+      dataSource: dataTableSource,
+      columns: props.columnsType  ? columns : (props.columns as any[]),
+      rowSelection: { type: props.isShowSelect? 'radio': undefined, columnWidth: 100 },
+      size: props.size,
+      useSearchForm: props.formConfig ? true : false,
+      showTableSetting: false,
+      showIndexColumn: true,
+      showActionColumn: props.isShowActionColumn,
+      maxHeight: tableMaxHeight,
+      bordered: false,
+      scroll: tableScroll,
+      rowKey: 'deviceID',
+      formConfig: props.formConfig,
+      // striped: true,
+      loading: true,
+      actionColumn: {
+        width: 180,
+      },
+      pagination: props.isShowPagination ? {
+        current: 1,
+        pageSize: 50,
+        pageSizeOptions: ['10', '30', '50', '100', '500'],
+        showQuickJumper: false
+      } : false,
+      beforeFetch: (params) => {
+        if(props.deviceType?.startsWith('safetymonitor')){ 
+          return Object.assign(params, { filterParams: {'dataTypeName': params['dataTypeName'], strinstallpos: '*'+params['strinstallpos']+'*'} });
+        }else if(props.deviceType?.startsWith('location')) {
+          return Object.assign(params, { filterParams: { strinstallpos: '*' + params['strinstallpos'] + '*', userName: '*' + params['strname'] + '*', userJson: '' } });
+        }else if(props.deviceType?.startsWith('vehicle')) {
+          return Object.assign(params, { filterParams: {strinstallpos: '*'+params['strinstallpos']+'*', vehicleName: '*'+params['strname']+'*' } });
+        }else{
+          return Object.assign(params, { column: 'createTime' });
+        }
+      },
+    },
+  });
+  const [registerTable, { reload, setLoading, setSelectedRowKeys, getSelectRowKeys, getForm }, { rowSelection, selectedRowKeys,  }] = tableContext;
   watch(
     () => {
       return props.dataSource;
@@ -140,51 +184,9 @@
     }
     }
   )
-  // 列表页面公共参数、方法
-  const { prefixCls, tableContext, doRequest } = useListPage({
-    designScope: props.designScope,
-    tableProps: {
-      title: props.title,
-      dataSource: dataTableSource,
-      columns: props.columnsType  ? columns : (props.columns as any[]),
-      rowSelection: { type: props.isShowSelect? 'radio': undefined, columnWidth: 100 },
-      size: props.size,
-      useSearchForm: props.formConfig ? true : false,
-      showTableSetting: false,
-      showIndexColumn: true,
-      showActionColumn: props.isShowActionColumn,
-      maxHeight: tableMaxHeight,
-      bordered: false,
-      scroll: tableScroll,
-      rowKey: 'deviceID',
-      formConfig: props.formConfig,
-      // striped: true,
-      loading: true,
-      actionColumn: {
-        width: 180,
-      },
-      pagination: props.isShowPagination ? {
-        current: 1,
-        pageSize: 50,
-        pageSizeOptions: ['10', '30', '50', '100', '500'],
-        showQuickJumper: false
-      } : false,
-      beforeFetch: (params) => {
-        if(props.deviceType?.startsWith('safetymonitor')){ 
-          return Object.assign(params, { filterParams: {'dataTypeName': params['dataTypeName'], strinstallpos: '*'+params['strinstallpos']+'*'} });
-        }else if(props.deviceType?.startsWith('location')) {
-          return Object.assign(params, { filterParams: { strinstallpos: '*' + params['strinstallpos'] + '*', userName: '*' + params['strname'] + '*', userJson: '' } });
-        }else if(props.deviceType?.startsWith('vehicle')) {
-          return Object.assign(params, { filterParams: {strinstallpos: '*'+params['strinstallpos']+'*', vehicleName: '*'+params['strname']+'*' } });
-        }else{
-          return Object.assign(params, { column: 'createTime' });
-        }
-      },
-    },
-  });
 
-  //注册table数据
-  const [registerTable, { reload, setLoading, setSelectedRowKeys, getSelectRowKeys, getForm }, { rowSelection, selectedRowKeys,  }] = tableContext;
+
+ 
   
   watch(
     selectedRowKeys,

+ 4 - 3
src/views/vent/monitorManager/deviceMonitor/components/device/device.api.ts

@@ -9,9 +9,9 @@ enum Api {
   itemList = '/sys/dictItem/list',
   devPosition = '/sys/dict/getDictItems/devPosVisible',
   getDepartmentInfo = '/ventanaly-device/getDepartmentInfo',
-  listdays='/safety/ventanalyMonitorData/listdays',
-  getHistoryData='/ventanaly-device/history/getHistoryData'
-
+  listdays = '/safety/ventanalyMonitorData/listdays',
+  getHistoryData = '/ventanaly-device/history/getHistoryData',
+  safetyDeviceList = '/ventanaly-device/monitor/codeDict',
 }
 /**
  * 列表接口
@@ -34,3 +34,4 @@ export const getDepartmentInfo = (params) => defHttp.get({ url: Api.getDepartmen
 
 export const listdays = (params) => defHttp.get({ url: Api.listdays, params });
 export const getHistoryData = (params) => defHttp.post({ url: Api.getHistoryData, params });
+export const safetyDeviceList = (params) => defHttp.post({ url: Api.safetyDeviceList, params });

+ 85 - 26
src/views/vent/monitorManager/deviceMonitor/components/device/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="scene-box" v-if="isRefresh">
+  <div class="scene-box" >
     <!-- <div class="top-header">智能通风管理系统</div> -->
     <div class="select-node" :class="{ 'node-select-show': !treeShow, 'node-select-hide': treeShow, }"
       @click="showTree('treeShow', true)">
@@ -69,6 +69,21 @@
             </div>
           </div>
         </div>
+        <!-- 是人员定位表单代码,由于放在tab中,表格对已知刷新,导致表单数据也在刷寻,造成输入一半的中文时会清空输入框的内容,导致的输入不上数据 -->
+        <div v-if="deviceType.startsWith('location')" class="location-form" style="position: absolute; z-index: 9999; top: 50px;">
+          <div class="location-form-item">
+            <span class="location-form-label">人员名称:</span>
+            <Input style="width: 200px;" v-model:value="locationForm.strname" />
+          </div>
+          <div class="location-form-item">
+            <span class="location-form-label">所属部门:</span>
+            <MTreeSelect style="width: 200px;" v-model:value="locationForm.department" placeholder="请选择所属部门" api="/ventanaly-device/getDepartmentInfo" :virtual="false" :isGetPopupContainer="false"/>
+          </div>
+          <div class="location-form-item">
+            <span class="location-form-label">分站名称:</span>
+            <Input style="width: 200px;" v-model:value="locationForm.stationname" />
+          </div>
+        </div>
         <div style="color: #fff;">{{ deviceType }}</div>
         <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange" id="tabsBox">
           <a-tab-pane key="1" tab="实时监测">
@@ -100,6 +115,16 @@
                 :pagination="false"></a-table>
             </template>
             <template v-else-if="deviceType.startsWith('safetymonitor') && activeKey == '1'">
+              <!-- <div class="location-form">
+                <div class="location-form-item">
+                  <span class="location-form-label">设备类型:</span>
+                  <Select style="width: 300px;" v-model:value="safetymonitorForm.dataTypeName" placeholder="请选择设备类型" :option="safetyOption" labelField="name" valueField="code"/>
+                </div>
+                <div class="location-form-item">
+                  <span class="location-form-label">分站名称:</span>
+                  <Input style="width: 200px;" v-model:value="safetymonitorForm.strinstallpos" />
+                </div>
+              </div> -->
               <MonitorTable ref="monitorTable" :columnsType="`${deviceType}_monitor`" :deviceType="deviceType"
                 :dataSource="dataSource" design-scope="device_monitor" :isShowActionColumn="true" :isShowSelect="false"
                 title="设备监测" :form-config="formConfig" :scroll="{ y: scroll.y - 110 }">
@@ -136,7 +161,7 @@
             <template v-else-if="deviceType.startsWith('location') && activeKey == '1'">
               <MonitorTable ref="monitorTable" :columnsType="`${deviceType}_monitor`" :deviceType="deviceType"
                 :dataSource="dataSource" design-scope="device_monitor" :isShowActionColumn="true" :isShowSelect="false"
-                title="设备监测" :form-config="locationFormConfig" :scroll="{ y: scroll.y - 110 }">
+                title="设备监测" :scroll="{ y: scroll.y - 110 }" style="margin-top: 60px;">
                 <template #action="{ record }">
                   <TableAction :actions="[
                     {
@@ -307,13 +332,13 @@
 <script setup lang="ts">
 import { ref, onMounted, onUnmounted, ComponentOptions, shallowRef, reactive, defineProps, watch } from 'vue'
 import { SendOutlined } from '@ant-design/icons-vue';
-import { list, getDeviceList, getDeviceTypeList, devPosition, getDepartmentInfo,  } from './device.api'
+import { list, getDeviceList, getDeviceTypeList, devPosition, getDepartmentInfo,safetyDeviceList } from './device.api'
 import AlarmHistoryTable from '../../../comment/AlarmHistoryTable.vue';
 import HistoryTable from '../../../comment/HistoryTable.vue';
 import HandlerHistoryTable from '../../../comment/HandlerHistoryTable.vue';
 import MonitorTable from '../../../comment/MonitorTable.vue';
 import GroupMonitorTable from '../../../comment/GroupMonitorTable.vue';
-import { TreeProps, message, Progress } from 'ant-design-vue';
+import { TreeProps, message, Progress, Input, Select } from 'ant-design-vue';
 import { TableAction } from '/@/components/Table';
 import { SvgIcon } from '/@/components/Icon';
 import { getActions } from '/@/qiankun/state';
@@ -324,8 +349,9 @@ import mainPath from './modal/mainPath.vue'
 import { formConfig } from '../../../safetyMonitor/safety.data'
 import { getDictItemsByCode } from '/@/utils/dict';
 import BarAndLine from '/@/components/chart/BarAndLine.vue';
+import MTreeSelect from '/@/components/Form/src/jeecg/components/MTreeSelect.vue';
+// import ApiSelect from '/@/components/Form/src/components/ApiSelect.vue';
 import { nextTick } from 'vue';
-import dayjs from 'dayjs';
 // import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
 
 const { FiberModal, BundleModal, DustModal, BallvalveModal, AtomizingModal, GaspatrolModal } = getMonitorComponent()
@@ -353,6 +379,16 @@ const router = useRouter()
 
 const actions = getActions();
 // actions.setGlobalState({ pageObj: { pageType: 'home' } });
+const locationForm = reactive({
+  strname:'',
+  department: '',
+  stationname: ''
+})
+
+const safetymonitorForm = reactive({
+  dataTypeName:'',
+  strinstallpos: '',
+})
 
 const monitorTable = ref()
 const historyTable = ref()
@@ -398,13 +434,13 @@ const onSelect: TreeProps['onSelect'] = (keys, e) => {
   const title = e.node.title; // 在
   if (e.node.parent && (e.node.parent.node.type.toString()).startsWith('sys')) {
     systemType.value = e.node.parent.node.type
-    deviceType.value = e.node.parent.node.type
+    if(deviceType.value != e.node.parent.node.type)deviceType.value = e.node.parent.node.type
     systemID.value = e.node.type
     // 传递工作面id信息,用于定位
     actions.setGlobalState({ locationObj: { pageType: deviceType.value, deviceid: systemID.value }, pageObj: null });
   } else {
     systemType.value = e.node.type
-    deviceType.value = e.node.type
+    if(deviceType.value != e.node.type)deviceType.value = e.node.type
     actions.setGlobalState({ locationObj: { pageType: deviceType.value }, pageObj: null });
   }
   clearTimeout(timer)
@@ -446,7 +482,7 @@ async function getDeviceType(sysType?) {
         if (item.deviceType != 'sys' && item.children && item.children.length > 0) {
           const children = getData(item.children, [], `${keyVal}-${index}`)
           // 判断关键阻力路线
-          if (item.itemValue == sysType && children[0]) {
+          if (item.itemValue.startsWith(sysType) && children[0]) {
             systemID.value = item.children[0]['itemValue']
           }
 
@@ -555,29 +591,28 @@ async function getDataSource() {
       }
     } else {
       let resultData, searchForm;
-      if (monitorTable.value) {
-        // 安全监控
-        const formData = monitorTable.value.getForm()
+      const formData = monitorTable.value.getForm()
         searchForm = formData.getFieldsValue()
-        if (deviceType.value.startsWith('safetymonitor')) {
+      if (monitorTable.value) {
+        if (deviceType.value.startsWith('safetymonitor')) {     
           resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: { ...searchForm } })
         } else if (deviceType.value.startsWith('location')) {
           if (!departmentInfo) {
             departmentInfo = await getDepartmentInfo({})
           }
           let department = null
-          if (departmentInfo && searchForm && searchForm['department']) {
+          if (departmentInfo && locationForm && locationForm['department']) {
             for (const key in departmentInfo) {
               const item = departmentInfo[key]
-              if (item['id'] === searchForm['department']) {
+              if (item['id'] === locationForm['department']) {
                 department = item
                 break;
               }
             }
           }
-          resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: { strinstallpos: searchForm && searchForm['stationname'] ? searchForm['stationname'] : '', userName: searchForm && searchForm['strname'] ? searchForm['strname'] : '', userJson: department && department['name'] ? department['name'] : '' } })
+          resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: { strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '', userName: locationForm['strname'] ? locationForm['strname'] : '', userJson: department && department['name'] ? department['name'] : '' } })
         } else if (deviceType.value.startsWith('vehicle')) {
-          resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: { strinstallpos: searchForm && searchForm['stationname'] ? searchForm['stationname'] : '', vehicleName: searchForm && searchForm['strname'] ? searchForm['strname'] : '' } })
+          resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: { strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '', vehicleName: locationForm['strname'] ? locationForm['strname'] : '' } })
         } else {
           resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' })
         }
@@ -596,7 +631,7 @@ async function getDataSource() {
             const resultData = <any[]>[]
             // 如果是安全监控的数据时需要过滤常见设备数据,根据设定的常用安全监控字典去匹配
             const dictCodes = getDictItemsByCode('safetynormal')
-            if (!searchForm['dataTypeName'] && dictCodes && dictCodes.length) {
+            if (searchForm && !searchForm['dataTypeName'] && dictCodes && dictCodes.length) {
               for (let i = 0; i < dictCodes.length; i++) {
                 const dict = dictCodes[i]
                 data.forEach((item) => {
@@ -731,7 +766,7 @@ function toHome() {
 }
 
 async function findTreeDataValue(obj) {
-  debugger;
+  ;
   const findDeviceType = (data: [], obj) => {
     let type = ''
     if (obj.deviceid) {
@@ -745,13 +780,17 @@ async function findTreeDataValue(obj) {
       }
 
       if (item.type == type) {
-        deviceType.value = obj.deviceid ? 'sys' : item.type
+        if(obj.deviceid && deviceType.value != 'sys'){
+          deviceType.value = 'sys'
+        }else if(!obj.deviceid && deviceType.value !== item.type){
+          deviceType.value = item.type
+        }
         if (type.startsWith('sys_') && item.children[0]) {
           systemID.value = item.children[0]['type']
           selectedKeys.value = [item.children[0]['key']]
           expandedKeys.value = [item.children[0]['key']]
           treeNodeTitle.value = item.children[0]['title']
-          deviceType.value = type.substring(4)
+          if(deviceType.value !== type.substring(4)) deviceType.value = type.substring(4)
         } else {
           if (obj.deviceid) systemID.value = obj.deviceid
           selectedKeys.value = [item.key]
@@ -778,7 +817,7 @@ async function findTreeDataValue(obj) {
   // 无类型时
   if (!treeNodeTitle.value && treeData.value && treeData.value[0] && treeData.value[0]['children']) {
     const defaultData = treeData.value[0]['children'][0]
-    deviceType.value = defaultData.type
+    if(deviceType.value !== defaultData.type)deviceType.value = defaultData.type
     selectedKeys.value = [(defaultData.key as string)]
     expandedKeys.value = [(defaultData.key as string)]
     treeNodeTitle.value = defaultData.title
@@ -793,8 +832,8 @@ async function findTreeDataValue(obj) {
 
 function monitorChange(index) {
   dataSource.value = []
-  deviceActive.value = deviceType.value = deviceList.value[index].deviceType
-
+  deviceActive.value = deviceList.value[index].deviceType
+  if(deviceType.value != deviceActive.value) deviceType.value = deviceActive.value
   if (activeKey.value == '1' && monitorTable.value) {
     monitorTable.value.setLoading(true)
     dataSource.value = deviceList.value[index].datalist
@@ -826,9 +865,6 @@ function setLocation() {
 }
 
 watch(() => props.pageData, async (pageObj) => {
-  debugger;
-  console.log('ceshi-------------》', pageObj)
-  debugger;
   isRefresh.value = false
   if (!treeData.value || treeData.value?.length < 1) {
     await getDeviceType()
@@ -866,6 +902,7 @@ onMounted(async () => {
   } else {
     locationList.value = await devPosition({})
   }
+  // safetyOption.value = await safetyDeviceList(null, { devicetype: 'safetymonitor', code: 'dataTypeName' })
 })
 
 onUnmounted(() => {
@@ -1392,6 +1429,28 @@ onUnmounted(() => {
     }
   }
 }
+.location-form{
+  display: flex;
+  margin: 8px;
+  .location-form-item{
+    width: 400px;
+    .location-form-label{
+      width: 100px;
+      display: inline-block;
+      color: #fff;
+    }
+    input{
+      background: transparent !important;
+      color: #fff;
+      border: 1px solid #3ad8ff77 !important
+    }
+  }
+  .zxm-select-selector{
+    width: 200px !important;
+  }
+}
+
+
 
 @keyframes treeShow {
   0% {

+ 9 - 6
src/views/vent/monitorManager/deviceMonitor/components/network/index.vue

@@ -1,12 +1,13 @@
 <template>
   <div class="zl-box">
     <div class="zl-container-box">
+      <!-- <customHeader >网络实时解算</customHeader> -->
       <div class="top-box">
         <transition
           enter-active-class="animate__animated  animate__slideInLeft"
           leave-active-class="animate__animated  animate__slideOutLeft"
         >
-          <div class="left-box lr-box" v-show="show">
+          <div class="left-box lr-box" v-if="show">
             <div class="network-time">
               本次解算时间:
               <span class="time">{{ pageData.currentTime }}</span>
@@ -91,7 +92,7 @@
           enter-active-class="animate__animated  animate__slideInRight"
           leave-active-class="animate__animated  animate__slideOutRight"
         >
-        <div class="right-box lr-box" v-show="show">
+        <div class="right-box lr-box" v-if="show">
           <div class="sensor-box">
             <div class="item-top-title">传感器实时数据</div>
             <BorderBox1 class="table-box border-bg" backgroundColor="#00bfff15">
@@ -122,7 +123,7 @@
             enter-active-class="animate__animated  animate__slideInUp"
             leave-active-class="animate__animated  animate__slideOutDown"
           >
-        <div class="bottom-box" v-show="show">
+        <div class="bottom-box" v-if="show">
           <div class="to-small" @click="toHome"></div>
           <div class="bottom-left bottom-lr-box">
             <div class="network-top">
@@ -221,6 +222,7 @@ import { BorderBox11, BorderBox1, ScrollBoard as DvScrollBoard } from '@kjgl77/d
 import { sensorColumns, networkColumns, warningColumns, deviceTab, SensorType, NetworkType, windowColumns, gateColumns, WindowType, GateType, solveTimesData } from './network.data'
 import dayjs from 'dayjs'
 import { formatNum } from '/@/utils/ventutil'
+import customHeader from '/@/components/vent/customHeader.vue';
 
 
 const emit = defineEmits(['changePageType'])
@@ -289,9 +291,10 @@ const scrollBoardRef = ref()
 
 function toHome() {
   show.value = false
-  setTimeout(() => {
-    emit('changePageType', 'model3D')
-  }, 1200)
+   emit('changePageType', 'model3D')
+  // setTimeout(() => {
+  //   emit('changePageType', 'model3D')
+  // }, 2000)
 }
 
 function changeActive(index){

+ 2 - 3
src/views/vent/monitorManager/deviceMonitor/index.vue

@@ -1,12 +1,11 @@
 <template>
   <div class="scene-box">
-    <template v-if="routerParam !== 'timesolution' && routerParam !== 'home'">
+    <template v-if="routerParam !== 'timesolution' && routerParam !== 'home' && routerParam !== 'model3D'">
       <!-- <Emergency ref="NetworkRef" v-if="deviceKind === 'emergency'" :pageResult="pageResult" @changePageType="changePageType" />
       <DeviceVue ref="DeviceRef" v-else :pageData="pageData" /> -->
       <DeviceVue ref="DeviceRef" :pageData="pageData" />
     </template>
-    <Network ref="NetworkRef" v-if="routerParam === 'timesolution'" :pageResult="pageResult"
-      @changePageType="changePageType" />
+    <Network ref="NetworkRef" v-if="routerParam === 'timesolution'" :pageResult="pageResult" @changePageType="changePageType" />
   </div>
   <VentModal style="width: 100%; height: 100%; position: absolute" />
 </template>