| | |
| | | >{{ item.label }}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="公司" prop="company"> |
| | | <el-select v-model="form.company" style="width: 437px" clearable> |
| | | <el-option v-for="item in companyList" :key="item.id" :label="item.label" :value="item.value" /> |
| | | <el-form-item label="公司" prop="companyId"> |
| | | <el-select v-model="form.companyId" style="width: 437px" clearable> |
| | | <el-option v-for="item in companyList" :key="item.id" :label="item.label" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item style="margin-bottom: 0;" label="角色" prop="roles"> |
| | |
| | | v-model="roleDatas" |
| | | style="width: 437px" |
| | | multiple |
| | | :multiple-limit="1" |
| | | placeholder="请选择" |
| | | @remove-tag="deleteTag" |
| | | @change="changeRole" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <!-- 魏传栋 - 始 --> |
| | | <el-table-column :show-overflow-tooltip="true" prop="company" label="公司" width="150"> |
| | | <el-table-column :show-overflow-tooltip="true" prop="companyId" label="公司" width="150"> |
| | | <template slot-scope="scope"> |
| | | <template v-for="item in companyList"> |
| | | <span v-if="scope.row.company == item.value" :key="item.id">{{ item.label }}</span> |
| | | <span v-if="scope.row.companyId == item.id" :key="item.id">{{ item.label }}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect' |
| | | import crudRostering from '@/api/system/rostering' |
| | | import crudLevel from '@/api/system/level' |
| | | import crudSysUserCompany from '@/api/system/sysUserCompany' |
| | | import crudSysCompany from '@/api/system/sysCompany' |
| | | let userRoles = [] |
| | | let userJobs = [] |
| | | const defaultForm = { id: null, username: null, nickName: null, gender: '男', email: null, enabled: 'false', roles: [], jobs: [], dept: { id: null }, phone: null, birthday: null, address: null, dingding: null, sysRostering: { id: null }, levelId: null } |
| | |
| | | { min: 2, max: 100, message: '长度在 2 到 100 个字符', trigger: 'blur' } |
| | | ], |
| | | // 魏传栋 - 始 |
| | | company: [ |
| | | companyId: [ |
| | | { required: true, message: '请选择公司', trigger: 'blur' } |
| | | ] |
| | | // 魏传栋 - 终 |
| | |
| | | // 钩子:在获取表格数据之前执行,false 则代表不获取数据 |
| | | [CRUD.HOOK.beforeRefresh]() { |
| | | // 查询配置参数 |
| | | crudSysUserCompany.getAll().then(res => { |
| | | crudSysCompany.getAll().then(res => { |
| | | // 公司列表 |
| | | this.companyList = res |
| | | }) |