|
|
|
|
@ -385,12 +385,17 @@ watch(selectedFormSettingId, async (formSettingId) => {
|
|
|
|
|
// proxy.$store.commit('aiFormSettingId', formSettingId)
|
|
|
|
|
// proxy.$store.commit('aiFormSetting', formPageMap.value[formSettingId])
|
|
|
|
|
} else {
|
|
|
|
|
isShowLeft.value = true
|
|
|
|
|
currentSize.value = "form";
|
|
|
|
|
const mod = await formPageMap.value[formSettingId].loader()
|
|
|
|
|
console.log(formPageMap.value[formSettingId].props)
|
|
|
|
|
currentComponent.value = mod.default
|
|
|
|
|
currentProps.value = {...formPageMap.value[formSettingId].props, userInput: ''}
|
|
|
|
|
isShowLeft.value = false
|
|
|
|
|
currentSize.value = "menu";
|
|
|
|
|
router.push({path: "/" + formPageMap.value[formSettingId].props.formPath, query: {from: "ai"}})
|
|
|
|
|
|
|
|
|
|
// alert(2)
|
|
|
|
|
// isShowLeft.value = true
|
|
|
|
|
// currentSize.value = "form";
|
|
|
|
|
// const mod = await formPageMap.value[formSettingId].loader()
|
|
|
|
|
// console.log(formPageMap.value[formSettingId].props)
|
|
|
|
|
// currentComponent.value = mod.default
|
|
|
|
|
// currentProps.value = {...formPageMap.value[formSettingId].props, userInput: ''}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -659,7 +664,12 @@ const handleSend = async (selectedText?: string) => {
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
//直接打开表单赋值使用
|
|
|
|
|
currentProps.value = sendForm.value;
|
|
|
|
|
// currentProps.value = sendForm.value;
|
|
|
|
|
|
|
|
|
|
sharedStore.updateDynamicValue({
|
|
|
|
|
message: sendForm.value,
|
|
|
|
|
timestamp: new Date().toLocaleString()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -796,7 +806,7 @@ const toggleRecording = () => {
|
|
|
|
|
// 开始录音
|
|
|
|
|
async function startRecording() {
|
|
|
|
|
try {
|
|
|
|
|
// 检查浏览器支持
|
|
|
|
|
// 检查浏览器支持(放在服务器中必须使用https)
|
|
|
|
|
if (!navigator.mediaDevices || !navigator.mediaDevices.getUserMedia) {
|
|
|
|
|
proxy.$modal.msgError('您的浏览器不支持录音功能')
|
|
|
|
|
return
|
|
|
|
|
|