| | |
| | | <div class="standard-library-main"> |
| | | <div class="content-main"> |
| | | <div class="library-bom" style="width: 300px"> |
| | | <el-input v-model="filterText" placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤" /> |
| | | <el-input |
| | | v-model="filterText" |
| | | placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤" |
| | | ></el-input> |
| | | <el-button type="text">å
¨é¨</el-button> |
| | | <el-tree |
| | | ref="tree" |
| | |
| | | }, |
| | | // è·åbomæ çæ åæ°æ® |
| | | async getStandardTree() { |
| | | console.log(`output->æ§è¡å`, "æ§è¡å"); |
| | | const { data } = await getMaterialList(); |
| | | this.standardTree = data.map((item) => { |
| | | let name = null; |
| | |
| | | const treeOptions = JSON.parse(JSON.stringify(this.standardTree)); |
| | | this.getDefault(treeOptions, 0); |
| | | this.formTypeOptions = treeOptions; |
| | | console.log(`output->===========`, "==========="); |
| | | this.$nextTick().then(() => { |
| | | const firstNode = document.querySelector( |
| | | ".el-tree-node .el-tree-node__children .el-tree-node .el-tree-node__children .el-tree-node .el-tree-node__children .el-tree-node" |
| | | ); |
| | | console.log(`output->firstNode`, firstNode); |
| | | firstNode.click(); |
| | | // console.log(firstNode); |
| | | }); |
| | |
| | | // æ¯åèç¹ |
| | | if (node.level === 4) { |
| | | this.getParentData(node.parent, node.data.name); |
| | | console.log(`output->this.msg`, this.msg); |
| | | // åä¸éä¸èç¹ |
| | | this.selectData = data; |
| | | // eslint-disable-next-line prefer-const |
| | |
| | | }, |
| | | async subAddTreeForm() { |
| | | this.addTreeFormVisible = false; |
| | | console.log(this.addTreeForm.addTypeArr.length); |
| | | let res = null; |
| | | try { |
| | | switch (this.addTreeForm.addTypeArr.length) { |
| | |
| | | |
| | | console.log(res); |
| | | this.$message.success("æ·»å æå"); |
| | | this.addTreeForm = {}; |
| | | this.addTreeForm = { |
| | | addTypeArr: [], |
| | | }; |
| | | this.getStandardTree(); |
| | | this.getTableByClick(this.selectData); |
| | | }, |
| | | changeCascader(data) { |
| | | console.log(data); |
| | | console.log(`output->----------`, data); |
| | | this.addTreeForm.addTypeArr = data; |
| | | }, |
| | | closeAddTreeForm() { |