| | |
| | | >{{ 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-select> |
| | | </el-form-item> |
| | | <el-form-item style="margin-bottom: 0;" label="角色" prop="roles"> |
| | | <el-select |
| | | v-model="roleDatas" |
| | |
| | | <div>{{ scope.row.dept.name }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- 魏传栋 - 始 --> |
| | | <el-table-column :show-overflow-tooltip="true" prop="company" 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> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- 魏传栋 - 终 --> |
| | | <el-table-column label="状态" align="center" prop="enabled"> |
| | | <template slot-scope="scope"> |
| | | <el-switch |
| | |
| | | import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect' |
| | | import crudRostering from '@/api/system/rostering' |
| | | import crudLevel from '@/api/system/level' |
| | | import crudSystemSetting from '@/api/system/systemSetting' |
| | | 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 } |
| | |
| | | ], |
| | | address: [ |
| | | { min: 2, max: 100, message: '长度在 2 到 100 个字符', trigger: 'blur' } |
| | | ], |
| | | // 魏传栋 - 始 |
| | | company: [ |
| | | { required: true, message: '请选择公司', trigger: 'blur' } |
| | | ] |
| | | // 魏传栋 - 终 |
| | | }, |
| | | // CRUD状态 |
| | | crudStatusPrepared: CRUD.STATUS.PREPARED, |
| | | // 排班 |
| | | rosterings: [], |
| | | // 级别 |
| | | levels: [] |
| | | levels: [], |
| | | // 魏传栋-始 |
| | | // 公司 |
| | | companyList: [] |
| | | // 魏传栋-终 |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | // 魏传栋 - 始 |
| | | // 钩子:在获取表格数据之前执行,false 则代表不获取数据 |
| | | [CRUD.HOOK.beforeRefresh]() { |
| | | // 查询配置参数 |
| | | crudSystemSetting.getAll().then(res => { |
| | | // 公司列表 |
| | | this.companyList = res |
| | | }) |
| | | return true |
| | | }, |
| | | // 魏传栋 - 终 |
| | | // 禁止输入空格 |
| | | keydown(e) { |
| | | if (e.keyCode === 32) { |