fix(mobile): align sop position label
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<text class="employee-kicker sop-eyebrow">SOP · 话术 · 工作流程</text>
|
||||
<text class="page-title">问</text>
|
||||
<text class="page-subtitle">数字师傅 · SOP问答</text>
|
||||
<text class="sop-context">管家(生活顾问) · 住宅项目</text>
|
||||
<text class="sop-context">{{ positionLabel }} · 住宅项目</text>
|
||||
<text class="toolbar-tip">先把问题问清楚,再按需生成总结卡,不伪造分类能力。</text>
|
||||
</view>
|
||||
|
||||
@@ -205,11 +205,12 @@ import {
|
||||
searchKnowledge,
|
||||
submitAnswerFeedback
|
||||
} from '@/services/knowledge';
|
||||
import { getSelectedPositionProfile, isLoggedIn, rememberLoginRedirect } from '@/services/auth';
|
||||
import { getSelectedPosition, getSelectedPositionProfile, isLoggedIn, rememberLoginRedirect } from '@/services/auth';
|
||||
import { resetPageScroll } from '@/services/navigation';
|
||||
import { ensureEmployeePosition } from '@/services/position';
|
||||
|
||||
const positionProfile = ref(getSelectedPositionProfile());
|
||||
const positionLabel = ref(getSelectedPosition());
|
||||
const quickQuestions = computed(() => positionProfile.value.quickQuestions);
|
||||
const quickQuestionPlaceholder = computed(() => `例如: ${quickQuestions.value[0] || '岗位SOP怎么处理?'}`);
|
||||
const query = ref('');
|
||||
@@ -232,6 +233,7 @@ const resetResultState = () => {
|
||||
|
||||
const refreshAuthState = () => {
|
||||
loggedIn.value = isLoggedIn();
|
||||
positionLabel.value = getSelectedPosition();
|
||||
positionProfile.value = getSelectedPositionProfile();
|
||||
};
|
||||
|
||||
@@ -263,6 +265,7 @@ const search = async () => {
|
||||
return;
|
||||
}
|
||||
positionProfile.value = getSelectedPositionProfile();
|
||||
positionLabel.value = getSelectedPosition();
|
||||
loading.value = true;
|
||||
message.value = '';
|
||||
resetResultState();
|
||||
|
||||
@@ -162,6 +162,15 @@ test('员工练习页显示当前岗位而不是固定生活顾问', async () =>
|
||||
assert.doesNotMatch(source, /scenario-desc">生活顾问 · 业主服务场景/);
|
||||
});
|
||||
|
||||
test('员工问师傅页显示当前岗位而不是固定生活顾问', async () => {
|
||||
const source = await pageSource('../src/pages/user/sop/index.vue');
|
||||
|
||||
assert.match(source, /getSelectedPosition/);
|
||||
assert.match(source, /const positionLabel = ref\(getSelectedPosition\(\)\)/);
|
||||
assert.match(source, /\{\{ positionLabel \}\} · 住宅项目/);
|
||||
assert.doesNotMatch(source, /sop-context">管家(生活顾问) · 住宅项目/);
|
||||
});
|
||||
|
||||
test('训练页最近练过保留派发任务来源', async () => {
|
||||
const source = await pageSource('../src/pages/user/practice/index.vue');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user