fix(项目管理): 修复应用设置关联需求校验问题bugs
This commit is contained in:
parent
147379e190
commit
ccda1a8b6b
|
@ -7,7 +7,7 @@
|
|||
@blur="handleBlur"
|
||||
/>
|
||||
<div class="flex flex-row items-center gap-[10px] text-[12px] leading-[16px]">
|
||||
<span class="text-[var(--color-text-4)]">{{ attrs.subDesc }}</span>
|
||||
<span class="mt-2 text-[var(--color-text-4)]">{{ attrs.subDesc }}</span>
|
||||
<a-popover position="rt">
|
||||
<template #title>
|
||||
{{ null }}
|
||||
|
@ -17,7 +17,7 @@
|
|||
<img class="w-full" :src="previewIcon" />
|
||||
</div>
|
||||
</template>
|
||||
<span class="cursor-pointer text-[rgb(var(--primary-5))]">{{ t('project.menu.preview') }}</span>
|
||||
<span class="mt-2 cursor-pointer text-[rgb(var(--primary-5))]">{{ t('project.menu.preview') }}</span>
|
||||
</a-popover>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -19,6 +19,15 @@
|
|||
:virtual-list-props="{ height: 200 }"
|
||||
:placeholder="t('report.detail.api.filterPlaceholder')"
|
||||
>
|
||||
<template #label="{ data }">
|
||||
<a-tooltip
|
||||
:content="`${cascaderOptions.find((item: any) => innerKeyword.includes(item.value))?.label} / ${data.label}`"
|
||||
>
|
||||
<div class="one-line-text inline-flex w-full items-center justify-between pr-[8px]" title="">
|
||||
{{ cascaderOptions.find((item: any) => innerKeyword.includes(item.value))?.label }} / {{ data.label }}
|
||||
</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<template #option="{ data }">
|
||||
<div title="">
|
||||
<a-tooltip :content="t(data.label)">
|
||||
|
|
|
@ -73,10 +73,10 @@
|
|||
<a-form-item field="CRON_EXPRESSION" :label="t('project.menu.CRON_EXPRESSION')">
|
||||
<a-select v-model="form.CRON_EXPRESSION">
|
||||
<a-option v-for="data in frequencyOption" :key="data.value" :value="data.value">
|
||||
<span class="text-[var(--color-text-1)]">
|
||||
{{ data.label }}
|
||||
<span class="text-[var(--color-text-2)]"> {{ data.label }}</span
|
||||
><span class="ml-1 text-[var(--color-text-n4)] hover:text-[rgb(var(--primary-5))]">
|
||||
{{ data.extra }}
|
||||
</span>
|
||||
<span v-if="data.extra" class="text-[var(--color-text-4)]"> {{ data.extra }} </span>
|
||||
</a-option>
|
||||
<!-- <a-option value="custom">
|
||||
<div class="border-t-1 cursor-pointer text-[rgb(var(--primary-5))]">{{
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
v-model:api="fApi"
|
||||
v-model:form-item="platformItem"
|
||||
:form-rule="platformRules"
|
||||
@change="changeHandler"
|
||||
@mounted="handleMounted"
|
||||
/>
|
||||
</a-form>
|
||||
<template v-if="platformOption.length" #footerLeft>
|
||||
|
@ -118,6 +120,7 @@
|
|||
|
||||
const emit = defineEmits<{
|
||||
(e: 'cancel', shouldSearch: boolean): void;
|
||||
(e: 'ok'): void;
|
||||
}>();
|
||||
|
||||
const resetForm = () => {
|
||||
|
@ -167,6 +170,7 @@
|
|||
currentProjectId.value
|
||||
);
|
||||
handleCancel(true);
|
||||
emit('ok');
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(error);
|
||||
|
@ -205,6 +209,26 @@
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 初始化回显字段值
|
||||
*/
|
||||
function setValue() {
|
||||
const tempObj: Record<string, any> = {};
|
||||
platformRules.value.forEach((item) => {
|
||||
tempObj[item.name] = item.value;
|
||||
});
|
||||
fApi.value?.setValue({ ...tempObj });
|
||||
}
|
||||
|
||||
function changeHandler(a: string, formValue: Record<string, any>) {
|
||||
fApi.value.validateField(formValue.field);
|
||||
fApi.value.refreshValidate();
|
||||
}
|
||||
|
||||
function handleMounted() {
|
||||
setValue();
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.visible,
|
||||
(val) => {
|
||||
|
|
|
@ -392,7 +392,11 @@
|
|||
</template>
|
||||
</MsBaseTable>
|
||||
<DefectSync v-model:visible="defectDrawerVisible" @cancel="defectDrawerVisible = false" @ok="initMenuData()" />
|
||||
<RelatedCase v-model:visible="relatedCaseDrawerVisible" @cancel="relatedCaseDrawerVisible = false" />
|
||||
<RelatedCase
|
||||
v-model:visible="relatedCaseDrawerVisible"
|
||||
@cancel="relatedCaseDrawerVisible = false"
|
||||
@ok="initMenuData()"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
@ -727,7 +731,6 @@
|
|||
};
|
||||
|
||||
const handleMenuStatusChange = async (type: string, typeValue: string | boolean, suffix: string) => {
|
||||
debugger;
|
||||
try {
|
||||
let hasAuth = false;
|
||||
switch (suffix) {
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
trigger="click"
|
||||
@popup-visible-change="handleFilterHidden"
|
||||
>
|
||||
<a-button type="text" class="arco-btn-text--secondary p-[8px_4px]" @click="statusFilterVisible = true">
|
||||
<a-button type="text" class="arco-btn-text--secondary p-[8px_4px]" @click.stop="statusFilterVisible = true">
|
||||
<div class="font-medium">
|
||||
{{ t(columnConfig.title as string) }}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue