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
31a5b39e
Commit
31a5b39e
authored
Jul 21, 2021
by
陈浩玮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
国际化
parent
593f5e6f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
75 additions
and
32 deletions
+75
-32
src/local/index.js
src/local/index.js
+4
-0
src/local/table.js
src/local/table.js
+28
-1
src/pages/ranger/basic/place/add_edit.vue
src/pages/ranger/basic/place/add_edit.vue
+19
-9
src/pages/ranger/basic/place/exempt.vue
src/pages/ranger/basic/place/exempt.vue
+5
-3
src/pages/ranger/basic/place/index.vue
src/pages/ranger/basic/place/index.vue
+18
-18
src/pages/ranger/basic/unit/index.vue
src/pages/ranger/basic/unit/index.vue
+1
-1
No files found.
src/local/index.js
View file @
31a5b39e
...
...
@@ -2,6 +2,8 @@ import selectLang from './select';
import
tableLang
from
'
./table
'
;
import
userLang
from
'
./user
'
;
import
systemLang
from
'
./system
'
;
import
InputLang
from
'
./input
'
;
import
OtherLang
from
'
./other
'
;
const
zh_CN
=
{};
const
en_US
=
{};
...
...
@@ -18,5 +20,7 @@ formatLang(selectLang);
formatLang
(
tableLang
);
formatLang
(
userLang
);
formatLang
(
systemLang
);
formatLang
(
InputLang
);
formatLang
(
OtherLang
);
export
{
en_US
,
zh_CN
};
src/local/table.js
View file @
31a5b39e
...
...
@@ -19,7 +19,8 @@ export default {
sender
:
[
'
发送者
'
,
'
Sender
'
],
recipient
:
[
'
接受者
'
,
'
Recipient
'
],
'
table.organization
'
:
[
'
所属组织
'
,
'
Organization
'
],
'
table.regionName
'
:
[
'
地区名称
'
,
'
RegionName
'
],
'
table.regionName
'
:
[
'
地区名称
'
,
'
Region Name
'
],
'
table.region
'
:
[
'
地区
'
,
'
Region
'
],
'
table.remark
'
:
[
'
备注
'
,
'
Remark
'
],
'
table.reviser
'
:
[
'
修改人
'
,
'
Reviser
'
],
'
table.revisionTime
'
:
[
'
修改时间
'
,
'
Revision Time
'
],
...
...
@@ -33,4 +34,30 @@ export default {
'
table.confirmReset
'
:
[
'
确认是否重置
'
,
'
Confirm Reset
'
],
'
table.hasSelectedSome
'
:
[
'
已选择{num}项
'
,
'
{num} have been selected
'
],
'
table.view
'
:
[
'
查看
'
,
'
View
'
],
'
table.export
'
:
[
'
导出
'
,
'
export
'
],
'
table.placeName
'
:
[
'
地点名称
'
,
'
Place Name
'
],
'
table.place
'
:
[
'
地点
'
,
'
place
'
],
'
table.QrCode
'
:
[
'
二维码
'
,
'
Qr Code
'
],
'
table.ElectronicTags
'
:
[
'
电子标签
'
,
'
Electronic tags
'
],
'
table.exemption
'
:
[
'
免检
'
,
'
Exemption
'
],
'
table.export.tip
'
:
[
'
请选择需要导出的数据!
'
,
'
Please select the data you want to export!
'
],
'
table.keyword
'
:
[
'
关键字
'
,
'
keyword
'
],
'
table.unitName
'
:
[
'
单元名称
'
,
'
Unit Name
'
],
'
table.unit
'
:
[
'
单元
'
,
'
Unit
'
],
'
table.equipmentCode
'
:
[
'
设备编号
'
,
'
Qquipment Code
'
],
'
table.itemName
'
:
[
'
项目名称
'
,
'
Item Name
'
],
'
table.item
'
:
[
'
项目
'
,
'
Item
'
],
'
table.dataType
'
:
[
'
数据类型
'
,
'
Data Type
'
],
'
table.majorName
'
:
[
'
专业名称
'
,
'
Major Name
'
],
'
table.major
'
:
[
'
专业
'
,
'
Major
'
],
'
table.personnel
'
:
[
'
人员
'
,
'
Personnel
'
],
'
table.department
'
:
[
'
部门
'
,
'
Department
'
],
'
table.exemptionType
'
:
[
'
免检类型
'
,
'
Exemption Type
'
],
'
table.exemptionName
'
:
[
'
免检地点/单元名称
'
,
'
Place/Unit Exempted
'
],
'
table.type
'
:
[
'
类型
'
,
'
Type
'
],
'
table.time
'
:
[
'
时间
'
,
'
Time
'
],
'
table.time.start
'
:
[
'
开始时间
'
,
'
Start Time
'
],
'
table.time.end
'
:
[
'
结束时间
'
,
'
Start End
'
],
'
table.reason
'
:
[
'
原因
'
,
'
Reason
'
],
'
table.state
'
:
[
'
状态
'
,
'
State
'
],
};
src/pages/ranger/basic/place/add_edit.vue
View file @
31a5b39e
<
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=
"placeName"
>
<a-input
v-model=
"form.placeName"
:disabled=
"isView"
/>
<a-form-model-item
:label=
"$t('table.placeName')
"
prop=
"placeName"
>
<a-input
v-model=
"form.placeName"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
<a-form-model-item
label=
"所属地区
"
prop=
"regionId"
>
<a-form-model-item
:label=
"$t('table.regionName')
"
prop=
"regionId"
>
<UrlSelect
v-model=
"form.regionId"
url=
"/ranger/inspection/api/v1/region/list"
labelFiled=
"regionName"
valueFiled=
"regionId"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
/>
</a-form-model-item>
<a-form-model-item
label=
"二维码
"
prop=
"qrCode"
>
<a-input
v-model=
"form.qrCode"
:disabled=
"isView"
/>
<a-form-model-item
:label=
"$t('table.QrCode')
"
prop=
"qrCode"
>
<a-input
v-model=
"form.qrCode"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
<a-form-model-item
label=
"二维码"
prop=
"electronicTag"
>
<a-input
v-model=
"form.electronicTag"
:disabled=
"isView"
/>
<a-form-model-item
:label=
"$t('table.ElectronicTags')"
prop=
"electronicTag"
>
<a-input
v-model=
"form.electronicTag"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</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
:placeholder=
"$t('input.placeholder')"
:rows=
"4"
v-model=
"form.remark"
:disabled=
"isView"
/>
</a-form-model-item>
</a-form-model>
</Wraper>
...
...
src/pages/ranger/basic/place/exempt.vue
View file @
31a5b39e
...
...
@@ -4,9 +4,11 @@
<a-list-item
slot=
"renderItem"
slot-scope=
"item"
>
<a-card>
<template
#title
>
<a-tag
v-if=
"item.exemptionState === 'EFFECTIVE'"
color=
"#87d068"
>
有效
</a-tag>
<a-tag
v-else
color=
"#f50"
>
无效
</a-tag>
{{
`${item.startTime
}
至 ${item.endTime
}
`
}}
<a-tag
v-if=
"item.exemptionState === 'EFFECTIVE'"
color=
"#87d068"
>
{{
$t
(
'
other.tag.valid
'
)
}}
</a-tag>
<a-tag
v-else
color=
"#f50"
>
{{
t
(
'
other.tag.invalid
'
)
}}
</a-tag>
{{
`${item.startTime
}
${$t('other.to')
}
${item.endTime
}
`
}}
<
/template
>
{{
item
.
exemptionReason
}}
<
/a-card
>
...
...
src/pages/ranger/basic/place/index.vue
View file @
31a5b39e
...
...
@@ -8,22 +8,22 @@
ref=
"table"
>
<template
#search
="
{ query }">
<MoreItem
label=
"地区
"
>
<MoreItem
:label=
"$t('select.region')
"
>
<UrlSelect
v-model=
"query.regionId"
url=
"/ranger/inspection/api/v1/region/list"
labelFiled=
"regionName"
valueFiled=
"regionId"
placeholder=
"选择地区
"
:placeholder=
"$t('select.placeholder')
"
/>
</MoreItem>
<MoreItem
label=
"搜索
"
>
<a-input
v-model=
"query.inputValue"
placeholder=
"请输入地点名称/二维码/电子标签
"
/>
<MoreItem
:label=
"$t('input.search')
"
>
<a-input
v-model=
"query.inputValue"
:placeholder=
"$t('input.search.one.placeholder')
"
/>
</MoreItem>
</
template
>
<
template
#operation
>
<a-button
@
click=
"download"
>
导出
</a-button>
<a-button
@
click=
"download"
>
{{
$t
(
'
table.export
'
)
}}
</a-button>
</
template
>
<
template
#drawer=
"drawer"
>
...
...
@@ -31,12 +31,12 @@
<Exempt
v-else
v-bind=
"drawer"
/>
</
template
>
<a-table-column
title=
"地点名称
"
data-index=
"placeName"
/>
<a-table-column
title=
"所属地区
"
data-index=
"regionName"
/>
<a-table-column
title=
"二维码
"
data-index=
"qrCode"
/>
<a-table-column
title=
"电子标签
"
data-index=
"electronicTag"
/>
<a-table-column
title=
"修改人
"
data-index=
"editorName"
/>
<a-table-column
title=
"修改时间
"
data-index=
"editTime"
/>
<a-table-column
:title=
"$t('table.placeName')
"
data-index=
"placeName"
/>
<a-table-column
:title=
"$t('table.regionName')
"
data-index=
"regionName"
/>
<a-table-column
:title=
"$t('table.QrCode')
"
data-index=
"qrCode"
/>
<a-table-column
:title=
"$t('table.ElectronicTags')
"
data-index=
"electronicTag"
/>
<a-table-column
:title=
"$t('table.reviser')
"
data-index=
"editorName"
/>
<a-table-column
:title=
"$t('table.revisionTime')
"
data-index=
"editTime"
/>
</Table>
</template>
...
...
@@ -53,9 +53,9 @@ export default {
data
()
{
return
{
buttons
:
[
{
label
:
'
编辑
'
,
click
:
this
.
edit
},
{
label
:
'
详情
'
,
click
:
this
.
view
},
{
label
:
'
免检
'
,
click
:
this
.
exempt
},
{
label
:
this
.
$t
(
'
table.edit
'
)
,
click
:
this
.
edit
},
{
label
:
this
.
$t
(
'
table.details
'
)
,
click
:
this
.
view
},
{
label
:
this
.
$t
(
'
table.exemption
'
)
,
click
:
this
.
exempt
},
{
type
:
'
confirm
'
,
url
:
(
row
)
=>
`/ranger/inspection/api/v1/place/
${
row
.
placeId
}
`
,
...
...
@@ -70,16 +70,16 @@ 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
'
});
},
exempt
(
row
)
{
this
.
$refs
.
table
.
show
({
row
,
title
:
'
免检
'
,
type
:
'
exempt
'
});
this
.
$refs
.
table
.
show
({
row
,
title
:
this
.
$t
(
'
table.exemption
'
)
,
type
:
'
exempt
'
});
},
download
()
{
if
(
!
this
.
selected
?.
keys
?.
length
)
return
this
.
$message
.
error
(
'
请选择需要导出的数据
'
);
if
(
!
this
.
selected
?.
keys
?.
length
)
return
this
.
$message
.
error
(
this
.
$t
(
'
table.export.tip
'
)
);
downloadFileByUrl
(
`/ranger/inspection/api/v1/place/exportQrCodeData?placeIdList=
${
this
.
selected
.
keys
.
join
(
'
,
'
,
...
...
src/pages/ranger/basic/unit/index.vue
View file @
31a5b39e
...
...
@@ -50,7 +50,7 @@ export default {
{
label
:
'
编辑
'
,
click
:
this
.
edit
},
{
label
:
'
详情
'
,
click
:
this
.
view
},
{
label
:
'
免检
'
,
click
:
this
.
view
},
{
label
:
'
文档
'
,
click
:
this
.
view
},
//
{ label: '文档', click: this.view },
{
type
:
'
confirm
'
,
url
:
(
row
)
=>
`/ranger/inspection/api/v1/units/
${
row
.
unitId
}
`
,
...
...
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