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

效果:

基于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><divv-show="isShowSelect"class="mask"@click="isShowSelect = !isShowSelect"/><el-popoverv-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-treeref="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-selectslot="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-optionv-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-varsisShowSelect(val) {// 隐藏select自带的下拉框this.$refs.select.blur();},checkedKeys(val) {console.log("checkedKeys", val);if (!val) return;// eslint-disable-next-line vue/no-mutating-propsthis.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); // 所有被选中的节点对应的nodeconst 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><HSKselectev-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.rhkb.cn/news/232299.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

计算机组成原理-进位计数制(进制表示 进制转换 真值和机器树)

文章目录 现代计算机的结构总览最古老的计数方法十进制计数法推广&#xff1a;r进制计数法任意进制->十进制二进制<--->八进制&#xff0c;十六进制 各种进制常见的书写方式十进制->任意进制整数部分小数部分 十进制->二进制&#xff08;拼凑法&#xff09;真值…

Linux基础——进程初识(二)

1. 对当前目录创建文件的理解 我们知道在创建一个文件时&#xff0c;它会被默认创建到当前目录下&#xff0c;那么它是如何知道当前目录的呢&#xff1f; 对于下面这样一段代码 #include <stdio.h> #include <unistd.h>int main() {fopen("tmp.txt", …

WPF 新手指引弹窗

新手指引弹窗介绍 我们在第一次使用某个软件时&#xff0c;通常会有一个“新手指引”教学引导。WPF实现“新手指引”非常方便&#xff0c;且非常有趣。接下来我们就开始制作一个简单的”新手指引”(代码简单易懂&#xff0c;便于移植)&#xff0c;引用到我们的项目中又可添加一…

钡铼技术2023年年度报告来了

不积跬步&#xff0c;无以至千里&#xff1b; 不积小流&#xff0c;无以成江海。 钡铼的2023年 平凡却又意义深远。 在工业自动化及物联网技术发展的道路上&#xff0c;钡铼技术每一个进步都源于不懈的努力和持续的积累。钡铼技术在过去的一年中&#xff0c;稳扎稳打&#xf…

Redis高级特性和应用(慢查询、Pipeline、事务、Lua)

Redis的慢查询 许多存储系统(例如 MySQL)提供慢查询日志帮助开发和运维人员定位系统存在的慢操作。所谓慢查询日志就是系统在命令执行前后计算每条命令的执行时间,当超过预设阀值,就将这条命令的相关信息(例如:发生时间,耗时,命令的详细信息)记录下来,Redis也提供了类似…

剧本杀小程序/APP搭建,增加玩家游戏体验

近年来&#xff0c;剧本杀游戏成为了年轻人娱乐的新方式&#xff0c;受到了年轻人的追捧。 剧本杀是一种新型的社交游戏&#xff0c;在游戏中&#xff0c;玩家不仅可以进行角色扮演&#xff0c;也能够交到好友&#xff0c;符合当下年轻人的生活模式。 小程序、app是当下剧本杀…

【计算机毕业设计】python+django数码电子论坛系统设计与实现

本系统主要包括管理员和用户两个角色组成&#xff1b;主要包括&#xff1a;首页、个人中心、用户管理、分类管理、数码板块管理、数码评价管理、数码论坛管理、畅聊板块管理、系统管理等功能的管理系统。 后端&#xff1a;pythondjango 前端&#xff1a;vue.jselementui 框架&a…

UntiyShader(七)Debug

目录 前言 一、利用假彩色图像 二、利用Visual Studio 三、帧调试器 前言 Debug&#xff08;调试&#xff09;&#xff0c;是程序员检查问题的一种方法&#xff0c;对于一个Shader调试更是一种噩梦&#xff0c;这也是Shader难写的原因之一——如果效果不对&#xff0c;我们…

外包干了4个月,技术退步明显了...

先说一下自己的情况&#xff0c;大专生&#xff0c;18年通过校招进入武汉某软件公司&#xff0c;干了接近4年的功能测试&#xff0c;今年年初&#xff0c;感觉自己不能够在这样下去了&#xff0c;长时间呆在一个舒适的环境会让一个人堕落&#xff01; 而我已经在一个企业干了四…

SQL 在已有表中修改列名的方法

文章目录 1. MySQL2. SQL Server3. Oracle / PostgreSQL Question&#xff1a; 假设有一张表 StudentInfo&#xff0c;表中有一个列名是 Student_Name &#xff0c;想要把这个列名改成 StudentName 应该如何操作&#xff1f; 建表语句如下&#xff1a; --建表 if object_id(S…

linux(centos)相关

文件架构&#xff1a; bin--binary--二进制命令&#xff0c;可直接执行 sbin systembin系统二进制命令&#xff0c;超级管理员 lib 库目录 类似dll文件 lib64 64位系统相关的库文件 usr 用户文件 boot 引导分区的文件&#xff0c;链接&#xff0c;系统启动等 dev device设备目录…

前端--基础 常用标签-超链接标签 外部链接( herf 和 target)

目录 超链接标签 &#xff1a; 超链接的语法格式 &#xff1a; 超链接的属性 &#xff1a; 超链接的分类 &#xff1a; 外部链接 &#xff1a; 超链接标签 &#xff1a; # 在 HTML 标签中&#xff0c;<a> 标签用于定义超链接&#xff0c;作用是从一个页面…

第13课 利用openCV检测物体是否运动了

FFmpeg与openCV绝对是绝配。前面我们已经基本熟悉了FFmpeg的工作流程&#xff0c;这一章我们重点来看看openCV。 在前面&#xff0c;我们已经使用openCV打开过摄像头并在MFC中显示图像&#xff0c;但openCV能做的要远超你的想像&#xff0c;比如可以用它来实现人脸检测、车牌识…

【Unity嵌入Android原生工程】

Unity嵌入Android原生工程 本章学习,Unity模块嵌入Android## 标题Unity导出Android工程创建Android Studio工程Unity嵌入到Andorid StudioAndroid原生代码跳转到Unity场景工作需要嵌入原生工程,并实现热更,记录一下 工具,Unity2023.3.14,Android Studio 2022.3.1 patch3 Un…

JVM知识总结(简单且高效)

1. JVM内存与本地内存 JVM内存&#xff1a;受虚拟机内存大小的参数控制&#xff0c;当大小超过参数设置的大小时会报OOM。本地内存&#xff1a;本地内存不受虚拟机内存参数的限制&#xff0c;只受物理内存容量的限制&#xff1b;虽然不受参数的限制&#xff0c;如果所占内存超过…

网络安全红队常用的攻击方法及路径

一、信息收集 收集的内容包括目标系统的组织架构、IT资产、敏感信息泄露、供应商信息等各个方面&#xff0c;通过对收集的信息进行梳理&#xff0c;定位到安全薄弱点&#xff0c;从而实施下一步的攻击行为。 域名收集 1.备案查询 天眼查爱企查官方ICP备案查询 通过以上三个…

抖店入驻条件是什么?需要多少费用?

我是电商珠珠 新手入驻抖店最关心的就是抖店的入驻条件&#xff0c;以及费用&#xff0c;今天我就来给大家详细的讲一下。 入驻条件 1、营业执照 入驻抖店新手需要准备一张个体工营业执照&#xff0c;在办理营业执照的时候要办理全类目的&#xff0c;我这里有份全类目营业执…

云服务器安装mysql全流程

一、下载安装包 官网链接&#xff1a;MySQL :: Download MySQL Community Server 选择适合自己版本和操作系统 二、安装包上传服务器 在本地终端执行scp命令 三、服务器上使用安装包 卸载旧版本 #检查是否之前安装过mysql服务 [lighthouseVM-24-3-opencloudos software]# r…

Pytest——Fixture夹具的使用

一、什么是Fixture 在测试开展的过程中&#xff0c;会需要考虑到测试前的准备工作&#xff0c;以及测试后的释放操作行为。这些在Pytest中&#xff0c;会通过Fixture的方式来实现。如果说在运行pytest的测试用例的时候&#xff0c;需要调用一些数据来实现测试行为&#xff0c;…

用友U8 Cloud smartweb2.RPC.d XML外部实体注入漏洞

产品介绍 用友U8cloud是用友推出的新一代云ERP&#xff0c;主要聚焦成长型、创新型、集团型企业&#xff0c;提供企业级云ERP整体解决方案。它包含ERP的各项应用&#xff0c;包括iUAP、财务会计、iUFO cloud、供应链与质量管理、人力资源、生产制造、管理会计、资产管理&#…