Compare commits

..

17 Commits

Author SHA1 Message Date
yangws c0c7fa3298 Merge pull request 'add:主页进入详情的页面;' (#37) from yangws_ws into main
Reviewed-on: #37
2024-11-13 17:07:30 +08:00
小杨 3d2b102355 add:主页进入详情的页面; 2024-11-13 17:07:06 +08:00
yangws 4feeb2ef56 Merge pull request 'add:作业管理样式;' (#36) from yangws_ws into main
Reviewed-on: #36
2024-11-13 11:27:35 +08:00
小杨 af0dd7f565 add:作业管理样式; 2024-11-13 11:27:02 +08:00
朱浩 a2c14b0d0a Merge remote-tracking branch 'origin/main' 2024-11-13 11:23:16 +08:00
朱浩 fe04f8acbd 三方资源加入备课 2024-11-13 11:23:08 +08:00
lyc 54c2215668 Merge pull request '模板' (#35) from lyc-dev into main 2024-11-13 11:22:07 +08:00
lyc 3f6f6124b3 模板 2024-11-13 11:22:53 +08:00
lyc 31adcd8460 Merge pull request 'lyc-dev' (#34) from lyc-dev into main 2024-11-13 10:23:02 +08:00
lyc 601e9f023a 模板 2024-11-13 10:23:56 +08:00
lyc 2de27f3d88 模板 2024-11-13 10:11:36 +08:00
朱浩 3949d55d64 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk_WS 2024-11-13 09:25:20 +08:00
朱浩 4fb763eb6a 三方资源加入备课 2024-11-13 09:25:07 +08:00
yangws 779bbfe179 Merge pull request 'yangws_ws' (#33) from yangws_ws into main
Reviewed-on: #33
2024-11-12 17:33:58 +08:00
小杨 d809842b93 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk_WS into yangws_ws 2024-11-12 17:32:58 +08:00
小杨 280f875e99 add:作业管理页面,以及修复bug; 2024-11-12 17:32:52 +08:00
zhangxuelin f9a5a5b0dd Merge pull request 'zxl' (#32) from zxl into main
Reviewed-on: #32
2024-11-12 17:29:56 +08:00
30 changed files with 897 additions and 1007 deletions

View File

@ -64,3 +64,10 @@ export const addFileToPrepareThird = (data) => {
data data
}) })
} }
export const addFileToKj = (id) => {
return request({
url: '/smarttalk/file/addFileToKj/' + id,
method: 'get'
})
}

View File

@ -1,6 +1,7 @@
import request from '@/utils/request' import request from '@/utils/request'
import axios from 'axios' import axios from 'axios'
let rootPath = import.meta.env.VITE_APP_ENV === 'production' ? "https://ai.ysaix.com:7864" : '';
// 查询模板列表 // 查询模板列表
export function modelList(params) { export function modelList(params) {
return request({ return request({
@ -12,21 +13,20 @@ export function modelList(params) {
export function conversation(data) { export function conversation(data) {
return axios({ return axios({
url: '/v1/api/new_conversation', url: rootPath + '/v1/api/new_conversation',
method: 'get', method: 'get',
headers: { headers: {
'Authorization':'Bearer ragflow-IwNzMxMTIyOGY0ZTExZWZiOGE2MDI0Mm', 'Authorization':'Bearer ragflow-IwNzMxMTIyOGY0ZTExZWZiOGE2MDI0Mm',
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Accept': '*/*'
}, },
params: data data: data
}) })
} }
// 进行课标研读对话 // 进行课标研读对话
export function completion(data) { export function completion(data) {
return axios({ return axios({
url: '/v1/api/completion', url: rootPath + '/v1/api/completion',
method: 'post', method: 'post',
headers: { headers: {
'Authorization':'Bearer ragflow-IwNzMxMTIyOGY0ZTExZWZiOGE2MDI0Mm', 'Authorization':'Bearer ragflow-IwNzMxMTIyOGY0ZTExZWZiOGE2MDI0Mm',

View File

@ -30,7 +30,7 @@
</div> </div>
</el-scrollbar> </el-scrollbar>
<div class="input-box flex"> <div class="input-box flex">
<el-input v-model="textarea" :disabled="loaded"/> <el-input v-model="textarea" @keyup.enter="send" :disabled="loaded"/>
<div class="ipt-icon" @click="send"> <div class="ipt-icon" @click="send">
<i class="iconfont icon-fasong"></i> <i class="iconfont icon-fasong"></i>
</div> </div>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog v-model="isDialog" :show-close="false" width="900"> <el-dialog v-model="isDialog" :show-close="false" width="900" destroy-on-close>
<template #header> <template #header>
<div class="custom-header flex"> <div class="custom-header flex">
<span>选择{{ title }}</span> <span>选择{{ title }}</span>
@ -40,17 +40,19 @@ const url = 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhsc
const isDialog = defineModel() const isDialog = defineModel()
const props = defineProps({ const props = defineProps({
model: { modeType: {
type: [String, Number], type: Number,
default: 1 default: 1
} }
}) })
const title = computed(() => { const title = computed(() => {
if (props.model == 1) return '课标'; if (props.modeType == 1) return '课标';
if (props.model == 2) return '教材'; if (props.modeType == 2) return '教材';
if (props.model == 3) return '考试'; if (props.modeType == 3) return '考试';
}) })
const radio = ref(1) const radio = ref(1)
const radioList = ref([ const radioList = ref([
{ label: '浏览研读', value: 1 }, { label: '浏览研读', value: 1 },

View File

@ -60,11 +60,11 @@
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
<Dialog v-model="showDialog" :model="model" /> <Dialog v-model="showDialog" :modeType="type" />
</template> </template>
<script setup> <script setup>
import { ref, reactive, onMounted } from 'vue' import { ref, reactive, onMounted, watch } from 'vue'
import { Plus } from '@element-plus/icons-vue' import { Plus } from '@element-plus/icons-vue'
import { ElMessageBox } from 'element-plus' import { ElMessageBox } from 'element-plus'
import { modelList } from '@/api/mode/index' import { modelList } from '@/api/mode/index'
@ -72,11 +72,15 @@ import Dialog from './dialog.vue'
const keywordDialog = ref(false) const keywordDialog = ref(false)
const props = defineProps({ const props = defineProps({
model: { type: {
type: [String, Number], type: Number,
default: 1 default: 1
} }
}) })
watch(() => props.type, (newValue) => {
console.log(newValue, 'newValue2');
}, { immediate: true });
const emit = defineEmits(['changeTemp', 'onRead']) const emit = defineEmits(['changeTemp', 'onRead'])
const showDialog = ref(false) const showDialog = ref(false)
@ -86,14 +90,13 @@ const aiRead = () => {
} }
// //
const curTemplate = reactive({ name: '', id: '' }) const curTemplate = reactive({ name: '', id: '' })
// //
const templateList = ref([]) const templateList = ref([])
// //
const getTemplateList = () => { const getTemplateList = () => {
modelList({ model: 1, type: 1 }).then(res => { modelList({ model: props.type, type: 1 }).then(res => {
templateList.value = res.rows templateList.value = res.rows
Object.assign(curTemplate, res.rows[0]); Object.assign(curTemplate, res.rows[0]);
emit('changeTemp', res.rows[0].id) emit('changeTemp', res.rows[0].id)

View File

@ -16,7 +16,6 @@ onMounted(async () =>{
await nextTick() await nextTick()
const { fileurl } = sessionStore.get('subject.curBook') const { fileurl } = sessionStore.get('subject.curBook')
pdfUrl.value = import.meta.env.VITE_APP_RES_FILE_PATH + fileurl.replace('.txt','.pdf') pdfUrl.value = import.meta.env.VITE_APP_RES_FILE_PATH + fileurl.replace('.txt','.pdf')
console.log('pdfUrl.value', pdfUrl.value)
}) })
</script> </script>

View File

@ -33,7 +33,7 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-empty v-if="!childTempList.length" description="暂无模板数据" />
</div> </div>
</el-scrollbar> </el-scrollbar>
<!--编辑结果--> <!--编辑结果-->
@ -55,18 +55,12 @@ import { conversation, completion, modelList } from '@/api/mode/index'
const userStore = useUserStore() const userStore = useUserStore()
const props = defineProps({ const props = defineProps({
curTemp: {
type: Array,
default: () => {
return []
}
},
tempId: { tempId: {
type: [String, Number], type: [String, Number],
default: '' default: ''
}, },
model: { modeType: {
type: [String, Number], type: Number,
default: 1 default: 1
} }
}) })
@ -76,9 +70,8 @@ const tempLoading = ref(false)
const childTempList = ref([]) const childTempList = ref([])
const getChildTemplate = () => { const getChildTemplate = () => {
tempLoading.value = true tempLoading.value = true
modelList({ model: props.model, type: 2, parentId: props.tempId }).then(res => { modelList({ model: props.modeType, type: 2, parentId: props.tempId }).then(res => {
childTempList.value = res.rows childTempList.value = res.rows
console.log('res.rows=====>', res.rows)
}).finally(() => { }).finally(() => {
tempLoading.value = false tempLoading.value = false

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="page-template flex"> <div class="page-template flex">
<!--头部--> <!--头部-->
<Header @changeTemp="changeTemp" @onRead="onRead"/> <Header :type="type" @changeTemp="changeTemp" @onRead="onRead"/>
<el-row :gutter="20" class="tempalte-main"> <el-row :gutter="20" class="tempalte-main">
<el-col :span="12"> <el-col :span="12">
<!--左侧pdf--> <!--左侧pdf-->
@ -9,7 +9,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<!--右侧模板研读--> <!--右侧模板研读-->
<Result ref="resultRef" :tempId="tempId"/> <Result ref="resultRef" :modeType="type" :tempId="tempId"/>
</el-col> </el-col>
</el-row> </el-row>
@ -22,6 +22,14 @@ import Header from './container/header.vue'
import Pdf from './container/pdf.vue' import Pdf from './container/pdf.vue'
import Result from './container/result.vue' import Result from './container/result.vue'
const props = defineProps({
type: {
type: Number,
default: 1
},
})
const resultRef = ref() const resultRef = ref()
const tempId = ref('') const tempId = ref('')
const changeTemp = (id) =>{ const changeTemp = (id) =>{

View File

@ -112,7 +112,6 @@ const sideBottomMenu = [
const computedregistertype = computed(() => { const computedregistertype = computed(() => {
const type =userStore.DeptInfo?.register?.type ??0 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){ if(type==0 || userStore.DeptInfo?.register?.auditStatus!=0 && userStore.DeptInfo?.register?.auditStatus!=1){
return 1 return 1
} }

View File

@ -40,7 +40,6 @@ watch(
() => router.currentRoute.value, () => router.currentRoute.value,
(newValue) => { (newValue) => {
let path = newValue.path let path = newValue.path
console.log(newValue);
if (path.includes('/model') && path !== ('/model/index')) { if (path.includes('/model') && path !== ('/model/index')) {
isShowBack.value = true isShowBack.value = true

View File

@ -56,6 +56,26 @@ export const constantRoutes = [
name: 'examination-analysis', name: 'examination-analysis',
meta: { title: '考试分析' } meta: { title: '考试分析' }
}, },
{
path: 'management',
component: () => import('@/views/job-management/index.vue'),
name: 'job-management',
meta: { title: '作业管理' },
// children: [
// {
// path: 'details',
// component: () => import('@/views/job-management/Details/index.vue'),
// name: 'details',
// meta: { title: '详情' }
// },
// {
// path: 'right',
// component: () => import('@/views/job-management/Right/index.vue'),
// name: 'right',
// meta: { title: '主页' }
// },
// ]
},
] ]
}, },

View File

@ -286,7 +286,9 @@
} }
onMounted(() => { onMounted(() => {
getClassInfo() //
if(userStore.deptId)
getClassInfo()
nextTick(() => { nextTick(() => {
viewportHeight.value = getViewportHeight() viewportHeight.value = getViewportHeight()
}) })

View File

@ -1,28 +0,0 @@
<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

@ -1,153 +0,0 @@
<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

@ -1,301 +0,0 @@
<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

@ -1,132 +0,0 @@
<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

@ -1,186 +1,10 @@
<template> <template>
<TemplateStudy/> <TemplateStudy :mode="mode"/>
<!-- <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> </template>
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import TemplateStudy from '@/components/template-study/index.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
}
const mode = ref(1)
</script> </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

@ -0,0 +1,5 @@
<template>
<div>
2222
</div>
</template>

View File

@ -0,0 +1,97 @@
<template>
<div class="tabs-container">
<div class="button-div">
<el-button @click="goBack" type="primary" size="small">返回主页</el-button>
<el-button type="default" size="small">推送</el-button>
<el-button type="primary" size="small">保存</el-button>
</div>
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<template v-for="(item,index) in props.parameter.titleList">
<el-tab-pane :label="item.label" :name="item.id">
<el-row :gutter="10" class="tempalte-main">
<el-col :span="16">
<!-- 左侧组件 -->
<transition name="fade">
<component :is="currentComponent"/>
</transition>
</el-col>
<el-col :span="8">
<!-- 右侧 -->
<el-scrollbar class="right-box" :height="pageHeight">
<el-form label-position="top">
<el-form-item label="作业名称">
<el-input></el-input>
</el-form-item>
<el-form-item label="作业说明">
<el-input type="textarea" :row="5"></el-input>
</el-form-item>
</el-form>
</el-scrollbar>
</el-col>
</el-row>
</el-tab-pane>
</template>
</el-tabs>
</div>
</template>
<script setup>
import { ref,defineProps ,defineEmits,nextTick , onMounted,shallowRef } from 'vue'
import ClassroomPresentation from './classroomPresentation/index.vue'
import selfSearchQuestions from './selfSearchQuestions/index.vue'
const props = defineProps({
parameter: Object
});
const emits = defineEmits(['goBack'])
const currentComponent = shallowRef(null)
const activeName = ref(1)
const pageHeight = ref(0)
const handleClick = (tab, event) => {
console.log(tab, event)
}
//
const goBack = () => {
emits('goBack')
}
//
const rightComponets = (str) => {
switch (str) {
case 'classroomPresentation':
return ClassroomPresentation
case 'selfSearchQuestions':
return selfSearchQuestions
default:
return null
}
}
//
onMounted(() => {
currentComponent.value = rightComponets(props.parameter.components)
//
nextTick(() => {
pageHeight.value = window.innerHeight + window.scrollY - 156;
});
})
</script>
<style lang="scss" scoped>
.tabs-container{
position: relative;
}
.button-div{
position: absolute;
top: 5px;
right: 0;
z-index: 999;
}
.right-box{
background-color: #fff;
padding:5px;
border-radius: 4px;
overflow-y: auto;
}
</style>

View File

@ -0,0 +1,5 @@
<template>
<div>
11111
</div>
</template>

View File

@ -0,0 +1,133 @@
<template>
<div class="list-container">
<div class="content-list" v-for="(item, index) in items" :key="index" @click="handleClick(item)">
<div class="item-content">
<el-checkbox v-model="item.checked" @click.stop="clickCheckbox(item)"/>
<div class="item-text">
<div class="title-header">
<div class="item-title" :title="item.title">{{ item.title }}</div>
<CustomButton :item="{ type: item.type, text: item.text, plain: true }" />
</div>
<div class="item-description" :title="item.description">{{ item.description }}</div>
</div>
<el-icon class="item-icon"><ArrowRight /></el-icon>
</div>
</div>
</div>
</template>
<script setup>
import { ref } from 'vue';
import { ArrowRight } from '@element-plus/icons-vue';
import CustomButton from '../components/button.vue'
const emits = defineEmits(['checked']);
const items = ref([
{ id:1,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
{ id:2,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'primary',text:'课堂练习' },
{ id:3,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
{ id:4,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'danger',text:'常规作业' },
{ id:5,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
{ id:6,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
{ id:7,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
]);
// checkboxid
const selectIds = ref([])
const handleClick = (item) => {
console.log(item.title);
};
//
const clickCheckbox = (item,e) => {
if(item.checked === true){
if(selectIds.value.includes(item.id)){
const index = selectIds.value.indexOf(item.id)
selectIds.value.splice(index,1)
}
}else{
selectIds.value.push(item.id)
}
emits('checked',selectIds.value)
}
</script>
<style scoped>
/* 样式部分保持不变 */
.list-container {
width: 100%;
max-width: 400px; /* 可以根据需要调整宽度 */
margin: 0 auto;
padding: 8px;
background-color: #f5f5f5;
border-radius: 8px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
.content-list {
background-color: #fff;
border-radius: 8px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
padding: 8px;
margin-bottom: 16px;
cursor: pointer;
transition: all 0.3s ease;
}
.content-list:last-child {
margin-bottom: 0;
}
.content-list:hover {
transform: translateY(-4px);
box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.15);
}
.item-content {
display: flex;
align-items: center;
}
.item-icon {
font-size: 24px;
color: #409eff;
}
.item-text {
display: flex;
flex-direction: column;
flex: 1;
margin-left: 5px;
}
.title-header{
display: flex;
justify-content: space-between;
align-items: center;
}
.item-title {
font-size: 14px;
font-weight: 500;
color: #303133;
text-align: left;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1; /* 设置最大行数 */
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
.item-description {
font-size: 12px;
color: #333;
text-align: left;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; /* 设置最大行数 */
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
</style>

View File

@ -0,0 +1,179 @@
<template>
<div class="list-container">
<div class="content-list" v-for="(item, index) in items" :key="index" @click="handleClick(item)">
<div class="item-content">
<div class="item-text">
<div class="title-header">
<div class="item-title">{{ item.title }}</div>
<el-icon class="item-icon"><component :is="item.icon" /></el-icon>
</div>
<div class="item-description">{{ item.description }}</div>
<div class="item-bottom">
<CustomButton :item="{ type: item.type, text: item.text, plain: true }" />
</div>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { ref, markRaw } from 'vue';
import { Plus, ArrowDown, Document, User, Setting } from '@element-plus/icons-vue';
import CustomButton from '../components/button.vue';
const emits = defineEmits(['skipDetail']);
const items = ref([
{ title: '自主搜题', description: '1111111', icon: markRaw(Document), type: 'default', text: '习题训练',components:'classroomPresentation',titleList:[
{
id:1,
label:'自主搜题',
},
{
id:2,
label:'校本题库',
},
{
id:3,
label:'个人题库',
},
]},
{ title: '校本题库', description: '222222', icon: markRaw(Document), type: 'default', text: '习题训练',components:'classroomPresentation',titleList:[
{
id:1,
label:'自主搜题',
},
{
id:2,
label:'校本题库',
},
{
id:3,
label:'个人题库',
},
] },
{ title: '个人题库', description: '333333', icon: markRaw(Document), type: 'default', text: '习题训练',components:'classroomPresentation',titleList:[
{
id:1,
label:'自主搜题',
},
{
id:2,
label:'校本题库',
},
{
id:3,
label:'个人题库',
},
] },
{ title: '智能推荐', description: '444444', icon: markRaw(Document), type: '', text: '',components:'classroomPresentation',titleList:[
{
id:1,
label:'智能推荐',
},
] },
{ title: '课堂展示', description: '555555', icon: markRaw(Document), type: 'primary', text: '课堂展示',components:'selfSearchQuestions',titleList:[
{
id:1,
label:'课堂展示',
},
] },
{ title: '常规作业', description: '555555', icon: markRaw(Document), type: 'danger', text: '常规作业',components:'selfSearchQuestions',titleList:[
{
id:1,
label:'常规作业',
},
] },
{ title: 'AI设计作业', description: '555555', icon: markRaw(Document), type: 'danger', text: '常规作业',components:'selfSearchQuestions',titleList:[
{
id:1,
label:'AI设计作业',
},
] },
]);
const handleClick = (item) => {
emits('skipDetail', item);
};
</script>
<style scoped>
.list-container {
display: flex;
flex-wrap: wrap;
gap: 16px;
padding: 8px;
background-color: #f5f5f5;
}
.content-list {
background-color: #fff;
border-radius: 8px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
padding: 8px;
width: calc(25% - 16px);
cursor: pointer;
transition: all 0.3s ease;
}
.content-list:hover {
transform: translateY(-4px);
box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.15);
}
.item-content {
display: flex;
align-items: center;
}
.item-icon {
font-size: 24px;
color: #409eff;
margin-right: 16px;
}
.item-text {
flex: 1;
}
.item-title {
font-size: 16px;
font-weight: 500;
color: #303133;
margin-bottom: 4px;
font-weight: bold;
}
.item-description {
font-size: 14px;
color: #909399;
text-align: left;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; /* 设置最大行数 */
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
.title-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.item-bottom {
text-align: right;
}
/* 过渡动画 */
.fade-enter-active, .fade-leave-active {
transition: opacity 0.3s;
}
.fade-enter, .fade-leave-to {
opacity: 0;
}
</style>

View File

@ -0,0 +1,148 @@
<template>
<button :class="['custom-button', `custom-button--${item.type}`, { 'is-plain': item.plain }]">
{{ item.text }}
</button>
</template>
<script setup>
defineProps({
item: {
type: Object,
required: true,
default: () => ({ type: 'default', text: '', plain: false })
}
});
</script>
<style scoped>
.custom-button {
display: inline-block;
line-height: 1;
white-space: nowrap;
cursor: pointer;
background: #fff;
border: 1px solid #dcdfe6;
color: #606266;
-webkit-appearance: none;
text-align: center;
box-sizing: border-box;
outline: none;
margin: 0;
transition: 0.1s;
font-weight: 500;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
padding: 2px 2px;
font-size: 12px;
border-radius: 2px;
}
.custom-button.is-plain {
background: transparent;
background-color: rgba(220, 223, 230, 0.5);
color: #606266;
}
/* .custom-button.is-plain:hover {
background: rgba(245, 247, 250, 0.5);
background-color: rgba(198, 226, 255, 0.5);
color: #409eff;
} */
.custom-button--primary {
color: #fff;
background-color: rgba(64, 158, 255, 0.5);
}
.custom-button--primary.is-plain {
color: #409eff;
background: transparent;
background-color: rgba(64, 158, 255, 0.5);
}
/*
.custom-button--primary.is-plain:hover {
background: rgba(236, 245, 255, 0.5);
background-color: rgba(179, 216, 255, 0.5);
color: #409eff;
} */
.custom-button--success {
color: #fff;
background-color: rgba(103, 194, 58, 0.5);
}
.custom-button--success.is-plain {
color: #67c23a;
background: transparent;
background-color: rgba(103, 194, 58, 0.5);
}
/* .custom-button--success.is-plain:hover {
background: rgba(240, 249, 235, 0.5);
background-color: rgba(194, 231, 176, 0.5);
color: #67c23a;
} */
.custom-button--info {
color: #fff;
background-color: rgba(144, 147, 153, 0.5);
}
.custom-button--info.is-plain {
color: #909399;
background: transparent;
background-color: rgba(144, 147, 153, 0.5);
}
/* .custom-button--info.is-plain:hover {
background: rgba(244, 244, 245, 0.5);
background-color: rgba(211, 212, 214, 0.5);
color: #909399;
} */
.custom-button--warning {
color: #fff;
background-color: rgba(230, 162, 60, 0.5);
}
.custom-button--warning.is-plain {
color: #e6a23c;
background: transparent;
background-color: rgba(230, 162, 60, 0.5);
}
/* .custom-button--warning.is-plain:hover {
background: rgba(253, 246, 236, 0.5);
background-color: rgba(245, 218, 177, 0.5);
color: #e6a23c;
} */
.custom-button--danger {
color: #fff;
background-color: rgba(245, 108, 108, 0.5);
}
.custom-button--danger.is-plain {
color: #f56c6c;
background: transparent;
background-color: rgba(245, 108, 108, 0.5);
}
/* .custom-button--danger.is-plain:hover {
background: rgba(254, 240, 240, 0.5);
background-color: rgba(250, 179, 179, 0.5);
color: #f56c6c;
} */
/*
.custom-button:hover {
color: #409eff;
background-color: rgba(198, 226, 255, 0.5);
} */
.custom-button:active {
color: #3a8ee6;
background-color: rgba(58, 142, 230, 0.5);
outline: none;
}
</style>

View File

@ -0,0 +1,115 @@
<template>
<div class="custom-select" @mouseenter="toggleDropdown" @mouseleave="toggleDropup">
<div class="selected-option">
<el-icon><Plus /></el-icon>
{{ selectedOption }}
<el-icon><ArrowDown /></el-icon>
</div>
<transition name="dropdown">
<ul v-if="isDropdownOpen" class="options-list">
<li
v-for="(option, index) in options"
:key="index"
class="option-item"
@click="selectOption(option)">
{{ option }}
</li>
</ul>
</transition>
</div>
</template>
<script setup>
import { Plus, ArrowDown } from '@element-plus/icons-vue'
import { ref, defineEmits, defineProps } from 'vue';
const emits = defineEmits(['select-click']);
const props = defineProps({
options: {
type: Array,
required: true,
},
placeholder: {
type: String,
default: '请选择',
},
});
const isDropdownOpen = ref(false);
const selectedOption = ref(props.placeholder);
const toggleDropdown = () => {
isDropdownOpen.value = true;
};
const toggleDropup = () => {
isDropdownOpen.value = false;
};
const selectOption = (option) => {
isDropdownOpen.value = false;
emits('select-click', option)
};
</script>
<style scoped>
.custom-select {
position: relative;
width: auto;
cursor: pointer;
user-select: none;
font-size: 14px;
border-radius: 4px;
}
.selected-option {
padding: 10px;
background-color: #fff;
padding: 5px 10px;
background: rgb(64, 158, 255);
color: #fff;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: space-between;
}
.options-list {
position: absolute;
top: 100%;
left: 0;
right: 0;
border: 1px solid #dcdfe6;
border-top: none;
background-color: #fff;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
z-index: 1000;
max-height: 200px;
overflow-y: auto;
margin: 0;
padding: 0;
list-style: none;
}
.option-item {
padding: 0 16px;
height: 34px;
line-height: 34px;
white-space: nowrap;
cursor: pointer;
color: #606266;
font-size: 14px;
}
.option-item:hover {
background-color: #f5f7fa;
color: #409eff;
}
/* 动画效果 */
.dropdown-enter-active, .dropdown-leave-active {
transition: all 0.3s ease;
}
.dropdown-enter-from, .dropdown-leave-to {
opacity: 0;
transform: translateY(-10px);
}
</style>

View File

@ -0,0 +1,113 @@
<template>
<div class="page-template flex">
<!-- // -->
<div class="mb-4">
<div>
<el-button type="danger" :disabled="!isChceked">批量删除</el-button>
<el-button type="primary" :disabled="!isChceked">批量推送</el-button>
</div>
<CustomSelect
:options="options"
placeholder="设计新作业"
@select-click="selectClick"
/>
</div>
<div :style="{height: viewportHeight - 72 + 'px'}" class="no-horizontal-scroll">
<el-row :gutter="20" class="tempalte-main">
<el-col :span="6">
<!-- 左侧列表 -->
<Left @checked="checked"/>
</el-col>
<el-col :span="18">
<!-- 右侧 -->
<component :is="currentComponent" v-on="listeners" :parameter="parameter" />
</el-col>
</el-row>
</div>
</div>
</template>
<script setup>
import { ref, shallowRef, onMounted, nextTick, computed } from 'vue';
import Right from './Right/index.vue';
import Left from './Left/index.vue';
import Detials from './Details/index.vue';
import CustomSelect from './components/customSelect.vue';
const options = ref(['自主搜题', '校本题库', '个人题库', '智能推荐', '课堂展示', '常规作业', 'AI作业设计']);
// checkbox
const isChceked = ref(false);
const viewportHeight = ref(0);
const isSkip = ref(false);
//
const parameter = ref({});
// checkbox
const checked = (val) => {
console.log(val);
val.length > 0 ? isChceked.value = true : isChceked.value = false;
}
const currentComponent = shallowRef(Right);
//
const selectClick = (val) => {
console.log(val);
}
//
const skipDetail = (val) => {
parameter.value = Object.assign({}, val);
isSkip.value = true;
currentComponent.value = Detials;
}
//
const goBack = () => {
isSkip.value = false;
currentComponent.value = Right;
}
//
const getViewportHeight = () => {
return Math.max(
document.documentElement.clientHeight,
window.innerHeight || 0
);
}
onMounted(() => {
nextTick(() => {
window.addEventListener('resize', () => {
viewportHeight.value = getViewportHeight();
});
});
});
const listeners = computed(() => ({
skipDetail,
goBack
}));
</script>
<style lang="scss" scoped>
.mb-4 {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
background-color: #fff;
padding: 10px;
}
.page-template {
flex-direction: column;
height: 100%;
overflow-x: hidden; //
.tempalte-main {
flex: 1;
}
}
.no-horizontal-scroll {
overflow: auto;
overflow-x: hidden;
}
</style>

View File

@ -2,7 +2,8 @@
<div> <div>
<div class="mb-4"> <div class="mb-4">
<el-button type="primary" @click="onchange('/model/curriculum')">课标研读</el-button> <el-button type="primary" @click="onchange('/model/curriculum')">课标研读</el-button>
<!-- <el-button type="success" @click="onchange('/model/teaching')">教材研读</el-button> --> <el-button type="primary" @click="onchange('/model/management')">作业管理</el-button>
<el-button type="success" @click="onchange('/model/teaching')">教材研读</el-button>
<!-- <el-button type="info" @click="onchange('/model/examination')">考试分析</el-button> --> <!-- <el-button type="info" @click="onchange('/model/examination')">考试分析</el-button> -->
</div> </div>
</div> </div>

View File

@ -126,6 +126,12 @@
<span>下载</span> <span>下载</span>
</el-button> </el-button>
</div> </div>
<div v-if="item.fileSuffix === 'ppt' || item.fileSuffix === 'pptx'" class="item-popover-item">
<el-button text @click="adToKj(item)">
<i class="iconfont icon-jiahao"></i>
<span>加入课件</span>
</el-button>
</div>
<div class="item-popover-item"> <div class="item-popover-item">
<el-button text @click="moveSmarttalkFun(item)"> <el-button text @click="moveSmarttalkFun(item)">
<el-icon> <el-icon>
@ -153,7 +159,7 @@ import FileImage from '@/components/file-image/index.vue'
import { asyncLocalFile } from '@/utils/talkFile' import { asyncLocalFile } from '@/utils/talkFile'
import { toTimeText } from '@/utils/date' import { toTimeText } from '@/utils/date'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import { deleteSmarttalk, updateSmarttalk, getPrepareById } from '@/api/file' import { deleteSmarttalk, updateSmarttalk, getPrepareById, addFileToKj } from '@/api/file'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import outLink from '@/utils/linkConfig' import outLink from '@/utils/linkConfig'
@ -183,6 +189,14 @@ export default {
} }
}, },
methods: { methods: {
adToKj(item) {
addFileToKj(item.id).then(res=>{
console.log(res)
item.fileFlag = "课件"
},error=>{
console.log(error)
})
},
editTalk(item) { editTalk(item) {
console.log(item,this.userInfo,'this.userInfo') console.log(item,this.userInfo,'this.userInfo')
ElMessageBox.prompt('请输入新的名称', '重命名', { ElMessageBox.prompt('请输入新的名称', '重命名', {

View File

@ -538,7 +538,7 @@ export default {
} }
}, },
clickChoose(value) { clickChoose(value) {
this.checkFileList = value ? this.currentFileList : [] this.checkFileList = value ? this.currentSCFileList : []
}, },
deleteTalk(item) { deleteTalk(item) {
let index = this.currentFileList.indexOf(item) let index = this.currentFileList.indexOf(item)

View File

@ -8,7 +8,7 @@
</el-form-item> </el-form-item>
<el-form-item label="所属学校" prop="identity"> <el-form-item label="所属学校" prop="identity">
<div style="display: flex;"> <div style="display: flex;">
<div>{{ user.deptName }}</div> <div>{{ userStore.DeptInfo.register.schoolName }}</div>
<div> <div>
<el-button type="primary" link>更改学校</el-button> <el-button type="primary" link>更改学校</el-button>
</div> </div>
@ -249,8 +249,13 @@ function groupByCondition(arr, condition) {
} }
} }
onMounted(() => { onMounted(() => {
getSubject() console.log(userStore.DeptInfo,'DeptInfo');
getClassInfo()
getTheSection() //
if(userStore.user.deptId){
getSubject()
getClassInfo()
getTheSection()
}
}) })
</script> </script>

View File

@ -1,178 +1,11 @@
<template> <template>
<div class="page-curriculum flex"> <TemplateStudy :type="type"/>
<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> </template>
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import ReadTemplate from './container/read-template.vue'; import TemplateStudy from '@/components/template-study/index.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
}
const type = ref(2)
</script> </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>