| | |
| | | node-key="id" |
| | | :data="depList" |
| | | :expand-on-click-node="false" |
| | | :default-expand-all="true" |
| | | :default-expanded-keys=openKey |
| | | @node-click="handleNodeClick" |
| | | > |
| | | </el-tree> |
| | |
| | | <div class="form_box"> |
| | | <el-divider class="eldivider" /> |
| | | <el-form |
| | | style="min-height: 600px;overflow-y: auto;height: 500px;margin-top: 25px;" |
| | | style="margin-top: 25px; position: relative;" |
| | | :model="itemdetail" |
| | | ref="itemdetail" |
| | | :rules="rules" |
| | |
| | | </div> |
| | | |
| | | <el-dialog |
| | | width="30%" |
| | | top="5vh" |
| | | |
| | | top="2vh" |
| | | :title="$t('common.append')" |
| | | :visible.sync="dialogFormVisible" |
| | | > |
| | | <div style="height: 500px; overflow: auto"> |
| | | <el-form |
| | | :model="ruleForm" |
| | | ref="ruleForm" |
| | | :rules="rules" |
| | | label-position="top" |
| | | > |
| | | <el-form-item |
| | | prop="name" |
| | |
| | | <el-input |
| | | v-model="ruleForm.name" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | <el-input |
| | | v-model="ruleForm.sname" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | <el-input |
| | | v-model="ruleForm.code" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | <el-input |
| | | v-model="ruleForm.uncode" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | <el-input |
| | | v-model="ruleForm.addr" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | <el-input |
| | | v-model="ruleForm.contact" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | <el-input |
| | | v-model="ruleForm.fax" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | <el-input |
| | | v-model="ruleForm.email" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | <el-input |
| | | v-model="ruleForm.post" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | <el-input |
| | | v-model="ruleForm.website" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | <el-input |
| | | v-model="ruleForm.bak" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div |
| | | slot="footer" |
| | | class="dialog-footer" |
| | |
| | | name: [{ required: true, validator: validName, trigger: 'blur' }], |
| | | }, |
| | | newNode: null, |
| | | openKey: [1], |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | this.$refs.tree.setCurrentKey(this.itemdetail.id); |
| | | }); |
| | | } |
| | | |
| | | |
| | | } else { |
| | | this.$notify.error({ |
| | | title: res.code, |
| | |
| | | .then(() => { |
| | | //兄弟重新排序 |
| | | const parent = node.parent; |
| | | this.openKey.push(parent.id) |
| | | const children = parent.data.children || parent.data; |
| | | children.splice(data.orderNum - 1, 1); |
| | | children.forEach((item, index) => { |
| | |
| | | updateDepTrees(children), |
| | | ]) |
| | | .then((res) => { |
| | | console.log(res); |
| | | if (res[0].code == 200 && res[1].code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | }); |
| | | }, |
| | | handleNodeClick(data, node) { |
| | | this.openKey.push(data.id) |
| | | this.newNode = node |
| | | this.backUpData = JSON.stringify(data); |
| | | this.itemdetail = JSON.parse(JSON.stringify(data)); |
| | |
| | | // } |
| | | // } |
| | | }, |
| | | beforeDestroy() { |
| | | this.openKey = [1] |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="less" scoped> |
| | |
| | | } |
| | | } |
| | | } |
| | | .btnBox{ |
| | | |
| | | position: absolute; |
| | | bottom: 0; |
| | | right: 0; |
| | | } |
| | | </style> |