Commit f98cb432 authored by 高滢's avatar 高滢

feat(月度统计公司下拉框): 延迟

parent 0f06f487
...@@ -198,9 +198,6 @@ export const seach: FormSchema[] = [ ...@@ -198,9 +198,6 @@ export const seach: FormSchema[] = [
componentProps: { componentProps: {
options: [], options: [],
placeholder: '请选择所属公司', placeholder: '请选择所属公司',
// onChange: (e) => {
// params.value.deptId = e;
// },
}, },
colProps: { span: 4 }, colProps: { span: 4 },
}, },
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
bordered bordered
:loading="loadingRef" :loading="loadingRef"
:rowClassName="setRowClassName" :rowClassName="setRowClassName"
:scroll="{ x: 1300,y: 350 }" :scroll="{ x: 1300, y: 350 }"
> >
<template #sourceType="{ text, record }"> <template #sourceType="{ text, record }">
<a @click="showDetails(record)"> {{ text }}</a> <a @click="showDetails(record)"> {{ text }}</a>
...@@ -35,22 +35,22 @@ ...@@ -35,22 +35,22 @@
import PageCard from '@/components/Page/src/PageCard.vue'; import PageCard from '@/components/Page/src/PageCard.vue';
import { downloadByData } from '@/utils/file/download'; import { downloadByData } from '@/utils/file/download';
import { seach } from '@/views/monthlyPlan/data'; import { seach } from '@/views/monthlyPlan/data';
import { useUserStore } from '@/store/modules/user';
const deptId = ref('');
onMounted(async () => { onMounted(async () => {
deptId.value = useUserStore().userInfo.deptParentId; const data = await getSelectDeptById();
if (deptId.value == '100') { updateSchema({
const data = await getSelectDeptById(); field: 'deptId',
seach[1].componentProps.options = data; componentProps: {
} options: data,
placeholder: '请选择所属公司',
},
});
params.value.monthYear = getCurrentDateFormatted(); params.value.monthYear = getCurrentDateFormatted();
getStatisticList(); getStatisticList();
}); });
defineOptions({ name: 'MonthlyPlan' }); defineOptions({ name: 'MonthlyPlan' });
const [register, { openModal: openModal }] = useModal(); const [register, { openModal: openModal }] = useModal();
const formElRef = ref<Nullable<FormActionType>>(null); const formElRef = ref<Nullable<FormActionType>>(null);
const [registerForm, { getFieldsValue }] = useForm({ const [registerForm, { getFieldsValue, updateSchema }] = useForm({
labelWidth: 90, labelWidth: 90,
baseColProps: { span: 24 }, baseColProps: { span: 24 },
schemas: seach, schemas: seach,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment