Merge branch 'main' into lyc-dev
This commit is contained in:
commit
6d1cc7e21b
|
@ -1,6 +1,8 @@
|
|||
# 页面标题
|
||||
VITE_APP_TITLE = 文枢课堂
|
||||
|
||||
VITE_APP_ID = 'aix-win-ws'
|
||||
|
||||
# 生产环境配置
|
||||
VITE_APP_ENV = 'production'
|
||||
|
||||
|
|
4
.env.yc
4
.env.yc
|
@ -1,5 +1,7 @@
|
|||
# 页面标题
|
||||
VITE_APP_TITLE = 文枢课堂
|
||||
VITE_APP_TITLE = 永川中小学AI教学系统
|
||||
|
||||
VITE_APP_ID = 'aix-win-ws-yc'
|
||||
|
||||
# 生产环境配置
|
||||
VITE_APP_ENV = 'production'
|
||||
|
|
2
.env.yc2
2
.env.yc2
|
@ -1,6 +1,8 @@
|
|||
# 页面标题
|
||||
VITE_APP_TITLE = 实训教学
|
||||
|
||||
VITE_APP_ID = 'aix-win-ws-yc2'
|
||||
|
||||
# 生产环境配置
|
||||
VITE_APP_ENV = 'production'
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ asarUnpack:
|
|||
nsis:
|
||||
oneClick: false
|
||||
allowToChangeInstallationDirectory: true
|
||||
artifactName: ${name}-yc-${version}-setup.${ext}
|
||||
artifactName: ${name}-${version}-setup.${ext}
|
||||
shortcutName: ${productName}
|
||||
uninstallDisplayName: ${productName}
|
||||
createDesktopShortcut: always
|
||||
|
|
|
@ -17,7 +17,7 @@ asarUnpack:
|
|||
nsis:
|
||||
oneClick: false
|
||||
allowToChangeInstallationDirectory: true
|
||||
artifactName: ${name}-ycsx-${version}-setup.${ext}
|
||||
artifactName: ${name}-${version}-setup.${ext}
|
||||
shortcutName: ${productName}
|
||||
uninstallDisplayName: ${productName}
|
||||
createDesktopShortcut: always
|
||||
|
|
|
@ -10,14 +10,13 @@
|
|||
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
|
||||
"start": "electron-vite preview",
|
||||
"dev": "electron-vite dev",
|
||||
"build": "electron-vite build",
|
||||
"postinstall": "electron-builder install-app-deps",
|
||||
"build:unpack": "npm run build && electron-builder --dir",
|
||||
"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:prod": "electron-vite build --mode production && electron-builder --win --config ./electron-builder-prod.yml",
|
||||
"build:yc": "electron-vite build --mode yc && electron-builder --win --config ./electron-builder-yc.yml",
|
||||
"build:yc2": "electron-vite build --mode yc2 && electron-builder --win --config ./electron-builder-yc2.yml",
|
||||
"build:test": "node updatePackageJsonName.js && electron-vite build --mode test && electron-builder --win --config ./electron-builder.yml",
|
||||
"build": "node updatePackageJsonName.js && electron-vite build --mode production && electron-builder --win --config ./electron-builder-prod.yml",
|
||||
"build:yc": "node updatePackageJsonName.js && electron-vite build --mode yc && electron-builder --win --config ./electron-builder-yc.yml",
|
||||
"build:yc2": "node updatePackageJsonName.js && electron-vite build --mode yc2 && electron-builder --win --config ./electron-builder-yc2.yml",
|
||||
"build:lt": "electron-vite build --mode lt && electron-builder --win --config ./electron-builder-lt.yml",
|
||||
"build:mac": "electron-vite build --mode production && electron-builder --mac --config ./electron-builder-prod.yml",
|
||||
"build:linux": "npm run build && electron-builder --linux"
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<svg style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6511">
|
||||
<path d="M512 34.133333c263.466667 0 477.866667 214.4 477.866667 477.866667S775.466667 989.866667 512 989.866667 34.133333 775.466667 34.133333 512 248.533333 34.133333 512 34.133333M512 0C229.333333 0 0 229.333333 0 512s229.333333 512 512 512 512-229.333333 512-512S794.666667 0 512 0z" fill="#87C1FF" p-id="6512"></path><path d="M505.173333 611.62666667c100.053333 0 181.333333-80.64 181.333334-180.053333 0-99.2-81.28-180.053333-181.333334-180.053334-100.053333 0-181.333333 80.64-181.333333 180.053334s81.28 180.053333 181.333333 180.053333zM579.84 661.54666667h-135.893333c-126.293333 0-229.12 102.4-229.12 228.053333v13.44c0 65.706667 101.12 65.706667 229.12 65.706667h135.893333c122.88 0 229.12 0 229.12-65.706667v-13.44c0-125.653333-102.826667-228.053333-229.12-228.053333z" fill="#87C1FF" p-id="6513"></path>
|
||||
</svg>
|
After Width: | Height: | Size: 1006 B |
|
@ -47,9 +47,10 @@
|
|||
<IconListView class="tool-btn" v-tooltip="'演讲者视图'" @click="changeViewMode('presenter')" />
|
||||
<IconOffScreenOne class="tool-btn" v-tooltip="'退出全屏'" v-if="fullscreenState" @click="manualExitFullscreen()" />
|
||||
<IconFullScreenOne class="tool-btn" v-tooltip="'进入全屏'" v-else @click="enterFullscreen()" />
|
||||
<Hands class="tool-btn" v-if="classcourse" v-tooltip="'课堂点名'" @click="ToolHandle('named')" />
|
||||
<Share class="tool-btn" v-if="classcourse" v-tooltip="'分享'" @click="ShareCode()" />
|
||||
<IconPower class="tool-btn" v-if="!classcourse" v-tooltip="'结束放映'" @click="exitScreening()" />
|
||||
<IconPower class="tool-btn" v-else v-tooltip="'结束课堂'" @click="exitCourse()" size="30" fill="#d0021b" strokeLinecap="butt" />
|
||||
<Share class="tool-btn" v-if="classcourse" v-tooltip="'分享'" @click="ShareCode()" />
|
||||
</div>
|
||||
<div :class="['tools-icon',{opacity:iconHide}]" @click.stop="toolTrigger('icon')">
|
||||
<circle-double-down v-if="rightToolsVisible" theme="outline" size="30" fill="#409EFF"/>
|
||||
|
@ -76,8 +77,8 @@ import WritingBoardTool from './WritingBoardTool.vue'
|
|||
import CountdownTimer from './CountdownTimer.vue'
|
||||
import emitter from '@/utils/mitt';
|
||||
import Chat from '../../api/chat' // 聊天
|
||||
import { CircleDoubleDown, CircleDoubleUp, Share } from '@icon-park/vue-next' // icon-park 图标库
|
||||
import { ShareCode } from '@/utils/ppt' // ppt相关
|
||||
import { CircleDoubleDown, CircleDoubleUp, Share, Hands } from '@icon-park/vue-next' // icon-park 图标库
|
||||
import { ShareCode, ToolHandle } from '@/utils/ppt' // ppt相关
|
||||
|
||||
const props = defineProps<{
|
||||
changeViewMode: (mode: 'base' | 'presenter') => void
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
<IconOffScreenOne class="tool-icon" v-else />
|
||||
<span>{{ fullscreenState ? '退出全屏' : '全屏' }}</span>
|
||||
</div>
|
||||
<div class="tool-btn" @click="ShareCode()"><Share class="tool-icon" /><span>分享</span></div>
|
||||
<template v-if="classcourse">
|
||||
<div class="tool-btn" @click="ToolHandle('named')"><Hands class="tool-icon" /><span>课堂点名</span></div>
|
||||
<div class="tool-btn" @click="ShareCode()"><Share class="tool-icon" /><span>分享</span></div>
|
||||
</template>
|
||||
<Divider class="divider" />
|
||||
<div class="tool-btn" v-if="!classcourse" @click="exitScreening()"><IconPower class="tool-icon" /><span>结束放映</span></div>
|
||||
<div class="tool-btn" v-else @click="exitCourse()" size="30" fill="#d0021b" strokeLinecap="butt"><IconPower class="tool-icon" /><span>结束课堂</span></div>
|
||||
|
@ -79,7 +82,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { Share } from '@icon-park/vue-next' // icon-park 图标库
|
||||
import { Share, Hands } from '@icon-park/vue-next' // icon-park 图标库
|
||||
import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useSlidesStore, useClasscourseStore } from '../../store'
|
||||
|
@ -99,7 +102,7 @@ import CountdownTimer from './CountdownTimer.vue'
|
|||
import Divider from '../../components/Divider.vue'
|
||||
import emitter from '@/utils/mitt';
|
||||
import Chat from '../../api/chat' // 聊天
|
||||
import { ShareCode } from '@/utils/ppt' // ppt相关
|
||||
import { ShareCode, ToolHandle } from '@/utils/ppt' // ppt相关
|
||||
|
||||
const props = defineProps<{
|
||||
changeViewMode: (mode: 'base' | 'presenter') => void
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
<PresenterView :changeViewMode="changeViewMode" v-else-if="viewMode === 'presenter'" />
|
||||
<!-- 点赞组件 -->
|
||||
<upvote-vue ref="upvoteRef" type="2"></upvote-vue>
|
||||
<!-- <div style="z-index: 999;position: absolute;top:10px">
|
||||
</div> -->
|
||||
|
||||
<!-- 推图上屏弹窗 -->
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
|
@ -15,7 +14,7 @@
|
|||
:show-close="false"
|
||||
>
|
||||
<grid-pic ref="gridPicRef" style="height:100%;" @clear="clearchidrenPic"></grid-pic>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -114,4 +114,16 @@ export function getShareCode(id) {
|
|||
data: { id }
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 课堂点名
|
||||
* @param {*} timgroupid 群id
|
||||
* @returns
|
||||
*/
|
||||
export function rollCall(timgroupid) {
|
||||
return request({
|
||||
url: '/education/classcourse/roll/call',
|
||||
method: 'post',
|
||||
data: { timgroupid }
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -407,11 +407,52 @@ export const dataSetJson = {
|
|||
"教材-高中-数学": "e03aa4fe9fd011ef91270242ac140006",
|
||||
"教材-高中-地理": "270516829fd111efb13c0242ac140006",
|
||||
"教材-高中-政治": "a2f0b247b85d11ef84290242ac140005",
|
||||
|
||||
"考试-小学-语文": "570f7ed2cc9d11ef9e070242ac140002",
|
||||
"考试-小学-数学": "983270b8cc9d11efbbd80242ac140002",
|
||||
"考试-小学-英语": "d5f80e4ccc9d11ef96fa0242ac140002",
|
||||
"课标-小学-科学": "935cfec8bf6a11ef98950242ac140006",
|
||||
"课标-小学-数学": "3c4e298fbf7911ef8e8b0242ac140002",
|
||||
"课标-小学-语文": "f76f1aa5bf7111ef90c80242ac140002",
|
||||
"课标-小学-道德": "8da87869cbd711ef92280242ac140002",
|
||||
"课标-小学-英语": "dc963316cbd811ef8d820242ac140002",
|
||||
"课标-小学-劳动": "fc047d81cbdc11efa1740242ac140002",
|
||||
"教材-小学-科学": "935cfec8bf6a11ef98950242ac140006",
|
||||
"教材-小学-数学": "3c4e298fbf7911ef8e8b0242ac140002",
|
||||
"教材-小学-语文": "f76f1aa5bf7111ef90c80242ac140002",
|
||||
"教材-小学-道德": "8da87869cbd711ef92280242ac140002",
|
||||
"教材-小学-英语": "dc963316cbd811ef8d820242ac140002",
|
||||
"教材-小学-劳动": "fc047d81cbdc11efa1740242ac140002",
|
||||
|
||||
"教材-初中-道德与法治": "df9f3ccccbdd11ef9e550242ac140002",
|
||||
"教材-初中-语文": "3770ad18cbde11efadaa0242ac140002",
|
||||
"教材-初中-数学": "8cc0a799cbde11ef8b440242ac140002",
|
||||
"教材-初中-英语": "07b58ca2cbdf11efaa180242ac140002",
|
||||
"教材-初中-物理": "86f2c018cbf211ef9d6a0242ac140002",
|
||||
"教材-初中-化学": "c7b34790cbf211ef92350242ac140002",
|
||||
"教材-初中-生物": "083ac3edcbf311efaad30242ac140002",
|
||||
"教材-初中-地理": "7ee584e1cbf311efbd270242ac140002",
|
||||
"教材-初中-历史": "8ae07971cbf411ef81e70242ac140002",
|
||||
"教材-初中-信息技术": "ca476233cbf411efa9860242ac140002",
|
||||
"课标-初中-道德与法治": "df9f3ccccbdd11ef9e550242ac140002",
|
||||
"课标-初中-语文": "3770ad18cbde11efadaa0242ac140002",
|
||||
"课标-初中-数学": "8cc0a799cbde11ef8b440242ac140002",
|
||||
"课标-初中-英语": "07b58ca2cbdf11efaa180242ac140002",
|
||||
"课标-初中-物理": "86f2c018cbf211ef9d6a0242ac140002",
|
||||
"课标-初中-化学": "c7b34790cbf211ef92350242ac140002",
|
||||
"课标-初中-生物": "083ac3edcbf311efaad30242ac140002",
|
||||
"课标-初中-地理": "7ee584e1cbf311efbd270242ac140002",
|
||||
"课标-初中-历史": "8ae07971cbf411ef81e70242ac140002",
|
||||
"课标-初中-信息技术": "ca476233cbf411efa9860242ac140002",
|
||||
|
||||
"考试-初中-语文": "6be6d201cc0111ef89100242ac140002",
|
||||
"考试-初中-数学": "d764b539cc0111ef8f1b0242ac140002",
|
||||
"考试-初中-英语": "3477cff7cc9911efbfa50242ac140002",
|
||||
"考试-初中-政治": "7ac981d8cc9a11efa5dc0242ac140002",
|
||||
"考试-初中-历史": "c058a33acc9a11efb7f00242ac140002",
|
||||
"考试-初中-地理": "5548224ecc9b11efa76d0242ac140002",
|
||||
"考试-初中-生物": "206c5fd3cc9c11ef990f0242ac140002",
|
||||
"考试-初中-物理": "93039442cc9c11ef89b10242ac140002",
|
||||
"考试-初中-化学": "f8d78002cc9c11efbbf60242ac140002",
|
||||
"鉴权": "ragflow-IwMDI1MGU2YTU3NjExZWZiNWEzMDI0Mm"
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* ppt 转换为图片
|
||||
* ppt 相关方法
|
||||
*/
|
||||
import { h, render, getCurrentInstance } from 'vue'
|
||||
import { toPng, toJpeg } from 'html-to-image' // 引入html-to-image库
|
||||
|
@ -8,6 +8,7 @@ import ThumbnailSlide from '@/AixPPTist/src/views/components/ThumbnailSlide/inde
|
|||
import { useSlidesStore } from '@/AixPPTist/src/store'
|
||||
import * as ElementPlus from 'element-plus'
|
||||
import { sessionStore } from '@/utils/store' // electron-store 状态管理
|
||||
import { getStaticUrl } from '@/utils/tool' // 工具类
|
||||
import * as Http_Classcourse from '@/api/teaching/classcourse' // api接口
|
||||
|
||||
// 延时
|
||||
|
@ -128,4 +129,82 @@ export const ShareCode = async(code, cb) => {
|
|||
} else done()
|
||||
}
|
||||
}).catch(() => {})
|
||||
}
|
||||
|
||||
/**
|
||||
* 提示框
|
||||
* @param {*} msg 内容
|
||||
* @param {*} title 标题
|
||||
* @param {*} option 配置
|
||||
* @param {*} cb 关闭前回调 ({ h, instance, action, done }, done)
|
||||
* @returns
|
||||
*/
|
||||
export const Alert = async (msg, title, option, cb) => {
|
||||
try {
|
||||
if (typeof msg == 'function') msg = await msg(h)
|
||||
return await ElementPlus.ElMessageBox.alert(msg, title, {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '关闭',
|
||||
showCancelButton: true,
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action == 'confirm') { // 确认
|
||||
if (!!cb) { // 回调
|
||||
cb({ h, instance, action, done }, done) && done()
|
||||
} else { // 默认确认
|
||||
done()
|
||||
}
|
||||
} else done()
|
||||
},
|
||||
...option,
|
||||
})
|
||||
} catch { }
|
||||
}
|
||||
/**
|
||||
* 课堂工具栏-钩子
|
||||
*/
|
||||
export const ToolType = {
|
||||
/** 分享码 */
|
||||
SHARE_CODE: 'shareCode',
|
||||
/** 课堂点名 */
|
||||
NAMED: 'named',
|
||||
}
|
||||
export const ToolHandle = async(type, data, cb) => {
|
||||
const classcourse = sessionStore.get('curr.classcourse') // 课堂信息
|
||||
switch (type) {
|
||||
case ToolType.SHARE_CODE:
|
||||
return ShareCode(data, cb)
|
||||
case ToolType.NAMED: {
|
||||
if (!classcourse) return ElementPlus.ElMessage.warning('没有课堂信息!')
|
||||
const avatar = getStaticUrl('/icon/avatar.svg')
|
||||
const timgroupid = classcourse.timgroupid
|
||||
if (!timgroupid) return ElementPlus.ElMessage.warning('没有课堂群信息!')
|
||||
// 课堂点名
|
||||
const res = await Http_Classcourse.rollCall(timgroupid)
|
||||
if (!(res && res.code == 200 && res.data)) return ElementPlus.ElMessage.warning('点名失败!')
|
||||
const userList = res?.data || []
|
||||
const refresh = () => { ToolHandle(ToolType.NAMED); return true }
|
||||
Alert(h => {
|
||||
const attr_0 = {style:{display:'flex',gap:'10px', cursor:'pointer'}}
|
||||
const attr_1 = { style:{display:'inline-flex',alignItems:'center',gap:'10px',padding:'5px 10px'}}
|
||||
const attr_2 = { src: avatar, style: { width: '50px', height: '50px' }}
|
||||
const attr_3 = { style: { fontSize: '20px', fontWeight: 'bold', color: '#409EFF' }}
|
||||
const attr_4 = { style: { fontSize: '12px' }}
|
||||
const userList_H = userList.map(o => {
|
||||
attr_1.title = o.name
|
||||
attr_4.style.color = o.online ? '#67C23A' : '#F56C6C'
|
||||
return h('div', attr_1, [
|
||||
h('img', attr_2),
|
||||
h('div', [
|
||||
h('p', attr_3, o.name),
|
||||
h('span', attr_4, o.online?'在线':'离线')
|
||||
])
|
||||
])
|
||||
})
|
||||
return h('div', attr_0, userList_H)
|
||||
}, '课堂点名', { confirmButtonText: '刷新' }, refresh)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
|
@ -1,90 +1,155 @@
|
|||
<template>
|
||||
<div style="display: flex;">
|
||||
<div style="margin-left: 15px">
|
||||
<el-dropdown @command="handleUserEduStage">
|
||||
<span class="el-dropdown-link">
|
||||
<el-button class="custom-button" type="default" round >{{ userStore.edustage }}
|
||||
<el-icon><ArrowDown /></el-icon>
|
||||
</el-button>
|
||||
</span>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item command="幼儿园">幼儿园</el-dropdown-item>
|
||||
<el-dropdown-item command="小学">小学</el-dropdown-item>
|
||||
<el-dropdown-item command="初中">初中</el-dropdown-item>
|
||||
<el-dropdown-item command="高中">高中</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<div>
|
||||
<div style="display: flex; align-items: center;">
|
||||
<div style="margin-left: 15px">
|
||||
<span class="el-dropdown-link">
|
||||
<el-button class="custom-button" type="default" round>{{ eduStage || userStore.edustage }}</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<div style="margin-left: 15px">
|
||||
<span class="el-dropdown-link">
|
||||
<el-button class="custom-button" type="default" round>{{ eduSubject || userStore.edusubject }}</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<el-text
|
||||
type="primary"
|
||||
style="margin-left: 10px; cursor: pointer;"
|
||||
@click="handleUserEduSubject"
|
||||
v-popover="popoverRef"
|
||||
ref="buttonRef"
|
||||
>修改</el-text>
|
||||
</div>
|
||||
<div style="margin-left: 15px">
|
||||
<el-dropdown @command="handleUserEduSubject">
|
||||
<span class="el-dropdown-link">
|
||||
<el-button class="custom-button" type="default" round>{{ userStore.edusubject }}
|
||||
<el-icon><ArrowDown /></el-icon>
|
||||
</el-button>
|
||||
</span>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<template v-for="(item, index) in subjectList">
|
||||
<el-dropdown-item v-if="item.edustage == userStore.edustage" :command="item.itemtitle">{{
|
||||
item.itemtitle }}</el-dropdown-item>
|
||||
<!-- 级联选择框 -->
|
||||
<el-popover
|
||||
ref="popoverRef"
|
||||
:virtual-ref="buttonRef"
|
||||
trigger="click"
|
||||
title="修改学科学段"
|
||||
virtual-triggering
|
||||
placement="right"
|
||||
width="300px"
|
||||
>
|
||||
<div class="sidebar">
|
||||
<div class="nav-level-one">
|
||||
<template v-for="(item,index) in options" :key="index">
|
||||
<div :class="[currentIndex===index?'active':'','nav-item']" @click="handleUserEduStage(item.label,index)">
|
||||
<span class="nav-text">{{ item.label }}</span>
|
||||
<el-icon class="icon"><ArrowRight /></el-icon>
|
||||
</div>
|
||||
</template>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div class="nav-level-two">
|
||||
<el-scrollbar height="180">
|
||||
<template v-for="(item,index) in cascadeOptions" :key="index">
|
||||
<div class="nav-item" @click="handleChange(item)">
|
||||
<span class="nav-text">{{ item.label }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import {ArrowDown} from '@element-plus/icons-vue'
|
||||
import { onMounted,ref } from 'vue';
|
||||
import { onMounted, ref, unref } from 'vue';
|
||||
import { listEvaluation } from '@/api/subject/index'
|
||||
import {sessionStore} from '@/utils/store'
|
||||
import { sessionStore } from '@/utils/store'
|
||||
import { ArrowRight } from '@element-plus/icons-vue'
|
||||
|
||||
const userStore = useUserStore().user
|
||||
const subjectList = ref([])
|
||||
const buttonRef = ref()
|
||||
const popoverRef = ref()
|
||||
// 获取当前选择的学段
|
||||
const currentIndex = ref(0)
|
||||
// 当前的学科和学段
|
||||
const eduStage = ref('')
|
||||
const eduSubject = ref('')
|
||||
|
||||
// 学段固定
|
||||
const options = ref([
|
||||
{
|
||||
value: '幼儿园',
|
||||
label: '幼儿园',
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
value: '小学',
|
||||
label: '小学',
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
value: '初中',
|
||||
label: '初中',
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
value: '高中',
|
||||
label: '高中',
|
||||
children: [],
|
||||
},
|
||||
])
|
||||
// 选择学段时后筛选学科
|
||||
const cascadeOptions = ref([]);
|
||||
// 获取基础的学科
|
||||
const getSubject = () => {
|
||||
//没有学科则不进行下面的步骤
|
||||
if(!userStore.subject) return
|
||||
if (!userStore.subject) return;
|
||||
listEvaluation({ itemkey: 'subject', pageSize: 500 }).then((res) => {
|
||||
const arr = userStore.subject.split(',')
|
||||
subjectList.value = res.rows.filter(item => arr.includes(String(item.id))).map(items => items)
|
||||
console.log(subjectList,'subjectList');
|
||||
|
||||
})
|
||||
const arr = userStore.subject.split(',');
|
||||
subjectList.value = res.rows.filter(item => arr.includes(String(item.id)));
|
||||
if (subjectList.value.length === 0) return;
|
||||
options.value.forEach(option => {
|
||||
option.children = subjectList.value
|
||||
.filter(items => items.edustage === option.label)
|
||||
.map(item => ({ value: item.id, label: item.edusubject }));
|
||||
});
|
||||
// 首次获取学段和学科列表
|
||||
const cIndex = options.value.findIndex(item => item.label === userStore.edustage);
|
||||
cascadeOptions.value = [...options.value[cIndex].children]
|
||||
currentIndex.value = cIndex
|
||||
});
|
||||
}
|
||||
|
||||
// 选择学段
|
||||
const handleUserEduStage = (item) => {
|
||||
userStore.edustage = item
|
||||
sessionStore.set('edustageSelf',item)
|
||||
if(item === '幼儿园'){
|
||||
// 默认语文
|
||||
userStore.edusubject = '语文'
|
||||
sessionStore.set('edusubjectSelf','语文')
|
||||
}
|
||||
else if(item === '高中' && userStore.edusubject === "道德与法治"){
|
||||
// 默认语文
|
||||
userStore.edusubject = '政治'
|
||||
sessionStore.set('edusubjectSelf','政治')
|
||||
}
|
||||
else if(item != '高中' && userStore.edusubject === "政治"){
|
||||
// 默认语文
|
||||
userStore.edusubject = '道德与法治'
|
||||
sessionStore.set('edusubjectSelf','道德与法治')
|
||||
}
|
||||
const handleUserEduStage = (stage,index) => {
|
||||
const currentData = options.value.find(item => item.label === stage);
|
||||
cascadeOptions.value = [...currentData.children]
|
||||
currentIndex.value = index
|
||||
}
|
||||
|
||||
// 选择学科
|
||||
const handleUserEduSubject = (item) => {
|
||||
userStore.edusubject = item;
|
||||
sessionStore.set('edusubjectSelf',item)
|
||||
const handleUserEduSubject = () => {
|
||||
unref(popoverRef).popperRef?.delayHide?.();
|
||||
}
|
||||
|
||||
const handleChange = (item) => {
|
||||
const id = item.value
|
||||
const current = subjectList.value.find(item => item.id === id);
|
||||
if (current) {
|
||||
eduSubject.value = item.label;
|
||||
eduStage.value = current.edustage;
|
||||
sessionStore.set('edustageSelf', eduStage.value);
|
||||
|
||||
if (eduStage.value === '高中' && eduSubject.value === "道德与法治") {
|
||||
eduSubject.value = '政治';
|
||||
sessionStore.set('edusubjectSelf', '政治');
|
||||
} else if (eduStage.value !== '高中' && eduSubject.value === "政治") {
|
||||
eduSubject.value = '道德与法治';
|
||||
sessionStore.set('edusubjectSelf', '道德与法治');
|
||||
} else {
|
||||
sessionStore.set('edusubjectSelf', eduSubject.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getSubject()
|
||||
getSubject();
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.custom-button {
|
||||
width: auto;
|
||||
|
@ -93,10 +158,58 @@ onMounted(() => {
|
|||
outline-offset: none;
|
||||
padding: 0 24px;
|
||||
}
|
||||
|
||||
.custom-button i {
|
||||
margin-left: 8px; /* 调整图标与文字之间的间距 */
|
||||
}
|
||||
</style>
|
||||
.sidebar {
|
||||
width: 100%;
|
||||
padding: 5px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
|
||||
.nav-level-one,.nav-level-two {
|
||||
margin-bottom: 20px;
|
||||
width: 120px;
|
||||
}
|
||||
.nav-level-two .nav-item{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
padding: 8px 10px;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.nav-item:hover {
|
||||
background-color: rgb(245, 247, 250);
|
||||
}
|
||||
|
||||
.nav-text {
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.nav-arrow {
|
||||
font-size: 12px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.nav-level-one.nav-item:first-child.nav-text {
|
||||
color: blue;
|
||||
}
|
||||
.active .nav-text{
|
||||
font-weight: bold;
|
||||
color:rgb(64, 158, 255)
|
||||
}
|
||||
.active .icon{
|
||||
font-weight: bold;
|
||||
color:rgb(64, 158, 255)
|
||||
}
|
||||
</style>
|
|
@ -5,7 +5,7 @@
|
|||
<div class="info">
|
||||
<div class="info-name">{{ state.user.nickName }}</div>
|
||||
<div class="infomation" v-if="isStadium() !== true" >
|
||||
<selectClass v-if="!isSubject"/>
|
||||
<SelectClass v-if="!isSubject"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -34,7 +34,7 @@ import resetPwd from './resetPwd.vue'
|
|||
import { getUserProfile } from '@/api/system/user'
|
||||
import pkc from "../../../../../package.json"
|
||||
//选择学校和班级
|
||||
import selectClass from './components/selectClass.vue'
|
||||
import SelectClass from './components/selectClass.vue'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
const version = ref(pkc.version)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="right-header flex">
|
||||
<span>课件预览</span>
|
||||
<div>
|
||||
<el-button type="danger" @click="onCreate">一键生成</el-button>
|
||||
<el-button :disabled="!result?.outline" type="danger" @click="onCreate">一键生成</el-button>
|
||||
<el-button :disabled="!result?.parentId" @click="openAiPPT">编辑课件</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -64,6 +64,7 @@ const pgDialog = reactive({ // 弹窗-进度条
|
|||
const pptSlides = ref([])
|
||||
|
||||
emitter.on('onResult', (data)=>{
|
||||
console.log(data)
|
||||
result.value = data
|
||||
if (!!result.value.parentId) {
|
||||
listEntpcoursefileNew({parentid: result.value.parentId}).then(res=>{
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { env } = require('process');
|
||||
|
||||
// 读取当前的package.json文件
|
||||
const packageJsonPath = path.join(__dirname, 'package.json');
|
||||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
||||
console.log(env)
|
||||
let res = env.npm_lifecycle_event.replace("build", "").replace(":", "");
|
||||
res = res?"-" + res:"";
|
||||
packageJson.name = "aix-win-ws" + res
|
||||
|
||||
// 将修改后的内容写回package.json文件
|
||||
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
Loading…
Reference in New Issue