feat:概念测试、口味测试改版;
This commit is contained in:
@@ -28,7 +28,8 @@ async function onActive(item) {
|
||||
<template>
|
||||
<div class="steps">
|
||||
<template v-for="(item, index) in props.list" :key="index">
|
||||
<div v-if="index" class="line"></div>
|
||||
<div v-if="!index" class="placeholder" />
|
||||
<div v-if="index" class="line" />
|
||||
<div
|
||||
class="step"
|
||||
:class="{ active: props.value === item.id, disabled: item.disabled }"
|
||||
@@ -39,6 +40,7 @@ async function onActive(item) {
|
||||
</div>
|
||||
<div class="name">{{ item.name }}</div>
|
||||
</div>
|
||||
<div v-if="index === props.list.length - 1" class="placeholder" />
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
@@ -51,7 +53,11 @@ async function onActive(item) {
|
||||
width: 100%;
|
||||
height: 64px;
|
||||
//margin-bottom: 25px;
|
||||
padding: 0 40px;
|
||||
//padding: 0 40px;
|
||||
|
||||
.placeholder {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.line {
|
||||
align-self: flex-start;
|
||||
|
||||
@@ -78,6 +78,8 @@ const templateSnList = ref([]);
|
||||
|
||||
function onReset() {
|
||||
stepId.value = conceptTypeEnum.basic;
|
||||
expandNewest.value = true;
|
||||
expandStandard.value = true;
|
||||
|
||||
// 标准版
|
||||
newList1.value = [getNewItem(standardNewestEnum.newest), getNewItem(standardNewestEnum.newest)];
|
||||
@@ -128,6 +130,9 @@ function getSnByTestType(type) {
|
||||
function onTestTypeChange(evt) {
|
||||
testType.value = evt.id;
|
||||
templateSn.value = getSnByTestType(evt.id);
|
||||
|
||||
expandNewest.value = true;
|
||||
expandStandard.value = true;
|
||||
}
|
||||
|
||||
function getNewItem(type) {
|
||||
@@ -137,7 +142,7 @@ function getNewItem(type) {
|
||||
key: uuid(),
|
||||
data: {
|
||||
concept_type: type, // 概念类型 0标杆概念 1新品概念
|
||||
// concept_encode: '', // 概念编号
|
||||
concept_encode: '', // 概念编号
|
||||
concept_name: '',
|
||||
concept_url: ''
|
||||
}
|
||||
@@ -193,21 +198,21 @@ function scrollTo(idSelector) {
|
||||
}
|
||||
|
||||
function updateEncode() {
|
||||
// [newList1.value, standardList1.value] = updateEncodeForGroup(
|
||||
// newList1.value,
|
||||
// standardList1.value,
|
||||
// '概念'
|
||||
// );
|
||||
// [newList2.value, standardList2.value] = updateEncodeForGroup(
|
||||
// newList2.value,
|
||||
// standardList2.value,
|
||||
// '概念'
|
||||
// );
|
||||
// [newList3.value, standardList3.value] = updateEncodeForGroup(
|
||||
// newList3.value,
|
||||
// standardList3.value,
|
||||
// '概念'
|
||||
// );
|
||||
[newList1.value, standardList1.value] = updateEncodeForGroup(
|
||||
newList1.value,
|
||||
standardList1.value,
|
||||
'概念'
|
||||
);
|
||||
[newList2.value, standardList2.value] = updateEncodeForGroup(
|
||||
newList2.value,
|
||||
standardList2.value,
|
||||
'概念'
|
||||
);
|
||||
[newList3.value, standardList3.value] = updateEncodeForGroup(
|
||||
newList3.value,
|
||||
standardList3.value,
|
||||
'概念'
|
||||
);
|
||||
}
|
||||
|
||||
function updateEncodeForGroup(list1, list2, prefix = '') {
|
||||
|
||||
@@ -72,6 +72,8 @@ const templateSnList = ref([]);
|
||||
|
||||
function onReset() {
|
||||
stepId.value = tasteTypeEnum.basic;
|
||||
expandNewest.value = true;
|
||||
expandStandard.value = true;
|
||||
|
||||
// 标准版
|
||||
newList1.value = [getNewItem(standardNewestEnum.newest), getNewItem(standardNewestEnum.newest)];
|
||||
@@ -122,6 +124,9 @@ function getSnByTestType(type) {
|
||||
function onTestTypeChange(evt) {
|
||||
testType.value = evt.id;
|
||||
templateSn.value = getSnByTestType(evt.id);
|
||||
|
||||
expandNewest.value = true;
|
||||
expandStandard.value = true;
|
||||
}
|
||||
|
||||
function getNewItem(type) {
|
||||
@@ -131,7 +136,7 @@ function getNewItem(type) {
|
||||
key: uuid(),
|
||||
data: {
|
||||
taste_type: type, // 口味类型 0标杆口味 1新品口味
|
||||
// taste_encode: '', // 口味编号
|
||||
taste_encode: '', // 口味编号
|
||||
taste_name: '', // 口味名称
|
||||
taste_attr_indicator: ['', ''] // 关键属性指标(字符串列表)
|
||||
}
|
||||
@@ -187,21 +192,21 @@ function scrollTo(idSelector) {
|
||||
}
|
||||
|
||||
function updateEncode() {
|
||||
// [newList1.value, standardList1.value] = updateEncodeForGroup(
|
||||
// newList1.value,
|
||||
// standardList1.value,
|
||||
// '口味'
|
||||
// );
|
||||
// [newList2.value, standardList2.value] = updateEncodeForGroup(
|
||||
// newList2.value,
|
||||
// standardList2.value,
|
||||
// '口味'
|
||||
// );
|
||||
// [newList3.value, standardList3.value] = updateEncodeForGroup(
|
||||
// newList3.value,
|
||||
// standardList3.value,
|
||||
// '口味'
|
||||
// );
|
||||
[newList1.value, standardList1.value] = updateEncodeForGroup(
|
||||
newList1.value,
|
||||
standardList1.value,
|
||||
'口味'
|
||||
);
|
||||
[newList2.value, standardList2.value] = updateEncodeForGroup(
|
||||
newList2.value,
|
||||
standardList2.value,
|
||||
'口味'
|
||||
);
|
||||
[newList3.value, standardList3.value] = updateEncodeForGroup(
|
||||
newList3.value,
|
||||
standardList3.value,
|
||||
'口味'
|
||||
);
|
||||
}
|
||||
|
||||
function updateEncodeForGroup(list1, list2, prefix = '') {
|
||||
|
||||
Reference in New Issue
Block a user