Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨硕
template_vue
Commits
533b64d0
Commit
533b64d0
authored
Jul 28, 2023
by
刘宇扬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
库存管理
parent
c4634bc9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
624 additions
and
60 deletions
+624
-60
magnagement.js
src/api/magnagement.js
+11
-0
boundManagement.vue
src/views/equipment/boundManagement.vue
+517
-0
check.vue
src/views/equipment/check.vue
+0
-1
draw.vue
src/views/equipment/draw.vue
+1
-1
management.vue
src/views/equipment/management.vue
+93
-56
index.vue
src/views/system/role/index.vue
+2
-2
No files found.
src/api/magnagement.js
0 → 100644
View file @
533b64d0
import
request
from
'@/utils/request'
// 查询设备列表
export
function
listdevice
(
query
)
{
return
request
({
url
:
'/wbwarehouse/queryWbWarehouseByPagination'
,
method
:
'get'
,
params
:
query
})
}
src/views/equipment/boundManagement.vue
0 → 100644
View file @
533b64d0
<
template
>
<div
class=
"app-container"
>
<!-- TODO: 基础设备管理-->
<el-form
ref=
"queryForm"
style=
"padding: 0 0 0 10px"
:model=
"queryParams"
:inline=
"true"
>
<el-form-item
label=
"设备名称"
prop=
"roleName"
>
<el-input
v-model=
"queryParams.deviceName"
placeholder=
"请输入设备名称"
clearable
:maxlength=
"30"
size=
"small"
style=
"width: 150px"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"设备编码"
prop=
"roleKey"
>
<el-input
v-model=
"queryParams.deviceId"
placeholder=
"请输入设备编码"
clearable
size=
"small"
style=
"width: 150px"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
size=
"small"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
查询
</el-button>
</el-form-item>
<div
style=
"float: right"
>
<el-form-item>
<el-button
style=
"padding: 8px 7px;"
:type=
"typePrimary"
:size=
"smallSize"
:icon=
"addIcon"
@
click=
"handleAdd"
>
{{
application
}}
</el-button>
</el-form-item>
</div>
</el-form>
<div
class=
"placeholder"
/>
<!-- TODO: 中间的分隔符号 -->
<div
style=
"padding:5px 10px"
>
<!-- TODO: 以下为基础设备管理列表 -->
<div
class=
"mb12 font-small-bold"
>
设备领用列表
</div>
<el-table
v-loading=
"loading"
border
:data=
"roleList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
/>
<!--
<el-table-column
label=
"设备名称"
prop=
"deviceName"
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
deviceName
||
'-'
}}
</
template
>
</el-table-column>
-->
<el-table-column
label=
"设备编码"
prop=
"deviceId"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
deviceId
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"LOT"
prop=
"LOT"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
deviceId
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"位置"
prop=
"location"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
location
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"厚度"
prop=
"ply"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
ply
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作员"
prop=
"createBy"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
createBy
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"createTime"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
createTime
|
transformDateByFormat
(
'YYYY-MM-DD HH:mm'
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"状态"
prop=
"state"
>
<
template
slot-scope=
"scope"
>
<span
:style=
"getFontColor(scope.row.state)"
>
{{
scope
.
row
.
state
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
class-name=
"small-padding fixed-width"
width=
"140px"
>
<
template
slot-scope=
"scope"
>
<el-button
v-if=
"scope.row.state !== '已驳回'"
:type=
"typeParent"
:size=
"size"
@
click=
"handleDetail(scope.row)"
>
详情
</el-button>
<el-button
v-if=
"scope.row.state === '已驳回'"
:type=
"typeParent"
:size=
"size"
@
click=
"handleUpdate(scope.row)"
>
{{
updataName
}}
</el-button>
<el-button
v-if=
"scope.row.state !== ' '"
:type=
"typeParent"
:size=
"size"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
<el-pagination
background
layout=
"prev, pager, next"
:total=
"1000"
/>
<!-- TODO: 添加或修改设备配置对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
size=
"small"
label-width=
"80px"
>
<el-form-item
label=
"设备名称"
prop=
"deviceName"
>
<el-input
v-model
.
trim=
"form.deviceName"
show-word-limit
:maxlength=
"30"
placeholder=
"请输入设备名称"
/>
</el-form-item>
<el-form-item
label=
"设备编码"
prop=
"deviceId"
>
<el-input
v-model
.
trim=
"form.deviceId"
show-word-limit
:maxlength=
"30"
placeholder=
"请输入设备编码"
/>
</el-form-item>
<el-form-item
label=
"LOT"
prop=
"LOT"
>
<el-input
v-model
.
trim=
"form.LOT"
show-word-limit
:maxlength=
"30"
placeholder=
"请输入LOT"
/>
</el-form-item>
<el-form-item
label=
"位置"
prop=
"location"
>
<el-input
v-model
.
trim=
"form.location"
show-word-limit
:maxlength=
"30"
placeholder=
"请输入设备编码"
/>
</el-form-item>
<el-form-item
label=
"厚度"
prop=
"ply"
>
<el-input
v-model
.
trim=
"form.ply"
show-word-limit
:maxlength=
"30"
placeholder=
"请输入设备编码"
/>
</el-form-item>
<el-form-item
label=
"操作员"
prop=
"createBy"
>
<el-input
v-model
.
trim=
"form.createBy"
:maxlength=
"30"
show-word-limit
placeholder=
"请输入创建人"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
</div>
</el-dialog>
<!-- TODO: 单项详情信息表单配置 -->
<el-dialog
class=
"aboutSingleDetails"
:title=
"title"
:visible
.
sync=
"openDetails"
width=
"700px"
append-to-body
>
<el-form
ref=
"formDetails"
:model=
"singleDetails"
size=
"small"
label-width=
"90px"
>
<el-form-item
label=
"名称:"
prop=
"deviceName"
>
<el-input
v-model
.
trim=
"singleDetails.deviceName"
:readonly=
"isReadOnly"
/>
</el-form-item>
<el-form-item
label=
"设备编码:"
prop=
"deviceId"
>
<el-input
v-model
.
trim=
"singleDetails.deviceId"
:readonly=
"isReadOnly"
/>
</el-form-item>
<el-form-item
label=
"LOT: "
prop=
"LOT"
>
<el-input
v-model
.
trim=
"singleDetails.LOT"
:readonly=
"isReadOnly"
/>
</el-form-item>
<el-form-item
label=
"位置:"
prop=
"location"
>
<el-input
v-model
.
trim=
"singleDetails.location"
:readonly=
"isReadOnly"
/>
</el-form-item>
<el-form-item
label=
"位置:"
prop=
"ply"
>
<el-input
v-model
.
trim=
"singleDetails.ply"
:readonly=
"isReadOnly"
/>
</el-form-item>
<el-form-item
label=
"创建时间:"
prop=
"createTime"
>
<el-input
v-model
.
trim=
"singleDetails.createTime"
:readonly=
"isReadOnly"
/>
</el-form-item>
<el-form-item
label=
"创建人:"
prop=
"createBy"
>
<el-input
v-model
.
trim=
"singleDetails.createBy"
:readonly=
"isReadOnly"
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"state"
>
<el-input
v-model
.
trim=
"singleDetails.state"
:readonly=
"isReadOnly"
/>
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
<
script
>
export
default
{
name
:
'Role'
,
data
()
{
return
{
typeParent
:
'text'
,
typePrimary
:
'primary'
,
typeSuccess
:
'success'
,
nameParent
:
'删除'
,
resetName
:
'重置'
,
addName
:
'新增'
,
application
:
'申请领用'
,
updataName
:
'修改'
,
size
:
'mini'
,
smallSize
:
'small'
,
delicon
:
'el-icon-delete'
,
addIcon
:
'el-icon-plus'
,
exportIcon
:
'el-icon-download'
,
resetIcon
:
''
,
// TODO: 控制只读
isReadOnly
:
true
,
// 遮罩层
loading
:
true
,
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 总条数
total
:
0
,
// 角色表格数据
roleList
:
[],
// 弹出层标题
title
:
''
,
// 是否显示弹出层
open
:
false
,
// 是否显示弹出层(数据详情)
openDetails
:
false
,
// 日期范围
// dateRange: [],
// 菜单表格数据
menuList
:
[],
menuExpand
:
false
,
menuNodeAll
:
false
,
deptExpand
:
true
,
deptNodeAll
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
deviceName
:
undefined
,
deviceId
:
undefined
,
LOT
:
undefined
,
location
:
undefined
,
ply
:
undefined
,
state
:
undefined
,
flag
:
undefined
},
defaultProps
:
{},
// TODO: 表单参数
form
:
{
deviceName
:
''
,
deviceId
:
''
,
LOT
:
''
,
location
:
''
,
ply
:
''
,
state
:
''
,
flag
:
'1'
,
remark
:
''
,
createTime
:
new
Date
(),
updataTime
:
new
Date
(),
createBy
:
''
},
// TODO: 表单初始参数
formReset
:
{
deviceName
:
''
,
deviceId
:
''
,
LOT
:
''
,
location
:
''
,
ply
:
''
,
state
:
''
,
flag
:
'1'
,
createTime
:
new
Date
(),
updataTime
:
new
Date
(),
createBy
:
''
},
// TODO: 表单里的单项详情参数
singleDetails
:
{
deviceName
:
''
,
deviceId
:
''
,
LOT
:
''
,
location
:
''
,
ply
:
''
,
state
:
''
,
flag
:
'1'
,
createTime
:
new
Date
(),
updataTime
:
new
Date
(),
createBy
:
''
},
// TODO: 模拟测试数据
simulateDeviceList
:
[{
deviceName
:
'设备1'
,
deviceId
:
'0001'
,
flag
:
1
,
LOT
:
'0001'
,
location
:
'XXX'
,
ply
:
'YYY'
,
createTime
:
new
Date
(),
updataTime
:
new
Date
(),
createBy
:
'admin'
,
state
:
'已驳回'
},
{
deviceName
:
'设备2'
,
deviceId
:
'0002'
,
flag
:
2
,
LOT
:
'0002'
,
location
:
'XXX'
,
ply
:
'YYY'
,
createTime
:
new
Date
(),
updataTime
:
new
Date
(),
createBy
:
'admin'
,
state
:
'已驳回'
},
{
deviceName
:
'设备3'
,
deviceId
:
'0003'
,
flag
:
2
,
LOT
:
'0003'
,
location
:
'XXX'
,
ply
:
'YYY'
,
createTime
:
new
Date
(),
updataTime
:
new
Date
(),
createBy
:
'admin'
,
state
:
'已驳回'
},
{
deviceName
:
'设备4'
,
deviceId
:
'0004'
,
flag
:
2
,
LOT
:
'0004'
,
location
:
'XXX'
,
ply
:
'YYY'
,
createTime
:
new
Date
(),
updataTime
:
new
Date
(),
createBy
:
'admin'
,
state
:
'已驳回'
},
{
deviceName
:
'设备5'
,
deviceId
:
'0005'
,
flag
:
2
,
LOT
:
'0005'
,
location
:
'XXX'
,
ply
:
'YYY'
,
createTime
:
new
Date
(),
updataTime
:
new
Date
(),
createBy
:
'admin'
,
state
:
'待审核'
},
{
deviceName
:
'设备6'
,
deviceId
:
'0006'
,
flag
:
2
,
LOT
:
'0006'
,
location
:
'XXX'
,
ply
:
'YYY'
,
createTime
:
new
Date
(),
updataTime
:
new
Date
(),
createBy
:
'admin'
,
state
:
'待审核'
},
{
deviceName
:
'设备7'
,
deviceId
:
'0007'
,
flag
:
2
,
LOT
:
'0007'
,
location
:
'XXX'
,
ply
:
'YYY'
,
createTime
:
new
Date
(),
updataTime
:
new
Date
(),
createBy
:
'admin'
,
state
:
'待审核'
},
{
deviceName
:
'设备8'
,
deviceId
:
'0008'
,
flag
:
2
,
LOT
:
'0008'
,
location
:
'XXX'
,
ply
:
'YYY'
,
createTime
:
new
Date
(),
updataTime
:
new
Date
(),
createBy
:
'admin'
,
state
:
'待审核'
},
{
deviceName
:
'设备9'
,
deviceId
:
'0009'
,
flag
:
2
,
LOT
:
'0009'
,
location
:
'XXX'
,
ply
:
'YYY'
,
createTime
:
new
Date
(),
updataTime
:
new
Date
(),
createBy
:
'admin'
,
state
:
'已通过'
},
{
deviceName
:
'设备10'
,
deviceId
:
'00010'
,
flag
:
2
,
LOT
:
'0010'
,
location
:
'XXX'
,
ply
:
'YYY'
,
createTime
:
new
Date
(),
updataTime
:
new
Date
(),
createBy
:
'admin'
,
state
:
'已通过'
}
],
// 表单校验
rules
:
{
deviceName
:
[
{
required
:
true
,
message
:
'请输入设备名称'
,
trigger
:
'blur'
}
],
deviceId
:
[
{
required
:
true
,
message
:
'请输入设备编码'
,
trigger
:
'blur'
}
],
LOT
:
[
{
required
:
true
,
message
:
'请输入LOT'
,
trigger
:
'blur'
}
],
createBy
:
[
{
required
:
true
,
message
:
'请输入申请人'
,
trigger
:
'blur'
}
]
},
deptOptions
:
[]
}
},
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
$store
.
dispatch
(
'searchSave/searchParamsSet'
,
{
path
:
this
.
$route
.
path
,
param
:
{
...
this
.
queryParams
}
})
next
()
},
created
()
{
if
(
this
.
$store
.
getters
.
searchParams
[
this
.
$route
.
path
])
{
const
{
searchParams
}
=
this
.
$store
.
getters
;
const
{
path
}
=
this
.
$route
const
param
=
JSON
.
parse
(
searchParams
[
path
])
// 保留着的查询条件
this
.
queryParams
=
{
...
param
}
}
this
.
getList
()
},
methods
:
{
getFontColor
(
state
)
{
if
(
state
===
'已驳回'
)
{
return
'color: red;'
}
else
if
(
state
===
'待审核'
)
{
return
'color: orange;'
}
else
if
(
state
===
'已通过'
)
{
return
'color: green;'
}
else
{
return
''
}
},
/** 查询角色列表 */
getList
()
{
this
.
loading
=
true
this
.
roleList
=
this
.
simulateDeviceList
console
.
log
(
this
.
roleList
)
this
.
loading
=
false
},
// 取消按钮
cancel
()
{
this
.
open
=
false
this
.
reset
()
},
// 表单重置
reset
()
{
// TODO: 将模拟数据的空对象赋值给表单对象,达成清空填写表单的效果
this
.
form
=
{
deviceName
:
''
,
deviceId
:
''
,
location
:
''
,
ply
:
''
,
state
:
''
,
flag
:
'1'
,
createTime
:
new
Date
(),
updataTime
:
new
Date
(),
createBy
:
''
}
},
/** TODO: 查询按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
this
.
getList
()
},
/** TODO: 重置按钮操作 */
resetQuery
()
{},
// 多选框选中数据
handleSelectionChange
(
selection
)
{},
/** TODO: 新增按钮操作 */
handleAdd
()
{
// TODO: 初始化新增对话框的状态
this
.
reset
()
this
.
title
=
'申请领用设备'
this
.
open
=
!
this
.
open
},
// TODO: 获取所选行详情信息操作
handleDetail
(
row
)
{
this
.
singleDetails
=
this
.
formReset
this
.
singleDetails
=
row
this
.
title
=
'详情信息'
this
.
openDetails
=
!
this
.
openDetails
},
/** TODO: 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
()
this
.
title
=
'修改申请'
const
upddeviceName
=
row
.
deviceName
for
(
const
pd
of
this
.
simulateDeviceList
)
{
if
(
pd
.
deviceName
===
upddeviceName
)
{
this
.
form
=
pd
}
}
this
.
open
=
true
},
/** TODO: 修改或增加list列表里的数据 */
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
// TODO: 模拟测试数据的修改,可删除
for
(
const
p
of
this
.
simulateDeviceList
)
{
if
(
p
.
deviceName
===
this
.
form
.
deviceName
)
{
this
.
simulateDeviceList
=
this
.
simulateDeviceList
.
map
(
obj
=>
obj
.
deviceName
===
this
.
form
.
deviceName
?
this
.
form
:
obj
)
this
.
msgSuccess
(
'申请成功'
)
this
.
getList
()
this
.
reset
()
this
.
open
=
!
this
.
open
return
}
else
{
if
(
this
.
form
!==
undefined
&&
this
.
form
!==
null
)
{
this
.
simulateDeviceList
.
push
(
this
.
form
)
this
.
msgSuccess
(
'申请成功'
)
this
.
getList
()
this
.
reset
()
this
.
open
=
!
this
.
open
return
}
}
}
}
})
},
/** TODO: 关于模拟数据的 删除list数组所调用的删除方法,封装的函数如下 */
delDevice
(
delDeviceName
)
{
let
tip
=
false
for
(
const
pd0
of
this
.
simulateDeviceList
)
{
console
.
log
(
'This is pd0:'
,
pd0
)
if
(
pd0
.
deviceName
===
delDeviceName
)
{
this
.
simulateDeviceList
=
this
.
simulateDeviceList
.
filter
(
item
=>
item
.
deviceName
!==
delDeviceName
)
tip
=
true
break
}
}
return
tip
},
/** TODO:删除按钮操作 */
handleDelete
(
row
)
{
this
.
$confirm
(
'是否确认操作?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
return
this
.
delDevice
(
row
.
deviceName
)
}).
then
(()
=>
{
this
.
getList
()
this
.
$message
({
message
:
'删除成功'
,
type
:
'success'
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消删除'
})
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.app-container
{
font-size
:
18px
;
padding
:
0
;
.placeholder
{
height
:
1
.3vh
;
background-color
:
#F4F4F4
;
margin-bottom
:
10px
}
.table-drop
{
vertical-align
:
2px
;
line-height
:
20px
;
margin-left
:
15px
}
.el-switch
{
margin-left
:
15px
;
}
}
.el-divider--vertical
{
height
:
12em
;
width
:
4px
;
}
.aboutSingleDetails
{
.el-form-item
{
.el-input
>>>
.el-input__inner
{
-webkit-appearance
:
none
;
background-color
:
#FFF
;
background-image
:
none
;
border-radius
:
4px
;
border
:
0
;
width
:
100%
;
}
}
}
</
style
>
src/views/equipment/check.vue
View file @
533b64d0
...
@@ -178,7 +178,6 @@ import {
...
@@ -178,7 +178,6 @@ import {
delRole
,
delRole
,
exportRole
,
exportRole
,
getRole
,
getRole
,
listRole
,
updateRole
updateRole
}
from
'@/api/system/role'
}
from
'@/api/system/role'
import
{
listCheck
}
from
'@/api/equipment/check'
import
{
listCheck
}
from
'@/api/equipment/check'
...
...
src/views/equipment/draw.vue
View file @
533b64d0
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
</el-form-item>
</el-form-item>
<div
style=
"float: right"
>
<div
style=
"float: right"
>
<el-form-item>
<el-form-item>
<el-button
style=
"padding: 8px 7px;"
:type=
"typePrimary"
:size=
"smallSize"
:icon=
"addIcon"
@
btn-
click=
"handleAdd"
>
<el-button
style=
"padding: 8px 7px;"
:type=
"typePrimary"
:size=
"smallSize"
:icon=
"addIcon"
@
click=
"handleAdd"
>
{{
application
}}
{{
application
}}
</el-button>
</el-button>
</el-form-item>
</el-form-item>
...
...
src/views/equipment/management.vue
View file @
533b64d0
...
@@ -35,22 +35,15 @@
...
@@ -35,22 +35,15 @@
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
size=
"small"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
type=
"primary"
size=
"small"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
查询
</el-button>
</el-form-item>
</el-form-item>
<div
style=
"float: right"
>
<el-form-item>
<el-button
style=
"padding: 8px 7px;"
:type=
"typePrimary"
:size=
"smallSize"
:icon=
"addIcon"
:haspermi=
"addHaspermi"
@
click=
"handleAdd"
>
{{
addName
}}
</el-button>
</el-form-item>
</div>
</el-form>
</el-form>
<div
class=
"placeholder"
/>
<div
class=
"placeholder"
/>
<div
style=
"padding:5px 10px"
>
<div
style=
"padding:5px 10px"
>
<div
class=
"mb12 font-small-bold"
>
设备管理列表
</div>
<div
class=
"mb12 font-small-bold"
>
设备管理列表
</div>
<el-table
v-loading=
"loading"
border
:data=
"equipmentList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
border
:data=
"equipmentList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"80"
/>
<el-table-column
type=
"index"
label=
"序号"
width=
"80"
/>
<el-table-column
label=
"编码"
prop=
"
equipmentCode
"
width=
"120"
>
<el-table-column
label=
"编码"
prop=
"
pn
"
width=
"120"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
equipmentCode
||
'-'
}}
{{
scope
.
row
.
pn
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"lot"
prop=
"lot"
width=
"120"
>
<el-table-column
label=
"lot"
prop=
"lot"
width=
"120"
>
...
@@ -58,9 +51,9 @@
...
@@ -58,9 +51,9 @@
{{
scope
.
row
.
lot
||
'-'
}}
{{
scope
.
row
.
lot
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"位置"
prop=
"location"
>
<el-table-column
label=
"位置"
prop=
"
p
location"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
location
||
'-'
}}
{{
scope
.
row
.
p
location
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"厚度"
prop=
"thickness"
>
<el-table-column
label=
"厚度"
prop=
"thickness"
>
...
@@ -68,14 +61,14 @@
...
@@ -68,14 +61,14 @@
{{
scope
.
row
.
thickness
||
'-'
}}
{{
scope
.
row
.
thickness
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"
操作
员"
prop=
"createBy"
>
<el-table-column
label=
"
创建
员"
prop=
"createBy"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
createBy
||
'-'
}}
{{
scope
.
row
.
createBy
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作时间"
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"create
Tim
e"
>
<el-table-column
label=
"操作时间"
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"create
Dat
e"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
create
Tim
e
|
transformDateByFormat
(
'YYYY-MM-DD HH:mm'
)
}}
</span>
<span>
{{
scope
.
row
.
create
Dat
e
|
transformDateByFormat
(
'YYYY-MM-DD HH:mm'
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
class-name=
"small-padding fixed-width"
width=
"150px"
>
<el-table-column
label=
"操作"
class-name=
"small-padding fixed-width"
width=
"150px"
>
...
@@ -83,40 +76,54 @@
...
@@ -83,40 +76,54 @@
<el-button
:type=
"typeParent"
:size=
"size"
@
click=
"handleDetail(scope.row)"
>
<el-button
:type=
"typeParent"
:size=
"size"
@
click=
"handleDetail(scope.row)"
>
详情
详情
</el-button>
</el-button>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
</div>
</div>
<pagination
<pagination
v-show=
"total
>
0"
v-show=
"total
>
0"
:total=
"total"
:total=
"total"
:page
.
sync=
"queryParams.page
Num
"
:page
.
sync=
"queryParams.page"
:limit
.
sync=
"queryParams.
pageSize
"
:limit
.
sync=
"queryParams.
rows
"
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
<!-- 添加或修改设备配置对话框 -->
<!-- 添加或修改设备配置对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
size=
"small"
label-width=
"80px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
size=
"small"
label-width=
"80px"
>
<el-form-item
label=
"
编码"
prop=
"roleKey
"
>
<el-form-item
label=
"
名称"
prop=
"roleName
"
>
<el-input
show-word-limit
:maxlength=
"30"
placeholder=
"请输入设备编码
"
/>
<el-input
v-model
.
trim=
"form.roleName"
show-word-limit
:maxlength=
"30"
placeholder=
"请输入设备名称
"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
lot"
prop=
"roleSort
"
>
<el-form-item
label=
"
设备来源"
prop=
"roleKey
"
>
<el-input
-number
style=
"width: 100%"
controls-position=
"right"
:min=
"0
"
/>
<el-input
v-model
.
trim=
"form.roleKey"
show-word-limit
:maxlength=
"30"
placeholder=
"请输入设备来源
"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
位置"
prop=
"roleName
"
>
<el-form-item
label=
"
排序"
prop=
"roleSort
"
>
<el-input
show-word-limit
:maxlength=
"30"
placeholder=
"请输入设备位置
"
/>
<el-input
-number
v-model=
"form.roleSort"
style=
"width: 100%"
controls-position=
"right"
:min=
"0
"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"厚度"
prop=
"roleName"
>
<el-form-item
label=
"设备批次"
>
<el-input
show-word-limit
:maxlength=
"30"
placeholder=
"请输入设备厚度"
/>
<!-- <el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox>-->
<!-- <el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选</el-checkbox>-->
<!-- <el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')">父子联动</el-checkbox>-->
<el-tree
ref=
"menu"
class=
"tree-border"
:data=
"menuOptions"
show-checkbox
node-key=
"id"
check-strictly
empty-text=
"加载中,请稍后"
:props=
"defaultProps"
@
check-change=
"handleMenuCheckChange"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-form-item
label=
"备注"
>
<el-input
maxlength=
"200"
show-word-limit
type=
"textarea"
placeholder=
"请输入内容"
/>
<el-input
v-model
.
trim=
"form.remark"
maxlength=
"200"
show-word-limit
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -127,20 +134,20 @@
...
@@ -127,20 +134,20 @@
<!-- TODO: 单项详情信息表单配置 -->
<!-- TODO: 单项详情信息表单配置 -->
<el-dialog
class=
"aboutSingleDetails"
:title=
"title"
:visible
.
sync=
"openDetails"
width=
"700px"
append-to-body
>
<el-dialog
class=
"aboutSingleDetails"
:title=
"title"
:visible
.
sync=
"openDetails"
width=
"700px"
append-to-body
>
<el-form
ref=
"formDetails"
:model=
"singleDetails"
size=
"small"
label-width=
"90px"
>
<el-form
ref=
"formDetails"
:model=
"singleDetails"
size=
"small"
label-width=
"90px"
>
<el-form-item
label=
"编码:"
prop=
"p
rocessName
"
>
<el-form-item
label=
"编码:"
prop=
"p
n
"
>
<el-input
v-model
.
trim=
"singleDetails.
equipmentCode
"
:readonly=
"true"
/>
<el-input
v-model
.
trim=
"singleDetails.
pn
"
:readonly=
"true"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"lot:"
prop=
"workshop"
>
<el-form-item
label=
"lot:"
prop=
"workshop"
>
<el-input
v-model
.
trim=
"singleDetails.lot"
:readonly=
"true"
/>
<el-input
v-model
.
trim=
"singleDetails.lot"
:readonly=
"true"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"位置:"
prop=
"location"
>
<el-form-item
label=
"位置:"
prop=
"
p
location"
>
<el-input
v-model
.
trim=
"singleDetails.location"
:readonly=
"true"
/>
<el-input
v-model
.
trim=
"singleDetails.
p
location"
:readonly=
"true"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"厚度:"
prop=
"thickness"
>
<el-form-item
label=
"厚度:"
prop=
"thickness"
>
<el-input
v-model
.
trim=
"singleDetails.thickness"
:readonly=
"true"
/>
<el-input
v-model
.
trim=
"singleDetails.thickness"
:readonly=
"true"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
操作时间:"
prop=
"createTim
e"
>
<el-form-item
label=
"
操作时间:"
prop=
"createDat
e"
>
{{ singleDetails.createTime | transformDateByFormat('YYYY-MM-DD HH:mm') }}
<el-input
v-model
.
trim=
"singleDetails.createDate"
:readonly=
"true"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"操作员:"
prop=
"createBy"
>
<el-form-item
label=
"操作员:"
prop=
"createBy"
>
<el-input
v-model
.
trim=
"singleDetails.createBy"
:readonly=
"true"
/>
<el-input
v-model
.
trim=
"singleDetails.createBy"
:readonly=
"true"
/>
...
@@ -151,9 +158,18 @@
...
@@ -151,9 +158,18 @@
</template>
</template>
<
script
>
<
script
>
import
{
addRole
,
changeRoleStatus
,
dataScope
,
delRole
,
exportRole
,
getRole
,
updateRole
}
from
'@/api/system/role'
import
{
import
{
roleMenuTreeselect
,
roleMenuTreeselectMC
,
treeselect
as
menuTreeselect
}
from
'@/api/system/menu'
addRole
,
import
{
roleDeptTreeselect
,
treeselect
as
deptTreeselect
}
from
'@/api/system/dept'
changeRoleStatus
,
dataScope
,
delRole
,
exportRole
,
getRole
,
updateRole
}
from
'@/api/system/role'
import
{
listdevice
}
from
'@/api/magnagement'
import
{
roleMenuTreeselect
,
roleMenuTreeselectMC
,
treeselect
as
menuTreeselect
}
from
'@/api/system/menu'
import
{
roleDeptTreeselect
,
treeselect
as
deptTreeselect
}
from
'@/api/system/dept'
// import { getRolesByInsId } from '../../../api/businessManage/template'
// import { getRolesByInsId } from '../../../api/businessManage/template'
export
default
{
export
default
{
name
:
'Role'
,
name
:
'Role'
,
...
@@ -171,14 +187,15 @@ export default {
...
@@ -171,14 +187,15 @@ export default {
},
},
// 是否显示弹出层(数据详情)
// 是否显示弹出层(数据详情)
openDetails
:
false
,
openDetails
:
false
,
// TODO: 模拟测试数据
// // TODO: 模拟测试数据
equipmentList
:
[{
equipmentCode
:
'001'
,
lot
:
'xxx'
,
location
:
'位置01'
,
thickness
:
'50'
,
createBy
:
'操作员01'
,
createTime
:
new
Date
()
},
{
equipmentCode
:
'002'
,
lot
:
'xxx'
,
location
:
'位置02'
,
thickness
:
'70'
,
createBy
:
'操作员02'
,
createTime
:
new
Date
()
},
{
equipmentCode
:
'001'
,
lot
:
'xxx'
,
location
:
'位置01'
,
thickness
:
'50'
,
createBy
:
'操作员01'
,
createTime
:
new
Date
()
},
{
equipmentCode
:
'001'
,
lot
:
'xxx'
,
location
:
'位置01'
,
thickness
:
'50'
,
createBy
:
'操作员01'
,
createTime
:
new
Date
()
},
{
equipmentCode
:
'001'
,
lot
:
'xxx'
,
location
:
'位置01'
,
thickness
:
'50'
,
createBy
:
'操作员01'
,
createTime
:
new
Date
()
},
{
equipmentCode
:
'001'
,
lot
:
'xxx'
,
location
:
'位置01'
,
thickness
:
'50'
,
createBy
:
'操作员01'
,
createTime
:
new
Date
()
},
{
equipmentCode
:
'001'
,
lot
:
'xxx'
,
location
:
'位置01'
,
thickness
:
'50'
,
createBy
:
'操作员01'
,
createTime
:
new
Date
()
},
{
equipmentCode
:
'001'
,
lot
:
'xxx'
,
location
:
'位置01'
,
thickness
:
'50'
,
createBy
:
'操作员01'
,
createTime
:
new
Date
()
},
{
equipmentCode
:
'001'
,
lot
:
'xxx'
,
location
:
'位置01'
,
thickness
:
'50'
,
createBy
:
'操作员01'
,
createTime
:
new
Date
()
},
{
equipmentCode
:
'001'
,
lot
:
'xxx'
,
location
:
'位置01'
,
thickness
:
'50'
,
createBy
:
'操作员01'
,
createTime
:
new
Date
()
}],
// equipmentList: [{ equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '002', lot: 'xxx', location: '位置02', thickness: '70', createBy: '操作员02', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }],
// check: '开始盘点',
typeParent
:
'text'
,
typeParent
:
'text'
,
typePrimary
:
'primary'
,
typePrimary
:
'primary'
,
typeSuccess
:
'success'
,
typeSuccess
:
'success'
,
nameParent
:
'删除'
,
nameParent
:
'删除'
,
resetName
:
'重置'
,
resetName
:
'重置'
,
addName
:
'
入库
'
,
addName
:
'
新增
'
,
exportName
:
'导出'
,
exportName
:
'导出'
,
updataName
:
'修改'
,
updataName
:
'修改'
,
size
:
'mini'
,
size
:
'mini'
,
...
@@ -258,11 +275,12 @@ export default {
...
@@ -258,11 +275,12 @@ export default {
tOptions
:
[],
tOptions
:
[],
// 查询参数
// 查询参数
queryParams
:
{
queryParams
:
{
page
Num
:
1
,
page
:
1
,
pageSize
:
10
,
rows
:
10
,
roleName
:
undefined
,
roleName
:
undefined
,
roleKey
:
undefined
,
roleKey
:
undefined
,
flag
:
undefined
flag
:
undefined
,
ptype
:
1
},
},
// 表单参数
// 表单参数
form
:
{
form
:
{
...
@@ -275,16 +293,17 @@ export default {
...
@@ -275,16 +293,17 @@ export default {
// 表单校验
// 表单校验
rules
:
{
rules
:
{
roleName
:
[
roleName
:
[
{
required
:
true
,
message
:
'请输入
设备
名称'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入
角色
名称'
,
trigger
:
'blur'
}
],
],
roleKey
:
[
roleKey
:
[
{
required
:
true
,
message
:
'请输入
设备来源
'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入
权限字符
'
,
trigger
:
'blur'
}
],
],
roleSort
:
[
roleSort
:
[
{
required
:
true
,
message
:
'请输入
设备
排序'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入
角色
排序'
,
trigger
:
'blur'
}
]
]
},
},
deptOptions
:
[]
deptOptions
:
[],
formData
:
{}
}
}
},
},
/** 路由离开前存储筛选条件*/
/** 路由离开前存储筛选条件*/
...
@@ -316,10 +335,27 @@ export default {
...
@@ -316,10 +335,27 @@ export default {
this
.
title
=
'详情信息'
this
.
title
=
'详情信息'
this
.
openDetails
=
!
this
.
openDetails
this
.
openDetails
=
!
this
.
openDetails
},
},
handelTab
(
i
,
e
)
{
const
that
=
this
if
(
!
that
.
$refs
[
'input'
+
i
])
{
return
}
that
.
$nextTick
(()
=>
{
e
.
target
.
blur
()
const
index
=
i
+
1
that
.
$refs
[
'input'
+
index
].
focus
()
})
},
/** 查询角色列表 */
/** 查询角色列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
this
.
loading
=
true
this
.
loading
=
false
listdevice
(
this
.
queryParams
).
then
(
response
=>
{
this
.
equipmentList
=
response
.
rows
this
.
total
=
response
.
total
this
.
loading
=
false
}
)
},
},
/** 查询菜单树结构 */
/** 查询菜单树结构 */
getMenuTreeselect
()
{
getMenuTreeselect
()
{
...
@@ -452,7 +488,7 @@ export default {
...
@@ -452,7 +488,7 @@ export default {
},
},
/** 查询按钮操作 */
/** 查询按钮操作 */
handleQuery
()
{
handleQuery
()
{
this
.
queryParams
.
page
Num
=
1
this
.
queryParams
.
page
=
1
this
.
getList
()
this
.
getList
()
},
},
/** 重置按钮操作 */
/** 重置按钮操作 */
...
@@ -502,7 +538,7 @@ export default {
...
@@ -502,7 +538,7 @@ export default {
this
.
reset
()
this
.
reset
()
this
.
getMenuTreeselect
()
this
.
getMenuTreeselect
()
this
.
open
=
true
this
.
open
=
true
this
.
title
=
'
设备入库
'
this
.
title
=
'
添加角色
'
},
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
...
@@ -518,7 +554,7 @@ export default {
...
@@ -518,7 +554,7 @@ export default {
this
.
$refs
.
menu
.
setCheckedKeys
(
res
.
data
.
checkedKeys
)
this
.
$refs
.
menu
.
setCheckedKeys
(
res
.
data
.
checkedKeys
)
})
})
})
})
this
.
title
=
'修改
设备
'
this
.
title
=
'修改
角色
'
})
})
},
},
/** 分配数据权限操作 选择菜单 */
/** 分配数据权限操作 选择菜单 */
...
@@ -553,7 +589,7 @@ export default {
...
@@ -553,7 +589,7 @@ export default {
if
(
valid
)
{
if
(
valid
)
{
this
.
form
.
menuCheckStrictly
=
false
this
.
form
.
menuCheckStrictly
=
false
if
(
this
.
form
.
businessId
!==
undefined
)
{
if
(
this
.
form
.
businessId
!==
undefined
)
{
//
this.form.menuIds = this.getMenuAllCheckedKeys()
this
.
form
.
menuIds
=
this
.
getMenuAllCheckedKeys
()
updateRole
(
this
.
form
).
then
(
response
=>
{
updateRole
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
'修改成功'
)
this
.
msgSuccess
(
'修改成功'
)
this
.
open
=
false
this
.
open
=
false
...
@@ -657,7 +693,8 @@ export default {
...
@@ -657,7 +693,8 @@ export default {
margin-left
:
15px
;
margin-left
:
15px
;
}
}
}
}
.el-divider--vertical
{
.el-divider--vertical
{
height
:
12em
;
height
:
12em
;
width
:
4px
;
width
:
4px
;
}
}
...
...
src/views/system/role/index.vue
View file @
533b64d0
...
@@ -267,8 +267,8 @@ import {
...
@@ -267,8 +267,8 @@ import {
listRole
,
listRole
,
updateRole
updateRole
}
from
'@/api/system/role'
}
from
'@/api/system/role'
import
{
roleMenuTreeselect
,
roleMenuTreeselectMC
,
treeselect
as
menuTreeselect
}
from
'@/api/system/menu'
import
{
roleMenuTreeselect
,
roleMenuTreeselectMC
,
treeselect
as
menuTreeselect
}
from
'@/api/system/menu'
import
{
roleDeptTreeselect
,
treeselect
as
deptTreeselect
}
from
'@/api/system/dept'
import
{
roleDeptTreeselect
,
treeselect
as
deptTreeselect
}
from
'@/api/system/dept'
// import { getRolesByInsId } from '../../../api/businessManage/template'
// import { getRolesByInsId } from '../../../api/businessManage/template'
export
default
{
export
default
{
name
:
'Role'
,
name
:
'Role'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment