| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 案由 --> |
| | | <el-form-item class="optionItem" label="案由:" prop="type"> |
| | | <!-- <el-form-item class="optionItem" label="案由:" prop="type"> |
| | | <el-input type="textarea" :rows="2" v-model="things.type" placeholder="请输入案由描述内容" :disabled="things.level!==2"></el-input> |
| | | </el-form-item> |
| | | </el-form-item> --> |
| | | <el-form-item> |
| | | <div class="optionBtn"> |
| | | <el-button type="primary" class="btn submit" @click.native.prevent="handleSubmit">确认 |
| | |
| | | parentId:'', |
| | | level:'', |
| | | }, |
| | | parentList: [], |
| | | createIll: { |
| | | name: [ |
| | | { required: true, trigger: 'blur', validator: checkName } |
| | |
| | | }, |
| | | levelList: [ |
| | | { |
| | | label: "违建中类型", |
| | | label: "违建类型", |
| | | value: 1, |
| | | }, |
| | | { |
| | |
| | | }, |
| | | // 提交新增违规类型 |
| | | handleSubmit() { |
| | | console.log(this.things); |
| | | this.$refs.user.validate((valid) => { |
| | | console.log(valid); |
| | | if (valid) { |
| | | const { things,selectOrg } = this; |
| | | this.$axios({ |
| | |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | if (index === 1) { |
| | | |
| | | }else{ |
| | | this.parentList = this.addChildren(await this.getTypeThird(), await this.getTypeSecond()); |
| | | this.parentList = await this.getTypeThird() |
| | | } |
| | | }, |
| | | 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的时候,代表不能再次选择。 |
| | | if (indexs < 0 && this.selectOrg.orgsid.length === 1 && checked) { |
| | | this.$message({ |
| | | message: '只能选择一个区域!', |
| | | type: 'error', |
| | | type: 'warning', |
| | | showClose: true |
| | | }) |
| | | // 设置已选择的节点为false 很重要 |
| | |
| | | <style lang="scss" scoped> |
| | | .createUser { |
| | | border-radius: 1px; |
| | | background-color: #09152f; |
| | | background-color: #fff; |
| | | |
| | | main { |
| | | // border: 1px solid #fff; |
| | | text-align: left; |
| | | padding: 0 55px; |
| | | background-color: #09152f; |
| | | background-color: #fff; |
| | | padding-bottom: 50px; |
| | | |
| | | .mainContent { |
| | |
| | | } |
| | | } |
| | | |
| | | &::v-deep .el-textarea__inner { |
| | | background-color: #09152f; |
| | | border: 1px solid #17324c; |
| | | } |
| | | // &::v-deep .el-textarea__inner { |
| | | // // background-color: #09152f; |
| | | // border: 1px solid #17324c; |
| | | // } |
| | | |
| | | ::v-deep .el-form-item__label { |
| | | color: #4b9bb7; |
| | | } |
| | | // ::v-deep .el-form-item__label { |
| | | // color: #4b9bb7; |
| | | // } |
| | | |
| | | ::v-deep .el-input__inner { |
| | | background-color: #09152f; |
| | | border: 1px solid #17324c; |
| | | } |
| | | // ::v-deep .el-input__inner { |
| | | // // background-color: #09152f; |
| | | // border: 1px solid #17324c; |
| | | // } |
| | | } |
| | | </style> |