Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
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
9ddea3b7
You need to sign in or sign up before continuing.
Commit
9ddea3b7
authored
Jul 19, 2021
by
shuiluo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 地区管理国际化完成
parent
cdfbe141
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
24 deletions
+48
-24
src/components/popconfirm_delete/index.vue
src/components/popconfirm_delete/index.vue
+7
-4
src/components/table/wraper.vue
src/components/table/wraper.vue
+4
-2
src/local/table.js
src/local/table.js
+11
-1
src/pages/ranger/basic/region/add_edit.vue
src/pages/ranger/basic/region/add_edit.vue
+14
-5
src/pages/ranger/basic/region/index.vue
src/pages/ranger/basic/region/index.vue
+12
-12
No files found.
src/components/popconfirm_delete/index.vue
View file @
9ddea3b7
<
template
>
<
template
>
<a-popconfirm
:title=
"title"
ok-text=
"确认"
cancel-text=
"取消"
@
confirm=
"confirm"
>
<a-popconfirm
<a>
{{
label
}}
</a>
:title=
"title || $t('table.confirmDelete')"
:ok-text=
"$t('table.confirm')"
:cancel-text=
"$t('table.cancel')"
@
confirm=
"confirm"
>
<a>
{{
label
||
$t
(
'
table.delete
'
)
}}
</a>
</a-popconfirm>
</a-popconfirm>
</
template
>
</
template
>
...
@@ -17,7 +22,6 @@ export default {
...
@@ -17,7 +22,6 @@ export default {
},
},
title
:
{
title
:
{
type
:
String
,
type
:
String
,
default
:
'
确认是否删除
'
,
},
},
onOk
:
{
onOk
:
{
type
:
Function
,
type
:
Function
,
...
@@ -25,7 +29,6 @@ export default {
...
@@ -25,7 +29,6 @@ export default {
},
},
label
:
{
label
:
{
type
:
String
,
type
:
String
,
default
:
'
删除
'
,
},
},
},
},
methods
:
{
methods
:
{
...
...
src/components/table/wraper.vue
View file @
9ddea3b7
...
@@ -8,9 +8,11 @@
...
@@ -8,9 +8,11 @@
<template>
<template>
<a-divider
/>
<a-divider
/>
<a-space
class=
"tw-justify-end"
>
<a-space
class=
"tw-justify-end"
>
<a-button
@
click=
"cancel"
>
取消
</a-button>
<a-button
@
click=
"cancel"
>
{{
$t
(
'
table.cancel
'
)
}}
</a-button>
<slot
name=
"footer"
v-if=
"!noFooter"
>
<slot
name=
"footer"
v-if=
"!noFooter"
>
<a-button
type=
"primary"
@
click=
"ok"
:loading=
"loading"
>
确认
</a-button>
<a-button
type=
"primary"
@
click=
"ok"
:loading=
"loading"
>
{{
$t
(
'
table.confirm
'
)
}}
</a-button>
</slot>
</slot>
</a-space>
</a-space>
</
template
>
</
template
>
...
...
src/local/table.js
View file @
9ddea3b7
...
@@ -9,7 +9,7 @@ export default {
...
@@ -9,7 +9,7 @@ export default {
'
table.inspectionStartTime
'
:
[
'
巡检开始时间
'
,
'
InspectionStartTime
'
],
'
table.inspectionStartTime
'
:
[
'
巡检开始时间
'
,
'
InspectionStartTime
'
],
'
table.inspectionEndTime
'
:
[
'
巡检结束时间
'
,
'
InspectionEndTime
'
],
'
table.inspectionEndTime
'
:
[
'
巡检结束时间
'
,
'
InspectionEndTime
'
],
'
table.newTemporaryTask
'
:
[
'
新建临时任务
'
,
'
New Temporary Task
'
],
'
table.newTemporaryTask
'
:
[
'
新建临时任务
'
,
'
New Temporary Task
'
],
'
table.detail
'
:
[
'
详情
'
,
'
Detail
'
],
'
table.detail
s
'
:
[
'
详情
'
,
'
Details
'
],
'
table.progress
'
:
[
'
进度
'
,
'
Progress
'
],
'
table.progress
'
:
[
'
进度
'
,
'
Progress
'
],
'
table.pleaseSelect
'
:
[
'
请选择需要导出的数据
'
,
'
Please select the data to export
'
],
'
table.pleaseSelect
'
:
[
'
请选择需要导出的数据
'
,
'
Please select the data to export
'
],
'
table.taskDetail
'
:
[
'
任务明细
'
,
'
Task Detail
'
],
'
table.taskDetail
'
:
[
'
任务明细
'
,
'
Task Detail
'
],
...
@@ -18,4 +18,14 @@ export default {
...
@@ -18,4 +18,14 @@ export default {
content
:
[
'
内容
'
,
'
Content
'
],
content
:
[
'
内容
'
,
'
Content
'
],
sender
:
[
'
发送者
'
,
'
Sender
'
],
sender
:
[
'
发送者
'
,
'
Sender
'
],
recipient
:
[
'
接受者
'
,
'
Recipient
'
],
recipient
:
[
'
接受者
'
,
'
Recipient
'
],
'
table.organization
'
:
[
'
所属组织
'
,
'
Organization
'
],
'
table.regionName
'
:
[
'
地区名称
'
,
'
RegionName
'
],
'
table.remark
'
:
[
'
备注
'
,
'
Remark
'
],
'
table.reviser
'
:
[
'
修改人
'
,
'
Reviser
'
],
'
table.revisionTime
'
:
[
'
修改时间
'
,
'
Revision Time
'
],
'
table.edit
'
:
[
'
编辑
'
,
'
Edit
'
],
'
table.confirm
'
:
[
'
确认
'
,
'
Confirm
'
],
'
table.cancel
'
:
[
'
取消
'
,
'
Cancel
'
],
'
table.delete
'
:
[
'
删除
'
,
'
Delete
'
],
'
table.confirmDelete
'
:
[
'
确认是否删除
'
,
'
Confirm To Delete
'
]
};
};
src/pages/ranger/basic/region/add_edit.vue
View file @
9ddea3b7
<
template
>
<
template
>
<Wraper
:hidden=
"hidden"
:onOk=
"submit"
:refresh=
"refresh"
:noFooter=
"isView"
>
<Wraper
:hidden=
"hidden"
:onOk=
"submit"
:refresh=
"refresh"
:noFooter=
"isView"
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"form"
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"form"
>
<a-form-model-item
label=
"地区名称"
prop=
"regionName"
>
<a-form-model-item
:label=
"$t('table.regionName')"
prop=
"regionName"
>
<a-input
v-model=
"form.regionName"
:disabled=
"isView"
/>
<a-input
v-model=
"form.regionName"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"所属组织
"
prop=
"organizationId"
>
<a-form-model-item
:label=
"$t('table.organization')
"
prop=
"organizationId"
>
<UrlSelect
<UrlSelect
url=
"/api/v1/users/organizations"
url=
"/api/v1/users/organizations"
labelFiled=
"orgName"
labelFiled=
"orgName"
...
@@ -15,8 +19,13 @@
...
@@ -15,8 +19,13 @@
/>
/>
</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
placeholder=
"Basic usage"
:rows=
"4"
v-model=
"form.remark"
:disabled=
"isView"
/>
<a-textarea
:rows=
"4"
v-model=
"form.remark"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
</a-form-model>
</a-form-model>
</Wraper>
</Wraper>
...
...
src/pages/ranger/basic/region/index.vue
View file @
9ddea3b7
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
ref=
"table"
ref=
"table"
>
>
<template
#search
="
{ query }">
<template
#search
="
{ query }">
<MoreItem
label=
"所属组织
"
>
<MoreItem
:label=
"$t('table.organization')
"
>
<UrlSelect
<UrlSelect
v-model=
"query.organizationId"
v-model=
"query.organizationId"
url=
"/api/v1/users/organizations"
url=
"/api/v1/users/organizations"
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
valueFiled=
"orgId"
valueFiled=
"orgId"
/>
/>
</MoreItem>
</MoreItem>
<MoreItem
label=
"地区名称
"
>
<MoreItem
:label=
"$t('table.regionName')
"
>
<a-input
v-model=
"query.regionName"
/>
<a-input
v-model=
"query.regionName"
:placeholder=
"$t('input.placeholder')"
/>
</MoreItem>
</MoreItem>
</
template
>
</
template
>
...
@@ -24,11 +24,11 @@
...
@@ -24,11 +24,11 @@
<AddAndEdit
v-bind=
"drawer"
/>
<AddAndEdit
v-bind=
"drawer"
/>
</
template
>
</
template
>
<a-table-column
title=
"地区名称
"
data-index=
"regionName"
/>
<a-table-column
:title=
"$t('table.regionName')
"
data-index=
"regionName"
/>
<a-table-column
title=
"所属组织
"
data-index=
"organizationName"
/>
<a-table-column
:title=
"$t('table.organization')
"
data-index=
"organizationName"
/>
<a-table-column
title=
"备注
"
data-index=
"remark"
/>
<a-table-column
:title=
"$t('table.remark')
"
data-index=
"remark"
/>
<a-table-column
title=
"修改人
"
data-index=
"editorName"
/>
<a-table-column
:title=
"$t('table.reviser')
"
data-index=
"editorName"
/>
<a-table-column
title=
"修改时间
"
data-index=
"editTime"
/>
<a-table-column
:title=
"$t('table.revisionTime')
"
data-index=
"editTime"
/>
</Table>
</Table>
</template>
</template>
...
@@ -43,8 +43,8 @@ export default {
...
@@ -43,8 +43,8 @@ export default {
data
()
{
data
()
{
return
{
return
{
buttons
:
[
buttons
:
[
{
label
:
'
编辑
'
,
click
:
this
.
edit
},
{
label
:
this
.
$t
(
'
table.edit
'
)
,
click
:
this
.
edit
},
{
label
:
'
详情
'
,
click
:
this
.
view
},
{
label
:
this
.
$t
(
'
table.details
'
)
,
click
:
this
.
view
},
{
{
type
:
'
confirm
'
,
type
:
'
confirm
'
,
url
:
(
row
)
=>
`/ranger/inspection/api/v1/region/
${
row
.
regionId
}
`
,
url
:
(
row
)
=>
`/ranger/inspection/api/v1/region/
${
row
.
regionId
}
`
,
...
@@ -58,10 +58,10 @@ export default {
...
@@ -58,10 +58,10 @@ export default {
this
.
$refs
.
table
.
getData
();
this
.
$refs
.
table
.
getData
();
},
},
edit
(
row
)
{
edit
(
row
)
{
this
.
$refs
.
table
.
show
({
row
,
title
:
'
编辑
'
,
type
:
'
edit
'
});
this
.
$refs
.
table
.
show
({
row
,
title
:
this
.
$t
(
'
table.edit
'
)
,
type
:
'
edit
'
});
},
},
view
(
row
)
{
view
(
row
)
{
this
.
$refs
.
table
.
show
({
row
,
title
:
'
编辑
'
,
type
:
'
view
'
});
this
.
$refs
.
table
.
show
({
row
,
title
:
this
.
$t
(
'
table.details
'
)
,
type
:
'
view
'
});
},
},
},
},
};
};
...
...
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