| | |
| | | @row-click="rowClickHandler" |
| | | @row-save="rowSaveHandler" |
| | | @row-update="rowUpdateHandler" |
| | | @row-del="rowDeleteHandler" |
| | | > |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button v-if="permissionList.delBtn" icon="el-icon-delete" plain size="small" type="danger" |
| | | @click="allDelHandler">删除 |
| | | <el-button v-if="permissionList.addBtn" class="button-custom-icon" size="small" type="primary" |
| | | @click="$refs.roleCrud.rowAdd()"> |
| | | <icon-show :name="permissionList.addBtn.source"></icon-show> |
| | | 新 增 |
| | | </el-button> |
| | | <el-button v-if="permissionList.assignMembersBtn" icon="el-icon-school" plain size="small" type="primary" |
| | | @click="assignMembersHandler">分配成员 |
| | | <el-button v-if="permissionList.delBtn" class="button-custom-icon" plain size="small" type="danger" |
| | | @click="allDelHandler"> |
| | | <icon-show :name="permissionList.delBtn.source"></icon-show> |
| | | 删除 |
| | | </el-button> |
| | | <el-button v-if="permissionList.statisticsBtn" icon="el-icon-user" plain size="small" type="primary" |
| | | @click="statisticsHandler">统计 |
| | | <el-button v-if="permissionList.assignMembersBtn" class="button-custom-icon" plain size="small" type="primary" |
| | | @click="assignMembersHandler"> |
| | | <icon-show :name="permissionList.assignMembersBtn.source"></icon-show> |
| | | 分配成员 |
| | | </el-button> |
| | | <el-button v-if="permissionList.importRoleBtn" icon="el-icon-upload2" plain size="small" type="primary" |
| | | @click="upLoadRole">导入角色 |
| | | <el-button v-if="permissionList.statisticsBtn" class="button-custom-icon" plain size="small" type="primary" |
| | | @click="statisticsHandler"> |
| | | <icon-show :name="permissionList.statisticsBtn.source"></icon-show> |
| | | 统计 |
| | | </el-button> |
| | | <el-button v-if="permissionList.exportBtn" icon="el-icon-download" plain size="small" type="primary">导出 |
| | | <el-button v-if="permissionList.importRoleBtn" class="button-custom-icon" plain size="small" type="primary" |
| | | @click="upLoadRole"> |
| | | <icon-show :name="permissionList.importRoleBtn.source"></icon-show> |
| | | 导入角色 |
| | | </el-button> |
| | | <el-button v-if="permissionList.exportBtn" class="button-custom-icon" plain size="small" type="primary"> |
| | | <icon-show :name="permissionList.exportBtn.source"></icon-show> |
| | | 导出 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot="menu" slot-scope="{ row, index }"> |
| | | <el-button |
| | | v-if="permissionList.editBtn" |
| | | size="small" |
| | | type="text" |
| | | @click="handleEdit(row, index)" |
| | | > |
| | | <icon-show :name="permissionList.editBtn.source"></icon-show> |
| | | 编辑 |
| | | </el-button> |
| | | <el-button |
| | | v-if="permissionList.delBtn" |
| | | size="small" |
| | | type="text" |
| | | @click="handleDel(row, index)" |
| | | > |
| | | <icon-show :name="permissionList.delBtn.source"></icon-show> |
| | | 删除 |
| | | </el-button> |
| | | </template> |
| | | |
| | |
| | | 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), |
| | | assignMembersBtn: this.vaildData(this.permission[this.$route.query.id].assignMembers, false), |
| | | importRoleBtn: this.vaildData(this.permission[this.$route.query.id].importRole, false), |
| | | statisticsBtn: this.vaildData(this.permission[this.$route.query.id].statistics, false), |
| | | assignMembersBtn: this.vaildData(this.permission[this.$route.query.id].FREEZE, false), |
| | | importRoleBtn: this.vaildData(this.permission[this.$route.query.id].IMPORT, false), |
| | | statisticsBtn: this.vaildData(this.permission[this.$route.query.id].DISCARD, false), |
| | | }; |
| | | }, |
| | | option() { |
| | | return { |
| | | ...basicOption, |
| | | addBtn: this.permissionList.addBtn, |
| | | delBtn: this.permissionList.delBtn, |
| | | editBtn: this.permissionList.editBtn, |
| | | addBtn: false, |
| | | delBtn: false, |
| | | editBtn: false, |
| | | dialogTop: 0, |
| | | dialogWidth: '30%', |
| | | column: column, |
| | |
| | | this.page.total = res.data.total; |
| | | this.tableLoading = false; |
| | | }) |
| | | }, |
| | | |
| | | // 编辑按钮 |
| | | handleEdit(row, index) { |
| | | this.$refs.roleCrud.rowEdit(row, index); |
| | | }, |
| | | |
| | | // 列头刷新 |
| | |
| | | }, |
| | | |
| | | // 删除 |
| | | rowDeleteHandler(row) { |
| | | handleDel(row, index) { |
| | | let params = { |
| | | ids: row.oid |
| | | } |