This commit is contained in:
chenjianxing 2020-05-29 13:27:22 +08:00
commit 5cf20ef27d
8 changed files with 24 additions and 9 deletions

View File

@ -15,6 +15,7 @@
and w.id = #{proRequest.workspaceId} and w.id = #{proRequest.workspaceId}
</if> </if>
</where> </where>
order by p.update_time desc
</select> </select>
<select id="getProjectIdByWorkspaceId" resultType="java.lang.String"> <select id="getProjectIdByWorkspaceId" resultType="java.lang.String">
select id select id

View File

@ -37,10 +37,10 @@
<el-dialog :title="title" :visible.sync="createVisible"> <el-dialog :title="title" :visible.sync="createVisible">
<el-form :model="form" :rules="rules" ref="form" label-position="right" label-width="100px" size="small"> <el-form :model="form" :rules="rules" ref="form" label-position="right" label-width="100px" size="small">
<el-form-item :label="$t('commons.name')"> <el-form-item :label="$t('commons.name')" prop="name">
<el-input v-model="form.name" autocomplete="off"></el-input> <el-input v-model="form.name" autocomplete="off"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('commons.description')"> <el-form-item :label="$t('commons.description')" prop="description">
<el-input type="textarea" v-model="form.description"></el-input> <el-input type="textarea" v-model="form.description"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -87,8 +87,17 @@
rules: { rules: {
name: [ name: [
{required: true, message: this.$t('project.input_name'), trigger: 'blur'}, {required: true, message: this.$t('project.input_name'), trigger: 'blur'},
{min: 2, max: 50, message: this.$t('commons.input_limit', [2, 50]), trigger: 'blur'} {min: 2, max: 25, message: this.$t('commons.input_limit', [2, 25]), trigger: 'blur'},
] {
required: true,
pattern: /^(?!-)(?!.*?-$)[a-zA-Z0-9\u4e00-\u9fa5-]+$/,
message: this.$t('project.special_characters_are_not_supported'),
trigger: 'blur'
}
],
description: [
{max: 50, message: this.$t('commons.input_limit', [0, 50]), trigger: 'blur'}
],
}, },
} }
}, },

View File

@ -218,7 +218,7 @@
rule: { rule: {
name: [ name: [
{required: true, message: this.$t('organization.input_name'), trigger: 'blur'}, {required: true, message: this.$t('organization.input_name'), trigger: 'blur'},
{min: 2, max: 20, message: this.$t('commons.input_limit', [2, 20]), trigger: 'blur'}, {min: 2, max: 25, message: this.$t('commons.input_limit', [2, 25]), trigger: 'blur'},
{ {
required: true, required: true,
pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9.·-]+$/, pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9.·-]+$/,

View File

@ -447,7 +447,7 @@
rules: { rules: {
name: [ name: [
{required: true, message: this.$t('workspace.input_name'), trigger: 'blur'}, {required: true, message: this.$t('workspace.input_name'), trigger: 'blur'},
{min: 2, max: 20, message: this.$t('commons.input_limit', [2, 20]), trigger: 'blur'}, {min: 2, max: 25, message: this.$t('commons.input_limit', [2, 25]), trigger: 'blur'},
{ {
required: true, required: true,
pattern: /^(?!-)(?!.*?-$)[a-zA-Z0-9\u4e00-\u9fa5-]+$/, pattern: /^(?!-)(?!.*?-$)[a-zA-Z0-9\u4e00-\u9fa5-]+$/,

View File

@ -18,6 +18,8 @@ export default {
callback: () => { callback: () => {
window.location.href = "/login" window.location.href = "/login"
} }
}).then(r => {
}); });
}; };

View File

@ -114,7 +114,7 @@ export default {
'input_name': 'Please enter a organization name', 'input_name': 'Please enter a organization name',
'select_organization': 'Please select organization', 'select_organization': 'Please select organization',
'search_by_name': 'Search by name', 'search_by_name': 'Search by name',
'special_characters_are_not_supported': 'Special characters are not supported', 'special_characters_are_not_supported': 'Incorrect format (special characters are not supported and cannot end with \'-\')',
'none': 'None Organization', 'none': 'None Organization',
'select': 'Select Organization', 'select': 'Select Organization',
}, },
@ -129,6 +129,7 @@ export default {
'input_name': 'Please enter a workspace name', 'input_name': 'Please enter a workspace name',
'owning_workspace': 'Owning Workspace', 'owning_workspace': 'Owning Workspace',
'please_choose_workspace': 'Please select Workspace', 'please_choose_workspace': 'Please select Workspace',
'special_characters_are_not_supported': 'Incorrect format (special characters are not supported and cannot end with \'-\')',
}, },
member: { member: {
'create': 'Create', 'create': 'Create',

View File

@ -113,7 +113,7 @@ export default {
'input_name': '请输入组织名称', 'input_name': '请输入组织名称',
'select_organization': '请选择组织', 'select_organization': '请选择组织',
'search_by_name': '根据名称搜索', 'search_by_name': '根据名称搜索',
'special_characters_are_not_supported': '不支持特殊字符', 'special_characters_are_not_supported': '格式错误(不支持特殊字符,且不能以\'-\'开头结尾)',
'none': '无组织', 'none': '无组织',
'select': '选择组织', 'select': '选择组织',
}, },
@ -127,6 +127,7 @@ export default {
'input_name': '请输入项目名称', 'input_name': '请输入项目名称',
'owning_workspace': '所属工作空间', 'owning_workspace': '所属工作空间',
'please_choose_workspace': '请选择工作空间', 'please_choose_workspace': '请选择工作空间',
'special_characters_are_not_supported': '格式错误(不支持特殊字符,且不能以\'-\'开头结尾)',
}, },
member: { member: {
'create': '添加成员', 'create': '添加成员',

View File

@ -113,7 +113,7 @@ export default {
'input_name': '請輸入組織名稱', 'input_name': '請輸入組織名稱',
'select_organization': '請選擇組織', 'select_organization': '請選擇組織',
'search_by_name': '根據名稱搜索', 'search_by_name': '根據名稱搜索',
'special_characters_are_not_supported': '不支持特殊字符', 'special_characters_are_not_supported': 'Incorrect format (special characters are not supported and cannot end with \'-\')',
'none': '無組織', 'none': '無組織',
'select': '選擇組織', 'select': '選擇組織',
}, },
@ -127,6 +127,7 @@ export default {
'input_name': '請輸入項目名稱', 'input_name': '請輸入項目名稱',
'owning_workspace': '所屬工作空間', 'owning_workspace': '所屬工作空間',
'please_choose_workspace': '請選擇工作空間', 'please_choose_workspace': '請選擇工作空間',
'special_characters_are_not_supported': '格式錯誤(不支持特殊字符,且不能以\'-\'開頭結尾)',
}, },
member: { member: {
'create': '添加成員', 'create': '添加成員',