From 0ef55038baed9b508f27504749f73a606eb97e69 Mon Sep 17 00:00:00 2001 From: yangjun <1173114630@qq.com> Date: Wed, 19 Apr 2023 20:51:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=A6=E7=94=9F=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/dateUtil.ts | 8 + .../components/KcErrorreportIndexStuForm.vue | 150 +++++++ .../components/KcErrorreportIndexStuModal.vue | 78 ++++ src/views/site/studentJrkb/index.vue | 402 +++++++++++++----- src/views/site/utils/index.ts | 8 +- 5 files changed, 547 insertions(+), 99 deletions(-) create mode 100644 src/views/kc/kcErrorreport/components/KcErrorreportIndexStuForm.vue create mode 100644 src/views/kc/kcErrorreport/components/KcErrorreportIndexStuModal.vue diff --git a/src/utils/dateUtil.ts b/src/utils/dateUtil.ts index 933358a..fb3c1dd 100644 --- a/src/utils/dateUtil.ts +++ b/src/utils/dateUtil.ts @@ -13,6 +13,14 @@ export function formatToDateTime(date: dayjs.ConfigType | undefined = undefined, export function formatToDate(date: dayjs.ConfigType | undefined = undefined, format = DATE_FORMAT): string { return dayjs(date).format(format); } + +/** + * 格式化成小时和分钟 + * @param date + */ +export function formatToHourMinute(date: dayjs.ConfigType | undefined = undefined): string { + return dayjs(date).format('HHmm'); +} /** * 计算日期加几天 * @param date 计算的日期 diff --git a/src/views/kc/kcErrorreport/components/KcErrorreportIndexStuForm.vue b/src/views/kc/kcErrorreport/components/KcErrorreportIndexStuForm.vue new file mode 100644 index 0000000..e23a6e8 --- /dev/null +++ b/src/views/kc/kcErrorreport/components/KcErrorreportIndexStuForm.vue @@ -0,0 +1,150 @@ + + + + + diff --git a/src/views/kc/kcErrorreport/components/KcErrorreportIndexStuModal.vue b/src/views/kc/kcErrorreport/components/KcErrorreportIndexStuModal.vue new file mode 100644 index 0000000..fcce8b9 --- /dev/null +++ b/src/views/kc/kcErrorreport/components/KcErrorreportIndexStuModal.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/src/views/site/studentJrkb/index.vue b/src/views/site/studentJrkb/index.vue index 95c3cfc..1b9295d 100644 --- a/src/views/site/studentJrkb/index.vue +++ b/src/views/site/studentJrkb/index.vue @@ -1,92 +1,236 @@ \ No newline at end of file diff --git a/src/views/site/utils/index.ts b/src/views/site/utils/index.ts index 74f382a..cc79a2b 100644 --- a/src/views/site/utils/index.ts +++ b/src/views/site/utils/index.ts @@ -10,16 +10,20 @@ export const projectName = import.meta.env.VITE_GLOB_APP_TITLE; /** * 是否开启单点登录 */ -export const isOpenSSO = import.meta.env.VITE_GLOB_APP_OPEN_SSO; +export const isOpenSSO = import.meta.env.VITE_GLOB_APP_OPEN_SSO == 'true'?true:false; export const getUserId = () => { + console.log(`🚀 ~ file: index.ts:17 ~ getUserId ~ isOpenSSO:`, isOpenSSO) if(isOpenSSO){ + console.log(`🚀 ~ file: index.ts:17 ~ getUserId ~ isOpenSSO1:`, isOpenSSO) const { userInfo } = useUserStore(); //正常取用户 return userInfo?.username; }else{ + console.log(`🚀 ~ file: index.ts:17 ~ getUserId ~ isOpenSSO2:`, isOpenSSO) //固定某值 - return '2016900057'; + // return '2016900057';//教师 + return '2022010920';//学生 } }