Commit da565b2c authored by liwei's avatar liwei

修改了完成情况页面以及统计页面bug

parent 751af559
......@@ -21,7 +21,7 @@ enum Api {
getProject = '/pro/completion/getProject',
statisticCompletion = '/pro/completion/statisticCompletion',
statisticCompletionDetails = '/pro/completion/statisticCompletionDetails',
ExportCount = '/pro/completion/statistic'
ExportCount = '/pro/export/completionStatistic'
}
export const getListByPage = (params?: ProjectParams) =>
defHttp.post<ProjectModel>({ url: Api.GetList, data: params });
......
......@@ -202,7 +202,7 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 4 },
},
{
field: 'company',
field: 'companyId',
label: '',
component: 'Select',
componentProps: {
......
......@@ -50,8 +50,7 @@
confirm: examine.bind(null, record, true),
},
ifShow: (_action) => {
return record.completionResult == 0;
// return record.completionResult == 0 && deptId != '100';
return record.completionResult == 0 && isExamine === true && record.isSubmit == '1';
},
},
]"
......@@ -77,7 +76,6 @@
import {useMessage} from "@/hooks/web/useMessage";
import {useUserStore} from "@/store/modules/user";
const deptId = ref('');
const { createMessage } = useMessage();
const { push } = useRouter();
......@@ -114,8 +112,14 @@
});
}
const isExamine = ref<boolean>(false);
onMounted(async () => {
deptId.value = useUserStore().userInfo.deptId;
let roles = useUserStore().userInfo.roles;
roles.forEach((item) => {
if (item.role_key === 'approver') {
isExamine.value = true;
}
});
const data = await getDepartmentList();
searchFormSchema[2].componentProps.options = data;
});
......
......@@ -24,7 +24,7 @@
</div>
</template>
<script setup lang="ts">
import { BasicForm, useForm } from '@/components/Form';
import {BasicForm, FormSchema, useForm} from '@/components/Form';
import PageCard from '@/components/Page/src/PageCard.vue';
import { Table } from 'ant-design-vue';
import { onMounted, ref } from 'vue';
......@@ -32,26 +32,70 @@
getBasicColumns,
searchForm,
} from '@/views/performance/statisticPerformance/statisticData';
import { getSelectDeptById, getStatistic } from '@/api/project/monthlyPlan';
import { getDepartmentList } from '@/api/project/settlementManage';
import { getStatisticCompletionProject,getStatisticCompletionDetails } from '@/api/project/performance';
import PerformanceStatisticWindow from '@/views/performance/statisticPerformance/performanceStatisticWindow.vue';
import { useModal } from '@/components/Modal';
import {exportStatisticList} from "@/api/project/performance";
import {downloadByData} from "@/utils/file/download";
import moment from "moment";
const searchForm1 = ref([
{
field: 'filingCycle',
label: '',
defaultValue: new Date(),
component: 'DatePicker',
componentProps: {
placeholder: '选择填报周期',
style: { width: '100%' },
picker: 'year',
defaultValue: moment().format('YYYY'),
valueFormat: 'YYYY',
format: 'YYYY',
},
colProps: { span: 4 },
},
{
field: 'planType',
label: '',
defaultValue: '自投',
component: 'Select',
componentProps: {
defaultValue: '自投',
options: [
{ label: '自投', value: '自投' },
{ label: '代建', value: '代建' },
{ label: '承建', value: '承建' },
{ label: '储备', value: '储备' },
],
placeholder: '类型',
},
colProps: { span: 4 },
},
{
field: 'companyId',
label: '',
component: 'Select',
componentProps: {
options: [],
placeholder: '公司名称',
},
colProps: { span: 4 },
},
]);
const [register, { openModal: openModal }] = useModal();
onMounted(async () => {
const data = await getSelectDeptById();
searchForm[2].componentProps.options = data;
getStatisticList();
});
const dataSource = ref([]);
const loadingRef = ref(false);
const params = ref({ filingCycle: '2024', planType: '自投', company: '' });
onMounted(async () => {
const data = await getDepartmentList();
searchForm1.value[2].componentProps.options = data;
getStatisticList();
});
const [registerForm, { getFieldsValue }] = useForm({
labelWidth: 90,
baseColProps: { span: 24 },
schemas: searchForm,
schemas: searchForm1,
showActionButtonGroup: false,
});
function handleSubmit() {
......@@ -76,7 +120,7 @@
loadingRef.value = true;
let data = await getStatisticCompletionProject(params.value);
// dataSource.value = data;
let propsList = ['companyName'];
let propsList = ['company'];
propsList.map((item) => {
changeData(data, item);
});
......
......@@ -61,7 +61,7 @@ export function getBasicColumns(year: string, planType: string): BasicColumn[] {
fixed: 'left',
width: 250,
customCell: (_, any) => ({
rowSpan: _.companyNamerowSpan,
rowSpan: _.companyrowSpan,
}),
},
{
......
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