diff --git a/electron-builder-prod.yml b/electron-builder-prod.yml index f8e0b9a..67e3c68 100644 --- a/electron-builder-prod.yml +++ b/electron-builder-prod.yml @@ -43,7 +43,7 @@ appImage: npmRebuild: false publish: provider: generic - url: https://prev.ysaix.com:7868/src/assets/smarttalk/ + url: https://prev.ysaix.com:7868/src/assets/smarttalkws/ electronDownload: mirror: https://npmmirror.com/mirrors/electron/ # 额外依赖打包到输出目录 diff --git a/electron-builder.yml b/electron-builder.yml index 4b26cd1..3f52b2f 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -42,7 +42,7 @@ appImage: npmRebuild: false publish: provider: generic - url: https://file.ysaix.com:7868/src/assets/smarttalk/ + url: https://file.ysaix.com:7868/src/assets/smarttalkws/ electronDownload: mirror: https://npmmirror.com/mirrors/electron/ # 额外依赖打包到输出目录 diff --git a/package.json b/package.json index ecf3b97..1c822d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aix-win", - "version": "2.5.0", + "version": "2.5.1", "description": "", "main": "./out/main/index.js", "author": "上海交大重庆人工智能研究院", diff --git a/src/renderer/src/api/apiService.js b/src/renderer/src/api/apiService.js index d5d1668..b030354 100644 --- a/src/renderer/src/api/apiService.js +++ b/src/renderer/src/api/apiService.js @@ -36,3 +36,18 @@ export class toLink { // 删除链接-缓存 static delLink = key => ApiService.publicHttp(`/smarttalk/toLink/${key}`, null, 'delete') } + +// v2.5加入 认证学校 +export class school { + // 学校加入 认证 + static schoolJoin = data => ApiService.publicHttp(`/smarttalk/register/schoolJoin`,data, 'post') + // 获取学校列表 + static deptTree = data => ApiService.publicHttp(`/smarttalk/register/deptTree`) + // 获取当前用户审核详情 + static registerinfo = data => ApiService.publicHttp(`/smarttalk/register/info`) + // 获取学校管理列表 + static auditlist = data => ApiService.publicHttp(`/smarttalk/audit/list`,data) + // 获取学校管理审核 + static checkSchool = data => ApiService.publicHttp(`/smarttalk/audit/checkSchool`,data,'post') + +} \ No newline at end of file diff --git a/src/renderer/src/api/login.js b/src/renderer/src/api/login.js index 16c03cf..b861345 100644 --- a/src/renderer/src/api/login.js +++ b/src/renderer/src/api/login.js @@ -105,6 +105,14 @@ export function deptTree(data) { params:data }) } +//获取学校 +export function getdeptTree(data) { + return request({ + url: '/system/user/deptTree', + method: 'get', + params:data + }) +} // 查询部门详细 export function getDept(query) { return request({ @@ -129,4 +137,21 @@ export function listEvaluation(query) { method: 'get', params: query }) -} \ No newline at end of file +} +// 发送验证码 +export function sendcode(data) { + return request({ + url: '/code/send', + method: 'post', + data + }) +} + +// 教师注册 +export function instructorregister(data) { + return request({ + url: '/instructor/register', + method: 'post', + data + }) +} diff --git a/src/renderer/src/assets/images/shenhe.png b/src/renderer/src/assets/images/shenhe.png new file mode 100644 index 0000000..38e227f Binary files /dev/null and b/src/renderer/src/assets/images/shenhe.png differ diff --git a/src/renderer/src/layout/components/Aside.vue b/src/renderer/src/layout/components/Aside.vue index 3fb8a8b..39c4d69 100644 --- a/src/renderer/src/layout/components/Aside.vue +++ b/src/renderer/src/layout/components/Aside.vue @@ -10,14 +10,16 @@
-
+ +
+ + + 已交( + + {{ item.workdataresultcount }} + {{ item.workdataresultcount }} + /{{ item.workdataresultsum }} + + ) + +
+ +
+ + + 已批阅({{ item.teacherrationgcount}}) + +
+ + +
+ {{ item.workdataresultsum }} + 练习次数 +
+ +
+ {{ item.teacherrationgcount?item.workdataresultsum - item.teacherrationgcount:item.workdataresultsum }} + 引用次数 +
+
- {{ item.workdataresultcount }} - {{ item.workdataresultcount }} - /{{ item.workdatacount }} - 已交 -
-
- - {{ item.teacherrationgcount?item.workdatacount - item.teacherrationgcount:item.workdatacount }} - 待批阅 -
-
- - - {{ item.averagetime }}分钟 平均用时 @@ -97,6 +106,11 @@ const props = defineProps({ } } } + .class-reserv-item-progress { + width: 200px; + padding: 0 10px; + font-size: 14px; + } .class-reserv-item-tool { margin-left: 10px; display: flex; diff --git a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue index 3252c0f..30f368b 100644 --- a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue +++ b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue @@ -89,8 +89,8 @@ -
- +
+ +
    +
  • +
    + +
    +
    + {{ index +1 }}. + +
    +
    + +
    {{ item.entpname }} {{ item.editusername }}
    +
    {{ item.worktag }}
    +
    +
    +
    +
    + 添加 +
    + +
  • +
+

加载中...

+

无更多试题...

+
+ +
+ 待批改 + {{ item.worktype }}
{{ item.classcaption }} | 截止时间:{{ item.deaddate }}
@@ -52,9 +53,10 @@ const getHomework = async () => { const { edustage, edusubject } = user try { const { rows } = await homeworklist({ edituserid: user.userId, edustage, edusubject, deaddate: getTomorrow(), status: '1', orderby: 'deaddate DESC', pageSize: 500 }) - // 只展示进行中的 - homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate) // 当前日期的时分与截止日期进行判断 - // homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getTomorrow() <= item.deaddate) //大于今天的才算进行中 弃用 + // 只展示待批改的 + //homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate) // 当前日期的时分与截止日期进行判断 + // homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getTomorrow() <= item.deaddate) //大于今天的才算待批改 弃用 + homeworkList.value = rows || []; homeworkList.value.forEach((item) => { // 处理任务类型的UI if (item.worktype == '学习目标定位') { @@ -102,7 +104,8 @@ const onClickItem = (item) => { } const tagType = (time) => { - return getCurrentTime('YYYY-MM-DD HH:mm') > time ? 'info' : 'warning' + return 'warning'; + // return getCurrentTime('YYYY-MM-DD HH:mm') > time ? 'info' : 'warning' } diff --git a/src/renderer/src/views/joinSchool/index.vue b/src/renderer/src/views/joinSchool/index.vue new file mode 100644 index 0000000..69af3aa --- /dev/null +++ b/src/renderer/src/views/joinSchool/index.vue @@ -0,0 +1,195 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/views/login/index.vue b/src/renderer/src/views/login/index.vue index b883d6d..ed5bdc6 100644 --- a/src/renderer/src/views/login/index.vue +++ b/src/renderer/src/views/login/index.vue @@ -6,7 +6,7 @@ -
+
+
+ +
+ + +
@@ -52,6 +73,7 @@ import WindowTools from '@/components/window-tools/index.vue' import SelectSubject from '@/components/select-subject/index.vue' import Register from './components/Register.vue' import { sessionStore } from '@/utils/store' +import {sendcode,instructorregister} from '@/api/login' const { session } = require('@electron/remote') const downloadProp = ref(0) @@ -62,17 +84,25 @@ const userStore = useUserStore() const btnLoading = ref(false) const isSubject = ref(false) const RegModel = ref(false) +const isRegister = ref(true) +const ruleFormRef = ref(null) +const codeName=ref('发送验证码') +const timer=ref(null) //表单 const loginForm = reactive({ username: '', password: '', rememberMe: false }) - +// 注册表单 +const ruleForm = reactive({ + +}) //表单规则 const rules = reactive({ username: [{ required: true, trigger: 'blur', message: '请输入您的账号' }], - password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }] + password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }], + smsCode: [{ required: true, trigger: 'blur', message: '请输入您的验证码' }], }) let curWinUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH @@ -81,6 +111,43 @@ ipcRenderer.on('update-app-progress', (e, prop) => { downloadProp.value = prop showDownLoading.value = prop !== 100 }) +const gotoreRegister=()=>{ + codeName.value='发送验证码' + if(timer.value){ + clearInterval(timer.value); + } + isRegister.value=false +} +// 发送验证码 +const sendyzm=()=>{ + if(ruleForm.username){ + const pattern = /^1[3-9]\d{9}$/; + if( pattern.test(ruleForm.username) ){ + sendcode({username:ruleForm.username, source: '4'}).then(res=>{ + if(res.code==200){ + ElMessage.success('消息发送成功') + codeName.value=60 + timer.value=setInterval(()=>{ + codeName.value-- + if(codeName.value==0){ + codeName.value='发送验证码' + clearInterval(timer.value); + } + },1000) + }else{ + ElMessage.error(res.msg) + } + }) + }else{ + ElMessage.error('请输入正确的手机号码') + } + // captchaImg({mobile:ruleForm.phoneNumber}).then(res=>{ + // console.log('res->', res) + // }) + }else{ + ElMessage.error('请输入手机号码') + } +} // 打开弹窗 const RegisterModel = type => { RegModel.value.OpenModel(type) @@ -148,7 +215,31 @@ const setCookie = (name, value) => { } return session.defaultSession.cookies.set(cookie) } - +const gotoLogin = () => { + codeName.value='发送验证码' + if (ruleFormRef.value) ruleFormRef.value.resetFields() + isRegister.value = true +} +// 注册 +const RegisterForm = async (formEl) => { + if (!formEl) return + await formEl.validate((valid, fields) => { + if (valid) { + instructorregister(ruleForm).then(res=>{ + if(res.code==200){ + ElMessage.success('您已注册成功') + if (ruleFormRef.value) ruleFormRef.value.resetFields() + gotoLogin() + }else{ + ElMessage.error(res.msg) + } + }) + console.log('submit!') + } else { + console.log('error submit!', fields) + } + }) +} onMounted(() => { localStorage.clear() sessionStore.set('subject', { diff --git a/src/renderer/src/views/schoolCertification/index.vue b/src/renderer/src/views/schoolCertification/index.vue new file mode 100644 index 0000000..36c7048 --- /dev/null +++ b/src/renderer/src/views/schoolCertification/index.vue @@ -0,0 +1,209 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/views/schoolManagement/index.vue b/src/renderer/src/views/schoolManagement/index.vue new file mode 100644 index 0000000..9dbcdc1 --- /dev/null +++ b/src/renderer/src/views/schoolManagement/index.vue @@ -0,0 +1,197 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/views/tool/createHomework.js b/src/renderer/src/views/tool/createHomework.js index dc1a8cf..5d64850 100644 --- a/src/renderer/src/views/tool/createHomework.js +++ b/src/renderer/src/views/tool/createHomework.js @@ -43,6 +43,16 @@ export const createHomework = ({ uniquekey, evalid, data, entpcourseid }) => { let classWorkList = [] +// 将标签中的双引号增加转义 +const escapeHtmlQuotes = (str) => { + // 后端已replace双引号, 故前端不用在处理 + const regex1 = /\\+/g; // 匹配多个反斜杠 + let result = str.replace(regex1, '\\'); + result = str.replace(/(?'); //替换\n而不替换\\n 为 \\n + + return result; +} + /** * 获取班级作业 */ @@ -52,8 +62,8 @@ export const getClassWorkList = async (id) => { /** * 2024-10-17 由于 后面截止时间加了 时分,特加判断 - * 1、进行中、以前是以明天判断。现改为传当天的日期,并根据当前日期的时分与截止日期进行判断, - * 2、已结束、以前默认是以明天判断。现依然以明天为判断,并根据当前日期时分大于截止日期时分判断。 + * 1、待批改、以前是以明天判断。现改为传当天的日期,并根据当前日期的时分与截止日期进行判断, + * 2、已批改、以前默认是以明天判断。现依然以明天为判断,并根据当前日期时分大于截止日期时分判断。 */ let list = response.rows