Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
曾琪
/
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 093c22f7
authored
Sep 09, 2019
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改
1 parent
472b21ca
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
235 additions
and
155 deletions
src/api/deviceManagement.js
src/api/subSysManagement.js
src/api/trafficManagement.js
src/main.js
src/router/routes.js
src/views/deviceManagement/editDialog.vue
src/views/deviceManagement/index.vue
src/views/maintainManagement/index.vue
src/views/materiaOrderManagement/detailDialog.vue
src/views/materiaOrderManagement/index.vue
src/views/materialList/index.vue
src/views/reportingLogs/index.vue
src/views/subSysManagement/editDialog.vue
src/views/subSysManagement/index.vue
src/views/systemMonitor/index.vue
src/views/trafficManagement/editDialog.vue
src/views/trafficManagement/index.vue
src/views/userManage/loginLogs/index.vue
src/views/userManage/role/index.vue
src/views/userManage/user/index.vue
src/api/deviceManagement.js
View file @
093c22f
...
...
@@ -27,10 +27,16 @@ function exportApi (data) {
return
request
(
data
)
}
function
isExistApi
(
data
)
{
data
.
method
=
`
${
path
}
detail`
return
request
(
data
)
}
export
{
getListApi
,
editApi
,
removeApi
,
// importApi,
exportApi
exportApi
,
isExistApi
}
src/api/subSysManagement.js
View file @
093c22f
...
...
@@ -20,9 +20,15 @@ function removeApi (data) {
return
request
(
data
)
}
function
isExistApi
(
data
)
{
data
.
method
=
`
${
path
}
detail`
return
request
(
data
)
}
export
{
getListApi
,
methods
,
editApi
,
removeApi
removeApi
,
isExistApi
}
src/api/trafficManagement.js
View file @
093c22f
...
...
@@ -11,11 +11,6 @@ function getListApi (data) {
return
request
(
data
)
}
// function addApi (data) {
// data.method = `${path}add`
// return request(data)
// }
function
editApi
(
data
)
{
// data.method = `${path}edit`
return
request
(
data
)
...
...
@@ -26,10 +21,15 @@ function removeApi (data) {
return
request
(
data
)
}
function
isExistApi
(
data
)
{
data
.
method
=
`
${
path
}
detail`
return
request
(
data
)
}
export
{
getListApi
,
methods
,
// addApi,
editApi
,
removeApi
removeApi
,
isExistApi
}
src/main.js
View file @
093c22f
...
...
@@ -39,7 +39,7 @@ new Vue({
// this.$store.commit('d2admin/search/init', menuHeader)
// },
mounted
()
{
Vue
.
config
.
devtools
=
true
//
Vue.config.devtools = true
// 展示系统信息
this
.
$store
.
commit
(
'd2admin/releases/versionShow'
)
// 用户登录后从数据库加载一系列的设置
...
...
src/router/routes.js
View file @
093c22f
...
...
@@ -362,15 +362,15 @@ export const resources = {
parentId
:
'0'
},
component
:
_import
(
'reportingLogs'
),
auth
:
[{
authId
:
'10801'
,
parentId
:
'108'
,
label
:
'导出'
,
category
:
'Button'
,
type
:
'button'
,
handle
:
'handleExport'
,
icon
:
'download'
}]
//
auth: [{
//
authId: '10801',
//
parentId: '108',
//
label: '导出',
//
category: 'Button',
//
type: 'button',
//
handle: 'handleExport',
//
icon: 'download'
//
}]
}
}
...
...
src/views/deviceManagement/editDialog.vue
View file @
093c22f
...
...
@@ -44,7 +44,7 @@
label=
"物料名称"
prop=
"deviceName"
>
<el-input
v-model=
"editForm.deviceName"
placeholder=
"请输入物料名称"
clearable
v-model=
"editForm.deviceName"
placeholder=
"请输入物料名称"
@
blur=
"validateCode"
clearable
></el-input>
</el-form-item>
<el-form-item
...
...
@@ -93,13 +93,17 @@
</
template
>
<
script
>
import
{
isExistApi
}
from
'@api/deviceManagement'
export
default
{
name
:
'EditDialog'
,
data
()
{
return
{
deviceNum
:
''
,
deviceCode
:
''
,
rules
:
{
deviceNum
:
[
{
required
:
true
,
message
:
'请输入物料代码'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入物料代码'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'物料代码已存在'
,
trigger
:
'blur'
,
validator
:
this
.
isCodeExist
}
],
deviceCode
:
[
{
required
:
true
,
message
:
'请输入物料编码'
,
trigger
:
'blur'
}
...
...
@@ -140,6 +144,8 @@ export default {
watch
:
{
isVisible
(
val
)
{
// this.disabled = this.editForm.trafficCode ? true : false
val
&&
(
this
.
deviceNum
=
this
.
editForm
.
deviceNum
)
val
&&
(
this
.
deviceName
=
this
.
editForm
.
deviceName
)
this
.
$refs
.
editRuleForm
&&
this
.
$refs
.
editRuleForm
.
resetFields
()
}
},
...
...
@@ -147,6 +153,17 @@ export default {
mounted
()
{},
methods
:
{
async
isCodeExist
(
rule
,
value
,
callback
)
{
if
(
this
.
deviceNum
===
value
&&
this
.
deviceName
===
this
.
editForm
.
deviceName
)
{
const
res
=
await
isExistApi
({
deviceNum
:
value
,
deviceName
:
this
.
editForm
.
deviceName
,
stationCode
:
this
.
editForm
.
stationCode
})
// console.log(res)
res
?
callback
(
new
Error
(
rule
.
message
))
:
callback
()
}
},
validateCode
(
value
)
{
this
.
$refs
.
editRuleForm
.
validateField
(
'deviceNum'
)
},
handleClose
()
{
this
.
$emit
(
'closeDialog'
)
...
...
src/views/deviceManagement/index.vue
View file @
093c22f
...
...
@@ -8,10 +8,10 @@
slot=
"header"
>
<el-form-item
label=
"物料"
>
<el-input
v-model=
"searchForm.keyWord"
placeholder=
"请输入物料代码/编码/名称"
clearable
></el-input>
<el-input
v-model=
"searchForm.keyWord"
placeholder=
"请输入物料代码/编码/名称"
@
clear=
"loadingGetList"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"所在地"
>
<el-select
v-model=
"searchForm.stationCode"
placeholder=
"请选择所在地"
clearable
filterable
>
<el-select
v-model=
"searchForm.stationCode"
placeholder=
"请选择所在地"
@
clear=
"loadingGetList"
clearable
filterable
>
<el-option
v-for=
"(item, index) in baseData.station"
:key=
"index"
...
...
@@ -113,6 +113,7 @@
</template>
<
script
>
import
axios
from
'axios'
import
EditDialog
from
'./editDialog'
import
{
BaseData
}
from
'@/common/constants'
import
{
getListApi
,
editApi
,
removeApi
,
exportApi
}
from
'@api/deviceManagement'
...
...
@@ -218,8 +219,8 @@ export default {
this
.
tableData
=
res
.
deviceList
this
.
total
=
res
.
pagination
.
totalCount
this
.
tableLoading
=
false
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
}).
catch
(
()
=>
{
notice
.
errorTips
()
this
.
tableLoading
=
false
})
},
...
...
@@ -243,7 +244,7 @@ export default {
this
.
handleEditClose
()
notice
.
okTips
()
this
.
loadingGetList
()
}).
catch
(
err
=>
{
}).
catch
(
()
=>
{
notice
.
errorTips
()
})
},
...
...
@@ -293,17 +294,18 @@ export default {
if
(
!
res
.
data
.
data
.
url
)
{
notice
.
okTips
()
}
else
{
window
.
location
.
href
=
res
.
data
.
data
.
url
// window.location.href = res.data.data.url
this
.
$open
(
res
.
data
.
data
.
url
)
notice
.
errorTips
()
}
document
.
getElementById
(
'fileUpload'
).
value
=
null
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
}).
catch
(
()
=>
{
notice
.
errorTips
()
document
.
getElementById
(
'fileUpload'
).
value
=
null
})
// importApi(params, noSignAttr).then(res => {
// notice.okTips()
// }).catch(
err
=> {
// }).catch(
()
=> {
// notice.errorTips()
// })
}
...
...
@@ -312,7 +314,8 @@ export default {
exportFile
()
{
const
params
=
this
.
getParams
()
exportApi
(
params
).
then
(
res
=>
{
window
.
location
.
href
=
res
.
url
// window.location.href = res.url
this
.
$open
(
res
.
url
)
notice
.
okTips
()
}).
catch
(()
=>
{
notice
.
errorTips
()
...
...
@@ -377,10 +380,10 @@ export default {
}).
then
(
res
=>
{
notice
.
okTips
()
this
.
loadingGetList
()
}).
catch
(
err
=>
{
}).
catch
(
()
=>
{
notice
.
errorTips
()
})
}).
catch
(
err
=>
{})
}).
catch
(
()
=>
{})
}
}
}
...
...
src/views/maintainManagement/index.vue
View file @
093c22f
...
...
@@ -16,12 +16,14 @@
v-if=
"item.type == 'input'"
v-model=
"searchForm[item.model]"
:placeholder=
"'请输入' + item.label"
@
clear=
"loadingGetList"
clearable
>
</el-input>
<el-select
v-else-if=
"item.type == 'select'"
v-model=
"searchForm[item.model]"
:placeholder=
"'请选择' + item.label"
@
clear=
"loadingGetList"
clearable
filterable
>
<el-option
...
...
@@ -298,6 +300,12 @@ export default {
}
},
watch
:
{
'searchForm.createTime'
(
value
)
{
!
value
&&
this
.
loadingGetList
()
}
},
mounted
()
{
this
.
loadingGetList
()
this
.
loadBaseData
()
...
...
@@ -311,7 +319,7 @@ export default {
const
data
=
await
this
.
load
()
if
(
data
)
{
for
(
var
item
in
modelToOptions
)
{
let
pos
=
this
.
searchFormArr
.
findIndex
(
arrItem
=>
arrItem
.
model
==
item
)
let
pos
=
this
.
searchFormArr
.
findIndex
(
arrItem
=>
arrItem
.
model
==
=
item
)
this
.
searchFormArr
[
pos
].
options
=
data
[
modelToOptions
[
item
]]
}
}
...
...
@@ -337,35 +345,34 @@ export default {
},
getList
()
{
const
params
=
this
.
getParams
()
params
.
s
electS
tartTime
=
params
.
createTime
?
params
.
createTime
[
0
]
+
' '
+
'00:00:00 '
:
''
params
.
selectE
ndTime
=
params
.
createTime
?
params
.
createTime
[
1
]
+
' '
+
'23:59:59'
:
''
params
.
startTime
=
params
.
createTime
?
params
.
createTime
[
0
]
+
' '
+
'00:00:00 '
:
''
params
.
e
ndTime
=
params
.
createTime
?
params
.
createTime
[
1
]
+
' '
+
'23:59:59'
:
''
delete
params
.
createTime
// console.log(params)
getListApi
(
params
).
then
(
res
=>
{
this
.
tableData
=
res
.
maintainList
this
.
total
=
res
.
pagination
.
totalCount
this
.
tableLoading
=
false
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
}).
catch
(
()
=>
{
notice
.
errorTips
()
this
.
tableLoading
=
false
})
},
exportOrder
()
{
const
params
=
this
.
getParams
()
params
.
s
electS
tartTime
=
params
.
createTime
[
0
]
?
params
.
createTime
[
0
]
+
' '
+
'00:00:00 '
:
''
params
.
selectE
ndTime
=
params
.
createTime
[
1
]
?
params
.
createTime
[
1
]
+
' '
+
'23:59:59'
:
''
params
.
startTime
=
params
.
createTime
[
0
]
?
params
.
createTime
[
0
]
+
' '
+
'00:00:00 '
:
''
params
.
e
ndTime
=
params
.
createTime
[
1
]
?
params
.
createTime
[
1
]
+
' '
+
'23:59:59'
:
''
delete
params
.
createTime
exportApi
(
params
).
then
(
res
=>
{
this
.
$open
(
res
.
url
)
notice
.
okTips
()
}).
catch
(
err
=>
{
}).
catch
(
()
=>
{
notice
.
errorTips
()
})
},
/* 接口请求-end */
// 搜索
handleSearch
()
{
// console.log(this.searchForm)
this
.
loadingGetList
()
},
...
...
@@ -399,10 +406,10 @@ export default {
}).
then
(
res
=>
{
notice
.
okTips
()
this
.
loadingGetList
()
}).
catch
(
err
=>
{
}).
catch
(
()
=>
{
notice
.
errorTips
()
})
}).
catch
(
err
=>
{})
}).
catch
(
()
=>
{})
}
}
}
...
...
src/views/materiaOrderManagement/detailDialog.vue
View file @
093c22f
...
...
@@ -28,6 +28,7 @@ export default {
type
:
Boolean
,
default
:
false
},
title
:
String
,
pdfUrl
:
String
},
...
...
@@ -42,12 +43,12 @@ export default {
</
script
>
<
style
lang=
"scss"
>
.detailDialog
{
.el-dialog__header,
.el-dialog__body
{
padding
:
0
;
padding
:
0
;
background-color
:
#202223
}
}
//
.detailDialog
{
//
.el-dialog__header,
//
.el-dialog__body
{
//
padding
:
0
;
//
padding
:
0
;
//
background-color
:
#202223
//
}
//
}
</
style
>
src/views/materiaOrderManagement/index.vue
View file @
093c22f
...
...
@@ -8,19 +8,19 @@
slot=
"header"
>
<el-form-item
label=
"订单编号"
>
<el-input
v-model=
"searchForm.orderCode"
placeholder=
"请输入订单编号"
clearable
></el-input>
<el-input
v-model=
"searchForm.orderCode"
placeholder=
"请输入订单编号"
@
clear=
"loadingGetList"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"订单类型"
>
<el-select
v-model=
"searchForm.orderType"
placeholder=
"请选择订单类型"
clearable
filterable
>
<el-select
v-model=
"searchForm.orderType"
placeholder=
"请选择订单类型"
@
clear=
"loadingGetList"
clearable
filterable
>
<el-option
label=
"物料申请"
value=
"1"
></el-option>
<el-option
label=
"物料报废"
value=
"2"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"申请人"
>
<el-input
v-model=
"searchForm.userName"
placeholder=
"请输入申请人"
clearable
></el-input>
<el-input
v-model=
"searchForm.userName"
placeholder=
"请输入申请人"
@
clear=
"loadingGetList"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"订单状态"
>
<el-select
v-model=
"searchForm.status"
placeholder=
"请选择订单状态"
clearable
filterable
>
<el-select
v-model=
"searchForm.status"
placeholder=
"请选择订单状态"
@
clear=
"loadingGetList"
clearable
filterable
>
<el-option
v-for=
"(item, index) in statusArr"
:key=
"index"
...
...
@@ -167,7 +167,15 @@ export default {
prop
:
'createTime'
},
{
label
:
'类型'
,
prop
:
'orderType'
prop
:
'orderType'
,
formatter
:
(
cellValue
)
=>
{
if
(
cellValue
.
orderType
)
{
return
{
1
:
'物料申请'
,
2
:
'物料报废'
}[
cellValue
.
orderType
]
}
}
},
{
label
:
'申请人'
,
prop
:
'userName'
...
...
@@ -193,6 +201,12 @@ export default {
}
},
watch
:
{
'searchForm.createTime'
(
value
)
{
!
value
&&
this
.
loadingGetList
()
}
},
mounted
()
{
this
.
loadingGetList
()
},
...
...
@@ -214,27 +228,27 @@ export default {
const
params
=
this
.
getParams
()
// console.log(params)
!
params
.
orderCode
&&
delete
params
.
orderCode
params
.
startTime
=
params
.
createTime
[
0
]
?
params
.
createTime
[
0
]
+
' '
+
'00:00:00 '
:
''
params
.
endTime
=
params
.
createTime
[
1
]
?
params
.
createTime
[
1
]
+
' '
+
'23:59:59'
:
''
params
.
startTime
=
params
.
createTime
?
params
.
createTime
[
0
]
+
' '
+
'00:00:00 '
:
''
params
.
endTime
=
params
.
createTime
?
params
.
createTime
[
1
]
+
' '
+
'23:59:59'
:
''
delete
params
.
createTime
console
.
log
(
params
)
//
console.log(params)
getListApi
(
params
).
then
(
res
=>
{
this
.
tableData
=
res
.
orderList
this
.
total
=
res
.
pagination
.
totalCount
this
.
tableLoading
=
false
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
}).
catch
(
()
=>
{
notice
.
errorTips
()
this
.
tableLoading
=
false
})
},
editSubSystem
(
value
)
{
const
params
=
value
params
.
method
=
value
.
id
?
methods
.
Edit
:
methods
.
Add
edit
Api
(
params
).
then
(
res
=>
{
//
params.method = value.id ? methods.Edit : methods.Add
detail
Api
(
params
).
then
(
res
=>
{
this
.
handleEditClose
()
notice
.
okTips
()
this
.
loadingGetList
()
}).
catch
(
err
=>
{
}).
catch
(
()
=>
{
notice
.
errorTips
()
})
},
...
...
@@ -247,28 +261,24 @@ export default {
exportApi
(
params
).
then
(
res
=>
{
this
.
$open
(
res
.
url
)
// notice.okTips()
}).
catch
(
err
=>
{
console
.
log
(
err
)
}).
catch
(()
=>
{
notice
.
errorTips
()
})
},
/* 接口请求-end */
// 搜索
handleSearch
()
{
console
.
log
(
this
.
searchForm
)
this
.
loadingGetList
()
},
// 页码
handleSizeChange
(
value
)
{
console
.
log
(
value
)
this
.
pageSize
=
value
// 调接口
this
.
loadingGetList
()
},
handleCurrentChange
(
value
)
{
console
.
log
(
value
)
this
.
currentPage
=
value
// 调接口
this
.
loadingGetList
()
...
...
@@ -280,16 +290,15 @@ export default {
// 表格-查看详情
handleDetail
(
row
)
{
console
.
log
(
row
)
//
console.log(row)
downloadApi
({
orderCode
:
row
.
orderCode
}).
then
(
res
=>
{
console
.
log
(
res
)
this
.
dialogTitle
=
row
.
orderType
//
console.log(res)
this
.
dialogTitle
=
row
.
orderType
==
1
?
'物料申请'
:
'物料报废'
this
.
pdfUrl
=
res
.
url
this
.
detailVisible
=
!
this
.
detailVisible
}).
catch
(
err
=>
{
console
.
log
(
err
)
}).
catch
(()
=>
{
notice
.
errorTips
()
})
},
...
...
@@ -306,7 +315,7 @@ export default {
}).
then
(()
=>
{
notice
.
okTips
()
this
.
loadingGetList
()
}).
catch
(
err
=>
{
}).
catch
(
()
=>
{
notice
.
errorTips
()
})
}).
catch
(()
=>
{})
...
...
src/views/materialList/index.vue
View file @
093c22f
...
...
@@ -8,7 +8,7 @@
slot=
"header"
>
<el-form-item
label=
"物料"
>
<el-input
v-model=
"searchForm.keyWord"
placeholder=
"请输入物料代码/编码/名称"
clearable
></el-input>
<el-input
v-model=
"searchForm.keyWord"
placeholder=
"请输入物料代码/编码/名称"
@
clear=
"loadingGetList"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleSearch"
>
查询
</el-button>
...
...
@@ -127,28 +127,25 @@ export default {
this
.
tableData
=
res
.
deviceList
this
.
total
=
res
.
pagination
.
totalCount
this
.
tableLoading
=
false
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
}).
catch
(
()
=>
{
notice
.
errorTips
()
this
.
tableLoading
=
false
})
},
/* 接口请求-end */
// 搜索
handleSearch
()
{
console
.
log
(
this
.
searchForm
)
this
.
loadingGetList
()
},
// 页码
handleSizeChange
(
value
)
{
console
.
log
(
value
)
this
.
pageSize
=
value
// 调接口
this
.
loadingGetList
()
},
handleCurrentChange
(
value
)
{
console
.
log
(
value
)
this
.
currentPage
=
value
// 调接口
this
.
loadingGetList
()
...
...
src/views/reportingLogs/index.vue
View file @
093c22f
...
...
@@ -18,10 +18,10 @@
</el-date-picker>
</el-form-item>
<el-form-item
label=
"车辆编号"
>
<el-input
v-model=
"searchForm.trafficCode"
placeholder=
"请输入车辆编号"
clearable
></el-input>
<el-input
v-model=
"searchForm.trafficCode"
placeholder=
"请输入车辆编号"
clearable
@
clear=
"loadingGetList"
></el-input>
</el-form-item>
<el-form-item
label=
"归属车辆段"
>
<el-select
v-model=
"searchForm.station
Id"
placeholder=
"请选择"
clearable
filterable
>
<el-select
v-model=
"searchForm.station
Code"
placeholder=
"请选择"
clearable
filterable
@
clear=
"loadingGetList"
>
<el-option
v-for=
"(item, index) in baseData.station"
:key=
"index"
:value=
"item.confCode"
...
...
@@ -30,7 +30,7 @@
</el-select>
</el-form-item>
<el-form-item
label=
"子系统编号"
>
<el-input
v-model=
"searchForm.subSystemCode"
placeholder=
"请输入子系统编号"
clearable
></el-input>
<el-input
v-model=
"searchForm.subSystemCode"
placeholder=
"请输入子系统编号"
clearable
@
clear=
"loadingGetList"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleSearch"
>
查询
</el-button>
...
...
@@ -38,9 +38,9 @@
</el-form>
<el-row
style=
"height: 40px; line-height: 40px"
>
<el-col
:span=
"12"
>
上报日志列表
</el-col>
<el-col
:span=
"12"
style=
"text-align: right"
>
<
!--
<
el-col
:span=
"12"
style=
"text-align: right"
>
<auth-button
category=
"Button"
></auth-button>
</el-col>
</el-col>
-->
</el-row>
<el-table
:data=
"tableData"
...
...
@@ -92,7 +92,7 @@ export default {
// endTime: '',
reportTime
:
''
,
trafficCode
:
''
,
station
Id
:
''
,
station
Code
:
''
,
subSystemCode
:
''
},
tableData
:
[],
...
...
@@ -128,6 +128,12 @@ export default {
}
},
watch
:
{
'searchForm.reportTime'
(
value
)
{
!
value
&&
this
.
loadingGetList
()
}
},
mounted
()
{
this
.
loadingGetList
()
this
.
loadBaseData
()
...
...
@@ -163,9 +169,9 @@ export default {
this
.
total
=
res
.
pagination
.
totalCount
this
.
tableLoading
=
false
})
.
catch
(
err
=>
{
.
catch
(
()
=>
{
this
.
tableLoading
=
false
console
.
log
(
err
)
notice
.
errorTips
(
)
})
},
...
...
@@ -175,8 +181,9 @@ export default {
params
.
endTime
=
params
.
reportTime
?
params
.
reportTime
[
1
]
+
' '
+
'23:59:59'
:
''
delete
params
.
reportTime
exportApi
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
window
.
location
.
href
=
res
.
url
// console.log(res)
// window.location.href = res.url
this
.
$open
(
res
.
url
)
notice
.
okTips
()
}).
catch
(()
=>
{
notice
.
errorTips
()
...
...
@@ -185,20 +192,17 @@ export default {
// 搜索
handleSearch
()
{
console
.
log
(
this
.
searchForm
)
this
.
loadingGetList
()
},
// 页码
handleSizeChange
(
value
)
{
console
.
log
(
value
)
this
.
pageSize
=
value
// 调接口
this
.
loadingGetList
()
},
handleCurrentChange
(
value
)
{
console
.
log
(
value
)
this
.
currentPage
=
value
// 调接口
this
.
loadingGetList
()
...
...
src/views/subSysManagement/editDialog.vue
View file @
093c22f
...
...
@@ -29,6 +29,7 @@ import { constants } from 'fs';
:disabled=
"disabled"
v-model=
"editForm.trafficCode"
placeholder=
"请输入车辆编号"
@
change=
"validateCode"
></el-input>
</el-form-item>
<el-form-item
label=
"类型"
prop=
"subsystemTypeCode"
>
...
...
@@ -70,6 +71,7 @@ import { constants } from 'fs';
</
template
>
<
script
>
import
{
isExistApi
}
from
'@api/subSysManagement'
export
default
{
name
:
'EditDialog'
,
data
()
{
...
...
@@ -77,7 +79,8 @@ export default {
disabled
:
false
,
rules
:
{
subsystemCode
:
[
{
required
:
true
,
message
:
'请输入子系统编号'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入子系统编号'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'子系统编号已存在'
,
trigger
:
'blur'
,
validator
:
this
.
isCodeExist
}
],
trafficCode
:
[
{
required
:
true
,
message
:
'请输入车辆编号'
,
trigger
:
'blur'
}
...
...
@@ -120,6 +123,17 @@ export default {
},
methods
:
{
async
isCodeExist
(
rule
,
value
,
callback
)
{
if
(
this
.
editForm
.
trafficCode
)
{
const
res
=
await
isExistApi
({
subsystemCode
:
value
,
trafficCode
:
this
.
editForm
.
trafficCode
})
res
?
callback
(
new
Error
(
rule
.
message
))
:
callback
()
}
},
validateCode
(
value
)
{
this
.
$refs
.
editRuleForm
.
validateField
(
'subsystemCode'
)
},
handleClose
()
{
this
.
$emit
(
'closeDialog'
)
},
...
...
src/views/subSysManagement/index.vue
View file @
093c22f
...
...
@@ -8,10 +8,10 @@
slot=
"header"
>
<el-form-item
label=
"子系统编号"
>
<el-input
v-model=
"searchForm.subsystemCode"
placeholder=
"请输入子系统编号"
clearable
></el-input>
<el-input
v-model=
"searchForm.subsystemCode"
placeholder=
"请输入子系统编号"
@
clear=
"loadingGetList"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"类型"
>
<el-select
v-model=
"searchForm.subsystemTypeCode"
placeholder=
"请选择类型"
clearable
filterable
>
<el-select
v-model=
"searchForm.subsystemTypeCode"
placeholder=
"请选择类型"
@
clear=
"loadingGetList"
clearable
filterable
>
<el-option
v-for=
"(item, index) in baseData.subsys"
:key=
"index"
:value=
"item.confCode"
...
...
@@ -20,10 +20,10 @@
</el-select>
</el-form-item>
<el-form-item
label=
"车辆编号"
>
<el-input
v-model=
"searchForm.trafficCode"
placeholder=
"请输入车辆编号"
clearable
></el-input>
<el-input
v-model=
"searchForm.trafficCode"
placeholder=
"请输入车辆编号"
@
clear=
"loadingGetList"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"生产厂家"
>
<el-input
v-model=
"searchForm.merchantName"
placeholder=
"请输入生产厂家"
clearable
></el-input>
<el-input
v-model=
"searchForm.merchantName"
placeholder=
"请输入生产厂家"
@
clear=
"loadingGetList"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleSearch"
>
查询
</el-button>
...
...
@@ -216,8 +216,8 @@ export default {
this
.
tableData
=
res
.
subsystemList
this
.
total
=
res
.
pagination
.
totalCount
this
.
tableLoading
=
false
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
}).
catch
(
()
=>
{
notice
.
errorTips
()
this
.
tableLoading
=
false
})
},
...
...
src/views/systemMonitor/index.vue
View file @
093c22f
...
...
@@ -27,10 +27,10 @@
label-width=
"100px"
>
<el-form-item
label=
"车辆编号"
>
<el-input
v-model=
"searchForm.trafficCode"
placeholder=
"请输入车辆编号"
clearable
></el-input>
<el-input
v-model=
"searchForm.trafficCode"
placeholder=
"请输入车辆编号"
@
clear=
"loadingGetList"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"归属车辆段"
>
<el-select
v-model=
"searchForm.stationCode"
placeholder=
"请选择归属车辆段"
filterable
clearable
>
<el-select
v-model=
"searchForm.stationCode"
placeholder=
"请选择归属车辆段"
@
clear=
"loadingGetList"
filterable
clearable
>
<!--
<el-option
v-for=
"(item,index) in stationCodeArr"
:key=
"index"
...
...
@@ -45,16 +45,16 @@
</el-select>
</el-form-item>
<el-form-item
label=
"车辆状态"
>
<el-select
v-model=
"searchForm.openType"
placeholder=
"请选择车辆状态"
filterable
clearable
>
<el-select
v-model=
"searchForm.openType"
placeholder=
"请选择车辆状态"
@
clear=
"loadingGetList"
filterable
clearable
>
<el-option
value=
"1"
label=
"是"
></el-option>
<el-option
value=
"2"
label=
"否"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"子系统编号"
>
<el-input
v-model=
"searchForm.subsystemCode"
placeholder=
"请输入子系统编号"
clearable
></el-input>
<el-input
v-model=
"searchForm.subsystemCode"
placeholder=
"请输入子系统编号"
@
clear=
"loadingGetList"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"子系统状态"
>
<el-select
v-model=
"searchForm.onlineStatus"
placeholder=
"请选择子系统状态"
filterable
clearable
>
<el-select
v-model=
"searchForm.onlineStatus"
placeholder=
"请选择子系统状态"
@
clear=
"loadingGetList"
filterable
clearable
>
<el-option
value=
"1"
label=
"在网"
></el-option>
<el-option
value=
"2"
label=
"离网"
></el-option>
</el-select>
...
...
@@ -155,7 +155,7 @@ export default {
series
:
[{
name
:
'在网情况'
,
type
:
'pie'
,
radius
:
'55%'
,
radius
:
[
'35%'
,
'55%'
]
,
center
:
[
'25%'
,
'50%'
],
label
:
{
normal
:
{
...
...
@@ -167,7 +167,7 @@ export default {
name
:
'在网'
,
value
:
0
,
itemStyle
:
{
color
:
'#
18a68
9'
color
:
'#
00b63
9'
}
},
{
name
:
'离网'
,
...
...
@@ -175,12 +175,12 @@ export default {
itemStyle
:
{
color
:
'#999999'
},
selected
:
true
//
selected: true
}]
},
{
name
:
'故障情况'
,
type
:
'pie'
,
radius
:
[
'
20
%'
,
'55%'
],
radius
:
[
'
35
%'
,
'55%'
],
center
:
[
'75%'
,
'50%'
],
label
:
{
normal
:
{
...
...
@@ -192,15 +192,15 @@ export default {
name
:
'正常'
,
value
:
0
,
itemStyle
:
{
color
:
'#
99cc66
'
color
:
'#
479ae8
'
}
},
{
name
:
'故障'
,
value
:
0
,
itemStyle
:
{
color
:
'#
ff0000
'
color
:
'#
e45b4e
'
},
selected
:
true
//
selected: true
}]
}]
},
...
...
@@ -291,8 +291,8 @@ export default {
this
.
tableData
=
res
.
subsystemList
this
.
total
=
res
.
pagination
.
totalCount
this
.
tableLoading
=
false
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
}).
catch
(
()
=>
{
notice
.
errorTips
()
this
.
tableLoading
=
false
})
},
...
...
@@ -303,16 +303,17 @@ export default {
// console.log(params)
reportApi
(
params
).
then
(
res
=>
{
this
.
drawPie
(
res
)
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
}).
catch
(
()
=>
{
notice
.
errorTips
()
})
},
exportFile
()
{
const
params
=
this
.
getParams
()
exportApi
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
//
console.log(res)
// this.href = 'https://web.stanford.edu/~xgzhou/zhou_book2017.pdf'
window
.
location
.
href
=
res
.
url
// window.location.href = res.url
this
.
$open
(
res
.
url
)
notice
.
okTips
()
// window.open(res.url, '_black')
// window.location.href = 'https://web.stanford.edu/~xgzhou/zhou_book2017.pdf'
...
...
@@ -324,16 +325,15 @@ export default {
// document.body.appendChild(link)
// link.click()
}).
catch
(
err
=>
{
console
.
log
(
err
)
}).
catch
(()
=>
{
notice
.
errorTips
()
})
},
/* 接口请求-end */
//
/* onlineNum Int
在网数量
//
offlineNum int
离网数量
//
normalNum Int
正常数量
//
breakdownNum Int 故障数量 */
//
onlineNum
在网数量
//
offlineNum
离网数量
//
normalNum
正常数量
//
breakdownNum 故障数量
drawPie
(
params
)
{
this
.
totalOptions
.
series
[
0
].
data
[
0
].
value
=
params
.
onlineNum
this
.
totalOptions
.
series
[
0
].
data
[
1
].
value
=
params
.
offlineNum
...
...
@@ -360,7 +360,6 @@ export default {
// 搜索
handleSearch
()
{
console
.
log
(
this
.
searchForm
)
// 调接口
this
.
loadingGetList
()
},
...
...
src/views/trafficManagement/editDialog.vue
View file @
093c22f
...
...
@@ -52,6 +52,7 @@
</
template
>
<
script
>
import
{
isExistApi
}
from
'@api/trafficManagement'
export
default
{
name
:
'EditDialog'
,
data
()
{
...
...
@@ -60,7 +61,8 @@ export default {
title
:
'添加车辆'
,
rules
:
{
trafficCode
:
[
{
required
:
true
,
message
:
'请输入车辆编号'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入车辆编号'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'车辆编号已存在'
,
trigger
:
'blur'
,
validator
:
this
.
isCodeExist
}
],
stationCode
:
[
{
required
:
true
,
message
:
'请选择归属车辆段'
,
trigger
:
'change'
}
...
...
@@ -95,10 +97,15 @@ export default {
mounted
()
{},
methods
:
{
async
isCodeExist
(
rule
,
value
,
callback
)
{
const
res
=
await
isExistApi
({
trafficCode
:
value
})
res
?
callback
(
new
Error
(
rule
.
message
))
:
callback
()
},
handleClose
()
{
this
.
$emit
(
'closeDialog'
)
},
handleConfirm
()
{
this
.
$refs
.
editRuleForm
.
validate
((
vaild
)
=>
{
if
(
vaild
)
{
...
...
src/views/trafficManagement/index.vue
View file @
093c22f
...
...
@@ -8,10 +8,10 @@
slot=
"header"
>
<el-form-item
label=
"车辆编号"
>
<el-input
v-model=
"searchForm.trafficCode"
placeholder=
"请输入车辆编号"
clearable
></el-input>
<el-input
v-model=
"searchForm.trafficCode"
placeholder=
"请输入车辆编号"
@
clear=
"loadingGetList"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"归属车辆段"
>
<el-select
v-model=
"searchForm.stationCode"
placeholder=
"请选择归属车辆段"
clearable
filterable
>
<el-select
v-model=
"searchForm.stationCode"
placeholder=
"请选择归属车辆段"
@
clear=
"loadingGetList"
clearable
filterable
>
<el-option
v-for=
"(item, index) in baseData.station"
:key=
"index"
:value=
"item.confCode"
...
...
@@ -22,10 +22,10 @@
</el-select>
</el-form-item>
<el-form-item
label=
"维修承包商"
>
<el-input
v-model=
"searchForm.merchantName"
placeholder=
"请输入维修承包商"
clearable
></el-input>
<el-input
v-model=
"searchForm.merchantName"
placeholder=
"请输入维修承包商"
@
clear=
"loadingGetList"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-select
v-model=
"searchForm.openType"
placeholder=
"请选择状态"
clearable
filterable
>
<el-select
v-model=
"searchForm.openType"
placeholder=
"请选择状态"
@
clear=
"loadingGetList"
clearable
filterable
>
<el-option
label=
"是"
value=
"1"
></el-option>
<el-option
label=
"否"
value=
"2"
></el-option>
</el-select>
...
...
@@ -208,8 +208,8 @@ export default {
this
.
tableData
=
res
.
trafficList
this
.
total
=
res
.
pagination
.
totalCount
this
.
tableLoading
=
false
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
}).
catch
(
()
=>
{
notice
.
errorTips
()
this
.
tableLoading
=
false
})
},
...
...
@@ -238,7 +238,7 @@ export default {
this
.
handleEditClose
()
notice
.
okTips
()
this
.
loadingGetList
()
}).
catch
(
err
=>
{
}).
catch
(
()
=>
{
notice
.
errorTips
()
})
},
...
...
@@ -300,11 +300,10 @@ export default {
}).
then
(
res
=>
{
notice
.
okTips
()
this
.
loadingGetList
()
}).
catch
(
err
=>
{
console
.
log
(
err
)
}).
catch
(()
=>
{
notice
.
errorTips
()
})
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
}).
catch
(
()
=>
{
})
}
}
}
...
...
src/views/userManage/loginLogs/index.vue
View file @
093c22f
<!--
车辆管理
-->
<!--
登陆日志
-->
<
template
>
<d2-container
class=
"loginLogs"
>
<el-form
...
...
@@ -8,10 +8,10 @@
slot=
"header"
>
<el-form-item
label=
"用户"
>
<el-input
v-model=
"searchForm.userName"
placeholder=
"请输入用户名/姓名/联系电话"
clearable
></el-input>
<el-input
v-model=
"searchForm.userName"
placeholder=
"请输入用户名/姓名/联系电话"
@
clear=
"loadingGetList"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"登录方式"
>
<el-select
v-model=
"searchForm.loginType"
placeholder=
"请选择"
clearable
filterable
>
<el-select
v-model=
"searchForm.loginType"
placeholder=
"请选择"
@
clear=
"loadingGetList"
clearable
filterable
>
<el-option
label=
"PC"
value=
"1"
></el-option>
<el-option
label=
"小程序"
value=
"2"
></el-option>
</el-select>
...
...
@@ -113,6 +113,12 @@ export default {
}
},
watch
:
{
'searchForm.loginTime'
(
value
)
{
!
value
&&
this
.
loadingGetList
()
}
},
mounted
()
{
this
.
loadingGetList
()
},
...
...
@@ -132,8 +138,8 @@ export default {
},
getList
()
{
const
params
=
this
.
getParams
()
params
.
startTime
=
params
.
loginTime
[
0
]
?
params
.
loginTime
[
0
]
+
' '
+
'00:00:00 '
:
''
params
.
endTime
=
params
.
loginTime
[
1
]
?
params
.
loginTime
[
1
]
+
' '
+
'23:59:59'
:
''
params
.
startTime
=
params
.
loginTime
?
params
.
loginTime
[
0
]
+
' '
+
'00:00:00 '
:
''
params
.
endTime
=
params
.
loginTime
?
params
.
loginTime
[
1
]
+
' '
+
'23:59:59'
:
''
delete
params
.
loginTime
getLoginlogs
(
params
).
then
(
res
=>
{
// res.pagination && (this.total = res.pagination.totalCount)
...
...
@@ -141,9 +147,8 @@ export default {
this
.
total
=
res
.
pagination
.
totalCount
this
.
tableLoading
=
false
})
.
catch
(
err
=>
{
.
catch
(
()
=>
{
this
.
tableLoading
=
false
console
.
log
(
err
)
})
},
// 搜索
...
...
src/views/userManage/role/index.vue
View file @
093c22f
...
...
@@ -99,8 +99,8 @@ export default {
// this.page = pagination
this
.
tableLoading
=
false
})
.
catch
(
err
=>
{
notice
.
errorTips
(
err
)
.
catch
(
()
=>
{
notice
.
errorTips
()
this
.
tableLoading
=
false
})
},
...
...
src/views/userManage/user/index.vue
View file @
093c22f
...
...
@@ -3,13 +3,13 @@
<d2-container
class=
"user"
>
<el-form
:inline=
"true"
:model=
"searchForm"
label-width=
"85px"
slot=
"header"
>
<el-form-item
label=
"用户:"
>
<el-input
v-model=
"searchForm.userName"
placeholder=
"请输入用户名/姓名/联系电话"
clearable
></el-input>
<el-input
v-model=
"searchForm.userName"
placeholder=
"请输入用户名/姓名/联系电话"
@
clear=
"loadUserList"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"所属公司:"
>
<el-input
v-model=
"searchForm.companyName"
placeholder=
"请输入公司名"
clearable
></el-input>
<el-input
v-model=
"searchForm.companyName"
placeholder=
"请输入公司名"
@
clear=
"loadUserList"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"角色:"
>
<el-select
v-model=
"searchForm.roleId"
clearable
placeholder=
"请选择"
>
<el-select
v-model=
"searchForm.roleId"
clearable
placeholder=
"请选择"
@
clear=
"loadUserList"
>
<el-option
:label=
"role.roleName"
:value=
"role.roleId"
...
...
@@ -19,13 +19,13 @@
</el-select>
</el-form-item>
<el-form-item
label=
"状态:"
>
<el-select
v-model=
"searchForm.usedStatus"
clearable
placeholder=
"请选择状态"
>
<el-select
v-model=
"searchForm.usedStatus"
clearable
placeholder=
"请选择状态"
@
clear=
"loadUserList"
>
<el-option
label=
"可用"
value=
"1"
></el-option>
<el-option
label=
"不可用/删除"
value=
"2"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"所属站点:"
>
<el-select
v-model=
"searchForm.stationCode"
clearable
placeholder=
"请选择"
>
<el-select
v-model=
"searchForm.stationCode"
clearable
placeholder=
"请选择"
@
clear=
"loadUserList"
>
<el-option
:label=
"station.confValue"
:value=
"station.confCode"
...
...
@@ -35,7 +35,7 @@
</el-select>
</el-form-item>
<el-form-item
label=
"职务:"
>
<el-select
v-model=
"searchForm.postCode"
clearable
placeholder=
"请选择"
>
<el-select
v-model=
"searchForm.postCode"
clearable
placeholder=
"请选择"
@
clear=
"loadUserList"
>
<el-option
:label=
"post.confValue"
:value=
"post.confCode"
...
...
@@ -174,6 +174,12 @@ export default {
}
},
watch
:
{
'searchTimes'
(
value
)
{
!
value
&&
this
.
loadUserList
()
}
},
mounted
()
{
this
.
fetchData
()
this
.
$event
.
$on
(
'e-reg-dialog'
,
res
=>
(
this
.
registerDialogVisible
=
res
))
...
...
@@ -220,8 +226,8 @@ export default {
this
.
page
=
pagination
this
.
tableLoading
=
false
})
.
catch
(
err
=>
{
notice
.
errorTips
(
err
)
.
catch
(
()
=>
{
notice
.
errorTips
()
this
.
tableLoading
=
false
})
},
...
...
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