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
Show 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';
import
InputLang
from
'
./input
'
;
import
OtherLang
from
'
./other
'
;
import
acronLang
from
'
./acron
'
;
import
basicLang
from
'
./basic
'
;
const
zh_CN
=
{};
const
en_US
=
{};
...
...
@@ -27,5 +28,6 @@ formatLang(systemLang);
formatLang
(
InputLang
);
formatLang
(
OtherLang
);
formatLang
(
acronLang
);
formatLang
(
basicLang
);
export
{
en_US
,
zh_CN
};
src/local/select.js
View file @
4bc57953
...
...
@@ -4,14 +4,17 @@ export default {
'
select.startTime
'
:
[
'
开始时间
'
,
'
Start Time
'
],
'
select.endTime
'
:
[
'
结束时间
'
,
'
End Time
'
],
'
select.region
'
:
[
'
地区
'
,
'
Region
'
],
'
select.regionError
'
:
[
'
请选择地区
'
,
'
Please Select Region
'
],
'
select.speciality
'
:
[
'
专业
'
,
'
Speciality
'
],
'
select.shiftTypeName
'
:
[
'
班组
'
,
'
ShiftTypeName
'
],
'
select.shiftTypeNameError
'
:
[
'
请输入班组名称
'
,
'
Pleas Enter ShiftTypeName
'
],
export
:
[
'
导出
'
,
'
Export
'
],
'
select.routes
'
:
[
'
线路
'
,
'
Routes
'
],
'
select.examine
'
:
[
'
巡检状态
'
,
'
Examine Status
'
],
'
select.taskType
'
:
[
'
任务类型
'
,
'
Task Type
'
],
'
select.examiner
'
:
[
'
巡检人
'
,
'
Examiner
'
],
'
select.routeName
'
:
[
'
线路名称
'
,
'
Route Name
'
],
'
select.routeNameError
'
:
[
'
请输入@:select.routeName
'
,
'
Please Enter @:select.routeName
'
],
'
select.option.place
'
:
[
'
地点免检
'
,
'
Place Exemption
'
],
'
select.option.unit
'
:
[
'
单元免检
'
,
'
Unit Exemption
'
],
};
src/local/table.js
View file @
4bc57953
...
...
@@ -49,6 +49,7 @@ export default {
'
table.dataType
'
:
[
'
数据类型
'
,
'
Data Type
'
],
'
table.majorName
'
:
[
'
专业名称
'
,
'
Major Name
'
],
'
table.major
'
:
[
'
专业
'
,
'
Major
'
],
'
table.majorError
'
:
[
'
请选择@:table.major
'
,
'
Please Select @:table.major
'
],
'
table.personnel
'
:
[
'
人员
'
,
'
Personnel
'
],
'
table.department
'
:
[
'
部门
'
,
'
Department
'
],
'
table.exemptionType
'
:
[
'
免检类型
'
,
'
Exemption Type
'
],
...
...
@@ -59,4 +60,13 @@ export default {
'
table.time.end
'
:
[
'
结束时间
'
,
'
Start End
'
],
'
table.reason
'
:
[
'
原因
'
,
'
Reason
'
],
'
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
>
<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-item
label=
"班组
"
prop=
"shiftType"
>
<a-select
v-model=
"form.shiftType"
:disabled=
"isView"
>
<a-select-option
key=
"DAY"
value=
"DAY"
>
白班
</a-select-option>
<a-select-option
key=
"MIDDLE"
value=
"MIDDLE"
>
中班
</a-select-option>
<a-select-option
key=
"NIGHT"
value=
"NIGHT"
>
晚班
</a-select-option>
<a-form-model-item
:label=
"$t('select.shiftTypeName')
"
prop=
"shiftType"
>
<a-select
v-model=
"form.shiftType"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
>
<a-select-option
key=
"DAY"
value=
"DAY"
>
{{
$t
(
'
basic.day
'
)
}}
</a-select-option>
<a-select-option
key=
"MIDDLE"
value=
"MIDDLE"
>
{{
$t
(
'
basic.middle
'
)
}}
</a-select-option>
<a-select-option
key=
"NIGHT"
value=
"NIGHT"
>
{{
$t
(
'
basic.night
'
)
}}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item
label=
"生成第二天线路
"
prop=
"isNextDay"
>
<a-select
v-model=
"form.isNextDay"
:disabled=
"isView"
>
<a-select-option
key=
"YES"
value=
"YES"
>
是
</a-select-option>
<a-select-option
key=
"NO"
value=
"NO"
>
否
</a-select-option>
<a-form-model-item
:label=
"$t('basic.generateNext')
"
prop=
"isNextDay"
>
<a-select
v-model=
"form.isNextDay"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
>
<a-select-option
key=
"YES"
value=
"YES"
>
{{
$t
(
'
table.yes
'
)
}}
</a-select-option>
<a-select-option
key=
"NO"
value=
"NO"
>
{{
$t
(
'
table.no
'
)
}}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item
label=
"生成第二天线路"
prop=
"scheduleRule"
>
<Acron
v-model=
"form.scheduleRule"
:disabled=
"isView"
@
input=
"onChang"
/>
<a-form-model-item
:label=
"$t('basic.generateNext')"
prop=
"scheduleRule"
>
<Acron
v-model=
"form.scheduleRule"
:disabled=
"isView"
@
input=
"onChang"
:placeholder=
"$t('select.placeholder')"
/>
</a-form-model-item>
<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>
</Drawer>
...
...
@@ -48,9 +57,9 @@ export default {
visible
:
false
,
form
:
{},
rules
:
{
shiftType
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
isNextDay
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
scheduleRule
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
shiftType
:
[{
required
:
true
,
message
:
this
.
$t
(
'
select.shiftTypeNameError
'
)
}],
isNextDay
:
[{
required
:
true
,
message
:
this
.
$t
(
'
basic.generateNextError
'
)
}],
scheduleRule
:
[{
required
:
true
,
message
:
this
.
$t
(
'
input.error
'
)
}],
},
};
},
...
...
@@ -66,7 +75,7 @@ export default {
},
onChang
(
val
)
{
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
>
<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"
/>
<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"
>
...
...
@@ -8,11 +8,13 @@
<template
#title
>
<a-row>
<a-col
:span=
"12"
>
<a-tag
v-if=
"item.shiftState === 'VALID'"
color=
"#87d068"
>
有效
</a-tag>
<a-tag
v-else
color=
"#f50"
>
无效
</a-tag>
<span
v-if=
"item.shiftType === 'DAY'"
>
白班
</span>
<span
v-if=
"item.shiftType === 'MIDDLE'"
>
中班
</span>
<span
v-if=
"item.shiftType === 'NIGHT'"
>
晚班
</span>
<a-tag
v-if=
"item.shiftState === 'VALID'"
color=
"#87d068"
>
{{
$t
(
'
other.tag.valid
'
)
}}
</a-tag>
<a-tag
v-else
color=
"#f50"
>
{{
$t
(
'
other.tag.invalid
'
)
}}
</a-tag>
<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
:span=
"12"
class=
"tw-text-right"
>
<a-space>
...
...
@@ -23,20 +25,22 @@
<a
v-if=
"item.shiftState === 'INVALID'"
@
click=
"() => scheduleUpdateState(item.shiftId, 'VALID')"
>
生效
</a
>
{{
$t
(
'
table.takeEffect
'
)
}}
</a>
<a
v-if=
"item.shiftState === 'VALID'"
@
click=
"() => scheduleUpdateState(item.shiftId, 'INVALID')"
>
失效
</a
>
{{
$t
(
'
task.invalid
'
)
}}
</a>
</a-space>
</a-col>
</a-row>
</
template
>
<div>
{{ item.scheduleRule }}
</div>
<div>
{{ item.scheduleDescription }}
</div>
<div>
{{ item.isNextDay === 'YES'
&&
'生成第二天线路'
}}
</div>
<div>
{{ item.isNextDay === 'YES'
&&
$t('basic.generateNext')
}}
</div>
</a-card>
</a-list-item>
</a-list>
...
...
src/pages/ranger/basic/line/add_edit.vue
View file @
4bc57953
<
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=
"routeName"
>
<a-input
v-model=
"form.routeName"
:disabled=
"isView"
/>
<a-form-model-item
:label=
"$t('select.routeName')
"
prop=
"routeName"
>
<a-input
v-model=
"form.routeName"
:disabled=
"isView"
:placeholder=
"$t('input.placeholder')"
/>
</a-form-model-item>
<a-form-model-item
label=
"所属地区
"
prop=
"regionId"
>
<a-form-model-item
:label=
"$t('select.region')
"
prop=
"regionId"
>
<UrlSelect
v-model=
"form.regionId"
url=
"/ranger/inspection/api/v1/region/list"
...
...
@@ -13,7 +13,7 @@
:disabled=
"isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"专业
"
prop=
"specialityId"
>
<a-form-model-item
:label=
"$t('table.major')
"
prop=
"specialityId"
>
<UrlSelect
v-model=
"form.specialityId"
:url=
"
...
...
@@ -26,23 +26,48 @@
:disabled="isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"分配方式"
prop=
"dispatchType"
>
<a-select
v-model=
"form.dispatchType"
style=
"width: 100%"
:disabled=
"isView"
>
<a-select-option
key=
"PERSON"
value=
"PERSON"
>
按人分配
</a-select-option>
<a-select-option
key=
"SPECIALITY"
value=
"SPECIALITY"
>
按专业分配
</a-select-option>
<a-form-model-item
:label=
"$t('table.distributionMode')"
prop=
"dispatchType"
>
<a-select
v-model=
"form.dispatchType"
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-form-model-item>
<a-form-model-item
label=
"过期方式"
prop=
"expirationType"
>
<a-select
v-model=
"form.expirationType"
style=
"width: 100%"
:disabled=
"isView"
>
<a-select-option
key=
"NEXT"
value=
"NEXT"
>
下次任务开始过期
</a-select-option>
<a-select-option
key=
"ONE_DAY"
value=
"ONE_DAY"
>
一天后过期
</a-select-option>
<a-select-option
key=
"SEVEN_DAY"
value=
"SEVEN_DAY"
>
七天后过期
</a-select-option>
<a-select-option
key=
"FIFTEEN_DAY"
value=
"FIFTEEN_DAY"
>
十五天后过期
</a-select-option>
<a-select-option
key=
"NEVER"
value=
"NEVER"
>
不过期
</a-select-option>
<a-form-model-item
:label=
"$t('basic.expirationMethod')"
prop=
"expirationType"
>
<a-select
v-model=
"form.expirationType"
style=
"width: 100%"
:disabled=
"isView"
:placeholder=
"$t('select.placeholder')"
>
<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-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>
...
...
@@ -56,14 +81,14 @@ import { addRouteInfoApi, updateRouteInfoApi, getRouteInfoApi } from '@/api';
export
default
{
components
:
{
Wraper
,
UrlSelect
},
props
:
{
hidden
:
Function
,
row
:
Object
,
type
:
String
,
refresh
:
Function
},
data
:
()
=>
({
data
:
(
vm
)
=>
({
form
:
{},
rules
:
{
routeName
:
[{
required
:
true
}],
regionId
:
[{
required
:
true
}],
specialityId
:
[{
required
:
true
}],
dispatchType
:
[{
required
:
true
}],
expirationType
:
[{
required
:
true
}],
routeName
:
[{
required
:
true
,
message
:
vm
.
$t
(
'
select.routeNameError
'
)
}],
regionId
:
[{
required
:
true
,
message
:
vm
.
$t
(
'
select.regionError
'
)
}],
specialityId
:
[{
required
:
true
,
message
:
vm
.
$t
(
'
table.majorError
'
)
}],
dispatchType
:
[{
required
:
true
,
message
:
vm
.
$t
(
'
table.distributionModeError
'
)
}],
expirationType
:
[{
required
:
true
,
message
:
vm
.
$t
(
'
basic.expirationMethodError
'
)
}],
},
}),
...
...
src/pages/ranger/basic/line/importFlie.vue
View file @
4bc57953
<
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-item
label=
"组织
"
prop=
"orgId"
>
<a-form-model-item
:label=
"$t('table.organization')
"
prop=
"orgId"
>
<UrlSelect
v-model=
"form.orgId"
url=
"/api/v1/users/organizations"
...
...
@@ -9,10 +9,10 @@
valueFiled=
"orgId"
/>
</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"
/>
<template
#extra
>
<a-button
type=
"link"
@
click=
"getTemplate"
>
下载模板
</a-button>
<a-button
type=
"link"
@
click=
"getTemplate"
>
{{
$t
(
'
table.downloadTemplate
'
)
}}
</a-button>
</
template
>
</a-form-model-item>
</a-form-model>
...
...
@@ -49,7 +49,7 @@ export default {
const
{
file
,
...
rest
}
=
this
.
form
;
await
uploadFileRouteApi
({
...
rest
},
file
[
0
].
oFile
);
this
.
afterSubmit
&&
this
.
afterSubmit
();
this
.
$message
.
info
(
'
操作成功!
'
);
this
.
$message
.
info
(
this
.
$t
(
'
table.operationSucceeded!
'
)
);
this
.
closeModal
();
},
closeModal
()
{
...
...
src/pages/ranger/basic/line/index.vue
View file @
4bc57953
...
...
@@ -9,22 +9,23 @@
:scroll=
"scroll"
>
<template
#search
="
{ query }">
<MoreItem
label=
"状态
"
>
<MoreItem
:label=
"$t('table.state')
"
>
<a-select
v-model=
"query.routeState"
style=
"width: 100%"
>
<a-select-option
key=
"VALID"
value=
"VALID"
>
有效
</a-select-option>
<a-select-option
key=
"INVALID"
value=
"INVALID"
>
无效
</a-select-option>
<a-select-option
key=
"VALID"
value=
"VALID"
>
{{
$t
(
'
other.tag.valid
'
)
}}
</a-select-option>
<a-select-option
key=
"INVALID"
value=
"INVALID"
>
{{
$t
(
'
other.tag.invalid
'
)
}}
</a-select-option>
</a-select>
</MoreItem>
<MoreItem
label=
"地区
"
>
<MoreItem
:label=
"$t('select.region')
"
>
<UrlSelect
v-model=
"query.regionId"
url=
"/ranger/inspection/api/v1/region/list"
labelFiled=
"regionName"
valueFiled=
"regionId"
placeholder=
"选择地区"
/>
</MoreItem>
<MoreItem
label=
"专业
"
>
<MoreItem
:label=
"$t('select.speciality')
"
>
<UrlSelect
v-model=
"query.specialityId"
:url=
"
...
...
@@ -34,30 +35,29 @@
"
labelFiled="specialityName"
valueFiled="specialityId"
placeholder="选择专业"
/>
</MoreItem>
<MoreItem
label=
"线路名称
"
>
<a-input
v-model=
"query.inputValue"
placeholder=
"请输入
"
/>
<MoreItem
:label=
"$t('select.routeName')
"
>
<a-input
v-model=
"query.inputValue"
:placeholder=
"$t('input.placeholder')
"
/>
</MoreItem>
</
template
>
<
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)"
>
导出
{{
$t
(
'
export
'
)
}}
</a-button>
<a-button
@
click=
"() => onChangeState('VALID')"
:disabled=
"!(selected.keys && selected.keys.length !== 0)"
>
生效
{{
$t
(
'
table.takeEffect
'
)
}}
</a-button>
<a-button
@
click=
"() => onChangeState('INVALID')"
:disabled=
"!(selected.keys && selected.keys.length !== 0)"
>
失效
{{
$t
(
'
task.invalid
'
)
}}
</a-button>
</
template
>
...
...
@@ -69,17 +69,17 @@
<!--
<Exempt
v-else
v-bind=
"drawer"
/>
-->
</
template
>
<a-table-column
title=
"线路名称
"
data-index=
"routeName"
/>
<a-table-column
title=
"专业
"
data-index=
"specialityName"
/>
<a-table-column
title=
"地区
"
data-index=
"regionName"
/>
<a-table-column
title=
"状态
"
>
<a-table-column
:title=
"$t('select.routeName')
"
data-index=
"routeName"
/>
<a-table-column
:title=
"$t('select.speciality')
"
data-index=
"specialityName"
/>
<a-table-column
:title=
"$t('select.region')
"
data-index=
"regionName"
/>
<a-table-column
:title=
"$t('table.state')
"
>
<
template
#default=
"row"
>
<span
v-if=
"row.routeState === 'VALID'"
>
有效
</span>
<span
v-if=
"row.routeState === 'INVALID'"
>
无效
</span>
<span
v-if=
"row.routeState === 'VALID'"
>
{{
$t
(
'
other.tag.valid
'
)
}}
</span>
<span
v-if=
"row.routeState === 'INVALID'"
>
{{
$t
(
'
other.tag.invalid
'
)
}}
</span>
</
template
>
</a-table-column>
<a-table-column
title=
"修改人
"
data-index=
"editorName"
width=
"200"
/>
<a-table-column
title=
"修改时间
"
data-index=
"editTime"
/>
<a-table-column
:title=
"$t('table.reviser')
"
data-index=
"editorName"
width=
"200"
/>
<a-table-column
:title=
"$t('table.revisionTime')
"
data-index=
"editTime"
/>
<
template
#other
>
<ImportFlie
ref=
"importFlie"
:afterSubmit=
"rest"
/>
</
template
>
...
...
@@ -103,14 +103,13 @@ export default {
data
()
{
return
{
buttons
:
{
title
:
'
操作
'
,
options
:
{
width
:
200
,
fixed
:
'
right
'
},
data
:
[
{
label
:
'
编辑
'
,
click
:
this
.
edit
},
{
label
:
'
详情
'
,
click
:
this
.
view
},
{
label
:
'
编排
'
,
click
:
this
.
assemble
},
{
label
:
'
调度
'
,
click
:
this
.
schedule
},
{
label
:
'
人员
'
,
click
:
this
.
personnel
},
{
label
:
this
.
$t
(
'
table.edit
'
)
,
click
:
this
.
edit
},
{
label
:
this
.
$t
(
'
table.view
'
)
,
click
:
this
.
view
},
{
label
:
this
.
$t
(
'
basic.layout
'
)
,
click
:
this
.
assemble
},
{
label
:
this
.
$t
(
'
basic.dispatch
'
)
,
click
:
this
.
schedule
},
{
label
:
this
.
$t
(
'
table.personnel
'
)
,
click
:
this
.
personnel
},
{
type
:
'
confirm
'
,
url
:
(
row
)
=>
`/ranger/inspection/api/v1/routes/
${
row
.
routeId
}
`
,
...
...
@@ -127,22 +126,22 @@ 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.view
'
)
,
type
:
'
view
'
});
},
schedule
(
row
)
{
this
.
$refs
.
table
.
show
({
row
,
title
:
'
调度
'
,
type
:
'
schedule
'
});
this
.
$refs
.
table
.
show
({
row
,
title
:
this
.
$t
(
'
basic.dispatch
'
)
,
type
:
'
schedule
'
});
},
personnel
(
row
)
{
this
.
$refs
.
table
.
show
({
row
,
title
:
'
调度
'
,
type
:
'
personnel
'
});
this
.
$refs
.
table
.
show
({
row
,
title
:
this
.
$t
(
'
table.personnel
'
)
,
type
:
'
personnel
'
});
},
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
()
{
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
(
'
,
'
)
});
downloadFile
(
resp
,
'
xlsx
'
);
},
...
...
@@ -152,7 +151,7 @@ export default {
routeState
:
state
,
};
await
updateRouteStateApi
(
data
);
this
.
$message
.
info
(
'
操作成功!
'
);
this
.
$message
.
info
(
this
.
$t
(
'
table.operationSucceeded!
'
)
);
this
.
rest
();
},
...
...
src/pages/ranger/basic/line/uploadList.vue
View file @
4bc57953
...
...
@@ -8,7 +8,10 @@
list-type=
"picture"
>
<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>
</a-upload>
</
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