|
@ -41,7 +41,8 @@ |
|
|
size="small" |
|
|
size="small" |
|
|
icon="el-icon-plus" |
|
|
icon="el-icon-plus" |
|
|
@click="handleAdd">新增楼宇</el-button> |
|
|
@click="handleAdd">新增楼宇</el-button> |
|
|
|
|
|
<div class="btn_upload" |
|
|
|
|
|
v-if="showImportBtn"> |
|
|
<el-button style=";margin-left:10px" |
|
|
<el-button style=";margin-left:10px" |
|
|
type="blue" |
|
|
type="blue" |
|
|
size="small" |
|
|
size="small" |
|
@ -83,6 +84,7 @@ |
|
|
type="red">导入房屋数据</el-button> |
|
|
type="red">导入房屋数据</el-button> |
|
|
</el-upload> |
|
|
</el-upload> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="div_table"> |
|
|
<div class="div_table"> |
|
|
<el-table ref="ref_table" |
|
|
<el-table ref="ref_table" |
|
@ -134,12 +136,14 @@ |
|
|
style="color:#1C6AFD;text-decoration: underline;" |
|
|
style="color:#1C6AFD;text-decoration: underline;" |
|
|
size="small" |
|
|
size="small" |
|
|
@click="handleDetail(scope.row)">查看</el-button> |
|
|
@click="handleDetail(scope.row)">查看</el-button> |
|
|
<el-button type="text" |
|
|
<el-button v-if="scope.row.showBtn" |
|
|
|
|
|
type="text" |
|
|
style="color:#00A7A9;text-decoration: underline;" |
|
|
style="color:#00A7A9;text-decoration: underline;" |
|
|
size="small" |
|
|
size="small" |
|
|
@click="handleEdit(scope.row)">修改</el-button> |
|
|
@click="handleEdit(scope.row)">修改</el-button> |
|
|
|
|
|
|
|
|
<el-button type="text" |
|
|
<el-button v-if="scope.row.showBtn" |
|
|
|
|
|
type="text" |
|
|
style="color:#D51010;text-decoration: underline;" |
|
|
style="color:#D51010;text-decoration: underline;" |
|
|
size="small" |
|
|
size="small" |
|
|
@click="handleDelete(scope.row)">删除</el-button> |
|
|
@click="handleDelete(scope.row)">删除</el-button> |
|
@ -206,6 +210,7 @@ export default { |
|
|
tableLoading: true, |
|
|
tableLoading: true, |
|
|
selAllFlag: false, |
|
|
selAllFlag: false, |
|
|
isIndeterminate: false,//复选框的不确定状态 |
|
|
isIndeterminate: false,//复选框的不确定状态 |
|
|
|
|
|
showImportBtn: false,//是否显示操作按钮,根据登录人所属组织判断 |
|
|
|
|
|
|
|
|
agencyObj: {},//树所选的小区对象 |
|
|
agencyObj: {},//树所选的小区对象 |
|
|
ownerName: '', |
|
|
ownerName: '', |
|
@ -243,6 +248,21 @@ export default { |
|
|
this.tableLoading = true |
|
|
this.tableLoading = true |
|
|
if (fromTree) { |
|
|
if (fromTree) { |
|
|
this.agencyObj = treeObj |
|
|
this.agencyObj = treeObj |
|
|
|
|
|
if (this.agencyObj.level === 'community') {//只有社区和网格显示操作按钮 |
|
|
|
|
|
if (this.agencyObj.id === this.staffAgencyId) {//如果所选树的组织id和登录人员id相同,有权限 |
|
|
|
|
|
this.showImportBtn = true |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showImportBtn = false |
|
|
|
|
|
} |
|
|
|
|
|
} else if (this.agencyObj.level === 'grid') {//网格下 |
|
|
|
|
|
if (this.agencyObj.pid === this.staffAgencyId) {//如果所选树的父级组织id和登录人员id相同,有权限 |
|
|
|
|
|
this.showImportBtn = true |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showImportBtn = false |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showImportBtn = false |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
console.log(this.agencyObj) |
|
|
console.log(this.agencyObj) |
|
|
const url = "/gov/org/building/buildinglist" |
|
|
const url = "/gov/org/building/buildinglist" |
|
@ -258,6 +278,14 @@ export default { |
|
|
|
|
|
|
|
|
if (code === 0) { |
|
|
if (code === 0) { |
|
|
this.total = data.total |
|
|
this.total = data.total |
|
|
|
|
|
data.list.forEach(item => { |
|
|
|
|
|
if (item.agencyId === this.staffAgencyId) { |
|
|
|
|
|
item.showBtn = true |
|
|
|
|
|
} else { |
|
|
|
|
|
item.showBtn = false |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
this.tableData = data.list |
|
|
this.tableData = data.list |
|
|
} else { |
|
|
} else { |
|
|
this.$message.error(msg) |
|
|
this.$message.error(msg) |
|
|