| | |
| | | > |
| | | |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="rowSaveHandlerClick">创建</el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="allDelHandler">删除</el-button> |
| | | <el-button icon="el-icon-view" plain size="small" type="primary" @click="chekView">查看使用范围</el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadTemplateHandler">下载导入模板 |
| | | <el-button v-if="permissionList.addBtn" icon="el-icon-plus" plain size="small" type="primary" |
| | | @click="rowSaveHandlerClick">创建 |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadUser">导入</el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadHandler">导出</el-button> |
| | | <el-button v-if="permissionList.delBtn" icon="el-icon-delete" plain size="small" type="danger" |
| | | @click="allDelHandler">删除 |
| | | </el-button> |
| | | <el-button v-if="permissionList.viewTheScopeBtn" icon="el-icon-view" plain size="small" type="primary" |
| | | @click="chekView">查看使用范围 |
| | | </el-button> |
| | | <el-button v-if="permissionList.downloadImportTemplateBtn" icon="el-icon-download" plain size="small" |
| | | type="primary" @click="downloadTemplateHandler">下载导入模板 |
| | | </el-button> |
| | | <el-button v-if="permissionList.importBtn" icon="el-icon-upload2" plain size="small" type="primary" |
| | | @click="uploadUser">导入 |
| | | </el-button> |
| | | <el-button v-if="permissionList.exportBtn" icon="el-icon-download" plain size="small" type="primary" |
| | | @click="downloadHandler">导出 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button icon="el-icon-edit" size="small" type="text" @click="editBtnClick(scope.row)">编辑 |
| | | <el-button v-if="permissionList.editBtn" icon="el-icon-edit" size="small" type="text" |
| | | @click="editBtnClick(scope.row)">编辑 |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">删除 |
| | | <el-button v-if="permissionList.delBtn" icon="el-icon-delete" size="small" type="text" |
| | | @click="rowDeleteHandler(scope.row)">删除 |
| | | </el-button> |
| | | </template> |
| | | |
| | |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | viewBtn: this.vaildData(this.permission[this.$route.query.id].VIEW, false), |
| | | addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false), |
| | | delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false), |
| | | editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false), |
| | | exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false), |
| | | importBtn: this.vaildData(this.permission[this.$route.query.id].IMPORT, false), |
| | | downloadImportTemplateBtn: this.vaildData(this.permission[this.$route.query.id].downloadImportTemplate, false), |
| | | viewTheScopeBtn: this.vaildData(this.permission[this.$route.query.id].viewTheScope, false), |
| | | }; |
| | | }, |
| | | lastItem() { |
| | |
| | | this.tableData = data; |
| | | this.tableLoading = false; |
| | | }).catch(err => { |
| | | this.$message.error(err) |
| | | }); |
| | | }, |
| | | |
| | |
| | | func.downloadFileByBlobHandler(res); |
| | | this.$message.success('导出成功'); |
| | | }).catch(err => { |
| | | this.$message.error(err); |
| | | }) |
| | | }, |
| | | |
| | |
| | | func.downloadFileByBlobHandler(res); |
| | | this.$message.success('下载成功'); |
| | | }).catch(err => { |
| | | this.$message.error(err); |
| | | }) |
| | | }, |
| | | |