Compare commits
10 Commits
a64ba24742
...
d5afede36c
Author | SHA1 | Date |
---|---|---|
yangws | d5afede36c | |
朱浩 | 03e61c8440 | |
朱浩 | 79b9a0726a | |
朱浩 | 0ccde18f00 | |
朱浩 | 274c80ad0a | |
yangws | 923006eab1 | |
朱浩 | 622cdfe0fe | |
朱浩 | 78b795bf4f | |
朱浩 | 3cced30959 | |
朱浩 | ef9fe838a3 |
|
@ -0,0 +1,19 @@
|
||||||
|
# 页面标题
|
||||||
|
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/'
|
|
@ -1,5 +1,5 @@
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VITE_APP_TITLE = AIx数字平台
|
VITE_APP_TITLE = AIX智慧课堂
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
VITE_APP_ENV = 'production'
|
VITE_APP_ENV = 'production'
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
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:
|
||||||
|
- '**/*'
|
|
@ -3,7 +3,14 @@ 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()]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "aix-win",
|
"name": "aix-win",
|
||||||
"version": "2.0.2",
|
"version": "2.0.6",
|
||||||
"description": "An Electron application with Vue",
|
"description": "",
|
||||||
"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,6 +16,7 @@
|
||||||
"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"
|
||||||
},
|
},
|
||||||
|
@ -45,10 +46,12 @@
|
||||||
"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",
|
||||||
|
|
|
@ -21,6 +21,27 @@ 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
|
||||||
|
@ -53,7 +74,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()
|
||||||
})
|
})
|
||||||
|
@ -101,7 +122,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'])
|
||||||
|
|
|
@ -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">AIX智慧课堂</span>
|
<span class="title" @click="changeTab">{{homeTitle}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="change-tab">
|
<div class="change-tab">
|
||||||
<ul class="flex">
|
<ul class="flex">
|
||||||
|
@ -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()
|
||||||
|
|
|
@ -302,7 +302,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({
|
ElMessage({x
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
type: 'success',
|
type: 'success',
|
||||||
})
|
})
|
||||||
|
|
|
@ -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" />
|
<el-step title="1.基本信息" @click="activeIndex=1" style="cursor:pointer"/>
|
||||||
<el-step title="2.在校信息" />
|
<el-step title="2.在校信息" />
|
||||||
</el-steps>
|
</el-steps>
|
||||||
<el-form
|
<el-form
|
||||||
|
@ -40,9 +40,11 @@
|
||||||
<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">
|
||||||
|
@ -72,6 +74,7 @@
|
||||||
</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>
|
||||||
|
@ -419,9 +422,15 @@ const sbmitImg=()=>{
|
||||||
const handleChange = (value) => {
|
const handleChange = (value) => {
|
||||||
console.log('选中的地址值:', value);
|
console.log('选中的地址值:', value);
|
||||||
};
|
};
|
||||||
const handleSchoolChange= async ()=>{
|
const handleSchoolChange= ()=>{
|
||||||
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(',')
|
||||||
|
@ -444,11 +453,12 @@ const handleSchoolChange= async ()=>{
|
||||||
schoolSubject.value = []
|
schoolSubject.value = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
listClassmain( {entpid: ruleForm.school[2], pageSize: 500, status: 'open'}).then(res=>{
|
}
|
||||||
|
// 获取班级
|
||||||
|
const getClassmain = async ()=>{
|
||||||
|
const res = await listClassmain( {entpid: ruleForm.school[2], pageSize: 500, status: 'open'})
|
||||||
|
console.log(res,'res')
|
||||||
gradeTree.value = groupByCondition(res.rows, item => item.agekey);
|
gradeTree.value = groupByCondition(res.rows, item => item.agekey);
|
||||||
console.log(gradeTree.value,'班级')
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//将所有班级筛选成二级的数组
|
//将所有班级筛选成二级的数组
|
||||||
const groupByCondition = (arr, condition)=>{
|
const groupByCondition = (arr, condition)=>{
|
||||||
|
@ -484,7 +494,13 @@ const gradeName = (key) =>{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
|
//默认给到地区重庆
|
||||||
|
ruleForm.address = ['50']
|
||||||
|
//默认给到学校的值
|
||||||
|
ruleForm.school = [100,255,279]
|
||||||
|
//默认获取重庆第一个学校的学科
|
||||||
|
accessToDisciplines()
|
||||||
|
getClassmain()
|
||||||
})
|
})
|
||||||
defineExpose({
|
defineExpose({
|
||||||
OpenModel,
|
OpenModel,
|
||||||
|
@ -498,4 +514,17 @@ 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>
|
||||||
|
|
|
@ -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>欢迎登录 AIX智慧课堂</p>
|
<p>欢迎登录 {{homeTitle}}</p>
|
||||||
</div>
|
</div>
|
||||||
<img class="welcome-img" :src="leftBg2" />
|
<img class="welcome-img" :src="leftBg2" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -93,6 +93,7 @@ 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
|
||||||
|
|
|
@ -108,6 +108,12 @@ 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 () {
|
||||||
|
@ -201,8 +207,8 @@ export default {
|
||||||
},
|
},
|
||||||
openFileWin(items) {
|
openFileWin(items) {
|
||||||
if (items.fileFlag === 'apt') {
|
if (items.fileFlag === 'apt') {
|
||||||
console.log(items);
|
console.log(this.curNode);
|
||||||
const path="/teaching/aptindex?id="+items.fileId
|
const path="/teaching/aptindex?id="+items.fileId + "&cataId=" + this.curNode.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('//', '/')
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
: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"
|
||||||
>
|
>
|
||||||
|
@ -115,13 +116,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>
|
<label style="font-size: 15px">共{{ currentWorkList.length }}个作业</label>
|
||||||
<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"
|
||||||
|
|
Loading…
Reference in New Issue