Merge remote-tracking branch 'origin/main'

This commit is contained in:
朱浩 2025-01-15 16:16:55 +08:00
commit f8f0646bde
10 changed files with 324 additions and 201 deletions

View File

@ -244,6 +244,13 @@ app.on('ready', () => {
loginWindow.show()
loginWindow.focus()
})
// 打印窗口
ipcMain.on('printPage', (event, printOptions) => {
//console.log("ipcMain-print-page")
mainWindow.webContents.print(printOptions, (success, failureReason) => {
if (!success) console.error(failureReason);
});
});
//打开作业窗口
ipcMain.on('openWindow', (e, data) => {

View File

@ -118,6 +118,14 @@ export function docList(params) {
})
}
// 删除 doc ai文档
export function removeDoc(id) {
return request({
url: '/education/doc/' + id,
method: 'delete',
})
}
// 保存教学大纲
export function addSyllabus(data) {
return request({

View File

@ -2,34 +2,45 @@
<el-dialog v-model="isDialog" :show-close="false" width="900" append-to-body destroy-on-close>
<template #header>
<div class="custom-header flex">
<span>选择{{ title }}</span>
<span>选择</span>
<i class="iconfont icon-guanbi" @click="isDialog = false"></i>
</div>
</template>
<div class="dialog-content">
<div class="dialog-content" v-loading="loading">
<div class="content-list">
<ul>
<li v-for="(item, index) in fileList" :class="activeIndex == index ? 'li-active' : ''"
@click="clickItem(index, item)">
<el-image class="img" :src="url" />
<el-button type="primary" class="prev-btn" @click.stop="onPrevItem(item)">预览</el-button>
<el-text truncated>{{ item.fileName }}</el-text>
</li>
</ul>
<el-empty description="暂无数据" v-if="!fileList.length" />
<el-radio-group v-model="curFileId">
<el-row>
<el-col :span="12" v-for="item in fileList" :key="item.id">
<el-radio :value="item.id">
<el-text class="w-50" truncated>{{ item.fileName }}</el-text>
<div class="flex items-center">
<el-button type="primary" link v-if="isPrev(item).value" @click="onPrevItem(item)"
>预览</el-button
>
<el-button type="danger" link @click="removeItem(item)">删除</el-button>
</div>
</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
</div>
<template #footer>
<div class="dialog-footer">
<el-upload class="upload-demo" :action="uploadFileUrl" :limit="1" :show-file-list="false" :headers="headers"
:on-success="onSuccess">
<el-upload
class="upload-demo"
:action="uploadFileUrl"
:limit="1"
:show-file-list="false"
:headers="headers"
:on-success="onSuccess"
>
<el-button type="primary">上传</el-button>
</el-upload>
<div>
<el-button @click="isDialog = false">取消</el-button>
<el-button type="primary" @click="isDialog = false">
确定
</el-button>
<el-button type="primary" @click="handleDialog"> 确定 </el-button>
</div>
</div>
</template>
@ -41,21 +52,18 @@
<i class="iconfont icon-guanbi" @click="prevVisible = false"></i>
</div>
</template>
<div style="height: calc(100vh - 120px);">
<div style="height: calc(100vh - 120px); text-align: center;">
<template v-if="getFileSuffix(prevItem.fileUrl) == 'pdf'">
<iframe :src="prevItem.fileUrl"
frameborder="0" width="100%" height="100%"></iframe>
<iframe :src="prevItem.fileUrl" frameborder="0" width="100%" height="100%"></iframe>
</template>
<template v-else>
<el-image :src="prevItem.fileUrl" style="height:100%"/>
<el-image :src="prevItem.fileUrl" style="height: 100%" />
</template>
</div>
<template #footer>
<div class="dialog-footer">
<div></div>
<el-button type="primary" @click="prevVisible = false">
关闭
</el-button>
<el-button type="primary" @click="prevVisible = false"> 关闭 </el-button>
</div>
</template>
</el-dialog>
@ -63,20 +71,19 @@
<script setup>
import { ref, computed, onMounted, reactive } from 'vue'
import { completion, addDoc, docList } from '@/api/mode/index.js'
import { getToken } from "@/utils/auth";
import { completion, addDoc, docList, removeDoc } from '@/api/mode/index.js'
import { getToken } from '@/utils/auth'
import { sessionStore } from '@/utils/store'
import { dataSetJson } from '@/utils/comm.js'
import { ElMessage } from 'element-plus'
import { ElMessage, ElMessageBox } from 'element-plus'
import useUserStore from '@/store/modules/user'
import { getFileSuffix } from '@/utils/ruoyi.js'
import emitter from '@/utils/mitt';
import emitter from '@/utils/mitt'
import { cloneDeep } from 'lodash'
const userInfo = useUserStore().user
const uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + "/common/upload");
const headers = ref({ Authorization: "Bearer " + getToken() });
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 uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + '/common/upload')
const headers = ref({ Authorization: 'Bearer ' + getToken() })
const isDialog = defineModel()
const prevVisible = ref(false)
@ -88,36 +95,14 @@ const props = defineProps({
}
})
const title = computed(() => {
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 },
{ 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 isPrev = (item) => {
return computed(() => {
return ['pdf', 'png', 'jpg', 'jpeg', 'gif', 'webp'].includes(getFileSuffix(item.fileUrl))
})
}
const activeIndex = ref(0)
const curFileId = ref(0)
const dataset_id = ref('')
@ -143,43 +128,79 @@ const onSuccess = async (response) => {
const { msg } = await addDoc(docData)
ElMessage.success(msg)
getList()
}
const curNode = reactive({})
// doc ai
const fileList = ref([])
const curFile = reactive({})
const getList = () => {
docList({
userId: userInfo.userId,
dataset_id: dataset_id.value
}).then(res => {
createUser: userInfo.userId,
datasetId: dataset_id.value
}).then((res) => {
fileList.value = [...res.rows]
Object.assign(curFile, fileList.value[0])
if(res.rows.length){
Object.assign(curFile, fileList.value[0])
curFileId.value = fileList.value[0].id
}
})
}
const clickItem = (index, item) => {
activeIndex.value = index
Object.assign(curFile, item)
emitter.emit('changeCurFile', item)
//
const loading = ref(false)
const removeItem = (item) => {
ElMessageBox.confirm('确定要删除?', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
loading.value = true
removeDoc(item.id)
.then(() => {
ElMessage.success('操作成功')
getList()
})
.finally(() => {
loading.value = false
})
})
.catch(() => {})
}
//
const prevItem = reactive({})
const onPrevItem = (item) => {
Object.assign(prevItem, item)
prevVisible.value = true
}
//
const handleDialog = () => {
isDialog.value = false
const item = fileList.value.find((item) => item.id == curFileId.value)
Object.assign(curFile, item)
emitter.emit('changeCurFile', item)
// pdf
if (getFileSuffix(curFile.fileUrl) == 'pdf') {
let data = cloneDeep(curFile)
emitter.emit('changePdfUrl', data)
}
}
onMounted(() => {
let data = sessionStore.get('subject.curNode')
Object.assign(curNode, data);
Object.assign(curNode, data)
// "-"
let jsonKey = `考试-${curNode.edustage}-${curNode.edusubject}`
dataset_id.value = dataSetJson[jsonKey]
getList()
})
</script>
<style lang="scss" scoped>
.custom-header {
@ -198,45 +219,6 @@ onMounted(() => {
.content-list {
padding-top: 10px;
ul {
display: flex;
flex-wrap: wrap;
li {
width: 130px;
display: flex;
flex-direction: column;
font-size: 13px;
padding: 10px;
cursor: pointer;
border-radius: 5px;
overflow: hidden;
margin-right: 20px;
margin-bottom: 10px;
position: relative;
overflow: hidden;
.img {
width: 100%;
height: 130px;
border: solid #ccc 1px;
margin-bottom: 10px;
}
&:hover {
background: #E0EAFF;
}
&:hover .prev-btn {
transform: translate(-50%, -40px)
}
}
.li-active {
background: #E0EAFF;
}
}
}
}
@ -246,13 +228,7 @@ onMounted(() => {
justify-content: space-between;
}
.prev-btn {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) translateY(-110px);
/* 按钮初始位置在容器外 */
transition: transform 0.3s ease-in-out;
/* 设置过渡效果 */
:deep(.el-radio__label) {
display: flex;
}
</style>
</style>

View File

@ -2,8 +2,9 @@
<div class="container-left-page flex">
<div class="container-left-header flex">
<el-button link @click="onClick">
{{ curNode.edustage }}{{ curNode.edusubject }}{{ type == 1 ? '课标研读' : type == 2 ? '教材分析' : '考试分析' }}<i
class="iconfont icon-xiangxia"></i>
{{ curNode.edustage }}{{ curNode.edusubject
}}{{ type == 1 ? '课标研读' : type == 2 ? '教材分析' : '考试分析'
}}<i v-if="type == 3" class="iconfont icon-xiangxia"></i>
</el-button>
</div>
<div class="container-left-pdf">
@ -20,6 +21,7 @@ import { ref, onMounted, nextTick, reactive } from 'vue'
import { sessionStore } from '@/utils/store'
import PDF from '@/components/PdfJs/index.vue'
import LeftDialog from './left-dialog.vue'
import emitter from '@/utils/mitt'
const props = defineProps(['type'])
@ -29,6 +31,12 @@ const onClick = () => {
showDialog.value = true
}
emitter.on('changePdfUrl', async (data) => {
pdfUrl.value = ''
await nextTick()
pdfUrl.value = data.fileUrl
})
// PDF
const pdfUrl = ref('')
const curNode = reactive({})
@ -36,16 +44,15 @@ onMounted(async () => {
await nextTick()
//
let nodeData = sessionStore.get('subject.curNode')
Object.assign(curNode, nodeData);
Object.assign(curNode, nodeData)
let data = sessionStore.get('subject.curBook')
let fileurl = data.fileurl
if(props.type == 1){
if (props.type == 1) {
fileurl = `${data.edustage}-${data.edusubject}-课标.txt`
}
if(fileurl == '') return
if (fileurl == '') return
pdfUrl.value = import.meta.env.VITE_APP_RES_FILE_PATH + fileurl.replace('.txt', '.pdf')
})
</script>
@ -53,6 +60,7 @@ onMounted(async () => {
.container-left-page {
height: 100%;
flex-direction: column;
.container-left-header {
height: 45px;
background: #fff;
@ -70,4 +78,4 @@ onMounted(async () => {
flex: 1;
}
}
</style>
</style>

View File

@ -16,7 +16,7 @@
</el-dropdown>
<div class="flex">
<el-select v-model="curMode" placeholder="Select" class="mr-4 w-30">
<el-option v-for="item in modeOptions" :key="item.value" :label="item.label" :value="item.value" />
<el-option v-for="item in modeOptions" :key="item.value" :disabled="item.disabled" :label="item.label" :value="item.value" />
</el-select>
<el-button type="danger" link :disabled="!(templateList.length)" @click="removeItem(curTemplate, false)">
删除
@ -104,6 +104,12 @@ import { cloneDeep } from 'lodash'
const props = defineProps(['type'])
const { user } = useUserStore()
const params = reactive(
{
prompt: '',
dataset_id: ''
}
)
const curMode = ref(2)
const modeOptions = ref([
{
@ -112,7 +118,8 @@ const modeOptions = ref([
},
{
label: '知识库模型',
value: 2
value: 2,
disabled: false
}
])
@ -288,12 +295,7 @@ const onEdit = (index, item) => {
}
//
const params = reactive(
{
prompt: '',
dataset_id: ''
}
)
const prompt = ref('')
//
@ -483,7 +485,18 @@ onMounted(() => {
getTemplateList()
let jsonKey = `${modeType.value}-${data.edustage}-${data.edusubject}`
params.dataset_id = dataSetJson[jsonKey]
if(!params.dataset_id){
curMode.value = 1
modeOptions.value.forEach(item => {
if(item.value == 2){
item.disabled = true
}
})
}
// ID
conversation_id.value = localStorage.getItem('conversation_id')
if (!conversation_id.value) {

View File

@ -9,11 +9,8 @@
<div style="font-size: 16px;font-weight: bold;color: #000;text-align: left;margin-bottom: 5px">可用分组</div>
<div class="groupList">
<template v-for="(item,index) in groupList" :key="index">
<el-card style="width: 20%;
margin-right: 10px;
margin-bottom: 10px;
cursor: pointer;
position: relative;"
<el-card
class="card_div"
v-if="item.parentid === 0"
@mouseenter="cardEnter(item,index)"
@mouseleave="cardLeave(item,index)"
@ -391,6 +388,7 @@ watch(()=> props.classId,()=> {
.groupList{
display: flex;
flex-wrap: wrap;
gap:10px;
}
.card-row {
font-size: 12px;
@ -415,4 +413,10 @@ watch(()=> props.classId,()=> {
display: flex;
flex-direction: column;
}
.card_div{
width: calc(20% - 10px);
margin-bottom: 10px;
cursor: pointer;
position: relative;
}
</style>

View File

@ -1,14 +1,69 @@
<template>
<el-card style="width: 100%;height: 100%">
<el-descriptions :column="1">
<el-descriptions-item label="班级名称">{{ classInfo.caption }}</el-descriptions-item>
<el-descriptions-item label="教师">
<el-descriptions
class="margin-top"
:column="6"
:size="size"
border
>
<el-descriptions-item :span="2" :width="120">
<template #label>
<div class="cell-item">
<el-icon :style="iconStyle">
<user />
</el-icon>
班级名称
</div>
</template>
{{ classInfo.caption }}
</el-descriptions-item>
<el-descriptions-item :span="2" :width="120">
<template #label>
<div class="cell-item">
<el-icon :style="iconStyle">
<tickets />
</el-icon>
学段
</div>
</template>
{{ currentGrade }}
</el-descriptions-item>
<el-descriptions-item :span="2" :width="120">
<template #label>
<div class="cell-item">
<el-icon :style="iconStyle">
<location />
</el-icon>
年级
</div>
</template>
{{ currentGradeName }}
</el-descriptions-item>
<el-descriptions-item :span="2" :width="120">
<template #label>
<div class="cell-item">
<el-icon :style="iconStyle">
<iphone />
</el-icon>
学生人数
</div>
</template>
{{ classInfo.classstudentcount || 0 }}
</el-descriptions-item>
<el-descriptions-item :span="4" :width="120">
<template #label>
<div class="cell-item">
<el-icon :style="iconStyle">
<office-building />
</el-icon>
教师
</div>
</template>
<template v-if="classInfo.teacher.length > 0">
<el-tag style="margin-right: 5px;margin-bottom: 5px;" type="primary" v-for="(item, index) in classInfo.teacher" :key="index">{{item.name}}</el-tag>
</template>
<template v-else>{{ classInfo.teachername }}</template>
</el-descriptions-item>
<el-descriptions-item label="学生人数">{{ classInfo.classstudentcount || 0 }}</el-descriptions-item>
</el-descriptions>
</el-card>
</template>
@ -17,7 +72,7 @@
import {ElMessage, ElMessageBox} from "element-plus";
import { getClassmain,listClassuser,leaveClass} from '@/api/classManage/index'
import useUserStore from '@/store/modules/user'
import {reactive,onMounted,nextTick,watch} from 'vue'
import {reactive,onMounted,nextTick,watch,ref} from 'vue'
import delClassDemo from '@/store/modules/delClass'
const props = defineProps({
classId: {
@ -31,6 +86,36 @@
})
const isDelClass = delClassDemo()
const userStore = useUserStore().user
//
const currentGradeName = ref('')
//
const currentGrade = ref('')
//
const gradeDataList = reactive([
[
{ label: '一年级', agekey: 1, checked: false, current: 1 },
{ label: '二年级', agekey: 2, checked: false, current: 1 },
{ label: '三年级', agekey: 3, checked: false, current: 1 },
{ label: '四年级', agekey: 4, checked: false, current: 1 },
{ label: '五年级', agekey: 5, checked: false, current: 1 },
{ label: '六年级', agekey: 6, checked: false, current: 1 },
],
[
{ label: '初一', agekey: 7, checked: false, current: 2 },
{ label: '初二', agekey: 8, checked: false, current: 2 },
{ label: '初三', agekey: 9, checked: false, current: 2 },
],
[
{ label: '高一', agekey: 10, checked: false, current: 3 },
{ label: '高二', agekey: 11, checked: false, current: 3 },
{ label: '高三', agekey: 12, checked: false, current: 3 },
],
])
const gradeData = reactive([
{current:1, label:'小学',},
{current:2, label:'初中',},
{current:3, label:'高中',},
])
//
const deleteClassRoom = () => {
ElMessageBox.alert('确认删除该班级?', {
@ -53,6 +138,14 @@
if(props.classId){
getClassmain(props.classId).then(response => {
Object.assign(classInfo,response.data)
//
const flatGradeDataList = gradeDataList.flat();
//
const currentIndex = flatGradeDataList.findIndex(item => item.agekey === Number(response.data.agekey));
currentGradeName.value = flatGradeDataList[currentIndex].label
const current = flatGradeDataList[currentIndex].current
currentGrade.value = gradeData.find(item => item.current === current).label
console.log(classInfo,'classInfo');
listClassuser({classid:props.classId,pageSize:100}).then(res => {
classInfo.teacher = res.rows.filter(item => item.inrole === 'teacher')
classInfo.student = res.rows.filter(item => item.inrole === 'student')
@ -71,5 +164,14 @@
</script>
<style scoped>
.el-descriptions {
margin-top: 20px;
}
.cell-item {
display: flex;
align-items: center;
}
.margin-top {
margin-top: 20px;
}
</style>

View File

@ -78,7 +78,7 @@
</div>
<div v-if="(currentRow.worktype == '科学实验' || classWorkForm.worktype == '科学实验')&& currentRow.id>0" class="page-center">
<div class="experiment-homework">
<ExperimentQuestion :expObj="classWorkForm.fileHomeworkList&&classWorkForm.fileHomeworkList[0]" @clickExpObj="getExpObj" />
<ExperimentQuestion :expObj="classWorkForm.fileHomeworkList&&classWorkForm.fileHomeworkList[0]" @clickExpObj="getExpObj" />
</div>
</div>
@ -161,6 +161,7 @@ const route = useRoute();
const router = useRouter()
const { proxy } = getCurrentInstance()
const useClassTaskStores = useClassTaskStore();
const { ipcRenderer } = require('electron')
const props = defineProps({
currentCourse: Object,
@ -841,6 +842,22 @@ const editWork = async (cform) =>{
}
}
// ,
const handlePrint = () => {
const printOptions = {
silent: false, //
printBackground: true, //
color: false, //
marginsType: 0, // 0: 1: 2:
pageSize: 'A4', //
//
};
console.log("print-page-click");
ipcRenderer.send('printPage', printOptions);
};
//----
@ -977,5 +994,8 @@ const editWork = async (cform) =>{
}
}
}
::v-deep img {
display: inline-block !important;
}
</style>

View File

@ -22,13 +22,11 @@
<!-- 裁剪按钮-->
<div class="btn">
<el-button style="margin-right: 20px">选择</el-button>
<input
class="upload"
type="file"
accept=".png, .jpg, .jpeg"
@change="uploadImg"
/>
<label for="submit">
<div class="lBut"><span>选择</span></div>
</label>
<input class="upload" id="submit" accept=".png, .jpg, .jpeg" type="file" style="display: none;" @change="uploadImg" />
<!-- <el-button style="margin-right: 20px;cursor:pointer">选择</el-button> -->
<el-button @click="cancle">取消</el-button>
<el-button @click="sureSava">提交</el-button>
@ -216,6 +214,7 @@ export default {
position: relative;
display: flex;
margin-top: 30px;
cursor: pointer;
> .upload {
display: block;
width: 60px;
@ -224,6 +223,7 @@ export default {
top: 0;
left: 0;
opacity: 0;
cursor: pointer;
}
}
}
@ -265,4 +265,22 @@ export default {
background-color: rgba(43, 43, 43, 0.7215686275);
}
}
.lBut{
width: 87px;
height: 32px;
font-size: 14px;
line-height: 1.15;
display: flex;
justify-content: center;
align-items: center;
border-radius: 4px;
padding: 8px 10px;
margin-right: 10px;
transition: all 0.5s;
white-space: nowrap;
background-color: #409eff;
color: white;
border: 1px solid #409eff;
cursor: pointer;
}
</style>

View File

@ -22,24 +22,22 @@
<el-empty v-else description="请选择符合您需要的教学模式,生成教学大纲" />
</div>
</div>
<!-- <EditDialog v-model="isEdit" :item="editItem" :index="editIndex" /> -->
</template>
<script setup>
import { ref, reactive, onMounted, onUnmounted } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { sessionStore } from '@/utils/store'
import EditDialog from './edit-dialog.vue'
import emitter from '@/utils/mitt'
import * as commUtils from '@/utils/comm.js'
import { createChart, sendChart } from '@/api/ai/index'
import { completion, addSyllabus, removeSyllabus, editSyllabus, modelList } from '@/api/mode/index.js'
import { completion, addSyllabus, removeSyllabus, modelList } from '@/api/mode/index.js'
import { createOutlineV2 } from '@/utils/ppt-request.js'
import useUserStore from '@/store/modules/user'
import { cloneDeep } from 'lodash'
const curMode = ref(2)
const isEdit = ref(false)
const { user } = useUserStore()
@ -50,7 +48,8 @@ const modeOptions = ref([
},
{
label: '知识库模型',
value: 2
value: 2,
disabled: false
}
])
@ -114,14 +113,17 @@ const createAi = async () => {
data = res.data
}
markeDownAnswer.value = data.answer
const res = await createOutlineV2({ query: data.answer })
markeDownAnswer.value = data.answer
let outline = JSON.stringify({
json: res.outline,
markdown: data.answer
})
Object.assign(curItem, {...curItem, outline})
emitter.emit('onResult', curItem)
@ -131,47 +133,6 @@ const createAi = async () => {
}
}
//
// const editItem = reactive({})
// const editIndex = ref(0)
// const onEdit = (item, index)=>{
// let obj = null
// if(index == -1){
// obj = {
// title: answer.title,
// subTitle: answer.subTitle
// }
// }
// else{
// obj = cloneDeep(item)
// }
// editIndex.value = index
// isEdit.value = true
// Object.assign(editItem, obj)
// }
// emitter.on('editItem', (item) =>{
// if(editIndex.value == -1){
// answer.title = item.title
// answer.subTitle = item.subTitle
// }else{
// answer.chapters[editIndex.value] = item
// }
// let data = cloneDeep(curItem)
// data.outline = JSON.stringify(cloneDeep(answer))
// loading.value = true
// editSyllabus(data).then( res =>{
// curItem.outline = answer
// emitter.emit('onResult', curItem)
// ElMessage.success('')
// }).finally( ()=>{
// loading.value = false
// })
// })
//
const onSaveTemp = async (outline) => {
let modelIds = selectedData.value.map(item => item.id).join(',')
@ -206,8 +167,6 @@ const delAnswer = () => {
markeDownAnswer.value = ''
emitter.emit('resetSelect')
// window.location.reload();
})
.catch(() => {})
@ -249,6 +208,14 @@ onMounted(() => {
// dataset_id
let jsonKey = `课标-${data.edustage}-${data.edusubject}`
params.dataset_id = commUtils.dataSetJson[jsonKey]
if(!params.dataset_id){
curMode.value = 1
modeOptions.value.forEach(item => {
if(item.value == 2){
item.disabled = true
}
})
}
// ID
conversation_id.value = localStorage.getItem('conversation_id')