This commit is contained in:
ylj20011123 2025-12-23 18:42:59 +08:00
parent 29b67990d6
commit 751fd8d3b4
3 changed files with 362 additions and 634 deletions

File diff suppressed because it is too large Load Diff

View File

@ -18,10 +18,7 @@ import {
import moment from "moment";
import pageBg from '../../assets/pageBg.png'
const userInput = ref();
const userInput = ref('新桥服务区python营收');
const loading = ref();
const error = ref();
const response = ref();
@ -40,16 +37,13 @@ const controllers = ref<AbortController[]>([]);
const showController = ref<boolean>(false);
// list
const scrollList = reactive<any>([]);
const messageList = reactive<any>([]);
const aliyunMessageList = reactive<any>([]);
let deepseekMessageList = reactive<any>([]);
//
const startFree = ref<boolean>(false);
//
const freeContent = ref<string>("");
const maxTokens = ref<number>(4096);
const Temperature = ref<number>(0.4);
const TopP = ref<number>(0.4);
@ -64,7 +58,7 @@ const showDeepseek = ref<boolean>(true);
//
const useMapData = ref<boolean>(true);
//
const modalTypeSelect = ref<number[]>([2, 4]);
const modalTypeSelect = ref<number[]>([5]);
//
let modalTypeDataList = reactive<any>([
{
@ -107,6 +101,16 @@ let modalTypeDataList = reactive<any>([
showCopy: false,
showReload: false,
},
{
label: "Gemini",
value: 5,
messageList: [],
isShow: true,
responseText: "",
descResponseText: "",
showCopy: false,
showReload: false,
},
]);
//
const hideLeft = ref<boolean>(true);
@ -148,12 +152,10 @@ let routerRole = ref<any>({
onMounted(async () => {
let param1: string = ""
if (/Mobi|Android/i.test(navigator.userAgent)) {
console.log("是手机");
isPhone.value = true;
//
modalTypeSelect.value = [4];
}
console.log('modalTypeDataListmodalTypeDataList', modalTypeDataList);
if (modalTypeDataList && modalTypeDataList.length > 0) {
modalTypeDataList.forEach((item: any) => {
@ -166,7 +168,6 @@ onMounted(async () => {
} else {
const urlParams = new URLSearchParams(window.location.search);
param1 = urlParams.get('comeForm') || "";
console.log("comeForm", param1);
if (param1 === 'YNMap') {
pageType.value = 1
hideLeft.value = false
@ -223,8 +224,6 @@ onMounted(async () => {
// routerRole.value.content = ""
// }
console.log("YSRole", YSRole);
console.log("routerRole", routerRole);
});
const showPhoneChange = ref<boolean>(false);
@ -277,14 +276,11 @@ const handleGetPrompt = async () => {
sortstr: "OPERATE_DATE desc",
};
const data = await handleGetPROMPTList(req);
console.log("data", data);
return data.List;
};
//
const handleUpdatePrompt = async (id: number) => {
console.log("id", id);
console.log("YSRole.value", YSRole.value);
let req: any = {};
if (id === 1000) {
@ -300,7 +296,6 @@ const handleUpdatePrompt = async (id: number) => {
OPERATE_DATE: moment().format("YYYY-MM-DD HH:mm:ss"),
};
}
console.log("req", req);
const data = await handleSynchroPROMPT(req);
if (data.Result_Code === 100) {
ElMessage({
@ -402,7 +397,6 @@ const aLiYunGetDeepSeek = async (question: string) => {
// messages: [{ role: "user", content: question }],
// stream: true,
// });
// console.log("data", data);
let oldMessage: any = [];
if (aliyunMessageList && aliyunMessageList.length > 0) {
@ -508,7 +502,6 @@ const aliyunStreamChunk = async (chunk: any) => {
// deepseek
const handleAskDirectlyDeepseek = async () => {
console.log("modalTypeDataList", modalTypeDataList);
if (modalTypeDataList && modalTypeDataList.length > 0) {
modalTypeDataList.forEach((item: any) => {
if (item.isShow) {
@ -538,7 +531,6 @@ const handleSendRequest = async (bigObj?: any) => {
userInput.value = "";
console.log('modalTypeDataList', modalTypeDataList);
//
modalTypeDataList.forEach((item: any) => {
if (item.isShow) {
@ -549,8 +541,6 @@ const handleSendRequest = async (bigObj?: any) => {
index: list && list.length > 0 ? list.length : 0,
});
item.messageList = list;
console.log('listlistlistlist', JSON.parse(JSON.stringify(list)))
handleScrollToBottomID("gjldBox" + item.value);
}
});
@ -560,7 +550,6 @@ const handleSendRequest = async (bigObj?: any) => {
await handleAskDirectlyDeepseek();
return;
}
console.log('pageType.valuepageType.value', pageType.value);
//
if (containsDaping(thisQuestion)) {
@ -575,7 +564,6 @@ const handleSendRequest = async (bigObj?: any) => {
}
if (item.isShow) {
let list: any = item.messageList;
console.log("list", list);
list.push({
role: "default",
content: "",
@ -586,15 +574,8 @@ const handleSendRequest = async (bigObj?: any) => {
}
});
console.log('newRuleTextnewRuleTextnewRuleText', newRuleText.value);
console.log('routerRolerouterRolerouterRolerouterRole', routerRole.value);
console.log('thisQuestionthisQuestionthisQuestionthisQuestion', thisQuestion);
let YNMapData: any = await handleGetYNMapData()
//
mapQuestion = `#云南大屏直接进行路由角色说明解析#<Br/>
#路由角色解析#<Br/>
@ -605,15 +586,9 @@ const handleSendRequest = async (bigObj?: any) => {
${YNMapData}
`;
console.log('mapQuestionmapQuestionmapQuestion', mapQuestion);
for (let i = 0; i < modalTypeDataList.length; i++) {
if (modalTypeDataList[i].isShow) {
let list: any = modalTypeDataList[i].messageList;
console.log('listlistlistlist', JSON.parse(JSON.stringify(list)));
list[list.length - 1] = {
...list[list.length - 1],
content: mapQuestion,
@ -622,15 +597,6 @@ const handleSendRequest = async (bigObj?: any) => {
modalTypeDataList[i].messageList = list;
}
}
console.log('modalTypeDataListmodalTypeDataListmodalTypeDataList', JSON.parse(JSON.stringify(modalTypeDataList)));
// let nowShowIdList: any = [];
// for (let i = 0; i < modalTypeDataList.length; i++) {
// if (modalTypeDataList[i].isShow) {
// nowShowIdList.push(modalTypeDataList[i].value)
// }
// }
// handleOnceMoreModal(nowShowIdList);
return
}
@ -645,7 +611,6 @@ const handleSendRequest = async (bigObj?: any) => {
}
if (item.isShow) {
let list: any = item.messageList;
console.log("list", list);
list.push({
role: "default",
content: "",
@ -661,27 +626,13 @@ const handleSendRequest = async (bigObj?: any) => {
//
await handleNewRuleList();
// id
// let nowValueList: any = []
// if(bigObj.value){
// nowValueList= [bigObj.value]
// }else{
// modalTypeDataList.forEach((item: any) => {
// nowValueList.push(item.value)
// })
// }
for (let i = 0; i < modalTypeDataList.length; i++) {
console.log("modalTypeDataList[i].isShow", modalTypeDataList[i].isShow);
if (modalTypeDataList[i].isShow) {
//
const mapData: any = await RobotDialogueBoxRef.value.handleSubmit(
thisQuestion,
modalTypeDataList[i].value
);
console.log('atatatat', mapData);
//
let userSemanticsIsSuccess: boolean = true;
@ -752,6 +703,10 @@ const handleSendRequest = async (bigObj?: any) => {
let obj: any = JSON.parse(JSON.stringify(subItem));
obj = handleChangObjType(obj);
console.log("obj", obj);
console.log("showColumnsListshowColumnsList", showColumnsList);
console.log("itemitem", item);
if (obj) {
let text: string = handleTableDataToStr(
obj,
@ -770,7 +725,6 @@ const handleSendRequest = async (bigObj?: any) => {
if (item.VHtml && item.VHtml !== "暂无数据") {
allStr += `#id【${item.ruleDetail.ANALYSISRULE_ID}】接口数据如下#<Br/>${item.VHtml}<Br/>`;
} else {
console.log("dataStrdataStrdataStr", dataStr);
allStr += `#id【${item.ruleDetail.ANALYSISRULE_ID}】接口数据如下#<Br/>${dataStr}<Br/>`;
}
let desc: string = `接口意图:${item.ruleDetail.USER_INTENT};接口备注:${item.ruleDetail.ANALYSISRULE_DESC}`;
@ -809,9 +763,6 @@ const handleSendRequest = async (bigObj?: any) => {
userSemanticsIsSuccess = false;
}
console.log('mapQuestionmapQuestionmapQuestion', mapQuestion);
if (
bigObj.value
? modalTypeDataList[i].value === bigObj.value
@ -890,8 +841,6 @@ const handleSendRequest = async (bigObj?: any) => {
});
}
console.log('nowShowIdListnowShowIdListnowShowIdList', nowShowIdList);
// ai
if (omitProcess.value) {
handleOnceMoreModal(nowShowIdList);
@ -992,11 +941,6 @@ const handleUseRoleQuestion = async (bigObj: any, obj: any) => {
return
}
console.log('bigObj3232', bigObj);
//
let mapQuestion: string = "";
let thisQuestion: string = "";
@ -1017,13 +961,11 @@ const handleUseRoleQuestion = async (bigObj: any, obj: any) => {
let lastUserObj: any = userList[userList.length - 1];
console.log("lastUserObj", lastUserObj);
let showBtn: string = "";
// deepseek
let userSemanticsIsSuccess: boolean = true;
const data = await handleGetInterfaceID(lastUserObj.content, bigObj);
console.log("dsadasdasdasdsgas", data);
if (bigObj.messageList && bigObj.messageList.length > 0) {
bigObj.messageList.forEach((item: any) => {
if (item.role === "user") {
@ -1044,7 +986,6 @@ const handleUseRoleQuestion = async (bigObj: any, obj: any) => {
data.question,
bigObj.value
);
console.log("newData3232", newData);
if (newData && newData.length > 0) {
userSemanticsIsSuccess = true;
let allStr: string = "";
@ -1082,8 +1023,6 @@ const handleUseRoleQuestion = async (bigObj: any, obj: any) => {
tabHeader += `<Br/>`;
dataStr += `${tabHeader}`;
}
console.log("tabHeader", tabHeader);
console.log("item.RESPONSE_FIELD", obj);
} else if (item.columns && item.columns.length > 0) {
item.columns.forEach((subItem: any) => {
if (subItem.prop) {
@ -1104,7 +1043,6 @@ const handleUseRoleQuestion = async (bigObj: any, obj: any) => {
}
dataStr += str;
}
console.log("showColumnsList", showColumnsList);
dataStr += `<Br/>`;
}
@ -1113,8 +1051,6 @@ const handleUseRoleQuestion = async (bigObj: any, obj: any) => {
let str: string = "";
let obj: any = JSON.parse(JSON.stringify(subItem));
obj = handleChangObjType(obj);
console.log("handleChangObjType", obj);
if (obj) {
let text: string = handleTableDataToStr(
obj,
@ -1133,7 +1069,6 @@ const handleUseRoleQuestion = async (bigObj: any, obj: any) => {
if (item.VHtml && item.VHtml !== "暂无数据") {
allStr += `#id【${item.ruleDetail.ANALYSISRULE_ID}】接口数据如下#<Br/>${item.VHtml}<Br/>`;
} else {
console.log("dataStrdataStrdataStr", dataStr);
allStr += `#id【${item.ruleDetail.ANALYSISRULE_ID}】接口数据如下#<Br/>${dataStr}<Br/>`;
}
let desc: string = `接口意图:${item.ruleDetail.USER_INTENT};接口备注:${item.ruleDetail.ANALYSISRULE_DESC}`;
@ -1142,7 +1077,6 @@ const handleUseRoleQuestion = async (bigObj: any, obj: any) => {
});
// 驿 id id
let newContent: string = "";
console.log("allStr", allStr);
if (
newData &&
newData.length === 1 &&
@ -1331,26 +1265,6 @@ const handleUseRoleQuestion = async (bigObj: any, obj: any) => {
};
bigObj.messageList = list;
}
// modalTypeDataList.forEach((item: any) => {
// if (item.isShow) {
// let list: any = item.messageList;
// list[list.length - 1] = {
// ...list[list.length - 1],
// content: mapQuestion,
// loading: false,
// loadingContent: null,
// userSemanticsIsSuccess: userSemanticsIsSuccess,
// };
// item.messageList = list;
// }
// });
console.log("mapQuestionmapQuestionmapQuestionmapQuestion", mapQuestion);
console.log(
"mapQuestionmapQuestionmapQuestionmapQuestion",
bigObj.messageList
);
};
//
@ -1371,8 +1285,6 @@ const handleOnceMoreModal = async (typeList: number[]) => {
const handleGetAnswerID = async (obj: any) => {
//
// let responseText: string = "";
console.log("obj2222", obj);
let oldMessage: any = [];
// 3 user
if (
@ -1402,8 +1314,6 @@ const handleGetAnswerID = async (obj: any) => {
});
} else if (obj.messageList && obj.messageList.length >= 2) {
//
console.log("obj.messageList", obj.messageList);
obj.messageList.forEach((item: any, index: number) => {
// if (startFree.value ? item.role === "user" : item.role === "default") {
if (item.role === "default" || item.role === "user") {
@ -1445,8 +1355,6 @@ const handleGetAnswerID = async (obj: any) => {
// }
// });
// }
console.log("oldMessage", oldMessage);
obj.messageList.push({
role: "assistant",
content: "",
@ -1455,7 +1363,6 @@ const handleGetAnswerID = async (obj: any) => {
loadingContent: "深度分析中...",
});
handleScrollToBottomID("gjldBox" + obj.value);
console.log("modalTypeDataList", modalTypeDataList);
//
let hasStreamData: boolean = false;
@ -1463,7 +1370,6 @@ const handleGetAnswerID = async (obj: any) => {
const controller = new AbortController();
controllers.value.push(controller); //
showController.value = true;
console.log("controller", controller);
let timeoutId: any = null; // ID
try {
@ -1510,19 +1416,22 @@ const handleGetAnswerID = async (obj: any) => {
: ""
: obj.value === 4
? "qwen-plus"
: "",
: obj.value === 5
? 'claude-sonnet-4-5'
: '',
messages: [...oldMessage],
stream: true,
max_tokens: maxTokens.value,
stop: ["null"],
temperature: Temperature.value,
top_p: TopP.value,
top_k: TopK.value,
frequency_penalty: FrequencyPenalty.value,
n: 1,
response_format: {
type: "text",
},
// max_tokens: 200000,
// max_tokens: obj.value === 5 ? 200000 : maxTokens.value,
// stop: ["null"],
// temperature: Temperature.value,
// top_p: TopP.value,
// top_k: TopK.value,
// frequency_penalty: FrequencyPenalty.value,
// n: 1,
// response_format: {
// type: "text",
// },
};
const options = {
method: "POST",
@ -1536,12 +1445,30 @@ const handleGetAnswerID = async (obj: any) => {
? "Bearer sk-1aa2c1c672034c6d826ce62d3aebcb47"
: obj.value === 4
? "Bearer sk-1aa2c1c672034c6d826ce62d3aebcb47"
: obj.value === 5
? "Bearer sk-f67d5aae13e14efc8a01e8cd0e665d15"
: "",
"Content-Type": "application/json",
},
body: JSON.stringify(modal),
signal: controller.signal, //
};
let geminiContent: any = []
if (modal.messages && modal.messages.length > 0) {
modal.messages.forEach((item: any, index: number) => {
if (item.role === "user") {
if (index + 1 === modal.messages.length) {
geminiContent.push({
parts: [
{
text: item.content,
}
]
})
}
}
})
}
//
let isSuccess: boolean = false;
const response: any = await fetch(
@ -1553,13 +1480,67 @@ const handleGetAnswerID = async (obj: any) => {
? "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions"
: obj.value === 4
? "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions"
: obj.value === 5
? "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:streamGenerateContent"
: "",
options
obj.value === 5 ? {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-goog-api-key": "AIzaSyAg1lJ8oZL_jMAefrRswIhx5xA8JTOZUTs",
},
body: JSON.stringify({
contents: geminiContent
}),
} : options
);
console.log("response", response);
if (response.status === 200) {
isSuccess = true;
}
if (obj.value === 5) {
//
// const data = await response.json();
const reader = response.body.getReader();
const decoder = new TextDecoder("utf-8");
while (isStreaming) {
const { done, value } = await reader.read();
if (done) break;
const chunk = decoder.decode(value);
let JSONChunk = trimFirstChar(chunk)
JSONChunk = JSONChunk ? JSON.parse(JSONChunk) : ""
handleStreamChunkIDGemini(JSONChunk ? [JSONChunk] : [], obj)
//
let nowShowList: any = [];
if (modalTypeDataList && modalTypeDataList.length > 0) {
modalTypeDataList.forEach((item: any) => {
if (item.isShow) {
nowShowList.push(item);
}
});
}
let index: number = 99999;
let isBottom: any = "default";
if (nowShowList && nowShowList.length > 0) {
nowShowList.forEach((item: any, itemIndex: number) => {
if (item.value === obj.value) {
index = itemIndex;
if (scrollList.value && scrollList.value.length > 0) {
isBottom = scrollList.value[itemIndex].isBottom;
}
}
});
}
if (
index === 99999 ||
isBottom === "default" ||
isBottom === true
) {
handleScrollToBottomID("gjldBox" + obj.value);
}
resolve(true)
}
} else {
//
const reader = response.body.getReader();
const decoder = new TextDecoder("utf-8");
@ -1602,6 +1583,8 @@ const handleGetAnswerID = async (obj: any) => {
resolve(true); // resolve
}
}
// messageList.push({
// role: "assistant",
// content: responseText.value,
@ -1619,14 +1602,11 @@ const handleGetAnswerID = async (obj: any) => {
} finally {
}
}).then((res) => {
console.log("res", res);
hasStreamData = true; //
clearTimeout(timeoutId); //
}),
// handleAiDeepThinking(obj, oldMessage, controller).then((res) => {
// if (res) {
// console.log("", res);
// hasStreamData = true; //
// clearTimeout(timeoutId); //
// }
@ -1739,7 +1719,6 @@ const handleAiDeepThinking = async (
options
);
console.log("response", response);
if (response.status === 200) {
isSuccess = true;
}
@ -1916,7 +1895,6 @@ const handleAnswerText = async (question: string) => {
responseText.value = "";
descResponseText.value = "";
showController.value = false;
console.log("messageList", messageList);
} catch (error: any) {
if (error.name !== "AbortError") {
console.error("流式请求失败:", error);
@ -1927,7 +1905,6 @@ const handleAnswerText = async (question: string) => {
// .then((response) => response.json())
// .then((response) => {
// console.log("response", response);
// let textAnswer = response.choices[0].message.content || "";
// textData.value = textAnswer;
// })
@ -1973,6 +1950,53 @@ const handleStreamChunkID = async (chunk: any, obj: any) => {
});
};
// gemini
const trimFirstChar = (str: string) => {
if (typeof str !== 'string' || str.length === 0) {
return str;
}
const firstChar = str[0];
if (firstChar === '[' || firstChar === ',' || firstChar === ']') {
return str.slice(1);
}
return str;
}
// gemini
const handleStreamChunkIDGemini = async (chunk: any, obj: any) => {
if (!(chunk && chunk.length > 0)) {
return
}
chunk.forEach((line: any) => {
try {
// const parsed = JSON.parse(line);
const parsed = line;
let text = "";
let descText = "";
if (parsed.candidates[0].content.parts[0].text) {
text = parsed.candidates[0].content.parts[0].text || "";
obj.responseText += text; //
}
obj.messageList[obj.messageList.length - 1] = {
...obj.messageList[obj.messageList.length - 1],
content: marked(obj.responseText),
realContent: obj.responseText,
loading: false,
loadingContent: null,
index:
obj.messageList && obj.messageList.length > 0
? obj.messageList.length
: 0,
};
} catch (err) {
}
});
};
//
const handleGetYNMapData = async () => {
let obj: any = {
@ -2078,7 +2102,6 @@ const handleGetDeepseek = async (question: string) => {
}
});
}
console.log("oldMessage", oldMessage);
try {
let modal = {
@ -2128,7 +2151,6 @@ const handleGetDeepseek = async (question: string) => {
// messages: [...oldMessage],
// model: "deepseek-reasoner",
// });
// console.log("completion", completion);
while (isStreaming) {
const { done, value } = await reader.read();
if (done) break;
@ -2211,13 +2233,8 @@ const handleDeepseekScrollToBottom = () => {
//
const handleChangeModalType = (e: any) => {
console.log("e1", e);
console.log("pageType", pageType.value);
console.log("isPhone", isPhone);
let newList: number[] = [];
if (pageType.value === 1 || isPhone.value) {
console.log('1');
if (e && e.length > 1) {
newList = [e[e.length - 1]]
}
@ -2231,7 +2248,6 @@ const handleChangeModalType = (e: any) => {
}
});
} else {
console.log('2');
if (e && e.length > 2) {
e.forEach((item: number, index: number) => {
if (index === 0) {
@ -2244,7 +2260,6 @@ const handleChangeModalType = (e: any) => {
if (!(newList && newList.length > 1)) {
newList = e;
}
console.log('newList', newList);
modalTypeDataList.forEach((item: any) => {
if (newList.indexOf(item.value) !== -1) {
@ -2253,7 +2268,6 @@ const handleChangeModalType = (e: any) => {
item.isShow = false;
}
});
console.log("modalTypeDataList", modalTypeDataList);
}
};
@ -2276,8 +2290,6 @@ const handleStop = () => {
item.descResponseText = "";
}
});
console.log("modalTypeDataList", modalTypeDataList);
showController.value = false;
};
@ -2295,8 +2307,6 @@ const handleChangeVersion = () => {
watch(
() => controllers,
(newVal, oldVal) => {
console.log("newVal", newVal);
console.log("oldVal", oldVal);
},
{ deep: true }
);
@ -2340,8 +2350,6 @@ watch(
//
const handleDepthAnalysis = async (bigObj: any, obj: any) => {
console.log("bigObj", bigObj);
console.log("obj", obj);
handleOnceMoreModal([bigObj.value]);
};
@ -2380,7 +2388,6 @@ const handleGetInterfaceID = async (questionText: string, bigObj: any) => {
// for (let i = 0; i < modalTypeDataList.length; i++) {
// let item: any = modalTypeDataList[i];
// if (item.isShow) {
// console.log("handleGetDeepseekAnswer", item);
// //
// let userQuestion: any = [];
// if (item.messageList && item.messageList.length > 0) {
@ -2393,8 +2400,6 @@ const handleGetInterfaceID = async (questionText: string, bigObj: any) => {
// //
// let lastObj: any = userQuestion[userQuestion.length - 1];
// console.log("lastObj", lastObj);
// }
// }
};
@ -2468,14 +2473,11 @@ const handleGetDeepseekAnswer = async (questionText: string, obj: any) => {
const data = await axios(config);
let id = data.data.choices[0].message.content;
id = fixToJson(id);
console.log("id", id);
let idObj: any = handleChangeJSON(id);
console.log("idObj", idObj);
idObj.idList = idObj.idList.toString();
idObj.idList = handleParseToArray(idObj.idList);
// const arr = handleParseToArray(id);
// console.log("handleGetDeepseekAnswer", arr);
return idObj;
};
@ -2519,7 +2521,6 @@ const fixToJson = (input: any): string | null => {
const handleChangeJSON = (jsonStr: any) => {
try {
jsonStr = jsonStr.replace(/\s+/g, "");
console.log("jsonStr", jsonStr);
let openBraces = (jsonStr.match(/{/g) || []).length;
let closeBraces = (jsonStr.match(/}/g) || []).length;
@ -2567,7 +2568,6 @@ const handleQuestionReload = (obj: any, bigObj: any) => {
if (showController.value || isLoading) {
return;
}
console.log("obj", obj);
userInput.value = obj.content;
handleSendRequest(bigObj);
};
@ -2609,7 +2609,6 @@ const handleScroll = (e: any) => {
// }
// }
// // el.forEach((item: any) => {
// // console.log("item", item);
// // });
// }
@ -2667,7 +2666,6 @@ const handleNewRuleList = async () => {
pagesize: 999999,
PageIndex: 1,
});
console.log("handleNewRuleList", data);
let str: string = "";
if (data && data.length > 0) {
@ -2686,8 +2684,6 @@ const handleNewRuleList = async () => {
`;
newRuleText.value = res;
console.log("res", res);
};
//
@ -2742,7 +2738,6 @@ const handleCopyContent = (bigObj: any) => {
//
const handleChangeProcess = (e: any) => {
console.log("e", e);
modalTypeDataList.forEach((item: any) => {
let nowLength = item.messageList.length;
if (item.messageList && item.messageList.length > 0) {
@ -3001,6 +2996,9 @@ const handleChangeProcess = (e: any) => {
<div class="contentTitle" v-if="item.value === 4 && item.isShow" @click="handleShowPhoneChangeBox">
通义千问
</div>
<div class="contentTitle" v-if="item.value === 5 && item.isShow" @click="handleShowPhoneChangeBox">
Gemini
</div>
<div class="phoneModalSelectBox" v-if="item.isShow && showPhoneChange">
<div class="phoneModal" v-for="(item, index) in modalTypeDataList" :key="index"
@click="handlePhoneChangeModal(item.value)">
@ -3096,7 +3094,8 @@ const handleChangeProcess = (e: any) => {
</div>
</div>
<div class="toolBox">
<div class="toolBox"
:style="{ justifyContent: modalTypeSelect && modalTypeSelect.length === 1 ? 'center' : 'flex-end' }">
<div class="deleteBox" v-if="item.showReload && !showController" style="margin-right: 16px">
<img class="deleteIcon" src="@/assets/ai/reloadSmallIcon.svg" @click="handleBottomReload(item)" />
<span class="deleteText" @click="handleBottomReload(item)">刷新</span>

View File

@ -21,5 +21,11 @@ export default defineConfig({
},
server: {
host: '0.0.0.0',
proxy: {
'/v1': {
target: 'http://localhost:8045',
changeOrigin: true,
}
}
}
});