fix(全局): 问题修复

This commit is contained in:
baiqi 2024-02-04 18:23:57 +08:00 committed by 刘瑞斌
parent d129681f4f
commit 370fc1661f
18 changed files with 69 additions and 39 deletions

View File

@ -57,6 +57,7 @@
:placeholder="t(model.placeholder || '')"
:max-length="model.maxLength || 255"
allow-clear
@change="emit('change')"
/>
<a-input-number
v-if="model.type === 'inputNumber'"
@ -66,6 +67,7 @@
:min="model.min"
:max="model.max || 9999999"
allow-clear
@change="emit('change')"
/>
<MsTagsInput
v-if="model.type === 'tagInput'"
@ -76,6 +78,7 @@
unique-value
retain-input-value
:max-tag-count="2"
@change="emit('change')"
/>
<a-select
v-if="model.type === 'select'"
@ -84,6 +87,7 @@
:placeholder="t(model.placeholder || '')"
:options="model.options"
:field-names="model.filedNames"
@change="emit('change')"
/>
<div v-if="model.type === 'multiple'" class="flex flex-row gap-[4px]">
<a-form-item
@ -104,6 +108,7 @@
:placeholder="t(child.placeholder || '')"
:max-length="child.maxLength || 255"
allow-clear
@change="emit('change')"
/>
<a-select
v-if="child.type === 'select'"
@ -112,6 +117,7 @@
:placeholder="t(child.placeholder || '')"
:options="child.options"
:field-names="child.filedNames"
@change="emit('change')"
/>
</a-form-item>
</div>
@ -123,6 +129,7 @@
:style="{ 'margin-top': index === 0 && !props.isShowDrag ? '36px' : '' }"
size="small"
type="line"
@change="emit('change')"
/>
</div>
<div
@ -192,6 +199,7 @@
hideAdd: false,
}
);
const emit = defineEmits(['change']);
const defaultForm = {
list: [] as Record<string, any>[],

View File

@ -348,8 +348,9 @@
},
{
title: 'ms.case.associate.version',
slotName: 'version',
width: 200,
dataIndex: 'versionName',
width: 100,
showTooltip: true,
},
{
title: 'ms.case.associate.tags',

View File

@ -20,10 +20,12 @@
</div>
<div class="check-list-item">
<template v-if="pswValidateRes">
<icon-check-circle-fill class="check-list-item--success" />{{ t('ms.passwordInput.passwordWordRule') }}
<icon-check-circle-fill class="check-list-item--success" />
{{ t('ms.passwordInput.passwordWordRule', { symbol: '!@#$%^&*()_+.' }) }}
</template>
<template v-else>
<icon-close-circle-fill class="check-list-item--error" />{{ t('ms.passwordInput.passwordWordRule') }}
<icon-close-circle-fill class="check-list-item--error" />
{{ t('ms.passwordInput.passwordWordRule', { symbol: '!@#$%^&*()_+.' }) }}
</template>
</div>
</template>

View File

@ -2,5 +2,6 @@ export default {
'ms.passwordInput.passwordPlaceholder': 'Please enter password',
'ms.passwordInput.passwordTipTitle': 'Passwords must match both, and only the following rules are supported:',
'ms.passwordInput.passwordLengthRule': 'Length is 8-32 bits',
'ms.passwordInput.passwordWordRule': 'Must contain numbers and letters, Chinese or spaces are not allowed',
'ms.passwordInput.passwordWordRule':
'Must contain numbers and letters, Chinese or spaces are not allowed, The range of special symbols allowed to be entered: {symbol}',
};

View File

@ -2,5 +2,5 @@ export default {
'ms.passwordInput.passwordPlaceholder': '请输入密码',
'ms.passwordInput.passwordTipTitle': '密码须同时符合,仅支持以下规则',
'ms.passwordInput.passwordLengthRule': '长度为8-32位',
'ms.passwordInput.passwordWordRule': '必须包含数字和字母,不允许输入中文或空格',
'ms.passwordInput.passwordWordRule': '必须包含数字和字母,不允许输入中文或空格,允许输入的特殊符号范围:{symbol}',
};

View File

@ -115,4 +115,5 @@ export default {
'common.nameIsTooLang': 'The name exceeds 255 characters',
'common.validateSuccess': 'Validate success',
'common.to': 'To',
'common.tip': 'Tips',
};

View File

@ -118,4 +118,5 @@ export default {
'common.nameIsTooLang': '名称超过255个字符',
'common.validateSuccess': '验证成功',
'common.to': '至',
'common.tip': '温馨提示',
};

View File

@ -4,8 +4,8 @@ export const emailRegex = /^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/;
export const phoneRegex = /^\d{11}$/;
// 密码校验8-32位
export const passwordLengthRegex = /^.{8,32}$/;
// 密码校验,必须包含数字和字母
export const passwordWordRegex = /^(?=.*[a-zA-Z])(?=.*\d)[a-zA-Z0-9!@#$%^&*]+$/;
// 密码校验,必须包含数字和字母,特殊符号范围校验
export const passwordWordRegex = /^(?=.*\d)(?=.*[a-zA-Z])[0-9a-zA-Z!@#$%^&*()_+.]+$/;
// Git地址校验
export const gitRepositoryUrlRegex = /\.git$/;

View File

@ -336,14 +336,16 @@
titleSlotName: 'resultTitle',
width: 110,
},
// {
// title: 'caseManagement.caseReview.version',
// dataIndex: 'versionName',
// width: 90,
// },
{
title: 'caseManagement.caseReview.version',
dataIndex: 'versionName',
width: 100,
showTooltip: true,
},
{
title: 'caseManagement.caseReview.creator',
dataIndex: 'createUserName',
showTooltip: true,
width: 150,
},
{

View File

@ -5,7 +5,7 @@
<img :src="innerLogo" class="h-[60px] w-[290px]" />
</div>
<div class="title-0 mt-[16px] flex justify-center">
<span class="title-welcome">{{ innerSlogan || t('login.form.title') }}</span>
<span class="title-welcome">{{ t(innerSlogan || '') || t('login.form.title') }}</span>
</div>
</div>
@ -73,7 +73,6 @@
import { useStorage } from '@vueuse/core';
import { Message } from '@arco-design/web-vue';
import { getAuthenticationList } from '@/api/modules/user';
import { GetLoginLogoUrl } from '@/api/requrls/setting/config';
import { useI18n } from '@/hooks/useI18n';
import useLoading from '@/hooks/useLoading';

View File

@ -177,9 +177,9 @@
v-on="caseTableEvent"
>
<template #id="{ record }">
<a-tooltip :content="`${record.id}`">
<a-button type="text" class="px-0" @click="goCaseDetail(record.id)">
<div class="one-line-text max-w-[168px]">{{ record.id }}</div>
<a-tooltip :content="`${record.sourceNum}`">
<a-button type="text" class="px-0" @click="goCaseDetail(record.sourceId)">
<div class="one-line-text max-w-[168px]">{{ record.sourceNum }}</div>
</a-button>
</a-tooltip>
</template>
@ -400,7 +400,7 @@
const caseColumns: MsTableColumn = [
{
title: 'project.fileManagement.caseId',
dataIndex: 'id',
dataIndex: 'sourceId',
slotName: 'id',
showTooltip: true,
width: 150,

View File

@ -11,9 +11,9 @@
<a-button type="text" class="px-0" @click="openAuthDetail(record.id)">{{ record.name }}</a-button>
</template>
<template #action="{ record }">
<MsButton v-permission="['SYSTEM_PARAMETER_SETTING_AUTH:READ+UPDATE']" @click="editAuth(record)">{{
t('system.config.auth.edit')
}}</MsButton>
<MsButton v-permission="['SYSTEM_PARAMETER_SETTING_AUTH:READ+UPDATE']" @click="editAuth(record)">
{{ t('system.config.auth.edit') }}
</MsButton>
<MsButton
v-if="record.enable"
v-permission="['SYSTEM_PARAMETER_SETTING_AUTH:READ+UPDATE']"
@ -21,9 +21,9 @@
>
{{ t('system.config.auth.disable') }}
</MsButton>
<MsButton v-else v-permission="['SYSTEM_PARAMETER_SETTING_AUTH:READ+UPDATE']" @click="enableAuth(record)">{{
t('system.config.auth.enable')
}}</MsButton>
<MsButton v-else v-permission="['SYSTEM_PARAMETER_SETTING_AUTH:READ+UPDATE']" @click="enableAuth(record)">
{{ t('system.config.auth.enable') }}
</MsButton>
<MsTableMoreAction
v-permission="['SYSTEM_PARAMETER_SETTING_AUTH:READ+DELETE']"
:list="tableActions"
@ -85,7 +85,7 @@
></a-textarea>
</a-form-item>
<a-form-item :label="t('system.config.auth.addResource')" field="type" asterisk-position="end">
<a-radio-group v-model:model-value="activeAuthForm.type" type="button">
<a-radio-group v-model:model-value="activeAuthForm.type" type="button" :disabled="!!activeAuthForm.id">
<a-radio v-for="item of authTypeList" :key="item" :value="item">{{ item }}</a-radio>
</a-radio-group>
</a-form-item>

View File

@ -66,7 +66,6 @@
import { getCleanupConfig, saveCleanupConfig } from '@/api/modules/setting/config';
import { useI18n } from '@/hooks/useI18n';
import { useUserStore } from '@/store';
import { hasAnyPermission } from '@/utils/permission';
const userStore = useUserStore();
const { t } = useI18n();

View File

@ -520,7 +520,7 @@
module: _module.value,
content: content.value,
startTime: time.value[0],
endTime: time.value[1],
endTime: (time.value[1] as number) + 1000, // +1s
level: level.value,
});
resetPagination();

View File

@ -115,6 +115,7 @@
}
treeData.value = resTree;
} catch (error) {
// eslint-disable-next-line no-console
console.log(error);
} finally {
loading.value = false;
@ -185,8 +186,6 @@
batchLoading.value = false;
}
}
function handleClose() {}
</script>
<style lang="less" scoped></style>

View File

@ -92,7 +92,7 @@
title-align="start"
class="ms-modal-form ms-modal-medium"
:mask-closable="false"
@close="handleUserModalClose"
:closable="false"
>
<a-alert class="mb-[16px]">{{ t('system.user.createUserTip') }}</a-alert>
<a-form
@ -110,6 +110,7 @@
add-text="system.user.addUser"
:default-vals="userForm.list"
max-height="250px"
@change="handleBatchFormChange"
></MsBatchForm>
<a-form-item
class="mb-0"
@ -139,7 +140,7 @@
</a-form-item>
</a-form>
<template #footer>
<a-button type="secondary" :disabled="loading" @click="cancelCreate">
<a-button type="secondary" :disabled="loading" @click="handleBeforeClose">
{{ t('system.user.editUserModalCancelCreate') }}
</a-button>
<a-button v-if="userFormMode === 'create'" type="secondary" :loading="loading" @click="saveAndContinue">
@ -820,6 +821,11 @@
placeholder: 'system.user.createUserPhonePlaceholder',
},
]);
const isBatchFormChange = ref(false);
function handleBatchFormChange() {
isBatchFormChange.value = true;
}
/**
* 取消创建重置用户表单
@ -955,12 +961,21 @@
});
}
/**
* 处理用户表单弹窗关闭
*/
function handleUserModalClose() {
resetUserForm();
batchFormRef.value?.resetForm();
function handleBeforeClose() {
if (isBatchFormChange.value) {
openModal({
type: 'warning',
title: t('common.tip'),
content: t('system.user.closeTip'),
okText: t('common.close'),
onBeforeOk: async () => {
cancelCreate();
},
hideCancel: false,
});
} else {
cancelCreate();
}
}
const inviteVisible = ref(false);

View File

@ -114,5 +114,6 @@ export default {
'system.user.importErrorMessageTitle': 'Failed to import some user information',
'system.user.seeMore': 'View more',
'system.user.num': 'Line',
'system.user.line': '',
'system.user.line': '', // 英文没有后面的单位
'system.user.closeTip': 'Your changes have not been saved. Do you want to continue closing the window?',
};

View File

@ -114,4 +114,5 @@ export default {
'system.user.seeMore': '查看更多',
'system.user.num': '第',
'system.user.line': '行',
'system.user.closeTip': '您的更改尚未保存,是否要继续关闭窗口?',
};