fix(功能用例&测试计划): 脑图评审的评审富文本&测试计划详情用例详情的开始执行富文本
--bug=1044182 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001044182
This commit is contained in:
parent
ea09ed03c4
commit
ec358a705a
|
@ -24,8 +24,9 @@
|
||||||
:ok-text="t('caseManagement.caseReview.commitResult')"
|
:ok-text="t('caseManagement.caseReview.commitResult')"
|
||||||
:ok-button-props="{ disabled: submitDisabled }"
|
:ok-button-props="{ disabled: submitDisabled }"
|
||||||
@before-ok="submit"
|
@before-ok="submit"
|
||||||
|
@cancel="cancel"
|
||||||
>
|
>
|
||||||
<ReviewForm v-model:form="form" />
|
<ReviewForm v-model:form="dialogForm" />
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -33,6 +34,7 @@
|
||||||
import { nextTick, onMounted, ref, watch } from 'vue';
|
import { nextTick, onMounted, ref, watch } from 'vue';
|
||||||
import { useEventListener } from '@vueuse/core';
|
import { useEventListener } from '@vueuse/core';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
|
import { cloneDeep } from 'lodash-es';
|
||||||
|
|
||||||
import type { MinderJsonNode } from '@/components/pure/ms-minder-editor/props';
|
import type { MinderJsonNode } from '@/components/pure/ms-minder-editor/props';
|
||||||
import { getMinderOperationParams } from '@/components/business/ms-minders/caseReviewMinder/utils';
|
import { getMinderOperationParams } from '@/components/business/ms-minders/caseReviewMinder/utils';
|
||||||
|
@ -67,6 +69,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
const form = ref({ ...defaultForm });
|
const form = ref({ ...defaultForm });
|
||||||
|
const dialogForm = ref({ ...defaultForm });
|
||||||
|
|
||||||
const modalVisible = ref(false);
|
const modalVisible = ref(false);
|
||||||
const submitLoading = ref(false);
|
const submitLoading = ref(false);
|
||||||
|
@ -82,6 +85,7 @@
|
||||||
const editorContent = document.querySelector('.execute-form')?.querySelector('.editor-content');
|
const editorContent = document.querySelector('.execute-form')?.querySelector('.editor-content');
|
||||||
useEventListener(editorContent, 'dblclick', () => {
|
useEventListener(editorContent, 'dblclick', () => {
|
||||||
modalVisible.value = true;
|
modalVisible.value = true;
|
||||||
|
dialogForm.value = cloneDeep(form.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -93,6 +97,14 @@
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
function cancel(e: Event) {
|
||||||
|
// 点击取消/关闭,弹窗关闭,富文本内容都清空;点击空白处,弹窗关闭,将弹窗内容填入下面富文本内容里
|
||||||
|
if (!(e.target as any)?.classList.contains('arco-modal-wrapper')) {
|
||||||
|
dialogForm.value = { ...defaultForm };
|
||||||
|
}
|
||||||
|
form.value = cloneDeep(dialogForm.value);
|
||||||
|
}
|
||||||
|
|
||||||
// 提交执行
|
// 提交执行
|
||||||
async function submit() {
|
async function submit() {
|
||||||
try {
|
try {
|
||||||
|
@ -102,7 +114,7 @@
|
||||||
userId: props.userId,
|
userId: props.userId,
|
||||||
reviewId: props.reviewId,
|
reviewId: props.reviewId,
|
||||||
reviewPassRule: props.reviewPassRule,
|
reviewPassRule: props.reviewPassRule,
|
||||||
...form.value,
|
...(modalVisible.value ? dialogForm.value : form.value),
|
||||||
notifier: form.value.notifiers?.join(';') ?? '',
|
notifier: form.value.notifiers?.join(';') ?? '',
|
||||||
...getMinderOperationParams(props.selectNode),
|
...getMinderOperationParams(props.selectNode),
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,8 +14,9 @@
|
||||||
:ok-loading="submitLoading"
|
:ok-loading="submitLoading"
|
||||||
:ok-text="t('caseManagement.caseReview.commitResult')"
|
:ok-text="t('caseManagement.caseReview.commitResult')"
|
||||||
@before-ok="submit"
|
@before-ok="submit"
|
||||||
|
@cancel="cancel"
|
||||||
>
|
>
|
||||||
<ExecuteForm v-model:form="form" />
|
<ExecuteForm v-model:form="dialogForm" />
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -23,6 +24,7 @@
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useEventListener } from '@vueuse/core';
|
import { useEventListener } from '@vueuse/core';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
|
import { cloneDeep } from 'lodash-es';
|
||||||
|
|
||||||
import ExecuteForm from '@/views/test-plan/testPlan/detail/featureCase/components/executeForm.vue';
|
import ExecuteForm from '@/views/test-plan/testPlan/detail/featureCase/components/executeForm.vue';
|
||||||
|
|
||||||
|
@ -50,6 +52,7 @@
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
|
|
||||||
const form = ref<ExecuteFeatureCaseFormParams>({ ...defaultExecuteForm });
|
const form = ref<ExecuteFeatureCaseFormParams>({ ...defaultExecuteForm });
|
||||||
|
const dialogForm = ref<ExecuteFeatureCaseFormParams>({ ...defaultExecuteForm });
|
||||||
|
|
||||||
const modalVisible = ref(false);
|
const modalVisible = ref(false);
|
||||||
const submitLoading = ref(false);
|
const submitLoading = ref(false);
|
||||||
|
@ -60,6 +63,7 @@
|
||||||
const editorContent = document.querySelector('.execute-form')?.querySelector('.editor-content');
|
const editorContent = document.querySelector('.execute-form')?.querySelector('.editor-content');
|
||||||
useEventListener(editorContent, 'dblclick', () => {
|
useEventListener(editorContent, 'dblclick', () => {
|
||||||
modalVisible.value = true;
|
modalVisible.value = true;
|
||||||
|
dialogForm.value = cloneDeep(form.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -86,6 +90,14 @@
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
function cancel(e: Event) {
|
||||||
|
// 点击取消/关闭,弹窗关闭,富文本内容都清空;点击空白处,弹窗关闭,将弹窗内容填入下面富文本内容里
|
||||||
|
if (!(e.target as any)?.classList.contains('arco-modal-wrapper')) {
|
||||||
|
dialogForm.value = { ...defaultExecuteForm };
|
||||||
|
}
|
||||||
|
form.value = cloneDeep(dialogForm.value);
|
||||||
|
}
|
||||||
|
|
||||||
// 提交执行
|
// 提交执行
|
||||||
async function submit() {
|
async function submit() {
|
||||||
try {
|
try {
|
||||||
|
@ -95,7 +107,7 @@
|
||||||
caseId: props.caseId,
|
caseId: props.caseId,
|
||||||
testPlanId: props.testPlanId,
|
testPlanId: props.testPlanId,
|
||||||
id: props.id,
|
id: props.id,
|
||||||
...form.value,
|
...(modalVisible.value ? dialogForm.value : form.value),
|
||||||
stepsExecResult: JSON.stringify(props.stepExecutionResult) ?? '',
|
stepsExecResult: JSON.stringify(props.stepExecutionResult) ?? '',
|
||||||
notifier: form.value?.commentIds?.join(';'),
|
notifier: form.value?.commentIds?.join(';'),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue