Compare commits

..

1 Commits
main ... zdg

Author SHA1 Message Date
zdg 6935bec1e4 测试 2024-09-21 12:05:46 +08:00
19 changed files with 97 additions and 264 deletions

19
.env.lt
View File

@ -1,19 +0,0 @@
# 页面标题
VITE_APP_TITLE = 文枢课堂
# 生产环境配置
VITE_APP_ENV = 'production'
# AIx融合数字管理系统/生产环境
VITE_APP_BASE_API = 'https://prev.ysaix.com:7868/prod-api'
VITE_APP_DOMAIN = 'prev.ysaix.com'
VITE_APP_UPLOAD_API = 'https://prev.ysaix.com:7868/prod-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip
VITE_APP_RES_FILE_PATH = 'https://prev.ysaix.com:7868/src/assets/textbook/booktxt/'
VITE_APP_BUILD_BASE_PATH = 'https://prev.ysaix.com:7868/'

View File

@ -1,5 +1,5 @@
# 页面标题 # 页面标题
VITE_APP_TITLE = AIX智慧课堂 VITE_APP_TITLE = AIx数字平台
# 生产环境配置 # 生产环境配置
VITE_APP_ENV = 'production' VITE_APP_ENV = 'production'

View File

@ -1,54 +0,0 @@
appId: com.electron.app
productName: 文枢课堂
directories:
output: dist
buildResources: build
win:
executableName: 文枢课堂
icon: resources/logo2.ico
files:
- '!**/.vscode/*'
- '!src/*'
- '!electron.vite.config.{js,ts,mjs,cjs}'
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
asarUnpack:
- resources/**
nsis:
oneClick: false
allowToChangeInstallationDirectory: true
artifactName: ${name}-${version}-setup.${ext}
shortcutName: ${productName}
uninstallDisplayName: ${productName}
createDesktopShortcut: always
mac:
entitlementsInherit: build/entitlements.mac.plist
extendInfo:
- NSCameraUsageDescription: Application requests access to the device's camera.
- NSMicrophoneUsageDescription: Application requests access to the device's microphone.
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
notarize: false
dmg:
artifactName: ${name}-${version}.${ext}
linux:
target:
- AppImage
- snap
- deb
maintainer: electronjs.org
category: Utility
appImage:
artifactName: ${name}-${version}.${ext}
npmRebuild: false
publish:
provider: generic
url: https://prev.ysaix.com:7868/src/assets/smarttalk/
electronDownload:
mirror: https://npmmirror.com/mirrors/electron/
# 额外依赖打包到输出目录
extraFiles:
- from: ./node_modules/im_electron_sdk/lib/
to: ./resources
filter:
- '**/*'

View File

@ -3,14 +3,7 @@ import path from 'path'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite' import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
import WindiCSS from "vite-plugin-windicss" import WindiCSS from "vite-plugin-windicss"
/*import electron from 'vite-plugin-electron'
plugins: [electron({
main: {
builderOptions: {
asar: false
}
}
})],*/
export default defineConfig({ export default defineConfig({
main: { main: {
plugins: [externalizeDepsPlugin()] plugins: [externalizeDepsPlugin()]

View File

@ -1,7 +1,7 @@
{ {
"name": "aix-win", "name": "aix-win",
"version": "2.0.6", "version": "2.0.2",
"description": "", "description": "An Electron application with Vue",
"main": "./out/main/index.js", "main": "./out/main/index.js",
"author": "example.com", "author": "example.com",
"homepage": "https://electron-vite.org", "homepage": "https://electron-vite.org",
@ -16,7 +16,6 @@
"build:dev": "npm run build && electron-builder --win --config ./electron-builder-test.yml", "build:dev": "npm run build && electron-builder --win --config ./electron-builder-test.yml",
"build:test": "electron-vite build --mode test && electron-builder --win --config ./electron-builder.yml", "build:test": "electron-vite build --mode test && electron-builder --win --config ./electron-builder.yml",
"build:prod": "electron-vite build --mode production && electron-builder --win --config ./electron-builder-prod.yml", "build:prod": "electron-vite build --mode production && electron-builder --win --config ./electron-builder-prod.yml",
"build:lt": "electron-vite build --mode lt && electron-builder --win --config ./electron-builder-lt.yml",
"build:mac": "npm run build && electron-builder --mac", "build:mac": "npm run build && electron-builder --mac",
"build:linux": "npm run build && electron-builder --linux" "build:linux": "npm run build && electron-builder --linux"
}, },
@ -46,12 +45,10 @@
"jsencrypt": "^3.3.2", "jsencrypt": "^3.3.2",
"jsondiffpatch": "0.6.0", "jsondiffpatch": "0.6.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"node-addon-api": "^8.1.0",
"pdfjs-dist": "4.4.168", "pdfjs-dist": "4.4.168",
"pinia": "^2.1.7", "pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.1", "pinia-plugin-persistedstate": "^3.2.1",
"spark-md5": "^3.0.2", "spark-md5": "^3.0.2",
"vite-plugin-electron": "^0.28.8",
"vue-qr": "^4.0.9", "vue-qr": "^4.0.9",
"vue-router": "^4.4.0", "vue-router": "^4.4.0",
"xgplayer": "^3.0.19", "xgplayer": "^3.0.19",

View File

@ -21,27 +21,6 @@ File({ app, shell, BrowserWindow, ipcMain })
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true' process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'
let mainWindow, loginWindow let mainWindow, loginWindow
const additionalData = {myKey:'ys_axi_smarttalk'}
const gotTheLock = app.requestSingleInstanceLock(additionalData)
if(!gotTheLock){
app.quit()
}else{
app.on('second-instance',(event,commandLine,workingDirectory,additionalData)=>{
//输入从第二个实例中接收到的数据
console.log(additionalData)
//有人试图运行第二个实例,我们应该关注我们的窗口
if(mainWindow){
if(mainWindow.isMinimized()) mainWindow.restore()
mainWindow.focus()
}
if(loginWindow){
if(loginWindow.isMinimized()) loginWindow.restore()
loginWindow.focus()
}
})
}
//登录窗口 //登录窗口
function createLoginWindow() { function createLoginWindow() {
if (loginWindow) return if (loginWindow) return
@ -74,7 +53,7 @@ function createLoginWindow() {
updateInit(loginWindow) updateInit(loginWindow)
} }
// loginWindow.webContents.openDevTools() loginWindow.webContents.openDevTools()
loginWindow.once('ready-to-show', () => { loginWindow.once('ready-to-show', () => {
loginWindow.show() loginWindow.show()
}) })
@ -122,7 +101,7 @@ function createMainWindow() {
shell.openExternal(details.url) shell.openExternal(details.url)
return { action: 'deny' } return { action: 'deny' }
}) })
// mainWindow.webContents.openDevTools() mainWindow.webContents.openDevTools()
if (is.dev && process.env['ELECTRON_RENDERER_URL']) { if (is.dev && process.env['ELECTRON_RENDERER_URL']) {
mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL']) mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL'])

View File

@ -109,20 +109,6 @@ const emitChangeBook = async () => {
}, },
node: curData node: curData
} }
/**
* 临时用 后续删除 unitId
*/
let levelFirstId = null
let levelSecondId = null
let bookeId = curBook.data.id
if (curData.parentNode) {
levelFirstId = curData.parentNode.id
levelSecondId = curData.id
} else {
levelFirstId = curData.id
levelSecondId = ''
}
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId, bookeId}))
emit('changeBook', data) emit('changeBook', data)
} }
@ -201,22 +187,6 @@ const handleNodeClick = (data, node) => {
} }
localStorage.setItem('defaultExpandedKeys', parentNode ? JSON.stringify([parentNode.id]) : JSON.stringify([data.id])) localStorage.setItem('defaultExpandedKeys', parentNode ? JSON.stringify([parentNode.id]) : JSON.stringify([data.id]))
localStorage.setItem('curNode', JSON.stringify(nodeData)) localStorage.setItem('curNode', JSON.stringify(nodeData))
/**
* 临时用 后续删除 unitId
*/
let levelFirstId = null
let levelSecondId = null
let bookeId = curBook.data.id
if (nodeData.parentNode) {
levelFirstId = nodeData.parentNode.id
levelSecondId = nodeData.id
} else {
levelFirstId = nodeData.id
levelSecondId = ''
}
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId, bookeId}))
emit('nodeClick', curData) emit('nodeClick', curData)
} }

View File

@ -102,9 +102,8 @@ const getTreeData = () => {
levelFirstId = curNode.id levelFirstId = curNode.id
levelSecondId = '' levelSecondId = ''
} }
let bookeId = curBookId
// 头部 教材分析、作业设计打开外部链接需要当前章节ID // 头部 教材分析、作业设计打开外部链接需要当前章节ID
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId, bookeId})) localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId}))
// const data = { // const data = {
// textBook: { // textBook: {

View File

@ -3,7 +3,7 @@
<div class="left-section"> <div class="left-section">
<div class="flex title-box"> <div class="flex title-box">
<el-image style="width: 23px; height: 23px" :src="logoIco" /> <el-image style="width: 23px; height: 23px" :src="logoIco" />
<span class="title" @click="changeTab">{{homeTitle}}</span> <span class="title" @click="changeTab">AIX智慧课堂</span>
</div> </div>
<div class="change-tab"> <div class="change-tab">
<ul class="flex"> <ul class="flex">
@ -37,7 +37,7 @@
<div class="user-info flex"> <div class="user-info flex">
<span class="user-name">{{ userStore.user.nickName }}</span> <span class="user-name">{{ userStore.user.nickName }}</span>
<div class="flex"> <div class="flex">
<el-dropdown @command="changeSubject"> <el-dropdown @command="changeSubject">
<div class="user-subject">{{ userStore.user.edusubject }} <div class="user-subject">{{ userStore.user.edusubject }}
<el-icon class="el-icon--right"><arrow-down /> <el-icon class="el-icon--right"><arrow-down />
@ -74,7 +74,7 @@ import outLink from '@/utils/linkConfig'
import logoIco from '@/assets/images/logo.png' import logoIco from '@/assets/images/logo.png'
import { listEvaluation } from '@/api/classManage/index' import { listEvaluation } from '@/api/classManage/index'
import { clearBookInfo } from '@/utils/ruoyi' import { clearBookInfo } from '@/utils/ruoyi'
let homeTitle = ref(import.meta.env.VITE_APP_TITLE)
const { ipcRenderer } = window.electron || {} const { ipcRenderer } = window.electron || {}
const userStore = useUserStore() const userStore = useUserStore()
const router = useRouter() const router = useRouter()

View File

@ -1,10 +1,10 @@
<template> <template>
<el-card style="width: 100%;height: 100%;overflow: auto"> <el-card style="width: 100%;height: 100%;overflow: auto">
<template #header> <!-- <template #header>-->
<div class="card-header" style="text-align: left"> <!-- <div class="card-header" style="text-align: left">-->
<el-button type="primary" @click="addGroup">新建分组</el-button> <!-- <el-button type="primary" @click="addGroup">新建分组</el-button>-->
</div> <!-- </div>-->
</template> <!-- </template>-->
<template v-if="groupList.length > 0"> <template v-if="groupList.length > 0">
<div style="font-size: 16px;font-weight: bold;color: #000;text-align: left;margin-bottom: 5px">可用分组</div> <div style="font-size: 16px;font-weight: bold;color: #000;text-align: left;margin-bottom: 5px">可用分组</div>
<div class="groupList"> <div class="groupList">

View File

@ -186,8 +186,7 @@
]) ])
// //
const classids = ref('') const classids = ref('')
//
const classesNotAMemberOf = ref([])
// //
const getClassInfo = () => { const getClassInfo = () => {
classList.value = [] classList.value = []
@ -200,13 +199,13 @@
}); });
listClassmain({entpid: userStore.deptId, status: 'open', pageSize: 100}).then(response => { listClassmain({entpid: userStore.deptId, status: 'open', pageSize: 100}).then(response => {
// //
classesNotAMemberOf.value = [...response.rows] let arr = [...response.rows]
classList.value.forEach(item => { classList.value.forEach(item => {
const currentIndex = classesNotAMemberOf.value.findIndex(items => items.id === item.id) const currentIndex = arr.findIndex(items => items.id === item.id)
if(currentIndex) classesNotAMemberOf.value.splice(currentIndex, 1) if(currentIndex) arr.splice(currentIndex, 1)
}) })
// //
gradeTree.value = groupByCondition(classesNotAMemberOf.value, item => item.agekey); gradeTree.value = groupByCondition(arr, item => item.agekey);
}) })
} }
// //
@ -302,7 +301,7 @@
addClasses({classIds:classids.value.join(','),userId:userStore.userId}).then(res => { addClasses({classIds:classids.value.join(','),userId:userStore.userId}).then(res => {
if (res.code === 200) { if (res.code === 200) {
dialogVisible.value = false dialogVisible.value = false
ElMessage({x ElMessage({
message: res.msg, message: res.msg,
type: 'success', type: 'success',
}) })

View File

@ -168,11 +168,10 @@ const clickMenu = ({isOuter, path, disabled}) =>{
let fullPath = configObj.fullPath + path let fullPath = configObj.fullPath + path
if(path == '/teaching/classtaskassign?titleName=作业布置&openDialog=newClassTask' || path == '/teaching/classtaskassign?titleName=作业布置'){ if(path == '/teaching/classtaskassign?titleName=作业布置&openDialog=newClassTask' || path == '/teaching/classtaskassign?titleName=作业布置'){
// ID // ID
const { levelFirstId, levelSecondId, bookeId } = JSON.parse(localStorage.getItem('unitId')) const { levelFirstId, levelSecondId } = JSON.parse(localStorage.getItem('unitId'))
let unitId = levelSecondId ? levelSecondId : levelFirstId let unitId = levelSecondId ? levelSecondId : levelFirstId
fullPath = fullPath + `&unitId=${unitId}`
fullPath = fullPath + `&unitId=${unitId}&bookeId=${bookeId}`
console.log(fullPath) console.log(fullPath)
} }

View File

@ -7,7 +7,7 @@
:before-close="handleClose" :before-close="handleClose"
> >
<el-steps v-if="type==1" style="max-width: 100%;-webkit-app-region: no-drag;height:35px" :active="activeIndex" finish-status="success" simple> <el-steps v-if="type==1" style="max-width: 100%;-webkit-app-region: no-drag;height:35px" :active="activeIndex" finish-status="success" simple>
<el-step title="1.基本信息" @click="activeIndex=1" style="cursor:pointer"/> <el-step title="1.基本信息" @click="activeIndex=1" />
<el-step title="2.在校信息" /> <el-step title="2.在校信息" />
</el-steps> </el-steps>
<el-form <el-form
@ -37,14 +37,12 @@
<el-form-item label="确认密码" prop="confirmPassword" v-if="activeIndex==1"> <el-form-item label="确认密码" prop="confirmPassword" v-if="activeIndex==1">
<el-input v-model="ruleForm.confirmPassword" type="password" placeholder="请确认密码" /> <el-input v-model="ruleForm.confirmPassword" type="password" placeholder="请确认密码" />
</el-form-item> </el-form-item>
<el-form-item label="所属地区" prop="address" v-if="activeIndex==2"> <el-form-item label="所属地区" prop="address" v-if="activeIndex==2">
<el-cascader <el-cascader
style="width:100%" style="width:100%"
popper-class="aix-regist-address"
v-model="ruleForm.address" v-model="ruleForm.address"
:options="regionData" :options="regionData"
@change="handleChange" @change="handleChange"
:props="{checkStrictly: true}"
/> />
</el-form-item> </el-form-item>
<el-form-item label="学校" prop="school" v-if="activeIndex==2"> <el-form-item label="学校" prop="school" v-if="activeIndex==2">
@ -62,7 +60,7 @@
<el-form-item label="学科" prop="discipline" v-if="activeIndex==2"> <el-form-item label="学科" prop="discipline" v-if="activeIndex==2">
<div v-for="item in schoolSubject" style="display: flex;"> <div v-for="item in schoolSubject" style="display: flex;">
<span style="width:50px">{{ item.name }}</span> <span style="width:50px">{{ item.name }}</span>
<el-checkbox-group style="width:100%" v-model="ruleForm.discipline"> <el-checkbox-group style="width:100%" v-model="ruleForm.discipline">
<el-checkbox style="margin-right:10px" v-for="el in item.children" :key="el.id" :label="el.itemtitle" :value="el" /> <el-checkbox style="margin-right:10px" v-for="el in item.children" :key="el.id" :label="el.itemtitle" :value="el" />
</el-checkbox-group> </el-checkbox-group>
</div> </div>
@ -74,7 +72,6 @@
</el-form-item> </el-form-item>
<el-form-item v-if="activeIndex==2"> <el-form-item v-if="activeIndex==2">
<div class="centerDiv"> <div class="centerDiv">
<el-button type="default" @click="activeIndex=1">上一步</el-button>
<el-button type="primary" @click="submitForm(ruleFormRef)">立即注册</el-button> <el-button type="primary" @click="submitForm(ruleFormRef)">立即注册</el-button>
</div> </div>
</el-form-item> </el-form-item>
@ -107,7 +104,7 @@
</template> --> </template> -->
</el-dialog> </el-dialog>
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
@ -214,12 +211,18 @@ const rules = reactive({
message: '请选择地址', message: '请选择地址',
trigger: 'change', trigger: 'change',
},], },],
class:[ {
type:'array',
required: true,
message: '请选择班级',
trigger: 'change',
},],
discipline:[ { discipline:[ {
type: 'array', type: 'array',
required: true, required: true,
message: '请选择学科', message: '请选择学科',
trigger: 'change', trigger: 'change',
},] },]
}) })
const dialogVisible = ref(false) const dialogVisible = ref(false)
@ -297,6 +300,7 @@ const nextStep = (formEl) => {
} }
}) })
getSubject() getSubject()
console.log(res)
}) })
console.log('submit!') console.log('submit!')
} }
@ -310,8 +314,7 @@ const getSubject = async ()=>{
const rows= await listEvaluation({ itemkey: "subject", pageSize: 500 }) const rows= await listEvaluation({ itemkey: "subject", pageSize: 500 })
console.log(rows,'所有学科') console.log(rows,'所有学科')
allSubjectList.value = rows.data allSubjectList.value = rows.data
accessToDisciplines()
getClassmain()
} }
const submitForm = async (formEl) => { const submitForm = async (formEl) => {
@ -412,53 +415,46 @@ const sbmitImg=()=>{
ruleForm.Code=res.data ruleForm.Code=res.data
isImg.value=false isImg.value=false
} }
}) })
}else{ }else{
ElMessage.error('请根据图片输入验证码') ElMessage.error('请根据图片输入验证码')
} }
// //
} }
const handleChange = (value) => { const handleChange = (value) => {
console.log('选中的地址值:', value); console.log('选中的地址值:', value);
}; };
const handleSchoolChange= ()=>{ const handleSchoolChange= async ()=>{
ruleForm.discipline=[]; ruleForm.discipline=[];
ruleForm.class=[]; ruleForm.class=[];
//
accessToDisciplines()
getClassmain()
}
//
const accessToDisciplines = () => {
getDept({deptId:ruleForm.school[2]}).then(res =>{ getDept({deptId:ruleForm.school[2]}).then(res =>{
if(res.data.studying && res.data.studying.length){ if(res.data.studying && res.data.studying.length){
let studying = res.data.studying.split(',') let studying = res.data.studying.split(',')
let ary = [] let ary = []
studying.forEach(item =>{ studying.forEach(item =>{
let obj = { let obj = {
name: item, name: item,
children: [] children: []
}
allSubjectList.value.forEach(el =>{
if(item == el.edustage){
obj.children.push(el)
} }
allSubjectList.value.forEach(el =>{
if(item == el.edustage){
obj.children.push(el)
}
})
ary.push(obj)
}) })
ary.push(obj) schoolSubject.value = ary
}) }
schoolSubject.value = ary else{
} schoolSubject.value = []
else{ }
schoolSubject.value = [] })
} listClassmain( {entpid: ruleForm.school[2], pageSize: 500, status: 'open'}).then(res=>{
gradeTree.value = groupByCondition(res.rows, item => item.agekey);
console.log(gradeTree.value,'班级')
}) })
}
//
const getClassmain = async ()=>{
console.log(ruleForm.school)
const res = await listClassmain( {entpid: ruleForm.school[2], pageSize: 500, status: 'open'})
gradeTree.value = groupByCondition(res.rows, item => item.agekey);
} }
// //
const groupByCondition = (arr, condition)=>{ const groupByCondition = (arr, condition)=>{
@ -494,11 +490,8 @@ const gradeName = (key) =>{
} }
} }
onMounted(()=>{ onMounted(()=>{
//
ruleForm.address = ['50'] })
//
ruleForm.school = [100,255,279]
})
defineExpose({ defineExpose({
OpenModel, OpenModel,
}) })
@ -511,17 +504,4 @@ defineExpose({
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
</style>
<style lang="scss">
.aix-regist-address{
.el-cascader-node{
position: relative!important;
.el-radio{
position: absolute!important;
width: 90%!important;
left:5px!important;
}
}
}
</style> </style>

View File

@ -2,7 +2,7 @@
<div class="login-container"> <div class="login-container">
<div class="box-item desc"> <div class="box-item desc">
<div class="welcome"> <div class="welcome">
<p>欢迎登录 {{homeTitle}}</p> <p>欢迎登录 AIX智慧课堂</p>
</div> </div>
<img class="welcome-img" :src="leftBg2" /> <img class="welcome-img" :src="leftBg2" />
</div> </div>
@ -25,7 +25,7 @@
<el-checkbox v-model="loginForm.rememberMe" >记住密码</el-checkbox> <el-checkbox v-model="loginForm.rememberMe" >记住密码</el-checkbox>
<!-- <el-checkbox >阅读并同意xxx</el-checkbox> --> <!-- <el-checkbox >阅读并同意xxx</el-checkbox> -->
</div> </div>
<el-form-item> <el-form-item>
<el-button :loading="btnLoading" class="btn" type="primary" @click="submitForm(formRef)" <el-button :loading="btnLoading" class="btn" type="primary" @click="submitForm(formRef)"
>登录</el-button >登录</el-button
@ -93,7 +93,6 @@ const rules = reactive({
}) })
let curWinUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH let curWinUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
let homeTitle = ref(import.meta.env.VITE_APP_TITLE)
ipcRenderer.on('update-app-progress', (e, prop) => { ipcRenderer.on('update-app-progress', (e, prop) => {
downloadProp.value = prop downloadProp.value = prop
showDownLoading.value = prop !== 100 showDownLoading.value = prop !== 100

View File

@ -108,12 +108,6 @@ export default {
name: 'FileListItem', name: 'FileListItem',
components: { FileImage }, components: { FileImage },
props: { props: {
curNode: {
type: Object,
default: function () {
return {}
}
},
item: { item: {
type: Object, type: Object,
default: function () { default: function () {
@ -207,9 +201,8 @@ export default {
}, },
openFileWin(items) { openFileWin(items) {
if (items.fileFlag === 'apt') { if (items.fileFlag === 'apt') {
console.log(this.curNode); console.log(items);
let curBook = JSON.parse(localStorage.getItem('curBook')) const path="/teaching/aptindex?id="+items.fileId
const path="/teaching/aptindex?id="+items.fileId + "&unitId=" + this.curNode.id + "&bookId=" + curBook.id;
let configObj = outLink().getBaseData() let configObj = outLink().getBaseData()
let fullPath = configObj.fullPath + path let fullPath = configObj.fullPath + path
fullPath = fullPath.replaceAll('//', '/') fullPath = fullPath.replaceAll('//', '/')

View File

@ -20,7 +20,6 @@
:key="index" :key="index"
:item="item" :item="item"
:index="index" :index="index"
:curNode="currentNode"
@on-delete="deleteTalk" @on-delete="deleteTalk"
@on-start-class="startClass" @on-start-class="startClass"
> >
@ -116,13 +115,13 @@
</el-checkbox-group> </el-checkbox-group>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="作业" name="作业"> <el-tab-pane label="作业" name="作业">
<!-- <div class="prepare-body-header"> <div class="prepare-body-header">
<div> <div>
<label style="font-size: 15px">{{ currentWorkList.length }}个作业</label>&nbsp; <label style="font-size: 15px">{{ currentWorkList.length }}个作业</label>&nbsp;
<el-button size="small" @click="handleOutLink('feedback')">作业反馈</el-button> <el-button size="small" @click="handleOutLink('feedback')">作业反馈</el-button>
<el-button size="small" @click="handleOutLink('homeWork')">布置作业</el-button> <el-button size="small" @click="handleOutLink('homeWork')">布置作业</el-button>
</div> </div>
</div>--> </div>
<div class="prepare-work-wrap"> <div class="prepare-work-wrap">
<file-list-item <file-list-item
v-for="(item, index) in currentWorkList" v-for="(item, index) in currentWorkList"

View File

@ -30,9 +30,9 @@
<li class="list-group-item"> <li class="list-group-item">
<div class="left-align"> <div class="left-align">
<Message class="Message"/> <Message class="Message"/>
<span>身份证号</span> <span>用户邮箱</span>
</div> </div>
<div class="right-align">{{ state.user.identity }}</div> <div class="right-align">{{ state.user.email }}</div>
</li> </li>
<li class="list-group-item"> <li class="list-group-item">
<div class="left-align"> <div class="left-align">
@ -48,7 +48,7 @@
<Avatar class="Avatar"/> <Avatar class="Avatar"/>
<span>所属角色</span> <span>所属角色</span>
</div> </div>
<div class="right-align">{{ state.roleGroup || '教师' }}</div> <div class="right-align">{{ state.roleGroup }}</div>
</li> </li>
<li class="list-group-item"> <li class="list-group-item">
<div class="left-align"> <div class="left-align">

View File

@ -6,10 +6,10 @@
<el-form-item label="手机号码" prop="phonenumber"> <el-form-item label="手机号码" prop="phonenumber">
<el-input v-model="user.phonenumber" maxlength="11" /> <el-input v-model="user.phonenumber" maxlength="11" />
</el-form-item> </el-form-item>
<el-form-item label="身份证号" prop="identity"> <el-form-item label="邮箱" prop="email">
<el-input v-model="user.identity" maxlength="50" /> <el-input v-model="user.email" maxlength="50" />
</el-form-item> </el-form-item>
<el-form-item label="性别" style="display: none"> <el-form-item label="性别">
<el-radio-group v-model="user.sex"> <el-radio-group v-model="user.sex">
<el-radio value="0"></el-radio> <el-radio value="0"></el-radio>
<el-radio value="1"></el-radio> <el-radio value="1"></el-radio>
@ -18,8 +18,8 @@
<el-form-item label="学段"> <el-form-item label="学段">
<el-radio-group v-model="user.edustage" @change="semeterChange"> <el-radio-group v-model="user.edustage" @change="semeterChange">
<template v-for="(item,index) in semesterList" :key="index"> <template v-for="(item,index) in semesterList" :key="index">
<el-radio :value="item.label"> <el-radio :value="item.title">
{{item.label }} {{item.title }}
</el-radio> </el-radio>
</template> </template>
</el-radio-group> </el-radio-group>
@ -42,7 +42,6 @@
<script setup> <script setup>
import { ref, getCurrentInstance,onMounted } from 'vue' import { ref, getCurrentInstance,onMounted } from 'vue'
import {updateUserInfo } from '@/api/system/user' import {updateUserInfo } from '@/api/system/user'
import {getDept } from '@/api/login'
import { listEvaluation } from '@/api/subject/index' import { listEvaluation } from '@/api/subject/index'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import {ElMessage} from 'element-plus' import {ElMessage} from 'element-plus'
@ -61,30 +60,21 @@ const userStore = useUserStore()
const semesterList = ref([ const semesterList = ref([
{ {
id:1, id:1,
label:'幼儿园' title:'幼儿园'
}, },
{ {
id:2, id:2,
label:'小学' title:'小学'
}, },
{ {
id:3, id:3,
label:'初中' title:'初中'
}, },
{ {
id:4, id:4,
label:'高中' title:'高中'
}, },
]) ])
//
const getTheSection = () => {
getDept({deptId:userStore.user.deptId}).then(res => {
//
const arr = res.data.studying.split(',')
semesterList.value = semesterList.value.filter(items => {return arr.includes(items.label)}).map(item => item)
})
}
const rules = ref({ const rules = ref({
nickName: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }], nickName: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
@ -169,6 +159,5 @@ const semeterChange = (item) => {
} }
onMounted(() => { onMounted(() => {
getSubject() getSubject()
getTheSection()
}) })
</script> </script>

View File

@ -1,9 +1,15 @@
<template> <template>
<canvas ref="canvasRef" /> <canvas ref="canvasRef" style="pointer-events: none;" />
<button @click="eraseTo">橡皮擦 <div style="position: absolute;top: 0;" @click="test('click')"
<i class="iconfont icon-xiangpica"></i> @mouseenter="test('mouseenter')" @mousemove="test('mousemove')" @mouseleave="test('mouseleave')"
</button> @touchstart="test('touchstart')" @touchmove="test('touchmove')" @touchend="test('touchend')"
<button @click="close">销毁</button> @touchcancel="test('touchcancel')" @mousedown="test('mousedown')" @mouseup="test('mouseup')"
@mouseout="test('mouseout')" @mouseover="test('mouseover')" @mousewheel="test('mousewheel')">
<!-- <button @click="eraseTo">橡皮擦</button> -->
<!-- <i class="iconfont icon-xiangpica"></i> -->
<!-- <button @click="close">销毁</button> -->
<div style="width: 100px;height: 100px;background: #ffbcbc;">小星星</div>
</div>
</template> </template>
<script setup> <script setup>
@ -43,6 +49,10 @@ const eraseTo = () => { // 橡皮擦
// canvas.dispose() // canvas.dispose()
} }
const close = () => { FabricVue.removeCanvas() } const close = () => { FabricVue.removeCanvas() }
const test = (key, e) => {
console.log('event: ', key)
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>