Fix notification deletion bug: save {} instead of [] when list is empty
When all notifications are deleted, the persistentNotifications array
becomes empty ([]). The backend doesn't accept an empty array as a
valid value, requiring an empty object ({}) instead. This fix modifies
both index.vue and UrgentTestDialog.vue to save {} when the
notification list is empty.
Co-authored-by: Sunwuyuan <88357633+Sunwuyuan@users.noreply.github.com>
This commit is contained in:
co-authored by
Sunwuyuan
parent
65b08653c8
commit
056225b6b3
+1
-1
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<error404/>
|
||||
<error404 />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
@@ -3,39 +3,82 @@
|
||||
<v-row>
|
||||
<v-col cols="12">
|
||||
<div class="d-flex align-center mb-6">
|
||||
<v-icon class="mr-3" color="primary" size="x-large">mdi-database-cog-outline</v-icon>
|
||||
<v-icon
|
||||
class="mr-3"
|
||||
color="primary"
|
||||
size="x-large"
|
||||
>
|
||||
mdi-database-cog-outline
|
||||
</v-icon>
|
||||
<div>
|
||||
<h1 class="text-h4 ">缓存管理</h1>
|
||||
<div class="text-subtitle-1 text-grey">管理应用的本地缓存资源</div>
|
||||
<h1 class="text-h4 ">
|
||||
缓存管理
|
||||
</h1>
|
||||
<div class="text-subtitle-1 text-grey">
|
||||
管理应用的本地缓存资源
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<v-card class="mb-6" color="info" density="compact" variant="tonal">
|
||||
<v-card
|
||||
class="mb-6"
|
||||
color="info"
|
||||
density="compact"
|
||||
variant="tonal"
|
||||
>
|
||||
<v-card-text class="d-flex align-center">
|
||||
<v-icon class="mr-2" color="info">mdi-information-outline</v-icon>
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
color="info"
|
||||
>
|
||||
mdi-information-outline
|
||||
</v-icon>
|
||||
<span>在这里您可以查看和管理应用的缓存文件。清除缓存可能会导致应用需要重新下载资源,但有助于解决某些显示问题。</span>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
<v-row>
|
||||
<v-col cols="12" md="8">
|
||||
<v-card class="mb-4" variant="tonal">
|
||||
<v-col
|
||||
cols="12"
|
||||
md="8"
|
||||
>
|
||||
<v-card
|
||||
class="mb-4"
|
||||
variant="tonal"
|
||||
>
|
||||
<v-card-text>
|
||||
<div class="d-flex align-center mb-2">
|
||||
<v-icon class="mr-2" color="primary">mdi-information</v-icon>
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
color="primary"
|
||||
>
|
||||
mdi-information
|
||||
</v-icon>
|
||||
<span class="text-h6">什么是缓存?</span>
|
||||
</div>
|
||||
<p>
|
||||
缓存是浏览器在本地存储的网站资源副本,如图片、脚本和样式表等。这些缓存可以加快页面加载速度,减少数据使用,并在离线时提供基本功能。</p>
|
||||
缓存是浏览器在本地存储的网站资源副本,如图片、脚本和样式表等。这些缓存可以加快页面加载速度,减少数据使用,并在离线时提供基本功能。
|
||||
</p>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" md="4">
|
||||
<v-card class="mb-4" variant="tonal">
|
||||
<v-col
|
||||
cols="12"
|
||||
md="4"
|
||||
>
|
||||
<v-card
|
||||
class="mb-4"
|
||||
variant="tonal"
|
||||
>
|
||||
<v-card-text>
|
||||
<div class="d-flex align-center mb-2">
|
||||
<v-icon class="mr-2" color="warning">mdi-lightbulb-outline</v-icon>
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
color="warning"
|
||||
>
|
||||
mdi-lightbulb-outline
|
||||
</v-icon>
|
||||
<span class="text-h6">何时清除缓存?</span>
|
||||
</div>
|
||||
<ul class="pl-4">
|
||||
@@ -48,7 +91,7 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<CacheManager/>
|
||||
<CacheManager />
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
<MigrationTool ref="migrationTool"/>
|
||||
<MigrationTool ref="migrationTool" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
</v-alert>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer/>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
color="grey-darken-1"
|
||||
variant="text"
|
||||
|
||||
+21
-6
@@ -1,7 +1,17 @@
|
||||
<template>
|
||||
<v-container class="fill-height" fluid>
|
||||
<v-row align="center" justify="center">
|
||||
<v-col cols="12" md="6" sm="8">
|
||||
<v-container
|
||||
class="fill-height"
|
||||
fluid
|
||||
>
|
||||
<v-row
|
||||
align="center"
|
||||
justify="center"
|
||||
>
|
||||
<v-col
|
||||
cols="12"
|
||||
md="6"
|
||||
sm="8"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title class="text-h5">
|
||||
{{ status === 'processing' ? '正在处理授权...' : status === 'success' ? '授权成功' : '授权失败' }}
|
||||
@@ -12,12 +22,17 @@
|
||||
class="mb-4"
|
||||
color="primary"
|
||||
indeterminate
|
||||
></v-progress-linear>
|
||||
/>
|
||||
<p>{{ message }}</p>
|
||||
</v-card-text>
|
||||
<v-card-actions v-if="status !== 'processing'">
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" @click="goToHome">返回首页</v-btn>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="goToHome"
|
||||
>
|
||||
返回首页
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-col>
|
||||
|
||||
+374
-141
@@ -2,9 +2,17 @@
|
||||
<v-container class="fill-height">
|
||||
<v-row>
|
||||
<v-col cols="12">
|
||||
<v-card class="elevation-12" border>
|
||||
<v-card
|
||||
class="elevation-12"
|
||||
border
|
||||
>
|
||||
<v-card-title class="d-flex align-center primary lighten-1 white--text py-3 px-4">
|
||||
<v-icon color="white" class="mr-2">mdi-swap-horizontal</v-icon>
|
||||
<v-icon
|
||||
color="white"
|
||||
class="mr-2"
|
||||
>
|
||||
mdi-swap-horizontal
|
||||
</v-icon>
|
||||
课程表转换工具
|
||||
</v-card-title>
|
||||
<v-card-subtitle>
|
||||
@@ -22,7 +30,9 @@
|
||||
@click:close="error = ''"
|
||||
>
|
||||
<div class="d-flex align-center">
|
||||
<v-icon class="mr-2">mdi-alert-circle</v-icon>
|
||||
<v-icon class="mr-2">
|
||||
mdi-alert-circle
|
||||
</v-icon>
|
||||
{{ error }}
|
||||
</div>
|
||||
</v-alert>
|
||||
@@ -38,38 +48,75 @@
|
||||
@click:close="success = ''"
|
||||
>
|
||||
<div class="d-flex align-center">
|
||||
<v-icon class="mr-2">mdi-check-circle</v-icon>
|
||||
<v-icon class="mr-2">
|
||||
mdi-check-circle
|
||||
</v-icon>
|
||||
{{ success }}
|
||||
</div>
|
||||
</v-alert>
|
||||
|
||||
<!-- 输入方式选择 -->
|
||||
<v-tabs v-model="activeTab" class="mb-4 mx-2" color="primary" rounded>
|
||||
<v-tab value="text" class="px-5">
|
||||
<v-icon start>mdi-text-box</v-icon>
|
||||
<v-tabs
|
||||
v-model="activeTab"
|
||||
class="mb-4 mx-2"
|
||||
color="primary"
|
||||
rounded
|
||||
>
|
||||
<v-tab
|
||||
value="text"
|
||||
class="px-5"
|
||||
>
|
||||
<v-icon start>
|
||||
mdi-text-box
|
||||
</v-icon>
|
||||
文本粘贴
|
||||
</v-tab>
|
||||
<v-tab value="file" class="px-5">
|
||||
<v-icon start>mdi-file-upload</v-icon>
|
||||
<v-tab
|
||||
value="file"
|
||||
class="px-5"
|
||||
>
|
||||
<v-icon start>
|
||||
mdi-file-upload
|
||||
</v-icon>
|
||||
文件上传
|
||||
</v-tab>
|
||||
</v-tabs>
|
||||
|
||||
<!-- 格式选择 -->
|
||||
<v-btn-toggle v-model="formatMode" color="primary" class="mb-4 mx-2" mandatory density="comfortable" border
|
||||
rounded>
|
||||
<v-btn value="auto">自动检测</v-btn>
|
||||
<v-btn value="json">JSON</v-btn>
|
||||
<v-btn value="yaml" :disabled="!yamlLibLoaded">
|
||||
<v-btn-toggle
|
||||
v-model="formatMode"
|
||||
color="primary"
|
||||
class="mb-4 mx-2"
|
||||
mandatory
|
||||
density="comfortable"
|
||||
border
|
||||
rounded
|
||||
>
|
||||
<v-btn value="auto">
|
||||
自动检测
|
||||
</v-btn>
|
||||
<v-btn value="json">
|
||||
JSON
|
||||
</v-btn>
|
||||
<v-btn
|
||||
value="yaml"
|
||||
:disabled="!yamlLibLoaded"
|
||||
>
|
||||
YAML
|
||||
<v-tooltip activator="parent" location="bottom">
|
||||
<v-tooltip
|
||||
activator="parent"
|
||||
location="bottom"
|
||||
>
|
||||
{{ yamlLibLoaded ? 'YAML解析库已加载' : '正在加载YAML解析库...' }}
|
||||
</v-tooltip>
|
||||
</v-btn>
|
||||
</v-btn-toggle>
|
||||
|
||||
<!-- 添加当前检测到的格式提示 -->
|
||||
<div v-if="jsonText && formatMode === 'auto'" class="text-caption mb-2">
|
||||
<div
|
||||
v-if="jsonText && formatMode === 'auto'"
|
||||
class="text-caption mb-2"
|
||||
>
|
||||
检测到的格式: {{ isYaml(jsonText) ? 'YAML' : 'JSON' }}
|
||||
</div>
|
||||
|
||||
@@ -85,7 +132,7 @@
|
||||
rows="6"
|
||||
placeholder="请在此粘贴CSES格式的数据..."
|
||||
@input="handleTextChange"
|
||||
></v-textarea>
|
||||
/>
|
||||
</div>
|
||||
</v-window-item>
|
||||
<v-window-item value="file">
|
||||
@@ -96,13 +143,13 @@
|
||||
prepend-icon="mdi-file-upload"
|
||||
:loading="loading"
|
||||
:disabled="loading"
|
||||
@change="handleFileChange"
|
||||
hint="支持JSON、YAML格式文件"
|
||||
persistent-hint
|
||||
:rules="[
|
||||
v => !v || v.size < 2000000 || '文件大小不能超过 2 MB',
|
||||
]"
|
||||
></v-file-input>
|
||||
@change="handleFileChange"
|
||||
/>
|
||||
|
||||
<v-alert
|
||||
v-if="file && formatMode === 'auto'"
|
||||
@@ -118,17 +165,33 @@
|
||||
|
||||
<!-- 设置面板 -->
|
||||
<v-col cols="12">
|
||||
<v-card flat class="pa-4 rounded-lg" border>
|
||||
<v-card
|
||||
flat
|
||||
class="pa-4 rounded-lg"
|
||||
border
|
||||
>
|
||||
<div class="d-flex align-center mb-3">
|
||||
<v-icon color="primary" class="mr-2">mdi-calendar-multiselect</v-icon>
|
||||
<h3 class="text-subtitle-1 font-weight-medium mr-auto">选择导出天数</h3>
|
||||
<v-icon
|
||||
color="primary"
|
||||
class="mr-2"
|
||||
>
|
||||
mdi-calendar-multiselect
|
||||
</v-icon>
|
||||
<h3 class="text-subtitle-1 font-weight-medium mr-auto">
|
||||
选择导出天数
|
||||
</h3>
|
||||
<v-btn
|
||||
variant="text"
|
||||
color="primary"
|
||||
class="ml-2"
|
||||
@click="selectAllDays"
|
||||
>
|
||||
<v-icon start size="small">mdi-checkbox-multiple-marked</v-icon>
|
||||
<v-icon
|
||||
start
|
||||
size="small"
|
||||
>
|
||||
mdi-checkbox-multiple-marked
|
||||
</v-icon>
|
||||
全选
|
||||
</v-btn>
|
||||
<v-btn
|
||||
@@ -137,19 +200,37 @@
|
||||
class="ml-2"
|
||||
@click="clearSelectedDays"
|
||||
>
|
||||
<v-icon start size="small">mdi-checkbox-multiple-blank-outline</v-icon>
|
||||
<v-icon
|
||||
start
|
||||
size="small"
|
||||
>
|
||||
mdi-checkbox-multiple-blank-outline
|
||||
</v-icon>
|
||||
清除
|
||||
</v-btn>
|
||||
</div>
|
||||
<v-chip-group v-model="selectedDays" multiple class="mb-2" color="primary">
|
||||
<v-chip v-for="day in 7" :key="day" :value="day" filter variant="tonal" class="filter-chip" label>
|
||||
<v-chip-group
|
||||
v-model="selectedDays"
|
||||
multiple
|
||||
class="mb-2"
|
||||
color="primary"
|
||||
>
|
||||
<v-chip
|
||||
v-for="day in 7"
|
||||
:key="day"
|
||||
:value="day"
|
||||
filter
|
||||
variant="tonal"
|
||||
class="filter-chip"
|
||||
label
|
||||
>
|
||||
{{ dayNames[day] }}
|
||||
<v-badge
|
||||
v-if="getDaySchedule(day).length > 0"
|
||||
:content="getDaySchedule(day).length"
|
||||
color="primary"
|
||||
inline
|
||||
></v-badge>
|
||||
/>
|
||||
</v-chip>
|
||||
</v-chip-group>
|
||||
</v-card>
|
||||
@@ -157,31 +238,51 @@
|
||||
|
||||
<!-- 改进设置选项卡,显示为开关组 -->
|
||||
<v-col cols="12">
|
||||
<v-card flat class="pa-4 rounded-lg" border>
|
||||
<v-card
|
||||
flat
|
||||
class="pa-4 rounded-lg"
|
||||
border
|
||||
>
|
||||
<div class="d-flex align-center mb-3">
|
||||
<v-icon color="primary" class="mr-2">mdi-cog</v-icon>
|
||||
<h3 class="text-subtitle-1 font-weight-medium">显示配置</h3>
|
||||
<v-icon
|
||||
color="primary"
|
||||
class="mr-2"
|
||||
>
|
||||
mdi-cog
|
||||
</v-icon>
|
||||
<h3 class="text-subtitle-1 font-weight-medium">
|
||||
显示配置
|
||||
</h3>
|
||||
</div>
|
||||
<v-row>
|
||||
<v-col cols="12" sm="6">
|
||||
<v-col
|
||||
cols="12"
|
||||
sm="6"
|
||||
>
|
||||
<v-switch
|
||||
v-model="settings.hideTeacherName"
|
||||
label="不显示教师姓名"
|
||||
color="primary"
|
||||
inset
|
||||
hide-details
|
||||
></v-switch>
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="6">
|
||||
<v-col
|
||||
cols="12"
|
||||
sm="6"
|
||||
>
|
||||
<v-switch
|
||||
v-model="settings.hideRoom"
|
||||
label="不显示教室信息"
|
||||
color="primary"
|
||||
inset
|
||||
hide-details
|
||||
></v-switch>
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="6">
|
||||
<v-col
|
||||
cols="12"
|
||||
sm="6"
|
||||
>
|
||||
<v-text-field
|
||||
v-model.number="settings.totalWeeks"
|
||||
label="总周数"
|
||||
@@ -193,19 +294,23 @@
|
||||
variant="outlined"
|
||||
prepend-inner-icon="mdi-calendar-week"
|
||||
class="mt-3"
|
||||
></v-text-field>
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card>
|
||||
</v-col>
|
||||
|
||||
<!-- 添加加载状态的骨架屏 -->
|
||||
<v-card v-if="loading" class="my-4" outlined>
|
||||
<v-card
|
||||
v-if="loading"
|
||||
class="my-4"
|
||||
outlined
|
||||
>
|
||||
<v-card-text>
|
||||
<v-skeleton-loader
|
||||
type="table"
|
||||
class="mx-auto"
|
||||
></v-skeleton-loader>
|
||||
/>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
@@ -230,12 +335,31 @@
|
||||
</v-alert>
|
||||
|
||||
<!-- 课程表预览 -->
|
||||
<v-card v-if="processedData" class="my-4" elevation="1">
|
||||
<v-card
|
||||
v-if="processedData"
|
||||
class="my-4"
|
||||
elevation="1"
|
||||
>
|
||||
<v-card-title class="d-flex align-center pa-4 bg-primary-lighten-5">
|
||||
<v-icon color="primary" class="mr-2">mdi-table</v-icon>
|
||||
<v-icon
|
||||
color="primary"
|
||||
class="mr-2"
|
||||
>
|
||||
mdi-table
|
||||
</v-icon>
|
||||
<span class="font-weight-bold">课程表</span>
|
||||
<v-chip color="primary" class="ml-3" size="small" pill>
|
||||
<v-icon start size="x-small">mdi-book-open-variant</v-icon>
|
||||
<v-chip
|
||||
color="primary"
|
||||
class="ml-3"
|
||||
size="small"
|
||||
pill
|
||||
>
|
||||
<v-icon
|
||||
start
|
||||
size="x-small"
|
||||
>
|
||||
mdi-book-open-variant
|
||||
</v-icon>
|
||||
{{ processedData.tableData.length }} 节课程
|
||||
</v-chip>
|
||||
</v-card-title>
|
||||
@@ -263,8 +387,15 @@
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template v-for="day in 7" #[`item.${day}`]="{ item }" :key="day">
|
||||
<div v-if="item[day]" class="course-cell">
|
||||
<template
|
||||
v-for="day in 7"
|
||||
#[`item.${day}`]="{ item }"
|
||||
:key="day"
|
||||
>
|
||||
<div
|
||||
v-if="item[day]"
|
||||
class="course-cell"
|
||||
>
|
||||
<template v-if="Array.isArray(item[day])">
|
||||
<div
|
||||
v-for="(course, index) in item[day]"
|
||||
@@ -275,12 +406,12 @@
|
||||
<span
|
||||
v-if="!settings.hideTeacherName && course.teacher"
|
||||
>
|
||||
<br/>{{ course.teacher }}
|
||||
<br>{{ course.teacher }}
|
||||
</span>
|
||||
<span
|
||||
v-if="!settings.hideRoom && course.room"
|
||||
>
|
||||
<br/>{{ course.room }}
|
||||
<br>{{ course.room }}
|
||||
</span>
|
||||
<span
|
||||
v-if="course.weekType"
|
||||
@@ -295,12 +426,12 @@
|
||||
<span
|
||||
v-if="!settings.hideTeacherName && item[day].teacher"
|
||||
>
|
||||
<br/>{{ item[day].teacher }}
|
||||
<br>{{ item[day].teacher }}
|
||||
</span>
|
||||
<span
|
||||
v-if="!settings.hideRoom && item[day].room"
|
||||
>
|
||||
<br/>{{ item[day].room }}
|
||||
<br>{{ item[day].room }}
|
||||
</span>
|
||||
<span
|
||||
v-if="item[day].weekType"
|
||||
@@ -316,18 +447,48 @@
|
||||
</v-card>
|
||||
|
||||
<!-- 时间表 -->
|
||||
<v-card v-if="hasExportData" class="my-4" elevation="1">
|
||||
<v-card
|
||||
v-if="hasExportData"
|
||||
class="my-4"
|
||||
elevation="1"
|
||||
>
|
||||
<v-card-title class="d-flex align-center pa-4 bg-primary-lighten-5">
|
||||
<v-icon color="primary" class="mr-2">mdi-timetable</v-icon>
|
||||
<v-icon
|
||||
color="primary"
|
||||
class="mr-2"
|
||||
>
|
||||
mdi-timetable
|
||||
</v-icon>
|
||||
<span class="font-weight-bold">每日课程时间表</span>
|
||||
<v-chip class="ml-3" size="small" color="primary" pill>
|
||||
<v-icon start size="x-small">mdi-clock-outline</v-icon>
|
||||
<v-chip
|
||||
class="ml-3"
|
||||
size="small"
|
||||
color="primary"
|
||||
pill
|
||||
>
|
||||
<v-icon
|
||||
start
|
||||
size="x-small"
|
||||
>
|
||||
mdi-clock-outline
|
||||
</v-icon>
|
||||
{{ totalClassHours }} 课时
|
||||
</v-chip>
|
||||
<v-tooltip v-if="exportPeriods.length > 0">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-chip class="ml-2" size="small" color="info" v-bind="props" pill>
|
||||
<v-icon start size="x-small">mdi-information-outline</v-icon>
|
||||
<template #activator="{ props }">
|
||||
<v-chip
|
||||
class="ml-2"
|
||||
size="small"
|
||||
color="info"
|
||||
v-bind="props"
|
||||
pill
|
||||
>
|
||||
<v-icon
|
||||
start
|
||||
size="x-small"
|
||||
>
|
||||
mdi-information-outline
|
||||
</v-icon>
|
||||
节次已重排
|
||||
</v-chip>
|
||||
</template>
|
||||
@@ -336,93 +497,165 @@
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<!-- 美化日期导航标签 -->
|
||||
<v-tabs v-if="daysWithSchedule.length > 0" v-model="activeDay" class="mb-4" color="primary" grow
|
||||
align-tabs="center">
|
||||
<v-tab v-for="day in daysWithSchedule" :key="day" :value="day" class="px-2 font-weight-medium">
|
||||
<v-tabs
|
||||
v-if="daysWithSchedule.length > 0"
|
||||
v-model="activeDay"
|
||||
class="mb-4"
|
||||
color="primary"
|
||||
grow
|
||||
align-tabs="center"
|
||||
>
|
||||
<v-tab
|
||||
v-for="day in daysWithSchedule"
|
||||
:key="day"
|
||||
:value="day"
|
||||
class="px-2 font-weight-medium"
|
||||
>
|
||||
{{ dayNames[day] }}
|
||||
<v-badge
|
||||
:content="getDaySchedule(day).length"
|
||||
color="primary"
|
||||
inline
|
||||
></v-badge>
|
||||
/>
|
||||
</v-tab>
|
||||
</v-tabs>
|
||||
|
||||
<!-- 当前选中日期的课程表 -->
|
||||
<v-window v-model="activeDay">
|
||||
<v-window-item v-for="day in daysWithSchedule" :key="day" :value="day">
|
||||
<v-table density="compact" class="rounded" :headers-length="6" disable-sort>
|
||||
<v-window-item
|
||||
v-for="day in daysWithSchedule"
|
||||
:key="day"
|
||||
:value="day"
|
||||
>
|
||||
<v-table
|
||||
density="compact"
|
||||
class="rounded"
|
||||
:headers-length="6"
|
||||
disable-sort
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">节次</th>
|
||||
<th>课程</th>
|
||||
<th>时间</th>
|
||||
<th>教师</th>
|
||||
<th>教室</th>
|
||||
<th>周次</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-center">
|
||||
节次
|
||||
</th>
|
||||
<th>课程</th>
|
||||
<th>时间</th>
|
||||
<th>教师</th>
|
||||
<th>教室</th>
|
||||
<th>周次</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-for="(group, index) in groupByPeriod(getDaySchedule(day))" :key="index">
|
||||
<tr>
|
||||
<td class="text-center font-weight-bold">
|
||||
{{ group.period }}
|
||||
<v-tooltip v-if="group.originalPeriod !== group.period">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-icon size="x-small" v-bind="props" color="info" class="ml-1">mdi-sync</v-icon>
|
||||
<template
|
||||
v-for="(group, index) in groupByPeriod(getDaySchedule(day))"
|
||||
:key="index"
|
||||
>
|
||||
<tr>
|
||||
<td class="text-center font-weight-bold">
|
||||
{{ group.period }}
|
||||
<v-tooltip v-if="group.originalPeriod !== group.period">
|
||||
<template #activator="{ props }">
|
||||
<v-icon
|
||||
size="x-small"
|
||||
v-bind="props"
|
||||
color="info"
|
||||
class="ml-1"
|
||||
>
|
||||
mdi-sync
|
||||
</v-icon>
|
||||
</template>
|
||||
原节次: {{ group.originalPeriod }}
|
||||
</v-tooltip>
|
||||
</td>
|
||||
<td>
|
||||
<div
|
||||
v-for="(item, i) in group.items"
|
||||
:key="i"
|
||||
class="mb-1"
|
||||
>
|
||||
<v-chip
|
||||
size="small"
|
||||
:color="getSubjectColor(item.subject)"
|
||||
label
|
||||
text-color="white"
|
||||
class="mr-1"
|
||||
>
|
||||
{{ item.subject }}
|
||||
</v-chip>
|
||||
<v-chip
|
||||
v-if="group.items.length > 1"
|
||||
size="x-small"
|
||||
class="ml-1"
|
||||
:color="item.weekType === '单' ? 'warning' : 'success'"
|
||||
>
|
||||
{{ item.weekType }}周
|
||||
</v-chip>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div
|
||||
v-for="(timeSlot, i) in group.uniqueTimeSlots"
|
||||
:key="i"
|
||||
class="mb-1"
|
||||
>
|
||||
<v-chip
|
||||
size="x-small"
|
||||
class="time-chip"
|
||||
>
|
||||
{{ formatTime(timeSlot.startTime) }} - {{ formatTime(timeSlot.endTime) }}
|
||||
</v-chip>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<template v-if="!settings.hideTeacherName">
|
||||
<div
|
||||
v-for="(item, i) in group.items"
|
||||
:key="i"
|
||||
class="mb-1"
|
||||
>
|
||||
{{ item.teacher || '-' }}
|
||||
</div>
|
||||
</template>
|
||||
原节次: {{ group.originalPeriod }}
|
||||
</v-tooltip>
|
||||
</td>
|
||||
<td>
|
||||
<div v-for="(item, i) in group.items" :key="i" class="mb-1">
|
||||
<v-chip size="small" :color="getSubjectColor(item.subject)" label text-color="white"
|
||||
class="mr-1">
|
||||
{{ item.subject }}
|
||||
</v-chip>
|
||||
<v-chip v-if="group.items.length > 1" size="x-small" class="ml-1"
|
||||
:color="item.weekType === '单' ? 'warning' : 'success'">
|
||||
{{ item.weekType }}周
|
||||
</v-chip>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div v-for="(timeSlot, i) in group.uniqueTimeSlots" :key="i" class="mb-1">
|
||||
<v-chip size="x-small" class="time-chip">
|
||||
{{ formatTime(timeSlot.startTime) }} - {{ formatTime(timeSlot.endTime) }}
|
||||
</v-chip>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<template v-if="!settings.hideTeacherName">
|
||||
<div v-for="(item, i) in group.items" :key="i" class="mb-1">
|
||||
{{ item.teacher || '-' }}
|
||||
<template v-else>
|
||||
-
|
||||
</template>
|
||||
</td>
|
||||
<td>
|
||||
<template v-if="!settings.hideRoom">
|
||||
<div
|
||||
v-for="(item, i) in group.items"
|
||||
:key="i"
|
||||
class="mb-1"
|
||||
>
|
||||
{{ item.room || '-' }}
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
-
|
||||
</template>
|
||||
</td>
|
||||
<td>
|
||||
<div
|
||||
v-for="(item, i) in group.items"
|
||||
:key="i"
|
||||
class="mb-1"
|
||||
>
|
||||
{{ item.weeks }}
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>-</template>
|
||||
</td>
|
||||
<td>
|
||||
<template v-if="!settings.hideRoom">
|
||||
<div v-for="(item, i) in group.items" :key="i" class="mb-1">
|
||||
{{ item.room || '-' }}
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>-</template>
|
||||
</td>
|
||||
<td>
|
||||
<div v-for="(item, i) in group.items" :key="i" class="mb-1">
|
||||
{{ item.weeks }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</tbody>
|
||||
</v-table>
|
||||
</v-window-item>
|
||||
</v-window>
|
||||
|
||||
<!-- 无数据提示 -->
|
||||
<v-alert v-if="hasExportData && daysWithSchedule.length === 0" type="info" class="mt-3">
|
||||
<v-alert
|
||||
v-if="hasExportData && daysWithSchedule.length === 0"
|
||||
type="info"
|
||||
class="mt-3"
|
||||
>
|
||||
没有找到任何课程数据
|
||||
</v-alert>
|
||||
</v-card-text>
|
||||
@@ -430,24 +663,24 @@
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions class="">
|
||||
<v-spacer></v-spacer>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
color="primary"
|
||||
variant="outlined"
|
||||
:loading="loading"
|
||||
:disabled="(!jsonText && !file) || loading"
|
||||
@click="processInput"
|
||||
prepend-icon="mdi-cog-refresh"
|
||||
@click="processInput"
|
||||
>
|
||||
处理数据
|
||||
</v-btn>
|
||||
<v-btn
|
||||
color="info"
|
||||
:disabled="!hasExportData"
|
||||
@click="showExportPreview"
|
||||
class="ml-2"
|
||||
prepend-icon="mdi-eye"
|
||||
border
|
||||
@click="showExportPreview"
|
||||
>
|
||||
刷新
|
||||
</v-btn>
|
||||
@@ -455,10 +688,10 @@
|
||||
color="success"
|
||||
variant="outlined"
|
||||
:disabled="!hasExportData"
|
||||
@click="downloadCSV"
|
||||
class="ml-2"
|
||||
prepend-icon="mdi-download"
|
||||
border
|
||||
@click="downloadCSV"
|
||||
>
|
||||
下载CSV
|
||||
</v-btn>
|
||||
@@ -735,6 +968,22 @@ export default {
|
||||
return days;
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
// 加载YAML解析库
|
||||
try {
|
||||
await loadJsYaml();
|
||||
this.yamlLibLoaded = true;
|
||||
} catch (error) {
|
||||
this.error = error.message;
|
||||
}
|
||||
|
||||
// 监听daysWithSchedule变化,设置默认选中的日期
|
||||
this.$watch('daysWithSchedule', (newVal) => {
|
||||
if (newVal.length > 0 && !this.activeDay) {
|
||||
this.activeDay = newVal[0];
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
async handleFileChange() {
|
||||
this.resetData();
|
||||
@@ -1241,22 +1490,6 @@ export default {
|
||||
clearSelectedDays() {
|
||||
this.selectedDays = [];
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
// 加载YAML解析库
|
||||
try {
|
||||
await loadJsYaml();
|
||||
this.yamlLibLoaded = true;
|
||||
} catch (error) {
|
||||
this.error = error.message;
|
||||
}
|
||||
|
||||
// 监听daysWithSchedule变化,设置默认选中的日期
|
||||
this.$watch('daysWithSchedule', (newVal) => {
|
||||
if (newVal.length > 0 && !this.activeDay) {
|
||||
this.activeDay = newVal[0];
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
label="server.authDomain"
|
||||
/>
|
||||
</v-form>
|
||||
<v-divider class="my-4"/>
|
||||
<v-divider class="my-4" />
|
||||
|
||||
<v-btn
|
||||
class="me-2"
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<v-list-item-subtitle>{{ currentDataKey }}</v-list-item-subtitle>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
<v-divider class="my-4"/>
|
||||
<v-divider class="my-4" />
|
||||
<v-row>
|
||||
<v-col
|
||||
cols="12"
|
||||
@@ -83,11 +83,17 @@
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-divider class="my-4"/>
|
||||
<v-divider class="my-4" />
|
||||
<v-row>
|
||||
<v-col cols="12">
|
||||
<v-card border color="primary" variant="tonal">
|
||||
<v-card-title class="text-subtitle-1">聊天室消息</v-card-title>
|
||||
<v-card
|
||||
border
|
||||
color="primary"
|
||||
variant="tonal"
|
||||
>
|
||||
<v-card-title class="text-subtitle-1">
|
||||
聊天室消息
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<v-textarea
|
||||
v-model="chatInput"
|
||||
@@ -97,7 +103,7 @@
|
||||
rows="2"
|
||||
/>
|
||||
<div class="d-flex">
|
||||
<v-spacer/>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
:disabled="!canSendChat"
|
||||
color="primary"
|
||||
@@ -178,7 +184,7 @@
|
||||
<v-card border>
|
||||
<v-card-title class="d-flex align-center">
|
||||
事件日志
|
||||
<v-spacer/>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
color="error"
|
||||
size="small"
|
||||
|
||||
+8
-2
@@ -6,13 +6,19 @@
|
||||
请将这个ID复制并私聊给开发者,以便进行问题排查。
|
||||
</v-card-subtitle>
|
||||
<v-card-text>
|
||||
<div class="text-h6 mb-2">访客 ID</div>
|
||||
<div class="text-h6 mb-2">
|
||||
访客 ID
|
||||
</div>
|
||||
<v-code class="d-block pa-2 bg-grey-lighten-4 rounded mb-4">
|
||||
{{ visitorId || '加载中...' }}
|
||||
</v-code>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn color="primary" @click="loadData" :loading="loading">
|
||||
<v-btn
|
||||
color="primary"
|
||||
:loading="loading"
|
||||
@click="loadData"
|
||||
>
|
||||
Refresh
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<v-app-bar-title class="text-h6">
|
||||
编辑考试配置
|
||||
</v-app-bar-title>
|
||||
<v-spacer/>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
:loading="saving"
|
||||
color="success"
|
||||
|
||||
@@ -11,16 +11,26 @@
|
||||
{{ error }}
|
||||
</v-alert>
|
||||
|
||||
<v-skeleton-loader v-if="loading" type="article"/>
|
||||
<v-skeleton-loader
|
||||
v-if="loading"
|
||||
type="article"
|
||||
/>
|
||||
|
||||
<div v-else-if="!config">
|
||||
<v-alert border="start" type="warning" variant="tonal">
|
||||
<v-alert
|
||||
border="start"
|
||||
type="warning"
|
||||
variant="tonal"
|
||||
>
|
||||
缺少配置,请通过 URL 参数 id 或 url 传入配置。
|
||||
</v-alert>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<div ref="playerRef" class="player">
|
||||
<div
|
||||
ref="playerRef"
|
||||
class="player"
|
||||
>
|
||||
<ExamPlayer
|
||||
v-model:room-number="roomNumberLocal"
|
||||
:config="playerConfigObj"
|
||||
|
||||
+91
-27
@@ -2,9 +2,17 @@
|
||||
<v-container class="fill-height">
|
||||
<v-row>
|
||||
<v-col cols="12">
|
||||
<v-card border class="elevation-12">
|
||||
<v-card
|
||||
border
|
||||
class="elevation-12"
|
||||
>
|
||||
<v-card-title class="d-flex align-center primary lighten-1 white--text py-3 px-4">
|
||||
<v-icon class="mr-2" color="white">mdi-calendar-check</v-icon>
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
color="white"
|
||||
>
|
||||
mdi-calendar-check
|
||||
</v-icon>
|
||||
考试看板
|
||||
</v-card-title>
|
||||
<v-card-subtitle>
|
||||
@@ -22,7 +30,9 @@
|
||||
@click:close="error = ''"
|
||||
>
|
||||
<div class="d-flex align-center">
|
||||
<v-icon class="mr-2">mdi-alert-circle</v-icon>
|
||||
<v-icon class="mr-2">
|
||||
mdi-alert-circle
|
||||
</v-icon>
|
||||
{{ error }}
|
||||
</div>
|
||||
</v-alert>
|
||||
@@ -38,7 +48,9 @@
|
||||
@click:close="success = ''"
|
||||
>
|
||||
<div class="d-flex align-center">
|
||||
<v-icon class="mr-2">mdi-check-circle</v-icon>
|
||||
<v-icon class="mr-2">
|
||||
mdi-check-circle
|
||||
</v-icon>
|
||||
{{ success }}
|
||||
</div>
|
||||
</v-alert>
|
||||
@@ -74,19 +86,29 @@
|
||||
</div>
|
||||
|
||||
<!-- 加载状态 -->
|
||||
<v-card v-if="loading" class="my-4" outlined>
|
||||
<v-card
|
||||
v-if="loading"
|
||||
class="my-4"
|
||||
outlined
|
||||
>
|
||||
<v-card-text>
|
||||
<v-skeleton-loader
|
||||
class="mx-auto"
|
||||
type="list-item-avatar-two-line@3"
|
||||
></v-skeleton-loader>
|
||||
/>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
<!-- 配置列表 -->
|
||||
<v-card v-if="!loading && configs.length > 0" class="my-4" elevation="1">
|
||||
<v-card
|
||||
v-if="!loading && configs.length > 0"
|
||||
class="my-4"
|
||||
elevation="1"
|
||||
>
|
||||
<v-card-title class="d-flex align-center pa-4 bg-primary-lighten-5">
|
||||
<v-icon class="mr-2">mdi-format-list-bulleted</v-icon>
|
||||
<v-icon class="mr-2">
|
||||
mdi-format-list-bulleted
|
||||
</v-icon>
|
||||
<span class="font-weight-bold">配置列表</span>
|
||||
</v-card-title>
|
||||
<v-list>
|
||||
@@ -98,8 +120,13 @@
|
||||
@click="showEditDialog(config)"
|
||||
>
|
||||
<template #prepend>
|
||||
<v-avatar class="mr-2" color="primary">
|
||||
<v-icon color="white">mdi-calendar-text</v-icon>
|
||||
<v-avatar
|
||||
class="mr-2"
|
||||
color="primary"
|
||||
>
|
||||
<v-icon color="white">
|
||||
mdi-calendar-text
|
||||
</v-icon>
|
||||
</v-avatar>
|
||||
</template>
|
||||
|
||||
@@ -108,11 +135,21 @@
|
||||
</v-list-item-title>
|
||||
<v-list-item-subtitle class="text-caption mt-1">
|
||||
<div class="d-flex align-center">
|
||||
<v-icon class="mr-1" size="small">mdi-information-outline</v-icon>
|
||||
<v-icon
|
||||
class="mr-1"
|
||||
size="small"
|
||||
>
|
||||
mdi-information-outline
|
||||
</v-icon>
|
||||
{{ config.message || '无描述' }}
|
||||
</div>
|
||||
<div class="d-flex align-center mt-1">
|
||||
<v-icon class="mr-1" size="small">mdi-book-multiple</v-icon>
|
||||
<v-icon
|
||||
class="mr-1"
|
||||
size="small"
|
||||
>
|
||||
mdi-book-multiple
|
||||
</v-icon>
|
||||
{{ config.examInfos ? config.examInfos.length : 0 }} 堂考试
|
||||
</div>
|
||||
</v-list-item-subtitle>
|
||||
@@ -140,8 +177,6 @@
|
||||
>
|
||||
<v-icon>mdi-eye</v-icon>
|
||||
</v-btn>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
</v-list-item>
|
||||
@@ -149,12 +184,22 @@
|
||||
</v-card>
|
||||
|
||||
<!-- 空状态 -->
|
||||
<v-card v-if="!loading && configs.length === 0" class="my-4" elevation="1">
|
||||
<v-card
|
||||
v-if="!loading && configs.length === 0"
|
||||
class="my-4"
|
||||
elevation="1"
|
||||
>
|
||||
<v-card-text class="text-center py-8">
|
||||
<v-icon class="mb-4" color="grey-lighten-1" size="64">
|
||||
<v-icon
|
||||
class="mb-4"
|
||||
color="grey-lighten-1"
|
||||
size="64"
|
||||
>
|
||||
mdi-calendar-blank
|
||||
</v-icon>
|
||||
<h3 class="text-h6 mb-2 text-grey-darken-1">暂无配置</h3>
|
||||
<h3 class="text-h6 mb-2 text-grey-darken-1">
|
||||
暂无配置
|
||||
</h3>
|
||||
<p class="text-body-2 text-grey-darken-1 mb-4">
|
||||
点击"新建配置"按钮创建您的第一个考试配置
|
||||
</p>
|
||||
@@ -173,10 +218,18 @@
|
||||
</v-row>
|
||||
|
||||
<!-- 重命名对话框 -->
|
||||
<v-dialog v-model="renameDialog" max-width="500">
|
||||
<v-dialog
|
||||
v-model="renameDialog"
|
||||
max-width="500"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title class="d-flex align-center">
|
||||
<v-icon class="mr-2" color="primary">mdi-rename-box</v-icon>
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
color="primary"
|
||||
>
|
||||
mdi-rename-box
|
||||
</v-icon>
|
||||
重命名配置
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
@@ -187,10 +240,10 @@
|
||||
prepend-inner-icon="mdi-calendar-text"
|
||||
variant="outlined"
|
||||
@keyup.enter="renameConfig"
|
||||
></v-text-field>
|
||||
/>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
color="grey"
|
||||
variant="text"
|
||||
@@ -212,12 +265,21 @@
|
||||
</v-dialog>
|
||||
|
||||
<!-- 编辑配置弹框 -->
|
||||
<v-dialog v-model="editDialog" max-width="1200" persistent>
|
||||
<v-dialog
|
||||
v-model="editDialog"
|
||||
max-width="1200"
|
||||
persistent
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title class="d-flex align-center primary lighten-1 white--text py-3 px-4">
|
||||
<v-icon class="mr-2" color="white">mdi-pencil</v-icon>
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
color="white"
|
||||
>
|
||||
mdi-pencil
|
||||
</v-icon>
|
||||
编辑考试配置
|
||||
<v-spacer></v-spacer>
|
||||
<v-spacer />
|
||||
<v-chip
|
||||
v-if="editingConfig"
|
||||
class="mr-2"
|
||||
@@ -237,8 +299,10 @@
|
||||
<v-icon>mdi-close</v-icon>
|
||||
</v-btn>
|
||||
</v-card-title>
|
||||
<v-card-text class="pa-4"
|
||||
style="max-height: 70vh; overflow-y: auto;">
|
||||
<v-card-text
|
||||
class="pa-4"
|
||||
style="max-height: 70vh; overflow-y: auto;"
|
||||
>
|
||||
<ExamConfigEditor
|
||||
v-if="editingConfig"
|
||||
ref="configEditor"
|
||||
@@ -259,7 +323,7 @@
|
||||
>
|
||||
关闭
|
||||
</v-btn>
|
||||
<v-spacer></v-spacer>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
:loading="saving"
|
||||
color="success"
|
||||
|
||||
+134
-40
@@ -34,11 +34,16 @@
|
||||
<v-btn
|
||||
v-if="shouldShowUrgentTestButton"
|
||||
prepend-icon="mdi-chat"
|
||||
@click="urgentTestDialog = true"
|
||||
variant="tonal"
|
||||
>发送通知</v-btn
|
||||
@click="urgentTestDialog = true"
|
||||
>
|
||||
<v-btn icon="mdi-chat" variant="text" @click="isChatOpen = true" />
|
||||
发送通知
|
||||
</v-btn>
|
||||
<v-btn
|
||||
icon="mdi-chat"
|
||||
variant="text"
|
||||
@click="isChatOpen = true"
|
||||
/>
|
||||
<v-btn
|
||||
:badge="unreadCount || undefined"
|
||||
:badge-color="unreadCount ? 'error' : undefined"
|
||||
@@ -46,7 +51,11 @@
|
||||
variant="text"
|
||||
@click="$refs.messageLog.drawer = true"
|
||||
/>
|
||||
<v-btn icon="mdi-cog" variant="text" @click="$router.push('/settings')" />
|
||||
<v-btn
|
||||
icon="mdi-cog"
|
||||
variant="text"
|
||||
@click="$router.push('/settings')"
|
||||
/>
|
||||
</template>
|
||||
</v-app-bar>
|
||||
<!-- 初始化选择卡片,仅在首页且需要授权时显示;不影响顶栏 -->
|
||||
@@ -63,11 +72,20 @@
|
||||
@token-info-updated="updateTokenDisplayInfo"
|
||||
/>
|
||||
|
||||
<div v-if="!shouldShowInit" class="d-flex">
|
||||
<div
|
||||
v-if="!shouldShowInit"
|
||||
class="d-flex"
|
||||
>
|
||||
<!-- 主要内容区域 -->
|
||||
<v-container class="main-window flex-grow-1 no-select bloom-container" fluid>
|
||||
<v-container
|
||||
class="main-window flex-grow-1 no-select bloom-container"
|
||||
fluid
|
||||
>
|
||||
<!-- 常驻通知区域 -->
|
||||
<v-row v-if="persistentNotifications.length > 0" class="mb-4">
|
||||
<v-row
|
||||
v-if="persistentNotifications.length > 0"
|
||||
class="mb-4"
|
||||
>
|
||||
<v-col cols="12">
|
||||
<v-card
|
||||
v-for="notification in persistentNotifications"
|
||||
@@ -78,31 +96,49 @@
|
||||
@click="showNotificationDetail(notification)"
|
||||
>
|
||||
<v-card-text class="d-flex align-center py-3">
|
||||
|
||||
<span class="text-h6 text-truncate font-weight-bold">{{ notification.message }}</span>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon="mdi-chevron-right" variant="text"></v-btn>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
icon="mdi-chevron-right"
|
||||
variant="text"
|
||||
/>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<!-- 通知详情对话框 -->
|
||||
<v-dialog v-model="notificationDetailDialog" max-width="700" scrollable>
|
||||
<v-card v-if="currentNotification" class="rounded-xl">
|
||||
<v-dialog
|
||||
v-model="notificationDetailDialog"
|
||||
max-width="700"
|
||||
scrollable
|
||||
>
|
||||
<v-card
|
||||
v-if="currentNotification"
|
||||
class="rounded-xl"
|
||||
>
|
||||
<v-card-title class="d-flex align-center pa-4 text-h5">
|
||||
|
||||
<span :class="currentNotification.isUrgent ? 'text-error' : ''" class="font-weight-bold">
|
||||
<span
|
||||
:class="currentNotification.isUrgent ? 'text-error' : ''"
|
||||
class="font-weight-bold"
|
||||
>
|
||||
{{ currentNotification.isUrgent ? '强调通知' : '通知详情' }}
|
||||
</span>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon="mdi-close" variant="text" @click="notificationDetailDialog = false"></v-btn>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
icon="mdi-close"
|
||||
variant="text"
|
||||
@click="notificationDetailDialog = false"
|
||||
/>
|
||||
</v-card-title>
|
||||
|
||||
<v-divider></v-divider>
|
||||
<v-divider />
|
||||
|
||||
<v-card-text class="pa-6">
|
||||
<div class="text-h4 font-weight-medium mb-4" style="line-height: 1.5;">
|
||||
<div
|
||||
class="text-h4 font-weight-medium mb-4"
|
||||
style="line-height: 1.5;"
|
||||
>
|
||||
{{ currentNotification.message }}
|
||||
</div>
|
||||
<div class="text-subtitle-1 text-grey">
|
||||
@@ -110,7 +146,7 @@
|
||||
</div>
|
||||
</v-card-text>
|
||||
|
||||
<v-divider></v-divider>
|
||||
<v-divider />
|
||||
|
||||
<v-card-actions class="pa-4">
|
||||
<v-btn
|
||||
@@ -123,7 +159,7 @@
|
||||
>
|
||||
删除通知
|
||||
</v-btn>
|
||||
<v-spacer></v-spacer>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
color="primary"
|
||||
size="x-large"
|
||||
@@ -188,7 +224,10 @@
|
||||
@save="handleHomeworkSave"
|
||||
/>
|
||||
|
||||
<v-snackbar v-model="state.snackbar" :timeout="2000">
|
||||
<v-snackbar
|
||||
v-model="state.snackbar"
|
||||
:timeout="2000"
|
||||
>
|
||||
{{ state.snackbarText }}
|
||||
</v-snackbar>
|
||||
|
||||
@@ -224,24 +263,41 @@
|
||||
<FloatingICP />
|
||||
|
||||
<!-- 设备聊天室(右下角浮窗) -->
|
||||
<ChatWidget v-model="isChatOpen" :show-button="false" />
|
||||
<ChatWidget
|
||||
v-model="isChatOpen"
|
||||
:show-button="false"
|
||||
/>
|
||||
|
||||
<!-- 紧急通知测试对话框 -->
|
||||
<UrgentTestDialog v-model="urgentTestDialog" />
|
||||
|
||||
<!-- 添加确认对话框 -->
|
||||
<v-dialog v-model="confirmDialog.show" max-width="400">
|
||||
<v-dialog
|
||||
v-model="confirmDialog.show"
|
||||
max-width="400"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title class="text-h6"> 确认保存</v-card-title>
|
||||
<v-card-title class="text-h6">
|
||||
确认保存
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
您正在修改 {{ state.dateString }} 的数据,确定要保存吗?
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer />
|
||||
<v-btn color="grey" variant="text" @click="confirmDialog.reject">
|
||||
<v-btn
|
||||
color="grey"
|
||||
variant="text"
|
||||
@click="confirmDialog.reject"
|
||||
>
|
||||
取消
|
||||
</v-btn>
|
||||
<v-btn color="primary" @click="confirmDialog.resolve"> 确认保存</v-btn>
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="confirmDialog.resolve"
|
||||
>
|
||||
确认保存
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
@@ -254,9 +310,14 @@
|
||||
/>
|
||||
|
||||
<!-- 添加URL配置确认对话框 -->
|
||||
<v-dialog v-model="urlConfigDialog.show" max-width="500">
|
||||
<v-dialog
|
||||
v-model="urlConfigDialog.show"
|
||||
max-width="500"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title class="text-h6"> 确认应用URL配置</v-card-title>
|
||||
<v-card-title class="text-h6">
|
||||
确认应用URL配置
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<p>以下配置将应用于当前班级:</p>
|
||||
<v-list density="compact">
|
||||
@@ -265,17 +326,28 @@
|
||||
:key="change.key"
|
||||
>
|
||||
<template #prepend>
|
||||
<v-icon :icon="change.icon" class="mr-2" size="small" />
|
||||
<v-icon
|
||||
:icon="change.icon"
|
||||
class="mr-2"
|
||||
size="small"
|
||||
/>
|
||||
</template>
|
||||
<v-list-item-title class="d-flex align-center">
|
||||
<span class="text-subtitle-1">{{ change.name }}</span>
|
||||
<v-tooltip activator="parent" location="top"
|
||||
>{{ change.description || change.key }}
|
||||
<v-tooltip
|
||||
activator="parent"
|
||||
location="top"
|
||||
>
|
||||
{{ change.description || change.key }}
|
||||
</v-tooltip>
|
||||
</v-list-item-title>
|
||||
<v-list-item-subtitle>
|
||||
<span class="text-grey-darken-1">{{ change.oldValue }}</span>
|
||||
<v-icon class="mx-1" icon="mdi-arrow-right" size="small" />
|
||||
<v-icon
|
||||
class="mx-1"
|
||||
icon="mdi-arrow-right"
|
||||
size="small"
|
||||
/>
|
||||
<span class="text-primary font-weight-medium">{{
|
||||
change.newValue
|
||||
}}</span>
|
||||
@@ -292,29 +364,49 @@
|
||||
>
|
||||
取消
|
||||
</v-btn>
|
||||
<v-btn color="primary" @click="urlConfigDialog.confirmHandler">
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="urlConfigDialog.confirmHandler"
|
||||
>
|
||||
确认应用
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<!-- 通知详情对话框 -->
|
||||
<v-dialog v-model="notificationDetailDialog" max-width="600">
|
||||
<v-dialog
|
||||
v-model="notificationDetailDialog"
|
||||
max-width="600"
|
||||
>
|
||||
<v-card v-if="currentNotification">
|
||||
<v-card-title class="headline" :class="currentNotification.isUrgent ? 'text-error' : 'text-primary'">
|
||||
<v-card-title
|
||||
class="headline"
|
||||
:class="currentNotification.isUrgent ? 'text-error' : 'text-primary'"
|
||||
>
|
||||
{{ currentNotification.isUrgent ? '强调通知' : '通知详情' }}
|
||||
</v-card-title>
|
||||
<v-card-text class="text-h5 py-4">
|
||||
{{ currentNotification.message }}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn color="error" variant="text" @click="removePersistentNotification(currentNotification.id)">删除</v-btn>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" @click="notificationDetailDialog = false">关闭</v-btn>
|
||||
<v-btn
|
||||
color="error"
|
||||
variant="text"
|
||||
@click="removePersistentNotification(currentNotification.id)"
|
||||
>
|
||||
删除
|
||||
</v-btn>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="notificationDetailDialog = false"
|
||||
>
|
||||
关闭
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<br /><br /><br />
|
||||
<br><br><br>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -2066,7 +2158,9 @@ export default {
|
||||
},
|
||||
async removePersistentNotification(id) {
|
||||
this.persistentNotifications = this.persistentNotifications.filter(n => n.id !== id);
|
||||
await dataProvider.saveData('notification-list', this.persistentNotifications);
|
||||
// 当通知列表为空时,保存空对象 {} 而不是空数组 [],因为后端不接受空数组
|
||||
const dataToSave = this.persistentNotifications.length > 0 ? this.persistentNotifications : {};
|
||||
await dataProvider.saveData('notification-list', dataToSave);
|
||||
this.notificationDetailDialog = false;
|
||||
},
|
||||
},
|
||||
|
||||
+119
-35
@@ -7,11 +7,20 @@
|
||||
@click="$router.push('/')"
|
||||
/>
|
||||
</template>
|
||||
<v-app-bar-title v-if="list && !isRenaming" class="text-h6">{{ list.name }}</v-app-bar-title>
|
||||
<v-app-bar-title v-else class="text-h6">列表</v-app-bar-title>
|
||||
<v-app-bar-title
|
||||
v-if="list && !isRenaming"
|
||||
class="text-h6"
|
||||
>
|
||||
{{ list.name }}
|
||||
</v-app-bar-title>
|
||||
<v-app-bar-title
|
||||
v-else
|
||||
class="text-h6"
|
||||
>
|
||||
列表
|
||||
</v-app-bar-title>
|
||||
</v-app-bar>
|
||||
<v-container>
|
||||
|
||||
<div class="d-flex align-center mb-4">
|
||||
<v-btn
|
||||
border
|
||||
@@ -23,11 +32,19 @@
|
||||
</v-btn>
|
||||
<h1 v-if="list && !isRenaming">
|
||||
{{ list.name }}
|
||||
<v-btn border icon size="small" @click="startRenaming">
|
||||
<v-btn
|
||||
border
|
||||
icon
|
||||
size="small"
|
||||
@click="startRenaming"
|
||||
>
|
||||
<v-icon>mdi-pencil</v-icon>
|
||||
</v-btn>
|
||||
</h1>
|
||||
<div v-else-if="list && isRenaming" class="d-flex align-center">
|
||||
<div
|
||||
v-else-if="list && isRenaming"
|
||||
class="d-flex align-center"
|
||||
>
|
||||
<v-text-field
|
||||
v-model="newListName"
|
||||
autofocus
|
||||
@@ -37,11 +54,20 @@
|
||||
label="列表名称"
|
||||
style="min-width: 200px;"
|
||||
@keyup.enter="saveListName"
|
||||
></v-text-field>
|
||||
<v-btn class="mr-2" color="primary" size="small" @click="saveListName">
|
||||
/>
|
||||
<v-btn
|
||||
class="mr-2"
|
||||
color="primary"
|
||||
size="small"
|
||||
@click="saveListName"
|
||||
>
|
||||
<v-icon>mdi-check</v-icon>
|
||||
</v-btn>
|
||||
<v-btn color="error" size="small" @click="cancelRenaming">
|
||||
<v-btn
|
||||
color="error"
|
||||
size="small"
|
||||
@click="cancelRenaming"
|
||||
>
|
||||
<v-icon>mdi-close</v-icon>
|
||||
</v-btn>
|
||||
</div>
|
||||
@@ -51,10 +77,14 @@
|
||||
</div>
|
||||
|
||||
|
||||
<v-card border class="mb-5" rounded="xl">
|
||||
<v-card
|
||||
border
|
||||
class="mb-5"
|
||||
rounded="xl"
|
||||
>
|
||||
<v-card-title class="d-flex align-center">
|
||||
项目列表
|
||||
<v-spacer/>
|
||||
<v-spacer />
|
||||
<v-btn-toggle
|
||||
v-model="sortType"
|
||||
mandatory
|
||||
@@ -97,7 +127,7 @@
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
<v-card-actions v-if="sortedItems.length > 0">
|
||||
<v-spacer/>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
:disabled="!hasCompletedItems"
|
||||
color="error"
|
||||
@@ -108,7 +138,11 @@
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
<v-card border class="mb-5" rounded="xl">
|
||||
<v-card
|
||||
border
|
||||
class="mb-5"
|
||||
rounded="xl"
|
||||
>
|
||||
<v-card-title>添加新项目</v-card-title>
|
||||
<v-card-text>
|
||||
<v-text-field
|
||||
@@ -126,7 +160,11 @@
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
<v-card border class="mb-5" rounded="xl">
|
||||
<v-card
|
||||
border
|
||||
class="mb-5"
|
||||
rounded="xl"
|
||||
>
|
||||
<v-card-title>列表排序</v-card-title>
|
||||
<v-card-text>
|
||||
<v-text-field
|
||||
@@ -153,16 +191,30 @@
|
||||
</v-card>
|
||||
|
||||
<!-- 确认删除对话框 -->
|
||||
<v-dialog v-model="deleteDialog.show" max-width="500">
|
||||
<v-card border rounded="xl">
|
||||
<v-dialog
|
||||
v-model="deleteDialog.show"
|
||||
max-width="500"
|
||||
>
|
||||
<v-card
|
||||
border
|
||||
rounded="xl"
|
||||
>
|
||||
<v-card-title>{{ deleteDialog.title }}</v-card-title>
|
||||
<v-card-text>{{ deleteDialog.text }}</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" variant="text" @click="deleteDialog.show = false">
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
color="primary"
|
||||
variant="text"
|
||||
@click="deleteDialog.show = false"
|
||||
>
|
||||
取消
|
||||
</v-btn>
|
||||
<v-btn color="error" variant="text" @click="confirmDelete">
|
||||
<v-btn
|
||||
color="error"
|
||||
variant="text"
|
||||
@click="confirmDelete"
|
||||
>
|
||||
确认删除
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
@@ -170,8 +222,14 @@
|
||||
</v-dialog>
|
||||
|
||||
<!-- 项目详情对话框 -->
|
||||
<v-dialog v-model="itemDialog.show" max-width="600">
|
||||
<v-card border rounded="xl">
|
||||
<v-dialog
|
||||
v-model="itemDialog.show"
|
||||
max-width="600"
|
||||
>
|
||||
<v-card
|
||||
border
|
||||
rounded="xl"
|
||||
>
|
||||
<v-card-title>
|
||||
<span v-if="!itemDialog.isEditing">项目详情</span>
|
||||
<span v-else>编辑项目</span>
|
||||
@@ -181,13 +239,16 @@
|
||||
<div v-if="!itemDialog.isEditing && itemDialog.item">
|
||||
<v-list>
|
||||
<v-list-item>
|
||||
<v-list-item-title class="text-subtitle-1 font-weight-bold">{{ itemDialog.item.name }}
|
||||
<v-list-item-title class="text-subtitle-1 font-weight-bold">
|
||||
{{ itemDialog.item.name }}
|
||||
</v-list-item-title>
|
||||
<v-list-item-subtitle>{{ itemDialog.item.id }}</v-list-item-subtitle>
|
||||
</v-list-item>
|
||||
|
||||
<v-list-item>
|
||||
<v-list-item-title class="text-subtitle-1 font-weight-bold">状态</v-list-item-title>
|
||||
<v-list-item-title class="text-subtitle-1 font-weight-bold">
|
||||
状态
|
||||
</v-list-item-title>
|
||||
<v-list-item-subtitle>
|
||||
<v-chip
|
||||
:color="itemDialog.item.completed ? 'success' : 'warning'"
|
||||
@@ -199,20 +260,24 @@
|
||||
</v-list-item>
|
||||
|
||||
<v-list-item v-if="itemDialog.item.description">
|
||||
<v-list-item-title class="text-subtitle-1 font-weight-bold">描述</v-list-item-title>
|
||||
<v-list-item-title class="text-subtitle-1 font-weight-bold">
|
||||
描述
|
||||
</v-list-item-title>
|
||||
<v-list-item-subtitle>{{ itemDialog.item.description }}</v-list-item-subtitle>
|
||||
</v-list-item>
|
||||
|
||||
</v-list>
|
||||
</div>
|
||||
|
||||
<div v-else-if="itemDialog.isEditing && itemDialog.item" class="pa-2">
|
||||
<div
|
||||
v-else-if="itemDialog.isEditing && itemDialog.item"
|
||||
class="pa-2"
|
||||
>
|
||||
<v-text-field
|
||||
v-model="itemDialog.editedItem.name"
|
||||
class="mb-3"
|
||||
label="名称"
|
||||
variant="outlined"
|
||||
></v-text-field>
|
||||
/>
|
||||
|
||||
<v-textarea
|
||||
v-model="itemDialog.editedItem.description"
|
||||
@@ -220,7 +285,7 @@
|
||||
label="描述"
|
||||
rows="3"
|
||||
variant="outlined"
|
||||
></v-textarea>
|
||||
/>
|
||||
|
||||
|
||||
<v-switch
|
||||
@@ -228,37 +293,56 @@
|
||||
color="success"
|
||||
hide-details
|
||||
label="已完成"
|
||||
></v-switch>
|
||||
/>
|
||||
</div>
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-spacer />
|
||||
|
||||
<template v-if="!itemDialog.isEditing">
|
||||
<v-btn color="primary" variant="text" @click="startEditingItem">
|
||||
<v-btn
|
||||
color="primary"
|
||||
variant="text"
|
||||
@click="startEditingItem"
|
||||
>
|
||||
编辑
|
||||
</v-btn>
|
||||
<v-btn color="error" variant="text" @click="confirmDeleteItem(itemDialog.item?.id)">
|
||||
<v-btn
|
||||
color="error"
|
||||
variant="text"
|
||||
@click="confirmDeleteItem(itemDialog.item?.id)"
|
||||
>
|
||||
删除
|
||||
</v-btn>
|
||||
<v-btn color="secondary" variant="text" @click="itemDialog.show = false">
|
||||
<v-btn
|
||||
color="secondary"
|
||||
variant="text"
|
||||
@click="itemDialog.show = false"
|
||||
>
|
||||
关闭
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<v-btn color="success" variant="text" @click="saveItemChanges">
|
||||
<v-btn
|
||||
color="success"
|
||||
variant="text"
|
||||
@click="saveItemChanges"
|
||||
>
|
||||
保存
|
||||
</v-btn>
|
||||
<v-btn color="secondary" variant="text" @click="cancelEditingItem">
|
||||
<v-btn
|
||||
color="secondary"
|
||||
variant="text"
|
||||
@click="cancelEditingItem"
|
||||
>
|
||||
取消
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
|
||||
+63
-17
@@ -7,12 +7,16 @@
|
||||
@click="$router.push('/')"
|
||||
/>
|
||||
</template>
|
||||
<v-app-bar-title class="text-h6">列表</v-app-bar-title>
|
||||
<v-app-bar-title class="text-h6">
|
||||
列表
|
||||
</v-app-bar-title>
|
||||
</v-app-bar>
|
||||
<v-container>
|
||||
|
||||
|
||||
<v-card border class="mb-5" rounded="xl">
|
||||
<v-card
|
||||
border
|
||||
class="mb-5"
|
||||
rounded="xl"
|
||||
>
|
||||
<v-card-title>现有列表</v-card-title>
|
||||
<v-card-text v-if="lists.length === 0">
|
||||
暂无列表,请创建新列表
|
||||
@@ -27,7 +31,10 @@
|
||||
<div v-if="list.id !== editingListId">
|
||||
<v-list-item-title>{{ list.name }}</v-list-item-title>
|
||||
</div>
|
||||
<div v-else class="d-flex align-center w-100">
|
||||
<div
|
||||
v-else
|
||||
class="d-flex align-center w-100"
|
||||
>
|
||||
<v-text-field
|
||||
v-model="editListName"
|
||||
autofocus
|
||||
@@ -36,21 +43,41 @@
|
||||
hide-details
|
||||
label="列表名称"
|
||||
@keyup.enter="saveListName"
|
||||
></v-text-field>
|
||||
<v-btn border class="mr-2" color="primary" icon @click.stop.prevent="saveListName">
|
||||
/>
|
||||
<v-btn
|
||||
border
|
||||
class="mr-2"
|
||||
color="primary"
|
||||
icon
|
||||
@click.stop.prevent="saveListName"
|
||||
>
|
||||
<v-icon>mdi-check</v-icon>
|
||||
</v-btn>
|
||||
<v-btn border color="error" icon @click.stop.prevent="cancelEditing">
|
||||
<v-btn
|
||||
border
|
||||
color="error"
|
||||
icon
|
||||
@click.stop.prevent="cancelEditing"
|
||||
>
|
||||
<v-icon>mdi-close</v-icon>
|
||||
</v-btn>
|
||||
</div>
|
||||
|
||||
<template #append>
|
||||
<div v-if="list.id !== editingListId">
|
||||
<v-btn border class="mr-2" icon @click.stop.prevent="startEditing(list.id)">
|
||||
<v-btn
|
||||
border
|
||||
class="mr-2"
|
||||
icon
|
||||
@click.stop.prevent="startEditing(list.id)"
|
||||
>
|
||||
<v-icon>mdi-pencil</v-icon>
|
||||
</v-btn>
|
||||
<v-btn border icon @click.stop.prevent="confirmDeleteList(list.id)">
|
||||
<v-btn
|
||||
border
|
||||
icon
|
||||
@click.stop.prevent="confirmDeleteList(list.id)"
|
||||
>
|
||||
<v-icon>mdi-delete</v-icon>
|
||||
</v-btn>
|
||||
</div>
|
||||
@@ -58,30 +85,49 @@
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-card>
|
||||
<v-card border class="mb-5" rounded="xl">
|
||||
<v-card
|
||||
border
|
||||
class="mb-5"
|
||||
rounded="xl"
|
||||
>
|
||||
<v-card-title>创建新列表</v-card-title>
|
||||
<v-card-text>
|
||||
<v-text-field
|
||||
v-model="newListName"
|
||||
:rules="[v => !!v || '名称不能为空']"
|
||||
label="列表名称"
|
||||
></v-text-field>
|
||||
<v-btn :disabled="!newListName" color="primary" @click="createNewList">
|
||||
/>
|
||||
<v-btn
|
||||
:disabled="!newListName"
|
||||
color="primary"
|
||||
@click="createNewList"
|
||||
>
|
||||
创建列表
|
||||
</v-btn>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<!-- 确认删除对话框 -->
|
||||
<v-dialog v-model="deleteDialog.show" max-width="500">
|
||||
<v-dialog
|
||||
v-model="deleteDialog.show"
|
||||
max-width="500"
|
||||
>
|
||||
<v-card border>
|
||||
<v-card-title>删除列表</v-card-title>
|
||||
<v-card-text>{{ deleteDialog.text }}</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" variant="text" @click="deleteDialog.show = false">
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
color="primary"
|
||||
variant="text"
|
||||
@click="deleteDialog.show = false"
|
||||
>
|
||||
取消
|
||||
</v-btn>
|
||||
<v-btn color="error" variant="text" @click="confirmDelete">
|
||||
<v-btn
|
||||
color="error"
|
||||
variant="text"
|
||||
@click="confirmDelete"
|
||||
>
|
||||
确认删除
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
|
||||
+98
-54
@@ -11,10 +11,11 @@
|
||||
icon="mdi-menu"
|
||||
variant="text"
|
||||
@click="drawer = !drawer"
|
||||
|
||||
/>
|
||||
</template>
|
||||
<v-app-bar-title class="text-h6">设置</v-app-bar-title>
|
||||
<v-app-bar-title class="text-h6">
|
||||
设置
|
||||
</v-app-bar-title>
|
||||
</v-app-bar>
|
||||
|
||||
<v-container fluid>
|
||||
@@ -43,14 +44,23 @@
|
||||
direction="vertical"
|
||||
style="width: 100%"
|
||||
>
|
||||
<v-tabs-window-item value="index"
|
||||
>
|
||||
<v-card border class="service-card gradient-right clickable mb-4" color="primary" elevation="8" hover
|
||||
rounded="xl" variant="tonal" @click="openClassworksKV">
|
||||
<v-tabs-window-item value="index">
|
||||
<v-card
|
||||
border
|
||||
class="service-card gradient-right clickable mb-4"
|
||||
color="primary"
|
||||
elevation="8"
|
||||
hover
|
||||
rounded="xl"
|
||||
variant="tonal"
|
||||
@click="openClassworksKV"
|
||||
>
|
||||
<v-card-item>
|
||||
<div class="card-title">
|
||||
<div>
|
||||
<div class="text-h6">在寻找 Classworks KV ?</div>
|
||||
<div class="text-h6">
|
||||
在寻找 Classworks KV ?
|
||||
</div>
|
||||
<div class="text-caption text-medium-emphasis">
|
||||
文档形键值数据库
|
||||
</div>
|
||||
@@ -71,50 +81,53 @@
|
||||
</div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<v-card border class="rounded-xl mb-4" subtitle="设置" title="Classworks">
|
||||
<v-card
|
||||
border
|
||||
class="rounded-xl mb-4"
|
||||
subtitle="设置"
|
||||
title="Classworks"
|
||||
>
|
||||
<v-card-text>
|
||||
<v-alert
|
||||
class="rounded-xl"
|
||||
color="error"
|
||||
icon="mdi-alert-circle"
|
||||
variant="tonal"
|
||||
>Classworks
|
||||
>
|
||||
Classworks
|
||||
是开源免费的软件,官方没有提供任何形式的付费支持服务,源代码仓库地址在
|
||||
<a
|
||||
href="https://github.com/ZeroCatDev/Classworks"
|
||||
target="_blank"
|
||||
>https://github.com/ZeroCatDev/Classworks</a
|
||||
>。如果您通过有偿协助等付费方式取得本应用,在遇到问题时请在与卖家约定的服务框架下,优先向卖家求助。如果卖家没有提供您预期的服务,请退款或通过其它形式积极维护您的合法权益。
|
||||
</v-alert
|
||||
>
|
||||
>https://github.com/ZeroCatDev/Classworks</a>。如果您通过有偿协助等付费方式取得本应用,在遇到问题时请在与卖家约定的服务框架下,优先向卖家求助。如果卖家没有提供您预期的服务,请退款或通过其它形式积极维护您的合法权益。
|
||||
</v-alert>
|
||||
<v-alert
|
||||
class="mt-4 rounded-xl"
|
||||
color="info"
|
||||
icon="mdi-information"
|
||||
variant="tonal"
|
||||
>请不要使用浏览器清除缓存功能,否则会导致配置丢失。
|
||||
<del
|
||||
>恶意的操作可能导致您受到贵校教师的处理
|
||||
</del
|
||||
>
|
||||
</v-alert
|
||||
>
|
||||
请不要使用浏览器清除缓存功能,否则会导致配置丢失。
|
||||
<del>恶意的操作可能导致您受到贵校教师的处理
|
||||
</del>
|
||||
</v-alert>
|
||||
<v-alert
|
||||
class="mt-4 rounded-xl"
|
||||
color="warning"
|
||||
icon="mdi-information"
|
||||
variant="tonal"
|
||||
><p>
|
||||
请不要使用包括但不限于360极速浏览器、360安全浏览器、夸克浏览器、QQ浏览器等浏览器使用
|
||||
Classworks
|
||||
,这些浏览器过时且存在严重的一致性问题。在Windows上,使用新版
|
||||
Microsoft Edge 浏览器是最推荐的选择。
|
||||
</p>
|
||||
>
|
||||
<p>
|
||||
请不要使用包括但不限于360极速浏览器、360安全浏览器、夸克浏览器、QQ浏览器等浏览器使用
|
||||
Classworks
|
||||
,这些浏览器过时且存在严重的一致性问题。在Windows上,使用新版
|
||||
Microsoft Edge 浏览器是最推荐的选择。
|
||||
</p>
|
||||
<p style="color: #666">
|
||||
上述浏览器商标为其所属公司所有,Classworks™
|
||||
与上述浏览器所属公司无竞争关系。
|
||||
</p>
|
||||
<br/>
|
||||
<br>
|
||||
<v-btn
|
||||
append-icon="mdi-open-in-new"
|
||||
class="text-none rounded-xl"
|
||||
@@ -122,14 +135,13 @@
|
||||
href="https://www.microsoft.com/zh-cn/windows/microsoft-edge"
|
||||
target="_blank"
|
||||
variant="tonal"
|
||||
>下载 Microsoft Edge(微软边缘浏览器)
|
||||
</v-btn
|
||||
>
|
||||
</v-alert
|
||||
>
|
||||
下载 Microsoft Edge(微软边缘浏览器)
|
||||
</v-btn>
|
||||
</v-alert>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<about-card/>
|
||||
<about-card />
|
||||
</v-tabs-window-item>
|
||||
|
||||
<v-tabs-window-item value="server">
|
||||
@@ -138,15 +150,27 @@
|
||||
border
|
||||
@saved="onSettingsSaved"
|
||||
/>
|
||||
<data-provider-settings-card border class="mt-4"/>
|
||||
<kv-database-card border class="mt-4"/>
|
||||
<data-provider-settings-card
|
||||
border
|
||||
class="mt-4"
|
||||
/>
|
||||
<kv-database-card
|
||||
border
|
||||
class="mt-4"
|
||||
/>
|
||||
</v-tabs-window-item>
|
||||
|
||||
<v-tabs-window-item value="student">
|
||||
<student-list-card :is-mobile="isMobile" border/>
|
||||
<student-list-card
|
||||
:is-mobile="isMobile"
|
||||
border
|
||||
/>
|
||||
</v-tabs-window-item>
|
||||
<v-tabs-window-item value="share">
|
||||
<settings-link-generator border class="mt-4"/>
|
||||
<settings-link-generator
|
||||
border
|
||||
class="mt-4"
|
||||
/>
|
||||
</v-tabs-window-item>
|
||||
|
||||
<v-tabs-window-item value="refresh">
|
||||
@@ -182,27 +206,35 @@
|
||||
</v-tabs-window-item>
|
||||
|
||||
<v-tabs-window-item value="randomPicker">
|
||||
<random-picker-card :is-mobile="isMobile" border/>
|
||||
<random-picker-card
|
||||
:is-mobile="isMobile"
|
||||
border
|
||||
/>
|
||||
</v-tabs-window-item>
|
||||
<v-tabs-window-item value="subject">
|
||||
<subject-management-card border/>
|
||||
<br/>
|
||||
<homework-template-card border/>
|
||||
<subject-management-card border />
|
||||
<br>
|
||||
<homework-template-card border />
|
||||
</v-tabs-window-item>
|
||||
|
||||
<v-tabs-window-item value="developer"
|
||||
>
|
||||
<settings-card border icon="mdi-developer-board" title="开发者选项">
|
||||
<v-tabs-window-item value="developer">
|
||||
<settings-card
|
||||
border
|
||||
icon="mdi-developer-board"
|
||||
title="开发者选项"
|
||||
>
|
||||
<v-list>
|
||||
<v-list-item>
|
||||
<template #prepend>
|
||||
<v-icon class="mr-3" icon="mdi-code-tags"/>
|
||||
<v-icon
|
||||
class="mr-3"
|
||||
icon="mdi-code-tags"
|
||||
/>
|
||||
</template>
|
||||
<v-list-item-title>启用开发者选项</v-list-item-title>
|
||||
<v-list-item-subtitle
|
||||
>启用后可以查看和修改开发者设置
|
||||
</v-list-item-subtitle
|
||||
>
|
||||
<v-list-item-subtitle>
|
||||
启用后可以查看和修改开发者设置
|
||||
</v-list-item-subtitle>
|
||||
<template #append>
|
||||
<v-switch
|
||||
v-model="settings.developer.enabled"
|
||||
@@ -220,29 +252,41 @@
|
||||
@saved="onSettingsSaved"
|
||||
/>
|
||||
<template v-if="settings.developer.enabled">
|
||||
<v-card border class="mt-4 rounded-lg">
|
||||
<v-card
|
||||
border
|
||||
class="mt-4 rounded-lg"
|
||||
>
|
||||
<v-card-title class="d-flex align-center">
|
||||
<v-icon class="mr-2" icon="mdi-cog-outline"/>
|
||||
<v-icon
|
||||
class="mr-2"
|
||||
icon="mdi-cog-outline"
|
||||
/>
|
||||
所有设置
|
||||
</v-card-title>
|
||||
<v-card-subtitle> 浏览和修改所有可用设置</v-card-subtitle>
|
||||
<v-card-text>
|
||||
<settings-explorer @update="onSettingUpdate"/>
|
||||
<settings-explorer @update="onSettingUpdate" />
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
<v-col v-if="settings.developer.enabled" cols="12"></v-col>
|
||||
<v-col
|
||||
v-if="settings.developer.enabled"
|
||||
cols="12"
|
||||
/>
|
||||
</v-tabs-window-item>
|
||||
|
||||
<v-tabs-window-item value="about">
|
||||
<about-card/>
|
||||
<echo-chamber-card border class="mt-4"/>
|
||||
<about-card />
|
||||
<echo-chamber-card
|
||||
border
|
||||
class="mt-4"
|
||||
/>
|
||||
</v-tabs-window-item>
|
||||
</v-tabs-window>
|
||||
</v-container>
|
||||
|
||||
<!-- 消息记录组件 -->
|
||||
<message-log ref="messageLog"/>
|
||||
<message-log ref="messageLog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user