fix(系统设置): 修改部分系统设置bug

This commit is contained in:
xinxin.wu 2024-02-07 21:31:58 +08:00 committed by Craftsman
parent 2ea65df368
commit 82f8a60794
14 changed files with 66 additions and 32 deletions

View File

@ -86,7 +86,7 @@ export const MULTIPLE_MEMBER = {
};
export const DATE = {
type: 'DatePicker',
type: 'a-date-picker',
field: 'fieldName',
title: '',
value: '',
@ -98,7 +98,7 @@ export const DATE = {
};
export const DATETIME = {
type: 'DatePicker',
type: 'a-date-picker',
field: 'fieldName',
title: '',
value: '',
@ -106,6 +106,7 @@ export const DATETIME = {
'placeholder': t('formCreate.PleaseSelect'),
'format': 'YYYY/MM/DD HH:mm:ss',
'show-time': true,
'show-now-btn': true,
},
};
@ -115,6 +116,7 @@ export const FLOAT = {
title: '',
value: 0,
props: {
precision: 2,
placeholder: t('formCreate.PleaseEnter'),
},
};

View File

@ -19,7 +19,7 @@
{{ t('mscard.defaultSaveAndContinueText') }}
</a-button>
<a-button v-if="!isFormReviewCase" type="primary" @click="saveHandler(false)">
{{ t(isEdit ? 'mscard.defaultUpdate' : 'mscard.defaultConfirm') }}
{{ okText }}
</a-button>
<a-button v-if="isFormReviewCase" type="primary" @click="saveHandler(false, true)">
{{ t('caseManagement.featureCase.createAndLink') }}
@ -150,14 +150,17 @@
function cancelHandler() {
router.back();
}
const okText = ref<string>('');
watchEffect(() => {
if (route.params.mode === 'edit') {
title.value = t('caseManagement.featureCase.updateCase');
okText.value = t('mscard.defaultUpdate');
} else if (route.params.mode === 'copy') {
title.value = t('caseManagement.featureCase.copyCase');
okText.value = t('mscard.defaultConfirm');
} else {
title.value = t('caseManagement.featureCase.creatingCase');
okText.value = t('mscard.defaultConfirm');
}
});
</script>

View File

@ -71,7 +71,7 @@
<a-doption @click="updateHandler('copy')">
<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 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>
@ -272,7 +272,7 @@
pageChange: (page: number) => Promise<void>; //
}>();
const emit = defineEmits(['update:visible']);
const emit = defineEmits(['update:visible', 'success']);
const userId = computed(() => userStore.userInfo.id);
const appStore = useAppStore();
@ -426,8 +426,8 @@
};
await deleteCaseRequest(params);
Message.success(t('common.deleteSuccess'));
updateSuccess();
detailDrawerRef.value?.openPrevDetail();
showDrawerVisible.value = false;
emit('success');
} catch (error) {
console.log(error);
}
@ -473,7 +473,6 @@
formRules.value = customFields.value.map((item: any) => {
const multipleType = ['MULTIPLE_SELECT', 'CHECKBOX', 'MULTIPLE_MEMBER', 'MULTIPLE_INPUT'];
const currentDefaultValue = multipleType.includes(item.type) ? JSON.parse(item.defaultValue) : item.defaultValue;
console.log('currentDefaultValue', currentDefaultValue);
return {
...item,
type: item.type,

View File

@ -195,6 +195,7 @@
:table-data="propsRes.data"
:page-change="propsEvent.pageChange"
:pagination="propsRes.msPagination!"
@success="initData()"
/>
<AddDemandModal v-model:visible="showDemandModel" :case-id="caseId" :form="modelForm" />
</template>

View File

@ -376,7 +376,6 @@
const formRules = ref<FormItem[]>([]);
const formItem = ref<FormRuleItem[]>([]);
const fApi = ref<any>(null);
//
async function initDefaultFields() {
formRules.value = [];
@ -750,7 +749,7 @@
}
function resetForm() {
form.value = { ...initForm };
form.value = { ...initForm, templateId: form.value.templateId };
fileList.value = [];
caseFormRef.value?.resetFields();
}

View File

@ -105,6 +105,7 @@
//
function backCaseList() {
clearInterval(timer.value);
router.push({
name: CaseManagementRouteEnum.CASE_MANAGEMENT_CASE,
});
@ -112,6 +113,7 @@
//
function continueCreate() {
clearInterval(timer.value);
router.push({
name: CaseManagementRouteEnum.CASE_MANAGEMENT_CASE_DETAIL,
});

View File

@ -43,6 +43,7 @@
<a-select
v-else
v-model="record.selectUserList"
:popup-visible="record.showUserSelect"
multiple
class="w-[260px]"
:max-tag-count="2"
@ -93,6 +94,7 @@
*/
import { onMounted, ref } from 'vue';
import { Message } from '@arco-design/web-vue';
import { isEqual } from 'lodash-es';
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
import type { BatchActionParams, BatchActionQueryParams, MsTableColumn } from '@/components/pure/ms-table/type';
@ -370,6 +372,11 @@
Message.warning(t('project.member.selectUserEmptyTip'));
return;
}
const userGroupIds = (record.userRoles || []).map((item: any) => item.id);
if (isEqual(userGroupIds, record.selectUserList)) {
record.showUserSelect = false;
return;
}
editProjectMember(record);
};

View File

@ -379,7 +379,7 @@
};
//
const selectUserOrProject = (value: any, record: MemberItem, type: string) => {
if (!hasAnyPermission(['PROJECT_USER:READ+UPDATE'])) {
if (!hasAnyPermission(['ORGANIZATION_MEMBER:READ+UPDATE'])) {
return;
}
if (type === 'project') {

View File

@ -24,18 +24,30 @@
<div class="flex h-[100%] flex-1 flex-col justify-between">
<div class="flex items-center justify-between">
<span class="font-normal">{{ t(item.title) }}</span>
<span>
<a-tooltip
:content="
isHasSystemPermission
? t('organization.service.jumpPlugin')
: t('organization.service.noPermissionsTip')
"
position="bottom"
>
<span class="flex items-center justify-end">
<div v-for="links of item.skipTitle" :key="links.name">
<a-tooltip
v-if="links.active"
:content="
isHasSystemPermission
? t('organization.service.jumpPlugin')
: t('organization.service.noPermissionsTip')
"
position="left"
size="small"
>
<a-button
size="mini"
class="ml-3 px-0 text-sm"
type="text"
:disabled="links.disabled"
@click.stop="jumpHandler(links)"
>
{{ t(links.name) }}
</a-button>
</a-tooltip>
<a-button
v-for="links of item.skipTitle"
:key="links.name"
v-else
size="mini"
class="ml-3 px-0 text-sm"
type="text"
@ -44,7 +56,7 @@
>
{{ t(links.name) }}
</a-button>
</a-tooltip>
</div>
</span>
</div>
<div class="text-xs text-[var(--color-text-4)]">

View File

@ -23,6 +23,7 @@
allow-clear
@search="searchFiled"
@press-enter="searchFiled"
@clear="searchFiled"
></a-input-search>
</div>
<MsBaseTable v-bind="propsRes" ref="tableRef" v-on="propsEvent">
@ -39,7 +40,7 @@
/>
<a-tooltip :content="record.name">
<div
class="ellipsis ml-2 max-w-[200px]"
class="ellipsis max-w-[200px]"
:class="{
'text-[rgb(var(--primary-5))]': props.mode === 'project',
'cursor-pointer': props.mode === 'project',
@ -51,6 +52,7 @@
<MsTag v-if="record.internal" size="small" class="ml-2">{{ t('system.orgTemplate.isSystem') }}</MsTag></div
>
</template>
<template #updateTime="{ record }"> {{ dayjs(record.updateTime).format('YYYY-MM-DD HH:mm:ss') }} </template>
<template #operation="{ record }">
<div class="flex flex-row flex-nowrap items-center">
<MsPopConfirm
@ -216,6 +218,7 @@
{
title: 'system.orgTemplate.columnFieldUpdatedTime',
dataIndex: 'updateTime',
slotName: 'updateTime',
showInTable: true,
},
{
@ -255,7 +258,8 @@
const searchFiled = async () => {
try {
totalData.value = await getList(getParams());
const filterData = totalData.value.filter((item: AddOrUpdateField) => item.name.includes(keyword.value));
const regex = new RegExp(keyword.value, 'i');
const filterData = totalData.value.filter((item: AddOrUpdateField) => regex.test(item.name));
setProps({ data: filterData });
} catch (error) {
console.log(error);

View File

@ -44,16 +44,18 @@
@close="cancelHandler"
>
<template #title>
<div class="flex items-center">
<icon-close-circle-fill class="mr-2 text-[20px] text-[rgb(var(--danger-6))]" />
<span>{{ t('system.orgTemplate.enableTip') }}</span></div
>
<div class="flex items-center justify-start">
<icon-exclamation-circle-fill size="20" class="mr-[8px] text-[rgb(var(--danger-6))]" />
<div class="text-[var(--color-text-1)]">
{{ t('system.orgTemplate.enableTip') }}
</div>
</div>
</template>
<span class="text-[rgb(var(--warning-6))]">{{ t('system.orgTemplate.enableWarningTip') }}</span>
<a-input
v-model="validateKeyWord"
:placeholder="t('personal.searchOrgPlaceholder')"
:placeholder="t('system.orgTemplate.searchOrgPlaceholder', { name: orgName })"
allow-clear
class="mb-4 mt-[8px]"
:max-length="255"

View File

@ -180,4 +180,5 @@ export default {
'system.orgTemplate.enableTip': 'Are you sure to enable the project template',
'system.orgTemplate.enableWarningTip': 'Enabled, irreversible for organization template, please careful operation.',
'system.orgTemplate.typeEmptyTip': 'The type cannot be empty',
'system.orgTemplate.searchOrgPlaceholder': 'Please enter the organization name :{name}',
};

View File

@ -169,4 +169,5 @@ export default {
'system.orgTemplate.enableTip': '确认启用项目模版吗',
'system.orgTemplate.enableWarningTip': '启用后,不可恢复为组织模版,请谨慎操作!',
'system.orgTemplate.typeEmptyTip': '类型不能为空',
'system.orgTemplate.searchOrgPlaceholder': '请输入组织名称: {name} ',
};

View File

@ -202,7 +202,8 @@
};
await addPlugin(params);
const isOpen = getIsVisited();
if (isOpen) {
//
if (isOpen || flag) {
Message.success(t('system.plugin.uploadSuccessTip'));
}