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

View File

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

View File

@ -20,10 +20,12 @@
</div> </div>
<div class="check-list-item"> <div class="check-list-item">
<template v-if="pswValidateRes"> <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>
<template v-else> <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> </template>
</div> </div>
</template> </template>

View File

@ -2,5 +2,6 @@ export default {
'ms.passwordInput.passwordPlaceholder': 'Please enter password', 'ms.passwordInput.passwordPlaceholder': 'Please enter password',
'ms.passwordInput.passwordTipTitle': 'Passwords must match both, and only the following rules are supported:', 'ms.passwordInput.passwordTipTitle': 'Passwords must match both, and only the following rules are supported:',
'ms.passwordInput.passwordLengthRule': 'Length is 8-32 bits', '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.passwordPlaceholder': '请输入密码',
'ms.passwordInput.passwordTipTitle': '密码须同时符合,仅支持以下规则', 'ms.passwordInput.passwordTipTitle': '密码须同时符合,仅支持以下规则',
'ms.passwordInput.passwordLengthRule': '长度为8-32位', '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.nameIsTooLang': 'The name exceeds 255 characters',
'common.validateSuccess': 'Validate success', 'common.validateSuccess': 'Validate success',
'common.to': 'To', 'common.to': 'To',
'common.tip': 'Tips',
}; };

View File

@ -118,4 +118,5 @@ export default {
'common.nameIsTooLang': '名称超过255个字符', 'common.nameIsTooLang': '名称超过255个字符',
'common.validateSuccess': '验证成功', 'common.validateSuccess': '验证成功',
'common.to': '至', '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}$/; export const phoneRegex = /^\d{11}$/;
// 密码校验8-32位 // 密码校验8-32位
export const passwordLengthRegex = /^.{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地址校验 // Git地址校验
export const gitRepositoryUrlRegex = /\.git$/; export const gitRepositoryUrlRegex = /\.git$/;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -114,5 +114,6 @@ export default {
'system.user.importErrorMessageTitle': 'Failed to import some user information', 'system.user.importErrorMessageTitle': 'Failed to import some user information',
'system.user.seeMore': 'View more', 'system.user.seeMore': 'View more',
'system.user.num': 'Line', '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.seeMore': '查看更多',
'system.user.num': '第', 'system.user.num': '第',
'system.user.line': '行', 'system.user.line': '行',
'system.user.closeTip': '您的更改尚未保存,是否要继续关闭窗口?',
}; };