fix: 修改用例管理&缺陷管理重复保存问题&三方插件密码框首次全选不能删除问题

This commit is contained in:
xinxin.wu 2024-05-23 17:05:37 +08:00 committed by 刘瑞斌
parent 8c6358f314
commit ed4c575729
4 changed files with 36 additions and 29 deletions

View File

@ -56,11 +56,18 @@
</div>
<slot name="footerRight">
<div class="flex justify-end gap-[16px]">
<a-button type="secondary" @click="back">{{ t('mscard.defaultCancelText') }}</a-button>
<a-button v-if="!props.hideContinue && !props.isEdit" type="secondary" @click="emit('saveAndContinue')">
<a-button :disabled="props.loading" type="secondary" @click="back">{{
t('mscard.defaultCancelText')
}}</a-button>
<a-button
v-if="!props.hideContinue && !props.isEdit"
:loading="props.loading"
type="secondary"
@click="emit('saveAndContinue')"
>
{{ props.saveAndContinueText || t('mscard.defaultSaveAndContinueText') }}
</a-button>
<a-button type="primary" @click="emit('save')">
<a-button :loading="props.loading" type="primary" @click="emit('save')">
{{ props.saveText || t(props.isEdit ? 'mscard.defaultUpdate' : 'mscard.defaultConfirm') }}
</a-button>
</div>

View File

@ -1,23 +1,12 @@
<template>
<a-input
<a-input-password
v-model="inputValue"
:max-length="255"
:type="isShowPassword ? 'password' : 'text'"
:placeholder="placeholder"
style="width: 100%"
autocomplete="username"
:default-visibility="false"
allow-clear
@clear="clearHandler"
>
<template #suffix>
<span v-if="!isShowPassword" @click="togglePasswordVisibility">
<icon-eye />
</span>
<span v-else>
<icon-eye-invisible @click="togglePasswordVisibility" />
</span>
</template>
</a-input>
@input="inputHandler"
/>
</template>
<script setup lang="ts">
@ -44,10 +33,10 @@
emits('update:modelValue', inputValue.value);
}
const isShowPassword = ref<boolean>(true);
const togglePasswordVisibility = () => {
isShowPassword.value = !isShowPassword.value;
};
function inputHandler(value: string) {
inputValue.value = value;
emits('update:modelValue', inputValue.value);
}
</script>
<style scoped></style>

View File

@ -16,14 +16,16 @@
/>
<template #footerRight>
<div class="flex justify-end gap-[16px]">
<a-button type="secondary" @click="cancelHandler">{{ t('mscard.defaultCancelText') }}</a-button>
<a-button v-if="!isEdit" type="secondary" @click="saveHandler(true)">
<a-button :disabled="loading" type="secondary" @click="cancelHandler">{{
t('mscard.defaultCancelText')
}}</a-button>
<a-button v-if="!isEdit" :loading="loading" type="secondary" @click="saveHandler(true)">
{{ t('mscard.defaultSaveAndContinueText') }}
</a-button>
<a-button v-if="!isFormReviewCase" type="primary" @click="saveHandler(false)">
<a-button v-if="!isFormReviewCase" :loading="loading" type="primary" @click="saveHandler(false)">
{{ okText }}
</a-button>
<a-button v-if="isFormReviewCase" type="primary" @click="saveHandler(false, true)">
<a-button v-if="isFormReviewCase" :loading="loading" type="primary" @click="saveHandler(false, true)">
{{ t('caseManagement.featureCase.createAndLink') }}
</a-button>
</div>

View File

@ -186,7 +186,11 @@
<template #operation="{ record }">
<div class="flex items-center">
<div
v-if="record.functionalCaseCount > 0 && hasAnyPermission(['PROJECT_TEST_PLAN:READ+EXECUTE'])"
v-if="
record.functionalCaseCount > 0 &&
hasAnyPermission(['PROJECT_TEST_PLAN:READ+EXECUTE']) &&
record.status !== 'ARCHIVED'
"
class="flex items-center"
>
<MsButton class="!mx-0" @click="openDetail(record.id)">{{ t('testPlan.testPlanIndex.execution') }}</MsButton>
@ -269,7 +273,7 @@
<script setup lang="ts">
import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { useRoute, useRouter } from 'vue-router';
import { Message } from '@arco-design/web-vue';
import { cloneDeep } from 'lodash-es';
import dayjs from 'dayjs';
@ -321,6 +325,7 @@
const tableStore = useTableStore();
const appStore = useAppStore();
const router = useRouter();
const route = useRoute();
const { t } = useI18n();
const { openModal } = useModal();
@ -565,7 +570,8 @@
function getMoreActions(status: planStatusType, useCount: number) {
//
const copyAction = useCount > 0 && hasAnyPermission(['PROJECT_TEST_PLAN:READ+ADD']) ? copyActions : [];
const copyAction =
useCount > 0 && hasAnyPermission(['PROJECT_TEST_PLAN:READ+ADD']) && status !== 'ARCHIVED' ? copyActions : [];
//
if (status === 'ARCHIVED' || status === 'PREPARED' || status === 'UNDERWAY') {
return [
@ -996,6 +1002,9 @@
);
onBeforeMount(() => {
if (route.query.id) {
openDetail(route.query.id as string);
}
fetchData();
});