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