调整平昌的党组织选择
This commit is contained in:
@@ -113,7 +113,6 @@ export default {
|
||||
selected: [],
|
||||
selectedTemp: [],
|
||||
selectParty: [],
|
||||
valueType: "",
|
||||
defaultChecked: [],
|
||||
defaultExpanded: [],
|
||||
childCount: 0
|
||||
@@ -164,18 +163,12 @@ export default {
|
||||
if (this.type === '2') {
|
||||
this.treeData = res.data
|
||||
} else {
|
||||
res.data = res.data.map(a => {
|
||||
return {...a, name: a.name}
|
||||
});
|
||||
if (this.valueType) {
|
||||
this.selected = res.data.filter(e => (this.valueType == "string" && e.id == this.value) || this.value?.includes(e.id))
|
||||
if (this.selected) {
|
||||
this.$emit('name', this.selected.map(e => e.name))
|
||||
this.$emit('origin', this.selected)
|
||||
}
|
||||
this.selected = res.data.filter(e => [this.value].flat().includes(e.id))
|
||||
if (this.selected) {
|
||||
this.$emit('name', this.selected.map(e => e.name))
|
||||
this.$emit('origin', this.selected)
|
||||
}
|
||||
this.treeData = res.data.filter(e => !e.parentId || e.id === this.topOrgId);
|
||||
this.treeData.map(t => this.addChild(t, res.data));
|
||||
this.treeData = this.$arr2tree(res.data, {root: this.topOrgId})
|
||||
}
|
||||
} else {
|
||||
this.treeData = [res.data]
|
||||
@@ -187,14 +180,13 @@ export default {
|
||||
if (!this.selectedTemp.length && !this.isEmpty) {
|
||||
return this.$message.error(this.type === '0' ? '党组织不能为空' : '小区不能为空')
|
||||
}
|
||||
|
||||
this.selected = this.selectedTemp;
|
||||
this.selectParty.length && (this.selected = JSON.parse(JSON.stringify(this.selectParty)))
|
||||
if (this.type === '1' && this.selected[0].isVan === '0') {
|
||||
return this.$message.error('请选择小区')
|
||||
}
|
||||
this.dialog = false
|
||||
this.$emit('change', this.valueType == "string" ? this.selected.map(e => e.id)[0] : this.selected.map(e => e.id))
|
||||
this.$emit('change', typeof this.value == "string" ? this.selected.map(e => e.id)[0] : this.selected.map(e => e.id))
|
||||
this.$emit('name', this.selected.map(e => e.name))
|
||||
this.$emit('origin', this.selected)
|
||||
},
|
||||
@@ -205,11 +197,8 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.valueType = typeof this.value
|
||||
this.searchSysAll();
|
||||
})
|
||||
created() {
|
||||
this.searchSysAll();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -220,46 +209,46 @@ export default {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
:deep(.el-dialog__header ){
|
||||
:deep(.el-dialog__header ) {
|
||||
line-height: 1;
|
||||
// padding: 13px 16px;
|
||||
// border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
:deep( .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content ){
|
||||
:deep( .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content ) {
|
||||
background: #eaf5ff !important;
|
||||
color: #257fff !important;
|
||||
}
|
||||
|
||||
:deep(.el-dialog__body ){
|
||||
:deep(.el-dialog__body ) {
|
||||
padding: 16px 16px 0;
|
||||
}
|
||||
|
||||
:deep( .ai-dialog__content--wrapper ){
|
||||
:deep( .ai-dialog__content--wrapper ) {
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
|
||||
:deep(.left_cont ){
|
||||
:deep(.left_cont ) {
|
||||
height: calc(100% - 40px);
|
||||
padding-top: 8px;
|
||||
box-sizing: border-box;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:deep(.el-tree ){
|
||||
:deep(.el-tree ) {
|
||||
background: #fcfcfc;
|
||||
}
|
||||
|
||||
:deep( .el-dialog__body ){
|
||||
:deep( .el-dialog__body ) {
|
||||
background: #fcfcfc;
|
||||
}
|
||||
|
||||
:deep(.el-tree-node:focus > .el-tree-node__content ){
|
||||
:deep(.el-tree-node:focus > .el-tree-node__content ) {
|
||||
background: #eaf5ff !important;
|
||||
color: #257fff !important;
|
||||
}
|
||||
|
||||
:deep(.el-tree-node__content:hover ){
|
||||
:deep(.el-tree-node__content:hover ) {
|
||||
background: #eaf5ff !important;
|
||||
color: #257fff !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user