Przeglądaj źródła

学生归档页面编写

master
suyanyan 3 miesięcy temu
rodzic
commit
151ba92d78
5 zmienionych plików z 747 dodań i 193 usunięć
  1. +14
    -3
      SafeCampus.WEB/components.d.ts
  2. +1
    -0
      SafeCampus.WEB/package.json
  3. +33
    -25
      SafeCampus.WEB/pnpm-lock.yaml
  4. +26
    -3
      SafeCampus.WEB/src/utils/index.ts
  5. +673
    -162
      SafeCampus.WEB/src/views/violation/portrait/detail.vue

+ 14
- 3
SafeCampus.WEB/components.d.ts Wyświetl plik

@@ -12,6 +12,7 @@ declare module 'vue' {
500: typeof import('./src/components/ErrorMessage/500.vue')['default']
CheckCard: typeof import('./src/components/CheckCard/index.vue')['default']
ChooseModule: typeof import('./src/components/ChooseModule/index.vue')['default']
ClassUserselector: typeof import('./src/components/Selectors/ClassUserselector/index.vue')['default']
CodeHighLight: typeof import('./src/components/CodeHighLight/index.vue')['default']
ColSetting: typeof import('./src/components/ProTable/components/ColSetting.vue')['default']
CropUpload: typeof import('./src/components/CropUpload/index.vue')['default']
@@ -19,13 +20,14 @@ declare module 'vue' {
ECharts: typeof import('./src/components/ECharts/index.vue')['default']
ElAside: typeof import('element-plus/es')['ElAside']
ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
ElBadge: typeof import('element-plus/es')['ElBadge']
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
ElButton: typeof import('element-plus/es')['ElButton']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCol: typeof import('element-plus/es')['ElCol']
ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
ElContainer: typeof import('element-plus/es')['ElContainer']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
ElDialog: typeof import('element-plus/es')['ElDialog']
ElDivider: typeof import('element-plus/es')['ElDivider']
ElDrawer: typeof import('element-plus/es')['ElDrawer']
@@ -38,14 +40,21 @@ declare module 'vue' {
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElHeader: typeof import('element-plus/es')['ElHeader']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput']
ElLink: typeof import('element-plus/es')['ElLink']
ElMain: typeof import('element-plus/es')['ElMain']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopover: typeof import('element-plus/es')['ElPopover']
ElRadio: typeof import('element-plus/es')['ElRadio']
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElRow: typeof import('element-plus/es')['ElRow']
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSlider: typeof import('element-plus/es')['ElSlider']
ElSpace: typeof import('element-plus/es')['ElSpace']
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
@@ -54,9 +63,11 @@ declare module 'vue' {
ElTabPane: typeof import('element-plus/es')['ElTabPane']
ElTabs: typeof import('element-plus/es')['ElTabs']
ElTag: typeof import('element-plus/es')['ElTag']
ElText: typeof import('element-plus/es')['ElText']
ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTree: typeof import('element-plus/es')['ElTree']
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
ElUpload: typeof import('element-plus/es')['ElUpload']
ESign: typeof import('./src/components/ESign/index.vue')['default']
FormContainer: typeof import('./src/components/Form/FormContainer/index.vue')['default']
Grid: typeof import('./src/components/Grid/index.vue')['default']


+ 1
- 0
SafeCampus.WEB/package.json Wyświetl plik

@@ -52,6 +52,7 @@
"nprogress": "^0.2.0",
"pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.1",
"pinyin-pro": "^3.24.2",
"print-js": "^1.6.0",
"qs": "^6.11.2",
"screenfull": "^6.0.2",


+ 33
- 25
SafeCampus.WEB/pnpm-lock.yaml Wyświetl plik

@@ -56,6 +56,9 @@ importers:
pinia-plugin-persistedstate:
specifier: ^3.2.1
version: 3.2.1(pinia@2.1.7(typescript@5.3.3)(vue@3.4.21(typescript@5.3.3)))
pinyin-pro:
specifier: ^3.24.2
version: 3.24.2
print-js:
specifier: ^1.6.0
version: 1.6.0
@@ -167,7 +170,7 @@ importers:
version: 3.2.5
rollup-plugin-visualizer:
specifier: ^5.12.0
version: 5.12.0(rollup@4.6.1)
version: 5.12.0(rollup@2.79.1)
sass:
specifier: ^1.71.1
version: 1.71.1
@@ -203,16 +206,16 @@ importers:
version: 5.3.3
unocss:
specifier: ^0.58.5
version: 0.58.5(postcss@8.4.35)(rollup@4.6.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2))
version: 0.58.5(postcss@8.4.35)(rollup@2.79.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2))
unplugin-auto-import:
specifier: ^0.17.5
version: 0.17.5(@vueuse/core@10.9.0(vue@3.4.21(typescript@5.3.3)))(rollup@4.6.1)
version: 0.17.5(@vueuse/core@10.9.0(vue@3.4.21(typescript@5.3.3)))(rollup@2.79.1)
unplugin-icons:
specifier: ^0.18.5
version: 0.18.5(@vue/compiler-sfc@3.4.21)(vue-template-compiler@2.7.14)
unplugin-vue-components:
specifier: ^0.26.0
version: 0.26.0(@babel/parser@7.24.0)(rollup@4.6.1)(vue@3.4.21(typescript@5.3.3))
version: 0.26.0(@babel/parser@7.24.0)(rollup@2.79.1)(vue@3.4.21(typescript@5.3.3))
unplugin-vue-setup-extend-plus:
specifier: ^1.0.1
version: 1.0.1
@@ -4090,6 +4093,9 @@ packages:
typescript:
optional: true

pinyin-pro@3.24.2:
resolution: {integrity: sha512-5tPyLhxT4CZ9dWqQRqm3X5ADdS18Sb2w0ranNBgr6jCrqO4O8gtfuyqG7Y6+1Mre+0n2VlhKDz+3P5oqSLrkOw==}

pkcs7@0.2.3:
resolution: {integrity: sha512-kJRwmADEQUg+qJyRgWLtpEL9q9cFjZschejTEK3GRjKvnsU9G5WWoe/wKqRgbBoqWdVSeTUKP6vIA3Y72M3rWA==}
engines: {node: ^0.10, npm: ^1.4.6}
@@ -6867,13 +6873,13 @@ snapshots:
estree-walker: 2.0.2
picomatch: 2.3.1

'@rollup/pluginutils@5.1.0(rollup@4.6.1)':
'@rollup/pluginutils@5.1.0(rollup@2.79.1)':
dependencies:
'@types/estree': 1.0.0
estree-walker: 2.0.2
picomatch: 2.3.1
optionalDependencies:
rollup: 4.6.1
rollup: 2.79.1

'@rollup/rollup-android-arm-eabi@4.6.1':
optional: true
@@ -7073,20 +7079,20 @@ snapshots:

'@ungap/structured-clone@1.2.0': {}

'@unocss/astro@0.58.5(rollup@4.6.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2))':
'@unocss/astro@0.58.5(rollup@2.79.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2))':
dependencies:
'@unocss/core': 0.58.5
'@unocss/reset': 0.58.5
'@unocss/vite': 0.58.5(rollup@4.6.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2))
'@unocss/vite': 0.58.5(rollup@2.79.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2))
optionalDependencies:
vite: 5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2)
transitivePeerDependencies:
- rollup

'@unocss/cli@0.58.5(rollup@4.6.1)':
'@unocss/cli@0.58.5(rollup@2.79.1)':
dependencies:
'@ampproject/remapping': 2.2.1
'@rollup/pluginutils': 5.1.0(rollup@4.6.1)
'@rollup/pluginutils': 5.1.0(rollup@2.79.1)
'@unocss/config': 0.58.5
'@unocss/core': 0.58.5
'@unocss/preset-uno': 0.58.5
@@ -7210,10 +7216,10 @@ snapshots:
dependencies:
'@unocss/core': 0.58.5

'@unocss/vite@0.58.5(rollup@4.6.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2))':
'@unocss/vite@0.58.5(rollup@2.79.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2))':
dependencies:
'@ampproject/remapping': 2.2.1
'@rollup/pluginutils': 5.1.0(rollup@4.6.1)
'@rollup/pluginutils': 5.1.0(rollup@2.79.1)
'@unocss/config': 0.58.5
'@unocss/core': 0.58.5
'@unocss/inspector': 0.58.5
@@ -9901,6 +9907,8 @@ snapshots:
optionalDependencies:
typescript: 5.3.3

pinyin-pro@3.24.2: {}

pkcs7@0.2.3: {}

pkcs7@1.0.4:
@@ -10176,14 +10184,14 @@ snapshots:
serialize-javascript: 4.0.0
terser: 5.19.2

rollup-plugin-visualizer@5.12.0(rollup@4.6.1):
rollup-plugin-visualizer@5.12.0(rollup@2.79.1):
dependencies:
open: 8.4.2
picomatch: 2.3.1
source-map: 0.7.4
yargs: 17.7.1
optionalDependencies:
rollup: 4.6.1
rollup: 2.79.1

rollup@0.25.8:
dependencies:
@@ -10905,9 +10913,9 @@ snapshots:

unicorn-magic@0.1.0: {}

unimport@3.7.1(rollup@4.6.1):
unimport@3.7.1(rollup@2.79.1):
dependencies:
'@rollup/pluginutils': 5.1.0(rollup@4.6.1)
'@rollup/pluginutils': 5.1.0(rollup@2.79.1)
acorn: 8.11.2
escape-string-regexp: 5.0.0
estree-walker: 3.0.3
@@ -10936,10 +10944,10 @@ snapshots:

universalify@2.0.0: {}

unocss@0.58.5(postcss@8.4.35)(rollup@4.6.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2)):
unocss@0.58.5(postcss@8.4.35)(rollup@2.79.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2)):
dependencies:
'@unocss/astro': 0.58.5(rollup@4.6.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2))
'@unocss/cli': 0.58.5(rollup@4.6.1)
'@unocss/astro': 0.58.5(rollup@2.79.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2))
'@unocss/cli': 0.58.5(rollup@2.79.1)
'@unocss/core': 0.58.5
'@unocss/extractor-arbitrary-variants': 0.58.5
'@unocss/postcss': 0.58.5(postcss@8.4.35)
@@ -10957,7 +10965,7 @@ snapshots:
'@unocss/transformer-compile-class': 0.58.5
'@unocss/transformer-directives': 0.58.5
'@unocss/transformer-variant-group': 0.58.5
'@unocss/vite': 0.58.5(rollup@4.6.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2))
'@unocss/vite': 0.58.5(rollup@2.79.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2))
optionalDependencies:
vite: 5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2)
transitivePeerDependencies:
@@ -10965,15 +10973,15 @@ snapshots:
- rollup
- supports-color

unplugin-auto-import@0.17.5(@vueuse/core@10.9.0(vue@3.4.21(typescript@5.3.3)))(rollup@4.6.1):
unplugin-auto-import@0.17.5(@vueuse/core@10.9.0(vue@3.4.21(typescript@5.3.3)))(rollup@2.79.1):
dependencies:
'@antfu/utils': 0.7.7
'@rollup/pluginutils': 5.1.0(rollup@4.6.1)
'@rollup/pluginutils': 5.1.0(rollup@2.79.1)
fast-glob: 3.3.2
local-pkg: 0.5.0
magic-string: 0.30.5
minimatch: 9.0.3
unimport: 3.7.1(rollup@4.6.1)
unimport: 3.7.1(rollup@2.79.1)
unplugin: 1.7.1
optionalDependencies:
'@vueuse/core': 10.9.0(vue@3.4.21(typescript@5.3.3))
@@ -10995,10 +11003,10 @@ snapshots:
transitivePeerDependencies:
- supports-color

unplugin-vue-components@0.26.0(@babel/parser@7.24.0)(rollup@4.6.1)(vue@3.4.21(typescript@5.3.3)):
unplugin-vue-components@0.26.0(@babel/parser@7.24.0)(rollup@2.79.1)(vue@3.4.21(typescript@5.3.3)):
dependencies:
'@antfu/utils': 0.7.6
'@rollup/pluginutils': 5.1.0(rollup@4.6.1)
'@rollup/pluginutils': 5.1.0(rollup@2.79.1)
chokidar: 3.5.3
debug: 4.3.4
fast-glob: 3.3.1


+ 26
- 3
SafeCampus.WEB/src/utils/index.ts Wyświetl plik

@@ -327,7 +327,7 @@ export function findItemNested(enumData: any, callValue: any, value: string, chi
/**
* @description 时间戳转化为日期
* */
export function formatDate(timestamp:number) {
export function formatDate(timestamp: number) {
let date = new Date(timestamp);
let year = date.getFullYear();
let month = "0" + (date.getMonth() + 1); // getMonth返回的月份是从0开始的
@@ -336,6 +336,29 @@ export function formatDate(timestamp:number) {
let minutes = "0" + date.getMinutes();
let seconds = "0" + date.getSeconds();

return year + "-" + month.substr(-2) + "-" + day.substr(-2)
+ " " + hours.substr(-2) + ":" + minutes.substr(-2) + ":" + seconds.substr(-2);
return year + "-" + month.substr(-2) + "-" + day.substr(-2) + " " + hours.substr(-2) + ":" + minutes.substr(-2) + ":" + seconds.substr(-2);
}

/**
* 日期格式化
*/
export function dateFormat(date: any, format: any) {
format = format || "yyyy-MM-dd hh:mm:ss";
if (date !== "Invalid Date") {
let o: any = {
"M+": date.getMonth() + 1, //month
"d+": date.getDate(), //day
"h+": date.getHours(), //hour
"m+": date.getMinutes(), //minute
"s+": date.getSeconds(), //second
"q+": Math.floor((date.getMonth() + 3) / 3), //quarter
S: date.getMilliseconds() //millisecond
};
if (/(y+)/.test(format)) format = format.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
for (let k in o)
if (new RegExp("(" + k + ")").test(format))
format = format.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
return format;
}
return "";
}

+ 673
- 162
SafeCampus.WEB/src/views/violation/portrait/detail.vue
Plik diff jest za duży
Wyświetl plik


Ładowanie…
Anuluj
Zapisz