Compare commits
No commits in common. "c037a3ab53c50205190d677dde54ca41f1194ba5" and "6cefd722cdb586e252a80f2c04f2b8776c62abb3" have entirely different histories.
c037a3ab53
...
6cefd722cd
|
@ -40,15 +40,12 @@
|
||||||
/>
|
/>
|
||||||
<a-radio-group v-else-if="item.type === 'radioGroup'" v-model:value="modelValue[field]" style="width: 100%" v-bind="item.componentsProps" :options="item.options" />
|
<a-radio-group v-else-if="item.type === 'radioGroup'" v-model:value="modelValue[field]" style="width: 100%" v-bind="item.componentsProps" :options="item.options" />
|
||||||
<a-checkbox-group v-else-if="item.type === 'checkboxGroup'" v-model:value="modelValue[field]" style="width: 100%" v-bind="item.componentsProps" :options="item.options" />
|
<a-checkbox-group v-else-if="item.type === 'checkboxGroup'" v-model:value="modelValue[field]" style="width: 100%" v-bind="item.componentsProps" :options="item.options" />
|
||||||
<!-- :show-search="item.showSearch" -->
|
|
||||||
<!-- :placeholder="getPlaceholder(item)" -->
|
|
||||||
<!-- :placeholder="item.placeholder" -->
|
|
||||||
<a-select
|
<a-select
|
||||||
v-else-if="item.type === 'select'"
|
v-else-if="item.type === 'select'"
|
||||||
v-model:value="modelValue[field]"
|
v-model:value="modelValue[field]"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:placeholder="getPlaceholder(item)"
|
|
||||||
v-bind="item.componentsProps"
|
v-bind="item.componentsProps"
|
||||||
|
:placeholder="getPlaceholder(item)"
|
||||||
:allowClear="item.componentsProps?.allowClear ?? true"
|
:allowClear="item.componentsProps?.allowClear ?? true"
|
||||||
:options="item.options"
|
:options="item.options"
|
||||||
/>
|
/>
|
||||||
|
@ -165,13 +162,7 @@ const getResponsive = (item: FormProMaxItemProps): Grid => {
|
||||||
}
|
}
|
||||||
|
|
||||||
//优先级: 组件本身=》formItem=》label
|
//优先级: 组件本身=》formItem=》label
|
||||||
const getPlaceholder = function (item: FormProMaxItemProps) {
|
const getPlaceholder = (item: FormProMaxItemProps) => item.componentsProps?.placeholder ?? item.placeholder ?? (item.type.includes('input') ? `请输入${item.label}` : `请选择${item.label}`)
|
||||||
// console.log('getPlaceholder____________________________', item)
|
|
||||||
console.log('getPlaceholder_______________________placeholder', item.placeholder)
|
|
||||||
console.log(item.componentsProps?.placeholder ?? item.placeholder ?? (item.type.includes('input') ? `请输入${item.label}` : `请选择${item.label}`))
|
|
||||||
|
|
||||||
return item.componentsProps?.placeholder ?? item.placeholder ?? (item.type.includes('input') ? `请输入${item.label}` : `请选择${item.label}`)
|
|
||||||
}
|
|
||||||
|
|
||||||
defineExpose<FormExpose>({
|
defineExpose<FormExpose>({
|
||||||
validate: (nameList, options) => formProMaxRef.value?.validate(nameList, options),
|
validate: (nameList, options) => formProMaxRef.value?.validate(nameList, options),
|
||||||
|
|
|
@ -31,7 +31,6 @@ import { AutoComplete, Button, Input, message, Modal, Space } from 'ant-design-v
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'lodash-es'
|
||||||
import FormProMax from '@/components/form/FormProMax.vue'
|
import FormProMax from '@/components/form/FormProMax.vue'
|
||||||
import api from '@/axios'
|
import api from '@/axios'
|
||||||
// createVNode
|
|
||||||
import { ref, reactive, computed, onMounted } from 'vue'
|
import { ref, reactive, computed, onMounted } from 'vue'
|
||||||
import TableProMax from '@/components/table/TableProMax.vue'
|
import TableProMax from '@/components/table/TableProMax.vue'
|
||||||
import { TableProMaxProps } from '@/types/components/table/index.ts'
|
import { TableProMaxProps } from '@/types/components/table/index.ts'
|
||||||
|
@ -239,7 +238,6 @@ const saveOrUpdateEnterprisesUnit = (params: _FormType, callback: Function) => {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: '单位类型',
|
label: '单位类型',
|
||||||
required: true,
|
required: true,
|
||||||
placeholder: '请选择单位类型',
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
options: dictSelectNodes('EnterprisesUnitType'),
|
options: dictSelectNodes('EnterprisesUnitType'),
|
||||||
},
|
},
|
||||||
|
@ -389,18 +387,6 @@ const formItemOptions = ref<FormProMaxItemOptions<serviceProjectSaveOrUpdatePara
|
||||||
label: '保安单位',
|
label: '保安单位',
|
||||||
required: true,
|
required: true,
|
||||||
options: securityUnitIdList,
|
options: securityUnitIdList,
|
||||||
placeholder: '请选择或搜索保安单位',
|
|
||||||
componentsProps: {
|
|
||||||
// placeholder: '请选择或搜索保安单位',
|
|
||||||
showSearch: true,
|
|
||||||
// 是否根据输入项进行筛选。当其为一个函数时,会接收 inputValue option 两个参数,当 option 符合筛选条件时,应返回 true,反之则返回 false。
|
|
||||||
filterOption: (input: string, option: any) => {
|
|
||||||
// if (option.label.toLowerCase().includes(input?.toLowerCase())) {
|
|
||||||
// console.log(111111111111111)
|
|
||||||
// }
|
|
||||||
return option.label.toLowerCase().includes(input?.toLowerCase())
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
type: {
|
type: {
|
||||||
type: 'radioGroup',
|
type: 'radioGroup',
|
||||||
|
@ -649,21 +635,6 @@ const expandedRowRender: TableProMaxProps['expandedRowRender'] = ({ record }) =>
|
||||||
formParams.value.houseTotal = record.houseTotal //户数
|
formParams.value.houseTotal = record.houseTotal //户数
|
||||||
formParams.value.staffTotal = record.staffTotal //工作人员数量
|
formParams.value.staffTotal = record.staffTotal //工作人员数量
|
||||||
formParams.value.securityUserTotal = record.securityUserTotal //保安人员数量
|
formParams.value.securityUserTotal = record.securityUserTotal //保安人员数量
|
||||||
{
|
|
||||||
/* Modal.confirm({
|
|
||||||
title: serviceTitle.value,
|
|
||||||
icon: createVNode('div'),
|
|
||||||
width: 600,
|
|
||||||
centered: true,
|
|
||||||
content: () => <FormProMax ref={formRef} v-model:value={formParams.value} formItemOptions={formItemOptions.value} />,
|
|
||||||
onOk: async () => {
|
|
||||||
await submit()
|
|
||||||
},
|
|
||||||
onCancel: async () => {
|
|
||||||
await closeModal()
|
|
||||||
},
|
|
||||||
}) */
|
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
|
@ -742,18 +713,5 @@ onMounted(async () => {
|
||||||
const addService = function (record) {
|
const addService = function (record) {
|
||||||
formParams.value.enterprisesUnitId = record.snowFlakeId //企事业单位Id
|
formParams.value.enterprisesUnitId = record.snowFlakeId //企事业单位Id
|
||||||
visible.value = true
|
visible.value = true
|
||||||
//Modal.confirm({
|
|
||||||
// title: serviceTitle.value,
|
|
||||||
// icon: createVNode('div'),
|
|
||||||
// width: 600,
|
|
||||||
// centered: true,
|
|
||||||
// content: () => <FormProMax ref={formRef} v-model:value={formParams.value} formItemOptions={formItemOptions.value} />,
|
|
||||||
// onOk: async () => {
|
|
||||||
// await submit()
|
|
||||||
// },
|
|
||||||
// onCancel: async () => {
|
|
||||||
// await closeModal()
|
|
||||||
// },
|
|
||||||
//})
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue