|
@@ -44,7 +44,7 @@ |
|
@@ -44,7 +44,7 @@ |
44
|
<template slot-scope="scope">
|
44
|
<template slot-scope="scope">
|
45
|
<!-- 新增下级-->
|
45
|
<!-- 新增下级-->
|
46
|
<el-tooltip effect="dark" content="新增" placement="top-start" :enterable="false">
|
46
|
<el-tooltip effect="dark" content="新增" placement="top-start" :enterable="false">
|
47
|
- <el-button type="success" icon="el-icon-plus" size="mini"@click="handleAdd(scope.$index, scope.row)">新增下级
|
47
|
+ <el-button :disabled="scope.row.type == 3" type="success" icon="el-icon-plus" size="mini"@click="handleAdd(scope.$index, scope.row)">新增下级
|
48
|
</el-button>
|
48
|
</el-button>
|
49
|
</el-tooltip>
|
49
|
</el-tooltip>
|
50
|
<!-- 编辑按钮-->
|
50
|
<!-- 编辑按钮-->
|
|
@@ -105,7 +105,9 @@ |
|
@@ -105,7 +105,9 @@ |
105
|
:key="item.value"
|
105
|
:key="item.value"
|
106
|
:disabled="item.value == 1"
|
106
|
:disabled="item.value == 1"
|
107
|
:label="item.label"
|
107
|
:label="item.label"
|
108
|
- :value="item.value">
|
108
|
+ :value="item.value"
|
|
|
109
|
+ ref="typeRef"
|
|
|
110
|
+ >
|
109
|
<span style="float: left">{{ item.label }}</span>
|
111
|
<span style="float: left">{{ item.label }}</span>
|
110
|
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
|
112
|
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
|
111
|
</el-option>
|
113
|
</el-option>
|
|
@@ -243,13 +245,14 @@ |
|
@@ -243,13 +245,14 @@ |
243
|
//新增下级
|
245
|
//新增下级
|
244
|
if(util.checkNull(row)){
|
246
|
if(util.checkNull(row)){
|
245
|
//传递上级ID
|
247
|
//传递上级ID
|
|
|
248
|
+
|
246
|
let parentId = Object.assign({}, row);
|
249
|
let parentId = Object.assign({}, row);
|
247
|
this.addForm.parentId = parentId.id;
|
250
|
this.addForm.parentId = parentId.id;
|
248
|
this.addForm.parentName = parentId.name;
|
251
|
this.addForm.parentName = parentId.name;
|
249
|
this.selectDisabled = false;
|
252
|
this.selectDisabled = false;
|
250
|
this.addForm.type = 2;
|
253
|
this.addForm.type = 2;
|
251
|
- if(this.$refs.parent[type] = 2){
|
|
|
252
|
- this.addForm.child[type] = 3;
|
254
|
+ if (parentId.type==2){
|
|
|
255
|
+ this.addForm.type = 3;
|
253
|
}
|
256
|
}
|
254
|
}
|
257
|
}
|
255
|
//数据初始化
|
258
|
//数据初始化
|