From fb243f3345c6f3ed7e7c8c2d98c39b5afc782b9a Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期一, 20 十月 2025 10:24:40 +0800
Subject: [PATCH] Merge branch 'master' of http://120.26.58.240:8888/r/flexJobMiniApp
---
packages/components/src/Card/JobApplicationCard.vue | 123 ++++++++++++++++++++++------------------
1 files changed, 67 insertions(+), 56 deletions(-)
diff --git a/packages/components/src/Card/JobApplicationCard.vue b/packages/components/src/Card/JobApplicationCard.vue
index 5800a9e..62e7449 100644
--- a/packages/components/src/Card/JobApplicationCard.vue
+++ b/packages/components/src/Card/JobApplicationCard.vue
@@ -1,27 +1,40 @@
<template>
<div class="job-application-card-wrapper">
<div class="job-application-card-title-wrapper">
- <div class="job-application-card-title">瀹㈡埧鏈嶅姟鍛�</div>
- <div class="job-application-card-title-more" @click.stop="handleMore">
+ <div class="job-application-card-title">{{ name }}</div>
+ <TaskPrice :value="toThousand(serviceFee ?? 0)" :unit="unit" v-if="mode === 'taskManage'" />
+ <div v-else class="job-application-card-title-more" @click.stop="handleMore">
<img :src="IconMore" class="more-btn-icon" />
</div>
</div>
<div class="job-application-card-line">
- <div class="job-application-card-time">{{ `${'2025骞�2鏈�5鏃�'}鑷�${'2025骞�3鏈�5鏃�'}` }}</div>
- <div class="job-application-card-status">{{ '鐢熸晥涓�' }}</div>
+ <div class="job-application-card-time">
+ {{
+ `${dayjs(beginTime).format('YYYY骞碝M鏈圖D鏃�')}鑷�${dayjs(endTime).format('YYYY骞碝M鏈圖D鏃�')}`
+ }}
+ </div>
+ <div class="job-application-card-status" v-if="mode === 'normal'">
+ {{ EnumTaskReleaseStatusText[releaseStatus] }}
+ </div>
</div>
<div class="job-application-card-line">
<div class="job-application-card-company">
<div class="job-application-card-company-tag">H</div>
- <div class="job-application-card-company-address">瀹佹尝闆疯开妫厭搴�</div>
+ <div class="job-application-card-company-address">{{ addressName }}</div>
</div>
- <div class="job-application-card-people">{{ `鎶ュ悕浜烘暟锛�${5}` }}</div>
+ <div class="job-application-card-people" v-if="mode === 'normal'">
+ {{ `鎶ュ悕浜烘暟锛�${userCount}` }}
+ </div>
</div>
<div class="job-application-card-line">
- <div class="job-application-card-publish-time">{{ `鍙戝竷鏃ユ湡锛�${'2022骞�12鏈�25鏃�'}` }}</div>
- <div class="job-application-card-fee">
- <TaskPrice :value="212" />
+ <div class="job-application-card-publish-time">
+ {{ `鍙戝竷鏃ユ湡锛�${dayjs(createdTime).format('YYYY-MM-DD')}` }}
</div>
+ <slot name="footer-actions">
+ <div class="job-application-card-fee">
+ <TaskPrice :value="toThousand(serviceFee)" :unit="unit" />
+ </div>
+ </slot>
</div>
</div>
</template>
@@ -33,6 +46,9 @@
import { ActionSheet } from '@nutui/nutui-taro';
import { Portal } from 'senin-mini/components';
import { TaskPrice } from '@12333/components';
+import { EnumTaskStatus, EnumTaskReleaseStatus, EnumTaskReleaseStatusText } from '@12333/constants';
+import dayjs from 'dayjs';
+import { toThousand } from '@12333/utils';
defineOptions({
name: 'JobApplicationCard',
@@ -47,40 +63,25 @@
Delete,
}
-enum ResourceStatus {
- /**
- * 宸查┏鍥�
- */
- Reject = -10,
- /**
- * 鏈彁浜�
- */
- Draft = 10,
- /**
- * 寰呭鏍�
- */
- WaitAudit = 20,
- /**
- * 杩涜涓�
- */
- Running = 30,
- /**
- * 宸蹭笅鏋�
- */
- OffShelf = 40,
- /**
- * 绯荤粺涓嬫灦
- */
- SystemOffShelf = 50,
-}
-
type Props = CommonTaskCardProps & {
showActions?: boolean;
- status?: ResourceStatus;
+ status?: EnumTaskStatus;
+ mode?: 'taskManage' | 'normal';
+
+ name?: string;
+ beginTime?: string;
+ endTime?: string;
+ addressName?: string;
+ createdTime?: string;
+ serviceFee?: number;
+ userCount?: number;
+ unit?: string;
+ releaseStatus?: EnumTaskReleaseStatus;
};
const props = withDefaults(defineProps<Props>(), {
showActions: true,
+ mode: 'normal',
});
const emit = defineEmits<{
@@ -94,40 +95,44 @@
const menuList = computed(() => {
let _menuList = [];
- if (props.status !== ResourceStatus.WaitAudit) {
+ _menuList.push(
+ // {
+ // name: '缂栬緫',
+ // value: ManageActions.Edit,
+ // },
+ {
+ name: '鏌ョ湅璇︽儏',
+ value: ManageActions.Detail,
+ }
+ );
+ if (props.status === EnumTaskStatus.Wait) {
_menuList.push({
name: '缂栬緫',
value: ManageActions.Edit,
});
}
- _menuList.push({
- name: '鏌ョ湅璇︽儏',
- value: ManageActions.Detail,
- });
- if (props.status === ResourceStatus.OffShelf) {
+ if (props.releaseStatus === EnumTaskReleaseStatus.Stopped) {
_menuList.push({
name: '鍙戝竷',
value: ManageActions.Publish,
});
}
- if (props.status === ResourceStatus.Running) {
+ if (props.releaseStatus === EnumTaskReleaseStatus.InProcess) {
_menuList.push({
name: '鍋滄鍙戝竷',
value: ManageActions.Stop,
});
}
- if (props.status !== ResourceStatus.WaitAudit) {
- _menuList.push(
- {
- name: '澶嶅埗',
- value: ManageActions.Copy,
- },
- {
- name: '鍒犻櫎',
- value: ManageActions.Delete,
- }
- );
- }
+ _menuList.push(
+ {
+ name: '澶嶅埗',
+ value: ManageActions.Copy,
+ },
+ {
+ name: '鍒犻櫎',
+ value: ManageActions.Delete,
+ }
+ );
return _menuList;
});
@@ -265,6 +270,12 @@
.job-application-card-publish-time {
color: boleGetCssVar('text-color', 'regular');
}
+
+ .nut-button {
+ min-width: 144rpx;
+ height: 52rpx;
+ font-size: 24rpx;
+ }
}
}
</style>
--
Gitblit v1.9.1