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 9b0b9c13
authored
Sep 23, 2019
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
表格
1 parent
5b0e7f0e
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
469 additions
and
941 deletions
src/components/d2-table/index.vue
src/components/index.js
src/libs/util.js
src/router/routes.js
src/views/deviceManagement/index.vue
src/views/maintainManagement/index.vue
src/views/materiaOrderManagement/index.vue
src/views/materialList/index.vue
src/views/reportingLogs/index.vue
src/views/subSysManagement/index.vue
src/views/systemMonitor/index.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/components/d2-table/index.vue
0 → 100644
View file @
9b0b9c1
<!-- 表格+分页 -->
<
template
>
<div>
<el-table
:data=
"tableData"
v-loading=
"$store.state.d2admin.loading.value"
border
:highlight-current-row=
"true"
:stripe=
"true"
>
<el-table-column
align=
"center"
width=
"60px"
label=
"序号"
type=
'index'
:index=
"index=>index+(currentPage - 1) * pageSize + 1"
></el-table-column>
<el-table-column
v-for=
"(item, index) in tableColumns"
:key=
"index"
:label=
"item.label"
:prop=
"item.prop"
:width=
"item.width"
:min-width=
"item.minWidth"
:align=
"item.align||'center'"
>
<template
slot-scope=
"scope"
>
<template
v-if=
"item.tagLabel"
>
<el-tag
:type=
"tag.type[scope.row[item.prop]]"
>
{{
tag
.
label
[
scope
.
row
[
item
.
prop
]]
}}
</el-tag>
</
template
>
<
template
v-else-if=
"item.formatter"
>
{{
item
.
formatter
(
scope
.
row
)
}}
</
template
>
<
template
v-else
>
{{
tableData
[
scope
.
$index
][
item
.
prop
]
}}
</
template
>
</template>
</el-table-column>
<el-table-column
v-if=
"tableOption"
label=
"操作"
:align=
"tableOption.align||'center'"
:width=
"tableOption.width||'200'"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<auth-button
v-if=
"!mapping"
:data=
"scope.row"
></auth-button>
<auth-button
v-else
:mapping=
"mapping"
:data=
"scope.row"
></auth-button>
</
template
>
</el-table-column>
</el-table>
<el-pagination
v-if=
"pagination"
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[10,20,30,40]"
:page-size=
"pageSize"
:total=
"total"
layout=
"sizes,total,->,prev,pager,next,jumper"
>
</el-pagination>
</div>
</template>
<
script
>
import
notice
from
'@/common/notice'
export
default
{
name
:
'd2-table'
,
data
()
{
return
{
searchParams
:
{},
tableData
:
[],
// 页码
currentPage
:
1
,
pageSize
:
10
,
total
:
10
}
},
props
:
{
tag
:
{
type
:
Array
,
default
:
()
=>
[]
},
mapping
:
{
type
:
Array
,
default
:
null
},
tableColumns
:
{
type
:
Array
,
default
:
()
=>
[]
},
tableOption
:
{
type
:
Object
,
default
:
null
},
pagination
:
{
type
:
Boolean
,
default
:
true
}
},
mounted
()
{
this
.
$emit
(
'handlePage'
)
},
methods
:
{
/**
* @param params Object 搜索参数
* @param listName String 后端返回列表参数名
* @param getListApi function 获取列表接口
*/
getList
(
params
,
listName
,
getListApi
)
{
this
.
searchParams
=
params
params
=
{
pageCount
:
this
.
pageSize
,
pageSize
:
this
.
currentPage
,
...
params
}
// console.log(params)
getListApi
(
params
).
then
(
res
=>
{
this
.
tableData
=
res
[
listName
]
res
.
pagination
&&
(
this
.
total
=
res
.
pagination
.
totalCount
)
}).
catch
(()
=>
{
notice
.
errorTips
()
})
},
// 页码
handleSizeChange
(
value
)
{
this
.
pageSize
=
value
this
.
$emit
(
'handlePage'
)
},
handleCurrentChange
(
value
)
{
this
.
currentPage
=
value
this
.
$emit
(
'handlePage'
)
},
handleEdit
(
row
)
{
this
.
$emit
(
'handleEdit'
,
row
)
},
handleDetail
(
row
)
{
this
.
$emit
(
'handleDetail'
,
row
)
},
handleDelete
(
row
)
{
this
.
$emit
(
'handleDelete'
,
row
)
},
handleVerify
(
row
)
{
this
.
$emit
(
'handleVerify'
,
row
)
},
handleOperation
(
row
,
e
)
{
this
.
$emit
(
'handleOperation'
,
{
row
,
e
})
}
}
}
</
script
>
<
style
>
</
style
>
src/components/index.js
View file @
9b0b9c1
...
@@ -9,4 +9,5 @@ Vue.component('d2-icon', () => import('./d2-icon'))
...
@@ -9,4 +9,5 @@ Vue.component('d2-icon', () => import('./d2-icon'))
Vue
.
component
(
'd2-el-icon'
,
()
=>
import
(
'./d2-el-icon'
))
Vue
.
component
(
'd2-el-icon'
,
()
=>
import
(
'./d2-el-icon'
))
Vue
.
component
(
'd2-icon-svg'
,
()
=>
import
(
'./d2-icon-svg/index.vue'
))
Vue
.
component
(
'd2-icon-svg'
,
()
=>
import
(
'./d2-icon-svg/index.vue'
))
Vue
.
component
(
'd2-table-header'
,
()
=>
import
(
'./d2-table-header/index.vue'
))
Vue
.
component
(
'd2-table-header'
,
()
=>
import
(
'./d2-table-header/index.vue'
))
Vue
.
component
(
'd2-table'
,
()
=>
import
(
'./d2-table/index.vue'
))
Vue
.
component
([
authButton
.
name
],
authButton
)
Vue
.
component
([
authButton
.
name
],
authButton
)
src/libs/util.js
View file @
9b0b9c1
...
@@ -120,4 +120,16 @@ util.resetForm = function(formName) {
...
@@ -120,4 +120,16 @@ util.resetForm = function(formName) {
this
.
$refs
[
formName
]
&&
this
.
$refs
[
formName
].
resetFields
()
this
.
$refs
[
formName
]
&&
this
.
$refs
[
formName
].
resetFields
()
})
})
}
}
/**
* 格式化时间
* @param {Array} time
*/
util
.
formatTime
=
function
(
time
)
{
return
{
startTime
:
time
?
time
[
0
]
+
' '
+
'00:00:00'
:
''
,
endTime
:
time
?
time
[
1
]
+
' '
+
'23:59:59'
:
''
}
}
export
default
util
export
default
util
src/router/routes.js
View file @
9b0b9c1
...
@@ -327,6 +327,7 @@ export const resources = {
...
@@ -327,6 +327,7 @@ export const resources = {
authId
:
'1070201'
,
authId
:
'1070201'
,
parentId
:
'10702'
,
parentId
:
'10702'
,
label
:
'创建角色'
,
label
:
'创建角色'
,
category
:
'action'
,
handle
:
'handleEdit'
,
handle
:
'handleEdit'
,
type
:
'button'
,
type
:
'button'
,
icon
:
'plus'
icon
:
'plus'
...
...
src/views/deviceManagement/index.vue
View file @
9b0b9c1
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<el-input
<el-input
v-model=
"searchForm.keyWord"
v-model=
"searchForm.keyWord"
placeholder=
"请输入物料代码/编码/名称"
placeholder=
"请输入物料代码/编码/名称"
@
clear=
"
loadingG
etList"
@
clear=
"
g
etList"
clearable
clearable
></el-input>
></el-input>
</el-form-item>
</el-form-item>
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<el-select
<el-select
v-model=
"searchForm.stationCode"
v-model=
"searchForm.stationCode"
placeholder=
"请选择所在地"
placeholder=
"请选择所在地"
@
clear=
"
loadingG
etList"
@
clear=
"
g
etList"
clearable
clearable
filterable
filterable
>
>
...
@@ -54,52 +54,14 @@
...
@@ -54,52 +54,14 @@
/>
/>
</auth-button>
</auth-button>
</d2-table-header>
</d2-table-header>
<el-table
<d2-table
:data=
"tableData"
ref=
"table"
v-loading=
"$store.state.d2admin.loading.value"
:tableColumns=
"tableColumns"
border
tableOption=
true
:highlight-current-row=
"true"
@
handlePage=
"getList"
:stripe=
"true"
@
handleEdit=
"handleEdit"
>
@
handleDelete=
"handleDelete"
<el-table-column
></d2-table>
align=
"center"
width=
"60px"
label=
"序号"
type=
'index'
:index=
"index=>index+(currentPage - 1) * pageSize + 1"
>
</el-table-column>
<el-table-column
v-for=
"(item, index) in tableColumns"
:key=
"index"
:label=
"item.label"
:prop=
"item.prop"
:width=
"item.width"
align=
"center"
>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
width=
"200px"
fixed=
"right"
>
<template
slot-scope=
"scope"
>
<auth-button
:data=
"scope.row"
></auth-button>
</
template
>
</el-table-column>
</el-table>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[10,20,30,40]"
:page-size=
"pageSize"
:total=
"total"
layout=
"sizes,total,->,prev,pager,next,jumper"
>
</el-pagination>
<edit-dialog
<edit-dialog
:isVisible=
"editVisible"
:isVisible=
"editVisible"
:editForm=
"editForm"
:editForm=
"editForm"
...
@@ -176,7 +138,7 @@ export default {
...
@@ -176,7 +138,7 @@ export default {
{
{
label
:
'物料名称'
,
label
:
'物料名称'
,
prop
:
'deviceName'
,
prop
:
'deviceName'
,
w
idth
:
'200'
minW
idth
:
'200'
},
},
{
{
label
:
'规格'
,
label
:
'规格'
,
...
@@ -195,13 +157,10 @@ export default {
...
@@ -195,13 +157,10 @@ export default {
},
},
{
{
label
:
'责任人'
,
label
:
'责任人'
,
prop
:
'responsible'
prop
:
'responsible'
,
width
:
'120'
}
}
],
],
// 页码
currentPage
:
1
,
pageSize
:
10
,
total
:
30
,
baseData
:
{
baseData
:
{
station
:
[]
station
:
[]
},
},
...
@@ -210,7 +169,6 @@ export default {
...
@@ -210,7 +169,6 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
loadingGetList
()
this
.
loadBaseData
()
this
.
loadBaseData
()
},
},
...
@@ -223,28 +181,16 @@ export default {
...
@@ -223,28 +181,16 @@ export default {
this
.
baseData
.
station
=
data
this
.
baseData
.
station
=
data
},
},
loadingGetList
()
{
this
.
getList
()
},
/* 接口请求-start */
/* 接口请求-start */
getParams
()
{
getParams
()
{
return
{
return
{
pageCount
:
this
.
pageSize
,
pageSize
:
this
.
currentPage
,
...
this
.
searchForm
...
this
.
searchForm
}
}
},
},
getList
()
{
getList
()
{
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
getListApi
(
params
)
this
.
$refs
.
table
.
getList
(
params
,
'deviceList'
,
getListApi
)
.
then
(
res
=>
{
this
.
tableData
=
res
.
deviceList
this
.
total
=
res
.
pagination
.
totalCount
})
.
catch
(()
=>
{
notice
.
errorTips
()
})
},
},
delObjMutiAttr
(
obj
,
keys
)
{
delObjMutiAttr
(
obj
,
keys
)
{
...
@@ -267,7 +213,7 @@ export default {
...
@@ -267,7 +213,7 @@ export default {
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
handleEditClose
()
this
.
handleEditClose
()
notice
.
okTips
()
notice
.
okTips
()
this
.
loadingG
etList
()
this
.
g
etList
()
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
notice
.
errorTips
()
notice
.
errorTips
()
...
@@ -349,24 +295,11 @@ export default {
...
@@ -349,24 +295,11 @@ export default {
/* 接口请求-end */
/* 接口请求-end */
// 搜索
// 搜索
handleSearch
()
{
handleSearch
()
{
this
.
loadingGetList
()
this
.
getList
()
},
// 页码
handleSizeChange
(
value
)
{
this
.
pageSize
=
value
// 调接口
this
.
loadingGetList
()
},
handleCurrentChange
(
value
)
{
this
.
currentPage
=
value
// 调接口
this
.
loadingGetList
()
},
},
handleEditClose
()
{
handleEditClose
()
{
this
.
editVisible
=
!
this
.
editVisibl
e
this
.
editVisible
=
fals
e
},
},
handleEditConfirm
()
{
handleEditConfirm
()
{
...
@@ -378,7 +311,7 @@ export default {
...
@@ -378,7 +311,7 @@ export default {
handleEdit
(
row
)
{
handleEdit
(
row
)
{
// console.log(row)
// console.log(row)
this
.
editForm
=
_
.
cloneDeep
(
row
)
this
.
editForm
=
_
.
cloneDeep
(
row
)
this
.
editVisible
=
!
this
.
editVisibl
e
this
.
editVisible
=
tru
e
},
},
handleDelete
(
row
)
{
handleDelete
(
row
)
{
...
@@ -394,7 +327,7 @@ export default {
...
@@ -394,7 +327,7 @@ export default {
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
notice
.
okTips
()
notice
.
okTips
()
this
.
loadingG
etList
()
this
.
g
etList
()
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
notice
.
errorTips
()
notice
.
errorTips
()
...
...
src/views/maintainManagement/index.vue
View file @
9b0b9c1
...
@@ -16,14 +16,14 @@
...
@@ -16,14 +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=
"
loadingG
etList"
@
clear=
"
g
etList"
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=
"
loadingG
etList"
@
clear=
"
g
etList"
clearable
clearable
filterable
>
filterable
>
<el-option
<el-option
...
@@ -47,68 +47,24 @@
...
@@ -47,68 +47,24 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<d2-table-header
title=
"作业单列表"
><auth-button
category=
"Button"
></auth-button></d2-table-header>
<d2-table-header
title=
"作业单列表"
><auth-button
category=
"Button"
></auth-button></d2-table-header>
<el-table
<d2-table
:data=
"tableData"
ref=
"table"
v-loading=
"$store.state.d2admin.loading.value"
:tableColumns=
"tableColumns"
border
:tableOption=
"tableOption"
:highlight-current-row=
"true"
:tag=
"tag"
:stripe=
"true"
@
handlePage=
"getList"
>
@
handleDetail=
"handleDetail"
<el-table-column
@
handleDelete=
"handleDelete"
align=
"center"
></d2-table>
width=
"60px"
label=
"序号"
type=
'index'
:index=
"index=>index+(currentPage - 1) * pageSize + 1"
></el-table-column>
<el-table-column
v-for=
"(item, index) in tableColumns"
:key=
"index"
:label=
"item.label"
:prop=
"item.prop"
:width=
"item.width||200"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
v-if=
"item.formatter"
>
{{
item
.
formatter
(
scope
.
row
)
}}
</
template
>
<
template
v-else
>
{{
tableData
[
scope
.
$index
][
item
.
prop
]
}}
</
template
>
</template>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
fixed=
"right"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<auth-button
:data=
"scope.row"
></auth-button>
</
template
>
</el-table-column>
</el-table>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[10,20,30,40]"
:page-size=
"pageSize"
:total=
"total"
layout=
"sizes,total,->,prev,pager,next,jumper"
>
</el-pagination>
</d2-container>
</d2-container>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getListApi
,
removeApi
,
exportApi
}
from
'@api/maintainManagement'
import
{
getListApi
,
removeApi
,
exportApi
}
from
'@api/maintainManagement'
import
{
mapActions
}
from
'vuex'
import
{
mapActions
}
from
'vuex'
// import { BaseData } from '@/common/constants'
import
notice
from
'@/common/notice'
import
notice
from
'@/common/notice'
import
util
from
'@/libs/util'
export
default
{
export
default
{
name
:
'fimsMaintainManagement'
,
name
:
'fimsMaintainManagement'
,
data
()
{
data
()
{
...
@@ -190,7 +146,9 @@ export default {
...
@@ -190,7 +146,9 @@ export default {
model
:
'createTime'
model
:
'createTime'
}],
}],
// 表格
// 表格
tableData
:
[],
tableOption
:
{
width
:
100
},
tableColumns
:
[{
tableColumns
:
[{
label
:
'订单编号'
,
label
:
'订单编号'
,
prop
:
'taskCode'
prop
:
'taskCode'
...
@@ -220,14 +178,6 @@ export default {
...
@@ -220,14 +178,6 @@ export default {
},
{
},
{
label
:
'子系统类型'
,
label
:
'子系统类型'
,
prop
:
'subsystemType'
prop
:
'subsystemType'
// formatter: (cellValue) => {
// if (cellValue.subsystemType) {
// return {
// 1: '座椅',
// 2: '电池'
// }[cellValue.subsystemType]
// }
// }
},
{
},
{
label
:
'故障类型'
,
label
:
'故障类型'
,
prop
:
'downType'
,
prop
:
'downType'
,
...
@@ -285,22 +235,18 @@ export default {
...
@@ -285,22 +235,18 @@ export default {
},
{
},
{
label
:
'处理人'
,
label
:
'处理人'
,
prop
:
'userName'
prop
:
'userName'
}],
}]
// 页码
currentPage
:
1
,
pageSize
:
10
,
total
:
30
}
}
},
},
watch
:
{
watch
:
{
'searchForm.createTime'
(
value
)
{
'searchForm.createTime'
(
value
)
{
!
value
&&
this
.
loadingG
etList
()
!
value
&&
this
.
g
etList
()
}
}
},
},
mounted
()
{
mounted
()
{
this
.
loadingG
etList
()
this
.
g
etList
()
this
.
loadBaseData
()
this
.
loadBaseData
()
},
},
...
@@ -308,27 +254,18 @@ export default {
...
@@ -308,27 +254,18 @@ export default {
...
mapActions
(
'd2admin/base'
,
[
'load'
]),
...
mapActions
(
'd2admin/base'
,
[
'load'
]),
async
loadBaseData
()
{
async
loadBaseData
()
{
const
modelToOptions
=
{
'stationCode'
:
'station'
,
'subsystemTypeCode'
:
'subsys'
}
const
{
station
,
subsys
}
=
await
this
.
load
()
const
data
=
await
this
.
load
()
this
.
searchFormArr
.
map
(
item
=>
{
if
(
data
)
{
item
.
model
===
'stationCode'
&&
(
item
.
options
=
station
)
for
(
var
item
in
modelToOptions
)
{
item
.
model
===
'subsystemTypeCode'
&&
(
item
.
options
=
subsys
)
let
pos
=
this
.
searchFormArr
.
findIndex
(
arrItem
=>
arrItem
.
model
===
item
)
})
this
.
searchFormArr
[
pos
].
options
=
data
[
modelToOptions
[
item
]]
}
}
},
},
loadingGetList
()
{
this
.
getList
()
},
/* 接口请求-start */
/* 接口请求-start */
getParams
()
{
getParams
()
{
this
.
searchForm
.
startTime
=
this
.
searchForm
.
createTime
?
this
.
searchForm
.
createTime
[
0
]
+
' '
+
'00:00:00'
:
''
this
.
searchForm
.
endTime
=
this
.
searchForm
.
createTime
?
this
.
searchForm
.
createTime
[
1
]
+
' '
+
'23:59:59'
:
''
return
{
return
{
pageCount
:
this
.
pageSize
,
...
this
.
searchForm
,
pageSize
:
this
.
currentPage
,
...
util
.
formatTime
(
this
.
searchForm
.
createTime
)
...
this
.
searchForm
}
}
},
},
...
@@ -336,12 +273,7 @@ export default {
...
@@ -336,12 +273,7 @@ export default {
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
delete
params
.
createTime
delete
params
.
createTime
// console.log(params)
// console.log(params)
getListApi
(
params
).
then
(
res
=>
{
this
.
$refs
.
table
.
getList
(
params
,
'maintainList'
,
getListApi
)
this
.
tableData
=
res
.
maintainList
this
.
total
=
res
.
pagination
.
totalCount
}).
catch
(()
=>
{
notice
.
errorTips
()
})
},
},
exportOrder
()
{
exportOrder
()
{
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
...
@@ -356,20 +288,7 @@ export default {
...
@@ -356,20 +288,7 @@ export default {
/* 接口请求-end */
/* 接口请求-end */
// 搜索
// 搜索
handleSearch
()
{
handleSearch
()
{
this
.
loadingGetList
()
this
.
getList
()
},
// 页码
handleSizeChange
(
value
)
{
this
.
pageSize
=
value
// 调接口
this
.
loadingGetList
()
},
handleCurrentChange
(
value
)
{
this
.
currentPage
=
value
// 调接口
this
.
loadingGetList
()
},
},
handleDelete
(
row
)
{
handleDelete
(
row
)
{
...
@@ -382,7 +301,7 @@ export default {
...
@@ -382,7 +301,7 @@ export default {
id
:
row
.
id
id
:
row
.
id
}).
then
(
res
=>
{
}).
then
(
res
=>
{
notice
.
okTips
()
notice
.
okTips
()
this
.
loadingG
etList
()
this
.
g
etList
()
}).
catch
(()
=>
{
}).
catch
(()
=>
{
notice
.
errorTips
()
notice
.
errorTips
()
})
})
...
...
src/views/materiaOrderManagement/index.vue
View file @
9b0b9c1
...
@@ -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=
"请输入订单编号"
@
clear=
"
loadingG
etList"
clearable
></el-input>
<el-input
v-model=
"searchForm.orderCode"
placeholder=
"请输入订单编号"
@
clear=
"
g
etList"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"订单类型"
>
<el-form-item
label=
"订单类型"
>
<el-select
v-model=
"searchForm.orderType"
placeholder=
"请选择订单类型"
@
clear=
"
loadingG
etList"
clearable
filterable
>
<el-select
v-model=
"searchForm.orderType"
placeholder=
"请选择订单类型"
@
clear=
"
g
etList"
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=
"请输入申请人"
@
clear=
"
loadingG
etList"
clearable
></el-input>
<el-input
v-model=
"searchForm.userName"
placeholder=
"请输入申请人"
@
clear=
"
g
etList"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"订单状态"
>
<el-form-item
label=
"订单状态"
>
<el-select
v-model=
"searchForm.status"
placeholder=
"请选择订单状态"
@
clear=
"
loadingG
etList"
clearable
filterable
>
<el-select
v-model=
"searchForm.status"
placeholder=
"请选择订单状态"
@
clear=
"
g
etList"
clearable
filterable
>
<el-option
<el-option
v-for=
"(item, index) in statusArr"
v-for=
"(item, index) in statusArr"
:key=
"index"
:key=
"index"
...
@@ -43,64 +43,15 @@
...
@@ -43,64 +43,15 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<d2-table-header
title=
"订单列表"
><auth-button
category=
"Button"
></auth-button></d2-table-header>
<d2-table-header
title=
"订单列表"
><auth-button
category=
"Button"
></auth-button></d2-table-header>
<el-table
<d2-table
:data=
"tableData"
ref=
"table"
v-loading=
"$store.state.d2admin.loading.value"
:tableColumns=
"tableColumns"
border
tableOption=
true
:highlight-current-row=
"true"
:tag=
"tag"
:stripe=
"true"
@
handlePage=
"getList"
>
@
handleDetail=
"handleDetail"
<el-table-column
@
handleDelete=
"handleDelete"
align=
"center"
></d2-table>
width=
"60px"
label=
"序号"
type=
'index'
:index=
"index=>index+(currentPage - 1) * pageSize + 1"
></el-table-column>
<el-table-column
v-for=
"(item, index) in tableColumns"
:key=
"index"
:label=
"item.label"
:prop=
"item.prop"
:width=
"item.width"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
v-if=
"item.prop === 'status'"
>
<el-tag
:type=
"tag.type[scope.row.status]"
>
{{
tag
.
label
[
scope
.
row
.
status
]
}}
</el-tag>
</
template
>
<
template
v-else-if=
"item.formatter"
>
{{
item
.
formatter
(
scope
.
row
)
}}
</
template
>
<
template
v-else
>
{{
tableData
[
scope
.
$index
][
item
.
prop
]
}}
</
template
>
</template>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
width=
'200'
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<auth-button
:data=
"scope.row"
></auth-button>
</
template
>
</el-table-column>
</el-table>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[10,20,30,40]"
:page-size=
"pageSize"
:total=
"total"
layout=
"sizes,total,->,prev,pager,next,jumper"
>
</el-pagination>
<detail-dialog
<detail-dialog
:isVisible=
"detailVisible"
:isVisible=
"detailVisible"
:title=
"dialogTitle"
:title=
"dialogTitle"
...
@@ -114,6 +65,7 @@
...
@@ -114,6 +65,7 @@
import
DetailDialog
from
'./detailDialog'
import
DetailDialog
from
'./detailDialog'
import
{
getListApi
,
detailApi
,
removeApi
,
exportApi
}
from
'@api/materiaOrderManagement'
import
{
getListApi
,
detailApi
,
removeApi
,
exportApi
}
from
'@api/materiaOrderManagement'
import
notice
from
'@/common/notice'
import
notice
from
'@/common/notice'
import
util
from
'@/libs/util'
export
default
{
export
default
{
name
:
'fimsMateriaOrderManagement'
,
name
:
'fimsMateriaOrderManagement'
,
components
:
{
components
:
{
...
@@ -153,13 +105,15 @@ export default {
...
@@ -153,13 +105,15 @@ export default {
type
:
[
''
,
''
,
'info'
,
'danger'
,
'warning'
,
'success'
],
type
:
[
''
,
''
,
'info'
,
'danger'
,
'warning'
,
'success'
],
label
:
[
''
,
'审批中'
,
'审批完成'
,
'已驳回'
,
'待签收'
,
'已完成'
]
label
:
[
''
,
'审批中'
,
'审批完成'
,
'已驳回'
,
'待签收'
,
'已完成'
]
}),
}),
tableData
:
[],
//
tableData: [],
tableColumns
:
[{
tableColumns
:
[{
label
:
'订单编号'
,
label
:
'订单编号'
,
prop
:
'orderCode'
prop
:
'orderCode'
,
minWidth
:
'200'
},
{
},
{
label
:
'创建时间'
,
label
:
'创建时间'
,
prop
:
'createTime'
prop
:
'createTime'
,
minWidth
:
'180'
},
{
},
{
label
:
'类型'
,
label
:
'类型'
,
prop
:
'orderType'
,
prop
:
'orderType'
,
...
@@ -174,55 +128,42 @@ export default {
...
@@ -174,55 +128,42 @@ export default {
}
}
},
{
},
{
label
:
'申请人'
,
label
:
'申请人'
,
prop
:
'userName'
prop
:
'userName'
,
width
:
'140'
},
{
},
{
label
:
'状态'
,
label
:
'状态'
,
prop
:
'status'
,
prop
:
'status'
,
width
:
'120'
tagLabel
:
true
,
}],
width
:
'140'
// 页码
}]
currentPage
:
1
,
pageSize
:
10
,
total
:
30
}
}
},
},
watch
:
{
watch
:
{
'searchForm.createTime'
(
value
)
{
'searchForm.createTime'
(
value
)
{
!
value
&&
this
.
loadingG
etList
()
!
value
&&
this
.
g
etList
()
}
}
},
},
mounted
()
{
mounted
()
{},
this
.
loadingGetList
()
},
methods
:
{
methods
:
{
loadingGetList
()
{
// changePage() {
this
.
getList
()
// this.getList()
},
// },
/* 接口请求-start */
/* 接口请求-start */
getParams
()
{
getParams
()
{
// console.log(this.searchForm)
this
.
searchForm
.
startTime
=
this
.
searchForm
.
createTime
?
this
.
searchForm
.
createTime
[
0
]
+
' '
+
'00:00:00'
:
''
this
.
searchForm
.
endTime
=
this
.
searchForm
.
createTime
?
this
.
searchForm
.
createTime
[
1
]
+
' '
+
'23:59:59'
:
''
return
{
return
{
pageCount
:
this
.
pageSize
,
...
this
.
searchForm
,
pageSize
:
this
.
currentPage
,
...
util
.
formatTime
(
this
.
searchForm
.
createTime
)
...
this
.
searchForm
}
}
},
},
getList
()
{
getList
()
{
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
!
params
.
orderCode
&&
delete
params
.
orderCode
!
params
.
orderCode
&&
delete
params
.
orderCode
delete
params
.
createTime
delete
params
.
createTime
// console.log(params)
this
.
$refs
.
table
.
getList
(
params
,
'orderList'
,
getListApi
)
getListApi
(
params
).
then
(
res
=>
{
this
.
tableData
=
res
.
orderList
this
.
total
=
res
.
pagination
.
totalCount
}).
catch
(()
=>
{
notice
.
errorTips
()
})
},
},
exportFile
()
{
exportFile
()
{
...
@@ -239,20 +180,7 @@ export default {
...
@@ -239,20 +180,7 @@ export default {
/* 接口请求-end */
/* 接口请求-end */
// 搜索
// 搜索
handleSearch
()
{
handleSearch
()
{
this
.
loadingGetList
()
this
.
getList
()
},
// 页码
handleSizeChange
(
value
)
{
this
.
pageSize
=
value
// 调接口
this
.
loadingGetList
()
},
handleCurrentChange
(
value
)
{
this
.
currentPage
=
value
// 调接口
this
.
loadingGetList
()
},
},
handleDetailClose
()
{
handleDetailClose
()
{
...
@@ -283,7 +211,7 @@ export default {
...
@@ -283,7 +211,7 @@ export default {
orderCode
:
row
.
orderCode
orderCode
:
row
.
orderCode
}).
then
(()
=>
{
}).
then
(()
=>
{
notice
.
okTips
()
notice
.
okTips
()
this
.
loadingG
etList
()
this
.
g
etList
()
}).
catch
(()
=>
{
}).
catch
(()
=>
{
notice
.
errorTips
()
notice
.
errorTips
()
})
})
...
...
src/views/materialList/index.vue
View file @
9b0b9c1
...
@@ -8,53 +8,24 @@
...
@@ -8,53 +8,24 @@
slot=
"header"
slot=
"header"
>
>
<el-form-item
label=
"物料"
>
<el-form-item
label=
"物料"
>
<el-input
v-model=
"searchForm.keyWord"
placeholder=
"请输入物料代码/编码/名称"
@
clear=
"
loadingG
etList"
clearable
></el-input>
<el-input
v-model=
"searchForm.keyWord"
placeholder=
"请输入物料代码/编码/名称"
@
clear=
"
g
etList"
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>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<d2-table-header
title=
"物料列表"
></d2-table-header>
<d2-table-header
title=
"物料列表"
></d2-table-header>
<el-table
<d2-table
:data=
"tableData"
ref=
"table"
v-loading=
"$store.state.d2admin.loading.value"
:tableColumns=
"tableColumns"
border
@
handlePage=
"getList"
:stripe=
"true"
></d2-table>
>
<el-table-column
align=
"center"
width=
"60px"
label=
"序号"
type=
'index'
:index=
"index=>index+(currentPage - 1) * pageSize + 1"
></el-table-column>
<el-table-column
v-for=
"(item, index) in tableColumns"
:key=
"index"
:label=
"item.label"
:prop=
"item.prop"
:width=
"item.width"
align=
"center"
>
</el-table-column>
</el-table>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[10,20,30,40]"
:page-size=
"pageSize"
:total=
"total"
layout=
"sizes,total,->,prev,pager,next,jumper"
>
</el-pagination>
</d2-container>
</d2-container>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getListApi
}
from
'@api/materialList'
import
{
getListApi
}
from
'@api/materialList'
import
notice
from
'@/common/notice'
//
import notice from '@/common/notice'
export
default
{
export
default
{
name
:
'fimsMaterialList'
,
name
:
'fimsMaterialList'
,
data
()
{
data
()
{
...
@@ -82,63 +53,37 @@ export default {
...
@@ -82,63 +53,37 @@ export default {
width
:
'170'
width
:
'170'
},
{
},
{
label
:
'物料名称'
,
label
:
'物料名称'
,
prop
:
'deviceName'
prop
:
'deviceName'
,
minWidth
:
'200'
},
{
},
{
label
:
'规格'
,
label
:
'规格'
,
prop
:
'specifications'
prop
:
'specifications'
,
width
:
'140'
},
{
},
{
label
:
'责任人'
,
label
:
'责任人'
,
prop
:
'responsible'
prop
:
'responsible'
,
}],
width
:
'120'
// 页码
}]
currentPage
:
1
,
pageSize
:
10
,
total
:
30
}
}
},
},
mounted
()
{
mounted
()
{},
this
.
loadingGetList
()
},
methods
:
{
methods
:
{
loadingGetList
()
{
this
.
getList
()
},
/* 接口请求-start */
/* 接口请求-start */
getParams
()
{
getParams
()
{
return
{
return
{
pageCount
:
this
.
pageSize
,
pageSize
:
this
.
currentPage
,
...
this
.
searchForm
...
this
.
searchForm
}
}
},
},
getList
()
{
getList
()
{
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
getListApi
(
params
).
then
(
res
=>
{
this
.
$refs
.
table
.
getList
(
params
,
'deviceList'
,
getListApi
)
this
.
tableData
=
res
.
deviceList
this
.
total
=
res
.
pagination
.
totalCount
}).
catch
(()
=>
{
notice
.
errorTips
()
})
},
},
/* 接口请求-end */
/* 接口请求-end */
// 搜索
// 搜索
handleSearch
()
{
handleSearch
()
{
this
.
loadingGetList
()
this
.
getList
()
},
// 页码
handleSizeChange
(
value
)
{
this
.
pageSize
=
value
// 调接口
this
.
loadingGetList
()
},
handleCurrentChange
(
value
)
{
this
.
currentPage
=
value
// 调接口
this
.
loadingGetList
()
}
}
}
}
}
}
...
...
src/views/reportingLogs/index.vue
View file @
9b0b9c1
...
@@ -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
@
clear=
"
loadingG
etList"
></el-input>
<el-input
v-model=
"searchForm.trafficCode"
placeholder=
"请输入车辆编号"
clearable
@
clear=
"
g
etList"
></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
@
clear=
"
loadingG
etList"
>
<el-select
v-model=
"searchForm.stationCode"
placeholder=
"请选择"
clearable
filterable
@
clear=
"
g
etList"
>
<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,48 +30,18 @@
...
@@ -30,48 +30,18 @@
</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
@
clear=
"
loadingG
etList"
></el-input>
<el-input
v-model=
"searchForm.subSystemCode"
placeholder=
"请输入子系统编号"
clearable
@
clear=
"
g
etList"
></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>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<d2-table-header
title=
"上报日志列表"
></d2-table-header>
<d2-table-header
title=
"上报日志列表"
></d2-table-header>
<el-table
<d2-table
:data=
"tableData"
ref=
"table"
v-loading=
"$store.state.d2admin.loading.value"
:tableColumns=
"tableColumns"
border
@
handlePage=
"getList"
:stripe=
"true"
></d2-table>
:highlight-current-row=
"true"
>
<el-table-column
align=
"center"
width=
"60px"
label=
"序号"
type=
'index'
:index=
"index=>index+(currentPage - 1) * pageSize + 1"
></el-table-column>
<el-table-column
v-for=
"(item, index) in tableColumns"
:key=
"index"
:label=
"item.label"
:prop=
"item.prop"
:width=
"item.width"
align=
"center"
>
</el-table-column>
</el-table>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[10,20,30,40]"
:page-size=
"pageSize"
:total=
"total"
layout=
"sizes,total,->,prev,pager,next,jumper"
>
</el-pagination>
</d2-container>
</d2-container>
</
template
>
</
template
>
...
@@ -79,6 +49,7 @@
...
@@ -79,6 +49,7 @@
import
{
getLogsApi
,
exportApi
}
from
'@api/reportingLogs'
import
{
getLogsApi
,
exportApi
}
from
'@api/reportingLogs'
import
{
BaseData
}
from
'@/common/constants'
import
{
BaseData
}
from
'@/common/constants'
import
notice
from
'@/common/notice'
import
notice
from
'@/common/notice'
import
util
from
'@/libs/util'
export
default
{
export
default
{
name
:
'FimsReportingLogs'
,
name
:
'FimsReportingLogs'
,
data
()
{
data
()
{
...
@@ -92,30 +63,33 @@ export default {
...
@@ -92,30 +63,33 @@ export default {
tableData
:
[],
tableData
:
[],
tableColumns
:
[{
tableColumns
:
[{
label
:
'上报时间'
,
label
:
'上报时间'
,
prop
:
'reportTime'
prop
:
'reportTime'
,
minWidth
:
'200'
},
{
},
{
label
:
'车辆编号'
,
label
:
'车辆编号'
,
prop
:
'trafficCode'
prop
:
'trafficCode'
,
width
:
'120'
},
{
},
{
label
:
'归属车辆段'
,
label
:
'归属车辆段'
,
prop
:
'stationName'
prop
:
'stationName'
,
minWidth
:
'100'
},
{
},
{
label
:
'子系统编号'
,
label
:
'子系统编号'
,
prop
:
'subSystemCode'
prop
:
'subSystemCode'
,
width
:
'160'
},
{
},
{
label
:
'子系统类型'
,
label
:
'子系统类型'
,
prop
:
'subSystemType'
prop
:
'subSystemType'
,
width
:
'100'
},
{
},
{
label
:
'子系统厂家'
,
label
:
'子系统厂家'
,
prop
:
'merchantName'
prop
:
'merchantName'
,
minWidth
:
'200'
},
{
},
{
label
:
'上报内容'
,
label
:
'上报内容'
,
prop
:
'reportValue'
prop
:
'reportValue'
,
minWidth
:
'200'
}],
}],
// 页码
currentPage
:
1
,
pageSize
:
10
,
total
:
30
,
baseData
:
{
baseData
:
{
station
:
[]
station
:
[]
}
}
...
@@ -124,12 +98,11 @@ export default {
...
@@ -124,12 +98,11 @@ export default {
watch
:
{
watch
:
{
'searchForm.reportTime'
(
value
)
{
'searchForm.reportTime'
(
value
)
{
!
value
&&
this
.
loadingG
etList
()
!
value
&&
this
.
g
etList
()
}
}
},
},
mounted
()
{
mounted
()
{
this
.
loadingGetList
()
this
.
loadBaseData
()
this
.
loadBaseData
()
},
},
...
@@ -139,31 +112,17 @@ export default {
...
@@ -139,31 +112,17 @@ export default {
this
.
baseData
.
station
=
data
this
.
baseData
.
station
=
data
},
},
loadingGetList
()
{
this
.
getList
()
},
getParams
()
{
getParams
()
{
var
time
=
[{
attr
:
'startTime'
,
addTime
:
'00:00:00'
},
{
attr
:
'endTime'
,
addTime
:
'23:59:59'
}]
this
.
searchForm
.
reportTime
&&
this
.
searchForm
.
reportTime
.
map
((
value
,
i
)
=>
{
this
.
searchForm
[
time
[
i
].
attr
]
=
value
+
' '
+
time
[
i
].
addTime
})
return
{
return
{
pageCount
:
this
.
pageSize
,
...
this
.
searchForm
,
pageSize
:
this
.
currentPage
,
...
util
.
formatTime
(
this
.
searchForm
.
reportTime
)
...
this
.
searchForm
}
}
},
},
getList
()
{
getList
()
{
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
delete
params
.
reportTime
delete
params
.
reportTime
getLogsApi
(
params
).
then
(
res
=>
{
this
.
$refs
.
table
.
getList
(
params
,
'loges'
,
getLogsApi
)
// res.pagination && (this.total = res.pagination.totalCount)
this
.
tableData
=
res
.
loges
this
.
total
=
res
.
pagination
.
totalCount
})
.
catch
(()
=>
{
notice
.
errorTips
()
})
},
},
handleExport
()
{
handleExport
()
{
...
@@ -181,20 +140,7 @@ export default {
...
@@ -181,20 +140,7 @@ export default {
// 搜索
// 搜索
handleSearch
()
{
handleSearch
()
{
this
.
loadingGetList
()
this
.
getList
()
},
// 页码
handleSizeChange
(
value
)
{
this
.
pageSize
=
value
// 调接口
this
.
loadingGetList
()
},
handleCurrentChange
(
value
)
{
this
.
currentPage
=
value
// 调接口
this
.
loadingGetList
()
}
}
}
}
}
}
...
...
src/views/subSysManagement/index.vue
View file @
9b0b9c1
...
@@ -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.subsystemCode"
placeholder=
"请输入子系统编号"
@
clear=
"
loadingG
etList"
clearable
></el-input>
<el-input
v-model=
"searchForm.subsystemCode"
placeholder=
"请输入子系统编号"
@
clear=
"
g
etList"
clearable
></el-input>
<!--
<el-select
<!--
<el-select
v-model=
"searchForm.subsystemCode"
v-model=
"searchForm.subsystemCode"
placeholder=
"请输入子系统编号"
placeholder=
"请输入子系统编号"
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
</el-select>
-->
</el-select>
-->
</el-form-item>
</el-form-item>
<el-form-item
label=
"类型"
>
<el-form-item
label=
"类型"
>
<el-select
v-model=
"searchForm.subsystemTypeCode"
placeholder=
"请选择类型"
@
clear=
"
loadingG
etList"
clearable
filterable
>
<el-select
v-model=
"searchForm.subsystemTypeCode"
placeholder=
"请选择类型"
@
clear=
"
g
etList"
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"
...
@@ -36,71 +36,24 @@
...
@@ -36,71 +36,24 @@
</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=
"请输入车辆编号"
@
clear=
"
loadingG
etList"
clearable
></el-input>
<el-input
v-model=
"searchForm.trafficCode"
placeholder=
"请输入车辆编号"
@
clear=
"
g
etList"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"生产厂家"
>
<el-form-item
label=
"生产厂家"
>
<el-input
v-model=
"searchForm.merchantName"
placeholder=
"请输入生产厂家"
@
clear=
"
loadingG
etList"
clearable
></el-input>
<el-input
v-model=
"searchForm.merchantName"
placeholder=
"请输入生产厂家"
@
clear=
"
g
etList"
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>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<d2-table-header
title=
"子系统列表"
><auth-button
category=
"Button"
:data=
"editFormReset"
></auth-button></d2-table-header>
<d2-table-header
title=
"子系统列表"
><auth-button
category=
"Button"
:data=
"editFormReset"
></auth-button></d2-table-header>
<el-table
<d2-table
:data=
"tableData"
ref=
"table"
v-loading=
"$store.state.d2admin.loading.value"
:tableColumns=
"tableColumns"
border
tableOption=
true
:stripe=
"true"
@
handlePage=
"getList"
:highlight-current-row=
"true"
@
handleEdit=
"handleEdit"
>
@
handleDelete=
"handleDelete"
<el-table-column
></d2-table>
align=
"center"
width=
"60px"
label=
"序号"
type=
'index'
:index=
"index=>index+(currentPage - 1) * pageSize + 1"
></el-table-column>
<el-table-column
v-for=
"(item, index) in tableColumns"
:key=
"index"
:label=
"item.label"
:prop=
"item.prop"
:width=
"item.width"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
v-if=
"item.formatter"
>
{{
item
.
formatter
(
scope
.
row
)
}}
</
template
>
<
template
v-else
>
{{
tableData
[
scope
.
$index
][
item
.
prop
]
}}
</
template
>
</template>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
width=
"200"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<auth-button
:data=
"scope.row"
></auth-button>
</
template
>
</el-table-column>
</el-table>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[10,20,30,40]"
:page-size=
"pageSize"
:total=
"total"
layout=
"sizes,total,->,prev,pager,next,jumper"
>
</el-pagination>
<edit-dialog
<edit-dialog
:isVisible=
"editVisible"
:isVisible=
"editVisible"
:editForm=
"editForm"
:editForm=
"editForm"
...
@@ -176,7 +129,7 @@ export default {
...
@@ -176,7 +129,7 @@ export default {
},
{
},
{
label
:
'生产厂家'
,
label
:
'生产厂家'
,
prop
:
'merchantName'
,
prop
:
'merchantName'
,
w
idth
:
'220'
minW
idth
:
'220'
},
{
},
{
label
:
'发送结点序列'
,
label
:
'发送结点序列'
,
prop
:
'sendSequence'
,
prop
:
'sendSequence'
,
...
@@ -195,9 +148,6 @@ export default {
...
@@ -195,9 +148,6 @@ export default {
width
:
'120'
width
:
'120'
}],
}],
// 页码
// 页码
currentPage
:
1
,
pageSize
:
10
,
total
:
30
,
baseData
:
{
baseData
:
{
subsys
:
[]
subsys
:
[]
}
}
...
@@ -205,7 +155,6 @@ export default {
...
@@ -205,7 +155,6 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
loadingGetList
()
this
.
loadBaseData
()
this
.
loadBaseData
()
},
},
...
@@ -223,17 +172,12 @@ export default {
...
@@ -223,17 +172,12 @@ export default {
// 清空远程搜索列表;表格数据刷新
// 清空远程搜索列表;表格数据刷新
// remoteAndGetList (attr) {
// remoteAndGetList (attr) {
// this.remoteOptionArr[attr] = []
// this.remoteOptionArr[attr] = []
// this.
loadingG
etList()
// this.
g
etList()
// },
// },
loadingGetList
()
{
this
.
getList
()
},
/* 接口请求-start */
/* 接口请求-start */
getParams
()
{
getParams
()
{
return
{
return
{
pageCount
:
this
.
pageSize
,
pageSize
:
this
.
currentPage
,
...
this
.
searchForm
...
this
.
searchForm
}
}
},
},
...
@@ -249,12 +193,7 @@ export default {
...
@@ -249,12 +193,7 @@ export default {
getList
()
{
getList
()
{
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
getListApi
(
params
).
then
(
res
=>
{
this
.
$refs
.
table
.
getList
(
params
,
'subsystemList'
,
getListApi
)
this
.
tableData
=
res
.
subsystemList
this
.
total
=
res
.
pagination
.
totalCount
}).
catch
(()
=>
{
notice
.
errorTips
()
})
},
},
editSubSystem
(
value
)
{
editSubSystem
(
value
)
{
...
@@ -273,7 +212,7 @@ export default {
...
@@ -273,7 +212,7 @@ export default {
editApi
(
params
).
then
(
res
=>
{
editApi
(
params
).
then
(
res
=>
{
this
.
handleEditClose
()
this
.
handleEditClose
()
notice
.
okTips
()
notice
.
okTips
()
this
.
loadingG
etList
()
this
.
g
etList
()
}).
catch
(()
=>
{
}).
catch
(()
=>
{
notice
.
errorTips
()
notice
.
errorTips
()
})
})
...
@@ -281,20 +220,7 @@ export default {
...
@@ -281,20 +220,7 @@ export default {
/* 接口请求-end */
/* 接口请求-end */
// 搜索
// 搜索
handleSearch
()
{
handleSearch
()
{
this
.
loadingGetList
()
this
.
getList
()
},
// 页码
handleSizeChange
(
value
)
{
this
.
pageSize
=
value
// 调接口
this
.
loadingGetList
()
},
handleCurrentChange
(
value
)
{
this
.
currentPage
=
value
// 调接口
this
.
loadingGetList
()
},
},
handleEditClose
()
{
handleEditClose
()
{
...
@@ -309,7 +235,7 @@ export default {
...
@@ -309,7 +235,7 @@ export default {
// 表格-编辑
// 表格-编辑
handleEdit
(
row
)
{
handleEdit
(
row
)
{
this
.
editForm
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
this
.
editForm
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
this
.
editVisible
=
!
this
.
editVisible
this
.
handleEditClose
()
},
},
handleDelete
(
row
)
{
handleDelete
(
row
)
{
...
@@ -323,7 +249,7 @@ export default {
...
@@ -323,7 +249,7 @@ export default {
usedStatus
:
2
usedStatus
:
2
}).
then
(()
=>
{
}).
then
(()
=>
{
notice
.
okTips
()
notice
.
okTips
()
this
.
loadingG
etList
()
this
.
g
etList
()
}).
catch
(()
=>
{
}).
catch
(()
=>
{
notice
.
errorTips
()
notice
.
errorTips
()
})
})
...
...
src/views/systemMonitor/index.vue
View file @
9b0b9c1
...
@@ -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=
"请输入车辆编号"
@
clear=
"
loadingG
etList"
clearable
></el-input>
<el-input
v-model=
"searchForm.trafficCode"
placeholder=
"请输入车辆编号"
@
clear=
"
g
etList"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"归属车辆段"
>
<el-form-item
label=
"归属车辆段"
>
<el-select
v-model=
"searchForm.stationCode"
placeholder=
"请选择归属车辆段"
@
clear=
"
loadingG
etList"
filterable
clearable
>
<el-select
v-model=
"searchForm.stationCode"
placeholder=
"请选择归属车辆段"
@
clear=
"
g
etList"
filterable
clearable
>
<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"
...
@@ -39,10 +39,10 @@
...
@@ -39,10 +39,10 @@
</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=
"请输入子系统编号"
@
clear=
"
loadingG
etList"
clearable
></el-input>
<el-input
v-model=
"searchForm.subsystemCode"
placeholder=
"请输入子系统编号"
@
clear=
"
g
etList"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"子系统状态"
>
<el-form-item
label=
"子系统状态"
>
<el-select
v-model=
"searchForm.onlineStatus"
placeholder=
"请选择子系统状态"
@
clear=
"
loadingG
etList"
filterable
clearable
>
<el-select
v-model=
"searchForm.onlineStatus"
placeholder=
"请选择子系统状态"
@
clear=
"
g
etList"
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>
...
@@ -52,51 +52,12 @@
...
@@ -52,51 +52,12 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<d2-table-header
title=
"子系统状态列表"
><auth-button
category=
"Button"
></auth-button></d2-table-header>
<d2-table-header
title=
"子系统状态列表"
><auth-button
category=
"Button"
></auth-button></d2-table-header>
<el-table
<d2-table
:data=
"tableData"
ref=
"table"
v-loading=
"$store.state.d2admin.loading.value"
:tableColumns=
"tableColumns"
border
:tag=
"tag"
:stripe=
"true"
@
handlePage=
"getList"
:highlight-current-row=
"true"
></d2-table>
>
<el-table-column
align=
"center"
width=
"60px"
label=
"序号"
type=
'index'
:index=
"index=>index+(currentPage - 1) * pageSize + 1"
></el-table-column>
<el-table-column
v-for=
"(item, index) in tableColumns"
:key=
"index"
:label=
"item.label"
:prop=
"item.prop"
:width=
"item.width"
align=
"center"
>
<template
v-if=
"item.prop"
slot-scope=
"scope"
>
<template
v-if=
"item.prop == 'onlineStatus'"
>
<el-tag
:type=
"tag.type[scope.row.onlineStatus]"
>
{{
tag
.
label
[
scope
.
row
.
onlineStatus
]
}}
</el-tag>
</
template
>
<
template
v-else
>
{{
tableData
[
scope
.
$index
][
item
.
prop
]
}}
</
template
>
</template>
</el-table-column>
</el-table>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[10,20,30,40]"
:page-size=
"pageSize"
:total=
"total"
layout=
"sizes,total,->,prev,pager,next,jumper"
>
</el-pagination>
</div>
</div>
</d2-container>
</d2-container>
</
template
>
</
template
>
...
@@ -201,7 +162,8 @@ export default {
...
@@ -201,7 +162,8 @@ export default {
},
{
},
{
label
:
'子系统状态'
,
label
:
'子系统状态'
,
prop
:
'onlineStatus'
,
prop
:
'onlineStatus'
,
width
:
'160'
width
:
'160'
,
tagLabel
:
true
},
{
},
{
label
:
'车辆编号'
,
label
:
'车辆编号'
,
prop
:
'trafficCode'
,
prop
:
'trafficCode'
,
...
@@ -213,10 +175,6 @@ export default {
...
@@ -213,10 +175,6 @@ export default {
label
:
'故障内容'
,
label
:
'故障内容'
,
prop
:
'errorCode'
prop
:
'errorCode'
}],
}],
// 翻页
currentPage
:
1
,
pageSize
:
10
,
total
:
20
,
baseData
:
{
baseData
:
{
station
:
[],
station
:
[],
subsys
:
[]
subsys
:
[]
...
@@ -226,7 +184,6 @@ export default {
...
@@ -226,7 +184,6 @@ export default {
mounted
()
{
mounted
()
{
this
.
$echarts
=
echarts
this
.
$echarts
=
echarts
this
.
loadingGetList
()
this
.
loadBaseData
()
this
.
loadBaseData
()
this
.
totalECharts
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'totalEcharts'
))
this
.
totalECharts
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'totalEcharts'
))
this
.
getPie
()
this
.
getPie
()
...
@@ -243,26 +200,19 @@ export default {
...
@@ -243,26 +200,19 @@ export default {
this
.
baseData
.
subsys
.
unshift
({
confCode
:
''
,
confValue
:
'全部'
})
this
.
baseData
.
subsys
.
unshift
({
confCode
:
''
,
confValue
:
'全部'
})
},
},
loadingGetList
()
{
//
loadingGetList() {
this
.
getList
()
//
this.getList()
},
//
},
/* 接口请求-start */
/* 接口请求-start */
getParams
()
{
getParams
()
{
return
{
return
{
pageCount
:
this
.
pageSize
,
pageSize
:
this
.
currentPage
,
...
this
.
searchForm
...
this
.
searchForm
}
}
},
},
getList
()
{
getList
()
{
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
getListApi
(
params
).
then
(
res
=>
{
this
.
$refs
.
table
.
getList
(
params
,
'subsystemList'
,
getListApi
)
this
.
tableData
=
res
.
subsystemList
this
.
total
=
res
.
pagination
.
totalCount
}).
catch
(()
=>
{
notice
.
errorTips
()
})
},
},
getPie
(
label
=
''
)
{
getPie
(
label
=
''
)
{
const
params
=
{
const
params
=
{
...
@@ -303,20 +253,7 @@ export default {
...
@@ -303,20 +253,7 @@ export default {
// 搜索
// 搜索
handleSearch
()
{
handleSearch
()
{
// 调接口
// 调接口
this
.
loadingGetList
()
this
.
getList
()
},
// 页码
handleSizeChange
(
value
)
{
this
.
pageSize
=
value
// 调接口
this
.
loadingGetList
()
},
handleCurrentChange
(
value
)
{
this
.
currentPage
=
value
// 调接口
this
.
loadingGetList
()
}
}
}
}
}
}
...
...
src/views/trafficManagement/index.vue
View file @
9b0b9c1
...
@@ -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=
"请输入车辆编号"
@
clear=
"
loadingG
etList"
clearable
></el-input>
<el-input
v-model=
"searchForm.trafficCode"
placeholder=
"请输入车辆编号"
@
clear=
"
g
etList"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"归属车辆段"
>
<el-form-item
label=
"归属车辆段"
>
<el-select
v-model=
"searchForm.stationCode"
placeholder=
"请选择归属车辆段"
@
clear=
"
loadingG
etList"
clearable
filterable
>
<el-select
v-model=
"searchForm.stationCode"
placeholder=
"请选择归属车辆段"
@
clear=
"
g
etList"
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"
...
@@ -20,65 +20,21 @@
...
@@ -20,65 +20,21 @@
</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=
"请输入维修承包商"
@
clear=
"
loadingG
etList"
clearable
></el-input>
<el-input
v-model=
"searchForm.merchantName"
placeholder=
"请输入维修承包商"
@
clear=
"
g
etList"
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>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<d2-table-header
title=
"车辆列表"
><auth-button
category=
"Button"
:data=
"editFormReset"
></auth-button></d2-table-header>
<d2-table-header
title=
"车辆列表"
><auth-button
category=
"Button"
:data=
"editFormReset"
></auth-button></d2-table-header>
<el-table
<d2-table
:data=
"tableData"
ref=
"table"
v-loading=
"$store.state.d2admin.loading.value"
:tableColumns=
"tableColumns"
:stripe=
"true"
tableOption=
true
border
@
handlePage=
"getList"
:highlight-current-row=
"true"
@
handleEdit=
"handleEdit"
>
@
handleDelete=
"handleDelete"
<el-table-column
></d2-table>
align=
"center"
width=
"60px"
label=
"序号"
type=
'index'
:index=
"index=>index+(currentPage - 1) * pageSize + 1"
></el-table-column>
<el-table-column
v-for=
"(item, index) in tableColumns"
:key=
"index"
:label=
"item.label"
:prop=
"item.prop"
:width=
"item.width"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
v-if=
"item.formatter"
>
{{
item
.
formatter
(
scope
.
row
)
}}
</
template
>
<
template
v-else
>
{{
tableData
[
scope
.
$index
][
item
.
prop
]
}}
</
template
>
</template>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<auth-button
:data=
"scope.row"
></auth-button>
</
template
>
</el-table-column>
</el-table>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[10,20,30,40]"
:page-size=
"pageSize"
:total=
"total"
layout=
"sizes,total,->,prev,pager,next,jumper"
>
</el-pagination>
<edit-dialog
<edit-dialog
:isVisible=
"editVisible"
:isVisible=
"editVisible"
:editForm=
"editForm"
:editForm=
"editForm"
...
@@ -134,10 +90,12 @@ export default {
...
@@ -134,10 +90,12 @@ export default {
width
:
'120'
width
:
'120'
},
{
},
{
label
:
'归属车辆段'
,
label
:
'归属车辆段'
,
prop
:
'stationName'
prop
:
'stationName'
,
minWidth
:
'220'
},
{
},
{
label
:
'维修承包商'
,
label
:
'维修承包商'
,
prop
:
'merchantName'
prop
:
'merchantName'
,
minWidth
:
'220'
},
{
},
{
label
:
'接口开放'
,
label
:
'接口开放'
,
prop
:
'openType'
,
prop
:
'openType'
,
...
@@ -151,10 +109,6 @@ export default {
...
@@ -151,10 +109,6 @@ export default {
}
}
}
}
}],
}],
// 页码
currentPage
:
1
,
pageSize
:
10
,
total
:
30
,
baseData
:
{
baseData
:
{
station
:
[]
station
:
[]
}
}
...
@@ -162,7 +116,6 @@ export default {
...
@@ -162,7 +116,6 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
loadingGetList
()
this
.
loadBaseData
()
this
.
loadBaseData
()
},
},
...
@@ -172,26 +125,16 @@ export default {
...
@@ -172,26 +125,16 @@ export default {
this
.
baseData
.
station
=
data
this
.
baseData
.
station
=
data
},
},
loadingGetList
()
{
this
.
getList
()
},
/* 接口请求-start */
/* 接口请求-start */
getParams
()
{
getParams
()
{
return
{
return
{
pageCount
:
this
.
pageSize
,
pageSize
:
this
.
currentPage
,
...
this
.
searchForm
...
this
.
searchForm
}
}
},
},
getList
()
{
getList
()
{
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
getListApi
(
params
).
then
(
res
=>
{
this
.
$refs
.
table
.
getList
(
params
,
'trafficList'
,
getListApi
)
this
.
tableData
=
res
.
trafficList
this
.
total
=
res
.
pagination
.
totalCount
}).
catch
(()
=>
{
notice
.
errorTips
()
})
},
},
editTraffic
(
value
)
{
editTraffic
(
value
)
{
// console.log(value)
// console.log(value)
...
@@ -204,7 +147,7 @@ export default {
...
@@ -204,7 +147,7 @@ export default {
editApi
(
params
).
then
(
res
=>
{
editApi
(
params
).
then
(
res
=>
{
this
.
handleEditClose
()
this
.
handleEditClose
()
notice
.
okTips
()
notice
.
okTips
()
this
.
loadingG
etList
()
this
.
g
etList
()
}).
catch
(()
=>
{
}).
catch
(()
=>
{
notice
.
errorTips
()
notice
.
errorTips
()
})
})
...
@@ -212,22 +155,7 @@ export default {
...
@@ -212,22 +155,7 @@ export default {
/* 接口请求-end */
/* 接口请求-end */
// 搜索
// 搜索
handleSearch
()
{
handleSearch
()
{
this
.
loadingGetList
()
this
.
getList
()
},
// 页码
handleSizeChange
(
value
)
{
// console.log(value)
this
.
pageSize
=
value
// 调接口
this
.
loadingGetList
()
},
handleCurrentChange
(
value
)
{
// console.log(value)
this
.
currentPage
=
value
// 调接口
this
.
loadingGetList
()
},
},
handleEditClose
()
{
handleEditClose
()
{
...
@@ -244,7 +172,7 @@ export default {
...
@@ -244,7 +172,7 @@ export default {
handleEdit
(
row
)
{
handleEdit
(
row
)
{
// console.log(row)
// console.log(row)
this
.
editForm
=
_
.
cloneDeep
(
row
)
this
.
editForm
=
_
.
cloneDeep
(
row
)
this
.
editVisible
=
!
this
.
editVisible
this
.
handleEditClose
()
},
},
handleDelete
(
row
)
{
handleDelete
(
row
)
{
...
@@ -258,7 +186,7 @@ export default {
...
@@ -258,7 +186,7 @@ export default {
usedStatus
:
2
usedStatus
:
2
}).
then
(
res
=>
{
}).
then
(
res
=>
{
notice
.
okTips
()
notice
.
okTips
()
this
.
loadingG
etList
()
this
.
g
etList
()
}).
catch
(()
=>
{
}).
catch
(()
=>
{
notice
.
errorTips
()
notice
.
errorTips
()
})
})
...
...
src/views/userManage/loginLogs/index.vue
View file @
9b0b9c1
...
@@ -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=
"请输入用户名/姓名/联系电话"
@
clear=
"
loadingG
etList"
clearable
></el-input>
<el-input
v-model=
"searchForm.userName"
placeholder=
"请输入用户名/姓名/联系电话"
@
clear=
"
g
etList"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"登录方式"
>
<el-form-item
label=
"登录方式"
>
<el-select
v-model=
"searchForm.loginType"
placeholder=
"请选择"
@
clear=
"
loadingG
etList"
clearable
filterable
>
<el-select
v-model=
"searchForm.loginType"
placeholder=
"请选择"
@
clear=
"
g
etList"
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>
...
@@ -31,45 +31,17 @@
...
@@ -31,45 +31,17 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<d2-table-header
title=
"登录日志列表"
></d2-table-header>
<d2-table-header
title=
"登录日志列表"
></d2-table-header>
<el-table
<d2-table
:data=
"tableData"
ref=
"table"
v-loading=
"$store.state.d2admin.loading.value"
:tableColumns=
"tableColumns"
border
@
handlePage=
"getList"
:stripe=
"true"
></d2-table>
>
<el-table-column
align=
"center"
width=
"60px"
label=
"序号"
type=
'index'
:index=
"index=>index+(currentPage - 1) * pageSize + 1"
></el-table-column>
<el-table-column
v-for=
"(item, index) in tableColumns"
:key=
"index"
:label=
"item.label"
:prop=
"item.prop"
:width=
"item.width"
align=
"center"
>
</el-table-column>
</el-table>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[10,20,30,40]"
:page-size=
"pageSize"
:total=
"total"
layout=
"sizes,total,->,prev,pager,next,jumper"
>
</el-pagination>
</d2-container>
</d2-container>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getLoginlogs
}
from
'@api/sys.account'
import
{
getLoginlogs
}
from
'@api/sys.account'
import
util
from
'@/libs/util'
export
default
{
export
default
{
name
:
'FimsLoginLogs'
,
name
:
'FimsLoginLogs'
,
data
()
{
data
()
{
...
@@ -103,67 +75,33 @@ export default {
...
@@ -103,67 +75,33 @@ export default {
label
:
'登录设备'
,
label
:
'登录设备'
,
prop
:
'deviceCode'
,
prop
:
'deviceCode'
,
width
:
'300px'
width
:
'300px'
}],
}]
// 页码
currentPage
:
1
,
pageSize
:
10
,
total
:
10
}
}
},
},
watch
:
{
watch
:
{
'searchForm.loginTime'
(
value
)
{
'searchForm.loginTime'
(
value
)
{
!
value
&&
this
.
loadingG
etList
()
!
value
&&
this
.
g
etList
()
}
}
},
},
mounted
()
{
mounted
()
{},
this
.
loadingGetList
()
},
methods
:
{
methods
:
{
loadingGetList
()
{
this
.
getList
()
},
getParams
()
{
getParams
()
{
return
Object
.
assign
(
return
Object
.
assign
(
{
this
.
searchForm
,
pageCount
:
this
.
pageSize
,
util
.
formatTime
(
this
.
searchForm
.
loginTime
)
pageSize
:
this
.
currentPage
},
this
.
searchForm
)
)
},
},
getList
()
{
getList
()
{
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
params
.
startTime
=
params
.
loginTime
?
params
.
loginTime
[
0
]
+
' '
+
'00:00:00 '
:
''
params
.
endTime
=
params
.
loginTime
?
params
.
loginTime
[
1
]
+
' '
+
'23:59:59'
:
''
delete
params
.
loginTime
delete
params
.
loginTime
getLoginlogs
(
params
).
then
(
res
=>
{
this
.
$refs
.
table
.
getList
(
params
,
'loges'
,
getLoginlogs
)
// res.pagination && (this.total = res.pagination.totalCount)
this
.
tableData
=
res
.
loges
this
.
total
=
res
.
pagination
.
totalCount
})
.
catch
(()
=>
{
})
},
},
// 搜索
// 搜索
handleSearch
()
{
handleSearch
()
{
this
.
loadingGetList
()
this
.
getList
()
},
// 页码
handleSizeChange
(
value
)
{
// console.log(value)
this
.
pageSize
=
value
// 调接口
this
.
loadingGetList
()
},
handleCurrentChange
(
value
)
{
// console.log(value)
this
.
currentPage
=
value
// 调接口
this
.
loadingGetList
()
}
}
}
}
}
}
...
...
src/views/userManage/role/index.vue
View file @
9b0b9c1
<!-- 权限管理 -->
<!-- 权限管理 -->
<
template
>
<
template
>
<d2-container
class=
"role"
>
<d2-container
class=
"role"
>
<d2-table-header
title=
"角色列表"
><auth-button
label=
"创建角色"
></auth-button></d2-table-header>
<d2-table-header
title=
"角色列表"
><auth-button
category=
"action"
label=
"创建角色"
></auth-button></d2-table-header>
<el-table
:data=
"tableData"
v-loading=
"$store.state.d2admin.loading.value"
border
:stripe=
"true"
>
<d2-table
<el-table-column
align=
"center"
width=
"60px"
label=
"序号"
type=
"index"
></el-table-column>
ref=
"table"
<el-table-column
:tableColumns=
"tableColumns"
v-for=
"(item, index) in tableColumns"
tableOption=
true
:key=
"index"
:pagination=
"pagination"
:label=
"item.label"
@
handlePage=
"getList"
:prop=
"item.prop"
@
handleEdit=
"handleEdit"
:width=
"item.width"
></d2-table>
align=
"center"
/>
<el-table-column
align=
"center"
label=
"操作"
>
<template
slot-scope=
"scope"
>
<auth-button
:data=
"scope.row"
label=
"权限编辑"
></auth-button>
</
template
>
</el-table-column>
</el-table>
<!-- <el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page.pageCount"
:page-sizes="[10,20,30,40]"
:page-size="page.pageSize"
:total="page.totalCount"
layout="sizes,total,->,prev,pager,next,jumper"
></el-pagination> -->
<edit-dialog
<edit-dialog
:isVisible=
"editVisible"
:isVisible=
"editVisible"
:editData=
"editData"
:editData=
"editData"
...
@@ -37,7 +19,7 @@
...
@@ -37,7 +19,7 @@
<
script
>
<
script
>
import
{
RoleList
,
RoleDetail
}
from
'@/api/sys.account'
import
{
RoleList
,
RoleDetail
}
from
'@/api/sys.account'
import
notice
from
'@/common/notice'
//
import notice from '@/common/notice'
import
{
mapActions
}
from
'vuex'
import
{
mapActions
}
from
'vuex'
import
{
BaseData
}
from
'@/common/constants'
import
{
BaseData
}
from
'@/common/constants'
export
default
{
export
default
{
...
@@ -50,7 +32,7 @@ export default {
...
@@ -50,7 +32,7 @@ export default {
// 新增/编辑弹窗
// 新增/编辑弹窗
editVisible
:
false
,
editVisible
:
false
,
// 表格
// 表格
tableData
:
[]
,
pagination
:
false
,
tableColumns
:
Object
.
freeze
([
tableColumns
:
Object
.
freeze
([
{
{
label
:
'角色名称'
,
label
:
'角色名称'
,
...
@@ -65,19 +47,13 @@ export default {
...
@@ -65,19 +47,13 @@ export default {
prop
:
'createTime'
prop
:
'createTime'
}
}
])
])
// page: {
// // 页码
// pageCount: 1, // 每页条数
// pageSize: 10, // 页码
// total: 100
// }
}
}
},
},
mounted
()
{
mounted
()
{
this
.
fetchData
()
//
this.fetchData()
this
.
$event
.
$on
(
'e-role-dialog-close'
,
async
isReload
=>
{
this
.
$event
.
$on
(
'e-role-dialog-close'
,
async
isReload
=>
{
if
(
isReload
)
{
if
(
isReload
)
{
this
.
fetchData
()
this
.
getList
()
const
{
roles
}
=
await
RoleList
()
const
{
roles
}
=
await
RoleList
()
this
.
set
({
name
:
BaseData
.
ROLE
.
KEY
,
value
:
roles
})
this
.
set
({
name
:
BaseData
.
ROLE
.
KEY
,
value
:
roles
})
}
}
...
@@ -88,29 +64,8 @@ export default {
...
@@ -88,29 +64,8 @@ export default {
methods
:
{
methods
:
{
...
mapActions
(
'd2admin/base'
,
[
'set'
]),
...
mapActions
(
'd2admin/base'
,
[
'set'
]),
fetchData
()
{
getList
()
{
this
.
loadRoleList
()
this
.
$refs
.
table
.
getList
(
''
,
'roles'
,
RoleList
)
},
loadRoleList
()
{
RoleList
()
.
then
(({
roles
})
=>
{
this
.
tableData
=
roles
})
.
catch
(()
=>
{
notice
.
errorTips
()
})
},
// 页码
handleSizeChange
(
value
)
{
this
.
page
.
pageSize
=
value
// 调接口
this
.
loadRoleList
()
},
handleCurrentChange
(
value
)
{
this
.
page
.
pageCount
=
value
// 调接口
this
.
loadRoleList
()
},
},
async
handleEdit
(
row
)
{
async
handleEdit
(
row
)
{
this
.
editData
=
row
&&
await
RoleDetail
({
roleId
:
row
.
roleId
})
this
.
editData
=
row
&&
await
RoleDetail
({
roleId
:
row
.
roleId
})
...
...
src/views/userManage/user/index.vue
View file @
9b0b9c1
...
@@ -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=
"请输入用户名/姓名/联系电话"
@
clear=
"
load
UserList"
clearable
></el-input>
<el-input
v-model=
"searchForm.userName"
placeholder=
"请输入用户名/姓名/联系电话"
@
clear=
"
get
UserList"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"所属公司:"
>
<el-form-item
label=
"所属公司:"
>
<el-input
v-model=
"searchForm.companyName"
placeholder=
"请输入公司名"
@
clear=
"
load
UserList"
clearable
></el-input>
<el-input
v-model=
"searchForm.companyName"
placeholder=
"请输入公司名"
@
clear=
"
get
UserList"
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=
"请选择"
@
clear=
"
load
UserList"
>
<el-select
v-model=
"searchForm.roleId"
clearable
placeholder=
"请选择"
@
clear=
"
get
UserList"
>
<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=
"请选择状态"
@
clear=
"
load
UserList"
>
<el-select
v-model=
"searchForm.usedStatus"
clearable
placeholder=
"请选择状态"
@
clear=
"
get
UserList"
>
<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=
"请选择"
@
clear=
"
load
UserList"
>
<el-select
v-model=
"searchForm.stationCode"
clearable
placeholder=
"请选择"
@
clear=
"
get
UserList"
>
<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=
"请选择"
@
clear=
"
load
UserList"
>
<el-select
v-model=
"searchForm.postCode"
clearable
placeholder=
"请选择"
@
clear=
"
get
UserList"
>
<el-option
<el-option
:label=
"post.confValue"
:label=
"post.confValue"
:value=
"post.confCode"
:value=
"post.confCode"
...
@@ -59,39 +59,17 @@
...
@@ -59,39 +59,17 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<d2-table-header
title=
"用户列表"
><auth-button
category=
"action"
label=
"创建用户"
></auth-button></d2-table-header>
<d2-table-header
title=
"用户列表"
><auth-button
category=
"action"
label=
"创建用户"
></auth-button></d2-table-header>
<el-table
:data=
"tableData"
v-loading=
"$store.state.d2admin.loading.value"
:highlight-current-row=
"true"
border
:stripe=
"true"
>
<d2-table
<el-table-column
align=
"center"
width=
"60px"
label=
"序号"
type=
"index"
:index=
"index=>index+(page.pageSize - 1) * page.pageCount + 1"
></el-table-column>
ref=
"table"
<el-table-column
label=
"用户名"
prop=
"loginName"
width=
"200"
align=
"center"
></el-table-column>
:tableColumns=
"tableColumns"
<el-table-column
label=
"角色"
prop=
"roleName"
width=
"140"
align=
"center"
></el-table-column>
tableOption=
true
<el-table-column
label=
"注册时间"
prop=
"registerTime"
width=
"200"
align=
"center"
></el-table-column>
:tag=
"tag"
<el-table-column
label=
"有效期"
prop=
"validTime"
width=
"200"
align=
"center"
></el-table-column>
:mapping=
"mapping"
<el-table-column
label=
"状态"
prop=
"status"
width=
"100"
align=
"center"
>
@
handlePage=
"getUserList"
<template
slot-scope=
"scope"
>
@
handleEdit=
"handleEdit"
<el-tag
:type=
"tag.type[scope.row.status]"
>
{{
tag
.
label
[
scope
.
row
.
status
]
}}
</el-tag>
@
handleVerify=
"handleVerify"
</
template
>
@
handleOperation=
"handleOperation"
</el-table-column>
></d2-table>
<el-table-column
label=
"姓名"
prop=
"userName"
width=
"120"
align=
"center"
></el-table-column>
<el-table-column
label=
"联系电话"
prop=
"mobile"
width=
"200"
align=
"center"
></el-table-column>
<el-table-column
label=
"所属公司"
prop=
"companyName"
width=
"200"
align=
"center"
></el-table-column>
<el-table-column
label=
"部门"
prop=
"departName"
width=
"200"
align=
"center"
></el-table-column>
<el-table-column
label=
"职务"
prop=
"postName"
width=
"200"
align=
"center"
></el-table-column>
<el-table-column
label=
"所属站点"
prop=
"stationName"
width=
"200"
align=
"center"
></el-table-column>
<el-table-column
align=
"center"
fixed=
"right"
width=
"230"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<auth-button
:mapping=
"mapping"
:data=
"scope.row"
></auth-button>
</
template
>
</el-table-column>
</el-table>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"page.pageSize"
:page-sizes=
"[10,20,30,40]"
:page-size=
"page.pageCount"
:total=
"page.totalCount"
layout=
"sizes,total,->,prev,pager,next,jumper"
></el-pagination>
<dialog-reg
:isVisible=
"registerDialogVisible"
:editData=
"editData"
:key=
"key"
/>
<dialog-reg
:isVisible=
"registerDialogVisible"
:editData=
"editData"
:key=
"key"
/>
</d2-container>
</d2-container>
</
template
>
</
template
>
...
@@ -149,13 +127,53 @@ export default {
...
@@ -149,13 +127,53 @@ export default {
},
},
searchTimes
:
[],
searchTimes
:
[],
// 表格
// 表格
tableData
:
[],
// tableData: [],
page
:
{
tableColumns
:
[{
// 页码
label
:
'用户名'
,
pageCount
:
10
,
prop
:
'loginName'
,
pageSize
:
1
,
width
:
'200'
totalCount
:
0
// 总条数
},
{
},
label
:
'角色'
,
prop
:
'roleName'
,
width
:
'140'
},
{
label
:
'注册时间'
,
prop
:
'registerTime'
,
width
:
'200'
},
{
label
:
'有效期'
,
prop
:
'validTime'
,
width
:
'200'
},
{
label
:
'状态'
,
prop
:
'status'
,
width
:
'100'
,
tagLabel
:
true
},
{
label
:
'姓名'
,
prop
:
'userName'
,
width
:
'120'
},
{
label
:
'联系电话'
,
prop
:
'mobile'
,
width
:
'200'
},
{
label
:
'所属公司'
,
prop
:
'companyName'
,
width
:
'200'
},
{
label
:
'部门'
,
prop
:
'departName'
,
width
:
'200'
},
{
label
:
'职务'
,
prop
:
'postName'
,
width
:
'200'
},
{
label
:
'所属站点'
,
prop
:
'stationName'
,
width
:
'200'
}],
/* -----------------------基础数据---------------------- */
/* -----------------------基础数据---------------------- */
baseData
:
{
baseData
:
{
// 所属站点
// 所属站点
...
@@ -170,7 +188,7 @@ export default {
...
@@ -170,7 +188,7 @@ export default {
watch
:
{
watch
:
{
'searchTimes'
(
value
)
{
'searchTimes'
(
value
)
{
!
value
&&
this
.
load
UserList
()
!
value
&&
this
.
get
UserList
()
},
},
'$store.state.d2admin.base.role'
(
value
)
{
'$store.state.d2admin.base.role'
(
value
)
{
this
.
baseData
.
roles
=
value
this
.
baseData
.
roles
=
value
...
@@ -182,7 +200,7 @@ export default {
...
@@ -182,7 +200,7 @@ export default {
this
.
fetchData
()
this
.
fetchData
()
this
.
$event
.
$on
(
'e-reg-dialog-close'
,
isReload
=>
{
this
.
$event
.
$on
(
'e-reg-dialog-close'
,
isReload
=>
{
this
.
registerDialogVisible
=
false
this
.
registerDialogVisible
=
false
isReload
&&
this
.
load
UserList
()
isReload
&&
this
.
get
UserList
()
})
})
},
},
...
@@ -191,7 +209,6 @@ export default {
...
@@ -191,7 +209,6 @@ export default {
// 加载业务所需所有数据
// 加载业务所需所有数据
fetchData
()
{
fetchData
()
{
this
.
loadBaseData
()
this
.
loadBaseData
()
this
.
loadUserList
()
},
},
async
loadBaseData
()
{
async
loadBaseData
()
{
...
@@ -203,31 +220,14 @@ export default {
...
@@ -203,31 +220,14 @@ export default {
},
},
/* 接口请求-start */
/* 接口请求-start */
getParams
()
{
getParams
()
{
let
startTime
=
''
let
endTime
=
''
if
(
this
.
searchTimes
&&
this
.
searchTimes
.
length
)
{
[
startTime
,
endTime
]
=
this
.
searchTimes
startTime
=
`
${
startTime
}
00:00:00`
endTime
=
`
${
endTime
}
23:59:59`
}
return
{
return
{
...
this
.
page
,
...
this
.
searchForm
,
...
this
.
searchForm
,
startTime
,
...
util
.
formatTime
(
this
.
searchTimes
)
endTime
}
}
},
},
load
UserList
()
{
get
UserList
()
{
const
params
=
this
.
getParams
()
const
params
=
this
.
getParams
()
UserList
(
params
)
this
.
$refs
.
table
.
getList
(
params
,
'userList'
,
UserList
)
.
then
(
res
=>
{
const
{
pagination
,
userList
}
=
res
this
.
tableData
=
userList
this
.
page
=
pagination
})
.
catch
(()
=>
{
notice
.
errorTips
()
})
},
},
filterTag
(
value
,
row
)
{
filterTag
(
value
,
row
)
{
return
row
.
status
===
value
return
row
.
status
===
value
...
@@ -242,16 +242,7 @@ export default {
...
@@ -242,16 +242,7 @@ export default {
this
.
openDialog
(
row
)
this
.
openDialog
(
row
)
},
},
async
handleSearch
()
{
async
handleSearch
()
{
this
.
loadUserList
()
this
.
getUserList
()
},
// 页码
handleSizeChange
(
value
)
{
this
.
page
.
pageCount
=
value
this
.
loadUserList
()
},
handleCurrentChange
(
value
)
{
this
.
page
.
pageSize
=
value
this
.
loadUserList
()
},
},
handleEdit
(
row
)
{
handleEdit
(
row
)
{
row
=
util
.
deepClone
(
row
)
row
=
util
.
deepClone
(
row
)
...
@@ -275,13 +266,13 @@ export default {
...
@@ -275,13 +266,13 @@ export default {
},
},
// ------------
// ------------
// 列表各种操作
// 列表各种操作
async
handleOperation
(
row
,
e
)
{
async
handleOperation
(
{
row
,
e
}
)
{
const
_actionText
=
e
.
target
.
innerText
const
_actionText
=
e
.
target
.
innerText
const
res
=
await
this
.
apiMapping
[
_actionText
]({
userId
:
row
.
userId
})
const
res
=
await
this
.
apiMapping
[
_actionText
]({
userId
:
row
.
userId
})
const
{
operateStatus
}
=
res
const
{
operateStatus
}
=
res
if
(
operateStatus
)
{
if
(
operateStatus
)
{
notice
.
okTips
(
`
${
_actionText
}
成功!`
)
notice
.
okTips
(
`
${
_actionText
}
成功!`
)
this
.
load
UserList
()
this
.
get
UserList
()
}
else
{
}
else
{
notice
.
errorTips
(
`
${
_actionText
}
失败!`
)
notice
.
errorTips
(
`
${
_actionText
}
失败!`
)
}
}
...
...
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