|
|
@ -96,14 +96,17 @@ |
|
|
|
</div> |
|
|
|
<div class="div_table"> |
|
|
|
<div class="div_btn"> |
|
|
|
<el-button class="diy-button--add" |
|
|
|
<el-button v-if="btnAuths.tripreport_add" |
|
|
|
class="diy-button--add" |
|
|
|
size="small" |
|
|
|
@click="handleAdd">新增</el-button> |
|
|
|
|
|
|
|
<el-button class="diy-button--export" |
|
|
|
<el-button v-if="btnAuths.tripreport_import" |
|
|
|
class="diy-button--export" |
|
|
|
size="small" |
|
|
|
@click="handleExportModule">下载模板</el-button> |
|
|
|
<el-upload :headers="$getElUploadHeaders()" |
|
|
|
<el-upload v-if="btnAuths.tripreport_import" |
|
|
|
:headers="$getElUploadHeaders()" |
|
|
|
ref="upload" |
|
|
|
:multiple='false' |
|
|
|
:show-file-list='false' |
|
|
@ -119,7 +122,8 @@ |
|
|
|
:loading="importLoading">{{importBtnTitle}}</el-button> |
|
|
|
</el-upload> |
|
|
|
|
|
|
|
<el-button style="margin-left:10px" |
|
|
|
<el-button v-if="btnAuths.tripreport_export" |
|
|
|
style="margin-left:10px" |
|
|
|
class="diy-button--reset" |
|
|
|
size="small" |
|
|
|
:loading="exportBtn" |
|
|
@ -258,12 +262,14 @@ |
|
|
|
class="operate"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
<el-button type="text" |
|
|
|
<el-button v-if="btnAuths.tripreport_view" |
|
|
|
type="text" |
|
|
|
class="div-table-button--detail" |
|
|
|
size="small" |
|
|
|
@click="handleDetail(scope.row)">查看</el-button> |
|
|
|
|
|
|
|
<el-button type="text" |
|
|
|
<el-button v-if="btnAuths.tripreport_update" |
|
|
|
type="text" |
|
|
|
class="div-table-button--edit" |
|
|
|
size="small" |
|
|
|
@click="handleEdit(scope.row)">修改</el-button> |
|
|
@ -290,7 +296,8 @@ |
|
|
|
@click="handleVisiteList(scope.row) ">随访记录</el-button> |
|
|
|
</el-dropdown-item> |
|
|
|
<el-dropdown-item v-if=" agencyId===scope.row.agencyId"> |
|
|
|
<el-button type="text" |
|
|
|
<el-button v-if="btnAuths.tripreport_del" |
|
|
|
type="text" |
|
|
|
class="div-table-button--delete--noline " |
|
|
|
size="small" |
|
|
|
@click="handleDelete(scope.row)">删除</el-button> |
|
|
@ -337,6 +344,7 @@ |
|
|
|
class="dialog-h" |
|
|
|
@closed="diaClose"> |
|
|
|
<travel-panshi-detail v-if="detailShow" |
|
|
|
:view_real_data="btnAuths.tripreport_view_real_data" |
|
|
|
@dialogCancle="addFormCancle" |
|
|
|
ref="ref_detail"></travel-panshi-detail> |
|
|
|
</el-dialog> |
|
|
@ -435,7 +443,17 @@ export default { |
|
|
|
lazy: true, |
|
|
|
checkStrictly: true, |
|
|
|
lazyLoad: this.lzayLoadArea |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
btnAuths: { |
|
|
|
tripreport_add: false, //新增 |
|
|
|
tripreport_import: false, //导入 |
|
|
|
tripreport_export: false, //导出 |
|
|
|
tripreport_del: false, //删除 |
|
|
|
tripreport_view: false, //查看 |
|
|
|
tripreport_update: false, //修改 |
|
|
|
tripreport_view_real_data: false, //显示脱敏信息 |
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
@ -450,8 +468,7 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
async mounted () { |
|
|
|
//获取场所类型 |
|
|
|
|
|
|
|
this.updateBtnAuths(); |
|
|
|
|
|
|
|
const { user } = this.$store.state |
|
|
|
console.log('user-----', user) |
|
|
@ -463,6 +480,15 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
// 更新按钮权限 |
|
|
|
updateBtnAuths () { |
|
|
|
let rot = this.$route; |
|
|
|
if (Array.isArray(rot.meta.btns)) { |
|
|
|
rot.meta.btns.forEach((item) => { |
|
|
|
this.btnAuths[item.permissions] = true; |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
async getDangerLevel () { |
|
|
|
|
|
|
|
const url = "/sys/dict/data/dictlist"; |
|
|
|