<template>
  <el-select v-if="type !== 'industryType'" v-model="modelValue">
    <el-option
      v-for="item in data"
      :key="item[keys[type]]"
      :label="item.NAME"
      :value="item[keys[type]]"
    />
  </el-select>
  <el-tree-select
    v-else-if="type === 'industryType'"
    ref="treeSelectRef"
    v-model="modelValue"
    :data="data"
    :props="{
      value: 'INDUSTRYTYPE_ID',
      children: 'nodes',
      label: 'NAME',
    }"
    node-key="INDUSTRYTYPE_ID"
    :render-after-expand="false"
    accordion
    check-strictly
    :clearable="true"
    :disabled="disabled"
  />
</template>

<script setup>
import { ref, watchEffect } from "vue";
import { useVModel } from "@vueuse/core";
import {
  layoutFnGetIndustryType,
  layoutFnGetPostType,
  layoutFnGetTrainingLevel,
  layoutFnGetTrainingType,
} from "@/assets/js/data_dictionary.js";

defineOptions({
  name: "LayoutLearningTrainType",
});
const props = defineProps({
  modelValue: {
    type: String,
    required: true,
    default: "",
  },
  type: {
    type: String,
    required: true,
    default: "",
    validator: (value) => {
      // trainingType: 培训类型
      // industryType: 行业类型
      // postType: 岗位类型
      // trainingLevel: 培训级别
      const typeList = [
        "trainingType",
        "industryType",
        "postType",
        "trainingLevel",
      ];
      if (typeList.includes(value)) {
        return true;
      } else {
        throw new Error(`type必须是${typeList.join("、")}之一`);
      }
    },
  },
  disabled: {
    type: Boolean,
    default: false,
  },
  searchValue: {
    type: String,
    default: "",
  },
});
const keys = {
  trainingType: "TRAININGTYPE_ID",
  postType: "POSTTYPE_ID",
  trainingLevel: "TRAINLEVEL_ID",
};
const emits = defineEmits(["update:modelValue"]);
const modelValue = useVModel(props, "modelValue", emits);
const treeSelectRef = ref(null);
const data = ref([]);
const getCurrentNode = () => {
  if (props.type !== "industryType") {
    if (data.value.length === 0) return {};
    for (let i = 0; i < data.value.length; i++) {
      if (data.value[i][keys[props.type]] === props.modelValue) {
        return data.value[i];
      }
    }
  }
  return treeSelectRef.value.getCurrentNode();
};
const getNode = (value = getCurrentNode()) => {
  if (props.type !== "industryType") return "";
  return treeSelectRef.value.getNode(getCurrentNode(value));
};
const getIndustryTypeCurrentCheckAll = () => {
  const name = [];
  const id = [];
  if (props.type !== "industryType") return { name, id };
  let currentNode = getNode();
  name.unshift(currentNode.data.NAME);
  id.unshift(currentNode.data.INDUSTRYTYPE_ID);
  for (let i = currentNode.level; i > 1; i--) {
    name.unshift(currentNode.parent.data.NAME);
    id.unshift(currentNode.parent.data.INDUSTRYTYPE_ID);
    currentNode = currentNode.parent;
  }
  return { name, id };
};
defineExpose({
  getCurrentNode,
  getNode,
  getIndustryTypeCurrentCheckAll,
});
const fnGetTrainingType = async () => {
  data.value = [
    {
      OPERATTIME: "2023-05-24 08:26:00",
      TRAININGTYPE_ID: "c70bf859512241579a8a30fc5d1ae153",
      ISDELETE: "0",
      OPERATOR: "联安众超管",
      CREATOR: "联安众超管",
      SORT: 2,
      NAME: "职业健康",
      PARENT_ID: "0",
      CREATTIME: "2023-05-24 08:26:00",
    },
    {
      OPERATTIME: "2023-04-08 13:28:01",
      TRAININGTYPE_ID: "6128172b7a1144c98cc196044281f66c",
      ISDELETE: "0",
      OPERATOR: "admin",
      CREATOR: "admin",
      SORT: 111,
      NAME: "全员培训",
      PARENT_ID: "0",
      CREATTIME: "2023-04-08 13:28:01",
    },
  ];
  const resData = await layoutFnGetTrainingType();
  data.value = resData.value;
};
const fnGetIndustryType = async () => {
  data.value = [
    {
      OPERATTIME: "2023-05-24 13:42:22",
      ISDELETE: "0",
      nodes: [
        {
          OPERATTIME: "2023-05-24 13:42:38",
          ISDELETE: "0",
          OPERATOR: "联安众超管",
          CREATOR: "联安众超管",
          INDUSTRYTYPE_ID: "41da504607804bd1b966e157c2b4e9f0",
          SORT: 1,
          NAME: "公路旅客运输",
          PARENT_ID: "26b046958f8a46e7a016425c1c4e2fc9",
          CREATTIME: "2023-05-24 13:42:38",
        },
      ],
      OPERATOR: "",
      CREATOR: "联安众超管",
      INDUSTRYTYPE_ID: "26b046958f8a46e7a016425c1c4e2fc9",
      SORT: 1,
      NAME: "道路运输业",
      PARENT_ID: "0",
      CREATTIME: "2023-05-24 13:40:19",
    },
    {
      OPERATTIME: "2023-02-27 10:14:32",
      ISDELETE: "0",
      nodes: [
        {
          OPERATTIME: "2023-02-27 10:08:20",
          ISDELETE: "0",
          nodes: [
            {
              OPERATTIME: "2023-02-27 10:09:17",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "d38ed992d2f84f13890f73a65a52f6df",
              SORT: 1,
              NAME: "选矿厂",
              PARENT_ID: "655e9bc29a1d4a1ea39bbe59487a182e",
              CREATTIME: "2023-02-27 10:09:17",
            },
            {
              OPERATTIME: "2023-02-27 10:09:23",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "34c3a66d82bc43b7acc398e07f2edaee",
              SORT: 2,
              NAME: "地下矿山",
              PARENT_ID: "655e9bc29a1d4a1ea39bbe59487a182e",
              CREATTIME: "2023-02-27 10:09:23",
            },
            {
              OPERATTIME: "2023-04-04 14:52:03",
              ISDELETE: "0",
              OPERATOR: "",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "017aeaf1602b4eed8a53d6a110262016",
              SORT: 3,
              NAME: "露天矿山",
              PARENT_ID: "655e9bc29a1d4a1ea39bbe59487a182e",
              CREATTIME: "2023-02-27 10:09:28",
            },
          ],
          OPERATOR: "admin",
          CREATOR: "admin",
          INDUSTRYTYPE_ID: "655e9bc29a1d4a1ea39bbe59487a182e",
          SORT: 0,
          NAME: "金属非金属矿山",
          PARENT_ID: "1b250e1ec1e24576aaa84daa804e9ab2",
          CREATTIME: "2023-02-27 10:08:20",
        },
        {
          OPERATTIME: "2023-02-27 10:08:27",
          ISDELETE: "0",
          nodes: [
            {
              OPERATTIME: "2023-02-27 10:09:39",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "462db2c330354524ad912aade071e109",
              SORT: 1,
              NAME: "生产经营单位",
              PARENT_ID: "fa95c820e1b2491e8f9cb0d03558696b",
              CREATTIME: "2023-02-27 10:09:39",
            },
          ],
          OPERATOR: "admin",
          CREATOR: "admin",
          INDUSTRYTYPE_ID: "fa95c820e1b2491e8f9cb0d03558696b",
          SORT: 1,
          NAME: "危险化学品",
          PARENT_ID: "1b250e1ec1e24576aaa84daa804e9ab2",
          CREATTIME: "2023-02-27 10:08:27",
        },
        {
          OPERATTIME: "2023-02-27 10:08:33",
          ISDELETE: "0",
          nodes: [
            {
              OPERATTIME: "2023-02-27 10:13:14",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "30d22d43a79f4c929e434139dea85935",
              SORT: 1,
              NAME: "炼铁",
              PARENT_ID: "4ecff39fff9a417ebf343f09ecc58e46",
              CREATTIME: "2023-02-27 10:13:14",
            },
            {
              OPERATTIME: "2023-02-27 10:13:23",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "bbda6b7ddc224592be73d5f1cda29220",
              SORT: 2,
              NAME: "炼钢",
              PARENT_ID: "4ecff39fff9a417ebf343f09ecc58e46",
              CREATTIME: "2023-02-27 10:13:23",
            },
            {
              OPERATTIME: "2023-02-27 10:13:30",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "35c0879727774eb99d53ac523aae3225",
              SORT: 3,
              NAME: "黑色金属铸造",
              PARENT_ID: "4ecff39fff9a417ebf343f09ecc58e46",
              CREATTIME: "2023-02-27 10:13:30",
            },
          ],
          OPERATOR: "admin",
          CREATOR: "admin",
          INDUSTRYTYPE_ID: "4ecff39fff9a417ebf343f09ecc58e46",
          SORT: 2,
          NAME: "金属冶炼",
          PARENT_ID: "1b250e1ec1e24576aaa84daa804e9ab2",
          CREATTIME: "2023-02-27 10:08:33",
        },
        {
          OPERATTIME: "2023-02-27 10:08:38",
          ISDELETE: "0",
          nodes: [
            {
              OPERATTIME: "2023-02-27 10:13:41",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "e4e457b98c724b5786e7173bb921f365",
              SORT: 1,
              NAME: "生产经营单位",
              PARENT_ID: "6ec61b50449c48059a264046323423d0",
              CREATTIME: "2023-02-27 10:13:41",
            },
          ],
          OPERATOR: "admin",
          CREATOR: "admin",
          INDUSTRYTYPE_ID: "6ec61b50449c48059a264046323423d0",
          SORT: 3,
          NAME: "烟花爆竹",
          PARENT_ID: "1b250e1ec1e24576aaa84daa804e9ab2",
          CREATTIME: "2023-02-27 10:08:38",
        },
      ],
      OPERATOR: "",
      CREATOR: "admin",
      INDUSTRYTYPE_ID: "1b250e1ec1e24576aaa84daa804e9ab2",
      SORT: 1,
      NAME: "高危行业",
      PARENT_ID: "0",
      CREATTIME: "2023-02-27 09:54:38",
    },
    {
      OPERATTIME: "2023-02-27 10:14:35",
      ISDELETE: "0",
      nodes: [
        {
          OPERATTIME: "2023-02-27 10:13:53",
          ISDELETE: "0",
          nodes: [
            {
              OPERATTIME: "2023-02-27 10:16:33",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "b935b913b0e749c0a509968011cc6c45",
              SORT: 1,
              NAME: "炼铁",
              PARENT_ID: "5f464ef0c4f741759a713fef2bb732ac",
              CREATTIME: "2023-02-27 10:16:33",
            },
            {
              OPERATTIME: "2023-02-27 10:16:39",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "1aeb4cfedee5403da5f996d04772fc12",
              SORT: 2,
              NAME: "炼钢",
              PARENT_ID: "5f464ef0c4f741759a713fef2bb732ac",
              CREATTIME: "2023-02-27 10:16:39",
            },
            {
              OPERATTIME: "2023-02-27 10:16:46",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "c486471667d44257843595346abd250b",
              SORT: 3,
              NAME: "钢压延加工",
              PARENT_ID: "5f464ef0c4f741759a713fef2bb732ac",
              CREATTIME: "2023-02-27 10:16:46",
            },
          ],
          OPERATOR: "admin",
          CREATOR: "admin",
          INDUSTRYTYPE_ID: "5f464ef0c4f741759a713fef2bb732ac",
          SORT: 1,
          NAME: "冶金行业",
          PARENT_ID: "f39f6967559f42448eb619da8eb0fce4",
          CREATTIME: "2023-02-27 10:13:53",
        },
        {
          OPERATTIME: "2023-02-27 10:14:26",
          ISDELETE: "0",
          OPERATOR: "",
          CREATOR: "admin",
          INDUSTRYTYPE_ID: "6e9b1e9172214d648981a74d3649c3a1",
          SORT: 2,
          NAME: "有色行业",
          PARENT_ID: "f39f6967559f42448eb619da8eb0fce4",
          CREATTIME: "2023-02-27 10:14:03",
        },
        {
          OPERATTIME: "2023-02-27 10:14:20",
          ISDELETE: "0",
          nodes: [
            {
              OPERATTIME: "2023-02-27 10:16:57",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "1e57be917b8c4d448ae6529499ae96c7",
              SORT: 1,
              NAME: "水泥制造",
              PARENT_ID: "9b620e5b89514abb85f306fcf337c3a3",
              CREATTIME: "2023-02-27 10:16:57",
            },
            {
              OPERATTIME: "2023-02-27 10:17:04",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "fcef5e12dd9b4fd4953682ab84671aeb",
              SORT: 2,
              NAME: "石灰和石膏制造",
              PARENT_ID: "9b620e5b89514abb85f306fcf337c3a3",
              CREATTIME: "2023-02-27 10:17:04",
            },
            {
              OPERATTIME: "2023-02-27 10:17:09",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "001a60ece1294f2d967ea5a461461e70",
              SORT: 3,
              NAME: "平板玻璃制造",
              PARENT_ID: "9b620e5b89514abb85f306fcf337c3a3",
              CREATTIME: "2023-02-27 10:17:09",
            },
            {
              OPERATTIME: "2023-02-27 10:17:15",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "61de0885dc244d98bddf99afc4425267",
              SORT: 4,
              NAME: "特种玻璃制造",
              PARENT_ID: "9b620e5b89514abb85f306fcf337c3a3",
              CREATTIME: "2023-02-27 10:17:15",
            },
            {
              OPERATTIME: "2023-02-27 10:17:22",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "bd0aca3819fd4da7bbf7be90335f6020",
              SORT: 5,
              NAME: "玻璃纤维及制品制造",
              PARENT_ID: "9b620e5b89514abb85f306fcf337c3a3",
              CREATTIME: "2023-02-27 10:17:22",
            },
            {
              OPERATTIME: "2023-02-27 10:17:28",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "b83ab8eef2534ebfa85a488c11bea300",
              SORT: 6,
              NAME: "玻璃纤维增强塑料制品制造",
              PARENT_ID: "9b620e5b89514abb85f306fcf337c3a3",
              CREATTIME: "2023-02-27 10:17:28",
            },
            {
              OPERATTIME: "2023-02-27 10:17:35",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "a2aa5cd30b1249aba6f9e0a569afb774",
              SORT: 7,
              NAME: "建筑陶瓷制品制造",
              PARENT_ID: "9b620e5b89514abb85f306fcf337c3a3",
              CREATTIME: "2023-02-27 10:17:35",
            },
            {
              OPERATTIME: "2023-02-27 10:17:41",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "229c19358708403397b905330b9a8224",
              SORT: 8,
              NAME: "卫生陶瓷制品制造",
              PARENT_ID: "9b620e5b89514abb85f306fcf337c3a3",
              CREATTIME: "2023-02-27 10:17:41",
            },
            {
              OPERATTIME: "2023-05-24 11:51:41",
              ISDELETE: "0",
              OPERATOR: "联安众超管",
              CREATOR: "联安众超管",
              INDUSTRYTYPE_ID: "4563908d4bc54895a0dbbb397d247537",
              SORT: 9,
              NAME: "粘土砖瓦及建筑砌块制造",
              PARENT_ID: "9b620e5b89514abb85f306fcf337c3a3",
              CREATTIME: "2023-05-24 11:51:41",
            },
            {
              OPERATTIME: "2023-05-24 14:18:08",
              ISDELETE: "0",
              OPERATOR: "联安众超管",
              CREATOR: "联安众超管",
              INDUSTRYTYPE_ID: "67e09e268ef142768df4e334ff8a629d",
              SORT: 10,
              NAME: "其他建筑材料制造",
              PARENT_ID: "9b620e5b89514abb85f306fcf337c3a3",
              CREATTIME: "2023-05-24 14:18:08",
            },
            {
              OPERATTIME: "2023-05-24 14:22:15",
              ISDELETE: "0",
              OPERATOR: "联安众超管",
              CREATOR: "联安众超管",
              INDUSTRYTYPE_ID: "7af5a6dccffc444faba1d70ffc763bfb",
              SORT: 11,
              NAME: "其他陶瓷制品制造",
              PARENT_ID: "9b620e5b89514abb85f306fcf337c3a3",
              CREATTIME: "2023-05-24 14:22:15",
            },
          ],
          OPERATOR: "admin",
          CREATOR: "admin",
          INDUSTRYTYPE_ID: "9b620e5b89514abb85f306fcf337c3a3",
          SORT: 3,
          NAME: "建材行业",
          PARENT_ID: "f39f6967559f42448eb619da8eb0fce4",
          CREATTIME: "2023-02-27 10:14:20",
        },
        {
          OPERATTIME: "2023-02-27 10:15:45",
          ISDELETE: "0",
          nodes: [
            {
              OPERATTIME: "2023-02-27 10:17:51",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "19909ff1724d4f9d8a50b1310f670954",
              SORT: 1,
              NAME: "金属结构制造",
              PARENT_ID: "e042d66d3c4a4952bbd716adfd5b57f0",
              CREATTIME: "2023-02-27 10:17:51",
            },
            {
              OPERATTIME: "2023-02-27 10:17:56",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "b59ee1617abd4d3fbdc797bf0f87de7b",
              SORT: 2,
              NAME: "金属门窗制造",
              PARENT_ID: "e042d66d3c4a4952bbd716adfd5b57f0",
              CREATTIME: "2023-02-27 10:17:56",
            },
            {
              OPERATTIME: "2023-02-27 10:18:05",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "3f5b738f21d442ebbd00e4e5f872d6da",
              SORT: 3,
              NAME: "金属包装容器及材料制造",
              PARENT_ID: "e042d66d3c4a4952bbd716adfd5b57f0",
              CREATTIME: "2023-02-27 10:18:05",
            },
            {
              OPERATTIME: "2023-02-27 10:18:11",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "d52ca8f2d82543a8841ff47c3bd0c124",
              SORT: 4,
              NAME: "金属丝绳及其制品制造",
              PARENT_ID: "e042d66d3c4a4952bbd716adfd5b57f0",
              CREATTIME: "2023-02-27 10:18:11",
            },
            {
              OPERATTIME: "2023-02-27 10:18:18",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "8d90b34941504a109bf127a19894cf47",
              SORT: 5,
              NAME: "金属表面处理及热处理加工",
              PARENT_ID: "e042d66d3c4a4952bbd716adfd5b57f0",
              CREATTIME: "2023-02-27 10:18:18",
            },
            {
              OPERATTIME: "2023-02-27 10:18:24",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "435c52ced633412caa07ffda98855587",
              SORT: 6,
              NAME: "电工机械专用设备制造",
              PARENT_ID: "e042d66d3c4a4952bbd716adfd5b57f0",
              CREATTIME: "2023-02-27 10:18:24",
            },
            {
              OPERATTIME: "2023-02-27 10:18:29",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "6fb88ffd31ac4a4dbd15593c07f28403",
              SORT: 7,
              NAME: "半导体器件专用设备制造",
              PARENT_ID: "e042d66d3c4a4952bbd716adfd5b57f0",
              CREATTIME: "2023-02-27 10:18:29",
            },
            {
              OPERATTIME: "2023-02-27 10:18:35",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "a8099ba67c304b84a3c6d6a196fdd0c9",
              SORT: 8,
              NAME: "电子元器件与机电组件设备制造",
              PARENT_ID: "e042d66d3c4a4952bbd716adfd5b57f0",
              CREATTIME: "2023-02-27 10:18:35",
            },
            {
              OPERATTIME: "2023-02-27 10:18:40",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "52d7c2b30a7c432dbeb73002a2521a57",
              SORT: 9,
              NAME: "汽车车身、挂车制造",
              PARENT_ID: "e042d66d3c4a4952bbd716adfd5b57f0",
              CREATTIME: "2023-02-27 10:18:40",
            },
            {
              OPERATTIME: "2023-02-27 10:18:49",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "52f2786f738c4cbb813481ee74d4d263",
              SORT: 10,
              NAME: "汽车零部件及配件制造",
              PARENT_ID: "e042d66d3c4a4952bbd716adfd5b57f0",
              CREATTIME: "2023-02-27 10:18:49",
            },
            {
              OPERATTIME: "2023-02-27 10:18:56",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "4515268e11d44dc184c70427daf60f00",
              SORT: 11,
              NAME: "变压器、整流器和电感器制造",
              PARENT_ID: "e042d66d3c4a4952bbd716adfd5b57f0",
              CREATTIME: "2023-02-27 10:18:56",
            },
            {
              OPERATTIME: "2023-02-27 10:19:01",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "d4c627411c5244e790dbaeb038e143d7",
              SORT: 12,
              NAME: "电容器及其配套设备制造",
              PARENT_ID: "e042d66d3c4a4952bbd716adfd5b57f0",
              CREATTIME: "2023-02-27 10:19:01",
            },
            {
              OPERATTIME: "2023-02-27 10:19:13",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "30eb3d1f582841bca3d5ceda3864d60e",
              SORT: 13,
              NAME: "光伏设备及元器件制造",
              PARENT_ID: "e042d66d3c4a4952bbd716adfd5b57f0",
              CREATTIME: "2023-02-27 10:19:13",
            },
            {
              OPERATTIME: "2023-02-27 10:19:21",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "cc1481db4b7d411ab71fad23f0774b10",
              SORT: 14,
              NAME: "电线、电缆制造",
              PARENT_ID: "e042d66d3c4a4952bbd716adfd5b57f0",
              CREATTIME: "2023-02-27 10:19:21",
            },
            {
              OPERATTIME: "2023-02-27 10:19:28",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "c5ed9abf21024bc1b42a8d2edaad54e8",
              SORT: 15,
              NAME: "电子专用材料制造",
              PARENT_ID: "e042d66d3c4a4952bbd716adfd5b57f0",
              CREATTIME: "2023-02-27 10:19:28",
            },
            {
              OPERATTIME: "2023-02-27 10:19:35",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "2723dac483e946efaf79e222148ca254",
              SORT: 16,
              NAME: "电工仪器仪表制造",
              PARENT_ID: "e042d66d3c4a4952bbd716adfd5b57f0",
              CREATTIME: "2023-02-27 10:19:35",
            },
          ],
          OPERATOR: "",
          CREATOR: "admin",
          INDUSTRYTYPE_ID: "e042d66d3c4a4952bbd716adfd5b57f0",
          SORT: 4,
          NAME: "机械行业",
          PARENT_ID: "f39f6967559f42448eb619da8eb0fce4",
          CREATTIME: "2023-02-27 10:15:34",
        },
        {
          OPERATTIME: "2023-02-27 10:16:00",
          ISDELETE: "0",
          nodes: [
            {
              OPERATTIME: "2023-02-27 10:19:45",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "9e5a99038a894d1dae1ec014aa4b1456",
              SORT: 1,
              NAME: "水产品冷冻加工",
              PARENT_ID: "c23e931ddcca467e91ee276ea2b3ae34",
              CREATTIME: "2023-02-27 10:19:45",
            },
            {
              OPERATTIME: "2023-02-27 10:19:51",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "5c9c06268c47400a95cd12e9b5a258e5",
              SORT: 2,
              NAME: "淀粉及淀粉制品制造",
              PARENT_ID: "c23e931ddcca467e91ee276ea2b3ae34",
              CREATTIME: "2023-02-27 10:19:51",
            },
            {
              OPERATTIME: "2023-02-27 10:19:56",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "a05f300720344c078cf60be21e351bac",
              SORT: 3,
              NAME: "速冻食品制造",
              PARENT_ID: "c23e931ddcca467e91ee276ea2b3ae34",
              CREATTIME: "2023-02-27 10:19:56",
            },
            {
              OPERATTIME: "2023-02-27 10:20:02",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "af2c521d98fb43ce8bdeb6e33f6f17c0",
              SORT: 4,
              NAME: "白酒制造",
              PARENT_ID: "c23e931ddcca467e91ee276ea2b3ae34",
              CREATTIME: "2023-02-27 10:20:02",
            },
            {
              OPERATTIME: "2023-02-27 10:20:09",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "824878a5c0ea41d4b5b208da2d4a494d",
              SORT: 5,
              NAME: "啤酒制造",
              PARENT_ID: "c23e931ddcca467e91ee276ea2b3ae34",
              CREATTIME: "2023-02-27 10:20:09",
            },
            {
              OPERATTIME: "2023-02-27 10:20:16",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "be49153fc87c44a98246d43ff0f734fd",
              SORT: 6,
              NAME: "葡萄酒制造",
              PARENT_ID: "c23e931ddcca467e91ee276ea2b3ae34",
              CREATTIME: "2023-02-27 10:20:16",
            },
            {
              OPERATTIME: "2023-02-27 10:20:22",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "6a34916f17e3467995a21c34a4555378",
              SORT: 7,
              NAME: "果菜汁及果菜汁饮料制造",
              PARENT_ID: "c23e931ddcca467e91ee276ea2b3ae34",
              CREATTIME: "2023-02-27 10:20:22",
            },
            {
              OPERATTIME: "2023-02-27 10:20:29",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "5209604046014d00afdd8472df2d77b5",
              SORT: 8,
              NAME: "木片加工",
              PARENT_ID: "c23e931ddcca467e91ee276ea2b3ae34",
              CREATTIME: "2023-02-27 10:20:29",
            },
            {
              OPERATTIME: "2023-02-27 10:20:35",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "fb569e85fefd42caa91c514b7c299afa",
              SORT: 9,
              NAME: "包装装潢及其他印刷",
              PARENT_ID: "c23e931ddcca467e91ee276ea2b3ae34",
              CREATTIME: "2023-02-27 10:20:35",
            },
            {
              OPERATTIME: "2023-02-27 10:20:42",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "212cce1973e54b66ab737ea144602815",
              SORT: 10,
              NAME: "橡胶板、管、带制造",
              PARENT_ID: "c23e931ddcca467e91ee276ea2b3ae34",
              CREATTIME: "2023-02-27 10:20:42",
            },
            {
              OPERATTIME: "2023-02-27 10:20:51",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "2aac1e584fa140a9a3c0a021c0887b83",
              SORT: 11,
              NAME: "光学玻璃制造",
              PARENT_ID: "c23e931ddcca467e91ee276ea2b3ae34",
              CREATTIME: "2023-02-27 10:20:51",
            },
            {
              OPERATTIME: "2023-05-24 11:48:32",
              ISDELETE: "0",
              OPERATOR: "联安众超管",
              CREATOR: "联安众超管",
              INDUSTRYTYPE_ID: "455f097da53544f1a5e78a6d33cf3a3f",
              SORT: 11,
              NAME: "植物油加工",
              PARENT_ID: "c23e931ddcca467e91ee276ea2b3ae34",
              CREATTIME: "2023-05-24 11:48:32",
            },
            {
              OPERATTIME: "2023-05-24 14:56:11",
              ISDELETE: "0",
              OPERATOR: "联安众超管",
              INDUSTRYTYPE_ID: "3df1e485646948fd95805a8ce0997384",
              SORT: 11,
              PARENT_ID: "c23e931ddcca467e91ee276ea2b3ae34",
              CREATTIME: "2023-05-24 14:56:11",
            },
            {
              OPERATTIME: "2023-02-27 10:20:57",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "9082363f85844844b4483c87f8ef7341",
              SORT: 12,
              PARENT_ID: "c23e931ddcca467e91ee276ea2b3ae34",
              CREATTIME: "2023-02-27 10:20:57",
            },
            {
              OPERATTIME: "2023-05-24 11:49:16",
              ISDELETE: "0",
              INDUSTRYTYPE_ID: "60b14e3fc45d409caa55bd3b852ffe7e",
              SORT: 12,
              PARENT_ID: "c23e931ddcca467e91ee276ea2b3ae34",
              CREATTIME: "2023-05-24 11:49:16",
            },
            {
              OPERATTIME: "2023-02-27 10:21:04",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "bee15c59606b447a81f59c9469f13103",
              SORT: 13,
              PARENT_ID: "c23e931ddcca467e91ee276ea2b3ae34",
              CREATTIME: "2023-02-27 10:21:04",
            },
            {
              OPERATTIME: "2023-05-24 14:27:18",
              ISDELETE: "0",
              INDUSTRYTYPE_ID: "fdabec905a704b09a0eb683ca72c9f02",
              SORT: 14,
              PARENT_ID: "c23e931ddcca467e91ee276ea2b3ae34",
              CREATTIME: "2023-05-24 14:27:18",
            },
          ],
          OPERATOR: "admin",
          CREATOR: "admin",
          INDUSTRYTYPE_ID: "c23e931ddcca467e91ee276ea2b3ae34",
          SORT: 5,
          PARENT_ID: "f39f6967559f42448eb619da8eb0fce4",
          CREATTIME: "2023-02-27 10:16:00",
        },
        {
          OPERATTIME: "2023-02-27 10:16:09",
          ISDELETE: "0",
          nodes: [
            {
              OPERATTIME: "2023-02-27 10:21:18",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "23d086ff44b549168f8cf15889db005c",
              SORT: 1,
              NAME: "棉纺纱加工",
              PARENT_ID: "568e833dee3640a1bb3b141f39af1d0f",
              CREATTIME: "2023-02-27 10:21:18",
            },
            {
              OPERATTIME: "2023-02-27 10:21:23",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "1842606b879f4654bd2f7d528ed62e5a",
              SORT: 2,
              NAME: "棉织造加工",
              PARENT_ID: "568e833dee3640a1bb3b141f39af1d0f",
              CREATTIME: "2023-02-27 10:21:23",
            },
            {
              OPERATTIME: "2023-02-27 10:21:30",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "bf1a53b278924a7fa29866660d4c4f60",
              SORT: 3,
              NAME: "棉印染精加工",
              PARENT_ID: "568e833dee3640a1bb3b141f39af1d0f",
              CREATTIME: "2023-02-27 10:21:30",
            },
            {
              OPERATTIME: "2023-02-27 10:21:36",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "8c9bc93bfef148a7bf356fb5b352fa87",
              SORT: 4,
              NAME: "化纤织造加工",
              PARENT_ID: "568e833dee3640a1bb3b141f39af1d0f",
              CREATTIME: "2023-02-27 10:21:36",
            },
            {
              OPERATTIME: "2023-02-27 10:21:42",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "f729f10497814c54b9a01cab4c575556",
              SORT: 5,
              NAME: "化纤织物染整精加工",
              PARENT_ID: "568e833dee3640a1bb3b141f39af1d0f",
              CREATTIME: "2023-02-27 10:21:42",
            },
            {
              OPERATTIME: "2023-02-27 10:21:47",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "44f42467181842499260a052a73ffcbe",
              SORT: 6,
              NAME: "非织造布制造",
              PARENT_ID: "568e833dee3640a1bb3b141f39af1d0f",
              CREATTIME: "2023-02-27 10:21:47",
            },
            {
              OPERATTIME: "2023-02-27 10:21:53",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "99fcc9294a634856851afeee30d1f171",
              SORT: 7,
              NAME: "运动机织服装制造",
              PARENT_ID: "568e833dee3640a1bb3b141f39af1d0f",
              CREATTIME: "2023-02-27 10:21:53",
            },
            {
              OPERATTIME: "2023-02-27 10:22:00",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "76ffa02414c1499bbcb6eaa505d242c3",
              SORT: 8,
              NAME: "运动休闲针织服装制造",
              PARENT_ID: "568e833dee3640a1bb3b141f39af1d0f",
              CREATTIME: "2023-02-27 10:22:00",
            },
          ],
          OPERATOR: "admin",
          CREATOR: "admin",
          INDUSTRYTYPE_ID: "568e833dee3640a1bb3b141f39af1d0f",
          SORT: 6,
          NAME: "纺织行业",
          PARENT_ID: "f39f6967559f42448eb619da8eb0fce4",
          CREATTIME: "2023-02-27 10:16:09",
        },
        {
          OPERATTIME: "2023-02-27 10:16:17",
          ISDELETE: "0",
          OPERATOR: "admin",
          CREATOR: "admin",
          INDUSTRYTYPE_ID: "e9f98e1322f24da4b15a6b6ff3550c55",
          SORT: 7,
          NAME: "烟草行业",
          PARENT_ID: "f39f6967559f42448eb619da8eb0fce4",
          CREATTIME: "2023-02-27 10:16:17",
        },
        {
          OPERATTIME: "2023-02-27 10:16:24",
          ISDELETE: "0",
          nodes: [
            {
              OPERATTIME: "2023-02-27 10:22:11",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "aab96f05c88046d69733280389cc58d9",
              SORT: 1,
              NAME: "服装批发",
              PARENT_ID: "84b7ed71d06d400b9e99df728928d6ce",
              CREATTIME: "2023-02-27 10:22:11",
            },
            {
              OPERATTIME: "2023-02-27 10:22:16",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "e49e397df49840b59158e8d4d5abb6eb",
              SORT: 2,
              NAME: "百货零售",
              PARENT_ID: "84b7ed71d06d400b9e99df728928d6ce",
              CREATTIME: "2023-02-27 10:22:16",
            },
            {
              OPERATTIME: "2023-02-27 10:22:20",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "933a77ffa9a74e0dbb6bcf57384ad40f",
              SORT: 3,
              NAME: "超级市场零售",
              PARENT_ID: "84b7ed71d06d400b9e99df728928d6ce",
              CREATTIME: "2023-02-27 10:22:20",
            },
            {
              OPERATTIME: "2023-02-27 10:22:26",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "19585964fe8b46af8f145790966db65c",
              SORT: 4,
              NAME: "便利店零售",
              PARENT_ID: "84b7ed71d06d400b9e99df728928d6ce",
              CREATTIME: "2023-02-27 10:22:26",
            },
            {
              OPERATTIME: "2023-02-27 10:22:31",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "8f824a4d57e7402d955dc4f112505e24",
              SORT: 5,
              NAME: "汽车新车零售",
              PARENT_ID: "84b7ed71d06d400b9e99df728928d6ce",
              CREATTIME: "2023-02-27 10:22:31",
            },
            {
              OPERATTIME: "2023-02-27 10:22:37",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "7a02c2bd1dd045e9ad0d662cdaba57db",
              SORT: 6,
              NAME: "汽车旧车零售",
              PARENT_ID: "84b7ed71d06d400b9e99df728928d6ce",
              CREATTIME: "2023-02-27 10:22:37",
            },
            {
              OPERATTIME: "2023-02-27 10:22:43",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "2efafba8fbeb4376ac32d5c195e81efa",
              SORT: 7,
              NAME: "汽车零配件零售",
              PARENT_ID: "84b7ed71d06d400b9e99df728928d6ce",
              CREATTIME: "2023-02-27 10:22:43",
            },
            {
              OPERATTIME: "2023-02-27 10:22:49",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "90874226c22e4a59b00a3af05562e645",
              SORT: 8,
              NAME: "摩托车及零配件零售",
              PARENT_ID: "84b7ed71d06d400b9e99df728928d6ce",
              CREATTIME: "2023-02-27 10:22:49",
            },
            {
              OPERATTIME: "2023-02-27 10:22:55",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "4acb8986ca1d4f1ab045548f18d8cbe7",
              SORT: 9,
              NAME: "日用家电零售",
              PARENT_ID: "84b7ed71d06d400b9e99df728928d6ce",
              CREATTIME: "2023-02-27 10:22:55",
            },
            {
              OPERATTIME: "2023-02-27 10:23:02",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "0bbf430e0bb24627bc93f135d2166e36",
              SORT: 10,
              NAME: "五金零售",
              PARENT_ID: "84b7ed71d06d400b9e99df728928d6ce",
              CREATTIME: "2023-02-27 10:23:02",
            },
            {
              OPERATTIME: "2023-02-27 10:23:08",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "a4fdd353d8564e038ec7fecd23699776",
              SORT: 11,
              NAME: "灯具零售",
              PARENT_ID: "84b7ed71d06d400b9e99df728928d6ce",
              CREATTIME: "2023-02-27 10:23:08",
            },
            {
              OPERATTIME: "2023-02-27 10:23:15",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "c008d95c73224907b91fb0a146a80522",
              SORT: 12,
              NAME: "家具零售",
              PARENT_ID: "84b7ed71d06d400b9e99df728928d6ce",
              CREATTIME: "2023-02-27 10:23:15",
            },
            {
              OPERATTIME: "2023-02-27 10:23:22",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "0a061308f2ae49c297221c667ad12881",
              SORT: 13,
              NAME: "涂料零售",
              PARENT_ID: "84b7ed71d06d400b9e99df728928d6ce",
              CREATTIME: "2023-02-27 10:23:22",
            },
            {
              OPERATTIME: "2023-02-27 10:23:30",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "3fe1317bf3b24334b2e6716d8babda92",
              SORT: 14,
              NAME: "旅游饭店",
              PARENT_ID: "84b7ed71d06d400b9e99df728928d6ce",
              CREATTIME: "2023-02-27 10:23:30",
            },
            {
              OPERATTIME: "2023-02-27 10:23:36",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "4b2e94dbbb0c42768c997c057be2bb89",
              SORT: 15,
              NAME: "经济型连锁酒店",
              PARENT_ID: "84b7ed71d06d400b9e99df728928d6ce",
              CREATTIME: "2023-02-27 10:23:36",
            },
            {
              OPERATTIME: "2023-02-27 10:23:41",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "a3d83a53bc484a7fa84a61a6885aa667",
              SORT: 16,
              NAME: "民宿服务",
              PARENT_ID: "84b7ed71d06d400b9e99df728928d6ce",
              CREATTIME: "2023-02-27 10:23:41",
            },
            {
              OPERATTIME: "2023-02-27 10:23:47",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "6079ee40b1e14b3fb336fbf6490a598b",
              SORT: 17,
              NAME: "正餐服务",
              PARENT_ID: "84b7ed71d06d400b9e99df728928d6ce",
              CREATTIME: "2023-02-27 10:23:47",
            },
            {
              OPERATTIME: "2023-02-27 10:23:54",
              ISDELETE: "0",
              OPERATOR: "admin",
              CREATOR: "admin",
              INDUSTRYTYPE_ID: "a7cf17c7ca8b42e68d8822566b06fc39",
              SORT: 18,
              NAME: "快餐服务",
              PARENT_ID: "84b7ed71d06d400b9e99df728928d6ce",
              CREATTIME: "2023-02-27 10:23:54",
            },
          ],
          OPERATOR: "admin",
          CREATOR: "admin",
          INDUSTRYTYPE_ID: "84b7ed71d06d400b9e99df728928d6ce",
          SORT: 8,
          NAME: "商贸行业",
          PARENT_ID: "f39f6967559f42448eb619da8eb0fce4",
          CREATTIME: "2023-02-27 10:16:24",
        },
      ],
      OPERATOR: "",
      CREATOR: "admin",
      INDUSTRYTYPE_ID: "f39f6967559f42448eb619da8eb0fce4",
      SORT: 2,
      NAME: "一般行业",
      PARENT_ID: "0",
      CREATTIME: "2023-02-27 09:54:52",
    },
    {
      OPERATTIME: "2023-05-24 11:40:03",
      ISDELETE: "0",
      nodes: [
        {
          OPERATTIME: "2023-05-24 11:40:14",
          ISDELETE: "0",
          OPERATOR: "联安众超管",
          CREATOR: "联安众超管",
          INDUSTRYTYPE_ID: "e74ad1f963f8423291a64cf9070558a3",
          SORT: 1,
          NAME: "井工煤矿",
          PARENT_ID: "eb392a55110f4d9899d8554b84537aa0",
          CREATTIME: "2023-05-24 11:40:14",
        },
        {
          OPERATTIME: "2023-05-24 11:40:26",
          ISDELETE: "0",
          OPERATOR: "联安众超管",
          CREATOR: "联安众超管",
          INDUSTRYTYPE_ID: "6a19f1511de34b9fae955f0d61668e91",
          SORT: 2,
          NAME: "露天煤矿",
          PARENT_ID: "eb392a55110f4d9899d8554b84537aa0",
          CREATTIME: "2023-05-24 11:40:26",
        },
      ],
      OPERATOR: "联安众超管",
      CREATOR: "联安众超管",
      INDUSTRYTYPE_ID: "eb392a55110f4d9899d8554b84537aa0",
      SORT: 3,
      NAME: "煤矿",
      PARENT_ID: "0",
      CREATTIME: "2023-05-24 11:40:03",
    },
  ];
  const resData = await layoutFnGetIndustryType();
  data.value = resData.value;
};
const fnGetPostType = async () => {
  data.value = [
    {
      OPERATTIME: "2023-07-20 18:12:26",
      TRAININGTYPE_ID: "c70bf859512241579a8a30fc5d1ae153",
      ISDELETE: "0",
      OPERATOR: "admin",
      CREATOR: "联安众超管",
      POSTTYPE_ID: "61a74c83ece848f59d8b154e9370201d",
      SORT: 12,
      NAME: "职业健康主要负责人",
      PARENT_ID: "0",
      CREATTIME: "2023-05-24 08:28:18",
    },
    {
      OPERATTIME: "2023-07-20 18:12:40",
      TRAININGTYPE_ID: "c70bf859512241579a8a30fc5d1ae153",
      ISDELETE: "0",
      OPERATOR: "admin",
      CREATOR: "联安众超管",
      POSTTYPE_ID: "79042228778146d9bb7f0547b48a7b14",
      SORT: 13,
      NAME: "职业健康管理人员",
      PARENT_ID: "0",
      CREATTIME: "2023-05-24 08:28:49",
    },
    {
      OPERATTIME: "2023-07-20 18:12:43",
      TRAININGTYPE_ID: "c70bf859512241579a8a30fc5d1ae153",
      ISDELETE: "0",
      OPERATOR: "admin",
      CREATOR: "联安众超管",
      POSTTYPE_ID: "2b49f40b0c1545019d78cde8a5a218a4",
      SORT: 14,
      NAME: "劳动者",
      PARENT_ID: "0",
      CREATTIME: "2023-05-24 08:29:00",
    },
  ];
  const resData = await layoutFnGetPostType({
    TRAININGTYPE_ID: props.searchValue,
  });
  data.value = resData.value;
};
const fnGetTrainingLevel = async () => {
  const resData = await layoutFnGetTrainingLevel({
    POSTTYPE_ID: props.searchValue,
  });
  data.value = resData.value;
};
if (props.type === "trainingType") fnGetTrainingType();
if (props.type === "industryType") fnGetIndustryType();
watchEffect(() => {
  if (props.type === "postType" && props.searchValue) fnGetPostType();
  if (props.type === "trainingLevel" && props.searchValue) fnGetTrainingLevel();
});
</script>

<style scoped></style>
