Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Starter Web Vue
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
product
kim3-web-vue
Starter Web Vue
Commits
49eca53c
Commit
49eca53c
authored
Jul 31, 2021
by
shuiluo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 组织管理国际化完成
parent
e2080128
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
24 deletions
+38
-24
src/local/system.js
src/local/system.js
+4
-0
src/pages/system/organization/components/OrganizationTree.vue
...pages/system/organization/components/OrganizationTree.vue
+2
-2
src/pages/system/organization/orgmanagement/Org.vue
src/pages/system/organization/orgmanagement/Org.vue
+6
-6
src/pages/system/organization/orgmanagement/form.vue
src/pages/system/organization/orgmanagement/form.vue
+26
-16
No files found.
src/local/system.js
View file @
49eca53c
...
@@ -66,4 +66,8 @@ export default {
...
@@ -66,4 +66,8 @@ export default {
],
],
order
:
[
'
顺序
'
,
'
Order
'
],
order
:
[
'
顺序
'
,
'
Order
'
],
orderInputError
:
[
'
请输入@:order
'
,
'
Please Input @:order
'
],
orderInputError
:
[
'
请输入@:order
'
,
'
Please Input @:order
'
],
'
system.organization
'
:
[
'
组织
'
,
'
Organization
'
],
'
system.parentName
'
:
[
'
上级组织名称
'
,
'
Parent Organization Name
'
],
'
system.jobs
'
:
[
'
岗位
'
,
'
Jobs
'
],
'
system.organizationRoot
'
:
[
'
组织根目录
'
,
'
Organization Root
'
]
};
};
src/pages/system/organization/components/OrganizationTree.vue
View file @
49eca53c
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
show-search
show-search
style=
"width: 100%"
style=
"width: 100%"
:dropdown-style=
"
{ maxHeight: '400px', overflow: 'auto' }"
:dropdown-style=
"
{ maxHeight: '400px', overflow: 'auto' }"
placeholder="Please select
"
:placeholder="$t('select.placeholder')
"
:tree-data="treeData"
:tree-data="treeData"
allow-clear
allow-clear
tree-default-expand-all
tree-default-expand-all
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
@change="onChange"
@change="onChange"
/>
/>
</
template
>
</
template
>
<!-- v-on="$listeners" -->
<
script
>
<
script
>
import
api
from
'
@/api/organization
'
;
import
api
from
'
@/api/organization
'
;
import
{
arrayToTree
}
from
'
@/utils
'
;
import
{
arrayToTree
}
from
'
@/utils
'
;
...
...
src/pages/system/organization/orgmanagement/Org.vue
View file @
49eca53c
...
@@ -11,15 +11,15 @@
...
@@ -11,15 +11,15 @@
<template
#drawer
>
<template
#drawer
>
<Form
ref=
"form"
:tableRef=
"$refs['table']"
/>
<Form
ref=
"form"
:tableRef=
"$refs['table']"
/>
</
template
>
</
template
>
<a-table-column
title=
"名称
"
data-index=
"orgName"
/>
<a-table-column
:title=
"$t('basic.name')
"
data-index=
"orgName"
/>
<a-table-column
title=
"组织分类
"
#default=
"row"
>
<a-table-column
:title=
"$t('table.type')
"
#default=
"row"
>
<a-tag
color=
"#87d068"
v-if=
"row.orgType === 'ORGANIZATION'"
>
{{ row.orgTypeName }}
</a-tag>
<a-tag
color=
"#87d068"
v-if=
"row.orgType === 'ORGANIZATION'"
>
{{ row.orgTypeName }}
</a-tag>
<a-tag
color=
"#108ee9"
v-if=
"row.orgType === 'DEPARTMENT'"
>
{{ row.orgTypeName }}
</a-tag>
<a-tag
color=
"#108ee9"
v-if=
"row.orgType === 'DEPARTMENT'"
>
{{ row.orgTypeName }}
</a-tag>
</a-table-column>
</a-table-column>
<a-table-column
title=
"说明
"
data-index=
"remark"
/>
<a-table-column
:title=
"$t('table.remark')
"
data-index=
"remark"
/>
<a-table-column
title=
"操作
"
>
<a-table-column
:title=
"$t('table.operation')
"
>
<
template
#default=
"row"
>
<
template
#default=
"row"
>
<a
@
click=
"() => view(row, 1)"
>
编辑
</a>
<a
@
click=
"() => view(row, 1)"
>
{{
$t
(
'
table.edit
'
)
}}
</a>
<a-divider
type=
"vertical"
/>
<a-divider
type=
"vertical"
/>
<PopconfirmDelete
:url=
"`/api/v1/organizations/$
{row.orgId}`" :cb="refreshTable" />
<PopconfirmDelete
:url=
"`/api/v1/organizations/$
{row.orgId}`" :cb="refreshTable" />
</
template
>
</
template
>
...
@@ -75,4 +75,4 @@ export default {
...
@@ -75,4 +75,4 @@ export default {
},
},
},
},
};
};
</
script
>
</
script
>
\ No newline at end of file
src/pages/system/organization/orgmanagement/form.vue
View file @
49eca53c
<
template
>
<
template
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"DrawerForm"
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"DrawerForm"
>
<a-form-model-item
label=
"组织分类
"
prop=
"orgType"
>
<a-form-model-item
:label=
"$t('table.type')
"
prop=
"orgType"
>
<a-select
v-model=
"form.orgType"
:disabled=
"isView"
>
<a-select
v-model=
"form.orgType"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
>
<a-select-option
value=
"ORGANIZATION"
>
组织
</a-select-option>
<a-select-option
value=
"ORGANIZATION"
>
{{
$t
(
'
system.organization
'
)
}}
</a-select-option>
<a-select-option
value=
"DEPARTMENT"
>
部门
</a-select-option>
<a-select-option
value=
"DEPARTMENT"
>
{{
$t
(
'
table.department
'
)
}}
</a-select-option>
</a-select>
</a-select>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"名称
"
prop=
"orgName"
>
<a-form-model-item
:label=
"$t('basic.name')
"
prop=
"orgName"
>
<a-input
v-model=
"form.orgName"
:disabled=
"isView"
/>
<a-input
v-model=
"form.orgName"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"上级组织名称"
prop=
"parentOrgId"
>
<a-form-model-item
:label=
"$t('system.parentName')"
prop=
"parentOrgId"
>
<a-select
v-model=
"form.parentOrgId"
disabled
:options=
"options"
/>
<a-select
v-model=
"form.parentOrgId"
disabled
:options=
"options"
:placeholder=
"$t('select.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
v-if=
"form.orgType === 'DEPARTMENT'"
label=
"岗位
"
prop=
"orgJobs"
>
<a-form-model-item
v-if=
"form.orgType === 'DEPARTMENT'"
:label=
"$t('system.jobs')
"
prop=
"orgJobs"
>
<RequestSelect
<RequestSelect
:formatData=
"formatData"
:formatData=
"formatData"
:request=
"Api.getJobs"
:request=
"Api.getJobs"
...
@@ -21,11 +26,16 @@
...
@@ -21,11 +26,16 @@
:disabled=
"isView"
:disabled=
"isView"
/>
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"显示顺序
"
prop=
"viewIndex"
>
<a-form-model-item
:label=
"$t('order')
"
prop=
"viewIndex"
>
<a-input
v-model=
"form.viewIndex"
:disabled=
"isView"
/>
<a-input
v-model=
"form.viewIndex"
:disabled=
"isView"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"描述"
prop=
"remark"
>
<a-form-model-item
:label=
"$t('table.remark')"
prop=
"remark"
>
<a-textarea
v-model=
"form.remark"
:disabled=
"isView"
:rows=
"4"
/>
<a-textarea
v-model=
"form.remark"
:disabled=
"isView"
:rows=
"4"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
</a-form-model>
</a-form-model>
</
template
>
</
template
>
...
@@ -51,14 +61,14 @@ export default {
...
@@ -51,14 +61,14 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
options
:
[{
value
:
0
,
label
:
'
组织更目录
'
,
key
:
0
}],
options
:
[{
value
:
0
,
label
:
this
.
$t
(
'
system.organizationRoot
'
)
,
key
:
0
}],
form
:
{
form
:
{
parentOrgId
:
0
,
parentOrgId
:
0
,
},
},
rules
:
{
rules
:
{
orgName
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
orgName
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.error
'
)
,
trigger
:
'
change
'
}],
orgType
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
orgType
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.error
'
)
,
trigger
:
'
change
'
}],
viewIndex
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
viewIndex
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.error
'
)
,
trigger
:
'
change
'
}],
},
},
Api
,
Api
,
formatData
:
{
value
:
'
jobId
'
,
label
:
'
jobName
'
,
key
:
'
jobId
'
},
formatData
:
{
value
:
'
jobId
'
,
label
:
'
jobName
'
,
key
:
'
jobId
'
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment