|
|
@ -19,12 +19,30 @@ |
|
|
|
modifyPeriodicallabCount, |
|
|
|
getperiodicallabById, |
|
|
|
addPeriodicallabCount, |
|
|
|
getDutyWorkplaceList, |
|
|
|
getadminDivisionList, |
|
|
|
} from './countStatistics.api'; |
|
|
|
|
|
|
|
import { useModalInner, BasicModal } from '@/components/Modal'; |
|
|
|
const [registerModal, { closeModal }] = useModalInner(init); |
|
|
|
let id = ref(''); |
|
|
|
let emit = defineEmits(['exit']); |
|
|
|
async function init(dataTo) { |
|
|
|
let dutyWorkplaceOption = await getDutyWorkplaceOptions(); |
|
|
|
let adminDivisionOption = await getadminDivisionOptions(); |
|
|
|
|
|
|
|
updateSchema({ |
|
|
|
field: 'dutyWorkplace', |
|
|
|
componentProps: { |
|
|
|
options: dutyWorkplaceOption, |
|
|
|
}, |
|
|
|
}); |
|
|
|
updateSchema({ |
|
|
|
field: 'adminDivision', |
|
|
|
componentProps: { |
|
|
|
options: adminDivisionOption, |
|
|
|
}, |
|
|
|
}); |
|
|
|
id.value = dataTo.id; |
|
|
|
if (dataTo.id) { |
|
|
|
let res = await getperiodicallabById({ id: dataTo.id }); |
|
|
@ -33,7 +51,8 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
onMounted(async () => {}); |
|
|
|
const [registerchangeFieldForm, { getFieldsValue, validate, setFieldsValue }] = useForm({ |
|
|
|
const [registerchangeFieldForm, { getFieldsValue, validate, setFieldsValue, updateSchema }] = |
|
|
|
useForm({ |
|
|
|
//注册表单列 |
|
|
|
schemas: countStatisticsFormSchema, |
|
|
|
//自定义查询按钮的文本和图标 |
|
|
@ -68,12 +87,41 @@ |
|
|
|
} |
|
|
|
|
|
|
|
emit('exit'); |
|
|
|
closeModal() |
|
|
|
closeModal(); |
|
|
|
} |
|
|
|
} |
|
|
|
async function customResetFunc() { |
|
|
|
emit('exit'); |
|
|
|
closeModal() |
|
|
|
closeModal(); |
|
|
|
} |
|
|
|
async function getDutyWorkplaceOptions() { |
|
|
|
let dutyWorkplaceOption = await getDutyWorkplaceList(); |
|
|
|
|
|
|
|
let uniqueList = [...new Set(dutyWorkplaceOption)]; |
|
|
|
|
|
|
|
let res = uniqueList.map((item) => { |
|
|
|
return { |
|
|
|
label: item, |
|
|
|
value: item, |
|
|
|
}; |
|
|
|
}); |
|
|
|
console.log('wwres', res); |
|
|
|
|
|
|
|
return res; |
|
|
|
} |
|
|
|
async function getadminDivisionOptions() { |
|
|
|
let adminDivisionOption = await getadminDivisionList(); |
|
|
|
|
|
|
|
let uniqueList = [...new Set(adminDivisionOption)]; |
|
|
|
|
|
|
|
let res = uniqueList.map((item) => { |
|
|
|
return { |
|
|
|
label: item, |
|
|
|
value: item, |
|
|
|
}; |
|
|
|
}); |
|
|
|
console.log('wres', res); |
|
|
|
return res; |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style scoped></style> |
|
|
|