fix(系统设置): 修改部分系统设置bug
This commit is contained in:
parent
2ea65df368
commit
82f8a60794
|
@ -86,7 +86,7 @@ export const MULTIPLE_MEMBER = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DATE = {
|
export const DATE = {
|
||||||
type: 'DatePicker',
|
type: 'a-date-picker',
|
||||||
field: 'fieldName',
|
field: 'fieldName',
|
||||||
title: '',
|
title: '',
|
||||||
value: '',
|
value: '',
|
||||||
|
@ -98,7 +98,7 @@ export const DATE = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DATETIME = {
|
export const DATETIME = {
|
||||||
type: 'DatePicker',
|
type: 'a-date-picker',
|
||||||
field: 'fieldName',
|
field: 'fieldName',
|
||||||
title: '',
|
title: '',
|
||||||
value: '',
|
value: '',
|
||||||
|
@ -106,6 +106,7 @@ export const DATETIME = {
|
||||||
'placeholder': t('formCreate.PleaseSelect'),
|
'placeholder': t('formCreate.PleaseSelect'),
|
||||||
'format': 'YYYY/MM/DD HH:mm:ss',
|
'format': 'YYYY/MM/DD HH:mm:ss',
|
||||||
'show-time': true,
|
'show-time': true,
|
||||||
|
'show-now-btn': true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -115,6 +116,7 @@ export const FLOAT = {
|
||||||
title: '',
|
title: '',
|
||||||
value: 0,
|
value: 0,
|
||||||
props: {
|
props: {
|
||||||
|
precision: 2,
|
||||||
placeholder: t('formCreate.PleaseEnter'),
|
placeholder: t('formCreate.PleaseEnter'),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
{{ t('mscard.defaultSaveAndContinueText') }}
|
{{ t('mscard.defaultSaveAndContinueText') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button v-if="!isFormReviewCase" type="primary" @click="saveHandler(false)">
|
<a-button v-if="!isFormReviewCase" type="primary" @click="saveHandler(false)">
|
||||||
{{ t(isEdit ? 'mscard.defaultUpdate' : 'mscard.defaultConfirm') }}
|
{{ okText }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button v-if="isFormReviewCase" type="primary" @click="saveHandler(false, true)">
|
<a-button v-if="isFormReviewCase" type="primary" @click="saveHandler(false, true)">
|
||||||
{{ t('caseManagement.featureCase.createAndLink') }}
|
{{ t('caseManagement.featureCase.createAndLink') }}
|
||||||
|
@ -150,14 +150,17 @@
|
||||||
function cancelHandler() {
|
function cancelHandler() {
|
||||||
router.back();
|
router.back();
|
||||||
}
|
}
|
||||||
|
const okText = ref<string>('');
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
if (route.params.mode === 'edit') {
|
if (route.params.mode === 'edit') {
|
||||||
title.value = t('caseManagement.featureCase.updateCase');
|
title.value = t('caseManagement.featureCase.updateCase');
|
||||||
|
okText.value = t('mscard.defaultUpdate');
|
||||||
} else if (route.params.mode === 'copy') {
|
} else if (route.params.mode === 'copy') {
|
||||||
title.value = t('caseManagement.featureCase.copyCase');
|
title.value = t('caseManagement.featureCase.copyCase');
|
||||||
|
okText.value = t('mscard.defaultConfirm');
|
||||||
} else {
|
} else {
|
||||||
title.value = t('caseManagement.featureCase.creatingCase');
|
title.value = t('caseManagement.featureCase.creatingCase');
|
||||||
|
okText.value = t('mscard.defaultConfirm');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
<a-doption @click="updateHandler('copy')">
|
<a-doption @click="updateHandler('copy')">
|
||||||
<MsIcon type="icon-icon_copy_filled" class="font-[16px]" />{{ t('common.copy') }}</a-doption
|
<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))]" />
|
<MsIcon type="icon-icon_delete-trash_outlined" class="font-[16px] text-[rgb(var(--danger-6))]" />
|
||||||
{{ t('common.delete') }}
|
{{ t('common.delete') }}
|
||||||
</a-doption>
|
</a-doption>
|
||||||
|
@ -272,7 +272,7 @@
|
||||||
pageChange: (page: number) => Promise<void>; // 分页变更函数
|
pageChange: (page: number) => Promise<void>; // 分页变更函数
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits(['update:visible']);
|
const emit = defineEmits(['update:visible', 'success']);
|
||||||
|
|
||||||
const userId = computed(() => userStore.userInfo.id);
|
const userId = computed(() => userStore.userInfo.id);
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
|
@ -426,8 +426,8 @@
|
||||||
};
|
};
|
||||||
await deleteCaseRequest(params);
|
await deleteCaseRequest(params);
|
||||||
Message.success(t('common.deleteSuccess'));
|
Message.success(t('common.deleteSuccess'));
|
||||||
updateSuccess();
|
showDrawerVisible.value = false;
|
||||||
detailDrawerRef.value?.openPrevDetail();
|
emit('success');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
@ -473,7 +473,6 @@
|
||||||
formRules.value = customFields.value.map((item: any) => {
|
formRules.value = customFields.value.map((item: any) => {
|
||||||
const multipleType = ['MULTIPLE_SELECT', 'CHECKBOX', 'MULTIPLE_MEMBER', 'MULTIPLE_INPUT'];
|
const multipleType = ['MULTIPLE_SELECT', 'CHECKBOX', 'MULTIPLE_MEMBER', 'MULTIPLE_INPUT'];
|
||||||
const currentDefaultValue = multipleType.includes(item.type) ? JSON.parse(item.defaultValue) : item.defaultValue;
|
const currentDefaultValue = multipleType.includes(item.type) ? JSON.parse(item.defaultValue) : item.defaultValue;
|
||||||
console.log('currentDefaultValue', currentDefaultValue);
|
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
type: item.type,
|
type: item.type,
|
||||||
|
|
|
@ -195,6 +195,7 @@
|
||||||
:table-data="propsRes.data"
|
:table-data="propsRes.data"
|
||||||
:page-change="propsEvent.pageChange"
|
:page-change="propsEvent.pageChange"
|
||||||
:pagination="propsRes.msPagination!"
|
:pagination="propsRes.msPagination!"
|
||||||
|
@success="initData()"
|
||||||
/>
|
/>
|
||||||
<AddDemandModal v-model:visible="showDemandModel" :case-id="caseId" :form="modelForm" />
|
<AddDemandModal v-model:visible="showDemandModel" :case-id="caseId" :form="modelForm" />
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -376,7 +376,6 @@
|
||||||
const formRules = ref<FormItem[]>([]);
|
const formRules = ref<FormItem[]>([]);
|
||||||
const formItem = ref<FormRuleItem[]>([]);
|
const formItem = ref<FormRuleItem[]>([]);
|
||||||
const fApi = ref<any>(null);
|
const fApi = ref<any>(null);
|
||||||
|
|
||||||
// 初始化模板默认字段
|
// 初始化模板默认字段
|
||||||
async function initDefaultFields() {
|
async function initDefaultFields() {
|
||||||
formRules.value = [];
|
formRules.value = [];
|
||||||
|
@ -750,7 +749,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetForm() {
|
function resetForm() {
|
||||||
form.value = { ...initForm };
|
form.value = { ...initForm, templateId: form.value.templateId };
|
||||||
fileList.value = [];
|
fileList.value = [];
|
||||||
caseFormRef.value?.resetFields();
|
caseFormRef.value?.resetFields();
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,6 +105,7 @@
|
||||||
|
|
||||||
// 返回用例列表
|
// 返回用例列表
|
||||||
function backCaseList() {
|
function backCaseList() {
|
||||||
|
clearInterval(timer.value);
|
||||||
router.push({
|
router.push({
|
||||||
name: CaseManagementRouteEnum.CASE_MANAGEMENT_CASE,
|
name: CaseManagementRouteEnum.CASE_MANAGEMENT_CASE,
|
||||||
});
|
});
|
||||||
|
@ -112,6 +113,7 @@
|
||||||
|
|
||||||
// 继续创建
|
// 继续创建
|
||||||
function continueCreate() {
|
function continueCreate() {
|
||||||
|
clearInterval(timer.value);
|
||||||
router.push({
|
router.push({
|
||||||
name: CaseManagementRouteEnum.CASE_MANAGEMENT_CASE_DETAIL,
|
name: CaseManagementRouteEnum.CASE_MANAGEMENT_CASE_DETAIL,
|
||||||
});
|
});
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
<a-select
|
<a-select
|
||||||
v-else
|
v-else
|
||||||
v-model="record.selectUserList"
|
v-model="record.selectUserList"
|
||||||
|
:popup-visible="record.showUserSelect"
|
||||||
multiple
|
multiple
|
||||||
class="w-[260px]"
|
class="w-[260px]"
|
||||||
:max-tag-count="2"
|
:max-tag-count="2"
|
||||||
|
@ -93,6 +94,7 @@
|
||||||
*/
|
*/
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
|
import { isEqual } from 'lodash-es';
|
||||||
|
|
||||||
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
|
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
|
||||||
import type { BatchActionParams, BatchActionQueryParams, MsTableColumn } from '@/components/pure/ms-table/type';
|
import type { BatchActionParams, BatchActionQueryParams, MsTableColumn } from '@/components/pure/ms-table/type';
|
||||||
|
@ -370,6 +372,11 @@
|
||||||
Message.warning(t('project.member.selectUserEmptyTip'));
|
Message.warning(t('project.member.selectUserEmptyTip'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const userGroupIds = (record.userRoles || []).map((item: any) => item.id);
|
||||||
|
if (isEqual(userGroupIds, record.selectUserList)) {
|
||||||
|
record.showUserSelect = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
editProjectMember(record);
|
editProjectMember(record);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -379,7 +379,7 @@
|
||||||
};
|
};
|
||||||
// 用户和项目选择改变的回调
|
// 用户和项目选择改变的回调
|
||||||
const selectUserOrProject = (value: any, record: MemberItem, type: string) => {
|
const selectUserOrProject = (value: any, record: MemberItem, type: string) => {
|
||||||
if (!hasAnyPermission(['PROJECT_USER:READ+UPDATE'])) {
|
if (!hasAnyPermission(['ORGANIZATION_MEMBER:READ+UPDATE'])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (type === 'project') {
|
if (type === 'project') {
|
||||||
|
|
|
@ -24,18 +24,19 @@
|
||||||
<div class="flex h-[100%] flex-1 flex-col justify-between">
|
<div class="flex h-[100%] flex-1 flex-col justify-between">
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<span class="font-normal">{{ t(item.title) }}</span>
|
<span class="font-normal">{{ t(item.title) }}</span>
|
||||||
<span>
|
<span class="flex items-center justify-end">
|
||||||
|
<div v-for="links of item.skipTitle" :key="links.name">
|
||||||
<a-tooltip
|
<a-tooltip
|
||||||
|
v-if="links.active"
|
||||||
:content="
|
:content="
|
||||||
isHasSystemPermission
|
isHasSystemPermission
|
||||||
? t('organization.service.jumpPlugin')
|
? t('organization.service.jumpPlugin')
|
||||||
: t('organization.service.noPermissionsTip')
|
: t('organization.service.noPermissionsTip')
|
||||||
"
|
"
|
||||||
position="bottom"
|
position="left"
|
||||||
|
size="small"
|
||||||
>
|
>
|
||||||
<a-button
|
<a-button
|
||||||
v-for="links of item.skipTitle"
|
|
||||||
:key="links.name"
|
|
||||||
size="mini"
|
size="mini"
|
||||||
class="ml-3 px-0 text-sm"
|
class="ml-3 px-0 text-sm"
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -45,6 +46,17 @@
|
||||||
{{ t(links.name) }}
|
{{ t(links.name) }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
|
<a-button
|
||||||
|
v-else
|
||||||
|
size="mini"
|
||||||
|
class="ml-3 px-0 text-sm"
|
||||||
|
type="text"
|
||||||
|
:disabled="links.disabled"
|
||||||
|
@click.stop="jumpHandler(links)"
|
||||||
|
>
|
||||||
|
{{ t(links.name) }}
|
||||||
|
</a-button>
|
||||||
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-xs text-[var(--color-text-4)]">
|
<div class="text-xs text-[var(--color-text-4)]">
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
allow-clear
|
allow-clear
|
||||||
@search="searchFiled"
|
@search="searchFiled"
|
||||||
@press-enter="searchFiled"
|
@press-enter="searchFiled"
|
||||||
|
@clear="searchFiled"
|
||||||
></a-input-search>
|
></a-input-search>
|
||||||
</div>
|
</div>
|
||||||
<MsBaseTable v-bind="propsRes" ref="tableRef" v-on="propsEvent">
|
<MsBaseTable v-bind="propsRes" ref="tableRef" v-on="propsEvent">
|
||||||
|
@ -39,7 +40,7 @@
|
||||||
/>
|
/>
|
||||||
<a-tooltip :content="record.name">
|
<a-tooltip :content="record.name">
|
||||||
<div
|
<div
|
||||||
class="ellipsis ml-2 max-w-[200px]"
|
class="ellipsis max-w-[200px]"
|
||||||
:class="{
|
:class="{
|
||||||
'text-[rgb(var(--primary-5))]': props.mode === 'project',
|
'text-[rgb(var(--primary-5))]': props.mode === 'project',
|
||||||
'cursor-pointer': 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
|
<MsTag v-if="record.internal" size="small" class="ml-2">{{ t('system.orgTemplate.isSystem') }}</MsTag></div
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
|
<template #updateTime="{ record }"> {{ dayjs(record.updateTime).format('YYYY-MM-DD HH:mm:ss') }} </template>
|
||||||
<template #operation="{ record }">
|
<template #operation="{ record }">
|
||||||
<div class="flex flex-row flex-nowrap items-center">
|
<div class="flex flex-row flex-nowrap items-center">
|
||||||
<MsPopConfirm
|
<MsPopConfirm
|
||||||
|
@ -216,6 +218,7 @@
|
||||||
{
|
{
|
||||||
title: 'system.orgTemplate.columnFieldUpdatedTime',
|
title: 'system.orgTemplate.columnFieldUpdatedTime',
|
||||||
dataIndex: 'updateTime',
|
dataIndex: 'updateTime',
|
||||||
|
slotName: 'updateTime',
|
||||||
showInTable: true,
|
showInTable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -255,7 +258,8 @@
|
||||||
const searchFiled = async () => {
|
const searchFiled = async () => {
|
||||||
try {
|
try {
|
||||||
totalData.value = await getList(getParams());
|
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 });
|
setProps({ data: filterData });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
|
@ -44,16 +44,18 @@
|
||||||
@close="cancelHandler"
|
@close="cancelHandler"
|
||||||
>
|
>
|
||||||
<template #title>
|
<template #title>
|
||||||
<div class="flex items-center">
|
<div class="flex items-center justify-start">
|
||||||
<icon-close-circle-fill class="mr-2 text-[20px] text-[rgb(var(--danger-6))]" />
|
<icon-exclamation-circle-fill size="20" class="mr-[8px] text-[rgb(var(--danger-6))]" />
|
||||||
<span>{{ t('system.orgTemplate.enableTip') }}</span></div
|
<div class="text-[var(--color-text-1)]">
|
||||||
>
|
{{ t('system.orgTemplate.enableTip') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<span class="text-[rgb(var(--warning-6))]">{{ t('system.orgTemplate.enableWarningTip') }}</span>
|
<span class="text-[rgb(var(--warning-6))]">{{ t('system.orgTemplate.enableWarningTip') }}</span>
|
||||||
<a-input
|
<a-input
|
||||||
v-model="validateKeyWord"
|
v-model="validateKeyWord"
|
||||||
:placeholder="t('personal.searchOrgPlaceholder')"
|
:placeholder="t('system.orgTemplate.searchOrgPlaceholder', { name: orgName })"
|
||||||
allow-clear
|
allow-clear
|
||||||
class="mb-4 mt-[8px]"
|
class="mb-4 mt-[8px]"
|
||||||
:max-length="255"
|
:max-length="255"
|
||||||
|
|
|
@ -180,4 +180,5 @@ export default {
|
||||||
'system.orgTemplate.enableTip': 'Are you sure to enable the project template',
|
'system.orgTemplate.enableTip': 'Are you sure to enable the project template',
|
||||||
'system.orgTemplate.enableWarningTip': 'Enabled, irreversible for organization template, please careful operation.',
|
'system.orgTemplate.enableWarningTip': 'Enabled, irreversible for organization template, please careful operation.',
|
||||||
'system.orgTemplate.typeEmptyTip': 'The type cannot be empty',
|
'system.orgTemplate.typeEmptyTip': 'The type cannot be empty',
|
||||||
|
'system.orgTemplate.searchOrgPlaceholder': 'Please enter the organization name :{name}',
|
||||||
};
|
};
|
||||||
|
|
|
@ -169,4 +169,5 @@ export default {
|
||||||
'system.orgTemplate.enableTip': '确认启用项目模版吗',
|
'system.orgTemplate.enableTip': '确认启用项目模版吗',
|
||||||
'system.orgTemplate.enableWarningTip': '启用后,不可恢复为组织模版,请谨慎操作!',
|
'system.orgTemplate.enableWarningTip': '启用后,不可恢复为组织模版,请谨慎操作!',
|
||||||
'system.orgTemplate.typeEmptyTip': '类型不能为空',
|
'system.orgTemplate.typeEmptyTip': '类型不能为空',
|
||||||
|
'system.orgTemplate.searchOrgPlaceholder': '请输入组织名称: {name} ',
|
||||||
};
|
};
|
||||||
|
|
|
@ -202,7 +202,8 @@
|
||||||
};
|
};
|
||||||
await addPlugin(params);
|
await addPlugin(params);
|
||||||
const isOpen = getIsVisited();
|
const isOpen = getIsVisited();
|
||||||
if (isOpen) {
|
// 确定不再提示
|
||||||
|
if (isOpen || flag) {
|
||||||
Message.success(t('system.plugin.uploadSuccessTip'));
|
Message.success(t('system.plugin.uploadSuccessTip'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue