fix: 发布验证
This commit is contained in:
@@ -46,10 +46,10 @@ const canPlanetPublishMxdAndHotArea = function (data) {
|
|||||||
title: title,
|
title: title,
|
||||||
icon: createVNode(ExclamationCircleOutlined),
|
icon: createVNode(ExclamationCircleOutlined),
|
||||||
content: content,
|
content: content,
|
||||||
onOk () { },
|
onOk() { },
|
||||||
width: "640px",
|
width: "640px",
|
||||||
height: "364px",
|
height: "364px",
|
||||||
onCancel () { },
|
onCancel() { },
|
||||||
class: "test",
|
class: "test",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -70,14 +70,13 @@ const canPlanetPublish3D = function (data) {
|
|||||||
data.questions.forEach((s) => {
|
data.questions.forEach((s) => {
|
||||||
if (QUESTION_TYPE.contains(s.question_type)) {
|
if (QUESTION_TYPE.contains(s.question_type)) {
|
||||||
try {
|
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})`);
|
qSteams.push(`(${s.title})`);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn(error)
|
console.warn(error)
|
||||||
}
|
}
|
||||||
canFB = false;
|
|
||||||
qSteams.push(`(${s.title})`);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -89,10 +88,10 @@ const canPlanetPublish3D = function (data) {
|
|||||||
title: title,
|
title: title,
|
||||||
icon: createVNode(ExclamationCircleOutlined),
|
icon: createVNode(ExclamationCircleOutlined),
|
||||||
content: content,
|
content: content,
|
||||||
onOk () { },
|
onOk() { },
|
||||||
width: "640px",
|
width: "640px",
|
||||||
height: "364px",
|
height: "364px",
|
||||||
onCancel () { },
|
onCancel() { },
|
||||||
class: "test",
|
class: "test",
|
||||||
});
|
});
|
||||||
return;
|
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 num = window.location.href.indexOf("code=");
|
||||||
let code;
|
let code;
|
||||||
@@ -114,8 +113,8 @@ export const canPlanetPublish = async function(sn) {
|
|||||||
}
|
}
|
||||||
const { data } = await getQuestionList(sn, code);
|
const { data } = await getQuestionList(sn, code);
|
||||||
|
|
||||||
if(!canPlanetPublishMxdAndHotArea(data)) return false;
|
if (!canPlanetPublishMxdAndHotArea(data)) return false;
|
||||||
if(!canPlanetPublish3D(data)) return false;
|
if (!canPlanetPublish3D(data)) return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user