| | |
| | | parentId:'', |
| | | level:'', |
| | | }, |
| | | parentList: [], |
| | | createIll: { |
| | | name: [ |
| | | { required: true, trigger: 'blur', validator: checkName } |
| | |
| | | }, |
| | | // 提交新增违规类型 |
| | | handleSubmit() { |
| | | console.log(this.things); |
| | | this.$refs.user.validate((valid) => { |
| | | console.log(valid); |
| | | if (valid) { |
| | | const { things,selectOrg } = this; |
| | | this.$axios({ |
| | |
| | | |
| | | }else{ |
| | | this.parentList = await this.getTypeThird() |
| | | // this.parentList = this.addChildren(await this.getTypeThird(), await this.getTypeSecond()); |
| | | } |
| | | }, |
| | | // addChildren(parentArr, childArr) { |
| | | // // console.log(parentArr.length,childArr); |
| | | // parentArr.forEach(item => { |
| | | // item.children = []; |
| | | // childArr.forEach(child => { |
| | | // if (item.id === child.parentId) { |
| | | // item.children.push(child); |
| | | // } |
| | | // }) |
| | | // }) |
| | | // console.log(parentArr); |
| | | // return parentArr; |
| | | // }, |
| | | handleCheck(data, checked) { |
| | | this.things.parentId = data.name; |
| | | console.log(this.selectOrg.orgsid); |
| | | // 获取当前选择的id在数组中的索引 |
| | | const indexs = this.selectOrg.orgsid.indexOf(data.id) |
| | | // 如果不存在数组中,并且数组中已经有一个id并且checked为true的时候,代表不能再次选择。 |
| | |
| | | background-color: #09152f; |
| | | |
| | | main { |
| | | // border: 1px solid #fff; |
| | | text-align: left; |
| | | padding: 0 55px; |
| | | background-color: #09152f; |