master
2358328281@qq.com 2 months ago
parent 7f2103a36b
commit 5d2c6f77ba

@ -146,7 +146,6 @@ $primaryLightBlue: #3289fb;
border-radius: 8px !important;
cursor: pointer;
&.disabled-done {
opacity: 0.3;
pointer-events: none;
@ -154,7 +153,7 @@ $primaryLightBlue: #3289fb;
}
&.smaller {
padding: 6px 15px !important;
padding: 5px 11px !important;
}
&.rosein-sign {

@ -59,7 +59,7 @@
</div>
</header>
<main class="admin-content">
<main class="admin-content">
<slot />
</main>
@ -92,12 +92,10 @@
<PasswordDialog v-model="passwordDialogVisible" :role="passwordRole" />
<!-- 全局签到弹窗医院端登录后自动触发未签到时弹出 -->
<SignInDialog v-model="signInDialogStore.visible"
:signed-in="signInDialogStore.summary.isSignIn"
<SignInDialog v-model="signInDialogStore.visible" :signed-in="signInDialogStore.summary.isSignIn"
:total-points="signInDialogStore.summary.totalPoints"
:consecutive-sign-in-days="signInDialogStore.summary.consecutiveSignInDays"
:sign-in-rank="signInDialogStore.summary.signInRank"
:beat-percent="signInDialogStore.summary.beatPercent"
:sign-in-rank="signInDialogStore.summary.signInRank" :beat-percent="signInDialogStore.summary.beatPercent"
@success="onSignInDialogSuccess" />
<!-- 全局奖励结果弹窗抽奖/签到/提交工单 共用 -->
@ -519,7 +517,7 @@ const handleCommand = async (cmd) => {
}
}
.admin-content {
.admin-content {
flex: 1;
overflow-x: hidden;
overflow-y: auto;

@ -242,6 +242,7 @@ const onClosed = () => {
height: 766px;
background: transparent;
box-shadow: none;
transform: scale(0.75);
.el-dialog__header {

@ -399,7 +399,6 @@ const showRule = () => {
ElMessage.info("📖 签到 +1 · 抽奖 +1~10 · 提交工单 +1");
};
// : todo false
const signInVisible = ref(false);
const handleSignIn = async () => {
if (summary.value.isSignIn) {
@ -430,7 +429,7 @@ const onSignInSuccess = async () => {
const lotteryVisible = ref(false);
const handleDraw = () => {
if (summary.value.isDraw) {
ElMessage.info("今日已抽奖,明天再来吧!");
ElMessage.warning("今日已抽奖,明天再来吧!");
return;
}
lotteryVisible.value = true;

@ -373,24 +373,6 @@ const onResize = () => setTimeout(computeStripeTargets, 50);
window.addEventListener("resize", onResize);
onBeforeUnmount(() => window.removeEventListener("resize", onResize));
// TODO: mock
const buildMockTrendData = (startDate, endDate) => {
const start = startDate ? dayjs(startDate) : dayjs().startOf("month");
const end = endDate ? dayjs(endDate) : dayjs().endOf("month");
const days = [];
let cursor = start;
while (cursor.isBefore(end) || cursor.isSame(end, "day")) {
days.push(cursor.format("YYYY-MM-DD"));
cursor = cursor.add(1, "day");
}
if (!days.length) days.push(dayjs().format("YYYY-MM-DD"));
return days.map((date, i) => ({
date,
submitCount: 3 + ((i * 7) % 9),
completeCount: 2 + ((i * 5) % 7),
}));
};
const loadStats = async () => {
// isCustom score.vue
const params = {};
@ -402,18 +384,11 @@ const loadStats = async () => {
}
try {
const data = await getWorkbench(params);
// TODO: mock data
if (data && Array.isArray(data.trendData) && data.trendData.length) {
stats.value = data;
const { startDate, endDate } = resolveDateRange();
stats.value = { ...stats.value, trendData: buildMockTrendData(startDate, endDate) };
} else {
const { startDate, endDate } = resolveDateRange();
stats.value = { ...stats.value, trendData: buildMockTrendData(startDate, endDate) };
}
} catch (_) {
const { startDate, endDate } = resolveDateRange();
stats.value = { ...stats.value, trendData: buildMockTrendData(startDate, endDate) };
}
};

Loading…
Cancel
Save