baigl #69
|
@ -2,12 +2,21 @@
|
|||
import request from '@/utils/request'
|
||||
// 查询知识点列表
|
||||
export function listKnowlegepoint(query) {
|
||||
return request({
|
||||
url: '/point/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
return request({
|
||||
url: '/point/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询知识点列表
|
||||
export function listKnowlegepointFormat(query) {
|
||||
return request({
|
||||
url: '/point/formatList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询一级知识点查下级所有层级
|
||||
|
|
|
@ -71,4 +71,9 @@ defineExpose({
|
|||
justify-content: flex-end;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:deep(.format-work-desc > :is(div):first-child){
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
</style>
|
|
@ -102,7 +102,7 @@ const getCompletion = async (val) => {
|
|||
type: 'robot',
|
||||
msg: answer,
|
||||
})
|
||||
|
||||
|
||||
} finally {
|
||||
loaded.value = false
|
||||
}
|
||||
|
@ -117,11 +117,11 @@ const saveAdjust = (item) =>{
|
|||
onMounted(() => {
|
||||
let data = sessionStore.get('subject.curNode')
|
||||
Object.assign(curNode, data);
|
||||
let text = props.modeType == 1 ? '课标': props.modeType == 2 ? '教材' : '考试'
|
||||
|
||||
let text = props.modeType == 1||props.modeType == 2 ? '课标' : '考试'
|
||||
let jsonKey = `${text}-${data.edustage}-${data.edusubject}`
|
||||
console.log(jsonKey)
|
||||
params.dataset_id = dataSetJson[jsonKey]
|
||||
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
|
@ -152,7 +152,7 @@ onMounted(() => {
|
|||
width: 100%;
|
||||
justify-content: flex-start;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
}
|
||||
.chart-item {
|
||||
border-radius: 5px;
|
||||
|
@ -257,4 +257,4 @@ onMounted(() => {
|
|||
transform: scale(0.01);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -56,10 +56,10 @@ const title = computed(() => {
|
|||
const radio = ref(1)
|
||||
const radioList = ref([
|
||||
{ label: '浏览研读', value: 1 },
|
||||
{ label: '跨学科研读', value: 2 },
|
||||
{ label: '跨学段研读', value: 3 },
|
||||
{ label: '课标修订研读', value: 4 },
|
||||
{ label: '自由研读', value: 5 },
|
||||
// { label: '跨学科研读', value: 2 },
|
||||
// { label: '跨学段研读', value: 3 },
|
||||
// { label: '课标修订研读', value: 4 },
|
||||
// { label: '自由研读', value: 5 },
|
||||
])
|
||||
const list = ref([
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="container-header flex">
|
||||
<div class="header-left flex">
|
||||
<el-button link @click="showDialog = true">
|
||||
<el-button link @click="onClick">
|
||||
{{ curNode.edustage}}{{ curNode.edusubject }}{{ type == 1 ? '课标研读': '教材分析'}}<i class="iconfont icon-xiangxia"></i>
|
||||
</el-button>
|
||||
</div>
|
||||
|
@ -20,12 +20,14 @@
|
|||
</template>
|
||||
</el-dropdown>
|
||||
<div>
|
||||
|
||||
<el-button type="primary" link @click="onAdd">
|
||||
<el-icon>
|
||||
<Plus />
|
||||
</el-icon>
|
||||
添加提示词
|
||||
</el-button>
|
||||
<!-- <el-button type="danger">删除</el-button> -->
|
||||
<!-- <el-button type="primary" link>保存模板</el-button> -->
|
||||
<el-button type="primary" @click="aiRead">一键研读</el-button>
|
||||
</div>
|
||||
|
@ -53,9 +55,7 @@ const props = defineProps({
|
|||
default: 1
|
||||
}
|
||||
})
|
||||
watch(() => props.type, (newValue) => {
|
||||
console.log(newValue, 'newValue2');
|
||||
}, { immediate: true });
|
||||
|
||||
|
||||
const emit = defineEmits(['changeTemp', 'onRead'])
|
||||
|
||||
|
@ -104,6 +104,11 @@ const onAdd = () => {
|
|||
wordDialog.value = true
|
||||
}
|
||||
|
||||
const onClick = () =>{
|
||||
if(props.type == 1) return
|
||||
showDialog.value = true
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
emitter.off('onGetMain')
|
||||
})
|
||||
|
|
|
@ -15,6 +15,8 @@ const pdfUrl = ref('')
|
|||
onMounted(async () =>{
|
||||
await nextTick()
|
||||
const { fileurl } = sessionStore.get('subject.curBook')
|
||||
console.log(fileurl,'fileurl');
|
||||
|
||||
pdfUrl.value = import.meta.env.VITE_APP_RES_FILE_PATH + fileurl.replace('.txt','.pdf')
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -257,7 +257,7 @@ const removeItem = async (item) => {
|
|||
isAdd.value = false
|
||||
Object.assign(keywordItem, item)
|
||||
isEditKeyWord.value = true
|
||||
|
||||
|
||||
}
|
||||
|
||||
// const { msg } = await removeChildTemp(item.id)
|
||||
|
@ -269,7 +269,7 @@ const removeItem = async (item) => {
|
|||
onMounted(() => {
|
||||
let data = sessionStore.get('subject.curNode')
|
||||
Object.assign(curNode, data);
|
||||
let text = props.modeType == 1 ? '课标' : props.modeType == 2 ? '教材' : '考试'
|
||||
let text = props.modeType == 1 || props.modeType == 2 ? '课标' : '考试'
|
||||
let jsonKey = `${text}-${data.edustage}-${data.edusubject}`
|
||||
params.dataset_id = dataSetJson[jsonKey]
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</el-tooltip>
|
||||
</div>
|
||||
<div class="blockBox">
|
||||
<el-button @click="currentType = 'selection'"><el-image src="/src/assets/images/mouse-pointer.png"
|
||||
<el-button @click="currentType = 'selection'"><el-image src="../../../src/assets/images/mouse-pointer.png"
|
||||
style="width: 14px; height: 14px; color: silver" /></el-button>
|
||||
</div>
|
||||
<template v-if="type == 'design'">
|
||||
|
@ -123,7 +123,7 @@
|
|||
<!-- 边框样式 -->
|
||||
<div class="blockBox">
|
||||
<el-dropdown @command="updateStyle('lineDash', $event)" placement="top">
|
||||
<el-button><el-image src="/src/assets/images/borderstyle.png"
|
||||
<el-button><el-image src="../../../src/assets/images/borderstyle.png"
|
||||
style="width: 14px; height: 14px"></el-image></el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
|
@ -145,7 +145,7 @@
|
|||
<!-- 边框粗细 -->
|
||||
<div class="blockBox">
|
||||
<el-dropdown @command="updateStyle('lineWidth', $event)" placement="top">
|
||||
<el-button><el-image src="/src/assets/images/borderwidth.png"
|
||||
<el-button><el-image src="../../../src/assets/images/borderwidth.png"
|
||||
style="width: 14px; height: 14px"></el-image></el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
|
|
|
@ -59,14 +59,14 @@ export const processList = (row, aloneOption=false) => {
|
|||
for(; j<workDescArr.length; j++){
|
||||
const char = String.fromCharCode(65+j);
|
||||
if (aloneOption) {
|
||||
tmp += `<div style='width:100%;display:flex;padding: 2px 0'>${char}.${workDescArr[j]}</div>`;
|
||||
tmp += `<div class="format-work-desc" style='width:100%;display:flex;padding: 2px 0'>${char}.${workDescArr[j]}</div>`;
|
||||
}
|
||||
else {
|
||||
if(j%2 == 0){
|
||||
tmp += `<div style='width:100%;display:flex;'>`;
|
||||
}
|
||||
|
||||
tmp += `<div style='padding-left:10px;width:50%;overflow:hidden;text-overflow:ellipsis;font-size:0.9em;'>${char}.${workDescArr[j]}</div>`;
|
||||
tmp += `<div class="format-work-desc" style='padding-left:10px;width:50%;overflow:hidden;text-overflow:ellipsis;font-size:0.9em;'>${char}.${workDescArr[j]}</div>`;
|
||||
if(j%2 == 1){
|
||||
tmp += '</div>';
|
||||
}
|
||||
|
@ -153,14 +153,14 @@ export const processList = (row, aloneOption=false) => {
|
|||
for(; j<optionsArr.length; j++){
|
||||
const char = String.fromCharCode(65+j);
|
||||
if (aloneOption) {
|
||||
tmp += `<div style='width:100%;display:flex;padding: 2px 0'>${char}.${optionsArr[j]}</div>`;
|
||||
tmp += `<div class="format-work-desc" style='width:100%;display:flex;padding: 2px 0'>${char}.${optionsArr[j]}</div>`;
|
||||
}
|
||||
else {
|
||||
if(j%2 == 0){
|
||||
tmp += `<div style='width:100%;display:flex;'>`;
|
||||
}
|
||||
|
||||
tmp += `<div style='padding-left: 10px; width: 50%'>${char}.${optionsArr[j]}</div>`;
|
||||
tmp += `<div class="format-work-desc" style='padding-left: 10px; width: 50%'>${char}.${optionsArr[j]}</div>`;
|
||||
if(j%2 == 1){
|
||||
tmp += '</div>';
|
||||
}
|
||||
|
@ -280,14 +280,14 @@ export const processList = (row, aloneOption=false) => {
|
|||
for(; j<workDescArr.length; j++){
|
||||
const char = String.fromCharCode(65+j);
|
||||
if (aloneOption) {
|
||||
tmp += `<div style='width:100%;display:flex;padding: 2px 0'>${char}.${workDescArr[j]}</div>`;
|
||||
tmp += `<div class="format-work-desc" style='width:100%;display:flex;padding: 2px 0'>${char}.${workDescArr[j]}</div>`;
|
||||
}
|
||||
else {
|
||||
if(j%2 == 0){
|
||||
tmp += `<div style='width:100%;display:flex;'>`;
|
||||
}
|
||||
|
||||
tmp += `<div style='padding-left: 10px; width: 50%'>${char}.${workDescArr[j]}</div>`;
|
||||
tmp += `<div class="format-work-desc" style='padding-left: 10px; width: 50%'>${char}.${workDescArr[j]}</div>`;
|
||||
if(j%2 == 1){
|
||||
tmp += '</div>';
|
||||
}
|
||||
|
|
|
@ -488,6 +488,10 @@ watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => {
|
|||
width: 100%;
|
||||
height: calc(100% - 100px);
|
||||
}
|
||||
|
||||
:deep(.format-work-desc > :is(div):first-child){
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
// :deep(.el-dialog .question-dialog){
|
||||
// height: 80vh !important;
|
||||
|
|
|
@ -99,6 +99,8 @@ const router = useRouter()
|
|||
const { proxy } = getCurrentInstance()
|
||||
const props = defineProps({
|
||||
})
|
||||
|
||||
const curLessionList = ref([]);
|
||||
const activeParams = reactive({
|
||||
version: {},
|
||||
lession: {},
|
||||
|
|
|
@ -405,9 +405,10 @@
|
|||
<script setup>
|
||||
import { ElMessage, ElNotification } from 'element-plus'
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue'
|
||||
import { onMounted, ref, watch, reactive, getCurrentInstance,nextTick } from 'vue'
|
||||
|
||||
import { getBindlist } from '@/api/education/knowledgePoint'
|
||||
import { getBindlist, listKnowlegepointFormat } from '@/api/education/knowledgePoint'
|
||||
import { listEvaluation } from '@/api/subject'
|
||||
import { listEntpcoursework, getEntpcoursework, delEntpcoursework, addEntpcoursework, updateEntpcoursework, uploadEntpcourseworkFile } from "@/api/education/entpCourseWork";
|
||||
import { isJson } from "@/hooks/useProcessList";
|
||||
|
||||
|
@ -611,10 +612,13 @@ onMounted(() => {
|
|||
}
|
||||
yearList.value.push(s)
|
||||
};
|
||||
|
||||
// 拿到当前章节下得所有知识点
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
const checkBoxChange=(v)=>{
|
||||
// 单选 v: []
|
||||
console.log(v,'vvvvvv')
|
||||
|
@ -1666,10 +1670,56 @@ const myMessageShow=(title, msg, status)=>{
|
|||
// },
|
||||
// },
|
||||
|
||||
watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => {
|
||||
/**
|
||||
* @desc: 遍历原知识点数据, 将title字段转为knowTitle以供knowledgePointProps进行tree的格式转换显示
|
||||
* @return: {*}
|
||||
* @param {*} list
|
||||
*/
|
||||
const updateKnowledgePoint = (list) => {
|
||||
list.forEach(item => {
|
||||
if (item.title && item.title != '') {
|
||||
item.knowTitle = item.title;
|
||||
}
|
||||
if (item.children && Array.isArray(item.children)) {
|
||||
updateKnowledgePoint(item.children);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
};
|
||||
|
||||
watch(() => props.bookobj.levelSecondId, async (newVal, oldVal) => {
|
||||
console.log(props.bookobj,'课程选择')
|
||||
// props.bookobj.levelSecondId? props.bookobj.levelSecondId : props.bookobj.levelFirstId
|
||||
lessionid.value = props.bookobj.levelSecondId? props.bookobj.levelSecondId : props.bookobj.levelFirstId;
|
||||
|
||||
/**
|
||||
* 格式化知识点: 分两种情况
|
||||
* 1. 语文/英语: 获取学科下的所有知识点(该学科对应无章节与知识点绑定, 故只获取全知识点)
|
||||
* 2. 其他: 获取当前章节下的所有知识点
|
||||
*/
|
||||
let id = props.bookobj.levelSecondId;
|
||||
if(props.bookobj.node.edusubject == '语文' || props.bookobj.node.edusubject == '英语'){
|
||||
id = props.bookobj.node.rootid;
|
||||
const res = await listEvaluation({ edusubject: props.bookobj.node.edusubject, edustage: props.bookobj.node.edustage, itemkey: "subject", pageSize: 10 });
|
||||
id = res.rows[0]?.id;
|
||||
if (id) {
|
||||
listKnowlegepointFormat({evalId: id, pageNum: 1, pageSize: 5000,}).then(res => {
|
||||
//console.log('listKnowlegepointFormat->', res.rows);
|
||||
curKnowledgePointList.value = updateKnowledgePoint(res.rows);
|
||||
});
|
||||
}
|
||||
}else{
|
||||
getBindlist({ eid: id }).then(res => {
|
||||
if (!res.data || res.data.length < 1) {
|
||||
ElMessage.warning('当前章节下未绑定知识点,暂不更新该试题知识点!');
|
||||
curKnowledgePointList.value = [];
|
||||
}
|
||||
else {
|
||||
curKnowledgePointList.value = res.data;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
@ -1680,7 +1730,20 @@ defineExpose({
|
|||
cropperFormItemCallBack,
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.el-cascader-panel {
|
||||
li[aria-haspopup="true"] {
|
||||
.el-checkbox {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.questForm-item-cover{
|
||||
position: relative;
|
||||
|
||||
|
@ -1698,6 +1761,4 @@ defineExpose({
|
|||
z-index: 9999;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
|
@ -60,6 +60,7 @@ import { sessionStore } from '@/utils/store'
|
|||
import { ElMessage } from 'element-plus'
|
||||
import { dataSetJson } from '@/utils/comm.js'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import emitter from '@/utils/mitt';
|
||||
|
||||
const userInfo = useUserStore().user
|
||||
const textarea = ref('')
|
||||
|
@ -119,7 +120,7 @@ const getCompletion = async (val) => {
|
|||
type: 'robot',
|
||||
msg: answer,
|
||||
})
|
||||
|
||||
|
||||
} finally {
|
||||
loaded.value = false
|
||||
}
|
||||
|
@ -132,6 +133,8 @@ const saveAdjust = (item) =>{
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const curFile = reactive({})
|
||||
const dataset_id = ref('')
|
||||
const fileList = ref([])
|
||||
|
@ -144,7 +147,9 @@ const getList = () =>{
|
|||
Object.assign(curFile, fileList.value[0])
|
||||
})
|
||||
}
|
||||
|
||||
emitter.on('curFile', (item) =>{
|
||||
changeFile(item)
|
||||
})
|
||||
const changeFile = (val) =>{
|
||||
|
||||
Object.assign(curFile, val);
|
||||
|
@ -154,8 +159,8 @@ const changeFile = (val) =>{
|
|||
onMounted(() => {
|
||||
let data = sessionStore.get('subject.curNode')
|
||||
Object.assign(curNode, data);
|
||||
let text = props.modeType == 1 ? '课标': props.modeType == 2 ? '教材' : '考试'
|
||||
|
||||
let text = props.modeType == 1 ||props.modeType == 2 ? '课标' : '考试'
|
||||
|
||||
let jsonKey = `${text}-${data.edustage}-${data.edusubject}`
|
||||
params.dataset_id = dataSetJson[jsonKey]
|
||||
dataset_id.value = dataSetJson[jsonKey]
|
||||
|
@ -190,7 +195,7 @@ onMounted(() => {
|
|||
width: 100%;
|
||||
justify-content: flex-start;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
}
|
||||
.chart-item {
|
||||
border-radius: 5px;
|
||||
|
@ -300,4 +305,4 @@ onMounted(() => {
|
|||
display: flex;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -8,16 +8,16 @@
|
|||
</template>
|
||||
<div class="dialog-content">
|
||||
<div class="flex dialog-top">
|
||||
<el-radio-group v-model="radio" @change="changeRadio">
|
||||
<!-- <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>
|
||||
</el-radio-group> -->
|
||||
|
||||
</div>
|
||||
<div class="content-list">
|
||||
<ul>
|
||||
<li v-for="(item, index) in list" :class="activeIndex == index ? 'li-active' : ''" @click="clickItem(index)">
|
||||
<el-image class="img" :src="item.url" />
|
||||
<span>{{ item.name }}</span>
|
||||
<li v-for="(item, index) in fileList" :class="activeIndex == index ? 'li-active' : ''" @click="clickItem(index, item)">
|
||||
<el-image class="img" :src="url" />
|
||||
<el-text truncated>{{ item.fileName }}</el-text>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -47,6 +47,7 @@ import { sessionStore } from '@/utils/store'
|
|||
import { dataSetJson } from '@/utils/comm.js'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import emitter from '@/utils/mitt';
|
||||
|
||||
const userInfo = useUserStore().user
|
||||
const uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + "/common/upload");
|
||||
|
@ -93,11 +94,7 @@ const changeRadio = () => {
|
|||
})
|
||||
}
|
||||
}
|
||||
const activeIndex = ref(-1)
|
||||
|
||||
const clickItem = (index) => {
|
||||
activeIndex.value = index
|
||||
}
|
||||
const activeIndex = ref(0)
|
||||
|
||||
const dataset_id = ref('')
|
||||
|
||||
|
@ -109,7 +106,7 @@ const onSuccess = async (response) =>{
|
|||
dataset_id: dataset_id.value
|
||||
}
|
||||
const res = await completion(data)
|
||||
console.log(res)
|
||||
|
||||
if(res.data.code != 200) return
|
||||
let docData = {
|
||||
fileUrl: response.url,
|
||||
|
@ -123,19 +120,30 @@ const onSuccess = async (response) =>{
|
|||
}
|
||||
const { msg } = await addDoc(docData)
|
||||
ElMessage.success(msg)
|
||||
getList()
|
||||
|
||||
}
|
||||
const curNode = reactive({})
|
||||
|
||||
const fileList = ref([])
|
||||
const curFile = reactive({})
|
||||
const getList = () =>{
|
||||
docList({
|
||||
userId: userInfo.userId,
|
||||
dataset_id: dataset_id.value
|
||||
}).then( res =>{
|
||||
console.log(res)
|
||||
fileList.value = [...res.rows]
|
||||
Object.assign(curFile, fileList.value[0])
|
||||
})
|
||||
}
|
||||
|
||||
const clickItem = (index, item) => {
|
||||
activeIndex.value = index
|
||||
Object.assign(curFile, item)
|
||||
emitter.emit('curFile',item)
|
||||
}
|
||||
|
||||
|
||||
|
||||
onMounted(() =>{
|
||||
let data = sessionStore.get('subject.curNode')
|
||||
|
@ -174,6 +182,7 @@ onMounted(() =>{
|
|||
flex-wrap: wrap;
|
||||
|
||||
li {
|
||||
width: 130px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: 13px;
|
||||
|
|
|
@ -257,7 +257,7 @@ const removeItem = async (item) => {
|
|||
isAdd.value = false
|
||||
Object.assign(keywordItem, item)
|
||||
isEditKeyWord.value = true
|
||||
|
||||
|
||||
}
|
||||
|
||||
// const { msg } = await removeChildTemp(item.id)
|
||||
|
@ -269,7 +269,7 @@ const removeItem = async (item) => {
|
|||
onMounted(() => {
|
||||
let data = sessionStore.get('subject.curNode')
|
||||
Object.assign(curNode, data);
|
||||
let text = props.modeType == 1 ? '课标' : props.modeType == 2 ? '教材' : '考试'
|
||||
let text = props.modeType == 1 || props.modeType == 2? '课标' : '考试'
|
||||
let jsonKey = `${text}-${data.edustage}-${data.edusubject}`
|
||||
params.dataset_id = dataSetJson[jsonKey]
|
||||
|
||||
|
|
|
@ -7,7 +7,10 @@
|
|||
"noEmit": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"../*": ["./src/*"]
|
||||
"../*": ["./src/*"],
|
||||
"@/*": [
|
||||
"./src/renderer/src/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue