|
@@ -293,7 +293,7 @@
|
|
v-model="form.postType"
|
|
v-model="form.postType"
|
|
placeholder="请选择岗位"
|
|
placeholder="请选择岗位"
|
|
style="width:400px;"
|
|
style="width:400px;"
|
|
- disabled
|
|
|
|
|
|
+
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in JobTypeList"
|
|
v-for="item in JobTypeList"
|
|
@@ -701,6 +701,7 @@ export default {
|
|
filterText: '',//筛选条件
|
|
filterText: '',//筛选条件
|
|
rulefilterText:'',
|
|
rulefilterText:'',
|
|
treeNode: {},
|
|
treeNode: {},
|
|
|
|
+ treeParent:{},//选中节点的父级
|
|
nodeNames: '',
|
|
nodeNames: '',
|
|
token: '',
|
|
token: '',
|
|
props: {
|
|
props: {
|
|
@@ -1253,7 +1254,8 @@ export default {
|
|
}
|
|
}
|
|
this.treeTap = true
|
|
this.treeTap = true
|
|
},
|
|
},
|
|
- async edittree (data) {//编辑树
|
|
|
|
|
|
+ async edittree (data,node) {//编辑树
|
|
|
|
+ console.log(node,'node');
|
|
if (this.JobTypeList.length == 0) {
|
|
if (this.JobTypeList.length == 0) {
|
|
this.roletree()
|
|
this.roletree()
|
|
}
|
|
}
|
|
@@ -1267,6 +1269,7 @@ export default {
|
|
this.form.id = data.id
|
|
this.form.id = data.id
|
|
this.form.parentId = ''
|
|
this.form.parentId = ''
|
|
this.treeNode = data
|
|
this.treeNode = data
|
|
|
|
+ this.treeParent=node.parent.data
|
|
this.treeTap = true
|
|
this.treeTap = true
|
|
},
|
|
},
|
|
deletetree (node) {//删除树
|
|
deletetree (node) {//删除树
|
|
@@ -1409,7 +1412,12 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
saveTree () {//保存按钮
|
|
saveTree () {//保存按钮
|
|
- this.$refs.form.validate(val => {
|
|
|
|
|
|
+ console.log(this.form.postType,'post');
|
|
|
|
+ console.log(this.treeParent,'treeParent');
|
|
|
|
+ if(this.treeParent.postType&&this.treeParent.postType!= this.form.postType){
|
|
|
|
+ this.$message.warning('岗位类型必须和父级节点岗位类型一直')
|
|
|
|
+ }else{
|
|
|
|
+ this.$refs.form.validate(val => {
|
|
if (val) {
|
|
if (val) {
|
|
if (this.form.nodeType == 2) {
|
|
if (this.form.nodeType == 2) {
|
|
if (this.form.isStorageNode == 1) {
|
|
if (this.form.isStorageNode == 1) {
|
|
@@ -1500,6 +1508,8 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ }
|
|
|
|
+
|
|
if(this.menuKey='edit'){
|
|
if(this.menuKey='edit'){
|
|
//刷新页面
|
|
//刷新页面
|
|
window.location.reload()
|
|
window.location.reload()
|