This commit is contained in:
qsh
2024-07-30 18:55:30 +08:00
parent 60231e4005
commit 1e40357e51
8 changed files with 71 additions and 31 deletions

View File

@@ -157,6 +157,9 @@ const props = defineProps({
},
userOptions: {
type: Array
},
allUserOptions: {
type: Array
}
})
@@ -168,7 +171,7 @@ const formSchema = computed(() => {
it.componentProps['disabled'] = formType.value != 'create'
}
if (it.field == 'convertPeople') {
it.options = props.userOptions.map((it) => ({ ...it, name: it.nickname }))
it.options = props.allUserOptions.map((it) => ({ ...it, name: it.nickname }))
}
})
return [

View File

@@ -122,7 +122,7 @@
<el-form-item label="接待人" prop="receiver">
<el-select v-model="form.receiver" placeholder="选择接待人" clearable filterable>
<el-option
v-for="item in userOptions"
v-for="item in allUserOptions"
:key="item.id"
:label="item.nickname"
:value="item.id"
@@ -328,6 +328,7 @@ import { getDiyFieldList } from '@/api/clue/orderField'
import { getPlaceList } from '@/api/school/place'
import { getClassTypeList } from '@/api/school/class'
import { getSimpleProductList } from '@/api/mall/product'
// import { getSimpleWarehouseList } from '@/api/mall/warehouse'
import { formatDate } from '@/utils/formatTime'
import { getDictOptions } from '@/utils/dict'
@@ -358,7 +359,7 @@ const props = defineProps({
schema: {
type: Array
},
userOptions: {
allUserOptions: {
type: Array
}
})

View File

@@ -159,6 +159,7 @@
v-if="!loading"
ref="formRef"
:userOptions="userOptions"
:allUserOptions="allUserOptions"
:schema="allSchemas.formSchema"
@success="getTableList"
/>
@@ -172,6 +173,7 @@
<DialogSuccess
ref="successRef"
:schema="allSchemas.detailSchema"
:allUserOptions="allUserOptions"
:userOptions="userOptions"
@success="getTableList"
/>
@@ -187,7 +189,7 @@ import DrawerClue from './Comp/DrawerClue.vue'
import DialogSuccess from './Comp/DialogSuccess.vue'
import DialogFollow from './Comp/DialogFollow.vue'
import ClueMap from './Comp/ClueMap.vue'
import { getSimpleUserList as getUserOption } from '@/api/system/user'
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
import { removeNullField } from '@/utils'
import { formatDate } from '@/utils/formatTime'
@@ -356,12 +358,12 @@ function handleGain(id) {
}
const userOptions = ref([])
const allUserOptions = ref([])
onMounted(() => {
getUserOption().then((data) => {
userOptions.value = data
getCurdSchemas()
})
onMounted(async () => {
userOptions.value = await getUserOption()
allUserOptions.value = await getAllUserList()
getCurdSchemas()
})
</script>