fix: 发布验证
This commit is contained in:
@@ -46,10 +46,10 @@ const canPlanetPublishMxdAndHotArea = function (data) {
|
||||
title: title,
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
content: content,
|
||||
onOk () { },
|
||||
onOk() { },
|
||||
width: "640px",
|
||||
height: "364px",
|
||||
onCancel () { },
|
||||
onCancel() { },
|
||||
class: "test",
|
||||
});
|
||||
}
|
||||
@@ -70,14 +70,13 @@ const canPlanetPublish3D = function (data) {
|
||||
data.questions.forEach((s) => {
|
||||
if (QUESTION_TYPE.contains(s.question_type)) {
|
||||
try {
|
||||
if(s.config.is_three_dimensions && !s.config.scene){
|
||||
if (s.config.is_three_dimensions && !s.config.scene) {
|
||||
canFB = false;
|
||||
qSteams.push(`(${s.title})`);
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn(error)
|
||||
}
|
||||
canFB = false;
|
||||
qSteams.push(`(${s.title})`);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -89,10 +88,10 @@ const canPlanetPublish3D = function (data) {
|
||||
title: title,
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
content: content,
|
||||
onOk () { },
|
||||
onOk() { },
|
||||
width: "640px",
|
||||
height: "364px",
|
||||
onCancel () { },
|
||||
onCancel() { },
|
||||
class: "test",
|
||||
});
|
||||
return;
|
||||
@@ -103,7 +102,7 @@ const canPlanetPublish3D = function (data) {
|
||||
/**
|
||||
* 判断问卷是否可以发布(原本应该后端实现,前端实现会有并发的问题,但后端表示做不了)
|
||||
*/
|
||||
export const canPlanetPublish = async function(sn) {
|
||||
export const canPlanetPublish = async function (sn) {
|
||||
|
||||
let num = window.location.href.indexOf("code=");
|
||||
let code;
|
||||
@@ -114,8 +113,8 @@ export const canPlanetPublish = async function(sn) {
|
||||
}
|
||||
const { data } = await getQuestionList(sn, code);
|
||||
|
||||
if(!canPlanetPublishMxdAndHotArea(data)) return false;
|
||||
if(!canPlanetPublish3D(data)) return false;
|
||||
if (!canPlanetPublishMxdAndHotArea(data)) return false;
|
||||
if (!canPlanetPublish3D(data)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user