Commit c7d535ab authored by 周成波's avatar 周成波

update

parent a23e8e21
...@@ -271,6 +271,13 @@ const onAdaptSceneRoles = async () => { ...@@ -271,6 +271,13 @@ const onAdaptSceneRoles = async () => {
}); });
return; return;
} }
if (!form.all_roles) {
ElMessage({
message: `总角色为空`,
type: "error",
});
return;
}
loading.value = true; loading.value = true;
async function processScenes() { async function processScenes() {
for (const item of form.adapt_result_json) { for (const item of form.adapt_result_json) {
...@@ -299,6 +306,13 @@ const onAdaptOneSceneRoles = async (item: any) => { ...@@ -299,6 +306,13 @@ const onAdaptOneSceneRoles = async (item: any) => {
}); });
return; return;
} }
if (!form.all_roles) {
ElMessage({
message: `总角色为空`,
type: "error",
});
return;
}
// 推理角色 // 推理角色
try { try {
if (form.chatgpt_answer_roles.length === 0) { if (form.chatgpt_answer_roles.length === 0) {
...@@ -357,16 +371,22 @@ const onDraw = async () => { ...@@ -357,16 +371,22 @@ const onDraw = async () => {
return; return;
} }
for (const item of form.adapt_result_json) { for (const item of form.adapt_result_json) {
if (!item.场景关键词) {
ElMessage({
message: `分镜 ${item.编号} 场景关键词不能为空`,
type: "error",
});
return;
}
onDrawOne(item); onDrawOne(item);
} }
}; };
const onDrawOne = async (item: any) => { const onDrawOne = async (item: any) => {
item.本镜配图 = "src/assets/loading.gif"; if (!item.场景关键词) {
if (!item.场景关键词 && !item.角色关键词) {
ElMessage({ ElMessage({
message: "英文描述不能为空", message: "场景关键词不能为空",
type: "error", type: "error",
}); });
return; return;
...@@ -377,6 +397,7 @@ const onDrawOne = async (item: any) => { ...@@ -377,6 +397,7 @@ const onDrawOne = async (item: any) => {
console.log(form.task_id) console.log(form.task_id)
} }
try { try {
item.本镜配图 = "src/assets/loading.gif";
// let temp_prompt = "" // let temp_prompt = ""
// if (item.场景描述) {temp_prompt = temp_prompt + `场景描述为:${item.场景描述}\n`}; // if (item.场景描述) {temp_prompt = temp_prompt + `场景描述为:${item.场景描述}\n`};
// if (item.场景关键词) {temp_prompt = temp_prompt + `场景关键词为:${item.场景关键词}\n`}; // if (item.场景关键词) {temp_prompt = temp_prompt + `场景关键词为:${item.场景关键词}\n`};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment