|
|
|
@ -1680,3 +1680,38 @@ export function checkBusinessFeasibilityStepThree(payload) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return request({ url: "/api/student-training-answers/business-feasibility/step-3/validate", method: "post", data: { reportUrl, reportName }, headers: { repeatSubmit: false } });
|
|
|
|
return request({ url: "/api/student-training-answers/business-feasibility/step-3/validate", method: "post", data: { reportUrl, reportName }, headers: { repeatSubmit: false } });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function checkCompetitiveEnvironmentAnalysisStepOne(payload) {
|
|
|
|
|
|
|
|
const value = payload || {};
|
|
|
|
|
|
|
|
if (isStudentDemo()) {
|
|
|
|
|
|
|
|
if (!["strengths", "weaknesses", "opportunities", "threats"].every((key) => String(value[key] || "").trim())) return Promise.reject(new Error("请完整填写优势、劣势、机会和威胁四类信息"));
|
|
|
|
|
|
|
|
return Promise.resolve({ code: 200, data: { valid: true, message: "校验通过" } });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return request({ url: "/api/student-training-answers/competitive-environment-analysis/step-1/validate", method: "post", data: value, headers: { repeatSubmit: false } });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
export function checkCompetitiveEnvironmentAnalysisStepTwo(payload) {
|
|
|
|
|
|
|
|
const value = payload || {};
|
|
|
|
|
|
|
|
if (isStudentDemo()) {
|
|
|
|
|
|
|
|
if (!["strengths", "weaknesses", "opportunities", "threats"].every((key) => String(value[key] || "").trim())) return Promise.reject(new Error("请为优势、劣势、机会和威胁各补充至少 1 条信息"));
|
|
|
|
|
|
|
|
return Promise.resolve({ code: 200, data: { valid: true, message: "校验通过" } });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return request({ url: "/api/student-training-answers/competitive-environment-analysis/step-2/validate", method: "post", data: value, headers: { repeatSubmit: false } });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
export function checkCompetitiveEnvironmentAnalysisStepThree(payload) {
|
|
|
|
|
|
|
|
const strategies = Array.isArray(payload?.strategies) ? payload.strategies : [];
|
|
|
|
|
|
|
|
if (isStudentDemo()) {
|
|
|
|
|
|
|
|
const types = ["so", "wo", "st", "wt"];
|
|
|
|
|
|
|
|
if (strategies.length !== types.length || types.some((type) => !strategies.some((item) => item?.strategyType === type)) || strategies.some((item) => !String(item?.recommendation || "").trim() || !String(item?.expectedEffect || "").trim())) return Promise.reject(new Error("请完成 SO、WO、ST 和 WT 四类策略及预期效果"));
|
|
|
|
|
|
|
|
return Promise.resolve({ code: 200, data: { valid: true, message: "校验通过" } });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return request({ url: "/api/student-training-answers/competitive-environment-analysis/step-3/validate", method: "post", data: { strategies }, headers: { repeatSubmit: false } });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
export function checkCompetitiveEnvironmentAnalysisStepFour(payload) {
|
|
|
|
|
|
|
|
const value = payload || {}; const priorities = Array.isArray(value.priorities) ? value.priorities : [];
|
|
|
|
|
|
|
|
if (isStudentDemo()) {
|
|
|
|
|
|
|
|
const types = ["so", "wo", "st", "wt"]; const ranks = priorities.map((item) => Number(item?.priority));
|
|
|
|
|
|
|
|
if (priorities.length !== types.length || types.some((type) => !priorities.some((item) => item?.strategyType === type)) || new Set(ranks).size !== 4 || ranks.some((rank) => ![1, 2, 3, 4].includes(rank)) || !String(value.overallEvaluation || "").trim() || priorities.some((item) => !String(item?.reason || "").trim()) || !String(value.coreRiskOne || "").trim() || !String(value.coreRiskTwo || "").trim() || !String(value.conclusion || "").trim()) return Promise.reject(new Error("请完整填写策略优先级、总体判断、风险点和总结结论"));
|
|
|
|
|
|
|
|
return Promise.resolve({ code: 200, data: { valid: true, message: "校验通过" } });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return request({ url: "/api/student-training-answers/competitive-environment-analysis/step-4/validate", method: "post", data: value, headers: { repeatSubmit: false } });
|
|
|
|
|
|
|
|
}
|
|
|
|
|