|
@@ -26,7 +26,10 @@ |
|
|
</el-select> |
|
|
</el-select> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div style="width: 100%; margin-top: 30px"> |
|
|
|
|
|
|
|
|
<div class="addlevl" v-if="yyc_add_level1" @click="append1()"> |
|
|
|
|
|
新增一级 |
|
|
|
|
|
</div> |
|
|
|
|
|
<div style="width: 100%; margin-top: 20px"> |
|
|
<el-tree ref="tree" :default-expand-all="true" :data="treeList"> |
|
|
<el-tree ref="tree" :default-expand-all="true" :data="treeList"> |
|
|
<span class="custom-tree-node" slot-scope="{ node, data }"> |
|
|
<span class="custom-tree-node" slot-scope="{ node, data }"> |
|
|
|
|
|
|
|
@@ -241,17 +244,42 @@ |
|
|
</button> |
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="新增一级" :visible.sync="dialogVisible2"> |
|
|
|
|
|
<el-form :model="addForm2"> |
|
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item |
|
|
|
|
|
label="名称:" |
|
|
|
|
|
v-if="level == 0" |
|
|
|
|
|
:label-width="formLabelWidth" |
|
|
|
|
|
> |
|
|
|
|
|
<el-input v-model="addForm2.name" autocomplete="off"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button @click="dialogVisible2 = false">取 消</el-button> |
|
|
|
|
|
<el-button type="primary" @click="addclick()">确 定</el-button> |
|
|
|
|
|
</span> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
|
|
|
import { mapGetters } from "vuex"; |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
formLabelWidth: "120px", |
|
|
formLabelWidth: "120px", |
|
|
dialogFormVisible: false, |
|
|
dialogFormVisible: false, |
|
|
dialogVisible: false, |
|
|
dialogVisible: false, |
|
|
|
|
|
dialogVisible2:false, |
|
|
orgType: localStorage.getItem("orgType"), |
|
|
orgType: localStorage.getItem("orgType"), |
|
|
isshowage: false, |
|
|
isshowage: false, |
|
|
treeList: [], //树形数据 |
|
|
treeList: [], //树形数据 |
|
@@ -262,6 +290,9 @@ export default { |
|
|
name: "", |
|
|
name: "", |
|
|
endName: "", |
|
|
endName: "", |
|
|
}, |
|
|
}, |
|
|
|
|
|
addForm2:{ |
|
|
|
|
|
name:'' |
|
|
|
|
|
}, |
|
|
level: 0, |
|
|
level: 0, |
|
|
pid: "", |
|
|
pid: "", |
|
|
deleteId: "", |
|
|
deleteId: "", |
|
@@ -277,16 +308,53 @@ export default { |
|
|
}, |
|
|
}, |
|
|
amountintervalname: "", |
|
|
amountintervalname: "", |
|
|
isInterval: "", |
|
|
isInterval: "", |
|
|
|
|
|
orgCodes:'' |
|
|
}; |
|
|
}; |
|
|
|
|
|
}, |
|
|
|
|
|
computed: { |
|
|
|
|
|
...mapGetters(["permissions"]), |
|
|
|
|
|
}, |
|
|
|
|
|
created() { |
|
|
|
|
|
this.yyc_add_level1 = this.permissions["yyc_add_level1"]; |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
// 获取楼盘列表 |
|
|
// 获取楼盘列表 |
|
|
this.zkhousePage(); |
|
|
this.zkhousePage(); |
|
|
// this.orgCode = localStorage.getItem("AitemId"); |
|
|
|
|
|
// this.getHouse() |
|
|
|
|
|
// this.treeList = data.obj; |
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
addclick(){ |
|
|
|
|
|
var orgCode=''; |
|
|
|
|
|
if(localStorage.getItem("orgType") == 3){ |
|
|
|
|
|
orgCode=this.orgCodes |
|
|
|
|
|
}else{ |
|
|
|
|
|
orgCode=localStorage.getItem("orgCode") |
|
|
|
|
|
} |
|
|
|
|
|
if (this.addForm2.name != "") { |
|
|
|
|
|
axios({ |
|
|
|
|
|
url: `/autoSR/zk/keywords/add`, |
|
|
|
|
|
method: "post", |
|
|
|
|
|
data: { |
|
|
|
|
|
pid: 0, |
|
|
|
|
|
name: this.addForm2.name, |
|
|
|
|
|
level:1, |
|
|
|
|
|
orgCode:orgCode, |
|
|
|
|
|
}, |
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
this.dialogVisible2=false; |
|
|
|
|
|
this.getHouse() |
|
|
|
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: "内容不能为空", |
|
|
|
|
|
type: "warning", |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
append1(){ |
|
|
|
|
|
this.addForm2.name=''; |
|
|
|
|
|
this.dialogVisible2=true; |
|
|
|
|
|
}, |
|
|
// 获取模板数据 |
|
|
// 获取模板数据 |
|
|
getHouse() { |
|
|
getHouse() { |
|
|
axios({ |
|
|
axios({ |
|
@@ -321,7 +389,12 @@ export default { |
|
|
this.dialogFormVisible = true; |
|
|
this.dialogFormVisible = true; |
|
|
}, |
|
|
}, |
|
|
houseChange() { |
|
|
houseChange() { |
|
|
// console.log(1); |
|
|
|
|
|
|
|
|
this.houseList.map(item=>{ |
|
|
|
|
|
if(item.id==this.houseId){ |
|
|
|
|
|
this.orgCodes=item.orgCode; |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
console.log(this.orgCodes); |
|
|
this.getHouse(); |
|
|
this.getHouse(); |
|
|
}, |
|
|
}, |
|
|
// 添加节点确认按钮 |
|
|
// 添加节点确认按钮 |
|
@@ -517,6 +590,7 @@ export default { |
|
|
this.houseId = localStorage.getItem("houseId"); |
|
|
this.houseId = localStorage.getItem("houseId"); |
|
|
} else { |
|
|
} else { |
|
|
this.houseId = res.data[0].id; |
|
|
this.houseId = res.data[0].id; |
|
|
|
|
|
this.orgCodes=res.data[0].orgCode; |
|
|
} |
|
|
} |
|
|
// this.houseId = res.data[0].id; |
|
|
// this.houseId = res.data[0].id; |
|
|
// 列表获取 |
|
|
// 列表获取 |
|
@@ -593,6 +667,16 @@ export default { |
|
|
padding-left: 15px; |
|
|
padding-left: 15px; |
|
|
padding-bottom: 60px; |
|
|
padding-bottom: 60px; |
|
|
} |
|
|
} |
|
|
|
|
|
.addlevl{ |
|
|
|
|
|
width: 100px; |
|
|
|
|
|
border: 1px solid #409EFF; |
|
|
|
|
|
color: #409EFF; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
line-height: 30rpx; |
|
|
|
|
|
border-radius:4px ; |
|
|
|
|
|
margin-top: 10px; |
|
|
|
|
|
margin-left: 18px; |
|
|
|
|
|
} |
|
|
.biaoti { |
|
|
.biaoti { |
|
|
font-size: 20px; |
|
|
font-size: 20px; |
|
|
font-family: PingFangSC-Semibold, PingFang SC; |
|
|
font-family: PingFangSC-Semibold, PingFang SC; |
|
|