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
4bc57953
Commit
4bc57953
authored
Jul 30, 2021
by
shuiluo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 线路配置部分国际化完成
parent
503779fb
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
163 additions
and
89 deletions
+163
-89
src/local/basic.js
src/local/basic.js
+19
-0
src/local/index.js
src/local/index.js
+2
-0
src/local/select.js
src/local/select.js
+3
-0
src/local/table.js
src/local/table.js
+10
-0
src/pages/ranger/basic/line/Schedule/add.vue
src/pages/ranger/basic/line/Schedule/add.vue
+26
-17
src/pages/ranger/basic/line/Schedule/index.vue
src/pages/ranger/basic/line/Schedule/index.vue
+13
-9
src/pages/ranger/basic/line/add_edit.vue
src/pages/ranger/basic/line/add_edit.vue
+48
-23
src/pages/ranger/basic/line/importFlie.vue
src/pages/ranger/basic/line/importFlie.vue
+5
-5
src/pages/ranger/basic/line/index.vue
src/pages/ranger/basic/line/index.vue
+33
-34
src/pages/ranger/basic/line/uploadList.vue
src/pages/ranger/basic/line/uploadList.vue
+4
-1
No files found.
src/local/basic.js
0 → 100644
View file @
4bc57953
export
default
{
'
basic.layout
'
:
[
'
编排
'
,
'
Layout
'
],
'
basic.dispatch
'
:
[
'
调度
'
,
'
Dispatch
'
],
'
basic.personalDistribution
'
:
[
'
按人分配
'
,
'
Personal Distribution
'
],
'
basic.distributionBySpecialty
'
:
[
'
按专业分配
'
,
'
Distribution By Specialty
'
],
'
basic.expirationMethod
'
:
[
'
过期方式
'
,
'
Expiration Method
'
],
'
basic.expirationMethodError
'
:
[
'
请选择过期方式
'
,
'
Please Select Expiration Method
'
],
'
basic.nextTaskBegins
'
:
[
'
下次任务开始过期
'
,
'
The Next Task Begins To Expire
'
],
'
basic.oneDay
'
:
[
'
一天后过期
'
,
'
Expires In One Day
'
],
'
basic.sevenDay
'
:
[
'
七天后过期
'
,
'
Expires In Seven Days
'
],
'
basic.moreDay
'
:
[
'
十五天后过期
'
,
'
Expires In 15 Days
'
],
'
basic.notExpired
'
:
[
'
不过期
'
,
'
Not Expired
'
],
'
basic.day
'
:
[
'
白班
'
,
'
DAY
'
],
'
basic.middle
'
:
[
'
中班
'
,
'
MIDDLE
'
],
'
basic.night
'
:
[
'
晚班
'
,
'
NIGHT
'
],
'
basic.generateNext
'
:
[
'
生成第二天线路
'
,
'
Generate Next Day Line
'
],
'
basic.generateNextError
'
:
[
'
请选择
'
,
'
Please Select
'
],
'
basic.executeOnce
'
:
[
'
执行一次
'
,
'
Execute Once
'
],
};
src/local/index.js
View file @
4bc57953
...
@@ -5,6 +5,7 @@ import systemLang from './system';
...
@@ -5,6 +5,7 @@ import systemLang from './system';
import
InputLang
from
'
./input
'
;
import
InputLang
from
'
./input
'
;
import
OtherLang
from
'
./other
'
;
import
OtherLang
from
'
./other
'
;
import
acronLang
from
'
./acron
'
;
import
acronLang
from
'
./acron
'
;
import
basicLang
from
'
./basic
'
;
const
zh_CN
=
{};
const
zh_CN
=
{};
const
en_US
=
{};
const
en_US
=
{};
...
@@ -27,5 +28,6 @@ formatLang(systemLang);
...
@@ -27,5 +28,6 @@ formatLang(systemLang);
formatLang
(
InputLang
);
formatLang
(
InputLang
);
formatLang
(
OtherLang
);
formatLang
(
OtherLang
);
formatLang
(
acronLang
);
formatLang
(
acronLang
);
formatLang
(
basicLang
);
export
{
en_US
,
zh_CN
};
export
{
en_US
,
zh_CN
};
src/local/select.js
View file @
4bc57953
...
@@ -4,14 +4,17 @@ export default {
...
@@ -4,14 +4,17 @@ export default {
'
select.startTime
'
:
[
'
开始时间
'
,
'
Start Time
'
],
'
select.startTime
'
:
[
'
开始时间
'
,
'
Start Time
'
],
'
select.endTime
'
:
[
'
结束时间
'
,
'
End Time
'
],
'
select.endTime
'
:
[
'
结束时间
'
,
'
End Time
'
],
'
select.region
'
:
[
'
地区
'
,
'
Region
'
],
'
select.region
'
:
[
'
地区
'
,
'
Region
'
],
'
select.regionError
'
:
[
'
请选择地区
'
,
'
Please Select Region
'
],
'
select.speciality
'
:
[
'
专业
'
,
'
Speciality
'
],
'
select.speciality
'
:
[
'
专业
'
,
'
Speciality
'
],
'
select.shiftTypeName
'
:
[
'
班组
'
,
'
ShiftTypeName
'
],
'
select.shiftTypeName
'
:
[
'
班组
'
,
'
ShiftTypeName
'
],
'
select.shiftTypeNameError
'
:
[
'
请输入班组名称
'
,
'
Pleas Enter ShiftTypeName
'
],
export
:
[
'
导出
'
,
'
Export
'
],
export
:
[
'
导出
'
,
'
Export
'
],
'
select.routes
'
:
[
'
线路
'
,
'
Routes
'
],
'
select.routes
'
:
[
'
线路
'
,
'
Routes
'
],
'
select.examine
'
:
[
'
巡检状态
'
,
'
Examine Status
'
],
'
select.examine
'
:
[
'
巡检状态
'
,
'
Examine Status
'
],
'
select.taskType
'
:
[
'
任务类型
'
,
'
Task Type
'
],
'
select.taskType
'
:
[
'
任务类型
'
,
'
Task Type
'
],
'
select.examiner
'
:
[
'
巡检人
'
,
'
Examiner
'
],
'
select.examiner
'
:
[
'
巡检人
'
,
'
Examiner
'
],
'
select.routeName
'
:
[
'
线路名称
'
,
'
Route Name
'
],
'
select.routeName
'
:
[
'
线路名称
'
,
'
Route Name
'
],
'
select.routeNameError
'
:
[
'
请输入@:select.routeName
'
,
'
Please Enter @:select.routeName
'
],
'
select.option.place
'
:
[
'
地点免检
'
,
'
Place Exemption
'
],
'
select.option.place
'
:
[
'
地点免检
'
,
'
Place Exemption
'
],
'
select.option.unit
'
:
[
'
单元免检
'
,
'
Unit Exemption
'
],
'
select.option.unit
'
:
[
'
单元免检
'
,
'
Unit Exemption
'
],
};
};
src/local/table.js
View file @
4bc57953
...
@@ -49,6 +49,7 @@ export default {
...
@@ -49,6 +49,7 @@ export default {
'
table.dataType
'
:
[
'
数据类型
'
,
'
Data Type
'
],
'
table.dataType
'
:
[
'
数据类型
'
,
'
Data Type
'
],
'
table.majorName
'
:
[
'
专业名称
'
,
'
Major Name
'
],
'
table.majorName
'
:
[
'
专业名称
'
,
'
Major Name
'
],
'
table.major
'
:
[
'
专业
'
,
'
Major
'
],
'
table.major
'
:
[
'
专业
'
,
'
Major
'
],
'
table.majorError
'
:
[
'
请选择@:table.major
'
,
'
Please Select @:table.major
'
],
'
table.personnel
'
:
[
'
人员
'
,
'
Personnel
'
],
'
table.personnel
'
:
[
'
人员
'
,
'
Personnel
'
],
'
table.department
'
:
[
'
部门
'
,
'
Department
'
],
'
table.department
'
:
[
'
部门
'
,
'
Department
'
],
'
table.exemptionType
'
:
[
'
免检类型
'
,
'
Exemption Type
'
],
'
table.exemptionType
'
:
[
'
免检类型
'
,
'
Exemption Type
'
],
...
@@ -59,4 +60,13 @@ export default {
...
@@ -59,4 +60,13 @@ export default {
'
table.time.end
'
:
[
'
结束时间
'
,
'
Start End
'
],
'
table.time.end
'
:
[
'
结束时间
'
,
'
Start End
'
],
'
table.reason
'
:
[
'
原因
'
,
'
Reason
'
],
'
table.reason
'
:
[
'
原因
'
,
'
Reason
'
],
'
table.state
'
:
[
'
状态
'
,
'
State
'
],
'
table.state
'
:
[
'
状态
'
,
'
State
'
],
'
table.import
'
:
[
'
导入
'
,
'
Import
'
],
'
table.takeEffect
'
:
[
'
生效
'
,
'
Take Effect
'
],
'
table.operationSucceeded
'
:
[
'
操作成功
'
,
'
Operation Succeeded
'
],
'
table.uploadFile
'
:
[
'
上传文件
'
,
'
Upload File
'
],
'
table.downloadTemplate
'
:
[
'
下载模板
'
,
'
Download Template
'
],
'
table.distributionMode
'
:
[
'
分配方式
'
,
'
Distribution Mode
'
],
'
table.distributionModeError
'
:
[
'
请选择分配方式
'
,
'
Please Select Distribution Mode
'
],
'
table.yes
'
:
[
'
是
'
,
'
YES
'
],
'
table.no
'
:
[
'
否
'
,
'
NO
'
],
};
};
src/pages/ranger/basic/line/Schedule/add.vue
View file @
4bc57953
<
template
>
<
template
>
<Drawer
ref=
"drawerRef"
v-model=
"visible"
title=
"新增
"
:onOk=
"submit"
:colesAfter=
"refresh"
>
<Drawer
ref=
"drawerRef"
v-model=
"visible"
:title=
"$t('table.add')
"
:onOk=
"submit"
:colesAfter=
"refresh"
>
<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=
"shiftType"
>
<a-form-model-item
:label=
"$t('select.shiftTypeName')
"
prop=
"shiftType"
>
<a-select
v-model=
"form.shiftType"
:disabled=
"isView"
>
<a-select
v-model=
"form.shiftType"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
>
<a-select-option
key=
"DAY"
value=
"DAY"
>
白班
</a-select-option>
<a-select-option
key=
"DAY"
value=
"DAY"
>
{{
$t
(
'
basic.day
'
)
}}
</a-select-option>
<a-select-option
key=
"MIDDLE"
value=
"MIDDLE"
>
中班
</a-select-option>
<a-select-option
key=
"MIDDLE"
value=
"MIDDLE"
>
{{
$t
(
'
basic.middle
'
)
}}
</a-select-option>
<a-select-option
key=
"NIGHT"
value=
"NIGHT"
>
晚班
</a-select-option>
<a-select-option
key=
"NIGHT"
value=
"NIGHT"
>
{{
$t
(
'
basic.night
'
)
}}
</a-select-option>
</a-select>
</a-select>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"生成第二天线路
"
prop=
"isNextDay"
>
<a-form-model-item
:label=
"$t('basic.generateNext')
"
prop=
"isNextDay"
>
<a-select
v-model=
"form.isNextDay"
:disabled=
"isView"
>
<a-select
v-model=
"form.isNextDay"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
>
<a-select-option
key=
"YES"
value=
"YES"
>
是
</a-select-option>
<a-select-option
key=
"YES"
value=
"YES"
>
{{
$t
(
'
table.yes
'
)
}}
</a-select-option>
<a-select-option
key=
"NO"
value=
"NO"
>
否
</a-select-option>
<a-select-option
key=
"NO"
value=
"NO"
>
{{
$t
(
'
table.no
'
)
}}
</a-select-option>
</a-select>
</a-select>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"生成第二天线路"
prop=
"scheduleRule"
>
<a-form-model-item
:label=
"$t('basic.generateNext')"
prop=
"scheduleRule"
>
<Acron
v-model=
"form.scheduleRule"
:disabled=
"isView"
@
input=
"onChang"
/>
<Acron
v-model=
"form.scheduleRule"
:disabled=
"isView"
@
input=
"onChang"
:placeholder=
"$t('select.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
prop=
"scheduleDescription"
>
<a-form-model-item
prop=
"scheduleDescription"
>
<a-input
v-model=
"form.scheduleDescription"
:disabled=
"true"
/>
<a-input
v-model=
"form.scheduleDescription"
:disabled=
"true"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
</a-form-model-item>
</a-form-model>
</a-form-model>
</Drawer>
</Drawer>
...
@@ -48,9 +57,9 @@ export default {
...
@@ -48,9 +57,9 @@ export default {
visible
:
false
,
visible
:
false
,
form
:
{},
form
:
{},
rules
:
{
rules
:
{
shiftType
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
shiftType
:
[{
required
:
true
,
message
:
this
.
$t
(
'
select.shiftTypeNameError
'
)
}],
isNextDay
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
isNextDay
:
[{
required
:
true
,
message
:
this
.
$t
(
'
basic.generateNextError
'
)
}],
scheduleRule
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
scheduleRule
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.error
'
)
}],
},
},
};
};
},
},
...
@@ -66,7 +75,7 @@ export default {
...
@@ -66,7 +75,7 @@ export default {
},
},
onChang
(
val
)
{
onChang
(
val
)
{
const
str
=
cronstrue
.
toString
(
val
,
{
locale
:
langType
[
Lang
.
get
().
substr
(
0
,
2
)]
});
const
str
=
cronstrue
.
toString
(
val
,
{
locale
:
langType
[
Lang
.
get
().
substr
(
0
,
2
)]
});
this
.
form
=
{
...
this
.
form
,
scheduleDescription
:
`
${
str
}
执行一次
`
};
this
.
form
=
{
...
this
.
form
,
scheduleDescription
:
`
${
str
}
${
this
.
$t
(
'
basic.executeOnce
'
)}
`
};
},
},
},
},
};
};
...
...
src/pages/ranger/basic/line/Schedule/index.vue
View file @
4bc57953
<
template
>
<
template
>
<Wraper
:hidden=
"hidden"
noFooter
>
<Wraper
:hidden=
"hidden"
noFooter
>
<a-button
class=
"tw-mb-4"
type=
"primary"
@
click=
"onAdd"
>
新增
</a-button>
<a-button
class=
"tw-mb-4"
type=
"primary"
@
click=
"onAdd"
>
{{
$t
(
'
table.add
'
)
}}
</a-button>
<addDrawer
ref=
"addDrawer"
:row=
"row"
:refresh=
"getList"
/>
<addDrawer
ref=
"addDrawer"
:row=
"row"
:refresh=
"getList"
/>
<a-list
:data-source=
"data"
:grid=
"
{ gutter: 16, xs: 1, sm: 1, md: 1, lg: 1, xl: 1, xxl: 1 }">
<a-list
:data-source=
"data"
:grid=
"
{ gutter: 16, xs: 1, sm: 1, md: 1, lg: 1, xl: 1, xxl: 1 }">
<a-list-item
slot=
"renderItem"
slot-scope=
"item"
>
<a-list-item
slot=
"renderItem"
slot-scope=
"item"
>
...
@@ -8,11 +8,13 @@
...
@@ -8,11 +8,13 @@
<template
#title
>
<template
#title
>
<a-row>
<a-row>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
<a-tag
v-if=
"item.shiftState === 'VALID'"
color=
"#87d068"
>
有效
</a-tag>
<a-tag
v-if=
"item.shiftState === 'VALID'"
color=
"#87d068"
>
<a-tag
v-else
color=
"#f50"
>
无效
</a-tag>
{{
$t
(
'
other.tag.valid
'
)
}}
<span
v-if=
"item.shiftType === 'DAY'"
>
白班
</span>
</a-tag>
<span
v-if=
"item.shiftType === 'MIDDLE'"
>
中班
</span>
<a-tag
v-else
color=
"#f50"
>
{{
$t
(
'
other.tag.invalid
'
)
}}
</a-tag>
<span
v-if=
"item.shiftType === 'NIGHT'"
>
晚班
</span>
<span
v-if=
"item.shiftType === 'DAY'"
>
{{
$t
(
'
basic.day
'
)
}}
</span>
<span
v-if=
"item.shiftType === 'MIDDLE'"
>
{{
$t
(
'
basic.middle
'
)
}}
</span>
<span
v-if=
"item.shiftType === 'NIGHT'"
>
{{
$t
(
'
basic.night
'
)
}}
</span>
</a-col>
</a-col>
<a-col
:span=
"12"
class=
"tw-text-right"
>
<a-col
:span=
"12"
class=
"tw-text-right"
>
<a-space>
<a-space>
...
@@ -23,20 +25,22 @@
...
@@ -23,20 +25,22 @@
<a
<a
v-if=
"item.shiftState === 'INVALID'"
v-if=
"item.shiftState === 'INVALID'"
@
click=
"() => scheduleUpdateState(item.shiftId, 'VALID')"
@
click=
"() => scheduleUpdateState(item.shiftId, 'VALID')"
>
生效
</a
>
>
{{
$t
(
'
table.takeEffect
'
)
}}
</a>
<a
<a
v-if=
"item.shiftState === 'VALID'"
v-if=
"item.shiftState === 'VALID'"
@
click=
"() => scheduleUpdateState(item.shiftId, 'INVALID')"
@
click=
"() => scheduleUpdateState(item.shiftId, 'INVALID')"
>
失效
</a
>
>
{{
$t
(
'
task.invalid
'
)
}}
</a>
</a-space>
</a-space>
</a-col>
</a-col>
</a-row>
</a-row>
</
template
>
</
template
>
<div>
{{ item.scheduleRule }}
</div>
<div>
{{ item.scheduleRule }}
</div>
<div>
{{ item.scheduleDescription }}
</div>
<div>
{{ item.scheduleDescription }}
</div>
<div>
{{ item.isNextDay === 'YES'
&&
'生成第二天线路'
}}
</div>
<div>
{{ item.isNextDay === 'YES'
&&
$t('basic.generateNext')
}}
</div>
</a-card>
</a-card>
</a-list-item>
</a-list-item>
</a-list>
</a-list>
...
...
src/pages/ranger/basic/line/add_edit.vue
View file @
4bc57953
<
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=
"routeName"
>
<a-form-model-item
:label=
"$t('select.routeName')
"
prop=
"routeName"
>
<a-input
v-model=
"form.routeName"
:disabled=
"isView"
/>
<a-input
v-model=
"form.routeName"
: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('select.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"
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
:disabled=
"isView"
:disabled=
"isView"
/>
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"专业
"
prop=
"specialityId"
>
<a-form-model-item
:label=
"$t('table.major')
"
prop=
"specialityId"
>
<UrlSelect
<UrlSelect
v-model=
"form.specialityId"
v-model=
"form.specialityId"
:url=
"
:url=
"
...
@@ -26,23 +26,48 @@
...
@@ -26,23 +26,48 @@
:disabled="isView"
:disabled="isView"
/>
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"分配方式"
prop=
"dispatchType"
>
<a-form-model-item
:label=
"$t('table.distributionMode')"
prop=
"dispatchType"
>
<a-select
v-model=
"form.dispatchType"
style=
"width: 100%"
:disabled=
"isView"
>
<a-select
<a-select-option
key=
"PERSON"
value=
"PERSON"
>
按人分配
</a-select-option>
v-model=
"form.dispatchType"
<a-select-option
key=
"SPECIALITY"
value=
"SPECIALITY"
>
按专业分配
</a-select-option>
style=
"width: 100%"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
>
<a-select-option
key=
"PERSON"
value=
"PERSON"
>
{{
$t
(
'
basic.personalDistribution
'
)
}}
</a-select-option>
<a-select-option
key=
"SPECIALITY"
value=
"SPECIALITY"
>
{{
$t
(
'
basic.distributionBySpecialty
'
)
}}
</a-select-option>
</a-select>
</a-select>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"过期方式"
prop=
"expirationType"
>
<a-form-model-item
:label=
"$t('basic.expirationMethod')"
prop=
"expirationType"
>
<a-select
v-model=
"form.expirationType"
style=
"width: 100%"
:disabled=
"isView"
>
<a-select
<a-select-option
key=
"NEXT"
value=
"NEXT"
>
下次任务开始过期
</a-select-option>
v-model=
"form.expirationType"
<a-select-option
key=
"ONE_DAY"
value=
"ONE_DAY"
>
一天后过期
</a-select-option>
style=
"width: 100%"
<a-select-option
key=
"SEVEN_DAY"
value=
"SEVEN_DAY"
>
七天后过期
</a-select-option>
:disabled=
"isView"
<a-select-option
key=
"FIFTEEN_DAY"
value=
"FIFTEEN_DAY"
>
十五天后过期
</a-select-option>
:placeholder=
"$t('select.placeholder')"
<a-select-option
key=
"NEVER"
value=
"NEVER"
>
不过期
</a-select-option>
>
<a-select-option
key=
"NEXT"
value=
"NEXT"
>
{{
$t
(
'
basic.nextTaskBegins
'
)
}}
</a-select-option>
<a-select-option
key=
"ONE_DAY"
value=
"ONE_DAY"
>
{{
$t
(
'
basic.oneDay
'
)
}}
</a-select-option>
<a-select-option
key=
"SEVEN_DAY"
value=
"SEVEN_DAY"
>
{{
$t
(
'
basic.sevenDay
'
)
}}
</a-select-option>
<a-select-option
key=
"FIFTEEN_DAY"
value=
"FIFTEEN_DAY"
>
{{
$t
(
'
basic.moreDay
'
)
}}
</a-select-option>
<a-select-option
key=
"NEVER"
value=
"NEVER"
>
{{
$t
(
'
basic.notExpired
'
)
}}
</a-select-option>
</a-select>
</a-select>
</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>
...
@@ -56,14 +81,14 @@ import { addRouteInfoApi, updateRouteInfoApi, getRouteInfoApi } from '@/api';
...
@@ -56,14 +81,14 @@ import { addRouteInfoApi, updateRouteInfoApi, getRouteInfoApi } from '@/api';
export
default
{
export
default
{
components
:
{
Wraper
,
UrlSelect
},
components
:
{
Wraper
,
UrlSelect
},
props
:
{
hidden
:
Function
,
row
:
Object
,
type
:
String
,
refresh
:
Function
},
props
:
{
hidden
:
Function
,
row
:
Object
,
type
:
String
,
refresh
:
Function
},
data
:
()
=>
({
data
:
(
vm
)
=>
({
form
:
{},
form
:
{},
rules
:
{
rules
:
{
routeName
:
[{
required
:
true
}],
routeName
:
[{
required
:
true
,
message
:
vm
.
$t
(
'
select.routeNameError
'
)
}],
regionId
:
[{
required
:
true
}],
regionId
:
[{
required
:
true
,
message
:
vm
.
$t
(
'
select.regionError
'
)
}],
specialityId
:
[{
required
:
true
}],
specialityId
:
[{
required
:
true
,
message
:
vm
.
$t
(
'
table.majorError
'
)
}],
dispatchType
:
[{
required
:
true
}],
dispatchType
:
[{
required
:
true
,
message
:
vm
.
$t
(
'
table.distributionModeError
'
)
}],
expirationType
:
[{
required
:
true
}],
expirationType
:
[{
required
:
true
,
message
:
vm
.
$t
(
'
basic.expirationMethodError
'
)
}],
},
},
}),
}),
...
...
src/pages/ranger/basic/line/importFlie.vue
View file @
4bc57953
<
template
>
<
template
>
<a-modal
v-model=
"visible"
title=
"导入
"
@
ok=
"handleOk"
destroyOnClose
>
<a-modal
v-model=
"visible"
:title=
"$t('table.import')
"
@
ok=
"handleOk"
destroyOnClose
>
<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=
"orgId"
>
<a-form-model-item
:label=
"$t('table.organization')
"
prop=
"orgId"
>
<UrlSelect
<UrlSelect
v-model=
"form.orgId"
v-model=
"form.orgId"
url=
"/api/v1/users/organizations"
url=
"/api/v1/users/organizations"
...
@@ -9,10 +9,10 @@
...
@@ -9,10 +9,10 @@
valueFiled=
"orgId"
valueFiled=
"orgId"
/>
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"上传文件
"
prop=
"file"
>
<a-form-model-item
:label=
"$t('table.uploadFile')
"
prop=
"file"
>
<Upload
v-model=
"form.file"
showUploadList
:number=
"1"
/>
<Upload
v-model=
"form.file"
showUploadList
:number=
"1"
/>
<template
#extra
>
<template
#extra
>
<a-button
type=
"link"
@
click=
"getTemplate"
>
下载模板
</a-button>
<a-button
type=
"link"
@
click=
"getTemplate"
>
{{
$t
(
'
table.downloadTemplate
'
)
}}
</a-button>
</
template
>
</
template
>
</a-form-model-item>
</a-form-model-item>
</a-form-model>
</a-form-model>
...
@@ -49,7 +49,7 @@ export default {
...
@@ -49,7 +49,7 @@ export default {
const
{
file
,
...
rest
}
=
this
.
form
;
const
{
file
,
...
rest
}
=
this
.
form
;
await
uploadFileRouteApi
({
...
rest
},
file
[
0
].
oFile
);
await
uploadFileRouteApi
({
...
rest
},
file
[
0
].
oFile
);
this
.
afterSubmit
&&
this
.
afterSubmit
();
this
.
afterSubmit
&&
this
.
afterSubmit
();
this
.
$message
.
info
(
'
操作成功!
'
);
this
.
$message
.
info
(
this
.
$t
(
'
table.operationSucceeded!
'
)
);
this
.
closeModal
();
this
.
closeModal
();
},
},
closeModal
()
{
closeModal
()
{
...
...
src/pages/ranger/basic/line/index.vue
View file @
4bc57953
...
@@ -9,22 +9,23 @@
...
@@ -9,22 +9,23 @@
:scroll=
"scroll"
:scroll=
"scroll"
>
>
<template
#search
="
{ query }">
<template
#search
="
{ query }">
<MoreItem
label=
"状态
"
>
<MoreItem
:label=
"$t('table.state')
"
>
<a-select
v-model=
"query.routeState"
style=
"width: 100%"
>
<a-select
v-model=
"query.routeState"
style=
"width: 100%"
>
<a-select-option
key=
"VALID"
value=
"VALID"
>
有效
</a-select-option>
<a-select-option
key=
"VALID"
value=
"VALID"
>
{{
$t
(
'
other.tag.valid
'
)
}}
</a-select-option>
<a-select-option
key=
"INVALID"
value=
"INVALID"
>
无效
</a-select-option>
<a-select-option
key=
"INVALID"
value=
"INVALID"
>
{{
$t
(
'
other.tag.invalid
'
)
}}
</a-select-option>
</a-select>
</a-select>
</MoreItem>
</MoreItem>
<MoreItem
label=
"地区
"
>
<MoreItem
:label=
"$t('select.region')
"
>
<UrlSelect
<UrlSelect
v-model=
"query.regionId"
v-model=
"query.regionId"
url=
"/ranger/inspection/api/v1/region/list"
url=
"/ranger/inspection/api/v1/region/list"
labelFiled=
"regionName"
labelFiled=
"regionName"
valueFiled=
"regionId"
valueFiled=
"regionId"
placeholder=
"选择地区"
/>
/>
</MoreItem>
</MoreItem>
<MoreItem
label=
"专业
"
>
<MoreItem
:label=
"$t('select.speciality')
"
>
<UrlSelect
<UrlSelect
v-model=
"query.specialityId"
v-model=
"query.specialityId"
:url=
"
:url=
"
...
@@ -34,30 +35,29 @@
...
@@ -34,30 +35,29 @@
"
"
labelFiled="specialityName"
labelFiled="specialityName"
valueFiled="specialityId"
valueFiled="specialityId"
placeholder="选择专业"
/>
/>
</MoreItem>
</MoreItem>
<MoreItem
label=
"线路名称
"
>
<MoreItem
:label=
"$t('select.routeName')
"
>
<a-input
v-model=
"query.inputValue"
placeholder=
"请输入
"
/>
<a-input
v-model=
"query.inputValue"
:placeholder=
"$t('input.placeholder')
"
/>
</MoreItem>
</MoreItem>
</
template
>
</
template
>
<
template
#operation
>
<
template
#operation
>
<a-button
type=
"primary"
@
click=
"onImportFlie"
>
导入
</a-button>
<a-button
type=
"primary"
@
click=
"onImportFlie"
>
{{
$t
(
'
table.import
'
)
}}
</a-button>
<a-button
@
click=
"download"
:disabled=
"!(selected.keys && selected.keys.length !== 0)"
>
<a-button
@
click=
"download"
:disabled=
"!(selected.keys && selected.keys.length !== 0)"
>
导出
{{
$t
(
'
export
'
)
}}
</a-button>
</a-button>
<a-button
<a-button
@
click=
"() => onChangeState('VALID')"
@
click=
"() => onChangeState('VALID')"
:disabled=
"!(selected.keys && selected.keys.length !== 0)"
:disabled=
"!(selected.keys && selected.keys.length !== 0)"
>
>
生效
{{
$t
(
'
table.takeEffect
'
)
}}
</a-button>
</a-button>
<a-button
<a-button
@
click=
"() => onChangeState('INVALID')"
@
click=
"() => onChangeState('INVALID')"
:disabled=
"!(selected.keys && selected.keys.length !== 0)"
:disabled=
"!(selected.keys && selected.keys.length !== 0)"
>
>
失效
{{
$t
(
'
task.invalid
'
)
}}
</a-button>
</a-button>
</
template
>
</
template
>
...
@@ -69,17 +69,17 @@
...
@@ -69,17 +69,17 @@
<!--
<Exempt
v-else
v-bind=
"drawer"
/>
-->
<!--
<Exempt
v-else
v-bind=
"drawer"
/>
-->
</
template
>
</
template
>
<a-table-column
title=
"线路名称
"
data-index=
"routeName"
/>
<a-table-column
:title=
"$t('select.routeName')
"
data-index=
"routeName"
/>
<a-table-column
title=
"专业
"
data-index=
"specialityName"
/>
<a-table-column
:title=
"$t('select.speciality')
"
data-index=
"specialityName"
/>
<a-table-column
title=
"地区
"
data-index=
"regionName"
/>
<a-table-column
:title=
"$t('select.region')
"
data-index=
"regionName"
/>
<a-table-column
title=
"状态
"
>
<a-table-column
:title=
"$t('table.state')
"
>
<
template
#default=
"row"
>
<
template
#default=
"row"
>
<span
v-if=
"row.routeState === 'VALID'"
>
有效
</span>
<span
v-if=
"row.routeState === 'VALID'"
>
{{
$t
(
'
other.tag.valid
'
)
}}
</span>
<span
v-if=
"row.routeState === 'INVALID'"
>
无效
</span>
<span
v-if=
"row.routeState === 'INVALID'"
>
{{
$t
(
'
other.tag.invalid
'
)
}}
</span>
</
template
>
</
template
>
</a-table-column>
</a-table-column>
<a-table-column
title=
"修改人
"
data-index=
"editorName"
width=
"200"
/>
<a-table-column
:title=
"$t('table.reviser')
"
data-index=
"editorName"
width=
"200"
/>
<a-table-column
title=
"修改时间
"
data-index=
"editTime"
/>
<a-table-column
:title=
"$t('table.revisionTime')
"
data-index=
"editTime"
/>
<
template
#other
>
<
template
#other
>
<ImportFlie
ref=
"importFlie"
:afterSubmit=
"rest"
/>
<ImportFlie
ref=
"importFlie"
:afterSubmit=
"rest"
/>
</
template
>
</
template
>
...
@@ -103,14 +103,13 @@ export default {
...
@@ -103,14 +103,13 @@ export default {
data
()
{
data
()
{
return
{
return
{
buttons
:
{
buttons
:
{
title
:
'
操作
'
,
options
:
{
width
:
200
,
fixed
:
'
right
'
},
options
:
{
width
:
200
,
fixed
:
'
right
'
},
data
:
[
data
:
[
{
label
:
'
编辑
'
,
click
:
this
.
edit
},
{
label
:
this
.
$t
(
'
table.edit
'
)
,
click
:
this
.
edit
},
{
label
:
'
详情
'
,
click
:
this
.
view
},
{
label
:
this
.
$t
(
'
table.view
'
)
,
click
:
this
.
view
},
{
label
:
'
编排
'
,
click
:
this
.
assemble
},
{
label
:
this
.
$t
(
'
basic.layout
'
)
,
click
:
this
.
assemble
},
{
label
:
'
调度
'
,
click
:
this
.
schedule
},
{
label
:
this
.
$t
(
'
basic.dispatch
'
)
,
click
:
this
.
schedule
},
{
label
:
'
人员
'
,
click
:
this
.
personnel
},
{
label
:
this
.
$t
(
'
table.personnel
'
)
,
click
:
this
.
personnel
},
{
{
type
:
'
confirm
'
,
type
:
'
confirm
'
,
url
:
(
row
)
=>
`/ranger/inspection/api/v1/routes/
${
row
.
routeId
}
`
,
url
:
(
row
)
=>
`/ranger/inspection/api/v1/routes/
${
row
.
routeId
}
`
,
...
@@ -127,22 +126,22 @@ export default {
...
@@ -127,22 +126,22 @@ 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.view
'
)
,
type
:
'
view
'
});
},
},
schedule
(
row
)
{
schedule
(
row
)
{
this
.
$refs
.
table
.
show
({
row
,
title
:
'
调度
'
,
type
:
'
schedule
'
});
this
.
$refs
.
table
.
show
({
row
,
title
:
this
.
$t
(
'
basic.dispatch
'
)
,
type
:
'
schedule
'
});
},
},
personnel
(
row
)
{
personnel
(
row
)
{
this
.
$refs
.
table
.
show
({
row
,
title
:
'
调度
'
,
type
:
'
personnel
'
});
this
.
$refs
.
table
.
show
({
row
,
title
:
this
.
$t
(
'
table.personnel
'
)
,
type
:
'
personnel
'
});
},
},
assemble
(
row
)
{
assemble
(
row
)
{
this
.
$refs
.
table
.
show
({
row
,
title
:
'
编排
'
,
type
:
'
assemble
'
,
dWidth
:
1200
});
this
.
$refs
.
table
.
show
({
row
,
title
:
this
.
$t
(
'
basic.layout
'
)
,
type
:
'
assemble
'
,
dWidth
:
1200
});
},
},
async
download
()
{
async
download
()
{
if
(
!
this
.
selected
?.
keys
?.
length
)
return
this
.
$message
.
error
(
'
请选择需要导出的数据
'
);
if
(
!
this
.
selected
?.
keys
?.
length
)
return
this
.
$message
.
error
(
this
.
$t
(
'
table.export.tip
'
)
);
const
resp
=
await
exportRouteData
({
routeIdList
:
this
.
selected
.
keys
.
join
(
'
,
'
)
});
const
resp
=
await
exportRouteData
({
routeIdList
:
this
.
selected
.
keys
.
join
(
'
,
'
)
});
downloadFile
(
resp
,
'
xlsx
'
);
downloadFile
(
resp
,
'
xlsx
'
);
},
},
...
@@ -152,7 +151,7 @@ export default {
...
@@ -152,7 +151,7 @@ export default {
routeState
:
state
,
routeState
:
state
,
};
};
await
updateRouteStateApi
(
data
);
await
updateRouteStateApi
(
data
);
this
.
$message
.
info
(
'
操作成功!
'
);
this
.
$message
.
info
(
this
.
$t
(
'
table.operationSucceeded!
'
)
);
this
.
rest
();
this
.
rest
();
},
},
...
...
src/pages/ranger/basic/line/uploadList.vue
View file @
4bc57953
...
@@ -8,7 +8,10 @@
...
@@ -8,7 +8,10 @@
list-type=
"picture"
list-type=
"picture"
>
>
<slot>
<slot>
<a-button
v-if=
"fileList.length
<
number
"
>
<a-icon
type=
"upload"
/>
上传
</a-button>
<a-button
v-if=
"fileList.length
<
number
"
>
<a-icon
type=
"upload"
/>
{{
$t
(
'
user.upload
'
)
}}
</a-button>
</slot>
</slot>
</a-upload>
</a-upload>
</
template
>
</
template
>
...
...
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