|
@@ -1143,11 +1143,15 @@ export default {
|
|
this.displayHierarchyList = res.data
|
|
this.displayHierarchyList = res.data
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- saveTree () {//保存按钮
|
|
|
|
|
|
+ async saveTree () {//保存按钮
|
|
console.log(this.form.postType,'this.form.postType');
|
|
console.log(this.form.postType,'this.form.postType');
|
|
if(this.treeParent.postType&&this.treeParent.postType!== this.form.postType){
|
|
if(this.treeParent.postType&&this.treeParent.postType!== this.form.postType){
|
|
this.$message.warning('岗位类型必须和父级节点岗位类型一致')
|
|
this.$message.warning('岗位类型必须和父级节点岗位类型一致')
|
|
}else{
|
|
}else{
|
|
|
|
+ const isValid = await this.$refs.form.validate()
|
|
|
|
+ if(!isValid){
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
this.$refs.form.validate(val => {
|
|
this.$refs.form.validate(val => {
|
|
if (val) {
|
|
if (val) {
|
|
if (this.form.nodeType == 2) {
|
|
if (this.form.nodeType == 2) {
|