Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
SHR
/
tFIMS
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit acd0d193
authored
Sep 06, 2019
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
页面-公共数据
1 parent
05847f2f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
180 additions
and
91 deletions
src/views/deviceManagement/editDialog.vue
src/views/deviceManagement/index.vue
src/views/maintainManagement/index.vue
src/views/subSysManagement/editDialog.vue
src/views/subSysManagement/index.vue
src/views/system/login/page.vue
src/views/systemMonitor/index.vue
src/views/trafficManagement/editDialog.vue
src/views/trafficManagement/index.vue
src/views/deviceManagement/editDialog.vue
View file @
acd0d19
...
...
@@ -56,8 +56,12 @@
</el-form-item>
<el-form-item
label=
"所在地"
prop=
"stationName"
>
<el-select
v-model=
"editForm.stationName"
placeholder=
"请选择所在地"
clearable
filterable
>
<el-option
label=
"仓库"
value=
"1"
></el-option>
<el-option
label=
"广州站"
value=
"2"
></el-option>
<el-option
v-for=
"(item, index) in station"
:key=
"index"
:value=
"item.confCode"
:label=
"item.confValue"
></el-option>
</el-select>
</el-form-item>
<el-form-item
...
...
@@ -130,6 +134,7 @@ export default {
type
:
Boolean
,
default
:
false
},
station
:
Array
,
editForm
:
Object
},
...
...
src/views/deviceManagement/index.vue
View file @
acd0d19
...
...
@@ -11,8 +11,12 @@
</el-form-item>
<el-form-item
label=
"所在地"
>
<el-select
v-model=
"searchForm.stationCode"
placeholder=
"请选择所在地"
clearable
filterable
>
<el-option
value=
"1"
label=
"仓库"
></el-option>
<el-option
value=
"2"
label=
"广州站"
></el-option>
<el-option
v-for=
"(item, index) in baseData.station"
:key=
"index"
:value=
"item.confCode"
:label=
"item.confValue"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"责任人"
>
...
...
@@ -27,17 +31,23 @@
</el-form>
<el-row
style=
"height: 40px; line-height: 40px"
>
<el-col
:span=
"12"
>
物料列表
</el-col>
<el-col
:span=
"12"
style=
"text-align: right; position: relative;"
>
<auth-button
category=
"Button"
>
<input
type=
"file"
class=
"import-input"
accept=
".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@
change=
"importFile($event)"
/>
</auth-button>
<!--
<auth-button
label=
"导出"
type=
"Button"
@
e-auth-click=
"exportFile"
></auth-button>
-->
<el-col
:span=
"12"
style=
"position: relative; display: flex; justify-content: flex-end; "
>
<span
style=
"margin-right: 10px;"
>
<auth-button
category=
"Button"
label=
"导出"
></auth-button>
</span>
<auth-button
category=
"Button"
label=
"导入"
>
<input
type=
"file"
class=
"import-input"
accept=
".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@
change=
"importFile($event)"
/>
</auth-button>
</el-col>
</el-row>
<el-table
...
...
@@ -100,6 +110,7 @@
<edit-dialog
:isVisible=
"editVisible"
:editForm=
"editForm"
:station=
"baseData.station"
@
closeDialog=
"handleEditClose"
@
confirmDialog=
"handleEditConfirm"
></edit-dialog>
...
...
@@ -108,6 +119,7 @@
<
script
>
import
EditDialog
from
'./editDialog'
import
{
BaseData
}
from
'@/common/constants'
import
{
getListApi
,
editApi
,
removeApi
,
importApi
,
exportApi
}
from
'@api/deviceManagement'
import
notice
from
'@/common/notice'
export
default
{
...
...
@@ -172,15 +184,23 @@ export default {
// 页码
currentPage
:
1
,
pageSize
:
10
,
total
:
30
total
:
30
,
baseData
:
{
station
:
[]
}
}
},
mounted
()
{
this
.
loadingGetList
()
this
.
loadBaseData
()
},
methods
:
{
async
loadBaseData
()
{
this
.
baseData
.
station
=
await
this
.
$store
.
dispatch
(
'd2admin/base/get'
,
BaseData
.
STATION
.
KEY
)
},
loadingGetList
()
{
this
.
tableLoading
=
true
this
.
getList
()
...
...
@@ -313,7 +333,7 @@ export default {
right
:
0
;
top
:
0
;
width
:
70px
;
height
:
100%
;
height
:
36px
;
cursor
:
pointer
;
font-size
:
0
}
...
...
src/views/maintainManagement/index.vue
View file @
acd0d19
...
...
@@ -26,8 +26,8 @@
<el-option
v-for=
"(optionItem, optionIndex) in item.options"
:key=
"optionIndex"
:label=
"optionItem.
label
"
:value=
"optionItem.
valu
e"
:label=
"optionItem.
confValue
"
:value=
"optionItem.
confCod
e"
></el-option>
</el-select>
<el-date-picker
...
...
@@ -108,6 +108,7 @@
<
script
>
import
{
getListApi
,
removeApi
,
exportApi
}
from
'@api/maintainManagement'
import
{
mapActions
}
from
'vuex'
import
notice
from
'@/common/notice'
export
default
{
name
:
'maintainManagement'
,
...
...
@@ -159,24 +160,12 @@ export default {
label
:
'车辆站点'
,
type
:
'select'
,
model
:
'stationName'
,
options
:
[{
label
:
'青岛'
,
value
:
'1'
},
{
label
:
'深圳'
,
value
:
'2'
}]
options
:
[]
},
{
label
:
'子系统'
,
type
:
'select'
,
model
:
'subsystemTypeCode'
,
options
:
[{
label
:
'3#4F'
,
value
:
'1'
},
{
label
:
'3#5F'
,
value
:
'2'
}]
options
:
[]
}],
// 表格
tableLoading
:
false
,
...
...
@@ -255,9 +244,29 @@ export default {
mounted
()
{
this
.
loadingGetList
()
this
.
loadBaseData
()
},
methods
:
{
...
mapActions
(
'd2admin/base'
,
[
"load"
]),
async
loadBaseData
()
{
const
modelToOptions
=
{
'stationName'
:
'station'
,
'subsystemTypeCode'
:
'subsys'
}
const
data
=
await
this
.
load
()
if
(
data
)
{
for
(
var
item
in
modelToOptions
)
{
let
pos
=
this
.
searchFormArr
.
findIndex
(
arrItem
=>
arrItem
.
model
==
item
)
this
.
searchFormArr
[
pos
].
options
=
data
[
modelToOptions
[
item
]]
}
}
// this.load().then(res => {
// for(var item in modelToOptions) {
// let pos = this.searchFormArr.findIndex(arrItem => arrItem.model == item)
// this.searchFormArr[pos].options = res[modelToOptions[item]]
// }
// })
},
loadingGetList
()
{
this
.
tableLoading
=
true
this
.
getList
()
...
...
src/views/subSysManagement/editDialog.vue
View file @
acd0d19
...
...
@@ -33,8 +33,11 @@ import { constants } from 'fs';
</el-form-item>
<el-form-item
label=
"类型"
prop=
"systemType"
>
<el-select
v-model=
"editForm.systemType"
placeholder=
"请选择类型"
clearable
filterable
>
<el-option
label=
"座椅"
value=
"1"
></el-option>
<el-option
label=
"桌板"
value=
"2"
></el-option>
<el-option
v-for=
"(item, index) in subsys"
:key=
"index"
:value=
"item.confCode"
:label=
"item.confValue"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"生产厂家"
prop=
"merchantName"
>
...
...
@@ -105,13 +108,14 @@ export default {
type
:
Boolean
,
default
:
false
},
subsys
:
Array
,
editForm
:
Object
},
watch
:
{
isVisible
(
val
)
{
this
.
disabled
=
!!
this
.
editForm
.
subsystemCode
this
.
$refs
.
editRuleForm
.
resetFields
()
this
.
$refs
.
editRuleForm
&&
this
.
$refs
.
editRuleForm
.
resetFields
()
}
},
...
...
src/views/subSysManagement/index.vue
View file @
acd0d19
...
...
@@ -11,8 +11,11 @@
</el-form-item>
<el-form-item
label=
"类型"
>
<el-select
v-model=
"searchForm.systemTypeCode"
placeholder=
"请选择类型"
clearable
filterable
>
<el-option
label=
"座椅"
value=
"1"
></el-option>
<el-option
label=
"桌板"
value=
"2"
></el-option>
<el-option
v-for=
"(item, index) in baseData.subsys"
:key=
"index"
:value=
"item.confCode"
:label=
"item.confValue"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"车辆编号"
>
...
...
@@ -95,6 +98,7 @@
<edit-dialog
:isVisible=
"editVisible"
:editForm=
"editForm"
:subsys=
"baseData.subsys"
@
closeDialog=
"handleEditClose"
@
confirmDialog=
"handleEditConfirm"
></edit-dialog>
...
...
@@ -103,6 +107,7 @@
<
script
>
import
EditDialog
from
'./editDialog'
import
{
BaseData
}
from
'@/common/constants'
import
{
getListApi
,
methods
,
editApi
,
removeApi
}
from
'@api/subSysManagement'
import
notice
from
'@/common/notice'
export
default
{
...
...
@@ -171,15 +176,24 @@ export default {
// 页码
currentPage
:
1
,
pageSize
:
10
,
total
:
30
total
:
30
,
baseData
:
{
subsys
:
[]
}
}
},
mounted
()
{
this
.
loadingGetList
()
this
.
loadBaseData
()
},
methods
:
{
async
loadBaseData
()
{
this
.
baseData
.
subsys
=
await
this
.
$store
.
dispatch
(
'd2admin/base/get'
,
BaseData
.
SUBSYS
.
KEY
)
},
loadingGetList
()
{
this
.
tableLoading
=
true
this
.
getList
()
...
...
@@ -235,19 +249,19 @@ export default {
this
.
loadingGetList
()
},
resetForm
(
obj
)
{
for
(
var
item
in
obj
)
{
if
(
obj
[
item
]
instanceof
Array
)
{
obj
[
item
]
=
[]
}
else
{
obj
[
item
]
=
''
}
}
},
//
resetForm (obj) {
//
for (var item in obj) {
//
if (obj[item] instanceof Array) {
//
obj[item] = []
//
} else {
//
obj[item] = ''
//
}
//
}
//
},
handleEditClose
()
{
this
.
editVisible
=
!
this
.
editVisible
this
.
resetForm
(
this
.
editForm
)
//
this.resetForm(this.editForm)
// console.log(this.editForm)
},
...
...
src/views/system/login/page.vue
View file @
acd0d19
...
...
@@ -36,11 +36,11 @@
<span
class=
"form-sub"
>
让服务更智慧、更直接
</span>
</div>
<div
class=
"input-wrap"
>
<el-form-item
prop=
"
usern
ame"
>
<el-form-item
prop=
"
loginN
ame"
>
<el-input
type=
"text"
v-on:keyup
.
native
.
13=
"submit"
v-model=
"formLogin.
usern
ame"
v-model=
"formLogin.
loginN
ame"
placeholder=
"请输入用户名"
v-focus
>
<i
slot=
"prepend"
class=
"fa fa-user-circle-o"
></i>
...
...
@@ -107,13 +107,13 @@ export default {
time
:
dayjs
().
format
(
'HH:mm:ss'
),
// 表单
formLogin
:
{
usern
ame
:
'admin'
,
loginN
ame
:
'admin'
,
password
:
'admin'
,
code
:
'v9am'
},
// 表单校验
rules
:
Object
.
freeze
({
usern
ame
:
[
loginN
ame
:
[
{
required
:
true
,
message
:
'请输入用户名'
,
...
...
@@ -149,7 +149,7 @@ export default {
* @param {Object} user 用户信息
*/
handleUserBtnClick
(
user
)
{
this
.
formLogin
.
username
=
user
.
usern
ame
this
.
formLogin
.
loginName
=
user
.
loginN
ame
this
.
formLogin
.
password
=
user
.
password
this
.
submit
()
},
...
...
@@ -161,18 +161,23 @@ export default {
*/
// 提交登录信息
submit
()
{
// console.log(navigator.userAgent.toLocaleLowerCase())
this
.
$refs
.
loginForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
// 登录
// 注意 这里的演示没有传验证码
// 具体需要传递的数据请自行修改代码
this
.
login
({
username
:
this
.
formLogin
.
username
,
password
:
this
.
formLogin
.
password
loginName
:
this
.
formLogin
.
loginName
,
password
:
this
.
formLogin
.
password
,
loginType
:
1
,
deviceCode
:
'chrome'
})
.
then
(()
=>
{
this
.
$store
.
dispatch
(
'd2admin/auth/init'
).
then
(
_
=>
{
// 重定向对象不存在则返回顶层路径
console
.
log
(
this
.
$route
.
query
.
redirect
)
console
.
log
(
this
.
$route
)
this
.
$router
.
replace
(
this
.
$route
.
query
.
redirect
||
'/'
)
})
})
...
...
src/views/systemMonitor/index.vue
View file @
acd0d19
...
...
@@ -7,9 +7,10 @@
<span
style=
"margin-right: 20px;"
>
子系统类型
</span>
<el-radio-group
v-model=
"subSystemRadio"
@
change=
"radioChange"
>
<el-radio-button
v-for=
"(item, index) in
systemTypeArr
"
v-for=
"(item, index) in
baseData.subsys
"
:key=
"index"
:label=
"item.label"
:value=
"item.confCode"
:label=
"item.confValue"
>
</el-radio-button>
</el-radio-group>
...
...
@@ -30,11 +31,16 @@
</el-form-item>
<el-form-item
label=
"归属车辆段"
>
<el-select
v-model=
"searchForm.stationCode"
placeholder=
"请选择归属车辆段"
filterable
clearable
>
<el-option
<
!--
<
el-option
v-for=
"(item,index) in stationCodeArr"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
></el-option>
-->
<el-option
v-for=
"(item, index) in baseData.station"
:key=
"index"
:value=
"item.confCode"
:label=
"item.confValue"
></el-option>
</el-select>
</el-form-item>
...
...
@@ -113,6 +119,8 @@
<
script
>
import
{
getListApi
,
reportApi
,
exportApi
}
from
'@api/systemMonitor'
import
notice
from
'@/common/notice'
import
{
mapActions
}
from
'vuex'
// import { BaseData } from '@/common/constants'
require
(
'echarts/lib/chart/pie'
)
require
(
"echarts/lib/component/tooltip"
);
...
...
@@ -123,13 +131,13 @@ export default {
data
()
{
return
{
subSystemRadio
:
'全部'
,
systemTypeArr
:
[{
label
:
'全部'
,
value
:
'1'
},
{
label
:
'座椅'
,
value
:
'2'
}],
//
systemTypeArr: [{
//
label: '全部',
//
value: '1'
//
}, {
//
label: '座椅',
//
value: '2'
//
}],
// 绘图
totalECharts
:
''
,
totalOptions
:
{
...
...
@@ -203,13 +211,13 @@ export default {
subsystemCode
:
''
,
onlineStatus
:
''
},
stationCodeArr
:
[{
label
:
'归属1'
,
value
:
'1'
},
{
label
:
'归属2'
,
value
:
'2'
}],
//
stationCodeArr: [{
//
label: '归属1',
//
value: '1'
//
}, {
//
label: '归属2',
//
value: '2'
//
}],
// 表格
tableData
:
[],
tableLoading
:
false
,
...
...
@@ -235,19 +243,33 @@ export default {
// 翻页
currentPage
:
1
,
pageSize
:
10
,
total
:
20
total
:
20
,
baseData
:
{
station
:
[],
subsys
:
[]
}
}
},
mounted
()
{
// this.drawPie()
this
.
$echarts
=
echarts
this
.
loadingGetList
()
this
.
loadBaseData
()
this
.
totalECharts
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'totalEcharts'
))
this
.
getPie
()
},
methods
:
{
...
mapActions
(
"d2admin/base"
,
[
"load"
]),
async
loadBaseData
()
{
// this.baseData.station = await this.$store.dispatch('d2admin/base/get', BaseData.STATION.KEY)
const
{
station
,
subsys
}
=
await
this
.
load
()
this
.
baseData
.
station
=
station
this
.
baseData
.
subsys
=
subsys
// console.log(this.baseData)
},
loadingGetList
()
{
this
.
tableLoading
=
true
this
.
getList
()
...
...
src/views/trafficManagement/editDialog.vue
View file @
acd0d19
...
...
@@ -23,8 +23,11 @@
</el-form-item>
<el-form-item
label=
"归属车辆段"
prop=
"stationName"
>
<el-select
v-model=
"editForm.stationName"
placeholder=
"请选择归属车辆段"
clearable
filterable
>
<el-option
label=
"青岛"
value=
"1"
></el-option>
<el-option
label=
"深圳"
value=
"2"
></el-option>
<el-option
v-for=
"(item, index) in station"
:key=
"index"
:value=
"item.confCode"
:label=
"item.confValue"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"维修承包商"
prop=
"merchantName"
>
...
...
@@ -75,6 +78,7 @@ export default {
type
:
Boolean
,
default
:
false
},
station
:
Array
,
editForm
:
Object
},
...
...
src/views/trafficManagement/index.vue
View file @
acd0d19
...
...
@@ -11,8 +11,13 @@
</el-form-item>
<el-form-item
label=
"归属车辆段"
>
<el-select
v-model=
"searchForm.stationCode"
placeholder=
"请选择归属车辆段"
clearable
filterable
>
<el-option
label=
"青岛"
value=
"1"
></el-option>
<el-option
label=
"深圳"
value=
"2"
></el-option>
<el-option
v-for=
"(item, index) in baseData.station"
:key=
"index"
:value=
"item.confCode"
:label=
"item.confValue"
></el-option>
<!--
<el-option
label=
"青岛"
value=
"1"
></el-option>
<el-option
label=
"深圳"
value=
"2"
></el-option>
-->
</el-select>
</el-form-item>
<el-form-item
label=
"维修承包商"
>
...
...
@@ -96,6 +101,7 @@
<edit-dialog
:isVisible=
"editVisible"
:editForm=
"editForm"
:station=
"baseData.station"
@
closeDialog=
"handleEditClose"
@
confirmDialog=
"handleEditConfirm"
></edit-dialog>
...
...
@@ -104,6 +110,8 @@
<
script
>
import
EditDialog
from
'./editDialog'
import
{
BaseData
}
from
'@/common/constants'
// import { mapActions } from 'vuex'
import
{
getListApi
,
methods
,
editApi
,
removeApi
}
from
'@api/trafficManagement'
import
notice
from
'@/common/notice'
export
default
{
...
...
@@ -163,15 +171,24 @@ export default {
// 页码
currentPage
:
1
,
pageSize
:
10
,
total
:
30
total
:
30
,
baseData
:
{
station
:
[]
}
}
},
mounted
()
{
this
.
loadingGetList
()
this
.
loadBaseData
()
},
methods
:
{
async
loadBaseData
()
{
this
.
baseData
.
station
=
await
this
.
$store
.
dispatch
(
'd2admin/base/get'
,
BaseData
.
STATION
.
KEY
)
},
loadingGetList
()
{
this
.
tableLoading
=
true
this
.
getList
()
...
...
@@ -227,19 +244,8 @@ export default {
this
.
loadingGetList
()
},
resetForm
(
obj
)
{
for
(
var
item
in
obj
)
{
if
(
obj
[
item
]
instanceof
Array
)
{
obj
[
item
]
=
[]
}
else
{
obj
[
item
]
=
''
}
}
},
handleEditClose
()
{
this
.
editVisible
=
!
this
.
editVisible
this
.
resetForm
(
this
.
editForm
)
delete
this
.
editForm
.
id
},
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment