feat(Scene): 增加问卷创建的特殊逻辑处理
-为特定场景代码添加创建问卷时的特殊处理逻辑 - 弹出模态框提醒用户需要在敏捷共创模块中选择待测试创意 - 提供自动跳转功能,引导用户到正确的页面进行操作 - 根据当前环境动态生成跳转URL
This commit is contained in:
@@ -60,6 +60,8 @@ import whiteCreate from '@/assets/img/home/whiteCreate.png'
|
||||
import ConceptTest from '@/views/ProjectManage/create/presets/concept/ConceptTest.vue';
|
||||
import PackageTest from '@/views/ProjectManage/create/presets/package/PackageTest.vue';
|
||||
import TasteTest from '@/views/ProjectManage/create/presets/taste/TasteTest.vue';
|
||||
import { Modal } from 'ant-design-vue';
|
||||
import { currentMode } from '@/config';
|
||||
|
||||
const router = useRouter()
|
||||
const conceptTestRef = ref(null);
|
||||
@@ -136,10 +138,37 @@ const createScene = (record,index)=>{
|
||||
snList: record.other?.split(',') || [],
|
||||
sceneCode: '24'
|
||||
});
|
||||
}else{
|
||||
}else if([11, 13, 15, 16, 17, 27, 45, 46].includes(record.code)){
|
||||
if (createRef.value) {
|
||||
createRef.value.createNormalSurvey(record)
|
||||
}
|
||||
}else {
|
||||
Modal.confirm({
|
||||
title: () => '创建问卷',
|
||||
content: () =>
|
||||
'需要在敏捷共创模块【共创管理-测试活动】页面选择待测试创意后再创建问卷,点击“确定”将自动跳转。',
|
||||
onOk() {
|
||||
// 判断环境
|
||||
const iframeUrl = currentMode === 'prod'
|
||||
? 'https://yip.digitalyili.com/iframe/test'
|
||||
: 'https://yip-uat.dctest.digitalyili.com/iframe/test';
|
||||
console.log(currentMode, iframeUrl);
|
||||
// 跳转到产品测试模块
|
||||
// top.open(iframeUrl, '_self')
|
||||
window.top.location.href = iframeUrl;
|
||||
// top.postMessage(
|
||||
// {
|
||||
// code: "", // 状态码,默认传空就行
|
||||
// params: {
|
||||
// routeName: "test", // 主系统vue-router的name
|
||||
// routePath: "iframe/test", // 主系统vue-router的path
|
||||
// iframeUrl, // 目标子系统的完整url
|
||||
// },
|
||||
// },
|
||||
// "*"s
|
||||
// );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user