Commit 61eb75a4 authored by 高滢's avatar 高滢

Merge remote-tracking branch 'origin/develop' into develop

parents 8857f8c4 1db6fb5f
...@@ -21,7 +21,11 @@ enum Api { ...@@ -21,7 +21,11 @@ enum Api {
getProject = '/pro/completion/getProject', getProject = '/pro/completion/getProject',
statisticCompletion = '/pro/completion/statisticCompletion', statisticCompletion = '/pro/completion/statisticCompletion',
statisticCompletionDetails = '/pro/completion/statisticCompletionDetails', statisticCompletionDetails = '/pro/completion/statisticCompletionDetails',
ExportCount = '/pro/export/completionStatistic' ExportCount = '/pro/export/completionStatistic',
GetCycelDetails = '/pro/completion/cycle/details',
EditCycel = '/pro/completion/cycle/edit',
EditStatus = '/pro/completion/cycle/editStatus',
BusinessComDetails = '/pro/completion/cycle/businessComDetails',
} }
export const getListByPage = (params?: ProjectParams) => export const getListByPage = (params?: ProjectParams) =>
defHttp.post<ProjectModel>({ url: Api.GetList, data: params }); defHttp.post<ProjectModel>({ url: Api.GetList, data: params });
...@@ -77,25 +81,48 @@ export const getPerformanceDetail = (params?: any) => ...@@ -77,25 +81,48 @@ export const getPerformanceDetail = (params?: any) =>
export const getProject = (params?: any) => export const getProject = (params?: any) =>
defHttp.post<ProjectModel>({ url: Api.getProject, params }); defHttp.post<ProjectModel>({ url: Api.getProject, params });
export const getStatisticCompletionProject = (params?: any) => export const getStatisticCompletionProject = (params?: any) =>
defHttp.post<any>({ defHttp.post<any>({
url: Api.statisticCompletion, url: Api.statisticCompletion,
params, params,
}); });
export const getStatisticCompletionDetails = (params?: any) => export const getStatisticCompletionDetails = (params?: any) =>
defHttp.post<any>({ defHttp.post<any>({
url: Api.statisticCompletionDetails, url: Api.statisticCompletionDetails,
params, params,
}); });
export const exportStatisticList = (params?: any) => export const exportStatisticList = (params?: any) =>
defHttp.post<any>( defHttp.post<any>(
{ {
url: Api.ExportCount, url: Api.ExportCount,
data: params, data: params,
responseType: 'blob', responseType: 'blob',
}, },
{ errorMessageMode: 'none', isTransformResponse: false }, { errorMessageMode: 'none', isTransformResponse: false },
); );
export const getCycel = (params?: any) =>
defHttp.post<any>({
url: Api.GetCycelDetails,
params,
});
export const setCycel = (params?: any) =>
defHttp.post<any>({
url: Api.EditCycel,
params,
});
export const setEditStatus = (params?: any) =>
defHttp.post<any>({
url: Api.EditStatus,
params,
});
export const getFillComDetails = (params?: any) =>
defHttp.post<any>({
url: Api.BusinessComDetails,
params,
});
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
bordered: true, bordered: true,
showIndexColumn: false, showIndexColumn: false,
actionColumn: { actionColumn: {
width: 140, width: 220,
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
// slots: { customRender: 'action' }, // slots: { customRender: 'action' },
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
confirm: examine.bind(null, record, true), confirm: examine.bind(null, record, true),
}, },
ifShow: (_action) => { ifShow: (_action) => {
return deptId !== 100 && isExamine === true && record.isSubmit === '1'; return record.status === '0' && deptId !== '100' && isExamine === true && record.isSubmit === '1';
}, },
}, },
{ {
......
<template>
<BasicModal
v-bind="$attrs"
@register="register"
title="设置填报周期"
:minHeight="30"
okText="保存"
@ok="handleSubmit"
>
<BasicForm @register="registerForm" :model="modelRef" />
</BasicModal>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import { setCycel } from '@/api/project/performance';
const props = defineProps({
userData: { type: Object },
});
const emit = defineEmits(['getCycle', 'register']);
const modelRef = ref({});
const [registerForm, { getFieldsValue, validate }] = useForm({
labelWidth: 100,
schemas: [
{
field: 'year',
label: '填报年份',
required: true,
component: 'DatePicker',
componentProps: {
placeholder: '年份',
picker: 'year',
style: { width: '100%' },
valueFormat: 'YYYY',
format: 'YYYY',
},
colProps: { span: 12 },
},
],
showActionButtonGroup: false,
actionColOptions: {
span: 24,
},
});
const cycleData = ref({
beginTime: '2024-07-01',
endTime: '2024-09-02',
fillCycle: '2026',
isEdit: '0',
deptNum: 8,
noNum: 6,
});
const [register, { closeModal }] = useModalInner((data) => {
cycleData.value = data.data;
});
function handleSubmit() {
validate().then(() => {
const value = getFieldsValue();
cycleData.value.fillCycle = value.year;
setCycel(cycleData.value).then(() => {
emit('getCycle');
});
closeModal();
});
}
</script>
<template>
<BasicModal v-bind="$attrs" width="80%" @register="register" :title="getTitle" :showOkBtn="false">
<Table
:pagination="false"
:dataSource="dataSource"
:columns="columns"
bordered
:sticky="true"
:loading="loadingRef"
>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'comStatus'">
<Tag color="green" v-if="record.comStatus === '1'"> 已完成 </Tag>
<Tag color="red" v-else> 未完成 </Tag>
</template>
</template>
</Table>
</BasicModal>
</template>
<script setup lang="ts">
import { useModalInner } from '@/components/Modal';
import BasicModal from '@/components/Modal/src/BasicModal.vue';
import { ref } from 'vue';
import { Table, Tag } from 'ant-design-vue';
import { getFillComDetails } from '@/api/project/performance';
const loadingRef = ref(false);
// 列表
const dataSource = ref([]);
// 表头
const columns = [
{
title: '公司名称',
dataIndex: 'company',
width: 200,
},
{
title: '完成状态',
dataIndex: 'comStatus',
width: 180,
},
{
title: '上报时间',
dataIndex: 'updateTime',
width: 150,
},
];
const getTitle = ref('');
const params = ref({ mothCycle: '' });
const [register, { closeModal }] = useModalInner(async (data) => {
params.value.mothCycle = data.data.fillCycle;
dataSource.value = await getFillComDetails(params.value);
});
</script>
<style scoped lang="less"></style>
This diff is collapsed.
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
{ {
label: '删除', label: '删除',
color: 'error', color: 'error',
popConfirm: { popConfirm: {
title: '是否确认删除', title: '是否确认删除',
placement: 'left', placement: 'left',
confirm: handleDelete.bind(null, record), confirm: handleDelete.bind(null, record),
...@@ -137,6 +137,9 @@ ...@@ -137,6 +137,9 @@
placement: 'left', placement: 'left',
confirm: handleDelete.bind(null, record), confirm: handleDelete.bind(null, record),
}, },
ifShow: (_action) => {
return record.isEdit === '0';
},
}, },
]" ]"
/> />
......
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