| | |
| | | :value="item" |
| | | /> |
| | | </el-select> |
| | | <el-select v-model="query.userIds" multiple collapse-tags filterable clearable placeholder="所属员工" style="width: 185px;" class="filter-item"> |
| | | <el-option |
| | | v-for="item in users" |
| | | :key="item.id" |
| | | :label="item.nickName" |
| | | :value="item.id" |
| | | <div class="block"> |
| | | <el-cascader |
| | | :options="options" |
| | | :props="props" |
| | | collapse-tags |
| | | clearable |
| | | /> |
| | | </el-select> |
| | | </div> |
| | | <rrOperation :crud="crud" /> |
| | | </div> |
| | | <!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
| | |
| | | } |
| | | } |
| | | return { |
| | | props: { multiple: true }, |
| | | permission: { |
| | | add: ['admin', 'task:add'], |
| | | edit: ['admin', 'task:edit'], |
| | |
| | | // tag标签 |
| | | inputVisible: false, |
| | | inputValue: null, |
| | | containUserList: [] |
| | | containUserList: [], |
| | | options: [], |
| | | deptList: [], |
| | | jobList: [], |
| | | userList: [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | const userRolesLevel = this.$store.state.user.user.roles.map(({ level }) => level) |
| | | // 用户最大角色级别 |
| | | this.userRolesLevelMin = Math.min(...userRolesLevel) |
| | | |
| | | return true |
| | | }, |
| | | [CRUD.HOOK.beforeSubmit]() { |
| | |
| | | // 用户列表 |
| | | this.users = res |
| | | }) |
| | | |
| | | crudUser.getUserDept().then(res => { |
| | | this.options = res |
| | | }) |
| | | }, |
| | | getUserNameById(userId) { |
| | | const userList = this.users.filter(user => user.id === userId) |