fix: 修复实训8查看跳转

bugfix/ai-assessment-evidence-rescore
陈沅 1 month ago
parent e8c1f08640
commit 6c1a9f1ce9

@ -283,6 +283,7 @@
<script setup> <script setup>
import { computed, getCurrentInstance, nextTick, onMounted, ref } from "vue"; import { computed, getCurrentInstance, nextTick, onMounted, ref } from "vue";
import { useRouter } from "vue-router";
import { ArrowLeft, ArrowRight, CircleCheck, Document, Download, Upload } from "@element-plus/icons-vue"; import { ArrowLeft, ArrowRight, CircleCheck, Document, Download, Upload } from "@element-plus/icons-vue";
import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue"; import TrainingAiSidebar from "@/views/components/TrainingAiSidebar.vue";
import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue"; import TrainingMaterialButton from "@/views/components/TrainingMaterialButton.vue";
@ -296,6 +297,7 @@ const QUESTIONNAIRE_TEMPLATE_URL = "/file/training-materials/consumer-behavior/9
const KANO_NEED_LIMIT = 20; const KANO_NEED_LIMIT = 20;
let questionnaireQuestionSequence = 0; let questionnaireQuestionSequence = 0;
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const router = useRouter();
const defaultRequirement = "消费者需求与行为分析用于识别目标用户的购买动机、决策因素、渠道偏好和使用场景,为智能产品功能设计与市场切入提供依据。"; const defaultRequirement = "消费者需求与行为分析用于识别目标用户的购买动机、决策因素、渠道偏好和使用场景,为智能产品功能设计与市场切入提供依据。";
const defaultBackground = const defaultBackground =
@ -715,7 +717,7 @@ function triggerQuestionnaireImport() {
} }
function viewTargetUserProfile() { function viewTargetUserProfile() {
window.open("/demand/people", "_blank", "noopener"); router.push({ path: "/demand/people" });
} }
async function handleFileChange(event) { async function handleFileChange(event) {
@ -1303,6 +1305,11 @@ function downloadSurveyReportTemplate() {
gap: 14px; gap: 14px;
} }
.hypothesis-actions {
grid-column: 1 / -1;
grid-row: 2;
}
.hypothesis-actions :deep(.hypothesis-action), .hypothesis-actions :deep(.hypothesis-action),
.kano-actions :deep(.hypothesis-action), .kano-actions :deep(.hypothesis-action),
.training-eight-action { .training-eight-action {
@ -1326,7 +1333,9 @@ function downloadSurveyReportTemplate() {
.training-eight-action { .training-eight-action {
grid-column: 2; grid-column: 2;
grid-row: 1; grid-row: 1;
min-width: 136px; justify-self: end;
min-width: 124px;
height: 38px;
} }
.target-hypothesis-table-wrap { .target-hypothesis-table-wrap {

@ -0,0 +1,20 @@
const fs = require("node:fs");
const path = require("node:path");
const test = require("node:test");
const assert = require("node:assert/strict");
const source = fs.readFileSync(
path.resolve(__dirname, "../src/views/demand/consumer-behavior.vue"),
"utf8"
);
test("查看实训8通过应用路由在当前会话内打开目标用户画像", () => {
assert.match(source, /import \{[^}]*useRouter[^}]*\} from "vue-router";/);
assert.match(source, /const router = useRouter\(\);/);
assert.match(source, /function viewTargetUserProfile\(\) \{\s*router\.push\(\{ path: "\/demand\/people" \}\);\s*\}/);
assert.doesNotMatch(source, /window\.open\("\/demand\/people"/);
});
test("查看实训8按钮在说明区右侧采用紧凑尺寸", () => {
assert.match(source, /\.training-eight-action \{\s*grid-column: 2;\s*grid-row: 1;\s*justify-self: end;\s*min-width: 124px;\s*height: 38px;/);
});
Loading…
Cancel
Save