fix(全局): bugFix
This commit is contained in:
parent
6ee5557ce8
commit
90d20de060
|
@ -115,7 +115,6 @@ import {
|
|||
DefinitionHistoryItem,
|
||||
DefinitionHistoryPageParams,
|
||||
DefinitionReferencePageParams,
|
||||
Environment,
|
||||
EnvModule,
|
||||
ImportApiDefinitionParams,
|
||||
mockParams,
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
export const GetApiTestListUrl = `/mock/list/menu`;
|
||||
export const GetApiTestList = `/api/definition/page`;
|
|
@ -117,6 +117,16 @@
|
|||
</template>
|
||||
</a-auto-complete>
|
||||
</template>
|
||||
<a-input-number
|
||||
v-else-if="item.inputType === 'inputNumber'"
|
||||
v-model:model-value="record[item.dataIndex as string]"
|
||||
:min="item.min"
|
||||
:max="item.max"
|
||||
></a-input-number>
|
||||
<a-textarea
|
||||
v-else-if="item.inputType === 'textarea'"
|
||||
v-model:model-value="record[item.dataIndex as string]"
|
||||
></a-textarea>
|
||||
<template v-else-if="item.inputType === 'text'">
|
||||
{{
|
||||
typeof item.valueFormat === 'function'
|
||||
|
@ -188,9 +198,23 @@
|
|||
export interface FormTableColumn extends MsTableColumnData {
|
||||
enable?: boolean; // 是否启用
|
||||
required?: boolean; // 是否必填
|
||||
inputType?: 'input' | 'select' | 'tags' | 'switch' | 'text' | 'checkbox' | 'autoComplete'; // 输入组件类型
|
||||
inputType?:
|
||||
| 'input'
|
||||
| 'select'
|
||||
| 'tags'
|
||||
| 'switch'
|
||||
| 'text'
|
||||
| 'checkbox'
|
||||
| 'autoComplete'
|
||||
| 'textarea'
|
||||
| 'inputNumber'; // 输入组件类型
|
||||
autoCompleteParams?: SelectOptionData[]; // 自动补全参数
|
||||
needValidRepeat?: boolean; // 是否需要判断重复
|
||||
maxLength?: number;
|
||||
// 数字输入框属性
|
||||
min?: number;
|
||||
max?: number;
|
||||
step?: number;
|
||||
valueFormat?: (record: Record<string, any>) => string; // 展示值格式化,仅在inputType为text时生效
|
||||
[key: string]: any; // 扩展属性
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ export const pathMap: PathMapItem[] = [
|
|||
level: MENU_LEVEL[2],
|
||||
},
|
||||
{
|
||||
key: 'API_TEST_SCENARIO_RECYCLE', // 接口测试-场景-回收站
|
||||
key: 'API_TEST_SCENARIO_MANAGEMENT_RECYCLE', // 接口测试-场景-回收站
|
||||
locale: 'menu.apiTest.scenario.recycle',
|
||||
route: RouteEnum.API_TEST_SCENARIO_RECYCLE,
|
||||
permission: [],
|
||||
|
|
|
@ -634,15 +634,7 @@
|
|||
);
|
||||
|
||||
watch(
|
||||
() => props.activeModule,
|
||||
() => {
|
||||
resetSelector();
|
||||
loadApiList(true);
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props.selectedProtocols,
|
||||
() => [props.activeModule, props.selectedProtocols],
|
||||
() => {
|
||||
resetSelector();
|
||||
loadApiList(true);
|
||||
|
@ -664,7 +656,6 @@
|
|||
|
||||
onBeforeMount(() => {
|
||||
initProtocolList();
|
||||
loadApiList(true);
|
||||
});
|
||||
|
||||
const tableSelected = ref<(string | number)[]>([]);
|
||||
|
|
|
@ -85,9 +85,11 @@
|
|||
import { ModuleTreeNode } from '@/models/common';
|
||||
import { ApiTestRouteEnum } from '@/enums/routeEnum';
|
||||
|
||||
const appStore = useAppStore();
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
|
||||
const activeModule = ref<string>('all');
|
||||
const folderTree = ref<ModuleTreeNode[]>([]);
|
||||
const folderTreePathMap = ref<Record<string, any>>({});
|
||||
|
@ -98,12 +100,6 @@
|
|||
const moduleTreeRef = ref<InstanceType<typeof moduleTree>>();
|
||||
const managementRef = ref<InstanceType<typeof management>>();
|
||||
|
||||
function handleModuleInit(tree: ModuleTreeNode[], _protocols: string[], pathMap: Record<string, any>) {
|
||||
folderTree.value = tree;
|
||||
selectedProtocols.value = _protocols;
|
||||
folderTreePathMap.value = pathMap;
|
||||
}
|
||||
|
||||
function newApi() {
|
||||
importDrawerVisible.value = false;
|
||||
managementRef.value?.newTab();
|
||||
|
@ -132,7 +128,6 @@
|
|||
selectedProtocols.value = val;
|
||||
}
|
||||
|
||||
const appStore = useAppStore();
|
||||
const recycleModulesCount = ref(0);
|
||||
async function selectRecycleCount() {
|
||||
const res = await getTrashModuleCount({
|
||||
|
@ -144,6 +139,13 @@
|
|||
recycleModulesCount.value = res.all;
|
||||
}
|
||||
|
||||
function handleModuleInit(tree: ModuleTreeNode[], _protocols: string[], pathMap: Record<string, any>) {
|
||||
folderTree.value = tree;
|
||||
selectedProtocols.value = _protocols;
|
||||
folderTreePathMap.value = pathMap;
|
||||
selectRecycleCount();
|
||||
}
|
||||
|
||||
async function refreshModuleTree() {
|
||||
await moduleTreeRef.value?.refresh();
|
||||
// 涉及到模块树的刷新操作(比如删除),也会刷新回收站的数量
|
||||
|
@ -179,7 +181,6 @@
|
|||
// 携带 cId 参数,自动打开接口用例详情 tab
|
||||
managementRef.value?.newCaseTab(route.query.cId as string);
|
||||
}
|
||||
selectRecycleCount();
|
||||
});
|
||||
|
||||
// 获取激活用例类型样式
|
||||
|
|
|
@ -57,6 +57,25 @@
|
|||
:status="record.lastReportStatus"
|
||||
/>
|
||||
</template>
|
||||
<template #operation="{ record }">
|
||||
<MsButton
|
||||
v-permission="['PROJECT_API_SCENARIO:READ+DELETE']"
|
||||
type="text"
|
||||
class="!mr-0"
|
||||
@click="recover(record)"
|
||||
>
|
||||
{{ t('api_scenario.recycle.recover') }}
|
||||
</MsButton>
|
||||
<a-divider v-permission="['PROJECT_API_SCENARIO:READ+DELETE']" direction="vertical" :margin="8"></a-divider>
|
||||
<MsButton
|
||||
v-permission="['PROJECT_API_SCENARIO:READ+DELETE']"
|
||||
type="text"
|
||||
class="!mr-0"
|
||||
@click="deleteOperation(record)"
|
||||
>
|
||||
{{ t('api_scenario.recycle.batchCleanOut') }}
|
||||
</MsButton>
|
||||
</template>
|
||||
</ms-base-table>
|
||||
</a-spin>
|
||||
</div>
|
||||
|
@ -510,15 +529,12 @@
|
|||
:deep(.param-input:not(.arco-input-focus, .arco-select-view-focus)) {
|
||||
&:not(:hover) {
|
||||
border-color: transparent !important;
|
||||
|
||||
.arco-input::placeholder {
|
||||
@apply invisible;
|
||||
}
|
||||
|
||||
.arco-select-view-icon {
|
||||
@apply invisible;
|
||||
}
|
||||
|
||||
.arco-select-view-value {
|
||||
color: var(--color-text-brand);
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
v-model:form-rule="innerFormRules"
|
||||
class="w-full"
|
||||
:option="options"
|
||||
:disabled="!hasAnyPermission(['PROJECT_BUG:READ+UPDATE'])"
|
||||
@change="handelFormCreateChange"
|
||||
/>
|
||||
<!-- 自定义字段结束 -->
|
||||
|
@ -53,7 +54,6 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import { cloneDeep, debounce } from 'lodash-es';
|
||||
|
||||
|
@ -163,6 +163,7 @@
|
|||
}
|
||||
});
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(error);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
|
|
|
@ -82,7 +82,11 @@
|
|||
<MsIcon type="icon-icon_copy_filled" class="font-[16px]" />
|
||||
{{ t('common.copy') }}
|
||||
</a-doption>
|
||||
<a-doption class="error-6 text-[rgb(var(--danger-6))]" @click="deleteHandler">
|
||||
<a-doption
|
||||
v-permission="['PROJECT_BUG:READ+DELETE']"
|
||||
class="error-6 text-[rgb(var(--danger-6))]"
|
||||
@click="deleteHandler"
|
||||
>
|
||||
<MsIcon type="icon-icon_delete-trash_outlined" class="font-[16px] text-[rgb(var(--danger-6))]" />
|
||||
{{ t('common.delete') }}
|
||||
</a-doption>
|
||||
|
|
Loading…
Reference in New Issue