| | |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @row-click="clickRowChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.post_delete" |
| | | @click="handleDelete">删 除 |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permissionList.delBtn" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | |
| | | selectionList: [], |
| | | option: { |
| | | height: 'auto', |
| | | columnBtn:false, |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, //行选中时高亮 |
| | | column: [ |
| | | { |
| | | label: "所属租户", |
| | | prop: "tenantId", |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/tenant/select", |
| | | dicUrl: "/api/ubcs-system/tenant/select", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: website.tenantMode, |
| | |
| | | label: "岗位类型", |
| | | prop: "category", |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict/dictionary?code=post_category", |
| | | dicUrl: "/api/ubcs-system/dict/dictionary?code=post_category", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.post_add, false), |
| | | viewBtn: this.vaildData(this.permission.post_view, false), |
| | | delBtn: this.vaildData(this.permission.post_delete, false), |
| | | editBtn: this.vaildData(this.permission.post_edit, false) |
| | | addBtn: this.vaildData(this.permission.post.post_add, false), |
| | | viewBtn: this.vaildData(this.permission.post.post_view, false), |
| | | delBtn: this.vaildData(this.permission.post.post_delete, false), |
| | | editBtn: this.vaildData(this.permission.post.post_edit, false) |
| | | }; |
| | | }, |
| | | ids() { |
| | |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | clickRowChange(row){ |
| | | this.$refs.crud.toggleSelection(); |
| | | this.selectionList = row; |
| | | this.$refs.crud.setCurrentRow(row); |
| | | this.$refs.crud.toggleRowSelection(row); //选中当前行 |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]); |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |