处理冲突

This commit is contained in:
lyc 2025-02-21 16:55:53 +08:00
commit 3675de66f5
9 changed files with 83 additions and 153 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "aix-win-ws", "name": "aix-win-ws",
"version": "2.5.17", "version": "2.5.20",
"description": "", "description": "",
"main": "./out/main/index.js", "main": "./out/main/index.js",
"author": "上海交大重庆人工智能研究院", "author": "上海交大重庆人工智能研究院",
@ -44,7 +44,7 @@
"@vue-office/excel": "^1.7.11", "@vue-office/excel": "^1.7.11",
"@vue-office/pdf": "^2.0.2", "@vue-office/pdf": "^2.0.2",
"@vueuse/core": "^10.11.0", "@vueuse/core": "^10.11.0",
"aix-plugins-aitools": "^1.1.10", "aix-plugins-aitools": "^1.1.24",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
"circular-json": "^0.5.9", "circular-json": "^0.5.9",
"clipboard": "^2.0.11", "clipboard": "^2.0.11",

View File

@ -94,7 +94,7 @@ const insertImageElementaudio = (files: FileList) => {
const imageFile = files[0] const imageFile = files[0]
if (!imageFile) return if (!imageFile) return
PPTApi.toRousrceUrl(imageFile).then(data=>{ PPTApi.toRousrceUrl(imageFile).then(data=>{
videoSrc.value=data audioSrc.value=data
insertAudio() insertAudio()
}) })

View File

@ -1,78 +1,11 @@
<template> <template>
<!-- <form @submit.prevent="submitForm" enctype="multipart/form-data">--> <input type="file" name="file" @change="handleFileChange" style="width: 400px"/> <br/><br/>
<form action="https://wzyzoss.eos-chongqing-3.cmecloud.cn" method="post" enctype="multipart/form-data"> <el-button @click="uploadFile">上传</el-button>
<!-- action 是具体要上传的地址 -->
<!--
上传后文件Object:
<input type="input" name="key" :value="uploadData.key" placeholder="文件名" style="width: 400px"/><br/><br/>
ACL
<input type="hidden" name="acl" :value="uploadData.acl" placeholder="文件 ACL" style="width: 400px"/><br/><br/>
Content-Type:
<input type="input" name="Content-Type" :value="uploadData['Content-Type']" placeholder="文件类型" style="width: 400px"/><br/><br/>
X-Amz-Credential
<input type="text" name="X-Amz-Credential" :value="uploadData['x-amz-credential']" placeholder="X-Amz-Credential从后端程序返回中获取" style="width: 400px"/><br/><br/>
X-Amz-Algorithm
<input type="text" name="X-Amz-Algorithm" :value="uploadData['x-amz-algorithm']" placeholder="X-Amz-Algorithm 从后端程序返回中获取" style="width: 400px"/><br/><br/>
X-Amz-Date
<input type="text" name="X-Amz-Date" :value="uploadData['x-amz-date']" placeholder="X-Amz-Date 从后端程序返回中获取" style="width: 400px"><br/><br/>
Policy
<input type="text" name="Policy" :value="uploadData.policy" placeholder="Policy 从后端程序返回中获取" style="width: 400px"/><br/><br/>
X-Amz-Signature
<input type="text" name="X-Amz-Signature" :value="uploadData['x-amz-signature']" placeholder="X-Amz-Signature 从后端程序返回中获取" style="width: 400px"/><br/><br/>
-->
选择文件Object
<input type="file" name="file" @change="handleFileChange" style="width: 400px"/> <br/><br/>
<input type="submit" name="submit" value="上传到 EOS" style="width: 400px"/><br/><br/>
<el-button @click="uploadFile">上传</el-button>
</form>
</template> </template>
<script setup> <script setup>
import {ref, onMounted} from "vue" import {ref, onMounted} from "vue"
import {createSignature, sessionToken} from "@/api/file"; import {createSignature, sessionToken} from "@/api/file";
import axios from "axios"
const url = "https://wzyzoss.eos-chongqing-3.cmecloud.cn"
const uploadData = ref({
"bucket": "wzyzoss",
"x-amz-date": "20250113T061000Z",
"x-amz-signature": "2d6fba9f27544bfc7414d660e2e73aafdaf02fe3de45e68f59d580276239cd07",
"acl": "private",
"x-amz-algorithm": "AWS4-HMAC-SHA256",
"key": "wzyzossa",
"x-amz-credential": "07ICFAF4IWWZP6RH0WCG/20250113/us-east-1/s3/aws4_request",
"Content-Type": null,
"policy": "eyJleHBpcmF0aW9uIjoiMjAyNS0wMS0xM1QwNzoxMDowMC42NzVaIiwiY29uZGl0aW9ucyI6W3sieC1hbXotZGF0ZSI6IjIwMjUwMTEzVDA2MTAwMFoifSx7ImFjbCI6InByaXZhdGUifSx7ImJ1Y2tldCI6Ind6eXpvc3MifSxbInN0YXJ0cy13aXRoIiwiJGtleSIsInd6eXpvc3NhIl0sWyJzdGFydHMtd2l0aCIsIiRDb250ZW50LVR5cGUiLCJudWxsIl0seyJ4LWFtei1hbGdvcml0aG0iOiJBV1M0LUhNQUMtU0hBMjU2In0seyJ4LWFtei1jcmVkZW50aWFsIjoiMDdJQ0ZBRjRJV1daUDZSSDBXQ0cvMjAyNTAxMTMvdXMtZWFzdC0xL3MzL2F3czRfcmVxdWVzdCJ9LFsiY29udGVudC1sZW5ndGgtcmFuZ2UiLDEsMTAwMDAwXV19"
})
const submitForm = ()=> {
let formData = new FormData();
for (const formDataKey in formData) {
formData.append(formDataKey, formData[formDataKey]);
}
axios.post(url, formData, {
headers: {
'Content-Type': 'multipart/form-data'
}
})
.then(response => {
console.log('表单提交成功,服务器响应:', response.data);
})
.catch(error => {
console.log('表单提交失败:', error);
});
}
const S3Data = { const S3Data = {
apiVersion: "2006-03-01", apiVersion: "2006-03-01",
@ -104,6 +37,7 @@ const uploadFile = ()=>{
Body: selectedFile Body: selectedFile
} }
console.log(params) console.log(params)
console.log(s3)
s3.putObject(params, function (err, data) { s3.putObject(params, function (err, data) {
console.log(err,data) console.log(err,data)
}); });
@ -112,9 +46,6 @@ const uploadFile = ()=>{
onMounted(()=>{ onMounted(()=>{
console.log(AWS) console.log(AWS)
/*createSignature({objectName:"123.jpg",contentType:"image/png"}).then(res=>{
uploadData.value = res.body
})*/
sessionToken().then(res=>{ sessionToken().then(res=>{
uploadMessage.value = res.data uploadMessage.value = res.data
console.log(res.data) console.log(res.data)

View File

@ -13,7 +13,8 @@
<template #default="{ node, data }"> <template #default="{ node, data }">
<div v-if="props.isClassTask && (data.bookId == '' || data.bookId == '0')" class="tree-label-wrap"> <div v-if="props.isClassTask && (data.bookId == '' || data.bookId == '0')" class="tree-label-wrap">
<el-tooltip effect="light" placement="right" > <el-tooltip effect="light" placement="right" >
<template #content> {{ node.label }}<br /><span style="color: red;">-该单元章节无自主试题-</span> </template> <!-- <template #content> {{ node.label }}<br /><span style="color: red;">-该单元章节无自主试题-</span> </template> -->
<template #content> {{ node.label }}</template>
<div class="tree-label" style="color: #A5B3CA" > <div class="tree-label" style="color: #A5B3CA" >
{{ node.label }} {{ node.label }}
</div> </div>
@ -195,14 +196,12 @@ const handleNodeClick = (data) => {
}, },
node: nodeData node: nodeData
} }
/** /**
* *
* 章节数据里面的rootid 为bookId * 章节数据里面的rootid 为bookId
* 因为部分数据源的rootid 有问题 这里需要重复赋值一下 * 因为部分数据源的rootid 有问题 这里需要重复赋值一下
*/ */
node.rootid = curBook.data.id curData.node.rootid = curBook.data.id
// :electron-store // :electron-store
let defaultExpandedKeys = parentNode ? [parentNode.id] : [nodeData.id] let defaultExpandedKeys = parentNode ? [parentNode.id] : [nodeData.id]
sessionStore.set('subject.defaultExpandedKeys', defaultExpandedKeys) sessionStore.set('subject.defaultExpandedKeys', defaultExpandedKeys)

View File

@ -127,6 +127,10 @@ const modeOptions = ref([
label: '知识库模型', label: '知识库模型',
value: 2, value: 2,
disabled: false disabled: false
},
{
label: 'deepseek模型',
value: 3,
} }
]) ])
@ -354,6 +358,9 @@ const requestModelData = async () =>{
} }
// //
else { else {
if (curMode.value == 3) {
params.llm = 'deepseek-r1:8b'
}
const res = await completion(params) const res = await completion(params)
data = res.data data = res.data
} }

View File

@ -105,45 +105,6 @@ onUnmounted(() => {
} }
}); });
// const typingEffectRef = ref(null);
// const emit = defineEmits(['complete', 'updateScroll']);
// const displayedText = ref('');
// const index = ref(0);
// const type = async () => {
// await nextTick()
// if(!props.aiShow) {
// displayedText.value = props.text
// return
// }
// if (index.value <= props.text.length) {
// displayedText.value += props.text.charAt(index.value);
// index.value++;
// setTimeout(() => {
// type();
// emit('updateScroll', typingEffectRef.value.clientHeight); //
// }, props.delay);
// } else {
// // complete
// emit('complete',displayedText.value);
// }
// };
// onMounted(() => {
// resetAndType();
// });
// const resetAndType = () =>{
// displayedText.value = '';
// index.value = 0;
// type();
// }
// props 便 text delay
// watch([() => props.text, () => props.delay], resetAndType);
</script> </script>
<style scoped> <style scoped>

View File

@ -4,7 +4,7 @@
<el-tab-pane :label="item.label" style="text-align:left" stretch="true"> <el-tab-pane :label="item.label" style="text-align:left" stretch="true">
<template v-if="item.stuList.length > 0"> <template v-if="item.stuList.length > 0">
<template v-for="(stuItem,stuIndex) in item.stuList" :key="stuIndex"> <template v-for="(stuItem,stuIndex) in item.stuList" :key="stuIndex">
<el-tag style="margin:5px 10px 0 0" type="primary">{{ stuItem.studentname }}:{{ stuItem.getScore }}</el-tag> <el-tag style="margin:5px 10px 0 0" type="primary">{{ stuItem.studentname }}:{{ stuItem.point }}</el-tag>
</template> </template>
</template> </template>
<template v-else> <template v-else>
@ -93,6 +93,8 @@ watch(() => useOverview.tableList, () => {
}else{ }else{
hasStudents.value = useOverview.tableList.filter(item => useOverview.allData[0].hasAnswers.includes(item.studentid)).map(item => item); hasStudents.value = useOverview.tableList.filter(item => useOverview.allData[0].hasAnswers.includes(item.studentid)).map(item => item);
} }
console.log(hasStudents.value,'hasStudents.value');
showStudents(0) showStudents(0)
},{deep: true}) },{deep: true})
</script> </script>

View File

@ -376,12 +376,12 @@ const getClassWorkStudentList = (rowId) => {
} }
} }
} }
const allScore = evalarray.reduce((acc, cur) => acc + cur.score, 0) const allScore = evalarray.reduce((acc, cur) => acc + cur.teacherRating, 0)
//console.log(evalarray, 'evalarray------------------------------------') //console.log(evalarray, 'evalarray------------------------------------')
if (feedcount > 0) { if (feedcount > 0) {
// : /*100 // : /*100
response.rows[i].scoingRate = ((score / allScore) * 100).toFixed(0) + '%' response.rows[i].scoingRate = ((score / allScore) * 100).toFixed(0) + '%'
response.rows[i].getScore = score response.rows[i].getScore = allScore
} else { } else {
response.rows[i].scoingRate = '0%' response.rows[i].scoingRate = '0%'
response.rows[i].getScore = 0 response.rows[i].getScore = 0

View File

@ -15,16 +15,16 @@ emits: {
} }
--> -->
<template> <template>
<div class="page-mindmap flex flex-col h-full"> <div class="page-mindmap">
<div class="mindmap-header flex items-center justify-between pl-5"> <div class="mindmap-header">
<div class="flex w-1/2 items-center justify-between"> <div class="mindmap-title">
<div> <div>
<b>AI思维导图</b> <span class="ml-5">{{ props.title }}</span> <b>AI思维导图</b> <span class="">{{ props.title }}</span>
</div> </div>
<div> <div>
<template v-if="isEdit"> <template v-if="isEdit">
<el-button class="mr-3" @click="isEdit = false">取消</el-button> <el-button class="" @click="isEdit = false">取消</el-button>
<el-button type="success" class="mr-3" @click="isEdit = false">保存</el-button> <el-button type="success" class="" @click="isEdit = false">保存</el-button>
</template> </template>
<!-- <el-button v-else type="primary" class="mr-3" @click="isEdit = true">编辑</el-button>--> <!-- <el-button v-else type="primary" class="mr-3" @click="isEdit = true">编辑</el-button>-->
</div> </div>
@ -34,9 +34,9 @@ emits: {
<el-button @click="outputImg" type="primary">导出图片</el-button> <el-button @click="outputImg" type="primary">导出图片</el-button>
</div> </div>
</div> </div>
<div class="mindmap-main flex flex-1" style="overflow: auto;"> <div class="mindmap-main" style="overflow: auto;">
<div class="w-1/3 h-full p-3 main-left flex flex-col" v-loading="loadingAnswer" style="overflow: auto;"> <div class="mindmap-main-left" v-loading="loadingAnswer" style="overflow: auto;">
<div class="flex flex-1" style="overflow: auto;"> <div class="main-left-content" style="overflow: auto;">
<v-md-editor v-model="resMarkdown" :mode="isEdit ? 'edit' : 'preview'" /> <v-md-editor v-model="resMarkdown" :mode="isEdit ? 'edit' : 'preview'" />
</div> </div>
<div class="main-left-ipt"> <div class="main-left-ipt">
@ -53,7 +53,7 @@ emits: {
<!-- <el-input style="float: left;" v-model="textVal" size="large" placeholder="请输入信息对内容进一步调整" /><el-button>发送</el-button>--> <!-- <el-input style="float: left;" v-model="textVal" size="large" placeholder="请输入信息对内容进一步调整" /><el-button>发送</el-button>-->
</div> </div>
</div> </div>
<div class="w-2/3 h-full main-right"> <div class="mindmap-main-right">
<mindmap v-if="rootData" :timetravel="true" :drag="true" :zoom="true" :edit="true" <mindmap v-if="rootData" :timetravel="true" :drag="true" :zoom="true" :edit="true"
:center-btn="true" :fit-btn="true" :ctm="true" :add-node-btn="true" :center-btn="true" :fit-btn="true" :ctm="true" :add-node-btn="true"
v-model="rootData"></mindmap> v-model="rootData"></mindmap>
@ -223,24 +223,54 @@ watch(() => resMarkdown.value, () => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.mindmap-header { .page-mindmap{
background: #fff; display: flex;
height: 45px; flex-direction: column;
border-radius: 5px; flex: 1;
margin-bottom: 20px; height: 100%;
} width: 100%;
.main-left {
background: #fff; .mindmap-header {
border-radius: 5px; background: #fff;
.main-left-ipt { height: 45px;
height: 40px; border-radius: 5px;
margin-bottom: 20px;
padding: 0 20px;
display: flex;
justify-content: space-between;
align-items: center;
} }
}
.main-right{ .mindmap-main{
border: 1px solid #ccc; display: flex;
svg { flex: 1;
width: 100%; flex-direction: row;
height: 100%; .mindmap-main-left {
background: #fff;
flex-basis: 34%;
border-radius: 5px;
display: flex;
flex-direction: column;
.main-left-content{
flex: 1;
}
.main-left-ipt {
height: 50px;
display: flex;
justify-content: center;
align-items: center;
}
}
.mindmap-main-right{
border: 1px solid #ccc;
flex-basis: 66%;
svg {
width: 100%;
height: 100%;
}
}
} }
} }
</style> </style>