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