|
@@ -20,7 +20,9 @@
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
|
<el-form-item label="关联角色" prop="roleIds">
|
|
|
- <el-cascader :options="roleData" :props="{ checkStrictly: true, multiple: true, emitPath: false, value: 'id', label: 'name' }" placeholder="请选择角色" clearable class="w100" v-model="ruleForm.roleIds">
|
|
|
+ <el-cascader :options="roleData" :props="{
|
|
|
+ checkStrictly: true, multiple: true, emitPath: false, value: 'id', label: 'name', disabled: disabledFn
|
|
|
+ }" placeholder="请选择角色" clearable class="w100" v-model="ruleForm.roleIds">
|
|
|
<template #default="{ node, data }">
|
|
|
<span>{{ data.name }}</span>
|
|
|
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
|
|
@@ -30,7 +32,7 @@
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
|
<el-form-item label="组织" prop="deptId">
|
|
|
- <el-cascader :options="deptData" :props="{ checkStrictly: true, emitPath: false, value: 'deptId', label: 'deptName' }" placeholder="请选择组织" clearable class="w100" v-model="ruleForm.deptId">
|
|
|
+ <el-cascader :options="deptData" :props="{ checkStrictly: true, emitPath: false, value: 'deptId', label: 'deptName', disabled: disabledFn }" placeholder="请选择组织" clearable class="w100" v-model="ruleForm.deptId">
|
|
|
<template #default="{ node, data }">
|
|
|
<span>{{ data.deptName }}</span>
|
|
|
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
|
|
@@ -59,7 +61,7 @@
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
|
<el-form-item label="岗位" prop="postIds">
|
|
|
- <el-cascader :options="postData" :props="{ checkStrictly: true, multiple: true, emitPath: false, value: 'postId', label: 'postName' }" placeholder="请选择岗位" clearable class="w100" v-model="ruleForm.postIds">
|
|
|
+ <el-cascader :options="postData" :props="{ checkStrictly: true, multiple: true, emitPath: false, value: 'postId', label: 'postName', disabled: disabledFn }" placeholder="请选择岗位" clearable class="w100" v-model="ruleForm.postIds">
|
|
|
<template #default="{ node, data }">
|
|
|
<span>{{ data.postName }}</span>
|
|
|
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
|
|
@@ -159,6 +161,11 @@ export default defineComponent({
|
|
|
default: () => [],
|
|
|
},
|
|
|
},
|
|
|
+ methods: {
|
|
|
+ disabledFn(row: any) {
|
|
|
+ return row.status === 0
|
|
|
+ }
|
|
|
+ },
|
|
|
setup(prop, { emit }) {
|
|
|
const postList = ref([]);
|
|
|
const formRef = ref<HTMLElement | null>(null);
|