refactor(接口测试): 协议记住方式优化&删除冗余代码
This commit is contained in:
parent
40bdb9fe2e
commit
5a0a301fec
|
@ -148,7 +148,6 @@
|
|||
v-model:keyword="keyword"
|
||||
:filter-config-list="[]"
|
||||
:custom-fields-config-list="[]"
|
||||
:row-count="0"
|
||||
:search-placeholder="searchPlaceholder"
|
||||
@keyword-search="loadCaseList"
|
||||
@adv-search="loadCaseList"
|
||||
|
|
|
@ -106,7 +106,6 @@
|
|||
v-model:keyword="keyword"
|
||||
:filter-config-list="filterConfigList"
|
||||
:custom-fields-config-list="searchCustomFields"
|
||||
:row-count="filterRowCount"
|
||||
:search-placeholder="t('caseManagement.featureCase.searchByNameAndId')"
|
||||
@keyword-search="searchCase"
|
||||
@adv-search="searchCase"
|
||||
|
@ -280,7 +279,6 @@
|
|||
|
||||
const activeFolder = ref('all');
|
||||
const activeFolderName = ref(t('ms.case.associate.allCase'));
|
||||
const filterRowCount = ref(0);
|
||||
|
||||
const moduleKeyword = ref('');
|
||||
const folderTree = ref<ModuleTreeNode[]>([]);
|
||||
|
|
|
@ -63,7 +63,6 @@
|
|||
v-model:keyword="keyword"
|
||||
:filter-config-list="filterConfigList"
|
||||
:custom-fields-config-list="searchCustomFields"
|
||||
:row-count="filterRowCount"
|
||||
:search-placeholder="t('project.commonScript.searchPlaceholder')"
|
||||
@keyword-search="searchCase"
|
||||
@adv-search="searchCase"
|
||||
|
@ -183,7 +182,6 @@
|
|||
const filterConfigList = ref<FilterFormItem[]>([]);
|
||||
const searchCustomFields = ref<FilterFormItem[]>([]);
|
||||
const combine = ref<Record<string, any>>({});
|
||||
const filterRowCount = ref(0);
|
||||
const columns: MsTableColumn = [
|
||||
{
|
||||
title: 'ID',
|
||||
|
|
|
@ -147,7 +147,9 @@
|
|||
watch(
|
||||
() => selectedProtocols.value,
|
||||
(val) => {
|
||||
setLocalStorage(props.protocolKey, val);
|
||||
// 存储取消的项
|
||||
const protocols = allProtocolList.value.filter((item) => !val.includes(item as string));
|
||||
setLocalStorage(props.protocolKey, protocols);
|
||||
emit('selectedProtocolsChange');
|
||||
protocolIsEmptyVisible.value = !val.length;
|
||||
}
|
||||
|
@ -171,7 +173,7 @@
|
|||
if (!protocols) {
|
||||
selectedProtocols.value = allProtocolList.value;
|
||||
} else {
|
||||
selectedProtocols.value = allProtocolList.value.filter((item) => protocols.includes(item as string));
|
||||
selectedProtocols.value = allProtocolList.value.filter((item) => !protocols.includes(item as string));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
v-model:keyword="keyword"
|
||||
:search-placeholder="t('caseManagement.featureCase.searchByNameAndId')"
|
||||
:filter-config-list="filterConfigList"
|
||||
:row-count="filterRowCount"
|
||||
@keyword-search="fetchData"
|
||||
@refresh="searchData"
|
||||
>
|
||||
|
@ -217,7 +216,6 @@
|
|||
const appStore = useAppStore();
|
||||
const projectId = computed(() => appStore.currentProjectId);
|
||||
const filterVisible = ref(false);
|
||||
const filterRowCount = ref(0);
|
||||
const syncVisible = ref(false);
|
||||
const exportVisible = ref(false);
|
||||
const exportOptionData = ref<MsExportDrawerMap>({});
|
||||
|
@ -271,8 +269,6 @@
|
|||
},
|
||||
]);
|
||||
|
||||
const heightUsed = computed(() => 286 + (filterVisible.value ? 160 + (filterRowCount.value - 1) * 60 : 0));
|
||||
|
||||
// 获取自定义字段
|
||||
const getCustomFieldColumns = async () => {
|
||||
const res = await getCustomFieldHeader(projectId.value);
|
||||
|
@ -431,15 +427,14 @@
|
|||
},
|
||||
];
|
||||
|
||||
const { propsRes, propsEvent, setKeyword, setAdvanceFilter, setLoadListParams, setProps, resetSelector, loadList } =
|
||||
useTable(
|
||||
const { propsRes, propsEvent, setKeyword, setAdvanceFilter, setLoadListParams, resetSelector, loadList } = useTable(
|
||||
getBugList,
|
||||
{
|
||||
tableKey: TableKeyEnum.BUG_MANAGEMENT,
|
||||
selectable: true,
|
||||
noDisable: false,
|
||||
showSetting: true,
|
||||
heightUsed: 106,
|
||||
heightUsed: 256,
|
||||
paginationSize: 'mini',
|
||||
},
|
||||
(record: TableData) => ({
|
||||
|
@ -749,10 +744,6 @@
|
|||
sort.value = sortObj;
|
||||
}
|
||||
|
||||
watchEffect(() => {
|
||||
setProps({ heightUsed: heightUsed.value });
|
||||
});
|
||||
|
||||
onBeforeMount(() => {
|
||||
// 进入页面时检查当前项目轮训状态
|
||||
checkSyncStatus();
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
v-model:keyword="keyword"
|
||||
:search-placeholder="t('bugManagement.recycle.searchPlaceholder')"
|
||||
:filter-config-list="filterConfigList"
|
||||
:row-count="filterRowCount"
|
||||
@keyword-search="fetchData"
|
||||
@refresh="searchData"
|
||||
>
|
||||
|
@ -90,8 +89,6 @@
|
|||
const tableStore = useTableStore();
|
||||
const appStore = useAppStore();
|
||||
const projectId = computed(() => appStore.currentProjectId);
|
||||
const filterVisible = ref(false);
|
||||
const filterRowCount = ref(0);
|
||||
const keyword = ref('');
|
||||
// 自定义字段
|
||||
const customFields = ref<BugEditCustomField[]>([]);
|
||||
|
@ -116,8 +113,6 @@
|
|||
const severityFilterOptions = ref<BugOptionItem[]>([]);
|
||||
const currentSelectParams = ref<BatchActionQueryParams>({ selectAll: false, currentSelectCount: 0 });
|
||||
|
||||
const heightUsed = computed(() => 286 + (filterVisible.value ? 160 + (filterRowCount.value - 1) * 60 : 0));
|
||||
|
||||
let columns: MsTableColumn = [
|
||||
{
|
||||
title: 'bugManagement.recycle.deleteTime',
|
||||
|
@ -283,8 +278,7 @@
|
|||
return customFieldToColumns(res);
|
||||
};
|
||||
|
||||
const { propsRes, propsEvent, loadList, setKeyword, setLoadListParams, setProps, resetSelector, resetFilterParams } =
|
||||
useTable(
|
||||
const { propsRes, propsEvent, loadList, setKeyword, setLoadListParams, resetSelector, resetFilterParams } = useTable(
|
||||
getRecycleList,
|
||||
{
|
||||
tableKey: TableKeyEnum.BUG_MANAGEMENT_RECYCLE,
|
||||
|
@ -318,10 +312,6 @@
|
|||
],
|
||||
};
|
||||
|
||||
watchEffect(() => {
|
||||
setProps({ heightUsed: heightUsed.value });
|
||||
});
|
||||
|
||||
function initTableParams() {
|
||||
return {
|
||||
keyword: keyword.value,
|
||||
|
|
|
@ -63,7 +63,6 @@
|
|||
v-model:keyword="keyword"
|
||||
:filter-config-list="filterConfigList"
|
||||
:custom-fields-config-list="searchCustomFields"
|
||||
:row-count="filterRowCount"
|
||||
:count="recycleModulesCount[activeFolder] || 0"
|
||||
:name="moduleNamePath"
|
||||
:search-placeholder="t('caseManagement.featureCase.searchPlaceholder')"
|
||||
|
@ -773,8 +772,6 @@
|
|||
const filterConfigList = ref<FilterFormItem[]>([]);
|
||||
const searchCustomFields = ref<FilterFormItem[]>([]);
|
||||
|
||||
const filterRowCount = ref(0);
|
||||
|
||||
// 处理自定义字段列
|
||||
let customFieldsColumns: Record<string, any>[] = [];
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<MsAdvanceFilter
|
||||
v-model:keyword="keyword"
|
||||
:filter-config-list="filterConfigList"
|
||||
:row-count="filterRowCount"
|
||||
:search-placeholder="t('caseManagement.caseReview.list.searchPlaceholder')"
|
||||
@keyword-search="searchReview()"
|
||||
@adv-search="searchReview"
|
||||
|
@ -242,7 +241,6 @@
|
|||
|
||||
const keyword = ref('');
|
||||
|
||||
const filterRowCount = ref(0);
|
||||
const filterConfigList = ref<FilterFormItem[]>([]);
|
||||
const memberOptions = ref<{ label: string; value: string }[]>([]);
|
||||
const reviewersFilters = ref<string[]>([]);
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
v-model:keyword="keyword"
|
||||
:filter-config-list="filterConfigList"
|
||||
:custom-fields-config-list="searchCustomFields"
|
||||
:row-count="filterRowCount"
|
||||
:search-placeholder="t('common.searchByIDNameTag')"
|
||||
@keyword-search="fetchData"
|
||||
@adv-search="fetchData"
|
||||
|
@ -1488,7 +1487,6 @@
|
|||
*/
|
||||
const filterConfigList = ref<FilterFormItem[]>([]);
|
||||
const searchCustomFields = ref<FilterFormItem[]>([]);
|
||||
const filterRowCount = ref(0);
|
||||
|
||||
watch(
|
||||
() => showType.value,
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
v-model:keyword="keyword"
|
||||
:filter-config-list="[]"
|
||||
:custom-fields-config-list="[]"
|
||||
:row-count="0"
|
||||
:count="props.modulesCount[props.activeModule] || 0"
|
||||
:name="moduleNamePath"
|
||||
:search-placeholder="t('common.searchByIdName')"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
v-model:keyword="keyword"
|
||||
:filter-config-list="[]"
|
||||
:custom-fields-config-list="[]"
|
||||
:row-count="0"
|
||||
:count="props.modulesCount[props.activeModule] || 0"
|
||||
:name="moduleNamePath"
|
||||
:search-placeholder="t('common.searchByIdName')"
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
v-model:keyword="keyword"
|
||||
:filter-config-list="[]"
|
||||
:custom-fields-config-list="[]"
|
||||
:row-count="0"
|
||||
:count="modulesCount[props.activeModule] || 0"
|
||||
:name="moduleNamePath"
|
||||
:not-show-input-search="showType !== 'list'"
|
||||
|
|
Loading…
Reference in New Issue