|
|
|
@ -53,16 +53,22 @@ |
|
|
|
</el-card> |
|
|
|
<el-card class="resi-card-table"> |
|
|
|
<div class="resi-row-btn"> |
|
|
|
<el-button size="small" class="diy-button--add" @click="handleAdd" |
|
|
|
<el-button |
|
|
|
v-if="btnAuths.ic_resi_add" |
|
|
|
size="small" |
|
|
|
class="diy-button--add" |
|
|
|
@click="handleAdd" |
|
|
|
>新增</el-button |
|
|
|
> |
|
|
|
<el-button |
|
|
|
v-if="ic_resi_import" |
|
|
|
class="diy-button--export" |
|
|
|
size="small" |
|
|
|
@click="handleExportModule('room')" |
|
|
|
>下载模板</el-button |
|
|
|
> |
|
|
|
<el-upload |
|
|
|
v-if="ic_resi_import" |
|
|
|
:headers="$getElUploadHeaders()" |
|
|
|
ref="upload" |
|
|
|
class="upload-demo" |
|
|
|
@ -89,17 +95,25 @@ |
|
|
|
class="diy-button--reset" |
|
|
|
:loading="exportBtn" |
|
|
|
@click="handleExport">{{exportBtnTitle}}</el-button> --> |
|
|
|
<el-button class="diy-button--reset" size="small" @click="diyExport" |
|
|
|
<el-button |
|
|
|
v-if="btnAuths.ic_resi_export" |
|
|
|
class="diy-button--reset" |
|
|
|
size="small" |
|
|
|
@click="diyExport" |
|
|
|
>导出</el-button |
|
|
|
> |
|
|
|
<el-button class="diy-button--add" size="small" @click="deleteBatch" |
|
|
|
<el-button |
|
|
|
v-if="btnAuths.ic_resi_batch_del" |
|
|
|
class="diy-button--add" |
|
|
|
size="small" |
|
|
|
@click="deleteBatch" |
|
|
|
>批量删除</el-button |
|
|
|
> |
|
|
|
<!-- <el-button type="primary" size="small">下载人口模板</el-button> --> |
|
|
|
|
|
|
|
<el-button |
|
|
|
size="small" |
|
|
|
v-if="displayedBaobiaoBtn" |
|
|
|
v-if="btnAuths.ic_resi_smart_import && displayedBaobiaoBtn" |
|
|
|
class="diy-button--add" |
|
|
|
@click="reportForm" |
|
|
|
>智能填报</el-button |
|
|
|
@ -144,7 +158,7 @@ |
|
|
|
<!-- :width="item.itemType === 'radio' ? computedWidth(item.label) : 180" --> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a |
|
|
|
v-if="item.columnName == 'NAME'" |
|
|
|
v-if="item.columnName == 'NAME' && btnAuths.ic_resi_view" |
|
|
|
class="name-a" |
|
|
|
@click="handleLook(scope.row)" |
|
|
|
> |
|
|
|
@ -164,6 +178,7 @@ |
|
|
|
size="small" |
|
|
|
class="div-table-button--detail">变动</el-button> --> |
|
|
|
<el-button |
|
|
|
v-if="btnAuths.ic_resi_change_rec" |
|
|
|
@click="handleChangeRecord(scope.row)" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
@ -172,6 +187,7 @@ |
|
|
|
> |
|
|
|
<template v-if="filterEdit(scope.row.ORG_ID)"> |
|
|
|
<el-button |
|
|
|
v-if="btnAuths.ic_resi_update" |
|
|
|
@click="handleEdit(scope.row)" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
@ -179,6 +195,7 @@ |
|
|
|
>修改</el-button |
|
|
|
> |
|
|
|
<el-popconfirm |
|
|
|
v-if="btnAuths.ic_resi_del" |
|
|
|
title="删除之后无法回复,确认删除?" |
|
|
|
@onConfirm="handleDel(scope.row)" |
|
|
|
> |
|
|
|
@ -384,6 +401,7 @@ |
|
|
|
</el-dialog> |
|
|
|
<people-more |
|
|
|
v-if="showedPeopleMoreInfo && lookInfo.userId" |
|
|
|
:view_real_data="btnAuths.view_real_data" |
|
|
|
:userId="lookInfo.userId" |
|
|
|
:gridName="lookInfo.gridName" |
|
|
|
@close="handleCancleLook" |
|
|
|
@ -476,6 +494,7 @@ export default { |
|
|
|
|
|
|
|
btnAuths: { |
|
|
|
ic_resi_add: false, //新增 |
|
|
|
ic_resi_import: false, //导入 |
|
|
|
ic_resi_export: false, //导出 |
|
|
|
ic_resi_batch_del: false, //批量删除 |
|
|
|
ic_resi_smart_import: false, //智能填表 |
|
|
|
@ -488,17 +507,6 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
props: {}, |
|
|
|
// 通过菜单路由配置按钮是否显示 |
|
|
|
beforeRouteEnter(to, from, next) { |
|
|
|
next((that) => { |
|
|
|
if (Array.isArray(to.meta.btns)) { |
|
|
|
to.meta.btns.forEach((item) => { |
|
|
|
that.btnAuths[item.permissions] = true; |
|
|
|
}); |
|
|
|
} |
|
|
|
console.log("^^^^^^^^^^^^^^^^^^btns", that.btnAuths); |
|
|
|
}); |
|
|
|
}, |
|
|
|
async activated() { |
|
|
|
console.log("this.$route.query---", this.$route.query); |
|
|
|
if (this.$route.query && this.$route.query.columnName) { |
|
|
|
@ -519,6 +527,8 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
async created() { |
|
|
|
this.updateBtnAuths(); |
|
|
|
|
|
|
|
if (this.$route.query) { |
|
|
|
let query = this.$route.query; |
|
|
|
this.defaultCategotyKey = query.columnName; |
|
|
|
@ -553,6 +563,15 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 更新按钮权限 |
|
|
|
updateBtnAuths() { |
|
|
|
let rot = this.router.currentRoute; |
|
|
|
if (Array.isArray(rot.meta.btns)) { |
|
|
|
rot.meta.btns.forEach((item) => { |
|
|
|
this.btnAuths[item.permissions] = true; |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
reportForm() { |
|
|
|
this.$refs.baobiao.init({ |
|
|
|
elseParams: { |
|
|
|
|