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
aa2eaa77
Commit
aa2eaa77
authored
Jul 21, 2021
by
陈浩玮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
国际化
parent
31a5b39e
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
266 additions
and
161 deletions
+266
-161
src/local/input.js
src/local/input.js
+10
-0
src/local/other.js
src/local/other.js
+16
-0
src/local/select.js
src/local/select.js
+3
-1
src/local/user.js
src/local/user.js
+1
-0
src/pages/ranger/basic/exemption/add_edit.vue
src/pages/ranger/basic/exemption/add_edit.vue
+22
-14
src/pages/ranger/basic/exemption/index.vue
src/pages/ranger/basic/exemption/index.vue
+30
-21
src/pages/ranger/basic/item/add_edit.vue
src/pages/ranger/basic/item/add_edit.vue
+92
-58
src/pages/ranger/basic/item/index.vue
src/pages/ranger/basic/item/index.vue
+27
-23
src/pages/ranger/basic/major/add_edit.vue
src/pages/ranger/basic/major/add_edit.vue
+15
-5
src/pages/ranger/basic/major/add_member.vue
src/pages/ranger/basic/major/add_member.vue
+1
-1
src/pages/ranger/basic/major/index.vue
src/pages/ranger/basic/major/index.vue
+14
-13
src/pages/ranger/basic/major/member.vue
src/pages/ranger/basic/major/member.vue
+4
-4
src/pages/ranger/basic/unit/add_edit.vue
src/pages/ranger/basic/unit/add_edit.vue
+15
-7
src/pages/ranger/basic/unit/index.vue
src/pages/ranger/basic/unit/index.vue
+16
-14
No files found.
src/local/input.js
0 → 100644
View file @
aa2eaa77
// 0 中文, 1 英文
export
default
{
'
input.placeholder
'
:
[
'
请输入
'
,
'
Please enter
'
],
'
input.search.one.placeholder
'
:
[
'
请输入地点名称/二维码/电子标签
'
,
'
Please enter location name/QR code/electronic tag
'
,
],
'
input.search
'
:
[
'
搜索
'
,
'
search
'
],
'
input.error
'
:
[
'
输入的内容有误!
'
,
'
Incorrect Input!
'
],
};
src/local/other.js
0 → 100644
View file @
aa2eaa77
// 0 中文, 1 英文
export
default
{
'
other.tag.valid
'
:
[
'
有效
'
,
'
Valid
'
],
'
other.tag.invalid
'
:
[
'
无效
'
,
'
Invalid
'
],
'
other.to
'
:
[
'
至
'
,
'
To
'
],
'
other.normal
'
:
[
'
正常值
'
,
'
normal
'
],
'
other.outliers
'
:
[
'
异常值
'
,
'
outliers
'
],
'
other.defaultValue
'
:
[
'
默认值
'
,
'
Default Value
'
],
'
other.upperLimit
'
:
[
'
上限值
'
,
'
Upper Limit
'
],
'
other.lowerLimit
'
:
[
'
下限值
'
,
'
Lower Limit
'
],
'
other.TEXT
'
:
[
'
文本类型
'
,
'
Text Type
'
],
'
other.OPTION
'
:
[
'
选项类型
'
,
'
Option Type
'
],
'
other.NUMERIC
'
:
[
'
数值类型
'
,
'
Numeric Type
'
],
'
other.on
'
:
[
'
开
'
,
'
On
'
],
'
other.off
'
:
[
'
关
'
,
'
Off
'
],
};
src/local/select.js
View file @
aa2eaa77
...
@@ -11,5 +11,7 @@ export default {
...
@@ -11,5 +11,7 @@ export default {
'
select.examine
'
:
[
'
巡检状态
'
,
'
Examine Status
'
],
'
select.examine
'
:
[
'
巡检状态
'
,
'
Examine Status
'
],
'
select.taskType
'
:
[
'
任务类型
'
,
'
Task Type
'
],
'
select.taskType
'
:
[
'
任务类型
'
,
'
Task Type
'
],
'
select.examiner
'
:
[
'
巡检人
'
,
'
Examiner
'
],
'
select.examiner
'
:
[
'
巡检人
'
,
'
Examiner
'
],
'
select.routeName
'
:
[
'
线路名称
'
,
'
RouteName
'
],
'
select.routeName
'
:
[
'
线路名称
'
,
'
Route Name
'
],
'
select.option.place
'
:
[
'
地点免检
'
,
'
Place Exemption
'
],
'
select.option.unit
'
:
[
'
单元免检
'
,
'
Unit Exemption
'
],
};
};
src/local/user.js
View file @
aa2eaa77
...
@@ -29,4 +29,5 @@ export default {
...
@@ -29,4 +29,5 @@ export default {
'
user.confirmUnlock
'
:
[
'
确认是否解锁
'
,
'
Confirm Whether To Unlock
'
],
'
user.confirmUnlock
'
:
[
'
确认是否解锁
'
,
'
Confirm Whether To Unlock
'
],
'
user.locking
'
:
[
'
锁定
'
,
'
Locking
'
],
'
user.locking
'
:
[
'
锁定
'
,
'
Locking
'
],
'
user.confirmLocked
'
:
[
'
确认是否锁定
'
,
'
Confirm Locked
'
],
'
user.confirmLocked
'
:
[
'
确认是否锁定
'
,
'
Confirm Locked
'
],
'
user.userName
'
:
[
'
用户姓名
'
,
'
User Name
'
],
};
};
src/pages/ranger/basic/exemption/add_edit.vue
View file @
aa2eaa77
<
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=
"exemptionType"
>
<a-form-model-item
:label=
"$t('table.exemptionType')"
prop=
"exemptionType"
>
<a-select
class=
"tw-w-full"
v-model=
"form.exemptionType"
:disabled=
"isView"
>
<a-select
<a-select-option
value=
"PLACE"
>
地点免检
</a-select-option>
class=
"tw-w-full"
<a-select-option
value=
"UNIT"
>
单元免检
</a-select-option>
v-model=
"form.exemptionType"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
>
<a-select-option
value=
"PLACE"
>
{{
$t
(
'
select.option.place
'
)
}}
</a-select-option>
<a-select-option
value=
"UNIT"
>
{{
$t
(
'
select.option.unit
'
)
}}
</a-select-option>
</a-select>
</a-select>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"所属地区
"
prop=
"regionId"
>
<a-form-model-item
:label=
"$t('table.region')
"
prop=
"regionId"
>
<UrlSelect
<UrlSelect
url=
"/ranger/inspection/api/v1/region/list"
url=
"/ranger/inspection/api/v1/region/list"
v-model=
"form.regionId"
v-model=
"form.regionId"
labelFiled=
"regionName"
labelFiled=
"regionName"
valueFiled=
"regionId"
valueFiled=
"regionId"
:disabled=
"isView"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
/>
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"所属地点
"
prop=
"placeId"
>
<a-form-model-item
:label=
"$t('table.place')
"
prop=
"placeId"
>
<UrlSelect
<UrlSelect
v-model=
"form.placeId"
v-model=
"form.placeId"
:url=
"
:url=
"
...
@@ -26,23 +32,25 @@
...
@@ -26,23 +32,25 @@
labelFiled="placeName"
labelFiled="placeName"
valueFiled="placeId"
valueFiled="placeId"
:disabled="isView"
:disabled="isView"
:placeholder="$t('select.placeholder')"
/>
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"时间
"
prop=
"startTime"
>
<a-form-model-item
:label=
"$t('table.time')
"
prop=
"startTime"
>
<RangeTime
<RangeTime
:startTime.sync=
"form.startTime"
:startTime.sync=
"form.startTime"
:endTime.sync=
"form.endTime"
:endTime.sync=
"form.endTime"
showTime
showTime
:disabled=
"isView"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
/>
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"免检原因
"
prop=
"exemptionReason"
>
<a-form-model-item
:label=
"$t('table.reason')
"
prop=
"exemptionReason"
>
<a-textarea
<a-textarea
placeholder=
"Basic usage"
:rows=
"4"
:rows=
"4"
v-model=
"form.exemptionReason"
v-model=
"form.exemptionReason"
:disabled=
"isView"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
/>
</a-form-model-item>
</a-form-model-item>
</a-form-model>
</a-form-model>
...
@@ -61,11 +69,11 @@ export default {
...
@@ -61,11 +69,11 @@ export default {
data
:
()
=>
({
data
:
()
=>
({
form
:
{},
form
:
{},
rules
:
{
rules
:
{
exemptionType
:
[{
required
:
true
}],
exemptionType
:
[{
required
:
true
,
message
:
this
.
$t
(
'
select.placeholder
'
)
}],
regionId
:
[{
required
:
true
}],
regionId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
select.placeholder
'
)
}],
placeId
:
[{
required
:
true
}],
placeId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
select.placeholder
'
)
}],
exemptionReason
:
[{
required
:
true
}],
exemptionReason
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.placeholder
'
)
}],
startTime
:
[{
required
:
true
}],
startTime
:
[{
required
:
true
,
message
:
this
.
$t
(
'
select.placeholder
'
)
}],
},
},
}),
}),
...
...
src/pages/ranger/basic/exemption/index.vue
View file @
aa2eaa77
...
@@ -8,21 +8,26 @@
...
@@ -8,21 +8,26 @@
:defaultQuery=
"defaultQuery"
:defaultQuery=
"defaultQuery"
>
>
<template
#search
="
{ query }">
<template
#search
="
{ query }">
<MoreItem
label=
"免检类型"
>
<MoreItem
:label=
"$t('table.exemptionType')"
>
<a-select
class=
"tw-w-full"
v-model=
"query.exemptionType"
>
<a-select
<a-select-option
value=
"PLACE"
>
地点免检
</a-select-option>
class=
"tw-w-full"
<a-select-option
value=
"UNIT"
>
单元免检
</a-select-option>
v-model=
"query.exemptionType"
:placeholder=
"$t('select.placeholder')"
>
<a-select-option
value=
"PLACE"
>
{{
$t
(
'
select.option.place
'
)
}}
</a-select-option>
<a-select-option
value=
"UNIT"
>
{{
$t
(
'
select.option.unit
'
)
}}
</a-select-option>
</a-select>
</a-select>
</MoreItem>
</MoreItem>
<MoreItem
label=
"地区
"
>
<MoreItem
:label=
"$t('table.region')
"
>
<UrlSelect
<UrlSelect
url=
"/ranger/inspection/api/v1/region/list"
url=
"/ranger/inspection/api/v1/region/list"
v-model=
"query.regionId"
v-model=
"query.regionId"
labelFiled=
"regionName"
labelFiled=
"regionName"
valueFiled=
"regionId"
valueFiled=
"regionId"
:placeholder=
"$t('select.placeholder')"
/>
/>
</MoreItem>
</MoreItem>
<MoreItem
label=
"地点
"
>
<MoreItem
:label=
"$t('table.place')
"
>
<UrlSelect
<UrlSelect
v-model=
"query.placeId"
v-model=
"query.placeId"
:url=
"
:url=
"
...
@@ -30,14 +35,16 @@
...
@@ -30,14 +35,16 @@
"
"
labelFiled="placeName"
labelFiled="placeName"
valueFiled="placeId"
valueFiled="placeId"
:placeholder="$t('select.placeholder')"
/>
/>
</MoreItem>
</MoreItem>
<MoreItem
label=
"单元
"
v-if=
"query.exemptionType === 'UNIT'"
>
<MoreItem
:label=
"$t('table.unit')
"
v-if=
"query.exemptionType === 'UNIT'"
>
<UrlSelect
<UrlSelect
v-model=
"query.unitId"
v-model=
"query.unitId"
:url=
"query.placeId ? `/ranger/inspection/api/v1/units/places/$
{query.placeId}/list` : ''"
:url=
"query.placeId ? `/ranger/inspection/api/v1/units/places/$
{query.placeId}/list` : ''"
labelFiled="unitName"
labelFiled="unitName"
valueFiled="unitId"
valueFiled="unitId"
:placeholder="$t('select.placeholder')"
/>
/>
</MoreItem>
</MoreItem>
</
template
>
</
template
>
...
@@ -46,19 +53,21 @@
...
@@ -46,19 +53,21 @@
<AddAndEdit
v-bind=
"drawer"
/>
<AddAndEdit
v-bind=
"drawer"
/>
</
template
>
</
template
>
<a-table-column
title=
"免检地点/单元名称
"
data-index=
"exemptionName"
/>
<a-table-column
:title=
"$t('table.exemptionName')
"
data-index=
"exemptionName"
/>
<a-table-column
title=
"所属地区
"
data-index=
"regionName"
/>
<a-table-column
:title=
"$t('table.region')
"
data-index=
"regionName"
/>
<a-table-column
title=
"类型
"
>
<a-table-column
:title=
"$t('table.type')
"
>
<
template
#default=
"row"
>
<
template
#default=
"row"
>
<span>
{{
row
.
exemptionType
===
'
PLACE
'
?
'
地点免检
'
:
'
单元免检
'
}}
</span>
<span>
{{
row
.
exemptionType
===
'
PLACE
'
?
$t
(
'
select.option.place
'
)
:
$t
(
'
select.option.unit
'
)
}}
</span>
</
template
>
</
template
>
</a-table-column>
</a-table-column>
<a-table-column
title=
"开始时间
"
data-index=
"startTime"
/>
<a-table-column
:title=
"$t('table.time.start')
"
data-index=
"startTime"
/>
<a-table-column
title=
"结束时间
"
data-index=
"endTime"
/>
<a-table-column
:title=
"$t('table.time.start')
"
data-index=
"endTime"
/>
<a-table-column
title=
"原因
"
data-index=
"exemptionReason"
/>
<a-table-column
:title=
"$t('table.reason')
"
data-index=
"exemptionReason"
/>
<a-table-column
title=
"免检状态
"
data-index=
"exemptionStateName"
/>
<a-table-column
:title=
"$t('table.state')
"
data-index=
"exemptionStateName"
/>
<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>
...
@@ -76,8 +85,8 @@ export default {
...
@@ -76,8 +85,8 @@ export default {
exemptionType
:
'
PLACE
'
,
exemptionType
:
'
PLACE
'
,
},
},
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/exemptions/
${
row
.
exemptionId
}
`
,
url
:
(
row
)
=>
`ranger/inspection/api/v1/exemptions/
${
row
.
exemptionId
}
`
,
...
@@ -91,10 +100,10 @@ export default {
...
@@ -91,10 +100,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
'
});
},
},
},
},
};
};
...
...
src/pages/ranger/basic/item/add_edit.vue
View file @
aa2eaa77
<
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=
"place
Name"
>
<a-form-model-item
:label=
"$t('table.placeholder')"
prop=
"item
Name"
>
<a-input
v-model=
"form.
placeName"
:disabled=
"isView
"
/>
<a-input
v-model=
"form.
itemName"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')
"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"所属地区
"
prop=
"regionId"
>
<a-form-model-item
:label=
"$t('table.region')
"
prop=
"regionId"
>
<UrlSelect
<UrlSelect
v-model=
"form.regionId"
v-model=
"form.regionId"
url=
"/ranger/inspection/api/v1/region/list"
url=
"/ranger/inspection/api/v1/region/list"
labelFiled=
"regionName"
labelFiled=
"regionName"
valueFiled=
"regionId"
valueFiled=
"regionId"
:disabled=
"isView"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
/>
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"所属地点
"
prop=
"placeId"
>
<a-form-model-item
:label=
"$t('table.place')
"
prop=
"placeId"
>
<UrlSelect
<UrlSelect
v-model=
"form.placeId"
v-model=
"form.placeId"
:url=
"
:url=
"
...
@@ -23,28 +24,30 @@
...
@@ -23,28 +24,30 @@
labelFiled="placeName"
labelFiled="placeName"
valueFiled="placeId"
valueFiled="placeId"
:disabled="isView"
:disabled="isView"
:placeholder="$t('select.placeholder')"
/>
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"所属单元
"
prop=
"unitId"
>
<a-form-model-item
:label=
"$t('table.unit')
"
prop=
"unitId"
>
<UrlSelect
<UrlSelect
v-model=
"form.unitId"
v-model=
"form.unitId"
:url=
"form.placeId ? `/ranger/inspection/api/v1/units/places/$
{form.placeId}/list` : ''"
:url=
"form.placeId ? `/ranger/inspection/api/v1/units/places/$
{form.placeId}/list` : ''"
labelFiled="unitName"
labelFiled="unitName"
valueFiled="unitId"
valueFiled="unitId"
:disabled="isView"
:disabled="isView"
:placeholder="$t('select.placeholder')"
/>
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"数据类型
"
prop=
"dataType"
>
<a-form-model-item
:label=
"$t('table.dataType')
"
prop=
"dataType"
>
<a-select
v-model=
"form.dataType"
:disabled=
"isView"
>
<a-select
v-model=
"form.dataType"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
>
<a-select-option
key=
"TEXT"
value=
"TEXT"
>
文本类型
</a-select-option>
<a-select-option
key=
"TEXT"
value=
"TEXT"
>
{{
$t
(
'
other.TEXT
'
)
}}
</a-select-option>
<a-select-option
key=
"OPTION"
value=
"OPTION"
>
选项类型
</a-select-option>
<a-select-option
key=
"OPTION"
value=
"OPTION"
>
{{
$t
(
'
other.OPTION
'
)
}}
</a-select-option>
<a-select-option
key=
"NUMERIC"
value=
"NUMERIC"
>
数值类型
</a-select-option>
<a-select-option
key=
"NUMERIC"
value=
"NUMERIC"
>
{{
$t
(
'
other.NUMERIC
'
)
}}
</a-select-option>
</a-select>
</a-select>
</a-form-model-item>
</a-form-model-item>
<div
v-if=
"form.dataType === 'TEXT'"
>
<div
v-if=
"form.dataType === 'TEXT'"
>
<a-form-model-item
label=
"默认值
"
prop=
"defaultText"
>
<a-form-model-item
:label=
"$t('other.defaultValue')
"
prop=
"defaultText"
>
<a-textarea
<a-textarea
placeholder=
"Basic usage
"
:placeholder=
"$t('input.placeholder')
"
:rows=
"4"
:rows=
"4"
v-model=
"form.defaultText"
v-model=
"form.defaultText"
:disabled=
"isView"
:disabled=
"isView"
...
@@ -52,37 +55,56 @@
...
@@ -52,37 +55,56 @@
</a-form-model-item>
</a-form-model-item>
</div>
</div>
<div
v-if=
"form.dataType === 'OPTION'"
>
<div
v-if=
"form.dataType === 'OPTION'"
>
<a-form-model-item
label=
"选项类型"
prop=
"optionType"
>
<a-form-model-item
:label=
"$t('other.OPTION')"
prop=
"optionType"
>
<a-select
v-model=
"form.optionType"
:disabled=
"isView"
>
<a-select
<a-select-option
key=
"TEXT"
value=
"TEXT"
>
开/关
</a-select-option>
v-model=
"form.optionType"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
>
<a-select-option
key=
"TEXT"
value=
"TEXT"
>
{{
`${$t('other.on')
}
/${$t('other.off')
}
`
}}
<
/a-select-option
>
<
/a-select
>
<
/a-select
>
<
/a-form-model-item
>
<
/a-form-model-item
>
<a-form-model-item
label=
"正常值"
prop=
"normalValue"
>
<
a
-
form
-
model
-
item
:
label
=
"
$t('other.normal')
"
prop
=
"
normalValue
"
>
<a-select
v-model=
"form.normalValue"
:disabled=
"isView"
>
<
a
-
select
<a-select-option
key=
"1"
value=
"1"
>
开
</a-select-option>
v
-
model
=
"
form.normalValue
"
<a-select-option
key=
"0"
value=
"0"
>
关
</a-select-option>
:
disabled
=
"
isView
"
:
placeholder
=
"
$t('select.placeholder')
"
>
<
a
-
select
-
option
key
=
"
1
"
value
=
"
1
"
>
{{
$t
(
'
other.on
'
)
}}
<
/a-select-option
>
<
a
-
select
-
option
key
=
"
0
"
value
=
"
0
"
>
{{
$t
(
'
other.off
'
)
}}
<
/a-select-option
>
<
/a-select
>
<
/a-select
>
<
/a-form-model-item
>
<
/a-form-model-item
>
<a-form-model-item
label=
"异常值"
prop=
"abnormalValue"
>
<
a
-
form
-
model
-
item
:
label
=
"
$t('other.outliers')
"
prop
=
"
abnormalValue
"
:
placeholder
=
"
$t('select.placeholder')
"
>
<
a
-
select
v
-
model
=
"
form.abnormalValue
"
:
disabled
=
"
isView
"
>
<
a
-
select
v
-
model
=
"
form.abnormalValue
"
:
disabled
=
"
isView
"
>
<a-select-option
key=
"1"
value=
"1"
>
开
</a-select-option>
<
a
-
select
-
option
key
=
"
1
"
value
=
"
1
"
>
{{
$t
(
'
other.on
'
)
}}
<
/a-select-option
>
<a-select-option
key=
"0"
value=
"0"
>
关
</a-select-option>
<
a
-
select
-
option
key
=
"
0
"
value
=
"
0
"
>
{{
$t
(
'
other.off
'
)
}}
<
/a-select-option
>
<
/a-select
>
<
/a-select
>
<
/a-form-model-item
>
<
/a-form-model-item
>
<
/div
>
<
/div
>
<
div
v
-
if
=
"
form.dataType === 'NUMERIC'
"
>
<
div
v
-
if
=
"
form.dataType === 'NUMERIC'
"
>
<a-form-model-item
label=
"默认值
"
prop=
"defaultValue"
>
<
a
-
form
-
model
-
item
:
label
=
"
$t('other.defaultValue')
"
prop
=
"
defaultValue
"
>
<a-input
v-model=
"form.defaultValue"
placeholder=
"请输入
"
/>
<
a
-
input
v
-
model
=
"
form.defaultValue
"
:
placeholder
=
"
$t('input.placeholder')
"
/>
<
/a-form-model-item
>
<
/a-form-model-item
>
<a-form-model-item
label=
"上限值
"
prop=
"upperLimitValue"
>
<
a
-
form
-
model
-
item
:
label
=
"
$t('other.upperLimit')
"
prop
=
"
upperLimitValue
"
>
<a-input
v-model=
"form.upperLimitValue"
placeholder=
"请输入
"
/>
<
a
-
input
v
-
model
=
"
form.upperLimitValue
"
:
placeholder
=
"
$t('input.placeholder')
"
/>
<
/a-form-model-item
>
<
/a-form-model-item
>
<a-form-model-item
label=
"下限值
"
prop=
"lowerLimitValue"
>
<
a
-
form
-
model
-
item
:
label
=
"
$t('other.lowerLimit')
"
prop
=
"
lowerLimitValue
"
>
<a-input
v-model=
"form.lowerLimitValue"
placeholder=
"请输入
"
/>
<
a
-
input
v
-
model
=
"
form.lowerLimitValue
"
:
placeholder
=
"
$t('input.placeholder')
"
/>
<
/a-form-model-item
>
<
/a-form-model-item
>
<
/div
>
<
/div
>
<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
:
placeholder
=
"
$t('input.placeholder')
"
:
rows
=
"
4
"
v
-
model
=
"
form.remark
"
:
disabled
=
"
isView
"
/>
<
/a-form-model-item
>
<
/a-form-model-item
>
<
/a-form-model
>
<
/a-form-model
>
<
/Wraper
>
<
/Wraper
>
...
@@ -99,11 +121,11 @@ export default {
...
@@ -99,11 +121,11 @@ export default {
data
()
{
data
()
{
let
normalValueValidator
=
(
rule
,
value
,
callback
)
=>
{
let
normalValueValidator
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
)
{
if
(
value
===
''
)
{
callback
(
new
Error
(
'
Please input the password
'
));
callback
(
new
Error
(
this
.
$t
(
'
input.placeholder
'
)
));
}
else
{
}
else
{
if
(
this
.
form
.
abnormalValue
)
{
if
(
this
.
form
.
abnormalValue
)
{
if
(
value
===
this
.
form
.
abnormalValue
)
{
if
(
value
===
this
.
form
.
abnormalValue
)
{
callback
(
new
Error
(
'
Please input the password
'
));
callback
(
new
Error
(
this
.
$t
(
'
input.error
'
)
));
}
else
{
}
else
{
callback
();
callback
();
}
}
...
@@ -114,11 +136,11 @@ export default {
...
@@ -114,11 +136,11 @@ export default {
}
;
}
;
let
abnormalValueValidator
=
(
rule
,
value
,
callback
)
=>
{
let
abnormalValueValidator
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
)
{
if
(
value
===
''
)
{
callback
(
new
Error
(
'
Please input the password
'
));
callback
(
new
Error
(
this
.
$t
(
'
input.placeholder
'
)
));
}
else
{
}
else
{
if
(
this
.
form
.
abnormalValue
)
{
if
(
this
.
form
.
abnormalValue
)
{
if
(
value
===
this
.
form
.
abnormalValue
)
{
if
(
value
===
this
.
form
.
abnormalValue
)
{
callback
(
new
Error
(
'
Please input the password
'
));
callback
(
new
Error
(
this
.
$t
(
'
input.error
'
)
));
}
else
{
}
else
{
callback
();
callback
();
}
}
...
@@ -129,25 +151,25 @@ export default {
...
@@ -129,25 +151,25 @@ export default {
}
;
}
;
let
defaultValueValidator
=
(
rule
,
value
,
callback
)
=>
{
let
defaultValueValidator
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
)
{
if
(
value
===
''
)
{
callback
(
new
Error
(
'
Please input the password
'
));
callback
(
new
Error
(
this
.
$t
(
'
input.placeholder
'
)
));
}
else
{
}
else
{
if
(
this
.
form
.
upperLimitValue
&&
this
.
form
.
lowerLimitValue
)
{
if
(
this
.
form
.
upperLimitValue
&&
this
.
form
.
lowerLimitValue
)
{
if
(
this
.
form
.
upperLimitValue
>
value
&&
value
>
this
.
form
.
lowerLimitValue
)
{
if
(
this
.
form
.
upperLimitValue
>
value
&&
value
>
this
.
form
.
lowerLimitValue
)
{
callback
();
callback
();
}
else
{
}
else
{
callback
(
new
Error
(
'
数值错误
'
));
callback
(
new
Error
(
this
.
$t
(
'
input.error
'
)
));
}
}
}
else
if
(
this
.
form
.
upperLimitValue
)
{
}
else
if
(
this
.
form
.
upperLimitValue
)
{
if
(
this
.
form
.
upperLimitValue
>
value
)
{
if
(
this
.
form
.
upperLimitValue
>
value
)
{
callback
();
callback
();
}
else
{
}
else
{
callback
(
new
Error
(
'
数值错误1
'
));
callback
(
new
Error
(
this
.
$t
(
'
input.error
'
)
));
}
}
}
else
if
(
this
.
form
.
lowerLimitValue
)
{
}
else
if
(
this
.
form
.
lowerLimitValue
)
{
if
(
this
.
form
.
lowerLimitValue
<
value
)
{
if
(
this
.
form
.
lowerLimitValue
<
value
)
{
callback
();
callback
();
}
else
{
}
else
{
callback
(
new
Error
(
'
数值错误2
'
));
callback
(
new
Error
(
this
.
$t
(
'
input.error
'
)
));
}
}
}
else
{
}
else
{
callback
();
callback
();
...
@@ -156,25 +178,25 @@ export default {
...
@@ -156,25 +178,25 @@ export default {
}
;
}
;
let
upperLimitValueValidator
=
(
rule
,
value
,
callback
)
=>
{
let
upperLimitValueValidator
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
)
{
if
(
value
===
''
)
{
callback
(
new
Error
(
'
Please input the password
'
));
callback
(
new
Error
(
this
.
$t
(
'
input.placeholder
'
)
));
}
else
{
}
else
{
if
(
this
.
form
.
defaultValue
&&
this
.
form
.
lowerLimitValue
)
{
if
(
this
.
form
.
defaultValue
&&
this
.
form
.
lowerLimitValue
)
{
if
(
this
.
form
.
defaultValue
<
value
&&
value
>
this
.
form
.
lowerLimitValue
)
{
if
(
this
.
form
.
defaultValue
<
value
&&
value
>
this
.
form
.
lowerLimitValue
)
{
callback
();
callback
();
}
else
{
}
else
{
callback
(
new
Error
(
'
数值错误
'
));
callback
(
new
Error
(
this
.
$t
(
'
input.error
'
)
));
}
}
}
else
if
(
this
.
form
.
defaultValue
)
{
}
else
if
(
this
.
form
.
defaultValue
)
{
if
(
this
.
form
.
defaultValue
<
value
)
{
if
(
this
.
form
.
defaultValue
<
value
)
{
callback
();
callback
();
}
else
{
}
else
{
callback
(
new
Error
(
'
数值错误1
'
));
callback
(
new
Error
(
this
.
$t
(
'
input.error
'
)
));
}
}
}
else
if
(
this
.
form
.
lowerLimitValue
)
{
}
else
if
(
this
.
form
.
lowerLimitValue
)
{
if
(
this
.
form
.
lowerLimitValue
<
value
)
{
if
(
this
.
form
.
lowerLimitValue
<
value
)
{
callback
();
callback
();
}
else
{
}
else
{
callback
(
new
Error
(
'
数值错误2
'
));
callback
(
new
Error
(
this
.
$t
(
'
input.error
'
)
));
}
}
}
else
{
}
else
{
callback
();
callback
();
...
@@ -183,25 +205,25 @@ export default {
...
@@ -183,25 +205,25 @@ export default {
}
;
}
;
let
lowerLimitValueValidator
=
(
rule
,
value
,
callback
)
=>
{
let
lowerLimitValueValidator
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
)
{
if
(
value
===
''
)
{
callback
(
new
Error
(
'
Please input the password
'
));
callback
(
new
Error
(
this
.
$t
(
'
input.placeholder
'
)
));
}
else
{
}
else
{
if
(
this
.
form
.
defaultValue
&&
this
.
form
.
upperLimitValue
)
{
if
(
this
.
form
.
defaultValue
&&
this
.
form
.
upperLimitValue
)
{
if
(
this
.
form
.
defaultValue
>
value
&&
value
<
this
.
form
.
upperLimitValue
)
{
if
(
this
.
form
.
defaultValue
>
value
&&
value
<
this
.
form
.
upperLimitValue
)
{
callback
();
callback
();
}
else
{
}
else
{
callback
(
new
Error
(
'
数值错误
'
));
callback
(
new
Error
(
this
.
$t
(
'
input.error
'
)
));
}
}
}
else
if
(
this
.
form
.
defaultValue
)
{
}
else
if
(
this
.
form
.
defaultValue
)
{
if
(
this
.
form
.
defaultValue
>
value
)
{
if
(
this
.
form
.
defaultValue
>
value
)
{
callback
();
callback
();
}
else
{
}
else
{
callback
(
new
Error
(
'
数值错误1
'
));
callback
(
new
Error
(
this
.
$t
(
'
input.error
'
)
));
}
}
}
else
if
(
this
.
form
.
upperLimitValue
)
{
}
else
if
(
this
.
form
.
upperLimitValue
)
{
if
(
this
.
form
.
upperLimitValue
>
value
)
{
if
(
this
.
form
.
upperLimitValue
>
value
)
{
callback
();
callback
();
}
else
{
}
else
{
callback
(
new
Error
(
'
数值错误2
'
));
callback
(
new
Error
(
this
.
$t
(
'
input.error
'
)
));
}
}
}
else
{
}
else
{
callback
();
callback
();
...
@@ -211,23 +233,35 @@ export default {
...
@@ -211,23 +233,35 @@ export default {
return
{
return
{
form
:
{
}
,
form
:
{
}
,
rules
:
{
rules
:
{
placeName
:
[{
required
:
true
}],
itemName
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.placeholder
'
)
}
],
placeId
:
[{
required
:
true
}],
placeId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.placeholder
'
)
}
],
regionId
:
[{
required
:
true
}],
regionId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.placeholder
'
)
}
],
unitId
:
[{
required
:
true
}],
unitId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.placeholder
'
)
}
],
dataType
:
[{
required
:
true
}],
dataType
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.placeholder
'
)
}
],
defaultText
:
[{
required
:
true
}],
defaultText
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.placeholder
'
)
}
],
optionType
:
[{
required
:
true
}],
optionType
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.placeholder
'
)
}
],
normalValue
:
[
normalValue
:
[
{
required
:
true
},
{
required
:
true
,
message
:
this
.
$t
(
'
input.placeholder
'
)
}
,
{
{
validator
:
normalValueValidator
,
validator
:
normalValueValidator
,
}
,
}
,
],
],
abnormalValue
:
[{
required
:
true
},
{
validator
:
abnormalValueValidator
}],
abnormalValue
:
[
defaultValue
:
[{
required
:
true
},
{
validator
:
defaultValueValidator
}],
{
required
:
true
,
message
:
this
.
$t
(
'
input.placeholder
'
)
}
,
upperLimitValue
:
[{
required
:
true
},
{
validator
:
upperLimitValueValidator
}],
{
validator
:
abnormalValueValidator
}
,
lowerLimitValue
:
[{
required
:
true
},
{
validator
:
lowerLimitValueValidator
}],
],
defaultValue
:
[
{
required
:
true
,
message
:
this
.
$t
(
'
input.placeholder
'
)
}
,
{
validator
:
defaultValueValidator
}
,
],
upperLimitValue
:
[
{
required
:
true
,
message
:
this
.
$t
(
'
input.placeholder
'
)
}
,
{
validator
:
upperLimitValueValidator
}
,
],
lowerLimitValue
:
[
{
required
:
true
,
message
:
this
.
$t
(
'
input.placeholder
'
)
}
,
{
validator
:
lowerLimitValueValidator
}
,
],
}
,
}
,
}
;
}
;
}
,
}
,
...
...
src/pages/ranger/basic/item/index.vue
View file @
aa2eaa77
...
@@ -8,15 +8,16 @@
...
@@ -8,15 +8,16 @@
:scroll=
"
{ x: true }"
:scroll=
"
{ x: true }"
>
>
<template
#search
="
{ query }">
<template
#search
="
{ query }">
<MoreItem
label=
"地区
"
>
<MoreItem
:label=
"$t('table.region')
"
>
<UrlSelect
<UrlSelect
url=
"/ranger/inspection/api/v1/region/list"
url=
"/ranger/inspection/api/v1/region/list"
v-model=
"query.regionId"
v-model=
"query.regionId"
labelFiled=
"regionName"
labelFiled=
"regionName"
valueFiled=
"regionId"
valueFiled=
"regionId"
:placeholder=
"$t('select.placeholder')"
/>
/>
</MoreItem>
</MoreItem>
<MoreItem
label=
"地点
"
>
<MoreItem
:label=
"$t('table.place')
"
>
<UrlSelect
<UrlSelect
v-model=
"query.placeId"
v-model=
"query.placeId"
:url=
"
:url=
"
...
@@ -24,18 +25,20 @@
...
@@ -24,18 +25,20 @@
"
"
labelFiled="placeName"
labelFiled="placeName"
valueFiled="placeId"
valueFiled="placeId"
:placeholder="$t('select.placeholder')"
/>
/>
</MoreItem>
</MoreItem>
<MoreItem
label=
"单元
"
>
<MoreItem
:label=
"$t('table.unit')
"
>
<UrlSelect
<UrlSelect
v-model=
"query.unitId"
v-model=
"query.unitId"
:url=
"query.placeId ? `/ranger/inspection/api/v1/units/places/$
{query.placeId}/list` : ''"
:url=
"query.placeId ? `/ranger/inspection/api/v1/units/places/$
{query.placeId}/list` : ''"
labelFiled="unitName"
labelFiled="unitName"
valueFiled="unitId"
valueFiled="unitId"
:placeholder="$t('select.placeholder')"
/>
/>
</MoreItem>
</MoreItem>
<MoreItem
label=
"项目名称
"
>
<MoreItem
:label=
"$t('table.itemName')
"
>
<a-input
v-model=
"query.inputValue"
placeholder=
"请输入项目名称
"
/>
<a-input
v-model=
"query.inputValue"
:placeholder=
"$t('input.placeholder')
"
/>
</MoreItem>
</MoreItem>
</
template
>
</
template
>
...
@@ -47,28 +50,34 @@
...
@@ -47,28 +50,34 @@
<AddAndEdit
v-bind=
"drawer"
/>
<AddAndEdit
v-bind=
"drawer"
/>
</
template
>
</
template
>
<a-table-column
title=
"项目名称
"
data-index=
"itemName"
/>
<a-table-column
:title=
"$t('table.itemName')
"
data-index=
"itemName"
/>
<a-table-column
title=
"所属单元
"
data-index=
"unitName"
/>
<a-table-column
:title=
"$t('table.unitName')
"
data-index=
"unitName"
/>
<a-table-column
title=
"数据类型
"
>
<a-table-column
:title=
"$t('table.dataType')
"
>
<
template
#default=
"row"
>
<
template
#default=
"row"
>
<span>
{{
dataType
[
row
.
dataType
]
}}
</span>
<span>
{{
$t
(
`other.${row.dataType
}
`
)
}}
<
/span
>
<
/template
>
<
/template
>
<
/a-table-column
>
<
/a-table-column
>
<a-table-column
title=
"项目描述
"
>
<
a
-
table
-
column
:
title
=
"
$t('table.describe')
"
>
<
template
#
default
=
"
row
"
>
<
template
#
default
=
"
row
"
>
<
span
v
-
if
=
"
row.dataType === 'TEXT'
"
>
{{
row
.
defaultText
}}
<
/span
>
<
span
v
-
if
=
"
row.dataType === 'TEXT'
"
>
{{
row
.
defaultText
}}
<
/span
>
<
span
v
-
if
=
"
row.dataType === 'OPTION'
"
>
<
span
v
-
if
=
"
row.dataType === 'OPTION'
"
>
{{
`正常值:${row.normalValue
}
异常值:${row.abnormalValue
}
`
}}
<
/spa
n
{{
`${$t('other.normal')
}
:${row.normalValue
}
${$t('other.outliers')
}
:${
row.abnormalValue
}
`
}}
<
/spa
n
>
>
<
span
v
-
if
=
"
row.dataType === 'NUMERIC'
"
>
<
span
v
-
if
=
"
row.dataType === 'NUMERIC'
"
>
{{
{{
`默认值:${row.defaultValue
}
上限值:${row.upperLimitValue
}
下限值:${row.lowerLimitValue
}
`
`${$t('other.defaultValue')
}
:${row.defaultValue
}
${$t('other.upperLimit')
}
:${row.upperLimitValue
}
${$t('other.lowerLimit')
}
:${row.lowerLimitValue
}
`
}}
<
/spa
n
}}
<
/spa
n
>
>
<
/template
>
<
/template
>
<
/a-table-column
>
<
/a-table-column
>
<
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
>
...
@@ -83,19 +92,14 @@ export default {
...
@@ -83,19 +92,14 @@ 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/items/${row.itemId
}
`
,
url
:
(
row
)
=>
`/ranger/inspection/api/v1/items/${row.itemId
}
`
,
after
:
this
.
refresh
,
after
:
this
.
refresh
,
}
,
}
,
],
],
dataType
:
{
TEXT
:
'
文本类型
'
,
OPTION
:
'
选项类型
'
,
NUMERIC
:
'
数值类型
'
,
}
,
}
;
}
;
}
,
}
,
methods
:
{
methods
:
{
...
@@ -103,10 +107,10 @@ export default {
...
@@ -103,10 +107,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
'
}
);
}
,
}
,
}
,
}
,
}
;
}
;
...
...
src/pages/ranger/basic/major/add_edit.vue
View file @
aa2eaa77
<
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=
"specialityName"
>
<a-form-model-item
:label=
"$t('table.majorName')"
prop=
"specialityName"
>
<a-input
v-model=
"form.specialityName"
:disabled=
"isView"
/>
<a-input
v-model=
"form.specialityName"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"所属地区
"
prop=
"regionId"
>
<a-form-model-item
:label=
"$t('table.region')
"
prop=
"regionId"
>
<UrlSelect
<UrlSelect
url=
"/ranger/inspection/api/v1/region/list"
url=
"/ranger/inspection/api/v1/region/list"
v-model=
"form.regionId"
v-model=
"form.regionId"
labelFiled=
"regionName"
labelFiled=
"regionName"
valueFiled=
"regionId"
valueFiled=
"regionId"
:disabled=
"isView"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
/>
/>
</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
:placeholder=
"$t('input.placeholder')"
:rows=
"4"
v-model=
"form.remark"
:disabled=
"isView"
/>
</a-form-model-item>
</a-form-model-item>
</a-form-model>
</a-form-model>
</Wraper>
</Wraper>
...
...
src/pages/ranger/basic/major/add_member.vue
View file @
aa2eaa77
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
rowKey=
"userId"
rowKey=
"userId"
:loading=
"loading"
:loading=
"loading"
>
>
<a-table-column
title=
"姓名
"
data-index=
"userName"
/>
<a-table-column
:title=
"$t('user.name')
"
data-index=
"userName"
/>
</a-table>
</a-table>
</Wraper>
</Wraper>
</
template
>
</
template
>
...
...
src/pages/ranger/basic/major/index.vue
View file @
aa2eaa77
...
@@ -7,16 +7,17 @@
...
@@ -7,16 +7,17 @@
ref=
"table"
ref=
"table"
>
>
<template
#search
="
{ query }">
<template
#search
="
{ query }">
<MoreItem
label=
"地区
"
>
<MoreItem
:label=
"$t('table.region')
"
>
<UrlSelect
<UrlSelect
url=
"/ranger/inspection/api/v1/region/list"
url=
"/ranger/inspection/api/v1/region/list"
v-model=
"query.regionId"
v-model=
"query.regionId"
labelFiled=
"regionName"
labelFiled=
"regionName"
valueFiled=
"regionId"
valueFiled=
"regionId"
:placeholder=
"$t('select.placeholder')"
/>
/>
</MoreItem>
</MoreItem>
<MoreItem
label=
"专业名称
"
>
<MoreItem
:label=
"$t('table.majorName')
"
>
<a-input
v-model=
"query.specialityName"
/>
<a-input
v-model=
"query.specialityName"
:placeholder=
"$t('input.placeholder')"
/>
</MoreItem>
</MoreItem>
</
template
>
</
template
>
...
@@ -25,10 +26,10 @@
...
@@ -25,10 +26,10 @@
<AddAndEdit
v-bind=
"drawer"
v-else
/>
<AddAndEdit
v-bind=
"drawer"
v-else
/>
</
template
>
</
template
>
<a-table-column
title=
"专业名称
"
data-index=
"specialityName"
/>
<a-table-column
:title=
"$t('table.majorName')
"
data-index=
"specialityName"
/>
<a-table-column
title=
"所属地区
"
data-index=
"regionName"
/>
<a-table-column
:title=
"$t('table.regionName')
"
data-index=
"regionName"
/>
<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>
...
@@ -44,9 +45,9 @@ export default {
...
@@ -44,9 +45,9 @@ 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
},
{
label
:
'
人员
'
,
click
:
this
.
showMember
},
{
label
:
this
.
$t
(
'
table.personnel
'
)
,
click
:
this
.
showMember
},
{
{
type
:
'
confirm
'
,
type
:
'
confirm
'
,
url
:
(
row
)
=>
`/ranger/inspection/api/v1/specialities/
${
row
.
specialityId
}
`
,
url
:
(
row
)
=>
`/ranger/inspection/api/v1/specialities/
${
row
.
specialityId
}
`
,
...
@@ -60,13 +61,13 @@ export default {
...
@@ -60,13 +61,13 @@ 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
'
});
},
},
showMember
(
row
)
{
showMember
(
row
)
{
this
.
$refs
.
table
.
show
({
row
,
title
:
'
人员
'
,
type
:
'
member
'
});
this
.
$refs
.
table
.
show
({
row
,
title
:
this
.
$t
(
'
table.personnel
'
)
,
type
:
'
member
'
});
},
},
},
},
};
};
...
...
src/pages/ranger/basic/major/member.vue
View file @
aa2eaa77
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
<AddMember
v-bind=
"drawer"
:specialityId=
"row.specialityId"
/>
<AddMember
v-bind=
"drawer"
:specialityId=
"row.specialityId"
/>
</
template
>
</
template
>
<a-table-column
title=
"部门
"
data-index=
"orgName"
/>
<a-table-column
:title=
"$t('table.department')
"
data-index=
"orgName"
/>
<a-table-column
title=
"用户姓名
"
data-index=
"staffName"
/>
<a-table-column
:title=
"$t('table.userName')
"
data-index=
"staffName"
/>
</Table>
</Table>
</Wraper>
</Wraper>
</template>
</template>
...
@@ -33,8 +33,8 @@ export default {
...
@@ -33,8 +33,8 @@ export default {
data
()
{
data
()
{
return
{
return
{
addBtn
:
{
addBtn
:
{
text
:
'
添加
'
,
text
:
this
.
$t
(
'
table.add
'
)
,
title
:
'
添加
'
,
title
:
this
.
$t
(
'
table.add
'
)
,
},
},
buttons
:
[
buttons
:
[
{
{
...
...
src/pages/ranger/basic/unit/add_edit.vue
View file @
aa2eaa77
<
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=
"unitName"
>
<a-form-model-item
:label=
"$t('table.unitName')
"
prop=
"unitName"
>
<a-input
v-model=
"form.unitName"
:disabled=
"isView"
/>
<a-input
v-model=
"form.unitName"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"所属地区
"
prop=
"regionId"
>
<a-form-model-item
:label=
"$t('table.regionName')
"
prop=
"regionId"
>
<UrlSelect
<UrlSelect
url=
"/ranger/inspection/api/v1/region/list"
url=
"/ranger/inspection/api/v1/region/list"
v-model=
"form.regionId"
v-model=
"form.regionId"
labelFiled=
"regionName"
labelFiled=
"regionName"
valueFiled=
"regionId"
valueFiled=
"regionId"
:disabled=
"isView"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
/>
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"所属地点
"
prop=
"placeId"
>
<a-form-model-item
:label=
"$t('table.placeName')
"
prop=
"placeId"
>
<UrlSelect
<UrlSelect
v-model=
"form.placeId"
v-model=
"form.placeId"
:url=
"
:url=
"
...
@@ -23,9 +24,10 @@
...
@@ -23,9 +24,10 @@
labelFiled="placeName"
labelFiled="placeName"
valueFiled="placeId"
valueFiled="placeId"
:disabled="isView"
:disabled="isView"
:placeholder="$t('select.placeholder')"
/>
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"设备编号
"
prop=
"equipmentCode"
>
<a-form-model-item
:label=
"$t('table.equipmentCode')
"
prop=
"equipmentCode"
>
<SearchSelect
<SearchSelect
url=
"oceanus/api/v1/equipments/list"
url=
"oceanus/api/v1/equipments/list"
searchField=
"searchKey"
searchField=
"searchKey"
...
@@ -33,11 +35,17 @@
...
@@ -33,11 +35,17 @@
labelFiled=
"equipmentCode"
labelFiled=
"equipmentCode"
valueFiled=
"equipmentCode"
valueFiled=
"equipmentCode"
:disabled=
"isView"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
/>
/>
</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
:placeholder=
"$t('input.placeholder')"
:rows=
"4"
v-model=
"form.remark"
:disabled=
"isView"
/>
</a-form-model-item>
</a-form-model-item>
</a-form-model>
</a-form-model>
</Wraper>
</Wraper>
...
...
src/pages/ranger/basic/unit/index.vue
View file @
aa2eaa77
<
template
>
<
template
>
<Table
url=
"/ranger/inspection/api/v1/units"
rowKey=
"unitId"
addBtn
:buttons=
"buttons"
ref=
"table"
>
<Table
url=
"/ranger/inspection/api/v1/units"
rowKey=
"unitId"
addBtn
:buttons=
"buttons"
ref=
"table"
>
<template
#search
="
{ query }">
<template
#search
="
{ query }">
<MoreItem
label=
"地区
"
>
<MoreItem
:label=
"$t('table.region')
"
>
<UrlSelect
<UrlSelect
url=
"/ranger/inspection/api/v1/region/list"
url=
"/ranger/inspection/api/v1/region/list"
v-model=
"query.regionId"
v-model=
"query.regionId"
labelFiled=
"regionName"
labelFiled=
"regionName"
valueFiled=
"regionId"
valueFiled=
"regionId"
:placeholder=
"$t('select.placeholder')"
/>
/>
</MoreItem>
</MoreItem>
<MoreItem
label=
"地点
"
>
<MoreItem
:label=
"$t('table.place')
"
>
<UrlSelect
<UrlSelect
v-model=
"query.placeId"
v-model=
"query.placeId"
:url=
"
:url=
"
...
@@ -17,10 +18,11 @@
...
@@ -17,10 +18,11 @@
"
"
labelFiled="placeName"
labelFiled="placeName"
valueFiled="placeId"
valueFiled="placeId"
:placeholder="$t('select.placeholder')"
/>
/>
</MoreItem>
</MoreItem>
<MoreItem
label=
"关键字
"
>
<MoreItem
:label=
"$t('table.unitName')
"
>
<a-input
v-model=
"query.inputValue"
/>
<a-input
v-model=
"query.inputValue"
:placeholder=
"$t('input.placeholder')"
/>
</MoreItem>
</MoreItem>
</
template
>
</
template
>
...
@@ -28,11 +30,11 @@
...
@@ -28,11 +30,11 @@
<AddAndEdit
v-bind=
"drawer"
/>
<AddAndEdit
v-bind=
"drawer"
/>
</
template
>
</
template
>
<a-table-column
title=
"单元名称
"
data-index=
"unitName"
/>
<a-table-column
:title=
"$t('table.unitName')
"
data-index=
"unitName"
/>
<a-table-column
title=
"所属地点
"
data-index=
"placeName"
/>
<a-table-column
:title=
"$t('table.placeName')
"
data-index=
"placeName"
/>
<a-table-column
title=
"设备编号
"
data-index=
"equipmentCode"
/>
<a-table-column
:title=
"$t('table.equipmentCode')
"
data-index=
"equipmentCode"
/>
<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>
...
@@ -47,9 +49,9 @@ export default {
...
@@ -47,9 +49,9 @@ 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
},
{
label
:
'
免检
'
,
click
:
this
.
view
},
{
label
:
this
.
$t
(
'
table.exemption
'
)
,
click
:
this
.
view
},
// { label: '文档', click: this.view },
// { label: '文档', click: this.view },
{
{
type
:
'
confirm
'
,
type
:
'
confirm
'
,
...
@@ -64,10 +66,10 @@ export default {
...
@@ -64,10 +66,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