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
9ddea3b7
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
>
<a-popconfirm
:title=
"title"
ok-text=
"确认"
cancel-text=
"取消"
@
confirm=
"confirm"
>
<a>
{{
label
}}
</a>
<a-popconfirm
: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>
</
template
>
...
...
@@ -17,7 +22,6 @@ export default {
},
title
:
{
type
:
String
,
default
:
'
确认是否删除
'
,
},
onOk
:
{
type
:
Function
,
...
...
@@ -25,7 +29,6 @@ export default {
},
label
:
{
type
:
String
,
default
:
'
删除
'
,
},
},
methods
:
{
...
...
src/components/table/wraper.vue
View file @
9ddea3b7
...
...
@@ -8,9 +8,11 @@
<template>
<a-divider
/>
<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"
>
<a-button
type=
"primary"
@
click=
"ok"
:loading=
"loading"
>
确认
</a-button>
<a-button
type=
"primary"
@
click=
"ok"
:loading=
"loading"
>
{{
$t
(
'
table.confirm
'
)
}}
</a-button>
</slot>
</a-space>
</
template
>
...
...
src/local/table.js
View file @
9ddea3b7
...
...
@@ -9,7 +9,7 @@ export default {
'
table.inspectionStartTime
'
:
[
'
巡检开始时间
'
,
'
InspectionStartTime
'
],
'
table.inspectionEndTime
'
:
[
'
巡检结束时间
'
,
'
InspectionEndTime
'
],
'
table.newTemporaryTask
'
:
[
'
新建临时任务
'
,
'
New Temporary Task
'
],
'
table.detail
'
:
[
'
详情
'
,
'
Detail
'
],
'
table.detail
s
'
:
[
'
详情
'
,
'
Details
'
],
'
table.progress
'
:
[
'
进度
'
,
'
Progress
'
],
'
table.pleaseSelect
'
:
[
'
请选择需要导出的数据
'
,
'
Please select the data to export
'
],
'
table.taskDetail
'
:
[
'
任务明细
'
,
'
Task Detail
'
],
...
...
@@ -18,4 +18,14 @@ export default {
content
:
[
'
内容
'
,
'
Content
'
],
sender
:
[
'
发送者
'
,
'
Sender
'
],
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
>
<Wraper
:hidden=
"hidden"
:onOk=
"submit"
:refresh=
"refresh"
:noFooter=
"isView"
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"form"
>
<a-form-model-item
label=
"地区名称"
prop=
"regionName"
>
<a-input
v-model=
"form.regionName"
:disabled=
"isView"
/>
<a-form-model-item
:label=
"$t('table.regionName')"
prop=
"regionName"
>
<a-input
v-model=
"form.regionName"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
<a-form-model-item
label=
"所属组织
"
prop=
"organizationId"
>
<a-form-model-item
:label=
"$t('table.organization')
"
prop=
"organizationId"
>
<UrlSelect
url=
"/api/v1/users/organizations"
labelFiled=
"orgName"
...
...
@@ -15,8 +19,13 @@
/>
</a-form-model-item>
<a-form-model-item
label=
"备注"
prop=
"remark"
>
<a-textarea
placeholder=
"Basic usage"
:rows=
"4"
v-model=
"form.remark"
:disabled=
"isView"
/>
<a-form-model-item
:label=
"$t('table.remark')"
prop=
"remark"
>
<a-textarea
:rows=
"4"
v-model=
"form.remark"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
</a-form-model>
</Wraper>
...
...
src/pages/ranger/basic/region/index.vue
View file @
9ddea3b7
...
...
@@ -7,7 +7,7 @@
ref=
"table"
>
<template
#search
="
{ query }">
<MoreItem
label=
"所属组织
"
>
<MoreItem
:label=
"$t('table.organization')
"
>
<UrlSelect
v-model=
"query.organizationId"
url=
"/api/v1/users/organizations"
...
...
@@ -15,8 +15,8 @@
valueFiled=
"orgId"
/>
</MoreItem>
<MoreItem
label=
"地区名称
"
>
<a-input
v-model=
"query.regionName"
/>
<MoreItem
:label=
"$t('table.regionName')
"
>
<a-input
v-model=
"query.regionName"
:placeholder=
"$t('input.placeholder')"
/>
</MoreItem>
</
template
>
...
...
@@ -24,11 +24,11 @@
<AddAndEdit
v-bind=
"drawer"
/>
</
template
>
<a-table-column
title=
"地区名称
"
data-index=
"regionName"
/>
<a-table-column
title=
"所属组织
"
data-index=
"organizationName"
/>
<a-table-column
title=
"备注
"
data-index=
"remark"
/>
<a-table-column
title=
"修改人
"
data-index=
"editorName"
/>
<a-table-column
title=
"修改时间
"
data-index=
"editTime"
/>
<a-table-column
:title=
"$t('table.regionName')
"
data-index=
"regionName"
/>
<a-table-column
:title=
"$t('table.organization')
"
data-index=
"organizationName"
/>
<a-table-column
:title=
"$t('table.remark')
"
data-index=
"remark"
/>
<a-table-column
:title=
"$t('table.reviser')
"
data-index=
"editorName"
/>
<a-table-column
:title=
"$t('table.revisionTime')
"
data-index=
"editTime"
/>
</Table>
</template>
...
...
@@ -43,8 +43,8 @@ export default {
data
()
{
return
{
buttons
:
[
{
label
:
'
编辑
'
,
click
:
this
.
edit
},
{
label
:
'
详情
'
,
click
:
this
.
view
},
{
label
:
this
.
$t
(
'
table.edit
'
)
,
click
:
this
.
edit
},
{
label
:
this
.
$t
(
'
table.details
'
)
,
click
:
this
.
view
},
{
type
:
'
confirm
'
,
url
:
(
row
)
=>
`/ranger/inspection/api/v1/region/
${
row
.
regionId
}
`
,
...
...
@@ -58,10 +58,10 @@ export default {
this
.
$refs
.
table
.
getData
();
},
edit
(
row
)
{
this
.
$refs
.
table
.
show
({
row
,
title
:
'
编辑
'
,
type
:
'
edit
'
});
this
.
$refs
.
table
.
show
({
row
,
title
:
this
.
$t
(
'
table.edit
'
)
,
type
:
'
edit
'
});
},
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