Compare commits

...

46 Commits

Author SHA1 Message Date
小杨 5dc9e4e20d add:章节节点选择; 2024-11-12 09:49:09 +08:00
lyc 5a1b95ea5d Merge pull request 'lyc-dev' (#22) from lyc-dev into main 2024-11-11 17:28:10 +08:00
lyc 0ec8ec7480 路由冲突 2024-11-11 17:28:49 +08:00
baigl 2c1e9923c5 Merge pull request 'baigl' (#21) from baigl into main
Reviewed-on: #21
2024-11-11 17:27:09 +08:00
白了个白 2f58722206 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk_WS into baigl 2024-11-11 17:26:12 +08:00
白了个白 317dc9f184 1 2024-11-11 17:25:55 +08:00
lyc c3ef8d881e 模板 2024-11-11 17:16:06 +08:00
baigl 3f81e36dd9 Merge pull request 'baigl' (#20) from baigl into main
Reviewed-on: #20
2024-11-11 15:07:29 +08:00
白了个白 ecc74e4666 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk_WS into baigl 2024-11-11 15:06:57 +08:00
白了个白 0cc3d970d1 作业设计:课程切换数据覆盖bug修复 2024-11-11 15:06:40 +08:00
baigl 3c4c035703 Merge pull request 'baigl' (#19) from baigl into main
Reviewed-on: #19
2024-11-11 10:19:10 +08:00
白了个白 a0bfb5be70 作业设计:课程选择太快增加防抖 2024-11-11 10:13:41 +08:00
白了个白 f53d7f104c Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk_WS into baigl 2024-11-11 10:03:48 +08:00
zhangxuelin 225982ec0c Merge pull request 'zxl' (#18) from zxl into main
Reviewed-on: #18
2024-11-08 17:24:13 +08:00
白了个白 cbd706fed1 习题查询:加上分页传参 2024-11-08 15:38:13 +08:00
zhangxuelin e07d01f0a1 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk_WS into zxl 2024-11-08 14:47:02 +08:00
zhangxuelin 5c60a30a8a 重新认证 2024-11-08 14:46:43 +08:00
baigl d7857d9f45 Merge pull request 'baigl' (#17) from baigl into main
Reviewed-on: #17
2024-11-08 09:55:56 +08:00
白了个白 f4f2ebb0cf Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk_WS into baigl 2024-11-08 09:55:15 +08:00
白了个白 e002066da6 作业设计:题源同步2.0 web版 2024-11-08 09:54:57 +08:00
lyc 756d7fdaa1 模板 2024-11-07 14:14:46 +08:00
baigl 8bc50b3ab4 Merge pull request 'baigl' (#16) from baigl into main
Reviewed-on: #16
2024-11-07 09:46:27 +08:00
白了个白 6e3959328b Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk_WS into baigl 2024-11-07 09:44:55 +08:00
白了个白 3c32f5d823 作业批改:逻辑与界面更改 2024-11-07 09:44:28 +08:00
lyc d05e50218d 模板 2024-11-06 17:33:32 +08:00
zhangxuelin dbb0f44b1c Merge pull request 'zxl' (#15) from zxl into main
Reviewed-on: #15
2024-11-06 17:31:41 +08:00
zhangxuelin 45b93b8980 首页展示学校 2024-11-06 17:30:31 +08:00
zhangxuelin 79f38ad18f no message 2024-11-06 17:06:17 +08:00
zhangxuelin 652c46c33b Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk_WS into zxl
# Conflicts:
#	src/renderer/src/assets/iconfont/iconfont.css
#	src/renderer/src/assets/iconfont/iconfont.js
#	src/renderer/src/assets/iconfont/iconfont.json
#	src/renderer/src/assets/iconfont/iconfont.ttf
#	src/renderer/src/assets/iconfont/iconfont.woff
#	src/renderer/src/assets/iconfont/iconfont.woff2
#	src/renderer/src/router/index.js
2024-11-06 17:04:39 +08:00
zhangxuelin dd8c48f3ae 学校加入 注册 登录注册 加入学校审批 2024-11-06 16:55:40 +08:00
白了个白 625f82880f 1 2024-11-06 11:24:53 +08:00
lyc 71e6b74dd4 调整路由 2024-11-05 00:39:06 +08:00
朱浩 3b2fee6731 版本升级 2024-11-04 16:58:36 +08:00
lyc 2ca3d89d1c 模板 2024-11-04 15:45:11 +08:00
lyc 7d1fd46c46 Merge pull request 'lyc-dev' (#14) from lyc-dev into main 2024-11-04 15:44:41 +08:00
lyc 9d3e11f336 Merge branch 'main' into lyc-dev 2024-11-01 16:51:51 +08:00
lyc b63eb6631d 模板 2024-11-01 16:51:26 +08:00
lyc a75502415c 更新图标 2024-10-31 14:40:48 +08:00
lyc b7e8798552 Merge pull request 'lyc-dev' (#13) from lyc-dev into main 2024-10-31 14:40:14 +08:00
yangws 27198aabfa Merge pull request 'fix:学科学段联动;' (#12) from yangws_ws into main
Reviewed-on: #12
2024-10-31 14:27:00 +08:00
lyc 8bc0ab460c 教学工作台面包屑 2024-10-31 14:05:24 +08:00
zhangxuelin bbf85c4337 注册 2024-10-30 17:25:04 +08:00
zhangxuelin 9167751c6c Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk_WS into zxl
# Conflicts:
#	src/renderer/src/layout/components/Aside.vue
2024-10-30 15:08:25 +08:00
zhangxuelin 7319c396c4 新增加入学校 学校认证 2024-10-30 15:06:37 +08:00
zhangxuelin b7dc080840 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk_WS into zxl 2024-10-30 10:24:16 +08:00
zhangxuelin 41d6b35340 登录 2024-10-30 10:23:38 +08:00
59 changed files with 4889 additions and 991 deletions

View File

@ -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/
# 额外依赖打包到输出目录

View File

@ -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/
# 额外依赖打包到输出目录

View File

@ -48,6 +48,11 @@ export default defineConfig({
changeOrigin: true, // 改变请求的起源
rewrite: (path) => path.replace(/^\/parth/, '') // 重写路径
},
'/v1': {
target: 'https://ai.ysaix.com:7864',
changeOrigin: true,
pathRewrite: { '^/v1': '' }
}
},
},
plugins: [vue(), WindiCSS()],

View File

@ -1,6 +1,6 @@
{
"name": "aix-win",
"version": "2.5.0",
"version": "2.5.1",
"description": "",
"main": "./out/main/index.js",
"author": "上海交大重庆人工智能研究院",

View File

@ -88,7 +88,7 @@ function createLoginWindow() {
function createMainWindow() {
mainWindow = new BrowserWindow({
width: 1350,
minWidth: 1200,
minWidth: 1370,
height: 700,
minHeight: 700,
show: false,

View File

@ -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')
}

View File

@ -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({
@ -130,3 +138,20 @@ export function listEvaluation(query) {
params: query
})
}
// 发送验证码
export function sendcode(data) {
return request({
url: '/code/send',
method: 'post',
data
})
}
// 教师注册
export function instructorregister(data) {
return request({
url: '/instructor/register',
method: 'post',
data
})
}

View File

@ -0,0 +1,39 @@
import request from '@/utils/request'
import axios from 'axios'
// 查询模板列表
export function modelList(params) {
return request({
url: '/education/llmModel/list',
method: 'get',
params
})
}
export function conversation(data) {
return axios({
url: '/v1/api/new_conversation',
method: 'get',
headers: {
isToken: true,
'Authorization':'Bearer ragflow-IwNzMxMTIyOGY0ZTExZWZiOGE2MDI0Mm',
'Content-Type': 'application/json',
'Accept': '*/*'
},
params: data
})
}
// 进行课标研读对话
export function completion(data) {
return axios({
url: '/v1/api/completion',
method: 'post',
headers: {
'Authorization':'Bearer ragflow-IwNzMxMTIyOGY0ZTExZWZiOGE2MDI0Mm',
'Content-Type': 'application/json',
'Accept': '*/*'
},
data: data
})
}

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 4723712 */
src: url('iconfont.woff2?t=1730256542457') format('woff2'),
url('iconfont.woff?t=1730256542457') format('woff'),
url('iconfont.ttf?t=1730256542457') format('truetype');
src: url('iconfont.woff2?t=1731315402630') format('woff2'),
url('iconfont.woff?t=1731315402630') format('woff'),
url('iconfont.ttf?t=1731315402630') format('truetype');
}
.iconfont {
@ -13,6 +13,70 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-ai1:before {
content: "\e70a";
}
.icon-duihua:before {
content: "\e60d";
}
.icon-bianji1:before {
content: "\e678";
}
.icon-a-ziyuan91:before {
content: "\e611";
}
.icon-ai:before {
content: "\e626";
}
.icon-xiaoxi:before {
content: "\e677";
}
.icon-fuzhi:before {
content: "\e6f6";
}
.icon-tianjia:before {
content: "\e675";
}
.icon-bianji-gangbi:before {
content: "\e6d8";
}
.icon-rss-line:before {
content: "\e782";
}
.icon-touxiang:before {
content: "\e655";
}
.icon-xiangxia:before {
content: "\e85d";
}
.icon--kejian:before {
content: "\e6a3";
}
.icon-fanhui:before {
content: "\e604";
}
.icon-tianchongxing-:before {
content: "\e641";
}
.icon-daishenhe:before {
content: "\e64c";
}
.icon-A:before {
content: "\e6ef";
}

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,118 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "41844021",
"name": "ai",
"font_class": "ai1",
"unicode": "e70a",
"unicode_decimal": 59146
},
{
"icon_id": "2286510",
"name": "对话",
"font_class": "duihua",
"unicode": "e60d",
"unicode_decimal": 58893
},
{
"icon_id": "4093249",
"name": "编辑",
"font_class": "bianji1",
"unicode": "e678",
"unicode_decimal": 59000
},
{
"icon_id": "39732311",
"name": "AI分析",
"font_class": "a-ziyuan91",
"unicode": "e611",
"unicode_decimal": 58897
},
{
"icon_id": "41784801",
"name": "ai",
"font_class": "ai",
"unicode": "e626",
"unicode_decimal": 58918
},
{
"icon_id": "2158298",
"name": "消息",
"font_class": "xiaoxi",
"unicode": "e677",
"unicode_decimal": 58999
},
{
"icon_id": "12024469",
"name": "复制",
"font_class": "fuzhi",
"unicode": "e6f6",
"unicode_decimal": 59126
},
{
"icon_id": "17887886",
"name": "添加",
"font_class": "tianjia",
"unicode": "e675",
"unicode_decimal": 58997
},
{
"icon_id": "24268380",
"name": "编辑-钢笔",
"font_class": "bianji-gangbi",
"unicode": "e6d8",
"unicode_decimal": 59096
},
{
"icon_id": "42198021",
"name": "rss-line",
"font_class": "rss-line",
"unicode": "e782",
"unicode_decimal": 59266
},
{
"icon_id": "700853",
"name": "头像",
"font_class": "touxiang",
"unicode": "e655",
"unicode_decimal": 58965
},
{
"icon_id": "16398985",
"name": "向下",
"font_class": "xiangxia",
"unicode": "e85d",
"unicode_decimal": 59485
},
{
"icon_id": "6571029",
"name": "60-课件",
"font_class": "-kejian",
"unicode": "e6a3",
"unicode_decimal": 59043
},
{
"icon_id": "26283779",
"name": "返回",
"font_class": "fanhui",
"unicode": "e604",
"unicode_decimal": 58884
},
{
"icon_id": "6446310",
"name": "博士",
"font_class": "tianchongxing-",
"unicode": "e641",
"unicode_decimal": 58945
},
{
"icon_id": "8651682",
"name": "待审核",
"font_class": "daishenhe",
"unicode": "e64c",
"unicode_decimal": 58956
},
{
"icon_id": "12688893",
"name": "A",

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -16,6 +16,10 @@ const props = defineProps({
isWin: {
type: Boolean,
default: false
},
showCatalog: {
type: Boolean,
default: true
}
})
/**pdf文件地址 */
@ -25,7 +29,15 @@ const fileUrl = props.isWin ? props.url : getAppInstallUrl('pdfjs-dist/web/viewe
onMounted(() => {
/** 将传入的pdf地址进行编码防止中文识别错误 */
if(props.isWin) pdfUrl.value = fileUrl
else pdfUrl.value = fileUrl + encodeURIComponent(props.url) + '#pageMode=outline'
else{
let url = fileUrl + encodeURIComponent(props.url)
if(props.showCatalog){
pdfUrl.value = url + '#pageMode=outline'
}
else{
pdfUrl.value = url
}
}
})
</script>

View File

@ -0,0 +1,135 @@
<template>
<el-dialog v-model="isDialog" :show-close="false" width="900">
<template #header>
<div class="custom-header flex">
<span>选择{{ title }}</span>
<i class="iconfont icon-guanbi" @click="isDialog = false"></i>
</div>
</template>
<div class="dialog-content">
<div class="flex">
<el-radio-group v-model="radio" @change="changeRadio">
<el-radio :value="item.value" v-for="item in radioList">{{ item.label }}</el-radio>
</el-radio-group>
</div>
<div class="content-list">
<ul>
<li v-for="(item, index) in list" :class="activeIndex == index ? 'li-active' : ''" @click="clickItem(index)">
<el-image class="img" :src="item.url" />
<span>{{ item.name }}</span>
</li>
</ul>
</div>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="isDialog = false">取消</el-button>
<el-button type="primary" @click="isDialog = false">
确定
</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import { ref, computed } from 'vue'
const url = 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F11044b08-04c1-41a0-a453-1fd20b58a614%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1732953359&t=7ab1d1b3a903db85b1149914407aea35'
const isDialog = defineModel()
const props = defineProps({
model: {
type: [String, Number],
default: 1
}
})
const title = computed(() => {
if (props.model == 1) return '课标';
if (props.model == 2) return '教材';
if (props.model == 3) return '考试';
})
const radio = ref(1)
const radioList = ref([
{ label: '浏览研读', value: 1 },
{ label: '跨学科研读', value: 2 },
{ label: '跨学段研读', value: 3 },
{ label: '课标修订研读', value: 4 },
{ label: '自由研读', value: 5 },
])
const list = ref([
{
name: '高中语文课程标准',
url
}
])
const changeRadio = () => {
list.value = []
for (let i = 0; i < Math.floor(Math.random() * 5) + 1; i++) {
list.value.push({
name: '高中语文课程标准',
url
})
}
}
const activeIndex = ref(-1)
const clickItem = (index) => {
activeIndex.value = index
}
</script>
<style lang="scss" scoped>
.custom-header {
justify-content: space-between;
align-items: center;
.icon-guanbi {
cursor: pointer;
font-weight: bold;
}
}
.dialog-content {
padding-top: 10px;
.content-list {
padding-top: 10px;
ul {
display: flex;
flex-wrap: wrap;
li {
display: flex;
flex-direction: column;
font-size: 13px;
padding: 10px;
cursor: pointer;
border-radius: 5px;
overflow: hidden;
margin-right: 20px;
margin-bottom: 10px;
.img {
width: 100px;
height: 130px;
border: solid #ccc 1px;
margin-bottom: 10px;
}
&:hover {
background: #E0EAFF;
}
}
.li-active {
background: #E0EAFF;
}
}
}
}
</style>

View File

@ -0,0 +1,124 @@
<template>
<div class="container-header flex">
<div class="header-left flex">
<el-button link @click="showDialog = true">
高中语文课程标准<i class="iconfont icon-xiangxia"></i>
</el-button>
</div>
<div class="header-right flex">
<el-dropdown @command="changeTemplate" :hide-on-click="false">
<span class="el-dropdown-link">
{{ curTemplate.name }}
<i class="iconfont icon-xiangxia" </i>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-for="item in templateList" :command="item" :key="item.id">{{ item.name
}}</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
<div>
<el-button type="primary" link>
<el-icon>
<Plus />
</el-icon>
添加提示词
</el-button>
<el-button type="primary" link>保存模板</el-button>
<el-button type="primary" @click="aiRead">一键研读</el-button>
</div>
</div>
</div>
<Dialog v-model="showDialog" :model="model" />
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue'
import { Plus } from '@element-plus/icons-vue'
import { ElMessageBox } from 'element-plus'
import { modelList } from '@/api/mode/index'
import Dialog from './dialog.vue'
const props = defineProps({
model: {
type: [String, Number],
default: 1
}
})
const emit = defineEmits(['changeTemp', 'onRead'])
const showDialog = ref(false)
const aiRead = () => {
emit('onRead')
}
//
const curTemplate = reactive({ name: '', id: '' })
//
const templateList = ref([])
//
const getTemplateList = () => {
modelList({ model: 1, type: 1 }).then(res => {
templateList.value = res.rows
Object.assign(curTemplate, res.rows[0]);
emit('changeTemp', res.rows[0].id)
})
}
//
const changeTemplate = (val) => {
ElMessageBox.confirm(
'切换模板将清除当前研读结果?',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
Object.assign(curTemplate, val);
emit('changeTemp', curTemplate.id)
})
}
onMounted(() => {
getTemplateList()
})
</script>
<style lang="scss" scoped>
.container-header {
height: 45px;
background: #fff;
border-radius: 5px 5px 0 0;
box-shadow: 0px 0px 20px 0px rgba(99, 99, 99, 0.06);
.header-left {
width: 50%;
align-items: center;
padding-left: 20px;
}
.header-right {
width: 50%;
justify-content: space-between;
align-items: center;
padding: 0 10px;
}
.icon-xiangxia {
margin-left: 5px;
font-weight: bold;
}
}
</style>

View File

@ -0,0 +1,27 @@
<template>
<div class="container-pdf">
<PDF :url="pdfUrl" :showCatalog="false" v-if="pdfUrl" />
</div>
</template>
<script setup>
import { ref, onMounted, nextTick } from 'vue';
import PDF from '@/components/PdfJs/index.vue'
import { sessionStore } from '@/utils/store'
const pdfUrl = ref('')
onMounted(async () =>{
await nextTick()
const { fileurl } = sessionStore.get('subject.curBook')
pdfUrl.value = import.meta.env.VITE_APP_RES_FILE_PATH + fileurl.replace('.txt','.pdf')
console.log('pdfUrl.value', pdfUrl.value)
})
</script>
<style lang="scss" scoped>
.container-pdf{
height: 100%;
}
</style>

View File

@ -0,0 +1,356 @@
<template>
<div class="read-container">
<el-scrollbar height="100%">
<div class="template-list">
<el-row v-for="item in childTempList">
<el-col :span="24">
<div class="template-item" v-loading="item.loading">
<div class="item-header"><span class="blue">#</span>{{ item.name }}</div>
<div class="item-text">
{{ item.prompt }}
</div>
<div class="item-text text-answer" v-if="item.answer">
<div class="item-icon">
<i class="iconfont icon-ai"></i>
</div>
<div class="item-answer" v-html="item.answer"></div>
</div>
<div class="ai-btn" v-if="item.answer">
<el-button type="primary" link>
<i class="iconfont icon-ai1"></i>
重新研读
</el-button>
<el-button type="primary" link>
<i class="iconfont icon-duihua"></i>
AI对话调整
</el-button>
<el-button type="primary" link>
<i class="iconfont icon-bianji1"></i>
手动编辑结果
</el-button>
</div>
</div>
</el-col>
</el-row>
</div>
</el-scrollbar>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, watch } from 'vue';
import { sessionStore } from '@/utils/store'
import useUserStore from '@/store/modules/user'
import { conversation, completion } from '@/api/mode/index'
import { modelList } from '@/api/mode/index'
const userStore = useUserStore()
const props = defineProps({
curTemp: {
type: Array,
default: () => {
return []
}
},
tempId: {
type: [String, Number],
default: ''
},
model: {
type: [String, Number],
default: 1
}
})
//
const tempLoading = ref(false)
const childTempList = ref([])
const getChildTemplate = () => {
tempLoading.value = true
modelList({ model: props.model, type: 2, parentId: props.tempId }).then(res => {
childTempList.value = res.rows
console.log('res.rows=====>', res.rows)
}).finally(() => {
tempLoading.value = false
})
}
watch(() => props.tempId, (newVal) => {
if (newVal) {
getChildTemplate()
}
})
const loading = ref(false)
// ID
const params = reactive(
{
"conversation_id": "",
"messages": [
{
"role": "user",
"content": ""
}
],
"quote": false,
"stream": false
}
)
const isAiDeal = ref(false)
const curNode = reactive({})
const getConversation = async () => {
const { user: { userId } } = userStore
const result = await conversation({ user_id: String(userId) })
params.conversation_id = result.data.data.id
getCompletion()
}
//
const resultList = ref([])
const getCompletion = async () => {
console.log('params=====>', params)
for (let item of childTempList.value) {
try {
item.loading = true
params.messages[0].content = `根据${curNode.edustage}语文课标,提炼出${item.name}`
const res = await completion(params)
console.log('对话结果===》', res)
let answer = res.data.data.answer
item.answer = getResult(answer);
} finally {
item.loading = false
}
}
}
//
let getResult = (text) => {
text = text.replace(/^\n\n(.*?)\n\n$/s, '<div>$1</div>');
text = text.replace(/^\n(.*?)\n$/s, '<p>$1</p>');
text = text.replace(/\*\*(.*?)\*\*/g, "<div class='text-tit'>$1</div>");
text = text.replace(/(\d+\..*?)\n/g, "<div class='text-num'>$1</div>\n");
return text
}
onMounted(() => {
let data = sessionStore.get('subject.curNode')
Object.assign(curNode, data);
})
defineExpose({
getConversation
})
</script>
<style lang="scss" scoped>
.read-container {
display: flex;
flex-direction: column;
width: 100%;
padding: 15px 0;
height: 100%;
position: relative;
.el-scrollbar {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
.el-dropdown-link {
font-weight: bold;
.el-icon--right {
font-weight: bold;
}
}
.read-header {
justify-content: space-between;
align-items: center;
.add-btn {
font-size: 13px;
.icon-jiahao {
margin-right: 3px;
font-size: 14px;
}
}
}
.right-con {
display: flex;
}
.template-list {
.template-item {
background: #fff;
padding: 10px;
margin-top: 10px;
border-radius: 5px;
.item-header {
display: flex;
align-items: center;
font-size: 16px;
font-weight: bold;
color: #000;
.blue {
font-size: 22px;
color: #409eff;
margin-right: 5px;
}
}
.item-text {
display: flex;
margin-top: 10px;
font-size: 14px;
text-align: left;
color: #606266;
.item-icon {
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
background: #F6F6F6;
border-radius: 50%;
margin-right: 10px;
flex-shrink: 0;
}
.item-answer {
flex-direction: column;
padding-top: 5px;
:deep(.text-tit) {
font-weight: bold;
margin: 10px 0;
}
:deep(.text-num) {
padding-left: 2em;
}
}
}
.text-answer{
color: #409eff;
}
.ai-btn{
margin-top: 10px;
display: flex;
justify-content: flex-end;
.iconfont{
margin-right: 3px;
}
:deep(.el-button){
font-size: 13px;
}
.icon-ai1{
font-size: 18px;
}
}
}
}
.template-item-result {
background: #DDEAFD !important;
.result-item-header {
display: flex;
align-items: flex-start;
text-align: left;
font-size: 16px;
font-weight: bold;
color: #3D3D3D;
.icon-xiaoxi {
color: #5881D5;
font-weight: bold;
font-size: 20px;
margin-right: 10px;
}
}
.result-icon-btn {
justify-content: space-between;
font-size: 13px;
margin-top: 5px;
span {
display: flex;
align-items: center;
cursor: pointer;
margin-right: 10px;
&:hover {
background: #cfe0fa
}
}
.iconfont {
margin-right: 3px;
color: #3498fc;
}
}
.line {
height: 1px;
background: #D8D8D8;
margin: 10px 0;
}
.other-msg {
font-size: 13px;
.other-user {
align-items: center;
color: #BA4B0F;
font-size: 12px;
.icon-touxiang {
color: #BA4B0F;
font-weight: bold;
font-size: 16px;
margin-right: 5px;
}
}
.other-text {
color: #191919;
text-align: left;
}
}
}
}
.pl-25 {
padding-left: 25px;
}
</style>

View File

@ -0,0 +1,44 @@
<template>
<div class="page-template flex">
<!--头部-->
<Header @changeTemp="changeTemp" @onRead="onRead"/>
<el-row :gutter="20" class="tempalte-main">
<el-col :span="12">
<!--左侧pdf-->
<Pdf />
</el-col>
<el-col :span="12">
<!--右侧模板研读-->
<Result ref="resultRef" :tempId="tempId"/>
</el-col>
</el-row>
</div>
</template>
<script setup>
import { ref } from 'vue'
import Header from './container/header.vue'
import Pdf from './container/pdf.vue'
import Result from './container/result.vue'
const resultRef = ref()
const tempId = ref('')
const changeTemp = (id) =>{
tempId.value = id
}
const onRead = () =>{
resultRef.value.getConversation()
}
</script>
<style lang="scss" scoped>
.page-template {
flex-direction: column;
height: 100%;
.tempalte-main {
flex: 1;
}
}
</style>

View File

@ -51,6 +51,7 @@ export const useGetSubject = async () =>{
}
const { rows } = await listEvaluation(subjectParams)
subjectList = rows
sessionStore.set('subject.curBook', rows[0])
sessionStore.set('subject.bookList', rows)
treeData = getTreeData(subjectList[0].id)
// 设置一个默认的curNode

View File

@ -10,14 +10,16 @@
</div>
</template>
<div class="head-aside">
<ul>
<li class="auth-li">
<ul >
<li :class="computedregistertype==1 || computedregistertype==3?'auth-li':'auth-li pointer-events'" @click="onUserTo('/schoolCertification')" >
<i class="iconfont icon-renzheng-"></i>
<span class="mlr-5">学校认证</span>
<span class="gray">未认证</span>
<span class="mlr-5" v-if="computedregistertype!=4">学校认证</span>
<span class="mlr-5" v-else>{{ userStore.DeptInfo.register.schoolName }}</span>
<span class="gray" v-if="computedregistertype!=4">未认证</span>
</li>
<li>加入学校</li>
<li v-if="computedregistertype!=4" :class="computedregistertype==1 || computedregistertype==2 ? '':'pointer-events'" @click="onUserTo('/joinSchool')">加入学校</li>
<li @click="onUserTo('/profile')">个人中心</li>
<li @click="onUserTo('/schoolManagement')">学校管理</li>
<li @click="onUserTo('/class')">班级中心</li>
<li @click="logout">退出登录</li>
</ul>
@ -51,13 +53,14 @@
</template>
<script setup>
import { ref, watch } from 'vue'
import { ref, watch , reactive, onMounted,computed} from 'vue'
import { useRouter } from 'vue-router'
import { ElMessageBox, ElMessage } from 'element-plus'
import useUserStore from '@/store/modules/user'
import { sessionStore } from '@/utils/store'
import pkc from "../../../../../package.json"
const { ipcRenderer } = window.electron || {}
const dev_api = ref(import.meta.env.VITE_APP_BASE_API)
const userStore = useUserStore()
@ -66,6 +69,7 @@ const currentRoute = ref('')
const activeId = ref('/home')
const version = ref(pkc.version)
const popoverRef = ref('')
@ -75,19 +79,19 @@ const headerMenus = [
name: '教学大模型',
id: 1,
icon: 'icon-shouye',
path: '/index'
path: '/model/index'
},
{
name: '教学工作台',
id: 2,
icon: 'icon-gongzuotai',
path: '/home'
path: '/desktop'
},
{
name: '资源中心',
id: 3,
icon: 'icon-kechengziyuan1',
path: '/resource'
path: '/resource/index'
},
]
@ -96,17 +100,41 @@ const sideBottomMenu = [
name: '算力',
id: 4,
icon: 'icon-yanhouke-shengyinyichang',
path: '/hashrate'
path: '/hashrate/index'
},
{
name: '设置',
id: 5,
icon: 'icon-set',
path: '/setting'
path: '/setting/index'
},
]
const computedregistertype = computed(() => {
const type =userStore.DeptInfo?.register?.type ??0
console.log(userStore.DeptInfo?.register)
if(type==0 || userStore.DeptInfo?.register?.auditStatus!=0 && userStore.DeptInfo?.register?.auditStatus!=1){
return 1
}
//
if(type==3 && userStore.DeptInfo.register.auditStatus==1){
console.log(1111)
return 4
}
if(type==4 && userStore.DeptInfo.register.auditStatus==1){
return 4
}
//
if(type==3 && userStore.DeptInfo.register.auditStatus==0){
return 2
}
//
if(type==4 && userStore.DeptInfo.register.auditStatus==0){
return 3
}
})
const clickMenu = ({ id, disabled, path }) => {
if (disabled) return
activeId.value = id
@ -129,6 +157,7 @@ watch(
)
const logout = () => {
const hasClass = sessionStore.has('activeClass.id')
const hasTool = sessionStore.get('isToolWin')
@ -153,10 +182,13 @@ const logout = () => {
})
}).catch(()=>{})
}
onMounted(() => {
userStore.getDeptInfo()
// getregisterinfo()
})
</script>
<style>
<style lang="scss">
.el-popover.popoverStyle{
min-width:120px;
padding: 0;
@ -275,4 +307,7 @@ const logout = () => {
font-size: 12px;
margin-top: 5px;
}
.pointer-events{
pointer-events: none;
}
</style>

View File

@ -1,232 +1,63 @@
<template>
<div class="page-header">
<div class="header-center">文枢2.5</div>
<div class="header-left" v-if="isShowBack">
<div class="back" @click="onBack">
<i class="iconfont icon-fanhui"></i>
<span>返回</span>
</div>
<el-breadcrumb :separator-icon="ArrowRight">
<el-breadcrumb-item v-for="item in breadList"> {{ item.title }} </el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="header-center" v-else>
AI文枢{{ version }}
</div>
<div class="header-right">
<WindowTools />
</div>
</div>
<!-- <div class="title-bar flex">
<div class="left-section">
<div class="flex title-box">
<el-image style="width: 23px; height: 23px" :src="logoIco" />
<span class="title" @click="changeTab">{{homeTitle}}</span>
</div>
<div class="change-tab">
<ul class="flex">
<li class="flex" :class="[activeId == menu.path ? 'active-li' : '', menu.disabled ? 'disabled' : '']"
v-for="menu in headerMenus" :key="menu.id" @click="clickMenu(menu)">
<div class="icon-box">
<svg class="icon iconfont" aria-hidden="true">
<use :xlink:href="menu.icon"></use>
</svg>
</div>
<span class="text">{{ menu.name }}</span>
</li>
</ul>
</div>
</div> -->
<!-- <div class="right-section flex">
<WindowTools />
<div class="user flex">
<div class="avatar-container">
<div class="avatar-wrapper flex">
<el-dropdown class="right-menu-item hover-effect" @command="handleCommand">
<img :src="dev_api + userStore.user.avatar" class="user-avatar" style="float: left" />
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="changePage('/profile')">个人中心</el-dropdown-item>
<el-dropdown-item @click="changePage('/class')">班级中心</el-dropdown-item>
<el-dropdown-item divided command="logout">
<span>退出登录</span>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
<div class="user-info flex">
<span class="user-name">{{ userStore.user.nickName }}</span>
<div class="flex">
<el-dropdown @command="changeSubject" max-height="500">
<div class="user-subject">{{ userStore.user.edusubject }}
<el-icon class="el-icon--right"><arrow-down />
</el-icon>
</div>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-for="item in userSubjectList" :key="item.id" :command="item">
{{ item.edustage }}-{{ item.edusubject }}
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</div>
<div class="user-depname">{{ userStore.user.deptName }}</div>
</div>
</div>
</div>
</div>
</div> -->
<!-- </div> -->
</template>
<script setup>
import { ref, watch, onMounted } from 'vue'
import { ref, watch } from 'vue'
import { useRouter } from 'vue-router'
import { ElMessageBox, ElMessage } from 'element-plus'
import { ArrowDown } from '@element-plus/icons-vue'
import { ArrowRight } from '@element-plus/icons-vue'
import WindowTools from '@/components/window-tools/index.vue'
import useUserStore from '@/store/modules/user'
import { updateUserInfo } from '@/api/system/user'
import logoIco from '@/assets/images/logo.png'
import { listEvaluation } from '@/api/classManage/index'
import { sessionStore } from '@/utils/store'
// import Chat from '@/utils/chat' // im
// if (!Chat.imChat) Chat.init()
import pkc from "../../../../../package.json"
const version = ref(pkc.version)
let homeTitle = ref(import.meta.env.VITE_APP_TITLE)
const { ipcRenderer } = window.electron || {}
const userStore = useUserStore()
//
const router = useRouter()
const currentRoute = ref('')
const dev_api = ref(import.meta.env.VITE_APP_BASE_API)
const userSubjectList = ref([])
const activeId = ref('/home')
const headerMenus = [
{
name: '工作台',
id: 1,
icon: '#icon-gongzuotai_xuanzhong',
path: '/home'
},
{
name: '研究室',
id: 2,
icon: '#icon-yanjiushi-2',
disabled: true
},
{
name: '资源库',
id: 3,
icon: '#icon-ziyuanku',
path: '/resource'
},
{
name: '朋友圈',
id: 4,
icon: '#icon-iconfontzhizuobiaozhunbduan3-1',
disabled: true
}
]
const clickMenu = ({ id, disabled, path }) => {
if (disabled) return
activeId.value = id
router.push(path)
const onBack = () => {
router.go(-1)
}
//
const isShowBack = ref(false)
const breadList = ref([])
watch(
() => router.currentRoute.value,
(newValue) => {
currentRoute.value = newValue
activeId.value = newValue.path
let path = newValue.path
console.log(newValue);
if (path.includes('/model') && path !== ('/model/index')) {
isShowBack.value = true
breadList.value = newValue.matched.map(item => item.meta)
}
else {
isShowBack.value = false
}
},
{ immediate: true }
)
const changePage = (url) => {
router.push(url)
}
function handleCommand(command) {
switch (command) {
case 'setLayout':
setLayout()
break
case 'logout':
logout()
// Chat?.logout() // im 退
break
default:
break
}
}
function logout() {
const hasClass = sessionStore.has('activeClass.id')
const hasTool = sessionStore.get('isToolWin')
if (hasClass || hasTool) return ElMessage.warning('当前正在上课,请先结束上课')
ElMessageBox.confirm('确认退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(async () => {
const Chat = (await import('@/utils/chat')).default
if (!!Chat.imChat) Chat.logout()
userStore
.logOut()
.then(() => {
// router.replace('/login')
ipcRenderer && ipcRenderer.send('openLoginWindow')
})
.catch(() => {
// router.replace('/login')
ipcRenderer && ipcRenderer.send('openLoginWindow')
})
}).catch(()=>{})
}
const emits = defineEmits(['setLayout'])
function setLayout() {
emits('setLayout')
}
//
const changeSubject = async (command) =>{
let sessionSubject = {
bookList: null,
curBook: null,
curNode: null,
defaultExpandedKeys: [],
subjectTree: []
}
sessionStore.set( 'subject', sessionSubject)
const { userId, userName, plainpwd } = userStore.user
const data = {
userId,
userName,
edustage: command.edustage,
edusubject: command.edusubject
}
await updateUserInfo(data)
await userStore.login({username: userName, password: plainpwd})
await userStore.getInfo()
router.go()
}
//
const getAllSubject = async () => {
const { rows } = await listEvaluation({ itemkey: "subject", pageSize: 500 })
if(!userStore.user.subject) return
const subject = userStore.user.subject.split(',')
userSubjectList.value = rows.filter(item =>
subject.some(el => item.id == el)
)
}
onMounted(() => {
getAllSubject()
})
</script>
<style lang="scss" scoped>
.page-header{
.page-header {
height: 100%;
background-color: #fff;
display: flex;
@ -234,16 +65,47 @@ onMounted(() => {
align-items: center;
width: 100%;
-webkit-app-region: drag;
.header-center{
.header-left {
padding-left: 20px;
font-size: 13px;
cursor: pointer;
-webkit-app-region: no-drag;
display: flex;
align-items: center;
.back {
display: flex;
align-items: center;
margin-right: 20px;
cursor: pointer;
color: #409EFF;
font-weight: bold;
.icon-fanhui {
margin-top: -2px;
margin-right: 3px;
}
}
:deep(.el-breadcrumb) {
font-size: 13px !important;
}
}
.header-center {
margin-left: auto;
margin-right: auto;
}
.header-right{
.header-right {
height: 100%;
display: flex;
align-items: center;
}
}
.title-bar {
height: 80px;
justify-content: space-between;
@ -282,13 +144,15 @@ onMounted(() => {
padding: 5px 8px;
height: 60px;
align-items: center;
.icon-box{
.icon-box {
width: 100%;
height: 35px;
display: flex;
align-items: center;
justify-content: center;
}
.text {
margin-top: 3px;
font-size: 13px;

View File

@ -8,8 +8,19 @@
<el-header>
<Header/>
</el-header>
<el-main>
<AppMain />
<el-main :style="{ 'padding-top' : isShowBread ? 0 : '20px'}">
<template v-if="isShowBread">
<div class="bread-row">
<div class="back" @click="onBack">
<i class="iconfont icon-fanhui"></i>
<span>返回</span>
</div>
<el-breadcrumb :separator-icon="ArrowRight">
<el-breadcrumb-item v-for="item in breadList"> {{ item.title }} </el-breadcrumb-item>
</el-breadcrumb>
</div>
</template>
<AppMain :style="{ height: isShowBread ? 'calc(100% - 45px)' : '100%' }" />
</el-main>
</el-container>
<Uploader v-if="uploaderStore.uploadList && uploaderStore.uploadList.length > 0" />
@ -19,7 +30,9 @@
</template>
<script setup>
import { ref } from 'vue'
import { ref, watch } from 'vue'
import { ArrowRight } from '@element-plus/icons-vue'
import { useRouter } from 'vue-router'
import Header from './components/Header.vue'
import Aside from './components/Aside.vue'
import AppMain from './components/AppMain.vue'
@ -29,6 +42,33 @@ import uploaderState from '@/store/modules/uploader'
let uploaderStore = ref(uploaderState())
//
const router = useRouter()
//
const isShowBread = ref(false)
const breadList = ref([])
//
watch(
() => router.currentRoute.value,
(newValue) => {
let ary = newValue.matched.map( item => item.meta)
// ()
if(ary.some(item => item.hasOwnProperty('showBread'))){
isShowBread.value = true
breadList.value = ary
}
else{
isShowBread.value = false
}
},
{ immediate: true }
)
const onBack = () =>{
router.go(-1)
}
</script>
<style lang="scss" scoped>
@ -45,7 +85,7 @@ let uploaderStore = ref(uploaderState())
height: 45px;
}
.el-main {
--el-main-padding: 20px;
--el-main-padding: 0 20px 20px 20px;
box-sizing: border-box;
}
.el-page-header{
@ -56,4 +96,26 @@ let uploaderStore = ref(uploaderState())
font-size: 16px;
}
}
.bread-row{
display: flex;
align-items: center;
height: 45px;
padding-top: 5px;
font-size: 14px;
color: #606266;
.back{
display: flex;
align-items: center;
margin-right: 20px;
cursor: pointer;
color: #409EFF;
font-weight: bold;
.icon-fanhui{
margin-top: -3px;
margin-right: 3px;
}
}
}
</style>

View File

@ -19,7 +19,7 @@ export const constantRoutes = [
path: '/fullscreenpdf',
component: () => import('@/views/fullScreenPdf/index.vue'),
name: 'fullscreenpdf',
meta: {title: '全屏显示PDF'}
meta: { title: '全屏显示PDF' }
},
{
path: '/teachClassTask',
@ -27,127 +27,192 @@ export const constantRoutes = [
hidden: true
},
{
path: '/',
path: '/model',
component: Layout,
redirect: '/home',
name: 'model',
meta: { title: '教学大模型' },
children: [
{
path: '/index',
component: () => import('@/views/index/index.vue'),
name: 'index',
meta: {title: '首页'}
path: 'index',
component: () => import('@/views/model/index.vue'),
name: 'model-index',
meta: { title: '教学大模型' }
},
{
path: '/home',
path: 'curriculum',
component: () => import('@/views/curriculum-standards/index.vue'),
name: 'curriculum-standard',
meta: { title: '课标研读' }
},
{
path: 'teaching',
component: () => import('@/views/teaching-material/index.vue'),
name: 'teaching-material',
meta: { title: '教材研读' }
},
{
path: 'examination',
component: () => import('@/views/examination-analysis/index.vue'),
name: 'examination-analysis',
meta: { title: '考试分析' }
},
]
},
...toolRouters
]
const dynamicRoutes = [
{
path: '/',
component: Layout,
redirect: '/desktop',
meta: { title: '教学工作台' },
children: [
{
path: 'desktop',
component: () => import('@/views/desktop/index.vue'),
name: 'desktop',
meta: {title: '主页'}
meta: { title: '教学工作台' }
},
{
path: '/homepage',
component: () => import('@/views/homePage/index.vue'),
name: 'homepage',
meta: {title: '主页'}
path: 'standardanalysis',
component: () => import('@/views/teach/standardAnalysis/index.vue'),
name: 'standardanalysis',
meta: { title: '课标分析', showBread: true }
},
{
path: '/resource',
component: () => import('@/views/resource/index.vue'),
name: 'resource',
meta: {title: '资源库'}
path: 'textbookAnalysis',
component: () => import('@/views/textbookAnalysis/index.vue'),
name: 'textbookAnalysis',
meta: { title: '教材分析', showBread: true }
},
{
path: '/prepare',
path: 'examReport',
component: () => import('@/views/examReport/index.vue'),
name: 'examReport',
meta: { title: '考试分析', showBread: true }
},
{
path: 'prepare',
component: () => import('@/views/prepare/index.vue'),
name: 'prepare',
meta: {title: '教学实践'}
meta: { title: '教学实践', showBread: true }
},
{
path: 'newClassTask',
component: () => import('@/views/classTask/newClassTask.vue'),
name: 'newClassCorrect',
meta: { title: '作业设计', showBread: true }
},
{
path: 'classTaskAssign',
component: () => import('@/views/classTask/classTaskAssign.vue'),
name: 'classTaskAssign',
meta: { title: '作业布置', showBread: true }
},
{
path: 'classTask',
component: () => import('@/views/classTask/classTask.vue'),
name: 'classCorrect',
meta: { title: '作业批改', showBread: true }
},
{
path: '/teach',
component: () => import('@/views/teach/index.vue'),
name: 'teach',
meta: {title: '授课'}
},
{
path: '/standardanalysis',
component: () => import('@/views/teach/standardAnalysis/index.vue'),
name: 'standardanalysis',
meta: {title: '课标分析'}
},
{
path: '/textbookAnalysis',
component: () => import('@/views/textbookAnalysis/index.vue'),
name: 'textbookAnalysis',
meta: {title: '教材分析'}
meta: { title: '授课' }
},
{
path: '/profile',
component: () => import('@/views/profile/index.vue'),
name: 'profile',
meta: {title: '个人中心'}
meta: { title: '个人中心' }
},
{
path: '/testpdf',
component: () => import('@/views/testPdf/index.vue'),
name: 'testpdf',
meta: {title: '测试PDF'}
meta: { title: '测试PDF' }
},
{
path: '/classReserv',
component: () => import('@/views/classManage/classReserv.vue'),
name: 'classReserv',
meta: {title: '课程预约'}
meta: { title: '课程预约' }
},
{
path: '/class',
component: () => import('@/views/classManage/index.vue'),
name: 'class',
meta: {title: '班级中心'},
meta: { title: '班级中心' }
},
{
path: '/classTaskAssign',
component: () => import('@/views/classTask/classTaskAssign.vue'),
name: 'classTaskAssign',
meta: {title: '作业布置'},
path: '/joinSchool',
component: () => import('@/views/joinSchool/index.vue'),
name: 'joinSchool',
meta: {title: '加入学校'}
},
{
path: '/classTask',
component: () => import('@/views/classTask/classTask.vue'),
name: 'classCorrect',
meta: {title: '作业批改'},
path: '/schoolCertification',
component: () => import('@/views/schoolCertification/index.vue'),
name: 'schoolCertification',
meta: {title: '学校认证'}
},
{
path: '/newClassTask',
component: () => import('@/views/classTask/newClassTask.vue'),
name: 'newClassCorrect',
meta: {title: '作业设计'},
},
{
path: '/examReport',
component: () => import('@/views/examReport/index.vue'),
name: 'examReport',
meta: {title: '考试分析'}
},
{
path: '/hashrate',
component: () => import('@/views/hashrate/index.vue'),
name: 'hashrate',
meta: {title: '算力'}
},
{
path: '/setting',
component: () => import('@/views/setting/index.vue'),
name: 'setting',
meta: {title: '设置'}
path: '/schoolManagement',
component: () => import('@/views/schoolManagement/index.vue'),
name: 'schoolManagement',
meta: {title: '学校管理'}
},
]
},
...toolRouters
{
path: '/resource',
component: Layout,
children: [
{
path: 'index',
component: () => import('@/views/resource/index.vue'),
name: 'resource',
meta: { title: '资源库' },
}
]
},
{
path: '/hashrate',
component: Layout,
children: [
{
path: 'index',
component: () => import('@/views/hashrate/index.vue'),
name: 'hashrate',
meta: { title: '算力' },
}
]
},
{
path: '/setting',
component: Layout,
children: [
{
path: 'index',
component: () => import('@/views/setting/index.vue'),
name: 'setting',
meta: { title: '设置' },
}
]
}
]
const router = createRouter({
history: createWebHashHistory(), //hash 模式
routes: constantRoutes
routes: [...constantRoutes,...dynamicRoutes]
})
export default router

View File

@ -1,5 +1,6 @@
import { defineStore } from 'pinia'
import { login, logout, getInfo } from '@/api/login'
import { login, logout, getInfo, getdeptTree } from '@/api/login'
import {school} from '@/api/apiService'
import { getToken, setToken, removeToken } from '@/utils/auth'
import defAva from '@/assets/images/user.png'
@ -11,7 +12,8 @@ const useUserStore = defineStore('user', {
avatar: '',
roles: [],
permissions: [],
user: {}
user: {},
DeptInfo:{}
}),
actions: {
// 登录
@ -80,6 +82,12 @@ const useUserStore = defineStore('user', {
})
})
},
// 注册部门信息
getDeptInfo(){
school.registerinfo().then(res=>{
this.DeptInfo=res.data || {}
})
},
// 退出系统
logOut() {
return new Promise((resolve, reject) => {

View File

@ -167,3 +167,64 @@ export function getTomorrow() {
return tomorrow;
}
/**
* 当前日期的 前几天
* @param {*} index 天数
* @param {*} format true 返回中国标准时间Wed Oct 02 2024 08:00:00 GMT+0800 (中国标准时间) 格式 false 返回标准时间格式 YYYY-MM-DD
* @returns
*/
export function getTheOtherDay(index, format=true) {
let date = new Date();
var year = date.getFullYear()
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
var day = date.getDate()- index < 10 ? '0' + (date.getDate()- index) : date.getDate()- index
// 前 index 天的时间
if(format){
let tomorrow = `${year}-${month}-${day}`;
return new Date(tomorrow);
}else{
let tomorrow = `${year}-${month}-${day}`;
return tomorrow;
}
}
/**
* 当前日期的 后几天
* @param {*} index 天数
* @param {*} format true 返回中国标准时间Wed Oct 02 2024 08:00:00 GMT+0800 (中国标准时间) 格式 false 返回标准时间格式 YYYY-MM-DD
* @returns
*/
export function getTheOtheNextDay(index, format=true) {
const date = new Date();
var year = date.getFullYear()
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
var day = date.getDate()+ index < 10 ? '0' + (date.getDate()+ index) : date.getDate()+ index
// 前 index 天的时间
if(format){
const tomorrow = `${year}-${month}-${day}`;
return new Date(tomorrow);
}else{
const tomorrow = `${year}-${month}-${day}`;
return tomorrow;
}
}
/**
* Wed Oct 02 2024 08:00:00 GMT+0800 (中国标准时间) 转为日期格式: YYYY-MM-DD
*
* @param {*} format
* @returns
*/
export const getDateFormatDate = (newDate)=> {
const now = newDate; // new Date();
const year = now.getFullYear();
const month = (now.getMonth() + 1).toString().padStart(2, '0');
const day = now.getDate().toString().padStart(2, '0');
return `${year}-${month}-${day}`;
}

View File

@ -4,20 +4,16 @@
<div class="class-reserv-tabs">
<el-segmented v-model="tabActive" block :options="tabOptions" size="large" />
</div>
<div v-if="tabActive === '已结束'">
<div v-if="tabActive === '已批改'">
<div class="demo-date-picker">
<div class="block">
<el-date-picker
v-model="EndDate"
type="date"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
placeholder="请选择截止日期"
size="large"
:disabled-date="disabledDate"
@change="changeEndDate"
/>
</div>
<el-date-picker
v-model="startEndDate"
type="daterange"
start-placeholder="Start Date"
end-placeholder="End Date"
:default-time="defaultTime"
@change="changeStartEndDate"
/>
</div>
</div>
</div>
@ -27,7 +23,7 @@
<div v-if="classWorkList.length > 0">
<task-item
v-for="(item, index) in activeDataList"
v-show="tabActive === '进行中'"
v-show="tabActive === '待批改'"
:key="index"
:item="item"
:tabactive="tabActive"
@ -36,7 +32,7 @@
></task-item>
<task-item
v-for="(item, index) in doneDataList"
v-show="tabActive === '已结束'"
v-show="tabActive === '已批改'"
:key="index"
:item="item"
:tabactive="tabActive"
@ -63,9 +59,8 @@ import { listByDeadDate, listClassworkdata } from '@/api/classTask'
import TaskItem from '@/views/classTask/container/classTask/task-item.vue'
// import ItemDialog from '@/views/classTask/container/item-dialog.vue'
import { useToolState } from '@/store/modules/tool'
import { getCurrentTime } from '@/utils/date'
import { getCurrentTime, getDateFormatDate, getTheOtherDay, getTheOtheNextDay } from '@/utils/date'
import useUserStore from '@/store/modules/user'
import useClassTaskStore from "@/store/modules/classTask";
import {createWindow} from '@/utils/tool'
import {sessionStore} from '@/utils/store'
import {debounce } from '@/utils/comm'
@ -73,13 +68,21 @@ import {debounce } from '@/utils/comm'
const toolState = useToolState();
const classTaskStore = useClassTaskStore()
const userStore = useUserStore().user
// const itemDialogRef = ref(null)
const tabOptions = ref(['进行中', '已结束'])
const tabActive = ref('进行中')
const tabOptions = ref(['待批改', '已批改'])
const tabActive = ref('待批改')
const dataList = ref([])
const EndDate = ref(getCurrentTime('YYYY-MM-DD'))
// 23
const startEndDate = ref([
getTheOtherDay(3),
getTheOtheNextDay(3),
])
const defaultTime = ref<[Date, Date]>([
getTheOtherDay(3),
getTheOtheNextDay(3),
])
//
const classWorkList = ref([])
@ -91,23 +94,24 @@ const loading = ref(false)
const activeDataList = computed(() => {
return classWorkList.value
})
const doneDataList = computed(() => {
return classWorkList.value
})
const deleteReserv = (item) => {
console.log('删除待开发', item)
// dataList.value = dataList.value.filter((is) => {
// return is.id !== item.id
// })
}
const doneDataList = computed(() => {
return classWorkList.value
})
//
const disabledDate = (time) => {
return time.getTime() > Date.now()
}
//
const changeEndDate = (val) => {
console.log('止日期改变', val)
const changeStartEndDate = (val) => {
console.log('止日期改变', val)
getData() //
}
@ -115,245 +119,202 @@ const changeEndDate = (val) => {
const getData = async () => {
classWorkList.value = []
loading.value = true
// 1
// getClassList()
// 2
// 1
await getClassWorkList()
// 3
// 2
getStudentClassWorkData()
loading.value = false
}
/**
* 1获取班级列表数据
* TODO 这里暂时取班级id的list后续需要在修改
*/
const getClassList = () => {
if(classTaskStore.classListIds.length==0){
// ids idlist
classTaskStore.listClassmain({ classuserid: userStore.userId, pageSize: 100, status: 'open' })
}
}
/**
* 2获取班级作业
* 1获取班级作业
*/
const getClassWorkList = async () => {
//if(classTaskStore.classListIds.length>0){
{
// homeworklist
const response = await listByDeadDate({
edituserid: userStore.userId, // id
edustage: userStore.edustage, //
edusubject: userStore.edusubject,//
// deaddate: tabActive.value === ''? getTomorrow() : EndDate.value,//
deaddate: EndDate.value,//
status: '1', // 1-
orderby: 'deaddate DESC',
pageSize: 100,
})
// homeworklist
const response = await listByDeadDate({
edituserid: userStore.userId, // id
edustage: userStore.edustage, //
edusubject: userStore.edusubject,//
startdate: tabActive.value === '待批改'? '' : getDateFormatDate(startEndDate.value[0]),
deaddate: tabActive.value === '待批改'? '' : getDateFormatDate(startEndDate.value[1]),//
status: tabActive.value === '待批改'? '1' : '2', // 1-
orderby: 'deaddate DESC',
pageSize: 100,
})
/**
* 2024-10-17 由于 后面截止时间加了 时分特加判断
* 1进行中以前是以明天判断现改为传当天的日期并根据当前日期的时分与截止日期进行判断
* 2已结束以前默认是以明天判断现依然以明天为判断并根据当前日期时分大于截止日期时分判断
*/
let list = [];
if(tabActive.value === '进行中'){
//
list = response.rows&&response.rows.filter(item => item.deaddate && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate); //
}else{
list = response.rows&&response.rows.filter(item => item.deaddate && getCurrentTime('YYYY-MM-DD HH:mm') > item.deaddate); //
let list = response.rows || [];
for (var i = 0; i < list.length; i++) {
//
list[i].workdatalist = [] //
list[i].workdatalistVisible = false
list[i].feedtimelength = 0 //
list[i].rightAnswerCount = 0
list[i].scoingRate = 0 + '%' //
list[i].averagetime = 0 //
// ----------------------------------------------
// UI
if (list[i].worktype == '学习目标定位') {
list[i].workclass = 'success'
list[i].workcodesList = JSON.parse(list[i].workcodes)
} else if (list[i].worktype == '教材研读') {
list[i].workclass = 'primary'
} else if (list[i].worktype == '框架梳理') {
list[i].workclass = 'warning'
} else if (list[i].worktype == '学科定位') {
list[i].workclass = 'info'
} else if (list[i].worktype == '习题训练') {
list[i].workclass = 'danger'
} else {
list[i].workclass = ''
}
for (var i = 0; i < list.length; i++) {
//
list[i].workdatalist = []
list[i].workdatacount = 0 //
list[i].workdatalistVisible = false
list[i].workdatafeedbackcount = 0 //
list[i].feedtimelength = 0
list[i].rightAnswerCount = 0
list[i].scoingRate = 0 + '%' //
list[i].averagetime = 0 //
// ----------------------------------------------
// UI
if (list[i].worktype == '学习目标定位') {
list[i].workclass = 'success'
list[i].workcodesList = JSON.parse(list[i].workcodes)
} else if (list[i].worktype == '教材研读') {
list[i].workclass = 'primary'
} else if (list[i].worktype == '框架梳理') {
list[i].workclass = 'warning'
} else if (list[i].worktype == '学科定位') {
list[i].workclass = 'info'
} else if (list[i].worktype == '习题训练') {
list[i].workclass = 'danger'
} else {
list[i].workclass = ''
}
//
if (list[i].entpcourseworklist != '') {
list[i].entpcourseworklistarray = JSON.parse(
'[' + list[i].entpcourseworklist + ']'
)
} else {
list[i].entpcourseworklistarray = []
}
// classworkdatastudentids
if (
list[i].classworkdatastudentids != '' &&
list[i].classworkdatastudentids != null &&
list[i].classworkdatastudentids != 'null'
) {
const stuList = JSON.parse('[' + list[i].classworkdatastudentids + ']')
list[i].workdatacount = stuList.length
}
//
if (list[i].entpcourseworklist != '') {
list[i].entpcourseworklistarray = JSON.parse(
'[' + list[i].entpcourseworklist + ']'
)
} else {
list[i].entpcourseworklistarray = []
}
// (workdatacount)>0
if (list && list.length > 0) {
classWorkList.value = list && list.filter((item) => item.workdatacount > 0)
//TODO total
total.value = 0
}else{
classWorkList.value = []
total.value = 0
}
loading.value = false
}
// (workdataresultsum)>0
if (list && list.length > 0) {
classWorkList.value = list && list.filter((item) => item.workdataresultsum > 0)
//TODO total
total.value = 0
}else{
classWorkList.value = []
total.value = 0
}
loading.value = false
}
/**
* 3获取多个班级学生作业数据
* 2获取多个班级学生作业数据
* 查询已交的列表
* @param workList 需要更新的作业list
* @param Refresh true 不用刷新false 需要刷新
*/
const getStudentClassWorkData = async() => {
// const { chapterId } = await useGetHomework(props.bookobj.node)
// this.entpcourseid = chapterId
//if(classTaskStore.classListIds.length>0){
// listClassworkdataByDeadDate({
// edituserid: userStore.userId, // id
// classids: classTaskStore.classListIds.join(','),
// edusubject: userStore.edusubject,//
// deaddate: tabActive.value === ''? getTomorrow() : EndDate.value,//
// deaddate: EndDate.value,//
// //status: '1', // 1-
// orderby: "deaddate DESC",//
// pageSize: 1000,
// })
const getStudentClassWorkData = async(workList = [], Refresh = true) => {
// (workdataresultcount )
let SubmitClWorkList = [];
if(Refresh){
SubmitClWorkList = classWorkList.value.filter((item) => item.workdataresultcount > 0) ;
}else{
SubmitClWorkList = workList;
}
// listClassworkdataNew({
// classworkids: ids, // id
// edituserid: userStore.userId, // id
// edusubject: userStore.edusubject,//
// evalStatus: 1,
// pageSize: 1000,
// })
console.log('有提交的作业', SubmitClWorkList)
const ids = SubmitClWorkList&&SubmitClWorkList.map((item) => item.id).join(',');
if (ids == '') {
return;
}
listClassworkdata({
classworkids: ids,
pageSize: 1000,
}).then((res) => {
for (var t = 0; t < classWorkList.value.length; t++) {
for (var i = 0; i < res.rows.length; i++) {
// finishtimelength != '0'
if (res.rows[i].classworkid == classWorkList.value[t].id && res.rows[i].finishtimelength != '0') {
console.log('==================')
// /
// resultcount0
//classWorkList.value[t].workdataresultcount++
//
classWorkList.value[t].feedtimelength += parseInt(res.rows[i].finishtimelength)
{
const ids = classWorkList.value.map((item) => item.id).join(',');
if (ids == '') {
return;
}
listClassworkdata({
classworkids: ids,
pageSize: 1000,
}).then((res) => {
for (var t = 0; t < classWorkList.value.length; t++) {
for (var i = 0; i < res.rows.length; i++) {
if (res.rows[i].classworkid == classWorkList.value[t].id && res.rows[i].finishtimelength != '0') {
console.log('==================')
// /
// resultcount0
classWorkList.value[t].workdatafeedbackcount++
//
if (
res.rows[i].classworkevallist != '' &&
res.rows[i].classworkevallist != null &&
res.rows[i].classworkevallist != 'null'
) {
let replacedString = res.rows[i].classworkevallist.replace(/""/g, '"')
// , : "{\"id\":172907, \"rating\":0, \"teacherRating\":0, \"entpcourseworkid\":358520, \"feedcontent\":\"\", \"score\":4, \"rightanswer\":\"\"},{\"id\":172908, \"rating\":0, \"teacherRating\":0, \"entpcourseworkid\":358521, \"feedcontent\":\"\", \"score\":4, \"rightanswer\":\"\"},{\"id\":172909, \"rating\":0, \"teacherRating\":0, \"entpcourseworkid\":363096, \"feedcontent\":\"\", \"score\":4, \"rightanswer\":\"\"},{\"id\":172910, \"rating\":0, \"teacherRating\":0, \"entpcourseworkid\":363098, \"feedcontent\":\"<bdo class=\"mathjye-underpoint2\"></bdo>\", \"score\":4, \"rightanswer\":\"<bdo class=\"mathjye-underpoint2\"></bdo>\"},{\"id\":172911, \"rating\":0, \"teacherRating\":0, \"entpcourseworkid\":363100, \"feedcontent\":\"<bdo class=\"mathjye-underpoint2\"></bdo>\", \"score\":4, \"rightanswer\":\"<bdo class=\"mathjye-underpoint2\"></bdo>\"}"
replacedString = escapeHtmlQuotes(res.rows[i].classworkevallist).replace(
/"(\[.*\])"/g,
'$1'
)
replacedString = escapeHtmlQuotes(res.rows[i].classworkevallist)
var evalarray
try {
evalarray = JSON.parse('[' + res.rows[i].classworkevallist + ']')
} catch {
evalarray = JSON.parse('[' + replacedString + ']')
}
//
classWorkList.value[t].feedtimelength += parseInt(res.rows[i].finishtimelength)
//
if (
res.rows[i].classworkevallist != '' &&
res.rows[i].classworkevallist != null &&
res.rows[i].classworkevallist != 'null'
) {
let replacedString = res.rows[i].classworkevallist.replace(/""/g, '"')
// , : "{\"id\":172907, \"rating\":0, \"teacherRating\":0, \"entpcourseworkid\":358520, \"feedcontent\":\"\", \"score\":4, \"rightanswer\":\"\"},{\"id\":172908, \"rating\":0, \"teacherRating\":0, \"entpcourseworkid\":358521, \"feedcontent\":\"\", \"score\":4, \"rightanswer\":\"\"},{\"id\":172909, \"rating\":0, \"teacherRating\":0, \"entpcourseworkid\":363096, \"feedcontent\":\"\", \"score\":4, \"rightanswer\":\"\"},{\"id\":172910, \"rating\":0, \"teacherRating\":0, \"entpcourseworkid\":363098, \"feedcontent\":\"<bdo class=\"mathjye-underpoint2\"></bdo>\", \"score\":4, \"rightanswer\":\"<bdo class=\"mathjye-underpoint2\"></bdo>\"},{\"id\":172911, \"rating\":0, \"teacherRating\":0, \"entpcourseworkid\":363100, \"feedcontent\":\"<bdo class=\"mathjye-underpoint2\"></bdo>\", \"score\":4, \"rightanswer\":\"<bdo class=\"mathjye-underpoint2\"></bdo>\"}"
replacedString = escapeHtmlQuotes(res.rows[i].classworkevallist).replace(
/"(\[.*\])"/g,
'$1'
)
replacedString = escapeHtmlQuotes(res.rows[i].classworkevallist)
var evalarray
try {
evalarray = JSON.parse('[' + res.rows[i].classworkevallist + ']')
} catch {
evalarray = JSON.parse('[' + replacedString + ']')
for (var e = 0; e < evalarray.length; e++) {
if (res.rows[i].worktype == '常规作业') {
evalarray[e].feedcontent = escapeHtmlQuotes(evalarray[e].feedcontent).replace(
/"(\[.*\])"/g,
'$1'
)
evalarray[e].feedcontent = escapeHtmlQuotes(evalarray[e].feedcontent)
}
for (var e = 0; e < evalarray.length; e++) {
if (res.rows[i].worktype == '常规作业') {
evalarray[e].feedcontent = escapeHtmlQuotes(evalarray[e].feedcontent).replace(
/"(\[.*\])"/g,
'$1'
)
evalarray[e].feedcontent = escapeHtmlQuotes(evalarray[e].feedcontent)
}
if (evalarray[e].feedcontent == evalarray[e].rightanswer) {
//
classWorkList.value[t].rightAnswerCount++
}
if (evalarray[e].feedcontent == evalarray[e].rightanswer) {
//
classWorkList.value[t].rightAnswerCount++
}
}
}
// workdatacount
if (res.rows[i].classworkid == classWorkList.value[t].id) {
classWorkList.value[t].workdatalist.push(res.rows[i])
}
}
// workdatacount0
if (
classWorkList.value[t].workdataresultcount > 0 &&
classWorkList.value[t].workdatacount > 0
) {
classWorkList.value[t].finishpercent = parseInt(
(classWorkList.value[t].workdataresultcount / classWorkList.value[t].workdatacount) * 100
)
} else {
classWorkList.value[t].finishpercent = 0
// workdataresultsum
if (res.rows[i].classworkid == classWorkList.value[t].id) {
classWorkList.value[t].workdatalist.push(res.rows[i])
}
//
// 2024-04-12by jackyshen
//
if (classWorkList.value[t].workdatafeedbackcount > 0) {
classWorkList.value[t].averagetime = Math.ceil(classWorkList.value[t].feedtimelength / classWorkList.value[t].workdatafeedbackcount / 60).toFixed(0)
} else {
classWorkList.value[t].averagetime = 0
}
//
//
// /**100
if (
classWorkList.value[t].entpcourseworklistarray &&
classWorkList.value[t].entpcourseworklistarray.length > 0
) {
var dd =
(classWorkList.value[t].rightAnswerCount /
(classWorkList.value[t].entpcourseworklistarray.length *
classWorkList.value[t].workdatacount)) *
100
classWorkList.value[t].scoingRate = dd.toFixed(0) + '%'
} else {
classWorkList.value[t].scoingRate = '0%'
}
//
//
}
})
}
// : workdataresultcount ; workdataresultsum 0;
if (classWorkList.value[t].workdataresultcount > 0 && classWorkList.value[t].workdataresultsum > 0 ) {
classWorkList.value[t].finishpercent = parseInt(
(classWorkList.value[t].workdataresultcount / classWorkList.value[t].workdataresultsum) * 100
)
} else {
classWorkList.value[t].finishpercent = 0
}
/** 计算 已批阅进度 */
// workdataresultsum teacherrationgcount
// (-) / * 100
if (classWorkList.value[t].workdataresultsum > 0) {
classWorkList.value[t].teacherCorrectionProgress = parseInt(
((classWorkList.value[t].teacherrationgcount) / classWorkList.value[t].workdataresultsum) * 100
)
} else {
classWorkList.value[t].teacherCorrectionProgress = 0
}
//
// 2024-04-12by jackyshen
// /
if (classWorkList.value[t].workdataresultcount > 0) {
classWorkList.value[t].averagetime = Math.ceil(classWorkList.value[t].feedtimelength / classWorkList.value[t].workdataresultcount / 60).toFixed(0)
} else {
classWorkList.value[t].averagetime = 0
}
// /**100
if (
classWorkList.value[t].entpcourseworklistarray &&
classWorkList.value[t].entpcourseworklistarray.length > 0
) {
var dd =
(classWorkList.value[t].rightAnswerCount /
(classWorkList.value[t].entpcourseworklistarray.length *
classWorkList.value[t].workdataresultsum)) *
100
classWorkList.value[t].scoingRate = dd.toFixed(0) + '%'
} else {
classWorkList.value[t].scoingRate = '0%'
}
}
})
}
@ -379,6 +340,7 @@ const getStudentClassWorkDataPolling = () => {
getStudentVisible()
//
pollingST.value = setInterval(() => {
console.log('轮询查询学生作业进度')
getStudentVisible()
}, 1000 * 10)
}
@ -413,75 +375,56 @@ onUnmounted(() => {
// [] -
const getStudentVisible = async () => {
if (classTaskStore.classListIds.length <= 0) {
return
if(!classWorkList.value.length>0){
return;
}
//
const response = await listByDeadDate({
classidarray: classTaskStore.classListIds.join(','),
edituserid: userStore.userId, // id
edustage: userStore.edustage,//
edustage: userStore.edustage, //
edusubject: userStore.edusubject,//
// deaddate: tabActive.value === ''? getTomorrow() : EndDate.value,//
deaddate: EndDate.value,//
status: '1', // 1-
// orderby: 'concat(deaddate,uniquekey) DESC',
startdate: tabActive.value === '待批改'? '' : getDateFormatDate(startEndDate.value[0]),
deaddate: tabActive.value === '待批改'? '' : getDateFormatDate(startEndDate.value[1]),//
status: tabActive.value === '待批改'? '1' : '2', // 1-
orderby: 'deaddate DESC',
pageSize: 100
pageSize: 100,
})
/**
* 2024-10-17 由于 后面截止时间加了 时分特加判断
* 1进行中以前是以明天判断现改为传当天的日期并根据当前日期的时分与截止日期进行判断
* 2已结束以前默认是以明天判断现依然以明天为判断并根据当前日期时分大于截止日期时分判断
*/
let list = [];
if(tabActive.value === '进行中'){
//
list = response.rows&&response.rows.filter(item => item.deaddate && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate); //
}else{
list = response.rows&&response.rows.filter(item => item.deaddate && getCurrentTime('YYYY-MM-DD HH:mm') > item.deaddate); //
}
let list = response.rows || [];
const curWorkList = list
/**
* warn: 这里仅更新了finishpercent(进度条), 且当前作业布置推送新任务时, curWorkList中会查到新的任务与当前页面中this.classWorkList长度不一致,
* 故这里需循环this.classWorkList且只更新当前页面中的存在的任务进度
*/
for (let t = 0; t < classWorkList.value.length; t++) {
// []
// if( getDateTime > classWorkList.value[t].deaddate ){
// continue;
// }
// (index)
let curWork = curWorkList.find((work) => work.id === classWorkList.value[t].id)
// workdataresultcount workdatacount0
if (curWork && curWork.workdataresultcount > 0 && classWorkList.value[t].workdatacount > 0) {
classWorkList.value[t].workdataresultcount = curWork.workdataresultcount
//
classWorkList.value[t].finishpercent = parseInt(
(classWorkList.value[t].workdataresultcount / classWorkList.value[t].workdatacount) * 100
)
//
if (classWorkList.value[t].workdatafeedbackcount > 0) {
classWorkList.value[t].averagetime = Math.ceil(classWorkList.value[t].feedtimelength / classWorkList.value[t].workdatafeedbackcount / 60).toFixed(0)
} else {
classWorkList.value[t].averagetime = 0
let newList = [];
for(let i = 0; i < classWorkList.value.length; i++){
// listidlistid listlist
const isList = list.filter((item) => item.id === classWorkList.value[i].id);
if(isList.length === 0){
// listidlistidlist
classWorkList.value.splice(i,1);
}
for(let j = 0; j < list.length; j++){
// workdataresultcount ;
if(classWorkList.value[i].id === list[j].id && classWorkList.value[i].workdataresultcount != list[j].workdataresultcount){
// =
newList.push(list[j]);
}
//
classWorkList.value[t].teacherrationgcount = curWork.teacherrationgcount
} else {
//
if(curWork && curWork.workdataresultcount == 0){
//
classWorkList.value[t].teacherrationgcount = curWork.teacherrationgcount
// teacherrationgcount
if(classWorkList.value[i].id === list[j].id && classWorkList.value[i].teacherrationgcount != list[j].teacherrationgcount){
//
if (classWorkList.value[i].workdataresultsum > 0) {
//
classWorkList.value[i].teacherrationgcount = list[j].teacherrationgcount;
classWorkList.value[i].teacherCorrectionProgress = parseInt(
((list[j].teacherrationgcount) / list[j].workdataresultsum) * 100
)
} else {
classWorkList.value[i].teacherCorrectionProgress = 0
}
}
classWorkList.value[t].finishpercent = 0
}
}
return 1
if(newList.length>0){
//
const list = newList&&newList.filter((item) => item.workdataresultcount > 0) ;
getStudentClassWorkData(list,false);
}
}
@ -489,16 +432,27 @@ const getStudentVisible = async () => {
watch(
() => [dataList, toolState.isTaskWin],
() => {
console.log('=监听到批改窗口打开了===', toolState.isTaskWin)
console.log('监听--批改窗口是否打开===', toolState.isTaskWin)
if(!toolState.isTaskWin){
closeDialog();//
if(tabActive.value === '待批改'){
closeDialog();//
}
}
}
)
watch(tabActive, (newVal,oldVal)=>{
console.log('newVal',newVal);
getData() //
if(newVal === '待批改'){
//
console.log('监听---开启轮询')
closeDialog();
}else{
//
console.log('监听---关闭轮询')
clearInterval(pollingST.value);
}
})
</script>

View File

@ -1,15 +1,10 @@
<template>
<div class="page-classTaskAssign flex">
<el-menu
default-active="1"
class="el-menu-vertical-demo"
:collapse="isCollapse"
>
<!--左侧 教材 目录-->
<div v-if="!isCollapse" style="height: 100%;overflow: hidden;">
<ChooseTextbook @change-book="getData" @node-click="getData" />
</div>
</el-menu>
<!--左侧 教材 目录-->
<div v-if="!isCollapse" style="height: 100%;overflow: hidden;">
<ChooseTextbook @change-book="getData" @node-click="getData" />
</div>
<div class="page-right" :style="{'margin-left': isCollapse ? '0' : '20px'}">
<!-- 标题 -->

View File

@ -14,31 +14,40 @@
&nbsp;|&nbsp; 截止时间{{ item.deaddate }} &nbsp;|&nbsp;{{ tabactive }}
</div>
</div>
<div v-if=" tabactive == '待批改' " class="class-reserv-item-progress">
<el-progress :text-inside="true" :stroke-width="26" :percentage="item.finishpercent" :color="'#000fff'" style="cursor: pointer"></el-progress>
<span>
已交(
<span>
<span v-if="item.workdataresultcount!=0" style="color:#000fff; font-weight: 900; font-size: 15px">{{ item.workdataresultcount }}</span>
<span v-if="item.workdataresultcount==0">{{ item.workdataresultcount }}</span>
/{{ item.workdataresultsum }}
</span>
)
</span>
</div>
<div v-if=" tabactive == '待批改' " class="class-reserv-item-progress">
<el-progress :text-inside="true" :stroke-width="26" :percentage="item.teacherCorrectionProgress" :color="'#ff7f00'" style="cursor: pointer"></el-progress>
<span>
已批阅(<span style="color: #ff7f00; font-weight: 900; font-size: 15px">{{ item.teacherrationgcount}}</span>)
</span>
</div>
<!-- TODO 练习次数引用次数 这里随便的假数据-->
<div v-if=" tabactive == '已批改' " class="class-reserv-item-tool">
<span style="color:#000fff; font-weight: 900; font-size: 15px">{{ item.workdataresultsum }}</span>
<span>练习次数</span>
</div>
<div v-if=" tabactive == '已批改' " class="class-reserv-item-tool">
<span style="color: #ff7f00; font-weight: 900; font-size: 15px">{{ item.teacherrationgcount?item.workdataresultsum - item.teacherrationgcount:item.workdataresultsum }}</span>
<span>引用次数</span>
</div>
<div class="class-reserv-item-tool">
<span>
<span v-if="item.workdataresultcount!=0" style="color:#000fff; font-weight: 900; font-size: 15px">{{ item.workdataresultcount }}</span>
<span v-if="item.workdataresultcount==0">{{ item.workdataresultcount }}</span>
/{{ item.workdatacount }}</span>
<span>已交</span>
</div>
<div class="class-reserv-item-tool">
<!-- 总人数-已批阅人数 -->
<span style="color: #ff7f00; font-weight: 900; font-size: 15px">{{ item.teacherrationgcount?item.workdatacount - item.teacherrationgcount:item.workdatacount }}</span>
<span>待批阅</span>
</div>
<div class="class-reserv-item-tool">
<span>
<!-- {{ item.averagetime?item.averagetime:0 }} -->
<!-- <span v-if=" item.averagetime<60 ">
<span style="color: #007fff; font-weight: 900; font-size: 15px">{{ item.averagetime }}</span>分钟
</span>
<span v-if=" item.averagetime==60 ">
<span style="color: #007fff; font-weight: 900; font-size: 15px">1</span>小时
</span>
<span v-if=" item.averagetime>60 ">
<span style="color: #007fff; font-weight: 900; font-size: 15px">{{ Math.floor(item.averagetime / 60)}}</span>小时
<span style="color: #007fff; font-weight: 900; font-size: 15px">{{ Math.floor(item.averagetime % 60)}}</span>分钟
</span> -->
<span style="color: #007fff; font-weight: 900; font-size: 15px">{{ item.averagetime }}</span>分钟
</span>
<span>平均用时</span>
@ -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;

View File

@ -89,8 +89,8 @@
</el-col>
</el-row>
<!-- 习题表格 -->
<div class="middle" >
<el-table :data="workResource.entpCourseWorkList" style="width: 100%; height: 100%;">
<div class="infinite-list-wrapper" >
<!-- <el-table :data="workResource.entpCourseWorkList" style="width: 100%; height: 100%;">
<el-table-column type="index" width="60" />
<el-table-column align="left" >
<template #header>
@ -114,7 +114,48 @@
<el-button type="primary" @click="handleClassWorkQuizAdd('entpcourseworklist', scope.row.id)">添加</el-button>
</template>
</el-table-column>
</el-table>
</el-table> -->
<ul
v-infinite-scroll="pageLoad"
class="infinite-list"
infinite-scroll-immediate="false"
infinite-scroll-distance='1'
infinite-scroll-delay="1000"
:infinite-scroll-disabled="pageDisabled"
>
<li v-for="(item,index) in workResource.entpCourseWorkList" :key="item" class="infinite-list-item">
<div align="left" style="width: 100%;" >
<!-- <template #header>
<div style="display: flex">
<div style="align-items: center;">题目内容</div>
</div>
</template> -->
<div @click="showExamAnalyseDrawer(item)">
<div>
<span style="width: 20px;">{{ index +1 }}. </span>
<span style="overflow: hidden; text-overflow: ellipsis" v-html="item.titleFormat"></span>
</div>
<div style="overflow: hidden; text-overflow: ellipsis; font-size: 0.9em; margin-top: 6px;" v-html="item.workdescFormat"></div>
<el-col :span="24" style="display: flex">
<div style="font-size: 1em; color: silver; padding-top: 5px">{{ item.entpname }} {{ item.editusername }}</div>
<div style="margin-left: 30px; font-size: 1em; color: silver; padding-top: 5px">{{ item.worktag }}</div>
</el-col>
</div>
</div>
<div align="right" style="width: 72px;">
<el-button type="primary" @click="handleClassWorkQuizAdd('entpcourseworklist', item.id)">添加</el-button>
</div>
</li>
</ul>
<p class="infinite-list-loading" v-if="pageParams.loading">加载中...</p>
<p class="infinite-list-noMove" v-if="pageNoMore">无更多试题...</p>
<div v-if="workResource.entpCourseWorkList.length == 0 && !pageParams.loading">
<el-empty
description="未找到相关试题"
style="width: 100%; height: 200px; margin-top: 20px;"
></el-empty>
</div>
</div>
<!-- 分页 这里不用-->
<!-- <div style="height: 55px;">
@ -231,14 +272,14 @@
</template>
<script setup>
import { onMounted, ref, nextTick, watch, reactive, getCurrentInstance } from 'vue'
import { onMounted, ref, nextTick, watch, reactive, getCurrentInstance, computed } from 'vue'
import { ElMessage } from 'element-plus'
import { cloneDeep } from 'lodash'
import { useRouter } from 'vue-router'
import {listEntpcoursework, listEntpcourseworkNew, getEntpcoursework} from '@/api/education/entpCourseWork'
import { addClassworkReturnId } from '@/api/teaching/classwork'
import { updateClasswork, listEvaluationclue,readFile, listClassworkeval,delClassworkeval,addClassworkeval,updateClassworkeval } from '@/api/classTask'
import { updateClasswork, listEvaluationclue, listClassworkeval,delClassworkeval,addClassworkeval,updateClassworkeval } from '@/api/classTask'
import { listEvaluation } from '@/api/subject'
import { listEntpcoursefile } from '@/api/education/entpcoursefile'
import { listKnowledgePoint } from "@/api/knowledge/knowledgePoint";
@ -250,7 +291,9 @@ import FileUpload from "@/components/FileUpload/index.vue";
import whiteboard from '@/components/whiteboard/whiteboard.vue'
import prevReadMsgDialog from '@/views/classTask/container/newTask/prevReadMsg-Dialog.vue'
import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue'
import { JYApiListCT, JYApiListOriginYear, JYApiListSO} from "@/utils/examQuestion/jyeoo"
import {throttle,debounce } from '@/utils/comm'
import { useToolState } from '@/store/modules/tool'
import useUserStore from '@/store/modules/user'
const userStore = useUserStore().user
@ -364,6 +407,24 @@ const boardLoading = ref(false);
//----------
const fileLoading = ref(false); // loading
//
const BASE_LIMIT_COUT = 50; //
const pageNoMore = computed( () => {
if (pageParams.value.total < 1) {
return false;
}
let count = BASE_LIMIT_COUT >= pageParams.value.total ? pageParams.value.total : pageParams.value.originCount+BASE_LIMIT_COUT;
return workResource.entpCourseWorkList.length >= count;
});
const pageDisabled = computed(() => pageParams.value.loading || pageNoMore.value);
const pageParams = ref({
loading: false, //
originCount: 0, //
isFirst: true, //
total: 0,
})
/***
* 作业类型切换
*/
@ -381,9 +442,33 @@ const changeFormType = (val) => {
const handleQueryParamFromEntpCourseWork = (queryType) => {
//
// this.paginationParams = {pageNum: 1,pageSize: 10};
//
initPageParams();
handleQueryFromEntpCourseWork(queryType);
};
let obj = {};
function Apis(key) {
obj[key] = [];
return function(task) {
return new Promise((resolve, reject) => {
obj[key].push(task);
Promise.all([...obj[key]]).then(res => {
const i = obj[key].findIndex(item => {
return item == task;
});
resolve(obj[key][i]);
//arr.splice(i, 1);
})
})
}
}
const client = new Apis('/paht');
/**
* @desc: 1习题训练 - 新查询试题
* @return: {*}
@ -392,34 +477,40 @@ const handleQueryParamFromEntpCourseWork = (queryType) => {
* 1 - 按条件查询
* 2 - 按关键词查询
*/
const handleQueryFromEntpCourseWork= (queryType) => {
//queryForm.pageNum = this.paginationParams.pageNum;
//queryForm.pageSize = this.paginationParams.pageSize;
const t = function(name, time) {
return new Promise(resolve => {
const queryForm = {
//
currentPage: paginationParams.pageNum,
pageSize: paginationParams.pageSize,
//
eid: props.bookobj.levelSecondId,
sectionName: props.bookobj.coursetitle,
edusubject: userStore.edusubject,
edustage: userStore.edustage,
//
//
worktype: entpCourseWorkQueryParams.worktype.label,
workTypeId: entpCourseWorkQueryParams.worktype.value,
//
workgroup: entpCourseWorkQueryParams.workgroup,
//
yearStr: entpCourseWorkQueryParams.yearStr !== '-1' ? entpCourseWorkQueryParams.yearStr:'',
//
thirdId: entpCourseWorkQueryParams.point.length > 0 ? entpCourseWorkQueryParams.point[0]:'',
//
keyword: entpCourseWorkQueryParams.keyWord && entpCourseWorkQueryParams.keyWord !== '' ? entpCourseWorkQueryParams.keyWord:'',
const queryForm = {
//
eid: props.bookobj.levelSecondId,
sectionName: props.bookobj.coursetitle,
edusubject: userStore.edusubject,
edustage: userStore.edustage,
//
//
worktype: entpCourseWorkQueryParams.worktype.label,
workTypeId: entpCourseWorkQueryParams.worktype.value,
//
workgroup: entpCourseWorkQueryParams.workgroup,
//
yearStr: entpCourseWorkQueryParams.yearStr !== '-1' ? entpCourseWorkQueryParams.yearStr:'',
//
thirdId: entpCourseWorkQueryParams.point.length > 0 ? entpCourseWorkQueryParams.point[0]:'',
//
keyword: entpCourseWorkQueryParams.keyWord && entpCourseWorkQueryParams.keyWord !== '' ? entpCourseWorkQueryParams.keyWord:'',
}
const entpcourseworkres = listEntpcourseworkNew(queryForm);
resolve(entpcourseworkres);
})
}
const handleQueryFromEntpCourseWork= async (queryType) => {
pageParams.value.loading = true;
//
// pageNum: paginationParams.pageNum,
// pageSize: paginationParams.pageSize,
// ( warn: )
// if (this.courseObj.edusubject=='' && this.courseObj.edustage=='') {
@ -427,35 +518,46 @@ const handleQueryFromEntpCourseWork= (queryType) => {
// queryForm.edusubject = '';
// }
listEntpcourseworkNew(queryForm).then(entpcourseworkres => {
// if (queryType == 1 && this.entpCourseWorkQueryParams.worktype == '') {
// // ,
// const allowedWorkTypes = ['', '', '', '', ''];
// workResource.entpCourseWorkList = entpcourseworkres.rows.filter(item => {
// return !allowedWorkTypes.includes(item.worktype);
// });
// } else {
// workResource.entpCourseWorkList = entpcourseworkres.rows;
// }
if(entpcourseworkres.data&&entpcourseworkres.data.length>0){
workResource.entpCourseWorkList = entpcourseworkres.data;
workResource.entpCourseWorkTotal = entpcourseworkres.data.length;
workResource.entpCourseWorkList.forEach(item=> {
if (item.worktype == '选择题') {
item.worktype = '单选题'
}
})
//
processList(workResource.entpCourseWorkList);
}else{
client(t('任务1', 1500)).then(res => {
console.log("请求返回",res);
if(paginationParams.pageNum == 1){
workResource.entpCourseWorkList = [];
workResource.entpCourseWorkTotal = 0
workResource.entpCourseWorkTotal = 0;
//
// pageParams.value.loading = false;
// pageParams.value.isFirst = true;
// pageParams.value.originCount = 0;
}
})
const data = res.data || [];
if(data && data.length>0){
// workResource.entpCourseWorkList = entpcourseworkres.data;
// workResource.entpCourseWorkTotal = entpcourseworkres.data.length;
data.forEach(item=> {
if (item.worktype == '选择题') {
item.worktype = '单选题'
}
})
//
processList(data);
workResource.entpCourseWorkList.push(...data);
//
if (pageParams.value.isFirst) {
pageParams.value.isFirst = false;
pageParams.value.originCount = workResource.entpCourseWorkList.length;
pageParams.value.total = parseInt(res.msg);
}
}
pageParams.value.loading = false;
});
//const entpcourseworkres = await listEntpcourseworkNew(queryForm);
// const data = entpcourseworkres.data;
}
//
@ -876,25 +978,85 @@ const showExamAnalyseDrawer = (row) => {
}
const pageLoad = async() => {
console.log("加载中...")
paginationParams.pageNum ++ ,
//paginationParams.pageSize = 2,
await handleQueryFromEntpCourseWork(0);
}
const initPageParams = () => {
//
workResource.entpCourseWorkList = [];
workResource.entpCourseWorkTotal = 0
//
pageParams.value.loading = false;
pageParams.value.isFirst = true;
pageParams.value.originCount = 0;
pageParams.value.total = 0;
//
paginationParams.pageNum = 1;
paginationParams.pageSize = 10;
}
onMounted(async() => {
//
const name = userStore.edustage + userStore.edusubject;
const jyCT = await JYApiListCT(proxy, name);
if (jyCT.length == 0) {
ElMessage.error('获取题型失败!');
return;
}
entpCourseWorkTypeList.value = jyCT;
//
entpCourseWorkYearList.value = JYApiListOriginYear();
entpCourseWorkGroupList.value = await JYApiListSO(proxy, name);
onMounted(() => {
})
// const refreshData = () => {
// console.log("")
// //
// initPageParams();
// //
// handleQueryFromEntpCourseWork(0);
// //
// getQueryFromEvaluationclue();
// //
// getEntpCourseWorkPointList();
// }
// //
// const debounceQueryData = debounce(throttle(refreshData, 1000), 1000);
//
const debounceQueryData = debounce(() => {
console.log("防抖 加载数据中...")
//
initPageParams();
//
handleQueryFromEntpCourseWork(0);
//
getQueryFromEvaluationclue();
//
getEntpCourseWorkPointList();
}, 1000);
watch(() => props.propsformobj.uniquekey, (newVal) => {
console.log(props.propsformobj,'propsformobj')
if(props.propsformobj.uniquekey){
classWorkForm.uniquekey = props.propsformobj.uniquekey?cloneDeep(props.propsformobj.uniquekey):''; //
}
})
watch(() => props.bookobj.levelSecondId, (newVal) => {
watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => {
console.log(props.bookobj,'课程选择')
//
handleQueryFromEntpCourseWork(0);
//
getQueryFromEvaluationclue();
//
getEntpCourseWorkPointList();
debounceQueryData();
})
</script>
<style lang="scss" scoped>
@ -982,6 +1144,46 @@ watch(() => props.bookobj.levelSecondId, (newVal) => {
box-sizing: border-box;
background-color: rgb(231, 231, 231)
}
.infinite-list-wrapper{
height: 100%;
text-align: center;
overflow: auto;
.infinite-list {
padding: 0;
margin: 0;
list-style: none;
.infinite-list-item {
display: flex;
align-items: center;
//justify-content: center;
//height: 50px;
//background: var(--el-color-primary-light-9);
padding: 10px;
border-top: 1px solid #eee;
//color: var(--el-color-primary);
}
.infinite-list-item:hover {
background-color: #F3F5F8;
}
.infinite-list-item + .list-item {
margin-top: 10px;
}
}
.infinite-list-loading{
padding: 10px 0;
border-top: 1px solid #eee;
color: red;
}
.infinite-list-noMove{
padding: 10px 0;
border-top: 1px solid #eee;
color: #999;
}
}
}
</style>

View File

@ -1,15 +1,11 @@
<template>
<div class="page-newcalsetask flex">
<el-menu
default-active="1"
class="el-menu-vertical-demo"
:collapse="isCollapse"
>
<!--左侧 教材 目录-->
<div v-if="!isCollapse" style="height: 100%;overflow: hidden;">
<ChooseTextbook @change-book="getData" @node-click="getData" />
</div>
</el-menu>
<div class="page-right" :style="{'margin-left': isCollapse ? '0' : '20px'}">
<!-- 标题 -->

View File

@ -0,0 +1,28 @@
<template>
<div class="container-pdf">
<PDF :url="pdfUrl" :showCatalog="false" v-if="pdfUrl" />
</div>
</template>
<script setup>
import { ref, onMounted, nextTick } from 'vue';
import PDF from '@/components/PdfJs/index.vue'
import { sessionStore } from '@/utils/store'
const pdfUrl = ref('')
onMounted(async () =>{
await nextTick()
const { fileurl } = sessionStore.get('subject.curBook')
pdfUrl.value = import.meta.env.VITE_APP_RES_FILE_PATH + fileurl.replace('.txt','.pdf')
})
</script>
<style lang="scss" scoped>
.container-pdf{
height: 100%;
}
</style>

View File

@ -0,0 +1,153 @@
<template>
<div class="question-container">
<div class="question-main">
<div class="question-item">
<div class="item-con">
<div class="item-q flex">
<div class="q-user">
<i class="iconfont icon-touxiang"></i>
</div>
<div class="q-text">研读课程标准提取出与本课相关的核心素养与课程目标</div>
</div>
<div class="item-a flex">
<div class="a-user">
</div>
<div class="a-text">
<p> 语言的建构与运用学生在丰富的语言实践中通过主动的积累梳理和整合逐步掌握祖国语言文字特点及其规律形成个体言语经验发展在具体语言情境中正确有效地运用祖国语言文字进行交流沟通的能力</p>
<a class="" href="">来自高中语文课程标准2020点击查看原文第4页</a>
<p>语言建构有两方面的内涵第一是指出于表达思想的目的按照语言内部系统来建构话语-用词汇组构句子用句子组构段落和篇章第二是指每个人在个人言语经验的基础上逐步建构起自己的言语表达体系包括每个人的言语心理词典句典和表达习惯</p>
<a href="">来自高中语文课程标准解读点击查看原文第58页</a>
<p>高中语文课程标准2003版本中没有核心素养相关表达 </p>
<a href="">来自高中语文课程标准2003 </a>
</div>
</div>
</div>
<div class="item-icon flex">
<div class="flex">
<span>
<i class="iconfont icon-fuzhi"></i>
复制
</span>
<span>
<i class="iconfont icon-bianji-gangbi"></i>
写评价
</span>
<span>
<i class="iconfont icon-rss-line"></i>
添加到微教研
</span>
</div>
<div>
<span>
<i class="iconfont icon-tianjia"></i>
保存
</span>
</div>
</div>
</div>
</div>
<el-input v-model="textarea" class="question-textarea" resize="none" :rows="2" type="textarea" placeholder="在这里输入发消息,输入@或/选择" />
</div>
</template>
<script setup>
import { ref } from 'vue'
const textarea = ref('')
</script>
<style lang="scss" scoped>
.question-container {
padding: 10px 15px;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
.question-item {
display: flex;
flex-direction: column;
.item-con {
background: #fff;
border-radius: 5px;
padding: 10px;
.item-q {
align-items: center;
width: 100%;
margin-bottom: 10px;
.q-user {
width: 30px;
height: 30px;
background: #F6F6F6;
border-radius: 50%;
margin-right: 10px;
.icon-touxiang {
font-size: 18px;
font-weight: bold;
}
}
.q-text {
color: #409eff;
font-size: 13px;
}
}
.item-a {
color: #3D3D3D;
font-size: 13px;
.a-user {
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
background: #F6F6F6;
border-radius: 50%;
margin-right: 10px;
flex-shrink: 0;
}
.a-text {
text-align: left;
a{
color: #409eff;
text-decoration: underline;
margin-bottom: 15px;
display: block;
}
}
}
}
.item-icon{
justify-content: space-between;
align-items: center;
color: #3D3D3D;
margin-top: 10px;
font-size: 13px;
span{
display: flex;
align-items: center;
cursor: pointer;
margin-right: 10px;
&:hover{
background: #F5F7FA
}
}
.iconfont{
margin-right: 3px;
color: #3498fc;
}
}
}
.question-textarea {
width: 100%;
}
}
</style>

View File

@ -0,0 +1,301 @@
<template>
<div class="read-container">
<el-scrollbar height="100%">
<div class="template-list" v-loading="loading">
<el-row v-for="item in 6">
<el-col :span="24">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>{{ item }}</div>
<div class="item-text" >
<div class="item-icon">
<i class="iconfont icon-ai"></i>
</div>
<div class="item-answer" v-html="item"></div>
</div>
</div>
</el-col>
</el-row>
<!-- <el-row>
<el-col :span="24">
<div class="template-item template-item-result">
<div class="result-item-header">
<i class="iconfont icon-xiaoxi"></i>
语言建构与运用是指学生在丰富的语言实践中通过主动的积累梳理和整合逐步掌握祖国语言文字特点及其运用规律形成个体言语经验......
</div>
<div class="result-icon-btn flex pl-25">
<div class="flex">
<span><i class="iconfont icon-fuzhi"></i>复制</span>
<span><i class="iconfont icon-bianji-gangbi"></i>写想法</span>
</div>
<div>
<span><i class="iconfont icon-tianjia"></i>加入备课篮</span>
</div>
</div>
<div class="line"></div>
<div class="other-msg pl-25">
<div class="other-user flex">
<i class="iconfont icon-touxiang"></i>
重庆市酉阳县二中 - 李丽
</div>
<div class="other-text flex">北师大王宁老师说语言建构有两方面的含义一是指出于表达思想的目的二是指在个人言语经验的基础上逐步建构起自己的言语体系</div>
</div>
</div>
</el-col>
</el-row> -->
</div>
</el-scrollbar>
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue';
import { sessionStore } from '@/utils/store'
import useUserStore from '@/store/modules/user'
import { conversation, completion } from '@/api/mode/index'
const userStore = useUserStore()
const props = defineProps({
curTemp: {
type: Array,
default: () =>{
return []
}
}
})
const loading = ref(false)
// ID
const params = reactive(
{
"conversation_id": "",
"messages": [
{
"role": "user",
"content": ""
}
],
"quote": false,
"stream": false
}
)
const curNode = reactive({})
const getConversation = async() =>{
const { user: { userId } } = userStore
const result = await conversation({ user_id: String(userId) })
params.conversation_id = result.data.data.id
getCompletion()
}
//
const resultList = ref([])
const getCompletion = async() =>{
console.log('params=====>',params)
for (const item of props.curTemp) {
try {
loading.value = true
params.messages[0].content = `根据${curNode.edustage}语文课标,提炼出${item.name}`
const res = await completion(params)
console.log('对话结果===》', res)
let answer = res.data.data.answer
answer = getResult(answer);
resultList.value.push({
title: item.name,
answer
})
} finally{
loading.value = false
}
}
}
//
let getResult = (text) => {
text = text.replace(/^\n\n(.*?)\n\n$/s, '<div>$1</div>');
text = text.replace(/^\n(.*?)\n$/s, '<p>$1</p>');
text = text.replace(/\*\*(.*?)\*\*/g, "<div class='text-tit'>$1</div>");
text = text.replace(/(\d+\..*?)\n/g, "<div class='text-num'>$1</div>\n");
return text
}
onMounted(() => {
let data = sessionStore.get('subject.curNode')
Object.assign(curNode, data);
console.log(props.curTemp,'curTemp')
// getConversation()
})
</script>
<style lang="scss" scoped>
.read-container {
display: flex;
flex-direction: column;
width: 100%;
padding: 15px;
height: 100%;
.el-dropdown-link {
font-weight: bold;
.el-icon--right {
font-weight: bold;
}
}
.read-header {
justify-content: space-between;
align-items: center;
.add-btn {
font-size: 13px;
.icon-jiahao {
margin-right: 3px;
font-size: 14px;
}
}
}
.right-con{
display: flex;
}
.template-list {
.template-item {
background: #fff;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
.item-header {
display: flex;
align-items: center;
font-size: 16px;
font-weight: bold;
color: #000;
.blue {
font-size: 22px;
color: #409eff;
margin-right: 5px;
}
}
.item-text {
display: flex;
margin-top: 10px;
color: #409eff;
font-size: 13px;
text-align: left;
.item-icon{
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
background: #F6F6F6;
border-radius: 50%;
margin-right: 10px;
flex-shrink: 0;
}
.item-answer{
flex-direction: column;
padding-top: 5px;
:deep(.text-tit){
font-weight: bold;
margin: 10px 0;
}
:deep(.text-num){
padding-left: 2em;
}
}
}
}
}
.template-item-result {
background: #DDEAFD !important;
.result-item-header {
display: flex;
align-items: flex-start;
text-align: left;
font-size: 16px;
font-weight: bold;
color: #3D3D3D;
.icon-xiaoxi {
color: #5881D5;
font-weight: bold;
font-size: 20px;
margin-right: 10px;
}
}
.result-icon-btn {
justify-content: space-between;
font-size: 13px;
margin-top: 5px;
span {
display: flex;
align-items: center;
cursor: pointer;
margin-right: 10px;
&:hover {
background: #cfe0fa
}
}
.iconfont {
margin-right: 3px;
color: #3498fc;
}
}
.line {
height: 1px;
background: #D8D8D8;
margin: 10px 0;
}
.other-msg {
font-size: 13px;
.other-user {
align-items: center;
color: #BA4B0F;
font-size: 12px;
.icon-touxiang {
color: #BA4B0F;
font-weight: bold;
font-size: 16px;
margin-right: 5px;
}
}
.other-text {
color: #191919;
text-align: left;
}
}
}
}
.pl-25 {
padding-left: 25px;
}
</style>

View File

@ -0,0 +1,132 @@
<template>
<div class="read-container">
<div class="read-header flex">
<el-dropdown @command="changeTemplate">
<span class="el-dropdown-link">
{{ curTemplate.name }}
<i class="iconfont icon-xiangxia" </i>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-for="item in templateList" :command="item" :key="item.id">{{ item.name
}}</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
<el-button type="primary" @click="aiRead">一键研读</el-button>
</div>
<div class="template-list" v-loading="tempLoading">
<el-row v-for="item in childTempList" :key="item.id">
<el-col :span="24">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>{{ item.name }}</div>
<div class="item-text">{{ item.prompt }}</div>
</div>
</el-col>
</el-row>
<el-empty v-if="!childTempList.length" description="暂无模板数据" />
</div>
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue';
import { modelList} from '@/api/mode/index'
//
const curTemplate = reactive({ name: '', id: '' })
//
const templateList = ref([])
//
const getTemplateList = () => {
modelList({ model: 1, type: 1 }).then(res => {
templateList.value = res.rows
Object.assign(curTemplate, res.rows[0]);
getChildTemplate()
})
}
//
const changeTemplate = (val) => {
Object.assign(curTemplate, val);
getChildTemplate()
}
//
const tempLoading = ref(false)
const childTempList = ref([])
const getChildTemplate = () => {
tempLoading.value = true
modelList({ model: 1, type: 2, parentId: curTemplate.id }).then(res => {
childTempList.value = res.rows
}).finally(() => {
tempLoading.value = false
})
}
const emit = defineEmits(['changeMenu'])
const aiRead = async () => {
emit('changeMenu', childTempList.value)
}
onMounted(() => {
getTemplateList()
})
</script>
<style lang="scss" scoped>
.read-container {
padding: 15px;
.el-dropdown-link {
font-weight: bold;
.el-icon--right {
font-weight: bold;
}
}
.read-header {
justify-content: space-between;
align-items: center;
}
.template-list {
margin-top: 15px;
.template-item {
background: #fff;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
.item-header {
display: flex;
align-items: center;
font-size: 16px;
font-weight: bold;
color: #3D3D3D;
.blue {
font-size: 22px;
color: #409eff;
margin-right: 5px;
}
}
.item-text {
display: flex;
color: #409eff;
font-size: 13px;
padding-left: 20px;
text-align: left;
}
}
}
}
</style>

View File

@ -0,0 +1,186 @@
<template>
<TemplateStudy/>
<!-- <div class="page-curriculum flex">
<el-row>
<el-col :span="12" class="flex">
<div class="page-left">
<template v-if="activeMenu == 1">
<div class="page-title">课程标准研读</div>
<el-radio-group v-model="radio" @change="changeRadio">
<el-radio :value="item.value" v-for="item in radioList">{{ item.label }}</el-radio>
</el-radio-group>
<div class="list">
<ul>
<li v-for="(item, index) in list" :class="activeIndex == index ? 'li-active' : ''"
@click="clickItem(index)">
<el-image class="img" :src="item.url" />
<span>{{ item.name }}</span>
</li>
</ul>
</div>
</template>
<template v-if="activeMenu != 1">
<PdfTemplate/>
</template>
</div>
</el-col>
<el-col :span="12" class="flex">
<div class="page-right">
<div class="right-header">
<el-button text :type="activeMenu == item.value ? 'primary' : ''" v-for="item in contentMenu"
@click="onClickMenu(item)">{{ item.label
}}</el-button>
</div>
<div class="right-con">
<ReadTemplate v-if="activeMenu == 1" @changeMenu="changeMenu" />
<QuestionAnswer v-if="activeMenu == 2" />
<ReadResult v-if="activeMenu == 3" :curTemp="curTemp" />
</div>
</div>
</el-col>
</el-row>
</div> -->
</template>
<script setup>
import { ref } from 'vue'
import TemplateStudy from '@/components/template-study/index.vue'
import ReadTemplate from './container/read-template.vue';
import QuestionAnswer from './container/question-answer.vue'
import ReadResult from './container/read-result.vue'
import PdfTemplate from './container/pdf-template.vue'
const url = 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F11044b08-04c1-41a0-a453-1fd20b58a614%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1732953359&t=7ab1d1b3a903db85b1149914407aea35'
/************************左侧************* */
const radio = ref(1)
const radioList = ref([
{ label: '浏览研读', value: 1 },
{ label: '跨学科研读', value: 2 },
{ label: '跨学段研读', value: 3 },
{ label: '课标修订研读', value: 4 },
{ label: '自由研读', value: 5 },
])
const list = ref([
{
name: '高中语文课程标准',
url
}
])
const changeRadio = () => {
list.value = []
for (let i = 0; i < Math.floor(Math.random() * 5) + 1; i++) {
list.value.push({
name: '高中语文课程标准',
url
})
}
}
const activeIndex = ref(-1)
const clickItem = (index) => {
activeIndex.value = index
}
/************************右侧************* */
const contentMenu = [
{ label: '研读模板', value: 1 },
{ label: '问答模板', value: 2 },
{ label: '研读结果', value: 3 }
]
const activeMenu = ref(1)
const onClickMenu = (item) => {
activeMenu.value = item.value
}
const curTemp = ref([])
const changeMenu = (data) =>{
activeMenu.value = 3
curTemp.value = data
}
</script>
<style lang="scss" scoped>
.page-curriculum {
height: 100%;
background: #fff;
border-radius: 5px;
overflow: hidden;
.el-row {
width: 100%;
.page-left {
width: 100%;
padding: 0 20px;
box-sizing: border-box;
.page-title {
font-size: 20px;
padding: 20px 0;
}
.list {
ul {
display: flex;
flex-wrap: wrap;
li {
display: flex;
flex-direction: column;
font-size: 13px;
padding: 10px;
cursor: pointer;
border-radius: 5px;
overflow: hidden;
margin-right: 20px;
margin-bottom: 10px;
.img {
width: 100px;
height: 130px;
border: solid #ccc 1px;
margin-bottom: 10px;
}
&:hover {
background: #E0EAFF;
}
}
.li-active {
background: #E0EAFF;
}
}
}
}
.page-right {
width: 100%;
background: #F6F6F6;
border-left: solid #ececec 1px;
display: flex;
flex-direction: column;
.right-header {
padding-left: 30px;
height: 45px;
display: flex;
align-items: center;
background: #fff;
border-bottom: solid #ececec 1px;
}
.right-con {
flex: 1;
}
}
}
}
</style>

View File

@ -14,9 +14,10 @@
<div class="class-left flex">
<div class="class-name flex">
<span class="name">{{ item.uniquekey }}</span>
<el-tag class="tag" round :type="tagType(item.deaddate)" effect="dark" size="small">{{
getCurrentTime('YYYY-MM-DD HH:mm') > item.deaddate ? '已结束' : '进行中' }}</el-tag>
<el-tag :type="item.workclass" size="large">{{ item.worktype }}</el-tag>
<!-- <el-tag class="tag" round :type="tagType(item.deaddate)" effect="dark" size="small">{{
getCurrentTime('YYYY-MM-DD HH:mm') > item.deaddate ? '已批改' : '待批改' }}</el-tag> -->
<el-tag class="tag" round :type="tagType(item.deaddate)" effect="dark" size="small">待批改</el-tag>
<el-tag :type="item.workclass" size="large">{{ item.worktype }}</el-tag>
</div>
<div class="class-time">{{ item.classcaption }} | 截止时间{{ item.deaddate }} </div>
</div>
@ -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'
}

View File

@ -70,19 +70,19 @@ const menuList = [{
{
name: '课标分析',
icon: '#icon-kebiao',
path: '/standardanalysis?',
path: 'standardanalysis?',
id: '1-1'
},
{
name: '教材分析',
icon: '#icon-jiaocaixuanze',
path: '/textbookAnalysis',
path: 'textbookAnalysis',
id: '1-2'
},
{
name: '考试分析',
icon: '#icon-kaoshi',
path: '/examReport',
path: 'examReport',
id: '1-3'
},
{
@ -94,7 +94,7 @@ const menuList = [{
{
name: '教学实践',
icon: '#icon-jiaoxueshijian',
path: '/prepare',
path: 'prepare',
id: '1-5'
},
{
@ -115,7 +115,7 @@ const menuList = [{
icon: '#icon-zuoyesheji',
// isOuter: true,
// path: '/teaching/classtaskassign?titleName=&openDialog=newClassTask',
path: '/newClassTask',
path: 'newClassTask',
id: '2-1'
},
{
@ -123,13 +123,13 @@ const menuList = [{
icon: '#icon-zuoyebuzhi',
// isOuter: true,
// path: '/teaching/classtaskassign?titleName=',
path: '/classTaskAssign',
path: 'classTaskAssign',
id: '2-2'
},
{
name: '作业批改',
icon: '#icon-zuoyepigai',
path: '/classTask',
path: 'classTask',
id: '2-3'
},
{

View File

@ -0,0 +1,28 @@
<template>
<div class="container-pdf">
<PDF :url="pdfUrl" :showCatalog="false" v-if="pdfUrl" />
</div>
</template>
<script setup>
import { ref, onMounted, nextTick } from 'vue';
import PDF from '@/components/PdfJs/index.vue'
import { sessionStore } from '@/utils/store'
const pdfUrl = ref('')
onMounted(async () =>{
await nextTick()
const { fileurl } = sessionStore.get('subject.curBook')
pdfUrl.value = import.meta.env.VITE_APP_RES_FILE_PATH + fileurl.replace('.txt','.pdf')
})
</script>
<style lang="scss" scoped>
.container-pdf{
height: 100%;
}
</style>

View File

@ -0,0 +1,153 @@
<template>
<div class="question-container">
<div class="question-main">
<div class="question-item">
<div class="item-con">
<div class="item-q flex">
<div class="q-user">
<i class="iconfont icon-touxiang"></i>
</div>
<div class="q-text">研读课程标准提取出与本课相关的核心素养与课程目标</div>
</div>
<div class="item-a flex">
<div class="a-user">
</div>
<div class="a-text">
<p> 语言的建构与运用学生在丰富的语言实践中通过主动的积累梳理和整合逐步掌握祖国语言文字特点及其规律形成个体言语经验发展在具体语言情境中正确有效地运用祖国语言文字进行交流沟通的能力</p>
<a class="" href="">来自高中语文课程标准2020点击查看原文第4页</a>
<p>语言建构有两方面的内涵第一是指出于表达思想的目的按照语言内部系统来建构话语-用词汇组构句子用句子组构段落和篇章第二是指每个人在个人言语经验的基础上逐步建构起自己的言语表达体系包括每个人的言语心理词典句典和表达习惯</p>
<a href="">来自高中语文课程标准解读点击查看原文第58页</a>
<p>高中语文课程标准2003版本中没有核心素养相关表达 </p>
<a href="">来自高中语文课程标准2003 </a>
</div>
</div>
</div>
<div class="item-icon flex">
<div class="flex">
<span>
<i class="iconfont icon-fuzhi"></i>
复制
</span>
<span>
<i class="iconfont icon-bianji-gangbi"></i>
写评价
</span>
<span>
<i class="iconfont icon-rss-line"></i>
添加到微教研
</span>
</div>
<div>
<span>
<i class="iconfont icon-tianjia"></i>
保存
</span>
</div>
</div>
</div>
</div>
<el-input v-model="textarea" class="question-textarea" resize="none" :rows="2" type="textarea" placeholder="在这里输入发消息,输入@或/选择" />
</div>
</template>
<script setup>
import { ref } from 'vue'
const textarea = ref('')
</script>
<style lang="scss" scoped>
.question-container {
padding: 10px 15px;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
.question-item {
display: flex;
flex-direction: column;
.item-con {
background: #fff;
border-radius: 5px;
padding: 10px;
.item-q {
align-items: center;
width: 100%;
margin-bottom: 10px;
.q-user {
width: 30px;
height: 30px;
background: #F6F6F6;
border-radius: 50%;
margin-right: 10px;
.icon-touxiang {
font-size: 18px;
font-weight: bold;
}
}
.q-text {
color: #409eff;
font-size: 13px;
}
}
.item-a {
color: #3D3D3D;
font-size: 13px;
.a-user {
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
background: #F6F6F6;
border-radius: 50%;
margin-right: 10px;
flex-shrink: 0;
}
.a-text {
text-align: left;
a{
color: #409eff;
text-decoration: underline;
margin-bottom: 15px;
display: block;
}
}
}
}
.item-icon{
justify-content: space-between;
align-items: center;
color: #3D3D3D;
margin-top: 10px;
font-size: 13px;
span{
display: flex;
align-items: center;
cursor: pointer;
margin-right: 10px;
&:hover{
background: #F5F7FA
}
}
.iconfont{
margin-right: 3px;
color: #3498fc;
}
}
}
.question-textarea {
width: 100%;
}
}
</style>

View File

@ -0,0 +1,174 @@
<template>
<div class="read-container">
<div class="template-list">
<el-row>
<el-col :span="24">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>历年高考真题分析</div>
<div class="item-text">研读课程标准提取出与本课相关的核心素养与课程目标</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>新课标与新高考改革分析</div>
<div class="item-text">研读课程标准提取出与本课相关的核心素养与课程目标
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>模拟命题</div>
<div class="item-text">研读课程标准提取出与本课相关的核心素养与课程目标
</div>
</div>
</el-col>
</el-row>
</div>
</div>
</template>
<script setup>
</script>
<style lang="scss" scoped>
.read-container {
padding: 15px;
.el-dropdown-link {
font-weight: bold;
.el-icon--right {
font-weight: bold;
}
}
.read-header {
justify-content: space-between;
align-items: center;
.add-btn {
font-size: 13px;
.icon-jiahao {
margin-right: 3px;
font-size: 14px;
}
}
}
.template-list {
.template-item {
background: #fff;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
.item-header {
display: flex;
align-items: center;
font-size: 16px;
font-weight: bold;
color: #000;
.blue {
font-size: 22px;
color: #409eff;
margin-right: 5px;
}
}
.item-text {
display: flex;
color: #409eff;
font-size: 13px;
padding-left: 20px;
text-align: left;
}
}
}
.template-item-result {
background: #DDEAFD !important;
.result-item-header {
display: flex;
align-items: flex-start;
text-align: left;
font-size: 16px;
font-weight: bold;
color: #3D3D3D;
.icon-xiaoxi {
color: #5881D5;
font-weight: bold;
font-size: 20px;
margin-right: 10px;
}
}
.result-icon-btn {
justify-content: space-between;
font-size: 13px;
margin-top: 5px;
span {
display: flex;
align-items: center;
cursor: pointer;
margin-right: 10px;
&:hover {
background: #cfe0fa
}
}
.iconfont {
margin-right: 3px;
color: #3498fc;
}
}
.line {
height: 1px;
background: #D8D8D8;
margin: 10px 0;
}
.other-msg {
font-size: 13px;
.other-user {
align-items: center;
color: #BA4B0F;
font-size: 12px;
.icon-touxiang {
color: #BA4B0F;
font-weight: bold;
font-size: 16px;
margin-right: 5px;
}
}
.other-text {
color: #191919;
text-align: left;
}
}
}
}
.pl-25 {
padding-left: 25px;
}
</style>

View File

@ -0,0 +1,116 @@
<template>
<div class="read-container">
<div class="read-header flex">
<el-dropdown>
<span class="el-dropdown-link">
课标研读模板
<i class="iconfont icon-xiangxia" </i>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item>考试分析模板一</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
<el-button text class="add-btn">
<i class="iconfont icon-jiahao"></i>
添加
</el-button>
</div>
<div class="template-list">
<el-row>
<el-col :span="24">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>历年高考真题分析</div>
<div class="item-text">研读课程标准提取出与本课相关的核心素养与课程目标</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>新课标与新高考改革分析</div>
<div class="item-text">研读课程标准提取出与本课相关的核心素养与课程目标
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>模拟命题</div>
<div class="item-text">研读课程标准提取出与本课相关的核心素养与课程目标
</div>
</div>
</el-col>
</el-row>
</div>
</div>
</template>
<script setup>
</script>
<style lang="scss" scoped>
.read-container {
padding: 15px;
.el-dropdown-link {
font-weight: bold;
.el-icon--right {
font-weight: bold;
}
}
.read-header {
justify-content: space-between;
align-items: center;
.add-btn {
font-size: 13px;
.icon-jiahao {
margin-right: 3px;
font-size: 14px;
}
}
}
.template-list {
margin-top: 15px;
.template-item {
background: #fff;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
.item-header {
display: flex;
align-items: center;
font-size: 16px;
font-weight: bold;
color: #3D3D3D;
.blue {
font-size: 22px;
color: #409eff;
margin-right: 5px;
}
}
.item-text {
display: flex;
color: #409eff;
font-size: 13px;
padding-left: 20px;
text-align: left;
}
}
}
}
</style>

View File

@ -0,0 +1,177 @@
<template>
<div class="page-curriculum flex">
<el-row>
<el-col :span="12" class="flex">
<div class="page-left">
<template v-if="activeMenu == 1">
<div class="page-title">考试分析</div>
<el-radio-group v-model="radio" @change="changeRadio">
<el-radio :value="item.value" v-for="item in radioList">{{ item.label }}</el-radio>
</el-radio-group>
<div class="list">
<ul>
<li v-for="(item, index) in list" :class="activeIndex == index ? 'li-active' : ''"
@click="clickItem(index)">
<el-image class="img" :src="item.url" />
<span>{{ item.name }}</span>
</li>
</ul>
</div>
</template>
<template v-if="activeMenu != 1">
<PdfTemplate/>
</template>
</div>
</el-col>
<el-col :span="12" class="flex">
<div class="page-right">
<div class="right-header">
<el-button text :type="activeMenu == item.value ? 'primary' : ''" v-for="item in contentMenu"
@click="onClickMenu(item)">{{ item.label
}}</el-button>
</div>
<div class="right-con">
<ReadTemplate v-if="activeMenu == 1" />
<QuestionAnswer v-if="activeMenu == 2" />
<ReadResult v-if="activeMenu == 3" />
</div>
</div>
</el-col>
</el-row>
</div>
</template>
<script setup>
import { ref } from 'vue'
import ReadTemplate from './container/read-template.vue';
import QuestionAnswer from './container/question-answer.vue'
import ReadResult from './container/read-result.vue'
import PdfTemplate from './container/pdf-template.vue'
const url = 'http://t13.baidu.com/it/u=3055765737,2452458153&fm=224&app=112&f=JPEG?w=500&h=500'
/************************左侧************* */
const radio = ref(1)
const radioList = ref([
{ label: '浏览研读', value: 1 },
{ label: '跨学科研读', value: 2 },
{ label: '文献研读', value: 3 },
{ label: '模拟命题', value: 4 },
])
const list = ref([
{
name: '2021年高考真题',
url
}
])
const changeRadio = () => {
list.value = []
for (let i = 0; i < Math.floor(Math.random() * 5) + 1; i++) {
list.value.push({
name: '2021年高考真题',
url
})
}
}
const activeIndex = ref(-1)
const clickItem = (index) => {
activeIndex.value = index
}
/************************右侧************* */
const contentMenu = [
{ label: '分析模板', value: 1 },
{ label: '问答分析', value: 2 },
{ label: '分析结果', value: 3 }
]
const activeMenu = ref(1)
const onClickMenu = (item) => {
activeMenu.value = item.value
}
</script>
<style lang="scss" scoped>
.page-curriculum {
height: 100%;
background: #fff;
border-radius: 5px;
overflow: hidden;
.el-row {
width: 100%;
.page-left {
width: 100%;
padding: 0 20px;
box-sizing: border-box;
.page-title {
font-size: 20px;
padding: 20px 0;
}
.list {
ul {
display: flex;
flex-wrap: wrap;
li {
display: flex;
flex-direction: column;
font-size: 13px;
padding: 10px;
cursor: pointer;
border-radius: 5px;
overflow: hidden;
margin-right: 20px;
margin-bottom: 10px;
.img {
width: 100px;
height: 130px;
border: solid #ccc 1px;
margin-bottom: 10px;
}
&:hover {
background: #E0EAFF;
}
}
.li-active {
background: #E0EAFF;
}
}
}
}
.page-right {
width: 100%;
background: #F6F6F6;
border-left: solid #ececec 1px;
display: flex;
flex-direction: column;
.right-header {
padding-left: 30px;
height: 45px;
display: flex;
align-items: center;
background: #fff;
border-bottom: solid #ececec 1px;
}
.right-con {
flex: 1;
}
}
}
}
</style>

View File

@ -1,245 +0,0 @@
<template>
<el-card style="overflow: auto; height: 100%;">
<div class="common-layout" style="overflow-y: auto">
<el-container>
<el-main style="--el-main-padding: 0">
<template v-for="(itemFirst, indexFirst) in title" :key="indexFirst">
<el-card style="margin-bottom: 10px">
<template #header>
<div style="text-align: left">{{ itemFirst.name }}</div>
</template>
<div :class="itemFirst.id === 1 || itemFirst.id === 2 ? 'six' : 'three'">
<template v-for="(itemSec, indexSec) in itemFirst.child" :key="indexSec">
<el-popover :disabled="itemSec.child1.length === 0" width="auto" trigger="hover">
<div style="display: flex; justify-content: space-between">
<!-- 鼠标移上去的一列为三级菜单-->
<template v-for="(itemThird, indexThird) in itemSec.child1" :key="indexThird">
<div
style="width: 120px"
:class="[
itemFirst.id == 1
? 'a1'
: itemFirst.id == 2
? 'a2'
: itemFirst.id == 3
? 'a3'
: 'a4',
'CustomBox'
]"
@click="handleOutLink(itemThird.url)"
>
<span :class="itemThird.img"></span>
<span>{{ itemThird.name }}</span>
</div>
</template>
</div>
<!-- 最外层的一列为二级菜单-->
<template #reference>
<div
:class="[
itemFirst.id == 1
? 'a1'
: itemFirst.id == 2
? 'a2'
: itemFirst.id == 3
? 'a3'
: 'a4',
'CustomBox'
]"
@click="handleOutLink(itemSec.url, itemSec.type)"
>
<span :class="itemSec.img"></span>
<span>{{ itemSec.name }}</span>
</div>
</template>
</el-popover>
</template>
</div>
</el-card>
</template>
</el-main>
</el-container>
</div>
</el-card>
</template>
<script setup>
import { reactive } from 'vue'
import { useRouter } from 'vue-router'
import outLink from '@/utils/linkConfig'
const { ipcRenderer } = window.electron || {}
const router = useRouter()
const title = reactive([
{
name: '教学工作台',
img: 'iconfont icon-gongzuotai',
id: 1,
child: [
{
name: '课程教学',
img: 'iconfont icon-PPT',
type: 'hash',
url: '/prepare',
child1: []
},
{
name: '作业管理',
img: 'iconfont icon-36zuoyepingtai',
url: '/teaching/classtaskassign?titleName=作业布置',
child1: []
}
]
},
{
name: '教学研究室',
img: 'iconfont icon-yanjiushi',
id: 2,
child: [
{
name: '课程研究',
img: 'iconfont icon-shuyi_jiaoxueguanli',
child1: [
{
name: '课标分析',
url: '/teaching/chatwithstandard',
img: 'iconfont icon-kecheng'
},
{
name: '教材分析',
url: '/teaching/chatwithtextbook',
img: 'iconfont icon-yanjiushi'
}
]
},
{
name: '考试分析',
url: '/examReport',
img: 'iconfont icon-icon_kaoshifenxi',
child1: []
},
{
name: '资源研究',
url: '/resource',
type: 'hash',
img: 'iconfont icon-business-report',
child1: []
}
]
},
{
name: '教学资源库',
img: 'iconfont icon-zhuanyeziyuanku',
id: 3,
child: [
{
name: '教学素材',
img: 'iconfont icon-sucai',
url: '/teaching/materialbank',
child1: []
},
{
name: '课程资源',
img: 'iconfont icon-kechengziyuan',
url: '/teaching/coursewareresource',
child1: []
},
{
name: '习题资源',
img: 'iconfont icon-iconku-zhuanqu-',
url: '/teaching/quesbank',
child1: []
}
]
}
])
const handleOutLink = (path, type) => {
if (!path) return
if (type === 'hash') {
router.push(path)
} else {
// key linkConfig.js
let configObj = outLink.getBaseData()
let fullPath = configObj.fullPath + path
fullPath = fullPath.replaceAll('//', '/')
//
ipcRenderer.send('openWindow', {
fullPath: fullPath,
cookieData: { ...configObj.data }
})
}
}
</script>
<style scoped>
.CustomTitle {
margin-bottom: 8px;
font-weight: 600;
display: flex;
align-items: center;
white-space: nowrap;
margin-right: 10px;
cursor: pointer;
}
.CustomTitle span:nth-child(1) {
font-size: 24px;
margin-right: 8px;
color: #7b7a7a;
display: none;
}
.six {
display: flex;
& > div {
width: 20%;
}
}
.three {
display: flex;
& > div {
width: 20%;
}
}
.CustomBox span:nth-child(1) {
display: flex;
width: 60px;
justify-content: center;
height: 60px;
background-color: #ebe9e9;
border-radius: 50%;
align-items: center;
font-size: 32px;
margin-bottom: 6px;
}
.CustomBox {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
cursor: pointer;
}
.CustomBox span:nth-child(2) {
font-size: 18px;
}
.CustomBox div {
display: flex;
flex-direction: column;
align-items: center;
}
.a1 span:nth-child(1) {
color: #1296db;
}
.a2 span:nth-child(1) {
color: #f56c6c;
}
.a3 span:nth-child(1) {
color: #e6a23a;
}
.a4 span:nth-child(1) {
color: #67c23a;
}
.ac span:nth-child(1) {
background-color: #1296db;
color: #ffffff;
}
</style>

View File

@ -1,13 +0,0 @@
<template>
<div>
教学大模型
</div>
</template>
<script setup>
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,195 @@
<template>
<div class="joinschool">
<div class="titletext"><span style="font-size:30px;margin-right:30px" class="iconfont icon-tianchongxing-"></span>加入学校</div>
<div v-if="userregister.value">
<div style="border-bottom:1px solid #eee;padding-bottom:10px;margin-bottom:10px" v-if="userregister.value.auditStatus==0">
<img style="margin: 0 auto;height:85px" src="@/assets/images/shenhe.png" alt="">
<p style="color:#F59A23;font-size:22px">申请审核中</p>
<p style="color:#000;font-size:16px;font-weight:600">申请信息已提交请耐心等待审核通过即可完成申请</p>
</div>
<div style="border:1px solid #000;margin-bottom:20px;background:#DFF0D8" v-if="userregister.value.auditStatus==1">
<div style="display: flex;align-items: center;justify-content: center;">
<el-result style="padding: 17px 35px;" icon="success"></el-result>
<p style="font-size:30px;color:#67C23A">审核通过</p>
</div>
<p style="margin-bottom:10px;color:#439FFE; cursor: pointer" @click='chongxin'>重新认证</p>
</div>
<div style="border:1px solid #000;margin-bottom:20px;background:#F2DEDE" v-if="userregister.value.auditStatus==2">
<div style="display: flex;align-items: center;justify-content: center;">
<el-result style="padding: 17px 35px;" icon="error"></el-result>
<p style="font-size:30px;color:#E10A07">申请驳回</p>
</div>
<p style="margin-bottom:10px;font-size:18px;font-weight:600">申请信息已驳回请重新提交申请信息</p>
</div>
</div>
<div class="box-item" >
<el-form ref="ruleFormRef" label-width="auto" :rules="rules" :model="ruleForm" size="large">
<!-- <el-form-item label="所属地区" prop="address">
<el-cascader
style="width:100%"
popper-class="aix-regist-address"
:options="regionData"
v-model="ruleForm.address"
/>
</el-form-item> -->
<el-form-item label="学校名称" prop="school" >
<el-cascader :options="optionsSchool" style="width:100%" v-model="ruleForm.school" :disabled="!isshwoBtn" />
</el-form-item>
<el-form-item label="申请人" >
{{ state.user.nickName }}
</el-form-item>
<el-form-item label="申请人电话" >
{{ state.user.phonenumber }}
</el-form-item>
<el-form-item >
<div style="width:100%;text-align: right;padding-right:100px">
<el-button style="width:150px" type="default" @click="closed">关闭</el-button>
<el-button style="width:150px" type="primary" @click="submitForm(ruleFormRef)" v-if="isshwoBtn">确定</el-button>
</div>
</el-form-item>
</el-form>
</div>
</div>
</template>
<script setup >
import { ref, reactive, onMounted ,watch} from 'vue'
import { regionData, codeToText } from 'element-china-area-data'
import { getUserProfile } from '@/api/system/user'
import {getDept} from '@/api/login'
import {school} from '@/api/apiService'
import { ElMessage } from 'element-plus'
import useUserStore from '@/store/modules/user'
import { useRouter } from 'vue-router'
const router = useRouter()
const userStore = useUserStore()
const ruleFormRef = ref(null)
const isshwoBtn = ref(true)
const state = reactive({
user: {},
})
const ruleForm = reactive({
school:[],
// address:[]
})
const optionsSchool=ref([])
const rules = reactive({
address:[ {
required: true,
message: '请选择地址',
trigger: 'change',
},],
school:[{
required: true,
message: '请选择地址',
trigger: 'change',
},],
})
watch (() => userStore.DeptInfo, (newValue, oldValue) => {
getregisterinfo()
})
const userregister = reactive({
value:null
})
const chongxin=()=>{
isshwoBtn.value=true
}
async function getUser() {
getUserProfile().then((response) => {
// response.data.avatar = import.meta.env.VITE_APP_BASE_API + response.data.avatar
Object.assign(state.user,response.data)
})
}
const getSchoolList = () => {
school.deptTree().then(res=>{
optionsSchool.value=res.data
optionsSchool.value.forEach(item=>{
item.value=item.id
if(!item.children){
item.disabled=true
}
if(item.children){
item.children.forEach(child=>{
child.value=child.id
if(!child.children){
child.disabled=true
}
if(child.children){
child.children.forEach(grandson=>{
grandson.value=grandson.id
})
}
})
}
})
})
}
//
const submitForm = async (formEl) => {
if (!formEl) return
await formEl.validate((valid, fields) => {
if (valid) {
// const araname = codeToText[ruleForm.address[0]] + '-' + codeToText[ruleForm.address[1]] + '-' + codeToText[ruleForm.address[2]];
const form={
schoolId:ruleForm.school[2],
// areaIds:ruleForm.address.join(','),
// area:araname
}
school.schoolJoin(form).then(async res=>{
if(res.code==200){
ElMessage.success('提交成功')
await userStore.getDeptInfo()
}
})
console.log('submit!')
} else {
console.log('error submit!', fields)
}
})
}
const getregisterinfo=()=>{
if(!(Object.keys(userStore.DeptInfo).length === 0 && userStore.DeptInfo.constructor === Object)){
if(userStore.DeptInfo.register.type==4) return
userregister.value=userStore.DeptInfo.register
getDept({deptId:userStore.DeptInfo.register.schoolId}).then(res1=>{
const arr=(res1?.data?.ancestors || '').split(',')
arr.shift()
arr.push(userStore.DeptInfo.register.schoolId)
ruleForm.school=arr.map(Number)
})
if(userStore.DeptInfo.register.auditStatus==0 || userStore.DeptInfo.register.auditStatus==1){
isshwoBtn.value=false
}
}
}
//
const closed=()=>{
if (ruleFormRef.value) ruleFormRef.value.resetFields()
router.push("/")
}
onMounted(async () => {
getUser()
getSchoolList()
await userStore.getDeptInfo()
getregisterinfo()
})
</script>
<style scoped lang="scss">
.joinschool{
padding: 20px;
background: #fff;
.titletext{
text-align: left;
display: flex;
align-items: center;
font-size: 30px;
margin-bottom: 30px;
}
}
</style>

View File

@ -6,7 +6,7 @@
</div>
<img class="welcome-img" :src="leftBg2" />
</div>
<div class="box-item login">
<div class="box-item login" v-if="isRegister">
<WindowTools :is-has-max="false" />
<div class="login-title">账号登录</div>
<el-form ref="formRef" class="login-form" :model="loginForm" :rules="rules" size="large">
@ -25,9 +25,30 @@
<el-button :loading="btnLoading" class="btn" type="primary" @click="submitForm(formRef)">登录</el-button>
</el-form-item>
<div class="flex mb-4" style="display: flex;justify-content: center;color: #ccc;cursor: pointer;">
<a class="hover:text-sky-500" style="margin-right: 10px;" @click="RegisterModel(1)">注册账号</a>
|
<a class="hover:text-sky-500" style="margin-left: 10px;" @click="RegisterModel(2)">忘记密码</a>
<a class="hover:text-sky-500" style="margin-right: 10px;" @click="gotoreRegister">注册账号</a>
</div>
</el-form>
</div>
<div class="box-item login" v-else>
<WindowTools :is-has-max="false" />
<div class="login-title">账号注册</div>
<el-form ref="ruleFormRef" class="login-form" :model="ruleForm" label-width="auto" :rules="rules" size="large">
<el-form-item label="手机号" prop="username">
<el-input v-model="ruleForm.username" placeholder="请输入手机号" />
</el-form-item>
<el-form-item label="验证码" prop="smsCode">
<el-input style="width:185px" v-model="ruleForm.smsCode" placeholder="请输入验证码" /><el-button :disabled="codeName!='发送验证码'" type="primary" @click="sendyzm">{{ codeName }}</el-button>
</el-form-item>
<el-form-item label="密码" prop="password" >
<el-input autocomplete="on" type="password" v-model="ruleForm.password" placeholder="请输入密码" />
</el-form-item>
<el-form-item>
<el-button class="btn" type="primary" @click="RegisterForm(ruleFormRef)">立即注册</el-button>
</el-form-item>
<div class="flex mb-4" style="display: flex;justify-content: center;color: #ccc;cursor: pointer;">
<a class="hover:text-sky-500" style="margin-right: 10px;" @click="gotoLogin"> 返回登录 </a>
</div>
</el-form>
</div>
@ -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', {

View File

@ -0,0 +1,21 @@
<template>
<div>
<div class="mb-4">
<el-button type="primary" @click="onchange('/model/curriculum')">课标研读</el-button>
<!-- <el-button type="success" @click="onchange('/model/teaching')">教材研读</el-button> -->
<!-- <el-button type="info" @click="onchange('/model/examination')">考试分析</el-button> -->
</div>
</div>
</template>
<script setup>
import { useRouter } from 'vue-router'
const router = useRouter()
const onchange = (path) =>{
router.push(path)
}
</script>
<style lang="scss" scoped></style>

View File

@ -0,0 +1,59 @@
<template>
<div style="padding: 10px;">
<el-dialog
v-model="dialogVisible"
width="30%"
append-to-body
>
<div style="display: flex;justify-content: center;">
<ChooseTextbook @node-click="nodeClick" />
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click.stop="save">确定</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup>
import { ref, defineExpose } from 'vue'
import ChooseTextbook from '@/components/choose-textbook/index.vue'
const dialogVisible = ref(false)
const getNodeInfo = ref([])
const openDialog = () => {
dialogVisible.value = true
}
const getFullObj = (node) => {
const obj = []
const recursive = (currentNode) => {
//
if (currentNode.parentNode) {
obj.unshift(Object.assign({curentId: currentNode.id,title:currentNode.itemtitle}, currentNode.parentNode))
recursive(currentNode.parentNode)
} else {
obj.unshift({id: currentNode.id,title:currentNode.itemtitle})
}
}
recursive(node)
return obj
}
const nodeClick = (data) => {
getNodeInfo.value = getFullObj(data.node)
console.log(getNodeInfo.value, 'getNodeInfo.value')
}
const save = () => {
dialogVisible.value = false
}
defineExpose({
openDialog
})
</script>

View File

@ -0,0 +1,209 @@
<template>
<div class="joinschool">
<div class="titletext"><span style="font-size:30px;margin-right:30px" class="iconfont icon-tianchongxing-"></span>学校认证</div>
<div v-if="userregister.value">
<div style="border-bottom:1px solid #eee;padding-bottom:10px;margin-bottom:10px" v-if="userregister.value.auditStatus==0">
<img style="margin: 0 auto;height:85px" src="@/assets/images/shenhe.png" alt="">
<p style="color:#F59A23;font-size:22px">申请审核中</p>
<p style="color:#000;font-size:16px;font-weight:600">申请信息已提交请耐心等待审核通过即可完成申请</p>
</div>
<div style="border:1px solid #000;margin-bottom:20px;background:#DFF0D8" v-if="userregister.value.auditStatus==1">
<div style="display: flex;align-items: center;justify-content: center;">
<el-result style="padding: 17px 35px;" icon="success"></el-result>
<p style="font-size:30px;color:#67C23A">审核通过</p>
</div>
<p style="margin-bottom:10px;color:#439FFE; cursor: pointer" @click="chongxin">重新认证</p>
</div>
<div style="border:1px solid #000;margin-bottom:20px;background:#F2DEDE" v-if="userregister.value.auditStatus==2">
<div style="display: flex;align-items: center;justify-content: center;">
<el-result style="padding: 17px 35px;" icon="error"></el-result>
<p style="font-size:30px;color:#E10A07">申请驳回</p>
</div>
<p style="margin-bottom:10px;font-size:18px;font-weight:600">申请信息已驳回请重新提交申请信息</p>
</div>
</div>
<div class="box-item" :style="userregister.value?'':'margin-top:30px'" >
<el-form ref="ruleFormRef" label-width="auto" :rules="rules" :model="ruleForm" size="large" >
<el-form-item label="学校名称" prop="schoolName" >
<el-input v-model="ruleForm.schoolName" placeholder="请输入学校名称" :disabled="!isshwoBtn" />
</el-form-item>
<el-form-item label="所属地区" prop="address">
<el-cascader
:disabled="!isshwoBtn"
style="width:100%"
popper-class="aix-regist-address"
:options="regionData"
v-model="ruleForm.address"
/>
</el-form-item>
<el-form-item label="事业单位法人证书号" prop="certNum" >
<el-input v-model="ruleForm.certNum" placeholder="请输入事业单位法人证书号" :disabled="!isshwoBtn" />
</el-form-item>
<el-form-item label="经办人" >
{{ state.user.nickName }}
</el-form-item>
<el-form-item label="经办人电话" >
{{ state.user.phonenumber }}
</el-form-item>
<el-form-item >
<div style="display:flex;align-items:center;justify-content: space-between;padding-right:100px; width: 100%;">
<div style="display:flex;align-items:center;">
<el-checkbox style="margin: 0px 10px 0px 55px" v-model="ruleForm.istrue" size="large" :disabled="!isshwoBtn" /> 以上信息真实有效勾选后提交
</div>
<div >
<el-button style="width:150px" type="default" @click="closed">关闭</el-button>
<el-button style="width:150px" type="primary" @click="submitForm(ruleFormRef)" v-if="isshwoBtn">确定</el-button>
</div>
</div>
</el-form-item>
</el-form>
</div>
</div>
</template>
<script setup >
import { ref, reactive, onMounted,watch } from 'vue'
import { regionData, codeToText } from 'element-china-area-data'
import { getUserProfile } from '@/api/system/user'
import {getDept} from '@/api/login'
import {school} from '@/api/apiService'
import { ElMessage } from 'element-plus'
import { useRouter } from 'vue-router'
import useUserStore from '@/store/modules/user'
const userStore = useUserStore()
const isshwoBtn=ref(true)
const router = useRouter()
const state = reactive({
user: {},
})
const userregister = reactive({
value:null
})
const ruleFormRef=ref(null)
const ruleForm = reactive({
school:[],
address:[],
schoolName:null,
istrue:false
})
const optionsSchool=ref([])
const rules = reactive({
address:[ {
required: true,
message: '请选择地址',
trigger: 'change',
},],
certNum:[{ required: true, message: '请输入证书号', trigger: 'blur' }],
schoolName:[ { required: true, message: '请输入学校名称', trigger: 'blur' },]
})
async function getUser() {
getUserProfile().then((response) => {
// response.data.avatar = import.meta.env.VITE_APP_BASE_API + response.data.avatar
Object.assign(state.user,response.data)
})
}
watch (() => userStore.DeptInfo, (newValue, oldValue) => {
getregisterinfo()
})
const getregisterinfo=()=>{
if(!(Object.keys(userStore.DeptInfo || {}).length === 0 && userStore.DeptInfo.constructor === Object)){
if(userStore.DeptInfo.register.type==3) return
userregister.value=userStore.DeptInfo.register
ruleForm.schoolName=userStore.DeptInfo.register.schoolName
ruleForm.certNum=userStore.DeptInfo.register.certNum
ruleForm.istrue=true
ruleForm.address=userStore.DeptInfo.register.areaIds.split(",")
if(userStore.DeptInfo.register.auditStatus==0 || userStore.DeptInfo.register.auditStatus==1){
isshwoBtn.value=false
}
}
}
const getSchoolList = () => {
school.deptTree().then(res=>{
optionsSchool.value=res.data
optionsSchool.value.forEach(item=>{
item.value=item.id
if(!item.children){
item.disabled=true
}
if(item.children){
item.children.forEach(child=>{
child.value=child.id
if(!child.children){
child.disabled=true
}
if(child.children){
child.children.forEach(grandson=>{
grandson.value=grandson.id
})
}
})
}
})
})
}
const chongxin=()=>{
isshwoBtn.value=true
}
//
const submitForm = async (formEl) => {
if (!formEl) return
await formEl.validate((valid, fields) => {
if (valid) {
if(!ruleForm.istrue) {
ElMessage.error('请勾选以上信息真实有效的复选框')
return
}
const araname = codeToText[ruleForm.address[0]] + '-' + codeToText[ruleForm.address[1]] + '-' + codeToText[ruleForm.address[2]];
const form={
schoolName:ruleForm.schoolName,
certNum:ruleForm.certNum,
areaIds:ruleForm.address.join(','),
area:araname
}
school.schoolJoin(form).then(async res=>{
if(res.code==200){
ElMessage.success('提交成功')
await userStore.getDeptInfo()
}
})
console.log('submit!')
} else {
console.log('error submit!', fields)
}
})
}
//
const closed=()=>{
if (ruleFormRef.value) ruleFormRef.value.resetFields()
router.push("/")
}
onMounted(() => {
getUser()
getregisterinfo()
getSchoolList()
})
</script>
<style scoped lang="scss">
.joinschool{
padding: 20px;
background: #fff;
.titletext{
text-align: left;
display: flex;
align-items: center;
font-size: 30px;
}
}
</style>

View File

@ -0,0 +1,197 @@
<template>
<div class="schoolManagement">
<div class="titletext">学校管理</div>
<div class="searchInput">
<div class="mr10">学校名称</div>
<el-input v-model="searchValue.schoolName" class="mr10" style="width: 240px" placeholder="请输入学校名称" />
<div class="mr10">所属区域</div>
<el-cascader
style="width: 240px;margin-right:10px"
:options="regionData"
v-model="address"
:props="{ checkStrictly: true }"
clearable
/>
<div class="mr10">审核状态</div>
<el-radio-group v-model="searchValue.status" class="mr10">
<el-radio :value="-1">全部</el-radio>
<el-radio :value="0">审核中</el-radio>
<el-radio :value="1">已通过</el-radio>
<el-radio :value="2">已驳回</el-radio>
</el-radio-group>
<el-button type="primary" @click="search">搜索</el-button>
</div>
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="schoolName" label="学校名称" width="180" />
<el-table-column prop="area" label="所属地区" width="180" />
<el-table-column prop="certNum" label="事业单位法人证件号" />
<el-table-column prop="name" label="联系人" />
<el-table-column prop="mobile" label="联系电话" />
<el-table-column prop="status" label="审核状态">
<template #default="scope">
{{scope.row.status==0?'审核中':scope.row.status==1?'已通过':'已驳回' }}
</template>
</el-table-column>
<el-table-column prop="Operations" label="操作">
<template #default="scope">
<a v-if="scope.row.status==0" style="color:#04A8F0;cursor: pointer;" @click="audit(scope.row)">审核</a>
</template>
</el-table-column>
</el-table>
<el-pagination style="margin-top:10px;float: right;" background layout="prev, pager, next" @size-change="handleSizeChange"
@current-change="handleCurrentChange" :default-page-size="searchValue.pageSize" v-model:current-page="searchValue.pageNum" :total="total" />
<el-dialog
v-model="dialogVisible"
title="加入学校审核"
width="500"
style="text-align: left;"
:before-close="handleClose"
>
<div style="margin-left:20px" class="formdialog">
审核状态
<el-radio-group v-model="form.status" class="mr10">
<el-radio :value="1">通过</el-radio>
<el-radio :value="2">拒绝</el-radio>
</el-radio-group>
</div>
<div style="margin-left:20px;margin-top:30px" class="formdialog">
审核理由
<el-input
v-model="form.auditMsg"
style="width: 300px"
:rows="3"
type="textarea"
placeholder="请输入理由"
/>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="sbmitform">
确定
</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup>
import { school } from '@/api/apiService';
import { ref, reactive, onMounted ,computed} from 'vue'
import { regionData, codeToText } from 'element-china-area-data'
import { ElMessage } from 'element-plus'
import useUserStore from '@/store/modules/user'
const userStore = useUserStore()
const searchValue = reactive({
status:-1,
schoolName:null,
pageNum:1,
pageSize:10,
type:3
})
const id=ref(null)
const address=ref([])
const total=ref(0)
const tableData = ref([])
const dialogVisible=ref(false)
const form=reactive({
status:'1',
auditMsg:null,
id:null,
ex1:null
})
const sbmitform=()=>{
if(!form.auditMsg){
return ElMessage.error('请输入理由')
}
school.checkSchool(form).then(res=>{
dialogVisible.value=false
form.auditMsg=null
form.status=1
getList()
userStore.getDeptInfo()
})
}
const filterNullProperties=(obj)=> {
const newObj = {};
for (const key in obj) {
if (obj[key] !== null && obj[key] != 'null' && obj[key] !== undefined) {
newObj[key] = obj[key];
}
}
return newObj;
}
const search=()=>{
searchValue.pageNum=1
getList()
}
const handleCurrentChange=()=>{
getList()
}
const handleSizeChange=()=>{
getList()
}
const handleClose=()=>{
form.id=null
form.ex1=null
form.auditMsg=null
form.status=1
dialogVisible.value=false
}
const formattedAddress = () => {
if (typeof address.value === 'undefined' || address.value?.length === 0) {
return null; //
}
return address.value.map(code => codeToText[code]).join('-'); // 使'-'
}
const getList = () =>{
const area=formattedAddress()
searchValue.area=area
let obj= filterNullProperties(searchValue)
school.auditlist(obj).then(res=>{
tableData.value=res.rows
total.value=res.total
})
}
const audit=(row)=>{
form.id=row.id
form.ex1=row.ex1
form.auditMsg=null
form.status=1
dialogVisible.value=true
}
onMounted(()=>{
console.log(searchValue)
getList()
})
</script>
<style scoped scss>
.schoolManagement{
padding: 20px;
background: #fff;
padding-bottom: 50px;
}
.titletext{
text-align: left;
display: flex;
align-items: center;
font-size: 30px;
margin-bottom: 30px;
}
.searchInput{
display: flex;
align-items:center;
margin-bottom: 20px;
}
.mr10{
margin-right: 10px;
}
.formdialog{
display: flex;
align-items: center;
}
</style>

View File

@ -0,0 +1,28 @@
<template>
<div class="container-pdf">
<PDF :url="pdfUrl" :showCatalog="false" v-if="pdfUrl" />
</div>
</template>
<script setup>
import { ref, onMounted, nextTick } from 'vue';
import PDF from '@/components/PdfJs/index.vue'
import { sessionStore } from '@/utils/store'
const pdfUrl = ref('')
onMounted(async () =>{
await nextTick()
const { fileurl } = sessionStore.get('subject.curBook')
pdfUrl.value = import.meta.env.VITE_APP_RES_FILE_PATH + fileurl.replace('.txt','.pdf')
})
</script>
<style lang="scss" scoped>
.container-pdf{
height: 100%;
}
</style>

View File

@ -0,0 +1,152 @@
<template>
<div class="question-container">
<div class="question-main">
<div class="question-item">
<div class="item-con">
<div class="item-q flex">
<div class="q-user">
<i class="iconfont icon-touxiang"></i>
</div>
<div class="q-text">总结沁园春·长沙一课的教学目标</div>
</div>
<div class="item-a flex">
<div class="a-user">
</div>
<div class="a-text">
<p>本单元属于必修课程文学阅读与写作任务群课标指出文学阅读与写作任务群旨在引导学生阅读古今中外诗歌散文小说剧本等不同体裁的优秀文学作品使学生在感受形象品味语言体验情感的过程中提升文学欣赏能力并尝试文学写作撰写文学评论借以提高审美鉴赏能力和表达交流能力
毛泽东沁园春·长沙作者充满激情地回忆了青年时期粪土当年万户侯的岁月词作豪迈大气洋溢着不可抗拒的青春热情特别是对当时社会的思考和改造世界的雄心斗志有着强烈的感染力可以激励学生坚定不断进取奉献社会的决心和信心
</p>
<a class="" href="">来自教师用书高中语文点击查看原文第22页</a>
</div>
</div>
</div>
<div class="item-icon flex">
<div class="flex">
<span>
<i class="iconfont icon-fuzhi"></i>
复制
</span>
<span>
<i class="iconfont icon-bianji-gangbi"></i>
写评价
</span>
<span>
<i class="iconfont icon-rss-line"></i>
添加到微教研
</span>
</div>
<div>
<span>
<i class="iconfont icon-tianjia"></i>
保存
</span>
</div>
</div>
</div>
</div>
<el-input v-model="textarea" class="question-textarea" resize="none" :rows="2" type="textarea" placeholder="在这里输入发消息,输入@或/选择" />
</div>
</template>
<script setup>
import { ref } from 'vue'
const textarea = ref('')
</script>
<style lang="scss" scoped>
.question-container {
padding: 10px 15px;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
.question-item {
display: flex;
flex-direction: column;
.item-con {
background: #fff;
border-radius: 5px;
padding: 10px;
.item-q {
align-items: center;
width: 100%;
margin-bottom: 10px;
.q-user {
width: 30px;
height: 30px;
background: #F6F6F6;
border-radius: 50%;
margin-right: 10px;
.icon-touxiang {
font-size: 18px;
font-weight: bold;
}
}
.q-text {
color: #409eff;
font-size: 13px;
}
}
.item-a {
color: #3D3D3D;
font-size: 13px;
.a-user {
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
background: #F6F6F6;
border-radius: 50%;
margin-right: 10px;
flex-shrink: 0;
}
.a-text {
text-align: left;
a{
color: #409eff;
text-decoration: underline;
margin-bottom: 15px;
display: block;
}
}
}
}
.item-icon{
justify-content: space-between;
align-items: center;
color: #3D3D3D;
margin-top: 10px;
font-size: 13px;
span{
display: flex;
align-items: center;
cursor: pointer;
margin-right: 10px;
&:hover{
background: #F5F7FA
}
}
.iconfont{
margin-right: 3px;
color: #3498fc;
}
}
}
.question-textarea {
width: 100%;
}
}
</style>

View File

@ -0,0 +1,193 @@
<template>
<div class="read-container">
<div class="template-list">
<el-row>
<el-col :span="24">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>教学目标研读</div>
<div class="item-text">研读课程标准提取出与本课相关的核心素养与课程目标</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>教学重点与难点</div>
<div class="item-text">研读课程标准提取出与本课相关的课程内容要求
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>前置知识分析研读</div>
<div class="item-text">研读课程标准提取出与本课相关的学业水平要求包括水平一水平二水平三各自的要求描述
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>课文情境研读</div>
<div class="item-text">研读课程标准提取出与本课相关的教学实施建议
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>例题习题研读</div>
<div class="item-text">研读课程标准提取出与本课相关的教学实施建议
</div>
</div>
</el-col>
</el-row>
</div>
</div>
</template>
<script setup>
</script>
<style lang="scss" scoped>
.read-container {
padding: 15px;
.el-dropdown-link {
font-weight: bold;
.el-icon--right {
font-weight: bold;
}
}
.read-header {
justify-content: space-between;
align-items: center;
.add-btn {
font-size: 13px;
.icon-jiahao {
margin-right: 3px;
font-size: 14px;
}
}
}
.template-list {
.template-item {
background: #fff;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
.item-header {
display: flex;
align-items: center;
font-size: 16px;
font-weight: bold;
color: #000;
.blue {
font-size: 22px;
color: #409eff;
margin-right: 5px;
}
}
.item-text {
display: flex;
color: #409eff;
font-size: 13px;
padding-left: 20px;
text-align: left;
}
}
}
.template-item-result {
background: #DDEAFD !important;
.result-item-header {
display: flex;
align-items: flex-start;
text-align: left;
font-size: 16px;
font-weight: bold;
color: #3D3D3D;
.icon-xiaoxi {
color: #5881D5;
font-weight: bold;
font-size: 20px;
margin-right: 10px;
}
}
.result-icon-btn {
justify-content: space-between;
font-size: 13px;
margin-top: 5px;
span {
display: flex;
align-items: center;
cursor: pointer;
margin-right: 10px;
&:hover {
background: #cfe0fa
}
}
.iconfont {
margin-right: 3px;
color: #3498fc;
}
}
.line {
height: 1px;
background: #D8D8D8;
margin: 10px 0;
}
.other-msg {
font-size: 13px;
.other-user {
align-items: center;
color: #BA4B0F;
font-size: 12px;
.icon-touxiang {
color: #BA4B0F;
font-weight: bold;
font-size: 16px;
margin-right: 5px;
}
}
.other-text {
color: #191919;
text-align: left;
}
}
}
}
.pl-25 {
padding-left: 25px;
}
</style>

View File

@ -0,0 +1,157 @@
<template>
<div class="read-container">
<div class="read-header flex">
<el-dropdown>
<span class="el-dropdown-link">
课标研读模板
<i class="iconfont icon-xiangxia" </i>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item>课标研读模板一</el-dropdown-item>
<el-dropdown-item>课标研读模板二</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
<el-button text class="add-btn">
<i class="iconfont icon-jiahao"></i>
添加
</el-button>
</div>
<div class="template-list">
<el-row :gutter="20">
<el-col :span="12">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>教学目标研读</div>
<div class="item-text">研读课程标准提取出与本课相关的核心素养与课程目标</div>
</div>
</el-col>
<el-col :span="12">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>教学重点与难点</div>
<div class="item-text">研读课程标准提取出与本课相关的课程内容要求</div>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>课程内容要求</div>
<div class="item-text">研读课程标准提取出与本课相关的课程内容要求
</div>
</div>
</el-col>
<el-col :span="12">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>前置知识分析研读</div>
<div class="item-text">
研读课程标准提取出与本课相关的学业水平要求包括水平一水平二水平三各自的要求描述
</div>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>例题习题研读</div>
<div class="item-text">研读课程标准提取出与本课相关的教学实施建议
</div>
</div>
</el-col>
<el-col :span="12">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>插图素材研读</div>
<div class="item-text">研读课程标准提取出与本课相关的教学实施建议
</div>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<div class="template-item">
<div class="item-header"><span class="blue">#</span>拓展知识研读</div>
<div class="item-text">研读课程标准提取出与本课相关的教学实施建议
</div>
</div>
</el-col>
</el-row>
</div>
</div>
</template>
<script setup>
</script>
<style lang="scss" scoped>
.read-container {
padding: 15px;
.el-dropdown-link {
font-weight: bold;
.el-icon--right {
font-weight: bold;
}
}
.read-header {
justify-content: space-between;
align-items: center;
.add-btn {
font-size: 13px;
.icon-jiahao {
margin-right: 3px;
font-size: 14px;
}
}
}
.template-list {
margin-top: 15px;
.template-item {
background: #fff;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
.item-header {
display: flex;
align-items: center;
font-size: 16px;
font-weight: bold;
color: #3D3D3D;
.blue {
font-size: 22px;
color: #409eff;
margin-right: 5px;
}
}
.item-text {
display: flex;
color: #409eff;
font-size: 13px;
padding-left: 20px;
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
/* 将对象作为弹性伸缩盒子模型显示 */
display: -webkit-box;
/* 限制在一个块元素显示的文本的行数 */
/* -webkit-line-clamp 其实是一个不规范属性使用了WebKit的CSS扩展属性该方法适用于WebKit浏览器及移动端*/
-webkit-line-clamp: 2;
/* 设置或检索伸缩盒对象的子元素的排列方式 */
-webkit-box-orient: vertical;
}
}
}
}
</style>

View File

@ -0,0 +1,178 @@
<template>
<div class="page-curriculum flex">
<el-row>
<el-col :span="12" class="flex">
<div class="page-left">
<template v-if="activeMenu == 1">
<div class="page-title">教材研读</div>
<el-radio-group v-model="radio" @change="changeRadio">
<el-radio :value="item.value" v-for="item in radioList">{{ item.label }}</el-radio>
</el-radio-group>
<div class="list">
<ul>
<li v-for="(item, index) in list" :class="activeIndex == index ? 'li-active' : ''"
@click="clickItem(index)">
<el-image class="img" :src="item.url" />
<span>{{ item.name }}</span>
</li>
</ul>
</div>
</template>
<template v-if="activeMenu != 1">
<PdfTemplate/>
</template>
</div>
</el-col>
<el-col :span="12" class="flex">
<div class="page-right">
<div class="right-header">
<el-button text :type="activeMenu == item.value ? 'primary' : ''" v-for="item in contentMenu"
@click="onClickMenu(item)">{{ item.label
}}</el-button>
</div>
<div class="right-con">
<ReadTemplate v-if="activeMenu == 1" />
<QuestionAnswer v-if="activeMenu == 2" />
<ReadResult v-if="activeMenu == 3" />
</div>
</div>
</el-col>
</el-row>
</div>
</template>
<script setup>
import { ref } from 'vue'
import ReadTemplate from './container/read-template.vue';
import QuestionAnswer from './container/question-answer.vue'
import ReadResult from './container/read-result.vue'
import PdfTemplate from './container/pdf-template.vue'
const url = 'https://p5.itc.cn/images01/20220529/f30e3c4164dc4f7495ed196577a2a312.jpeg'
/************************左侧************* */
const radio = ref(1)
const radioList = ref([
{ label: '浏览研读', value: 1 },
{ label: '跨学科研读', value: 2 },
{ label: '跨学段研读', value: 3 },
{ label: '课标修订研读', value: 4 },
{ label: '自由研读', value: 5 },
])
const list = ref([
{
name: '高中语文必修上',
url
}
])
const changeRadio = () => {
list.value = []
for (let i = 0; i < Math.floor(Math.random() * 5) + 1; i++) {
list.value.push({
name: '高中语文必修上',
url
})
}
}
const activeIndex = ref(-1)
const clickItem = (index) => {
activeIndex.value = index
}
/************************右侧************* */
const contentMenu = [
{ label: '研读模板', value: 1 },
{ label: '问答模板', value: 2 },
{ label: '研读结果', value: 3 }
]
const activeMenu = ref(1)
const onClickMenu = (item) => {
activeMenu.value = item.value
}
</script>
<style lang="scss" scoped>
.page-curriculum {
height: 100%;
background: #fff;
border-radius: 5px;
overflow: hidden;
.el-row {
width: 100%;
.page-left {
width: 100%;
padding: 0 20px;
box-sizing: border-box;
.page-title {
font-size: 20px;
padding: 20px 0;
}
.list {
ul {
display: flex;
flex-wrap: wrap;
li {
display: flex;
flex-direction: column;
font-size: 13px;
padding: 10px;
cursor: pointer;
border-radius: 5px;
overflow: hidden;
margin-right: 20px;
margin-bottom: 10px;
.img {
width: 100px;
height: 130px;
border: solid #ccc 1px;
margin-bottom: 10px;
}
&:hover {
background: #E0EAFF;
}
}
.li-active {
background: #E0EAFF;
}
}
}
}
.page-right {
width: 100%;
background: #F6F6F6;
border-left: solid #ececec 1px;
display: flex;
flex-direction: column;
.right-header {
padding-left: 30px;
height: 45px;
display: flex;
align-items: center;
background: #fff;
border-bottom: solid #ececec 1px;
}
.right-con {
flex: 1;
}
}
}
}
</style>

View File

@ -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/g, '<br />'); //替换\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