Compare commits
11 Commits
d809842b93
...
af0dd7f565
Author | SHA1 | Date |
---|---|---|
小杨 | af0dd7f565 | |
朱浩 | a2c14b0d0a | |
朱浩 | fe04f8acbd | |
lyc | 54c2215668 | |
lyc | 3f6f6124b3 | |
lyc | 31adcd8460 | |
lyc | 601e9f023a | |
lyc | 2de27f3d88 | |
朱浩 | 3949d55d64 | |
朱浩 | 4fb763eb6a | |
yangws | 779bbfe179 |
|
@ -64,3 +64,10 @@ export const addFileToPrepareThird = (data) => {
|
|||
data
|
||||
})
|
||||
}
|
||||
|
||||
export const addFileToKj = (id) => {
|
||||
return request({
|
||||
url: '/smarttalk/file/addFileToKj/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import request from '@/utils/request'
|
||||
import axios from 'axios'
|
||||
|
||||
// 查询模板列表
|
||||
let rootPath = import.meta.env.VITE_APP_ENV === 'production' ? "https://ai.ysaix.com:7864" : '';
|
||||
// 查询模板列表
|
||||
export function modelList(params) {
|
||||
return request({
|
||||
url: '/education/llmModel/list',
|
||||
|
@ -12,21 +13,20 @@ export function modelList(params) {
|
|||
|
||||
export function conversation(data) {
|
||||
return axios({
|
||||
url: '/v1/api/new_conversation',
|
||||
url: rootPath + '/v1/api/new_conversation',
|
||||
method: 'get',
|
||||
headers: {
|
||||
'Authorization':'Bearer ragflow-IwNzMxMTIyOGY0ZTExZWZiOGE2MDI0Mm',
|
||||
'Content-Type': 'application/json',
|
||||
'Accept': '*/*'
|
||||
},
|
||||
params: data
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 进行课标研读对话
|
||||
export function completion(data) {
|
||||
return axios({
|
||||
url: '/v1/api/completion',
|
||||
url: rootPath + '/v1/api/completion',
|
||||
method: 'post',
|
||||
headers: {
|
||||
'Authorization':'Bearer ragflow-IwNzMxMTIyOGY0ZTExZWZiOGE2MDI0Mm',
|
||||
|
@ -35,4 +35,4 @@ export function completion(data) {
|
|||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
</div>
|
||||
</el-scrollbar>
|
||||
<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">
|
||||
<i class="iconfont icon-fasong"></i>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<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>
|
||||
<div class="custom-header flex">
|
||||
<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 props = defineProps({
|
||||
model: {
|
||||
type: [String, Number],
|
||||
modeType: {
|
||||
type: Number,
|
||||
default: 1
|
||||
}
|
||||
})
|
||||
|
||||
const title = computed(() => {
|
||||
if (props.model == 1) return '课标';
|
||||
if (props.model == 2) return '教材';
|
||||
if (props.model == 3) return '考试';
|
||||
if (props.modeType == 1) return '课标';
|
||||
if (props.modeType == 2) return '教材';
|
||||
if (props.modeType == 3) return '考试';
|
||||
})
|
||||
|
||||
|
||||
const radio = ref(1)
|
||||
const radioList = ref([
|
||||
{ label: '浏览研读', value: 1 },
|
||||
|
|
|
@ -60,11 +60,11 @@
|
|||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<Dialog v-model="showDialog" :model="model" />
|
||||
<Dialog v-model="showDialog" :modeType="type" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { ref, reactive, onMounted, watch } from 'vue'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import { modelList } from '@/api/mode/index'
|
||||
|
@ -72,11 +72,15 @@ import Dialog from './dialog.vue'
|
|||
|
||||
const keywordDialog = ref(false)
|
||||
const props = defineProps({
|
||||
model: {
|
||||
type: [String, Number],
|
||||
type: {
|
||||
type: Number,
|
||||
default: 1
|
||||
}
|
||||
})
|
||||
watch(() => props.type, (newValue) => {
|
||||
console.log(newValue, 'newValue2');
|
||||
}, { immediate: true });
|
||||
|
||||
const emit = defineEmits(['changeTemp', 'onRead'])
|
||||
|
||||
const showDialog = ref(false)
|
||||
|
@ -86,14 +90,13 @@ const aiRead = () => {
|
|||
}
|
||||
|
||||
|
||||
|
||||
// 当前模板名称
|
||||
const curTemplate = reactive({ name: '', id: '' })
|
||||
// 模板列表
|
||||
const templateList = ref([])
|
||||
// 获取模板列表
|
||||
const getTemplateList = () => {
|
||||
modelList({ model: 1, type: 1 }).then(res => {
|
||||
modelList({ model: props.type, type: 1 }).then(res => {
|
||||
templateList.value = res.rows
|
||||
Object.assign(curTemplate, res.rows[0]);
|
||||
emit('changeTemp', res.rows[0].id)
|
||||
|
|
|
@ -16,7 +16,6 @@ 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>
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-empty v-if="!childTempList.length" description="暂无模板数据" />
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
<!--编辑结果-->
|
||||
|
@ -55,18 +55,12 @@ import { conversation, completion, 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],
|
||||
modeType: {
|
||||
type: Number,
|
||||
default: 1
|
||||
}
|
||||
})
|
||||
|
@ -76,9 +70,8 @@ const tempLoading = ref(false)
|
|||
const childTempList = ref([])
|
||||
const getChildTemplate = () => {
|
||||
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
|
||||
console.log('res.rows=====>', res.rows)
|
||||
|
||||
}).finally(() => {
|
||||
tempLoading.value = false
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<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-col :span="12">
|
||||
<!--左侧pdf-->
|
||||
|
@ -9,7 +9,7 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!--右侧模板研读-->
|
||||
<Result ref="resultRef" :tempId="tempId"/>
|
||||
<Result ref="resultRef" :modeType="type" :tempId="tempId"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
@ -22,6 +22,14 @@ import Header from './container/header.vue'
|
|||
import Pdf from './container/pdf.vue'
|
||||
import Result from './container/result.vue'
|
||||
|
||||
const props = defineProps({
|
||||
type: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
const resultRef = ref()
|
||||
const tempId = ref('')
|
||||
const changeTemp = (id) =>{
|
||||
|
|
|
@ -112,7 +112,6 @@ const sideBottomMenu = [
|
|||
|
||||
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
|
||||
}
|
||||
|
|
|
@ -40,7 +40,6 @@ watch(
|
|||
() => router.currentRoute.value,
|
||||
(newValue) => {
|
||||
let path = newValue.path
|
||||
console.log(newValue);
|
||||
|
||||
if (path.includes('/model') && path !== ('/model/index')) {
|
||||
isShowBack.value = true
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -1,186 +1,10 @@
|
|||
<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> -->
|
||||
<TemplateStudy :mode="mode"/>
|
||||
</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>
|
||||
const mode = ref(1)
|
||||
</script>
|
|
@ -1,27 +0,0 @@
|
|||
<template>
|
||||
<div class="mb-4">
|
||||
<div>
|
||||
<el-button type="danger" disabled>批量删除</el-button>
|
||||
<el-button type="primary" disabled>批量推送</el-button>
|
||||
</div>
|
||||
<CustomSelect
|
||||
:options="options"
|
||||
placeholder="设计新作业"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import CustomSelect from '../components/customSelect.vue';
|
||||
const options = ref(['自主搜题', '校本题库', '个人题库', '智能推荐', '课堂展示', '常规作业', 'AI作业设计']);
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.mb-4{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
|
@ -2,10 +2,10 @@
|
|||
<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"/>
|
||||
<el-checkbox v-model="item.checked" @click.stop="clickCheckbox(item)"/>
|
||||
<div class="item-text">
|
||||
<div class="title-header">
|
||||
<div class="item-title">{{ item.title }}</div>
|
||||
<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>
|
||||
|
@ -17,21 +17,39 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref,markRaw } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import { ArrowRight } from '@element-plus/icons-vue';
|
||||
import CustomButton from '../components/button.vue'
|
||||
const emits = defineEmits(['checked']);
|
||||
|
||||
const items = ref([
|
||||
{ title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
|
||||
{ title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'primary',text:'课堂练习' },
|
||||
{ title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
|
||||
{ title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'danger',text:'常规作业' },
|
||||
{ title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
|
||||
{ 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:'习题训练' },
|
||||
|
||||
]);
|
||||
|
||||
// 获取选中的checkbox的id
|
||||
const selectIds = ref([])
|
||||
|
||||
const handleClick = (item) => {
|
||||
console.log('Clicked on:', item.title);
|
||||
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>
|
||||
|
@ -40,7 +58,7 @@
|
|||
width: 100%;
|
||||
max-width: 400px; /* 可以根据需要调整宽度 */
|
||||
margin: 0 auto;
|
||||
padding: 16px;
|
||||
padding: 8px;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
|
@ -50,7 +68,7 @@
|
|||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
padding: 16px;
|
||||
padding: 8px;
|
||||
margin-bottom: 16px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
|
@ -80,6 +98,7 @@
|
|||
flex-direction: column;
|
||||
flex: 1;
|
||||
margin-left: 5px;
|
||||
|
||||
}
|
||||
.title-header{
|
||||
display: flex;
|
||||
|
@ -92,6 +111,12 @@
|
|||
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 {
|
||||
|
|
|
@ -3,27 +3,34 @@
|
|||
<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="item-title">{{ item.title }}</div>
|
||||
<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>
|
||||
<el-icon class="item-icon"><component :is="item.icon" /></el-icon>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { shallowRef } from 'vue';
|
||||
import { ref,markRaw } from 'vue';
|
||||
import { Plus, ArrowDown, Document, User, Setting } from '@element-plus/icons-vue';
|
||||
import CustomButton from '../components/button.vue'
|
||||
|
||||
const items = shallowRef([
|
||||
{ title: '自主搜题', description: '1111111', icon: Document },
|
||||
{ title: '校本题库', description: '222222', icon: User },
|
||||
{ title: '个人题库', description: '333333', icon: Setting },
|
||||
{ title: '智能推荐', description: '444444', icon: Plus },
|
||||
{ title: '课堂展示', description: '555555', icon: ArrowDown },
|
||||
{ title: '常规作业', description: '555555', icon: ArrowDown },
|
||||
{ title: 'AI设计作业', description: '555555', icon: ArrowDown },
|
||||
const items = ref([
|
||||
{ title: '自主搜题', description: '1111111', icon: markRaw(Document),type:'default',text:'习题训练' },
|
||||
{ title: '校本题库', description: '222222', icon: markRaw(Document),type:'default',text:'习题训练' },
|
||||
{ title: '个人题库', description: '333333', icon: markRaw(Document),type:'default',text:'习题训练' },
|
||||
{ title: '智能推荐', description: '444444', icon: markRaw(Document),type:'',text:'' },
|
||||
{ title: '课堂展示', description: '555555', icon: markRaw(Document),type:'primary',text:'课堂展示' },
|
||||
{ title: '常规作业', description: '555555', icon: markRaw(Document),type:'danger',text:'常规作业' },
|
||||
{ title: 'AI设计作业', description: '555555', icon: markRaw(Document),type:'danger',text:'常规作业' },
|
||||
]);
|
||||
|
||||
const handleClick = (item) => {
|
||||
|
@ -36,7 +43,7 @@ const handleClick = (item) => {
|
|||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
padding: 16px;
|
||||
padding: 8px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
|
@ -44,8 +51,8 @@ const handleClick = (item) => {
|
|||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
padding: 16px;
|
||||
width: calc(33.333% - 32px); /* 3列布局,每列减去gap */
|
||||
padding: 8px;
|
||||
width: calc(25% - 16px);
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
@ -75,10 +82,26 @@ const handleClick = (item) => {
|
|||
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;
|
||||
}
|
||||
</style>
|
|
@ -21,7 +21,8 @@
|
|||
|
||||
<script setup>
|
||||
import { Plus, ArrowDown } from '@element-plus/icons-vue'
|
||||
import { ref, computed, defineProps } from 'vue';
|
||||
import { ref, defineEmits, defineProps } from 'vue';
|
||||
const emits = defineEmits(['select-click']);
|
||||
|
||||
const props = defineProps({
|
||||
options: {
|
||||
|
@ -47,6 +48,7 @@ const toggleDropup = () => {
|
|||
const selectOption = (option) => {
|
||||
selectedOption.value = option;
|
||||
isDropdownOpen.value = false;
|
||||
emits('select-click', option)
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
|
|
|
@ -1,31 +1,93 @@
|
|||
<template>
|
||||
<div class="page-template flex">
|
||||
<Header/>
|
||||
<el-row :gutter="20" class="tempalte-main">
|
||||
<el-col :span="6">
|
||||
<!--左侧列表-->
|
||||
<Left/>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<!--右侧-->
|
||||
<Right/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- // 顶部 -->
|
||||
<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}" class="no-horizontal-scroll">
|
||||
<el-row :gutter="20" class="tempalte-main">
|
||||
<el-col :span="6">
|
||||
<!--左侧列表-->
|
||||
<Left @checked="checked"/>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<!--右侧-->
|
||||
<Right/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Header from './Header/index.vue'
|
||||
import Right from './Right/index.vue'
|
||||
import Left from './Left/index.vue'
|
||||
import { ref, onMounted, nextTick } from 'vue';
|
||||
import Right from './Right/index.vue';
|
||||
import Left from './Left/index.vue';
|
||||
import CustomSelect from './components/customSelect.vue';
|
||||
|
||||
const options = ref(['自主搜题', '校本题库', '个人题库', '智能推荐', '课堂展示', '常规作业', 'AI作业设计']);
|
||||
|
||||
// 判断是否有选中的checkbox框
|
||||
const isChceked = ref(false);
|
||||
const viewportHeight = ref(0);
|
||||
|
||||
// 选中的checkbox框
|
||||
const checked = (val) => {
|
||||
console.log(val);
|
||||
val.length > 0 ? isChceked.value = true : isChceked.value = false;
|
||||
}
|
||||
|
||||
// 选择的作业设计类型
|
||||
const selectClick = (val) => {
|
||||
console.log(val);
|
||||
}
|
||||
|
||||
// 获取视口高度
|
||||
const getViewportHeight = () => {
|
||||
return Math.max(
|
||||
document.documentElement.clientHeight,
|
||||
window.innerHeight || 0
|
||||
);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
nextTick(() => {
|
||||
window.addEventListener('resize', () => {
|
||||
viewportHeight.value = getViewportHeight();
|
||||
});
|
||||
});
|
||||
});
|
||||
</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-y: scroll;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
</style>
|
|
@ -3,7 +3,7 @@
|
|||
<div class="mb-4">
|
||||
<el-button type="primary" @click="onchange('/model/curriculum')">课标研读</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="success" @click="onchange('/model/teaching')">教材研读</el-button>
|
||||
<!-- <el-button type="info" @click="onchange('/model/examination')">考试分析</el-button> -->
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -126,6 +126,12 @@
|
|||
<span>下载</span>
|
||||
</el-button>
|
||||
</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">
|
||||
<el-button text @click="moveSmarttalkFun(item)">
|
||||
<el-icon>
|
||||
|
@ -153,7 +159,7 @@ import FileImage from '@/components/file-image/index.vue'
|
|||
import { asyncLocalFile } from '@/utils/talkFile'
|
||||
import { toTimeText } from '@/utils/date'
|
||||
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 outLink from '@/utils/linkConfig'
|
||||
|
||||
|
@ -183,6 +189,14 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
adToKj(item) {
|
||||
addFileToKj(item.id).then(res=>{
|
||||
console.log(res)
|
||||
item.fileFlag = "课件"
|
||||
},error=>{
|
||||
console.log(error)
|
||||
})
|
||||
},
|
||||
editTalk(item) {
|
||||
console.log(item,this.userInfo,'this.userInfo')
|
||||
ElMessageBox.prompt('请输入新的名称', '重命名', {
|
||||
|
|
|
@ -538,7 +538,7 @@ export default {
|
|||
}
|
||||
},
|
||||
clickChoose(value) {
|
||||
this.checkFileList = value ? this.currentFileList : []
|
||||
this.checkFileList = value ? this.currentSCFileList : []
|
||||
},
|
||||
deleteTalk(item) {
|
||||
let index = this.currentFileList.indexOf(item)
|
||||
|
|
|
@ -1,178 +1,11 @@
|
|||
<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>
|
||||
<TemplateStudy :type="type"/>
|
||||
</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'
|
||||
import TemplateStudy from '@/components/template-study/index.vue'
|
||||
|
||||
const url = 'https://p5.itc.cn/images01/20220529/f30e3c4164dc4f7495ed196577a2a312.jpeg'
|
||||
const type = ref(2)
|
||||
|
||||
/************************左侧************* */
|
||||
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>
|
||||
</script>
|
Loading…
Reference in New Issue