Compare commits
No commits in common. "93817859912ccc2d543ea052500619b9bc0585cb" and "2b5b365e2f61f02c17ace36c35bd99ae69dd0968" have entirely different histories.
9381785991
...
2b5b365e2f
|
@ -10,10 +10,11 @@ export const createChart = ({ headers, data }) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 大模型对话
|
// 大模型对话
|
||||||
export const sendChart = (data) => {
|
export const sendChart = ({ headers, data }) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/qf/sendTalk',
|
url: '/qf/sendTalk',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
headers,
|
||||||
data,
|
data,
|
||||||
})
|
})
|
||||||
}
|
}
|
|
@ -30,7 +30,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<div class="file-list">
|
<div class="file-list">
|
||||||
<el-dropdown @command="changeFile" v-if="type == 3">
|
<el-dropdown @command="changeFile">
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
{{ curFile.fileName }}
|
{{ curFile.fileName }}
|
||||||
<i class="iconfont icon-xiangxia"></i>
|
<i class="iconfont icon-xiangxia"></i>
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, onMounted, onUnmounted } from 'vue'
|
import { ref, reactive, onMounted, onUnmounted, watch } from 'vue'
|
||||||
import { completion, docList } from '@/api/mode/index'
|
import { completion, docList } from '@/api/mode/index'
|
||||||
import { sessionStore } from '@/utils/store'
|
import { sessionStore } from '@/utils/store'
|
||||||
import { dataSetJson } from '@/utils/comm.js'
|
import { dataSetJson } from '@/utils/comm.js'
|
||||||
|
@ -71,7 +71,7 @@ const props = defineProps({
|
||||||
item: {
|
item: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {
|
default: () => {
|
||||||
return { name: '' }
|
return { name: '11' }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
type: {
|
type: {
|
||||||
|
@ -125,6 +125,19 @@ const saveAdjust = (item) =>{
|
||||||
emitter.emit('onSaveAdjust', item.msg)
|
emitter.emit('onSaveAdjust', item.msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const modeType = ref('课标')
|
||||||
|
watch(() => props.type, (newVal) => {
|
||||||
|
if (newVal == 1){
|
||||||
|
modeType.value = '课标'
|
||||||
|
}
|
||||||
|
if (newVal == 2){
|
||||||
|
modeType.value = '教材'
|
||||||
|
}
|
||||||
|
if (newVal == 2){
|
||||||
|
modeType.value = '考试'
|
||||||
|
}
|
||||||
|
|
||||||
|
}, { immediate: false })
|
||||||
|
|
||||||
const curFile = reactive({})
|
const curFile = reactive({})
|
||||||
const dataset_id = ref('')
|
const dataset_id = ref('')
|
||||||
|
@ -147,12 +160,11 @@ const changeFile = (val) =>{
|
||||||
params.document_ids = val.docId
|
params.document_ids = val.docId
|
||||||
}
|
}
|
||||||
|
|
||||||
const modeType = ref('')
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
let data = sessionStore.get('subject.curNode')
|
let data = sessionStore.get('subject.curNode')
|
||||||
Object.assign(curNode, data);
|
|
||||||
|
|
||||||
modeType.value = props.type == 1 ? '课标' : props.type == 2 ? '教材' : '考试'
|
Object.assign(curNode, data);
|
||||||
let jsonKey = `${modeType.value}-${data.edustage}-${data.edusubject}`
|
let jsonKey = `${modeType.value}-${data.edustage}-${data.edusubject}`
|
||||||
params.dataset_id = dataSetJson[jsonKey]
|
params.dataset_id = dataSetJson[jsonKey]
|
||||||
if(props.type == 3){
|
if(props.type == 3){
|
||||||
|
|
|
@ -14,10 +14,7 @@
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<div class="flex">
|
<div>
|
||||||
<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-select>
|
|
||||||
<el-button type="danger" link :disabled="!(templateList.length)" @click="removeItem(curTemplate, false)">
|
<el-button type="danger" link :disabled="!(templateList.length)" @click="removeItem(curTemplate, false)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -55,8 +52,7 @@
|
||||||
<i class="iconfont icon-ai"></i>
|
<i class="iconfont icon-ai"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-answer">
|
<div class="item-answer">
|
||||||
<TypingEffect v-if="isStarted[index]" :text="item.answer" :delay="10" :aiShow="item.aiShow"
|
<TypingEffect v-if="isStarted[index]" :text="item.answer" :delay="10" :aiShow="item.aiShow" @complete="handleCompleteText($event,index)" @updateScroll="scrollToBottom($event,index)" />
|
||||||
@complete="handleCompleteText($event, index)" @updateScroll="scrollToBottom($event, index)" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ai-btn" v-if="item.answer">
|
<div class="ai-btn" v-if="item.answer">
|
||||||
|
@ -90,7 +86,6 @@
|
||||||
import { ref, reactive, onMounted, onUnmounted, nextTick } from 'vue'
|
import { ref, reactive, onMounted, onUnmounted, nextTick } from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { tempSave, completion, modelList, removeChildTemp, tempResult, editTempResult } from '@/api/mode/index'
|
import { tempSave, completion, modelList, removeChildTemp, tempResult, editTempResult } from '@/api/mode/index'
|
||||||
import { createChart, sendChart } from '@/api/ai/index'
|
|
||||||
import { sessionStore } from '@/utils/store'
|
import { sessionStore } from '@/utils/store'
|
||||||
import keywordDialog from './keyword-dialog.vue';
|
import keywordDialog from './keyword-dialog.vue';
|
||||||
import AdjustDialog from './adjust-dialog.vue'
|
import AdjustDialog from './adjust-dialog.vue'
|
||||||
|
@ -99,23 +94,10 @@ import TypingEffect from '@/components/typing-effect/index.vue'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import emitter from '@/utils/mitt';
|
import emitter from '@/utils/mitt';
|
||||||
import { dataSetJson } from '@/utils/comm.js'
|
import { dataSetJson } from '@/utils/comm.js'
|
||||||
import { cloneDeep } from 'lodash'
|
|
||||||
|
|
||||||
const props = defineProps(['type'])
|
const props = defineProps(['type'])
|
||||||
const { user } = useUserStore()
|
const { user } = useUserStore()
|
||||||
|
|
||||||
const curMode = ref(1)
|
|
||||||
const modeOptions = ref([
|
|
||||||
{
|
|
||||||
label: '教学大模型',
|
|
||||||
value: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '知识库模型',
|
|
||||||
value: 2
|
|
||||||
}
|
|
||||||
])
|
|
||||||
|
|
||||||
/*****************提示词相关****************/
|
/*****************提示词相关****************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -270,6 +252,7 @@ const removeItem = async (item, isChild) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Ai对话调整
|
// Ai对话调整
|
||||||
const curIndex = ref(-1)
|
const curIndex = ref(-1)
|
||||||
const isAdjust = ref(false)
|
const isAdjust = ref(false)
|
||||||
|
@ -294,7 +277,6 @@ const params = reactive(
|
||||||
dataset_id: ''
|
dataset_id: ''
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
const prompt = ref('')
|
|
||||||
|
|
||||||
// 重新研读
|
// 重新研读
|
||||||
const isAgain = ref(false)
|
const isAgain = ref(false)
|
||||||
|
@ -314,28 +296,8 @@ const againResult = async (index, item) => {
|
||||||
await nextTick()
|
await nextTick()
|
||||||
childTempList.value[index].loading = true
|
childTempList.value[index].loading = true
|
||||||
item.aiShow = true
|
item.aiShow = true
|
||||||
|
params.prompt = `按照${item.prompt}的要求,针对${curNode.edustage}${curNode.edusubject}${modeType.value} 对${curNode.itemtitle}进行教学分析`
|
||||||
let str = cloneDeep(prompt.value)
|
const { data } = await completion(params)
|
||||||
str = str.replace('{模板标题}',item.name)
|
|
||||||
str = str.replace('{模板内容}',item.prompt)
|
|
||||||
params.prompt = str
|
|
||||||
params.template = item.prompt
|
|
||||||
|
|
||||||
let data = null;
|
|
||||||
// 教学大模型
|
|
||||||
if (mode.value == 1) {
|
|
||||||
const res = await sendChart({
|
|
||||||
content: params.prompt,
|
|
||||||
conversationId: conversation_id.value,
|
|
||||||
stream: false
|
|
||||||
})
|
|
||||||
data = res.data
|
|
||||||
} else {
|
|
||||||
// 知识库模型
|
|
||||||
const res = await completion(params)
|
|
||||||
data = res.data
|
|
||||||
}
|
|
||||||
|
|
||||||
childTempList.value[index].answer = getResult(data.answer);
|
childTempList.value[index].answer = getResult(data.answer);
|
||||||
isStarted.value[index] = true
|
isStarted.value[index] = true
|
||||||
|
|
||||||
|
@ -343,7 +305,6 @@ const againResult = async (index, item) => {
|
||||||
childTempList.value[index].loading = false
|
childTempList.value[index].loading = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 一键研读
|
// 一键研读
|
||||||
const getCompletion = async () => {
|
const getCompletion = async () => {
|
||||||
isStarted.value = new Array(childTempList.length).fill(false)
|
isStarted.value = new Array(childTempList.length).fill(false)
|
||||||
|
@ -359,27 +320,8 @@ const getCompletion = async () => {
|
||||||
try {
|
try {
|
||||||
item.loading = true
|
item.loading = true
|
||||||
item.aiShow = true
|
item.aiShow = true
|
||||||
let str = cloneDeep(prompt.value)
|
params.prompt = `按照${item.prompt}的要求,针对${curNode.edustage}${curNode.edusubject}${modeType.value} 对${curNode.itemtitle}进行教学分析`
|
||||||
str = str.replace('{模板标题}',item.name)
|
const { data } = await completion(params)
|
||||||
str = str.replace('{模板内容}',item.prompt)
|
|
||||||
params.prompt = str
|
|
||||||
params.template = item.prompt
|
|
||||||
// 教学大模型
|
|
||||||
let data = null
|
|
||||||
if (curMode.value == 1) {
|
|
||||||
const res = await sendChart({
|
|
||||||
content: params.prompt,
|
|
||||||
conversationId: conversation_id.value,
|
|
||||||
stream: false
|
|
||||||
})
|
|
||||||
data = res.data
|
|
||||||
}
|
|
||||||
// 知识库模型
|
|
||||||
else {
|
|
||||||
const res = await completion(params)
|
|
||||||
data = res.data
|
|
||||||
}
|
|
||||||
|
|
||||||
item.answer = getResult(data.answer)
|
item.answer = getResult(data.answer)
|
||||||
onSaveTemp(item)
|
onSaveTemp(item)
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -444,30 +386,6 @@ emitter.on('onGetMain', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// 创建对话
|
|
||||||
const conversation_id = ref('')
|
|
||||||
const getChartId = () => {
|
|
||||||
createChart({ app_id: '712ff0df-ed6b-470f-bf87-8cfbaf757be5' }).then(res => {
|
|
||||||
localStorage.setItem("conversation_id", res.data.conversation_id);
|
|
||||||
conversation_id.value = res.data.conversation_id;
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询prompt 替换
|
|
||||||
const getPrompt = async () => {
|
|
||||||
const { rows } = await modelList({ model: 5 })
|
|
||||||
let str = rows.find(item => item.name.indexOf(modeType.value) != -1).prompt
|
|
||||||
str = str.replace('{学段}', curNode.edustage)
|
|
||||||
str = str.replace('{学科}', curNode.edusubject)
|
|
||||||
let bookV = curNode.roottitle.split('-')[1] + '版本'
|
|
||||||
str = str.replace('{教材版本}', bookV)
|
|
||||||
str = str.replace('{课程名称}', `《${curNode.itemtitle}》`)
|
|
||||||
if(modeType.value == '课标'){
|
|
||||||
str = str.replace('{课标名称}', `${curNode.edustage}${curNode.edusubject}课标`)
|
|
||||||
}
|
|
||||||
prompt.value = str
|
|
||||||
}
|
|
||||||
|
|
||||||
const curNode = reactive({})
|
const curNode = reactive({})
|
||||||
const modeType = ref('')
|
const modeType = ref('')
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -478,15 +396,6 @@ onMounted(() => {
|
||||||
getTemplateList()
|
getTemplateList()
|
||||||
let jsonKey = `${modeType.value}-${data.edustage}-${data.edusubject}`
|
let jsonKey = `${modeType.value}-${data.edustage}-${data.edusubject}`
|
||||||
params.dataset_id = dataSetJson[jsonKey]
|
params.dataset_id = dataSetJson[jsonKey]
|
||||||
// 获取百度千帆会话ID
|
|
||||||
conversation_id.value = localStorage.getItem('conversation_id')
|
|
||||||
if (!conversation_id.value) {
|
|
||||||
getChartId();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取prompt
|
|
||||||
getPrompt()
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 解绑
|
// 解绑
|
||||||
|
|
|
@ -10,9 +10,6 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
<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-select>
|
|
||||||
<el-button type="primary" :disabled="!(resultList.length)" @click="getCompletion">一键研读</el-button>
|
<el-button type="primary" :disabled="!(resultList.length)" @click="getCompletion">一键研读</el-button>
|
||||||
<el-button type="primary">生成大纲</el-button>
|
<el-button type="primary">生成大纲</el-button>
|
||||||
<el-button type="danger" @click="pptDialog = true">生成PPT</el-button>
|
<el-button type="danger" @click="pptDialog = true">生成PPT</el-button>
|
||||||
|
@ -38,8 +35,7 @@
|
||||||
<div class="item-prompt">{{ item.prompt }}</div>
|
<div class="item-prompt">{{ item.prompt }}</div>
|
||||||
<div class="item-answer" v-if="item.answer">
|
<div class="item-answer" v-if="item.answer">
|
||||||
<div class="answer-text">
|
<div class="answer-text">
|
||||||
<TypingEffect v-if="isStarted[index]" :text="item.answer" :delay="10" :aiShow="item.aiShow"
|
<TypingEffect v-if="isStarted[index]" :text="item.answer" :delay="10" :aiShow="item.aiShow" @complete="handleCompleteText($event,index)" @updateScroll="scrollToBottom($event,index)" />
|
||||||
@complete="handleCompleteText($event, index)" @updateScroll="scrollToBottom($event, index)" />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="item-btn flex">
|
<div class="item-btn flex">
|
||||||
<el-button type="primary" link @click="againResult(index, item)">
|
<el-button type="primary" link @click="againResult(index, item)">
|
||||||
|
@ -77,14 +73,12 @@ import emitter from '@/utils/mitt'
|
||||||
import EditDialog from './edit-dialog.vue'
|
import EditDialog from './edit-dialog.vue'
|
||||||
import AdjustDialog from './adjust-dialog.vue'
|
import AdjustDialog from './adjust-dialog.vue'
|
||||||
import progressDialog from './progress-dialog.vue'
|
import progressDialog from './progress-dialog.vue'
|
||||||
import { completion, tempResult, tempSave, removeChildTemp, editTempResult, modelList } from '@/api/mode/index.js'
|
import { completion, tempResult, tempSave, removeChildTemp, editTempResult } from '@/api/mode/index.js'
|
||||||
import { createChart, sendChart } from '@/api/ai/index'
|
|
||||||
// import { dataSetJson } from '@/utils/comm.js'
|
// import { dataSetJson } from '@/utils/comm.js'
|
||||||
import * as commUtils from '@/utils/comm.js'
|
import * as commUtils from '@/utils/comm.js'
|
||||||
import PptDialog from '@/views/prepare/container/pptist-dialog.vue'
|
import PptDialog from '@/views/prepare/container/pptist-dialog.vue'
|
||||||
import keywordDialog from './keyword-dialog.vue'
|
import keywordDialog from './keyword-dialog.vue'
|
||||||
import TypingEffect from '@/components/typing-effect/index.vue'
|
import TypingEffect from '@/components/typing-effect/index.vue'
|
||||||
import { cloneDeep } from 'lodash'
|
|
||||||
|
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import {PPTXFileToJson} from '@/AixPPTist/src/hooks/useImport' // ppt转json
|
import {PPTXFileToJson} from '@/AixPPTist/src/hooks/useImport' // ppt转json
|
||||||
|
@ -116,19 +110,6 @@ const pgDialog = reactive({ // 弹窗-进度条
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const curMode = ref(1)
|
|
||||||
const modeOptions = ref([
|
|
||||||
{
|
|
||||||
label: '教学大模型',
|
|
||||||
value: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '知识库模型',
|
|
||||||
value: 2
|
|
||||||
}
|
|
||||||
])
|
|
||||||
|
|
||||||
emitter.on('changeMode', (item) => {
|
emitter.on('changeMode', (item) => {
|
||||||
resultList.value = item.child
|
resultList.value = item.child
|
||||||
getTempResult(item.id)
|
getTempResult(item.id)
|
||||||
|
@ -150,28 +131,8 @@ const getCompletion = async () => {
|
||||||
try {
|
try {
|
||||||
item.loading = true
|
item.loading = true
|
||||||
item.aiShow = true
|
item.aiShow = true
|
||||||
|
params.prompt = `按照${item.prompt}的要求,针对${curNode.edustage}${curNode.edusubject} 对${curNode.itemtitle}进行教学分析`
|
||||||
let str = cloneDeep(prompt.value)
|
const { data } = await completion(params)
|
||||||
str = str.replace(/{模板名称}/g, item.name)
|
|
||||||
params.prompt = str
|
|
||||||
params.template = item.prompt
|
|
||||||
|
|
||||||
// 教学大模型
|
|
||||||
let data = null
|
|
||||||
if (curMode.value == 1) {
|
|
||||||
const res = await sendChart({
|
|
||||||
content: params.prompt,
|
|
||||||
conversationId: conversation_id.value,
|
|
||||||
stream: false
|
|
||||||
})
|
|
||||||
data = res.data
|
|
||||||
}
|
|
||||||
// 知识库模型
|
|
||||||
else {
|
|
||||||
const res = await completion(params)
|
|
||||||
data = res.data
|
|
||||||
}
|
|
||||||
|
|
||||||
item.answer = getResult(data.answer)
|
item.answer = getResult(data.answer)
|
||||||
onSaveTemp(item)
|
onSaveTemp(item)
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -304,12 +265,9 @@ let getResult = (str) => {
|
||||||
const params = reactive(
|
const params = reactive(
|
||||||
{
|
{
|
||||||
prompt: '',
|
prompt: '',
|
||||||
dataset_id: '',
|
dataset_id: ''
|
||||||
template: ''
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
const prompt = ref('')
|
|
||||||
|
|
||||||
|
|
||||||
const addAiPPT = async(res) => {
|
const addAiPPT = async(res) => {
|
||||||
let node = courseObj.node
|
let node = courseObj.node
|
||||||
|
@ -385,27 +343,8 @@ const againResult = async (index, item) => {
|
||||||
await nextTick()
|
await nextTick()
|
||||||
resultList.value[index].loading = true
|
resultList.value[index].loading = true
|
||||||
item.aiShow = true
|
item.aiShow = true
|
||||||
|
params.prompt = `按照${item.prompt}的要求,针对${curNode.edustage}${curNode.edusubject}课标对${curNode.itemtitle}进行教学分析`
|
||||||
let str = cloneDeep(prompt.value)
|
const { data } = await completion(params)
|
||||||
str = str.replace(/{模板名称}/g, item.name)
|
|
||||||
params.prompt = str
|
|
||||||
params.template = item.prompt
|
|
||||||
|
|
||||||
let data = null;
|
|
||||||
// 教学大模型
|
|
||||||
if (mode.value == 1) {
|
|
||||||
const res = await sendChart({
|
|
||||||
content: params.prompt,
|
|
||||||
conversationId: conversation_id.value,
|
|
||||||
stream: false
|
|
||||||
})
|
|
||||||
data = res.data
|
|
||||||
} else {
|
|
||||||
// 知识库模型
|
|
||||||
const res = await completion(params)
|
|
||||||
data = res.data
|
|
||||||
}
|
|
||||||
|
|
||||||
resultList.value[index].answer = getResult(data.answer)
|
resultList.value[index].answer = getResult(data.answer)
|
||||||
isStarted.value[index] = true
|
isStarted.value[index] = true
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -559,27 +498,6 @@ const toRousrceUrl = async (o) => {
|
||||||
}
|
}
|
||||||
// ======== zdg end ============
|
// ======== zdg end ============
|
||||||
|
|
||||||
// 创建对话
|
|
||||||
const conversation_id = ref('')
|
|
||||||
const getChartId = () => {
|
|
||||||
createChart({ app_id: '712ff0df-ed6b-470f-bf87-8cfbaf757be5' }).then(res => {
|
|
||||||
localStorage.setItem("conversation_id", res.data.conversation_id);
|
|
||||||
conversation_id.value = res.data.conversation_id;
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询prompt 替换
|
|
||||||
const getPrompt = async () => {
|
|
||||||
const { rows } = await modelList({ model: 5 })
|
|
||||||
let str = rows.find(item => item.name.indexOf('框架设计') != -1).prompt
|
|
||||||
str = str.replace('{学段}', curNode.edustage)
|
|
||||||
str = str.replace('{学科}', curNode.edusubject)
|
|
||||||
let bookV = curNode.roottitle.split('-')[1] + '版本'
|
|
||||||
str = str.replace('{教材版本}', bookV)
|
|
||||||
str = str.replace('{课程名称}', `《${curNode.itemtitle}》`)
|
|
||||||
prompt.value = str
|
|
||||||
}
|
|
||||||
|
|
||||||
const curNode = reactive({})
|
const curNode = reactive({})
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
let data = sessionStore.get('subject.curNode')
|
let data = sessionStore.get('subject.curNode')
|
||||||
|
@ -588,15 +506,6 @@ onMounted(() => {
|
||||||
|
|
||||||
let jsonKey = `课标-${data.edustage}-${data.edusubject}`
|
let jsonKey = `课标-${data.edustage}-${data.edusubject}`
|
||||||
params.dataset_id = commUtils.dataSetJson[jsonKey]
|
params.dataset_id = commUtils.dataSetJson[jsonKey]
|
||||||
|
|
||||||
// 获取百度千帆会话ID
|
|
||||||
conversation_id.value = localStorage.getItem('conversation_id')
|
|
||||||
if (!conversation_id.value) {
|
|
||||||
getChartId();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取prompt
|
|
||||||
getPrompt()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -639,7 +548,6 @@ onUnmounted(() => {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
&::after{
|
&::after{
|
||||||
content: '';
|
content: '';
|
||||||
width: 15px;
|
width: 15px;
|
||||||
|
@ -650,7 +558,6 @@ onUnmounted(() => {
|
||||||
left: -8px;
|
left: -8px;
|
||||||
top: 5px;
|
top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::before{
|
&::before{
|
||||||
content: '';
|
content: '';
|
||||||
width: 2px;
|
width: 2px;
|
||||||
|
@ -660,19 +567,16 @@ onUnmounted(() => {
|
||||||
left: -1px;
|
left: -1px;
|
||||||
top: 5px;
|
top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:last-child{
|
&:last-child{
|
||||||
&::before{
|
&::before{
|
||||||
content: '';
|
content: '';
|
||||||
width: 0
|
width: 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-top {
|
.item-top {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
|
|
||||||
.icon-shenglvehao{
|
.icon-shenglvehao{
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue