|
|
@ -41,26 +41,29 @@ |
|
|
|
icon="el-icon-plus" |
|
|
|
size="small" |
|
|
|
@click="handleAdd">新增房屋</el-button> |
|
|
|
<el-button style="float:left" |
|
|
|
type="blue" |
|
|
|
size="small" |
|
|
|
icon="el-icon-download" |
|
|
|
@click="handleExportModule">下载房屋模板</el-button> |
|
|
|
<el-upload ref="upload" |
|
|
|
:multiple='false' |
|
|
|
:show-file-list='false' |
|
|
|
:before-upload="beforeUpload" |
|
|
|
action="" |
|
|
|
accept=".xls,.xlsx" |
|
|
|
:limit="1" |
|
|
|
:on-exceed="handleExceed" |
|
|
|
:http-request="uploadFile"> |
|
|
|
<el-button style="margin-left:10px" |
|
|
|
<div class="btn_upload" |
|
|
|
v-if="showImportBtn"> |
|
|
|
<el-button style="float:left" |
|
|
|
type="blue" |
|
|
|
size="small" |
|
|
|
icon="el-icon-upload2" |
|
|
|
:loading="importRoomLoading" |
|
|
|
type="red">导入房屋数据</el-button> |
|
|
|
</el-upload> |
|
|
|
icon="el-icon-download" |
|
|
|
@click="handleExportModule">下载房屋模板</el-button> |
|
|
|
<el-upload ref="upload" |
|
|
|
:multiple='false' |
|
|
|
:show-file-list='false' |
|
|
|
:before-upload="beforeUpload" |
|
|
|
action="" |
|
|
|
accept=".xls,.xlsx" |
|
|
|
:limit="1" |
|
|
|
:on-exceed="handleExceed" |
|
|
|
:http-request="uploadFile"> |
|
|
|
<el-button style="margin-left:10px" |
|
|
|
size="small" |
|
|
|
icon="el-icon-upload2" |
|
|
|
:loading="importRoomLoading" |
|
|
|
type="red">导入房屋数据</el-button> |
|
|
|
</el-upload> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="div_table"> |
|
|
@ -197,7 +200,7 @@ export default { |
|
|
|
tableLoading: true, |
|
|
|
selAllFlag: false, |
|
|
|
isIndeterminate: false,//复选框的不确定状态 |
|
|
|
showImportBtn: false,//是否显示操作按钮,根据登录人所属组织判断 |
|
|
|
// showImportBtn: false,//是否显示操作按钮,根据登录人所属组织判断 |
|
|
|
|
|
|
|
agencyObj: {},//树所选的小区对象 |
|
|
|
ownerName: '', |
|
|
@ -237,21 +240,21 @@ export default { |
|
|
|
this.tableLoading = true |
|
|
|
if (fromTree) { |
|
|
|
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 |
|
|
|
} |
|
|
|
// 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 |
|
|
|
// } |
|
|
|
} |
|
|
|
|
|
|
|
const url = "/gov/org/house/houselist" |
|
|
@ -423,10 +426,11 @@ export default { |
|
|
|
this.$emit('refreshTree') |
|
|
|
this.loadTable() |
|
|
|
} else if (code > 8000) { |
|
|
|
// this.$message({ |
|
|
|
// type: "success", |
|
|
|
// message: msg |
|
|
|
// }); |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
message: msg, |
|
|
|
duration: 0 |
|
|
|
}) |
|
|
|
this.$emit('refreshTree') |
|
|
|
this.loadTable() |
|
|
|
} else { |
|
|
@ -645,6 +649,10 @@ export default { |
|
|
|
type: String, |
|
|
|
default: '', |
|
|
|
}, |
|
|
|
showImportBtn: { |
|
|
|
type: Boolean, |
|
|
|
default: false, |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|