|
@@ -12,6 +12,7 @@
|
|
|
<el-radio
|
|
|
v-for="option in deptTypeOptions"
|
|
|
:label="option.value"
|
|
|
+ :value="option.value"
|
|
|
:key="option.value"
|
|
|
>
|
|
|
{{ option.label }}
|
|
@@ -25,11 +26,20 @@
|
|
|
:modelValue="superiorValue"
|
|
|
@update:modelValue="(val: string[]) => updateSuperiorValue(val)"
|
|
|
:options="organTrees"
|
|
|
- :props="{ checkStrictly: true, label: 'name', value: 'id', disabled: 'disabled' }"
|
|
|
+ :props="{
|
|
|
+ checkStrictly: true,
|
|
|
+ label: 'name',
|
|
|
+ value: 'id',
|
|
|
+ disabled: 'disabled',
|
|
|
+ }"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="负责人">
|
|
|
- <el-input v-model="bindDept.leader" maxlength="30" placeholder="请输入"></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="bindDept.leader"
|
|
|
+ maxlength="30"
|
|
|
+ placeholder="请输入"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="联系电话">
|
|
|
<el-input
|
|
@@ -63,7 +73,10 @@ import { QuiskExpose } from "@/helper/mount";
|
|
|
|
|
|
const props = defineProps<{ dept?: Organization }>();
|
|
|
|
|
|
-const queryPathById = (id: string, current: Organization[]): string[] | null => {
|
|
|
+const queryPathById = (
|
|
|
+ id: string,
|
|
|
+ current: Organization[]
|
|
|
+): string[] | null => {
|
|
|
for (const item of current) {
|
|
|
if (item.id === id) {
|
|
|
return [item.id];
|
|
@@ -76,7 +89,9 @@ const queryPathById = (id: string, current: Organization[]): string[] | null =>
|
|
|
}
|
|
|
return null;
|
|
|
};
|
|
|
-const bindDept = ref<Organization>((props.dept ? { ...props.dept } : {}) as Organization);
|
|
|
+const bindDept = ref<Organization>(
|
|
|
+ (props.dept ? { ...props.dept } : {}) as Organization
|
|
|
+);
|
|
|
const organTrees = ref<Organization[]>([]);
|
|
|
const superiorValue = computed(() => {
|
|
|
if (bindDept.value.parentId) {
|