基于ElementUI封装的下拉树选择可搜索单选多选清空功能

news2024/11/15 11:17:13

效果:

基于ElementUI封装的下拉树选择可搜索单选多选清空功能

组件代码

/**
  * 树形下拉选择组件,下拉框展示树形结构,提供选择某节点功能,方便其他模块调用
  * @author wy
  * @date 2024-01-03  * 调用示例:
  * <tree-select 
  * :height="400" // 下拉框中树形高度
  *     :width="200" // 下拉框中树形宽度
  *     :isFilter="true" //是否出现树结构搜索过滤
  *     size="small"  // 输入框的尺寸: medium/small/mini
  *     :data="data" // 树结构的数据
  *     :defaultProps="defaultProps" // 树结构的props
  *     multiple   // 多选
  *     :inputWidth='250'  //输入框的长度 Number
  *     clearable   // 可清空选择
  *     collapseTags   // 多选时将选中值按文字的形式展示
  *     checkStrictly // 多选时,严格遵循父子不互相关联
  *     :nodeKey="nodeKey"   // 绑定nodeKey,默认绑定'id'
  *     :checkedKeys="defaultCheckedKeys"  // 传递默认选中的节点key组成的数组
  *     @popoverHide="popoverHide"> // 事件有两个参数:第一个是所有选中的节点ID,第二个是所有选中的节点数据
  *  </tree-select>
*/
<template>
  <div>
    <div
      v-show="isShowSelect"
      class="mask"
      @click="isShowSelect = !isShowSelect"
    />
    <el-popover
      v-model="isShowSelect"
      placement="bottom-start"
      :width="width"
      trigger="manual"
      style="padding: 12px 0"
      @hide="popoverHide"
    >
      <el-input v-if="isFilter" placeholder="输入关键字进行过滤" size="mini" v-model="filterText">
      </el-input>
      <el-tree
        ref="tree"
        class="common-tree"
        :style="style"
        :data="data"
        :props="defaultProps"
        :show-checkbox="multiple"
        :node-key="nodeKey"
        :check-strictly="checkStrictly"
        default-expand-all
        :filter-node-method="filterNode"
        :expand-on-click-node="false"
        :check-on-click-node="multiple"
        :highlight-current="true"
        @node-click="handleNodeClick"
        @check-change="handleCheckChange"
      />
      <el-select
        slot="reference"
        ref="select"
        v-model="selectedData"
        :style="selectStyle"
        :size="size"
        :multiple="multiple"
        :clearable="clearable"
        :collapse-tags="collapseTags"
        class="tree-select"
        @click.native="isShowSelect = !isShowSelect"
        @remove-tag="removeSelectedNodes"
        @clear="removeSelectedNode"
        @change="changeSelectedNodes"
      >
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        />
      </el-select>
    </el-popover>
  </div>
</template>

<script>
export default {
  props: {
    // 树结构数据
    data: {
      type: Array,
      default() {
        return [];
      },
    },
    defaultProps: {
      type: Object,
      default() {
        return {
          children: "children",
          label: "name",
        };
      },
    },
    // 配置是否可多选
    multiple: {
      type: Boolean,
      default() {
        return false;
      },
    },
    // 配置是否可清空选择
    clearable: {
      type: Boolean,
      default() {
        return false;
      },
    },
    // 配置多选时是否将选中值按文字的形式展示
    collapseTags: {
      type: Boolean,
      default() {
        return false;
      },
    },
    //唯一key值
    nodeKey: {
      type: String,
      default() {
        return "id";
      },
    },
    // 显示复选框情况下,是否严格遵循父子不互相关联
    checkStrictly: {
      type: Boolean,
      default() {
        return false;
      },
    },
    // 默认选中的节点key数组
    checkedKeys: {
      type: Array,
      default() {
        return [];
      },
    },
    // 输入框的尺寸
    size: {
      type: String,
      default() {
        return "medium";
      },
    },
    // 总体宽度
    width: {
      type: Number,
      default() {
        return 250;
      },
    },
    // 输入框的宽度
    inputWidth: {
      type: Number,
      default() {
        return 150;
      },
    },
    // 下拉框的高度
    height: {
      type: Number,
      default() {
        return 300;
      },
    },
    // 是否具有过滤搜索功能
    isFilter: {
      type: Boolean,
      default() {
        return true;
      },
    },
  },
  data() {
    return {
      filterText: "", //树搜索
      isShowSelect: false, // 是否显示树状选择器
      options: [],
      selectedData: [], // 选中的节点
      style: "width:" + this.width + "px;" + "height:" + this.height + "px;",
      selectStyle: "width:" + this.inputWidth + "px;",
      checkedIds: [],
      checkedData: [],
    };
  },
  watch: {
    filterText(val) {
      this.$refs.tree.filter(val);
    },
    // eslint-disable-next-line no-unused-vars
    isShowSelect(val) {
      // 隐藏select自带的下拉框
      this.$refs.select.blur();
    },
    checkedKeys(val) {
      console.log("checkedKeys", val);
      if (!val) return;
      // eslint-disable-next-line vue/no-mutating-props
      this.checkedKeys = val;
      this.initCheckedData();
    },
  },
  mounted() {
    this.initCheckedData();
  },
  methods: {
    //过滤函数
    filterNode(value, data) {
      if (!value) return true;
      return data[this.defaultProps.label].indexOf(value) !== -1;
    },
    // 单选时点击tree节点,设置select选项
    setSelectOption(node) {
      // console.log("~~~~~",node)
      const tmpMap = {};
      tmpMap.value = node.key;
      tmpMap.label = node.label;
      this.options = [];
      this.options.push(tmpMap);
      this.selectedData = node.key;
    },
    // 单选,选中传进来的节点
    checkSelectedNode(checkedKeys) {
      var item = checkedKeys[0];
      this.$refs.tree.setCurrentKey(item);
      var node = this.$refs.tree.getNode(item);
      // console.log("checkSelectedNode",this.$refs.tree)
      this.setSelectOption(node);
    },
    // 多选,勾选上传进来的节点
    checkSelectedNodes(checkedKeys) {
      // this.$refs.tree.setCheckedKeys(checkedKeys)
      // console.log("checkSelectedNodes-checkedKeys",checkedKeys)
      // 优化select回显显示 有个延迟的效果
      const that = this;
      setTimeout(function () {
        that.$refs.tree.setCheckedKeys(checkedKeys);
      }, 10);
      this.$forceUpdate();
      // console.log('checkSelectedNodes', this.selectedData)
    },
    // 单选,清空选中
    clearSelectedNode() {
      this.selectedData = [];
      this.$refs.tree.setCurrentKey(null);
    },
    // 多选,清空所有勾选
    clearSelectedNodes() {
      var checkedKeys = this.$refs.tree.getCheckedKeys(); // 所有被选中的节点的 key 所组成的数组数据
      for (let i = 0; i < checkedKeys.length; i++) {
        this.$refs.tree.setChecked(checkedKeys[i], false);
      }
    },
    // 在组件初始化时,根据传递的默认选中节点信息,设置树形结构中的节点的选中状态。
    initCheckedData() {
      if (this.multiple) {
        // 多选
        // console.log(this.checkedKeys.length)
        if (this.checkedKeys.length > 0) {
          this.checkSelectedNodes(this.checkedKeys);
        } else {
          this.clearSelectedNodes();
        }
      } else {
        // 单选
        if (this.checkedKeys.length > 0) {
          this.checkSelectedNode(this.checkedKeys);
        } else {
          this.clearSelectedNode();
        }
      }
    },
    popoverHide() {
      if (this.multiple) {
        this.checkedIds = this.$refs.tree.getCheckedKeys(); // 所有被选中的节点的 key 所组成的数组数据
        this.checkedData = this.$refs.tree.getCheckedNodes(); // 所有被选中的节点所组成的数组数据
      } else {
        this.checkedIds = this.$refs.tree.getCurrentKey();
        this.checkedData = this.$refs.tree.getCurrentNode();
      }
      this.$emit("popoverHide", this.checkedIds, this.checkedData);
    },
    // 单选,节点被点击时的回调,返回被点击的节点数据
    handleNodeClick(data, node) {
      if (!this.multiple) {
        this.setSelectOption(node);
        this.isShowSelect = !this.isShowSelect;
        this.$emit("change", this.selectedData);
      }
    },
    // 多选,节点勾选状态发生变化时的回调
    handleCheckChange() {
      var checkedKeys = this.$refs.tree.getCheckedKeys(); // 所有被选中的节点的 key 所组成的数组数据
      this.options = checkedKeys.map((item) => {
        var node = this.$refs.tree.getNode(item); // 所有被选中的节点对应的node
        const tmpMap = {};
        tmpMap.value = node.key;
        tmpMap.label = node.label;
        return tmpMap;
      });
      this.selectedData = this.options.map((item) => {
        return item.value;
      });
      this.$emit("change", this.selectedData);
    },
    // 多选,删除任一select选项的回调
    removeSelectedNodes(val) {
      this.$refs.tree.setChecked(val, false);
      var node = this.$refs.tree.getNode(val);
      if (!this.checkStrictly && node.childNodes.length > 0) {
        this.treeToList(node).map((item) => {
          if (item.childNodes.length <= 0) {
            this.$refs.tree.setChecked(item, false);
          }
        });
        this.handleCheckChange();
      }
      this.$emit("change", this.selectedData);
    },
    treeToList(tree) {
      var queen = [];
      var out = [];
      queen = queen.concat(tree);
      while (queen.length) {
        var first = queen.shift();
        if (first.childNodes) {
          queen = queen.concat(first.childNodes);
        }
        out.push(first);
      }
      return out;
    },
    // 单选,清空select输入框的回调
    removeSelectedNode() {
      this.clearSelectedNode();
      this.$emit("change", this.selectedData);
    },
    // 选中的select选项改变的回调
    changeSelectedNodes(selectedData) {
      // 多选,清空select输入框时,清除树勾选
      if (this.multiple && selectedData.length <= 0) {
        this.clearSelectedNodes();
      }
      this.$emit("change", this.selectedData);
    },
  },
};
</script>
<style scoped>
.mask {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  opacity: 0;
  z-index: 11;
}

.common-tree {
  overflow: auto;
}

.tree-select {
  z-index: 111;
}
</style>

参数方法说明

属性说明
height下拉框中树形高度 height=“400”
width下拉框中树形宽度 width =“400”
isFilter是否出现树结构搜索过滤 默认为true
size输入框的尺寸: medium/small/mini
data树结构的数据
defaultProps树结构的props,树结构说明
multiple是否多选
inputWidth输入框的长度 Number
clearable是否可清空选择
collapseTags多选时将选中值按文字的形式展示
checkStrictly多选时,严格遵循父子不互相关联
nodeKey绑定nodeKey,默认绑定’id’
checkedKeys传递默认选中的节点key组成的数组
@popoverHide=“popoverHide”事件有两个参数:第一个是所有选中的节点ID,第二个是所有选中的节点数据
@change=“clearKey”当选项改变时触发

组件使用包含模拟数据

<template>
  <div>
    <HSKselecte
      v-model="workName"
      :inputWidth="250"
      :data="treeData"
      v-show="dialogFormVisible"
      style="'width: 100%'"
      :checkedKeys="defaultCheckedKeys"
      @change="clearKey"
      :isFilter="isFilter"
      clearable
      :multiple="multiple"
      @popoverHide="onCateSelect"
    >
    </HSKselecte>
  </div>
</template>
<script>
// import selectTree from "@/package/hsk-treeSelect/index.vue";
import HSKselecte from "../package/hsk-treeSelect/index.vue";
export default {
  data() {
    return {
      isFilter:true,
      multiple:true,
      radio1:'',
      workName:'',
      dialogFormVisible: true,
      selectType: "sigle",
      defaultCheckedKeys: [],
      defaultExpandedKeys: [],
      checkedKeys: [],
      treeData: [
        {
          id: "platform-1651478710725455875",
          parentId: null,
          name: "基础信息",
          identification: null,
          url: null,
          sortNo: null,
          menuType: "0",
          permissionGroupId: null,
          checkFlag: null,
          platformId: null,
          children: [
            {
              id: "1",
              parentId: "0",
              name: "生产单位管理",
              identification: null,
              url: "/workUnit",
              sortNo: "1",
              menuType: "1",
              permissionGroupId: null,
              checkFlag: true,
              platformId: "1651478710725455875",
              children: [
                {
                  id: "6",
                  parentId: "1",
                  name: "生产单位",
                  identification: null,
                  url: "workUnit",
                  sortNo: "1",
                  menuType: "2",
                  permissionGroupId: null,
                  checkFlag: true,
                  platformId: "1651478710725455875",
                  children: [
                    {
                      id: "pagInfo-1",
                      parentId: "6",
                      name: "车间管理",
                      identification: null,
                      url: null,
                      sortNo: null,
                      menuType: "3",
                      permissionGroupId: null,
                      checkFlag: null,
                      platformId: null,
                      children: [
                        {
                          id: "17",
                          parentId: "pagInfo-1",
                          name: "新增",
                          identification:
                            "basic:productionUnitManagement:productionUnit:addworkshop",
                          url: null,
                          sortNo: "1",
                          menuType: "4",
                          permissionGroupId: "1",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "18",
                          parentId: "pagInfo-1",
                          name: "修改",
                          identification:
                            "basic:productionUnitManagement:productionUnit:editshop",
                          url: null,
                          sortNo: "2",
                          menuType: "4",
                          permissionGroupId: "1",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "19",
                          parentId: "pagInfo-1",
                          name: "删除",
                          identification:
                            "basic:productionUnitManagement:productionUnit:deleteshop",
                          url: null,
                          sortNo: "3",
                          menuType: "4",
                          permissionGroupId: "1",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "20",
                          parentId: "pagInfo-1",
                          name: "设置状态",
                          identification:
                            "basic:productionUnitManagement:productionUnit:editshopstatus",
                          url: null,
                          sortNo: "4",
                          menuType: "4",
                          permissionGroupId: "1",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                      ],
                    },
                    {
                      id: "pagInfo-2",
                      parentId: "6",
                      name: "工作中心管理",
                      identification: null,
                      url: null,
                      sortNo: null,
                      menuType: "3",
                      permissionGroupId: null,
                      checkFlag: null,
                      platformId: null,
                      children: [
                        {
                          id: "21",
                          parentId: "pagInfo-2",
                          name: "新增",
                          identification:
                            "basic:productionUnitManagement:productionUnit:addworkcenter",
                          url: null,
                          sortNo: "5",
                          menuType: "4",
                          permissionGroupId: "2",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "22",
                          parentId: "pagInfo-2",
                          name: "修改",
                          identification:
                            "basic:productionUnitManagement:productionUnit:editworkcenter",
                          url: null,
                          sortNo: "6",
                          menuType: "4",
                          permissionGroupId: "2",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "23",
                          parentId: "pagInfo-2",
                          name: "删除",
                          identification:
                            "basic:productionUnitManagement:productionUnit:deleteworkcenter",
                          url: null,
                          sortNo: "7",
                          menuType: "4",
                          permissionGroupId: "2",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "24",
                          parentId: "pagInfo-2",
                          name: "设置状态",
                          identification:
                            "basic:productionUnitManagement:productionUnit:editworkcenterstatus",
                          url: null,
                          sortNo: "8",
                          menuType: "4",
                          permissionGroupId: "2",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                      ],
                    },
                    {
                      id: "pagInfo-3",
                      parentId: "6",
                      name: "产线管理",
                      identification: null,
                      url: null,
                      sortNo: null,
                      menuType: "3",
                      permissionGroupId: null,
                      checkFlag: null,
                      platformId: null,
                      children: [
                        {
                          id: "25",
                          parentId: "pagInfo-3",
                          name: "新增",
                          identification:
                            "basic:productionUnitManagement:productionUnit:addproductionline",
                          url: null,
                          sortNo: "9",
                          menuType: "4",
                          permissionGroupId: "3",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "26",
                          parentId: "pagInfo-3",
                          name: "修改",
                          identification:
                            "basic:productionUnitManagement:productionUnit:editproductionline",
                          url: null,
                          sortNo: "10",
                          menuType: "4",
                          permissionGroupId: "3",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "27",
                          parentId: "pagInfo-3",
                          name: "删除",
                          identification:
                            "basic:productionUnitManagement:productionUnit:deleteproductionline",
                          url: null,
                          sortNo: "11",
                          menuType: "4",
                          permissionGroupId: "3",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "28",
                          parentId: "pagInfo-3",
                          name: "设置状态",
                          identification:
                            "basic:productionUnitManagement:productionUnit:editproductionlinestatus",
                          url: null,
                          sortNo: "12",
                          menuType: "4",
                          permissionGroupId: "3",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                      ],
                    },
                    {
                      id: "pagInfo-4",
                      parentId: "6",
                      name: "设备管理",
                      identification: null,
                      url: null,
                      sortNo: null,
                      menuType: "3",
                      permissionGroupId: null,
                      checkFlag: null,
                      platformId: null,
                      children: [
                        {
                          id: "29",
                          parentId: "pagInfo-4",
                          name: "绑定",
                          identification:
                            "basic:productionUnitManagement:productionUnit:bindequipment",
                          url: null,
                          sortNo: "13",
                          menuType: "4",
                          permissionGroupId: "4",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "30",
                          parentId: "pagInfo-4",
                          name: "解绑",
                          identification:
                            "basic:productionUnitManagement:productionUnit:unbindequipment",
                          url: null,
                          sortNo: "14",
                          menuType: "4",
                          permissionGroupId: "4",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                      ],
                    },
                  ],
                },
                {
                  id: "7",
                  parentId: "1",
                  name: "设备保养计划",
                  identification: null,
                  url: "maintenancePlan",
                  sortNo: "2",
                  menuType: "2",
                  permissionGroupId: null,
                  checkFlag: true,
                  platformId: "1651478710725455875",
                  children: [
                    {
                      id: "31",
                      parentId: "7",
                      name: "新增",
                      identification:
                        "basic:productionUnitManagement:maintenancePlan:addPlan",
                      url: null,
                      sortNo: "1",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "32",
                      parentId: "7",
                      name: "修改",
                      identification:
                        "basic:productionUnitManagement:maintenancePlan:editPlan",
                      url: null,
                      sortNo: "2",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "33",
                      parentId: "7",
                      name: "删除",
                      identification:
                        "basic:productionUnitManagement:maintenancePlan:deletePlan",
                      url: null,
                      sortNo: "3",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "39",
                      parentId: "7",
                      name: "导入模板",
                      identification:
                        "basic:productionUnitManagement:maintenancePlan:importPlan",
                      url: null,
                      sortNo: "5",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "97",
                      parentId: "7",
                      name: "查看详情",
                      identification:
                        "basic:productionUnitManagement:maintenancePlan:detailPlan",
                      url: null,
                      sortNo: "6",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                  ],
                },
                {
                  id: "8",
                  parentId: "1",
                  name: "设备管理",
                  identification: null,
                  url: "equipment",
                  sortNo: "3",
                  menuType: "2",
                  permissionGroupId: null,
                  checkFlag: true,
                  platformId: "1651478710725455875",
                  children: [
                    {
                      id: "34",
                      parentId: "8",
                      name: "新增",
                      identification:
                        "basic:productionUnitManagement:equipmentUnit:addequipment",
                      url: null,
                      sortNo: "1",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "35",
                      parentId: "8",
                      name: "修改",
                      identification:
                        "basic:productionUnitManagement:equipmentUnit:editequipment",
                      url: null,
                      sortNo: "2",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "36",
                      parentId: "8",
                      name: "删除",
                      identification:
                        "basic:productionUnitManagement:equipmentUnit:deleteequipment",
                      url: null,
                      sortNo: "3",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "37",
                      parentId: "8",
                      name: "设置状态",
                      identification:
                        "basic:productionUnitManagement:equipmentUnit:editequipmentstatus",
                      url: null,
                      sortNo: "4",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "41",
                      parentId: "8",
                      name: "导入模板",
                      identification:
                        "basic:productionUnitManagement:equipmentUnit:importtemplate",
                      url: null,
                      sortNo: "6",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                  ],
                },
              ],
            },
            {
              id: "2",
              parentId: "0",
              name: "用户权限管理",
              identification: null,
              url: "/user",
              sortNo: "2",
              menuType: "1",
              permissionGroupId: null,
              checkFlag: true,
              platformId: "1651478710725455875",
              children: [
                {
                  id: "9",
                  parentId: "2",
                  name: "用户管理",
                  identification: null,
                  url: "user",
                  sortNo: "1",
                  menuType: "2",
                  permissionGroupId: null,
                  checkFlag: true,
                  platformId: "1651478710725455875",
                  children: [
                    {
                      id: "pagInfo-5",
                      parentId: "9",
                      name: "部门管理",
                      identification: null,
                      url: null,
                      sortNo: null,
                      menuType: "3",
                      permissionGroupId: null,
                      checkFlag: null,
                      platformId: null,
                      children: [
                        {
                          id: "42",
                          parentId: "pagInfo-5",
                          name: "新增",
                          identification: "basic:userManage:depart:addDept",
                          url: null,
                          sortNo: "1",
                          menuType: "4",
                          permissionGroupId: "5",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "43",
                          parentId: "pagInfo-5",
                          name: "修改",
                          identification: "basic:userManage:depart:editDept",
                          url: null,
                          sortNo: "2",
                          menuType: "4",
                          permissionGroupId: "5",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "44",
                          parentId: "pagInfo-5",
                          name: "删除",
                          identification: "basic:userManage:depart:deleteDept",
                          url: null,
                          sortNo: "3",
                          menuType: "4",
                          permissionGroupId: "5",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                      ],
                    },
                    {
                      id: "pagInfo-6",
                      parentId: "9",
                      name: "用户管理",
                      identification: null,
                      url: null,
                      sortNo: null,
                      menuType: "3",
                      permissionGroupId: null,
                      checkFlag: null,
                      platformId: null,
                      children: [
                        {
                          id: "45",
                          parentId: "pagInfo-6",
                          name: "新增",
                          identification: "basic:userManage:user:adduser",
                          url: null,
                          sortNo: "4",
                          menuType: "4",
                          permissionGroupId: "6",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "46",
                          parentId: "pagInfo-6",
                          name: "修改",
                          identification: "basic:userManage:user:edituser",
                          url: null,
                          sortNo: "5",
                          menuType: "4",
                          permissionGroupId: "6",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "47",
                          parentId: "pagInfo-6",
                          name: "删除",
                          identification: "basic:userManage:user:deleteuser",
                          url: null,
                          sortNo: "6",
                          menuType: "4",
                          permissionGroupId: "6",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "48",
                          parentId: "pagInfo-6",
                          name: "设置状态",
                          identification:
                            "basic:userManage:user:edituserstatus",
                          url: null,
                          sortNo: "7",
                          menuType: "4",
                          permissionGroupId: "6",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "49",
                          parentId: "pagInfo-6",
                          name: "分配角色",
                          identification: "basic:userManage:user:assignroles",
                          url: null,
                          sortNo: "8",
                          menuType: "4",
                          permissionGroupId: "6",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "50",
                          parentId: "pagInfo-6",
                          name: "重置密码",
                          identification: "basic:userManage:user:userrepaw",
                          url: null,
                          sortNo: "9",
                          menuType: "4",
                          permissionGroupId: "6",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "52",
                          parentId: "pagInfo-6",
                          name: "导入模板",
                          identification:
                            "basic:userManage:user:importtemplate",
                          url: null,
                          sortNo: "11",
                          menuType: "4",
                          permissionGroupId: "6",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                      ],
                    },
                  ],
                },
                {
                  id: "10",
                  parentId: "2",
                  name: "角色管理",
                  identification: null,
                  url: "role",
                  sortNo: "2",
                  menuType: "2",
                  permissionGroupId: null,
                  checkFlag: true,
                  platformId: "1651478710725455875",
                  children: [
                    {
                      id: "53",
                      parentId: "10",
                      name: "分配权限",
                      identification: "basic:roleManage:role:assignauthority",
                      url: null,
                      sortNo: "1",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "54",
                      parentId: "10",
                      name: "新增",
                      identification: "basic:roleManage:role:addrole",
                      url: null,
                      sortNo: "2",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "55",
                      parentId: "10",
                      name: "修改",
                      identification: "basic:roleManage:role:editrole",
                      url: null,
                      sortNo: "3",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "56",
                      parentId: "10",
                      name: "删除",
                      identification: "basic:roleManage:role:deleterole",
                      url: null,
                      sortNo: "4",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                  ],
                },
              ],
            },
            {
              id: "3",
              parentId: "0",
              name: "生产物料管理",
              identification: null,
              url: "/material",
              sortNo: "3",
              menuType: "1",
              permissionGroupId: null,
              checkFlag: true,
              platformId: "1651478710725455875",
              children: [
                {
                  id: "11",
                  parentId: "3",
                  name: "物料管理",
                  identification: null,
                  url: "material",
                  sortNo: "1",
                  menuType: "2",
                  permissionGroupId: null,
                  checkFlag: true,
                  platformId: "1651478710725455875",
                  children: [
                    {
                      id: "57",
                      parentId: "11",
                      name: "新增",
                      identification:
                        "basic:materialUnitManagement:materialUnit:addmaterial",
                      url: null,
                      sortNo: "1",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "58",
                      parentId: "11",
                      name: "修改",
                      identification:
                        "basic:materialUnitManagement:materialUnit:editmaterial",
                      url: null,
                      sortNo: "2",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "59",
                      parentId: "11",
                      name: "删除",
                      identification:
                        "basic:materialUnitManagement:materialUnit:deletematerial",
                      url: null,
                      sortNo: "3",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "61",
                      parentId: "11",
                      name: "导入模板",
                      identification:
                        "basic:materialUnitManagement:materialUnit:importmaterial",
                      url: null,
                      sortNo: "5",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "62",
                      parentId: "11",
                      name: "导出",
                      identification:
                        "basic:materialUnitManagement:materialUnit:exportmaterial",
                      url: null,
                      sortNo: "6",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "98",
                      parentId: "11",
                      name: "新增bom",
                      identification:
                        "basic:materialUnitManagement:bomUnit:addbom",
                      url: null,
                      sortNo: "7",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "99",
                      parentId: "11",
                      name: "修改bom",
                      identification:
                        "basic:materialUnitManagement:bomUnit:editbom",
                      url: null,
                      sortNo: "8",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "100",
                      parentId: "11",
                      name: "新增工艺路线",
                      identification:
                        "basic:materialUnitManagement:processrouteUnit:addprocessroute",
                      url: null,
                      sortNo: "9",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "101",
                      parentId: "11",
                      name: "修改工艺路线",
                      identification:
                        "basic:materialUnitManagement:processrouteUnit:editprocessroute",
                      url: null,
                      sortNo: "10",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                  ],
                },
                {
                  id: "12",
                  parentId: "3",
                  name: "BOM管理",
                  identification: null,
                  url: "bom",
                  sortNo: "2",
                  menuType: "2",
                  permissionGroupId: null,
                  checkFlag: true,
                  platformId: "1651478710725455875",
                  children: [
                    {
                      id: "63",
                      parentId: "12",
                      name: "新增",
                      identification:
                        "basic:materialUnitManagement:bomUnit:addbom",
                      url: null,
                      sortNo: "1",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "64",
                      parentId: "12",
                      name: "修改",
                      identification:
                        "basic:materialUnitManagement:bomUnit:editbom",
                      url: null,
                      sortNo: "2",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "65",
                      parentId: "12",
                      name: "删除",
                      identification:
                        "basic:materialUnitManagement:bomUnit:deletebom",
                      url: null,
                      sortNo: "3",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "67",
                      parentId: "12",
                      name: "导入模板",
                      identification:
                        "basic:materialUnitManagement:bomUnit:importbom",
                      url: null,
                      sortNo: "5",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "68",
                      parentId: "12",
                      name: "设置状态",
                      identification:
                        "basic:materialUnitManagement:bomUnit:editbomstatus",
                      url: null,
                      sortNo: "6",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                  ],
                },
                {
                  id: "13",
                  parentId: "3",
                  name: "工艺路线管理",
                  identification: null,
                  url: "processRoute",
                  sortNo: "3",
                  menuType: "2",
                  permissionGroupId: null,
                  checkFlag: true,
                  platformId: "1651478710725455875",
                  children: [
                    {
                      id: "69",
                      parentId: "13",
                      name: "新增",
                      identification:
                        "basic:materialUnitManagement:processrouteUnit:addprocessroute",
                      url: null,
                      sortNo: "1",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "70",
                      parentId: "13",
                      name: "修改",
                      identification:
                        "basic:materialUnitManagement:processrouteUnit:editprocessroute",
                      url: null,
                      sortNo: "2",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "71",
                      parentId: "13",
                      name: "删除",
                      identification:
                        "basic:materialUnitManagement:processrouteUnit:deleteprocessroute",
                      url: null,
                      sortNo: "3",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "72",
                      parentId: "13",
                      name: "设置状态",
                      identification:
                        "basic:materialUnitManagement:processrouteUnit:editprocessroutestatus",
                      url: null,
                      sortNo: "4",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "74",
                      parentId: "13",
                      name: "导入模板",
                      identification:
                        "basic:materialUnitManagement:processrouteUnit:importprocessroute",
                      url: null,
                      sortNo: "6",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                  ],
                },
                {
                  id: "14",
                  parentId: "3",
                  name: "工艺管理",
                  identification: null,
                  url: "technology",
                  sortNo: "4",
                  menuType: "2",
                  permissionGroupId: null,
                  checkFlag: true,
                  platformId: "1651478710725455875",
                  children: [
                    {
                      id: "75",
                      parentId: "14",
                      name: "新增",
                      identification: "basic:technologyManage:technology:add",
                      url: null,
                      sortNo: "1",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "76",
                      parentId: "14",
                      name: "修改",
                      identification: "basic:technologyManage:technology:edit",
                      url: null,
                      sortNo: "2",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "77",
                      parentId: "14",
                      name: "删除",
                      identification:
                        "basic:technologyManage:technology:delete",
                      url: null,
                      sortNo: "3",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "78",
                      parentId: "14",
                      name: "设置状态",
                      identification:
                        "basic:technologyManage:technology:edittechnologystatus",
                      url: null,
                      sortNo: "4",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "80",
                      parentId: "14",
                      name: "导入模板",
                      identification:
                        "basic:technologyManage:technology:importtemplate",
                      url: null,
                      sortNo: "6",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                  ],
                },
              ],
            },
            {
              id: "4",
              parentId: "0",
              name: "生产日历管理",
              identification: null,
              url: "/calendar",
              sortNo: "4",
              menuType: "1",
              permissionGroupId: null,
              checkFlag: true,
              platformId: "1651478710725455875",
              children: [
                {
                  id: "15",
                  parentId: "4",
                  name: "工作日历",
                  identification: null,
                  url: "calendar",
                  sortNo: "1",
                  menuType: "2",
                  permissionGroupId: null,
                  checkFlag: true,
                  platformId: "1651478710725455875",
                  children: [
                    {
                      id: "81",
                      parentId: "15",
                      name: "新增",
                      identification:
                        "basic:calendarUnitManagement:calendarUnit:addcalendar",
                      url: null,
                      sortNo: "1",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "82",
                      parentId: "15",
                      name: "修改",
                      identification:
                        "basic:calendarUnitManagement:calendarUnit:editcalendar",
                      url: null,
                      sortNo: "2",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "83",
                      parentId: "15",
                      name: "删除",
                      identification:
                        "basic:calendarUnitManagement:calendarUnit:deletecalendar",
                      url: null,
                      sortNo: "3",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "84",
                      parentId: "15",
                      name: "配置班次",
                      identification:
                        "basic:calendarUnitManagement:calendarUnit:configclassforcalendar",
                      url: null,
                      sortNo: "4",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                  ],
                },
                {
                  id: "16",
                  parentId: "4",
                  name: "班次管理",
                  identification: null,
                  url: "scheduling",
                  sortNo: "2",
                  menuType: "2",
                  permissionGroupId: null,
                  checkFlag: true,
                  platformId: "1651478710725455875",
                  children: [
                    {
                      id: "85",
                      parentId: "16",
                      name: "新增",
                      identification:
                        "basic:calendarUnitManagement:scheduleUnit:addschedule",
                      url: null,
                      sortNo: "1",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "86",
                      parentId: "16",
                      name: "修改",
                      identification:
                        "basic:calendarUnitManagement:scheduleUnit:editschedule",
                      url: null,
                      sortNo: "2",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "87",
                      parentId: "16",
                      name: "删除",
                      identification:
                        "basic:calendarUnitManagement:scheduleUnit:deleteschedule",
                      url: null,
                      sortNo: "3",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "88",
                      parentId: "16",
                      name: "设置状态",
                      identification:
                        "basic:calendarUnitManagement:scheduleUnit:editschedulestatus",
                      url: null,
                      sortNo: "4",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                  ],
                },
              ],
            },
            {
              id: "5",
              parentId: "0",
              name: "系统信息",
              identification: null,
              url: "/bmgl",
              sortNo: "5",
              menuType: "1",
              permissionGroupId: null,
              checkFlag: true,
              platformId: "1651478710725455875",
              children: [
                {
                  id: "89",
                  parentId: "5",
                  name: "编码管理",
                  identification: null,
                  url: "bmgl",
                  sortNo: "1",
                  menuType: "2",
                  permissionGroupId: null,
                  checkFlag: true,
                  platformId: "1651478710725455875",
                  children: [
                    {
                      id: "90",
                      parentId: "89",
                      name: "修改",
                      identification: "basic:codeManage:code:edit",
                      url: null,
                      sortNo: "1",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                    {
                      id: "91",
                      parentId: "89",
                      name: "设置状态",
                      identification: "basic:codeManage:code:editcodestatus",
                      url: null,
                      sortNo: "2",
                      menuType: "4",
                      permissionGroupId: null,
                      checkFlag: true,
                      platformId: "1651478710725455875",
                      children: [],
                    },
                  ],
                },
                {
                  id: "92",
                  parentId: "5",
                  name: "操作日志",
                  identification: null,
                  url: "operateLog",
                  sortNo: "2",
                  menuType: "2",
                  permissionGroupId: null,
                  checkFlag: true,
                  platformId: "1651478710725455875",
                  children: [],
                },
                {
                  id: "93",
                  parentId: "5",
                  name: "信息导入",
                  identification: null,
                  url: "informationImport",
                  sortNo: "3",
                  menuType: "2",
                  permissionGroupId: null,
                  checkFlag: true,
                  platformId: "1651478710725455875",
                  children: [
                    {
                      id: "pagInfo-7",
                      parentId: "93",
                      name: "数据导入",
                      identification: null,
                      url: null,
                      sortNo: null,
                      menuType: "3",
                      permissionGroupId: null,
                      checkFlag: null,
                      platformId: null,
                      children: [
                        {
                          id: "94",
                          parentId: "pagInfo-7",
                          name: "模板下载",
                          identification:
                            "basic:Infoimport:import:downloadtemplate",
                          url: null,
                          sortNo: "1",
                          menuType: "4",
                          permissionGroupId: "7",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                        {
                          id: "95",
                          parentId: "pagInfo-7",
                          name: "数据导入",
                          identification:
                            "basic:Infoimport:import:importtemplate",
                          url: null,
                          sortNo: "2",
                          menuType: "4",
                          permissionGroupId: "7",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                      ],
                    },
                    {
                      id: "pagInfo-8",
                      parentId: "93",
                      name: "导入记录",
                      identification: null,
                      url: null,
                      sortNo: null,
                      menuType: "3",
                      permissionGroupId: null,
                      checkFlag: null,
                      platformId: null,
                      children: [
                        {
                          id: "96",
                          parentId: "pagInfo-8",
                          name: "错误数据下载",
                          identification:
                            "basic:Infoimport:import:downloaderrdata",
                          url: null,
                          sortNo: "3",
                          menuType: "4",
                          permissionGroupId: "8",
                          checkFlag: true,
                          platformId: "1651478710725455875",
                          children: [],
                        },
                      ],
                    },
                  ],
                },
              ],
            },
          ],
        },
      ],
    };
  },
  components: {
    // selectTree,
    HSKselecte,
  },
  props: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
     onCateSelect(a,b){
      console.log("onCateSelect",a,b)
    },
    clearKey(a){
      console.log(a)
    },
    //获取勾选数据
    getdetail(val) {
      this.defaultKey = [];
      this.defaultKey.push(val);
      // this.form.workGroupId = val.workGroupId;
    },
    changeTreeItem(res) {
      console.log(res);
    },
    getGroupSequence() {
      return this.treeData;
    },
  },
};
</script>
<style scoped>
.flex1 {
  flex: 1;
}
</style>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1354117.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

智慧工厂:科技与制造融合创新之路

随着科技的迅猛发展&#xff0c;智慧工厂成为制造业领域的热门话题。智慧工厂利用先进的技术和智能化系统&#xff0c;以提高生产效率、降低成本、增强产品质量和灵活性为目标&#xff0c;正在引领着未来制造业的发展。 智慧工厂的核心是数字化和自动化生产&#xff0c;相较于传…

C语言实例_string.h库函数功能及其用法详解

一、前言 在计算机编程中&#xff0c;字符串处理是一项常见而重要的任务。C语言的string.h头文件提供了一系列函数和工具&#xff0c;用于对字符串进行操作和处理。这些函数包括字符串复制、连接、比较、查找等功能&#xff0c;为开发人员提供了强大的字符串处理能力。本文将对…

vue3中pdf打印问题处理

1 get请求参数问题 之前的请求是post得不到参数&#xff0c;今天发现的问题很奇怪&#xff0c;从前端进入网关&#xff0c;网关居然得不到参数。 前端代码 const print () > {let linkUrlStr proxy.$tool.getUrlStr(proxy.$api.invOrder.psiInvOrder.printSalOutstock,{a…

Winform中使用Websocket4Net实现Websocket客户端并定时存储接收数据到SQLite中

场景 SpringBootVue整合WebSocket实现前后端消息推送&#xff1a; SpringBootVue整合WebSocket实现前后端消息推送_websocket vue3.0 springboot 往客户端推送-CSDN博客 上面实现ws推送数据流程后&#xff0c;需要在windows上使用ws客户端定时记录收到的数据到文件中&#x…

鸿蒙开发学习——基本组件

文章目录 引言正文Image组件设置加载网络图片图片属性设置 Text组件设置文本显示内容text属性设置 TextInput输入文本TextInput Controller获取输入文本 Button按钮 引言 最近在学习鸿蒙系统开发&#xff0c;然后对着文档看还是有很多问题&#xff0c;这里结合官方给的demo进行…

在ARMv8中aarch64与aarch32切换

需求描述 在项目调试过程中,由于内存或磁盘空间不足需要将系统从aarch64切换到aarch32的运行状态去执行,接下来记录cortexA53的调试过程。 相关寄存器描述 ARM64: SPSR_EL3 N (Negative):表示运算结果的最高位,用于指示运算结果是否为负数。 Z (Zero):表示运算结果是否…

设计模式之建造者模式【创造者模式】

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档> 学习的最大理由是想摆脱平庸&#xff0c;早一天就多一份人生的精彩&#xff1b;迟一天就多一天平庸的困扰。各位小伙伴&#xff0c;如果您&#xff1a; 想系统/深入学习某…

c++语言基础17-判断集合成员

题目描述 请你编写一个程序&#xff0c;判断给定的整数 n 是否存在于给定的集合中。 输入描述 有多组测试数据&#xff0c;第一行有一个整数 k&#xff0c;代表有 k 组测试数据。 每组数据第一行首先是一个正整数 m&#xff0c;表示集合中元素的数量&#xff08;1 < m &…

程序媛的mac修炼手册--MacOS系统更新升级史

啊&#xff0c;我这个口罩三年从未感染过新冠的天选免疫王&#xff0c;却被支原体击倒&#x1f637;大意了&#xff0c;前几天去医院体检&#xff0c;刚检查完出医院就摘口罩了&#x1f926;大伙儿还是要注意戴口罩&#xff0c;保重身体啊&#xff01;身体欠恙&#xff0c;就闲…

微软截图工具SnippingTool_6.1.7601免费版

SnippingTool是一款win7系统自带的一款非常实用型截图工具&#xff0c;操作简单&#xff0c;点击“新建"可一键截图&#xff0c;截图之后会弹出编辑器&#xff0c;可以进行一些简单的勾画编辑操作&#xff0c;您可以使用笔、荧光笔、电子邮件或保存等选项。如果您的系统丢…

Liunx(CentOS)安装Nacos(单机启动,绑定Mysql)

Liunx安装Nacos(单机启动&#xff0c;绑定Mysql) 一&#xff0c;准备安装包 github下载点 二&#xff0c;在/usr/local/目录下创建一个文件夹用于上传和解压Nacos cd /usr/local/ #这里创建文件夹名字可随意&#xff0c;解压后会生成一个名为nacos的文件夹&#xff0c;后续…

全国计算机等级考试| 二级Python | 真题及解析(6)

全国计算机等级考试二级Python真题及解析(8)图文 一、选择题 1.python中表达式4**3=( )。 A.12 B.1 C.64 D.7 2.在Python中,通过( )函数查看字符的编码。 …

安全防御之授权和访问控制技术

授权和访问控制技术是安全防御中的重要组成部分&#xff0c;主要用于管理和限制对系统资源&#xff08;如数据、应用程序等&#xff09;的访问。授权控制用户可访问和操作的系统资源&#xff0c;而访问控制技术则负责在授权的基础上&#xff0c;确保只有经过授权的用户才能访问…

jQuery框架

1.1、jQuery简介 jQuery 是一个高效、精简并且功能丰富的 JavaScript 工具库。它提供的 API 易于使用且兼容众多浏览器&#xff0c;这让诸如 HTML 文档遍历和操作、事件处理、动画和 Ajax 操作更加简单。目前超过90%的网站都使用了jQuery库&#xff0c;jQuery的宗旨&#xff1…

ElecardStreamEye使用教程(视频质量分析工具、视频分析)

文章目录 Elecard StreamEye 使用教程安装与设置下载安装 界面导航主菜单视频窗口分析窗口 文件操作打开视频文件 视频流分析帧类型识别码率分析分析报告 高级功能视觉表示比较模式自动化脚本 下载地址1&#xff1a;https://www.onlinedown.net/soft/58792.htm 下载地址2&…

计算机系统基础

C 语言相关内容省略&#xff0c;复习自用&#xff0c;仅供参考~ 概述 冯诺伊曼结构 存储程序工作方式&#xff1a;将事先编好的程序和原始数据送入主存后才能执行程序&#xff0c;程序被启动执行后&#xff0c;计算机能在不需要操作人员干预下自动完成逐条指令取出和执行的任…

【电商项目实战】实现订单超时支付取消

&#x1f389;&#x1f389;欢迎来到我的CSDN主页&#xff01;&#x1f389;&#x1f389; &#x1f3c5;我是Java方文山&#xff0c;一个在CSDN分享笔记的博主。&#x1f4da;&#x1f4da; &#x1f31f;推荐给大家我的专栏《电商项目实战》。&#x1f3af;&#x1f3af; &am…

OpenHarmony源码转换器—多线程特性转换

本文讨论了如何将多线程的 Java 代码转换为 OpenHarmony ArkTS 代码​ 一、简介 Java 内存共享模型 以下示例伪代码和示意图展示了如何使用内存共享模型解决生产者消费者问题。 生产者消费者与共享内存间交互示意图 为了避免不同生产者或消费者同时访问一块共享内存的容器时…

阶段十-分布式-Redis02

第一章 Redis 事务 1.1 节 数据库事务复习 数据库事务的四大特性 A&#xff1a;Atomic &#xff0c;原子性&#xff0c;将所以SQL作为原子工作单元执行&#xff0c;要么全部执行&#xff0c;要么全部不执行&#xff1b;C&#xff1a;Consistent&#xff0c;一致性&#xff0…

Vue前端文字效果:如何让一段文本像是手动一个一个字打出来的

效果展示 自己做的AI聊天机器人界面&#xff0c;我觉得比微信还好看 由于这个前端略微复杂&#xff0c;下文用最简单的例子来展示&#xff1a; 分析需求 对于AI聊天工具的前端&#xff0c;如果AI生成的文本像是一个一个字打出来的&#xff0c;就会让AI看起来更像真的人&…