From a0c1d9021b1a65cc397a2c7a8a9d226c2d9f7539 Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期四, 07 八月 2025 17:17:57 +0800 Subject: [PATCH] feat: 企业 --- src/views/TaskManage/components/TaskDetailView.vue | 122 ++++++++++++++++++++++++++++++++++++++-- 1 files changed, 116 insertions(+), 6 deletions(-) diff --git a/src/views/TaskManage/components/TaskDetailView.vue b/src/views/TaskManage/components/TaskDetailView.vue index 8d86b79..668e441 100644 --- a/src/views/TaskManage/components/TaskDetailView.vue +++ b/src/views/TaskManage/components/TaskDetailView.vue @@ -6,16 +6,107 @@ <ProFormCol> <ProFormColItem :span="12"> <ProFormItemV2 label="浠诲姟鍚嶇О:" prop="name"> - <ProFormText v-model.trim="detail.name" /> + <ProFormText v-model.trim="detail.enterpriseName" /> + </ProFormItemV2> + </ProFormColItem> + </ProFormCol> + <ProFormCol> + <ProFormItemV2 label="鏈嶅姟璐�:" prop="salaryType"> + <RadioWithExtra + v-model="detail.enterpriseName" + :value-enum="[ + { value: 1, text: '鎸夋湀' }, + { value: 2, text: '鎸夋棩' }, + ]" + enumLabelKey="text" + enum-value-key="value" + :showExtra="true" + > + <template #extra> + <ProFormInputNumber + :controls="false" + v-model="detail.enterpriseName" + :unit="detail.enterpriseName === '' ? '鍏�/鏈�' : '鍏�/鏃�'" + ></ProFormInputNumber> + </template> + </RadioWithExtra> + </ProFormItemV2> + </ProFormCol> + <ProFormCol> + <ProFormColItem :span="12"> + <ProFormItemV2 label="缁撶畻鏂瑰紡:" prop="salaryType"> + <ProFormRadio + v-model="detail.enterpriseName" + :value-enum="[ + { label: '鏈堢粨', value: 1 }, + { label: '鏃ョ粨', value: 2 }, + ]" + /> </ProFormItemV2> </ProFormColItem> </ProFormCol> <ProFormCol> <ProFormColItem :span="12"> - <ProFormItemV2 label="浠诲姟鍚嶇О:" prop="name"> </ProFormItemV2> + <ProFormItemV2 label="绂忓埄:" prop="salaryType"> + <ProFormRadio v-model="detail.enterpriseName" :value-enum="dictionaryDataList" /> + </ProFormItemV2> + </ProFormColItem> + </ProFormCol> + <ProFormCol> + <ProFormColItem :span="12"> + <ProFormItemV2 label="骞撮緞鑼冨洿:" prop="ageRange"> + <ProFormInputNumber v-model="detail.enterpriseName"></ProFormInputNumber> + </ProFormItemV2> + </ProFormColItem> + </ProFormCol> + <ProFormCol> + <ProFormColItem :span="12"> + <ProFormItemV2 label="鎬у埆闇�姹�:" prop="salaryType"> + <ProFormRadio + v-model="detail.enterpriseName" + :value-enum="[ + { label: '鐢�', value: 1 }, + { label: '濂�', value: 2 }, + ]" + /> + </ProFormItemV2> + </ProFormColItem> + </ProFormCol> + <ProFormCol> + <ProFormColItem :span="12"> + <ProFormItemV2 label="璧勬牸璇佷功:" prop="salaryType"> + <ProFormRadio v-model="detail.enterpriseName" :value-enum="dictionaryDataList" /> + </ProFormItemV2> + </ProFormColItem> + </ProFormCol> + <ProFormCol> + <ProFormColItem :span="12"> + <ProFormItemV2 label="浠诲姟鍦扮偣:" prop="areaList"> + <!-- <ProFromAddressSelectV2 + v-model:areaList="detail.areaList" + areaListPlaceholder="璇烽�夋嫨" + :layer="AreaType.Area" + /> --> + </ProFormItemV2> + </ProFormColItem> + </ProFormCol> + <ProFormCol> + <ProFormColItem :span="12"> + <ProFormItemV2 label="浠诲姟鏃堕棿:" prop="creationTime" mode="read"> + <ProFormDatePicker + v-model="detail.enterpriseName" + type="daterange" + range-separator="鑷�" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + ></ProFormDatePicker> + </ProFormItemV2> </ProFormColItem> </ProFormCol> </ProForm> + <template #footer> + <el-button @click="handleBack">鍏抽棴</el-button> + </template> </PageFormLayout> </AppContainer> </LoadingLayout> @@ -32,8 +123,12 @@ ProFormItemV2, ProFormText, ProFormInputNumber, + ProFormRadio, + ProFormDatePicker, } from '@bole-core/components'; import { useQuery } from '@tanstack/vue-query'; +import { AreaType } from '@/constants'; +import * as enterpriseServices from '@/services/api/enterprise'; defineOptions({ name: 'TaskDetailView', @@ -41,15 +136,30 @@ const route = useRoute(); const id = route.params?.id as string; +const { closeViewPush } = useRouteView(); +const { dictionaryDataList } = useDictionaryDataSelect({ + categoryCode: computed(() => CategoryCode.Welfare), +}); const { data: detail, isLoading } = useQuery({ - queryKey: ['customerServices/getParkCustomerManageBaseDetail', id], + queryKey: ['enterpriseServices/getEnterprise', id], queryFn: async () => { - return await customerServices.getParkCustomerManageBaseDetail({ id: id }); + return await enterpriseServices.getEnterprise( + { id: id }, + { + showLoading: false, + } + ); }, - placeholderData: () => ({} as API.GetUserClientForBackOutput), - enabled: !!id, + placeholderData: () => ({} as API.GetEnterpriseQueryResult), + enabled: computed(() => !!id), }); + +function handleBack() { + closeViewPush(route, { + name: 'TaskManageList', + }); +} </script> <style lang="scss" scoped> -- Gitblit v1.9.1