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
1d6cc928
Commit
1d6cc928
authored
Aug 01, 2023
by
吴志坤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
draw
parent
584b2985
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
450 additions
and
263 deletions
+450
-263
draw.js
src/api/equipment/draw.js
+9
-0
draw.vue
src/views/equipment/draw.vue
+73
-43
draw.vue
src/views/processManagement/draw.vue
+368
-220
No files found.
src/api/equipment/draw.js
View file @
1d6cc928
import
request
from
'@/utils/request'
import
{
id
}
from
'html-webpack-plugin/lib/chunksorter'
// 查询基础信息列表
export
function
listWbApply
(
query
)
{
return
request
({
...
...
@@ -33,3 +34,11 @@ export function batchAddition(data) {
}
})
}
// 根据id查询基础信息接口
export
function
detail
(
id
)
{
return
request
({
url
:
'/wbapply/detail/'
+
id
,
method
:
'get'
})
}
src/views/equipment/draw.vue
View file @
1d6cc928
...
...
@@ -32,20 +32,22 @@
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-select
v-model=
"queryParams.pstatus"
placeholder=
"请选择状态"
clearable
size=
"small"
style=
"width: 150px"
>
<el-option
v-for=
"dict in statusOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
/>
</el-select>
<el-form-item
label=
"状态"
prop=
"pstatus"
>
<el-select
v-model=
"queryParams.pstatus"
placeholder=
"请选择状态"
clearable
size=
"small"
style=
"width: 150px"
>
<el-option
v-for=
"dict in statusOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
...
...
@@ -187,7 +189,8 @@
</el-row>
</el-form>
<el-table
v-loading=
"loadingDetail"
border
:data=
"detailApplyList"
@
selection-change=
"handleSelectionChange"
>
<!-- apply详情-->
<el-table
v-if=
"applyStatus === '1'"
v-loading=
"loadingDetail"
border
:data=
"applyList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
/>
<el-table-column
label=
"pn"
prop=
"pn"
>
...
...
@@ -232,43 +235,41 @@
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"totalDetail>0"
:total=
"totalDetail"
:page
.
sync=
"queryParams.page"
:limit
.
sync=
"queryParams.rows"
@
pagination=
"getDeviceList"
/
>
<!-- <pagination-->
<!-- v-show="totalDetail>0"-->
<!-- :total="totalDetail"-->
<!-- :page.sync="queryParams.page"-->
<!-- :limit.sync="queryParams.rows"-->
<!-- @pagination="getDeviceList"-->
<!-- />--
>
</el-dialog>
<!-- TODO: 处理 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"openHandle"
width=
"1200px"
append-to-body
>
<el-form
ref=
"queryForm
"
style=
"padding: 0 0 0 10px"
:model=
"queryParams
"
:inline=
"true"
>
<el-form
ref=
"queryForm
Warehouse"
style=
"padding: 0 0 0 10px"
:model=
"queryParamsDetail
"
:inline=
"true"
>
<el-form-item
label=
"pn"
prop=
"pn"
>
<el-input
v-model=
"queryParams.pn"
v-model=
"queryParams
Detail
.pn"
placeholder=
"请输入pn"
clearable
:maxlength=
"30"
size=
"small"
style=
"width: 150px"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"
phd"
prop=
"phdStr
"
>
<el-form-item
label=
"
lot"
prop=
"lot
"
>
<el-input
v-model=
"queryParams
.phdStr
"
placeholder=
"请输入
phd
"
v-model=
"queryParams
Detail.lot
"
placeholder=
"请输入
lot
"
clearable
size=
"small"
style=
"width: 150px"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"p
rank"
prop=
"prankStr
"
>
<el-form-item
label=
"p
location"
prop=
"plocation
"
>
<el-input
v-model=
"queryParams
.prankStr
"
placeholder=
"请输入p
rank
"
v-model=
"queryParams
Detail.plocation
"
placeholder=
"请输入p
location
"
clearable
size=
"small"
style=
"width: 150px"
...
...
@@ -276,8 +277,8 @@
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQuery
Detail
"
>
查询
</el-button>
<el-button
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery
Detail
"
>
重置
</el-button>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQuery
Warehouse
"
>
查询
</el-button>
<el-button
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery
Warehouse
"
>
重置
</el-button>
</el-form-item>
</el-form>
...
...
@@ -344,13 +345,14 @@
</div>
</template>
<
script
>
import
{
listWbApply
,
deleteLogical
,
detailList
,
batchAddition
}
from
'@/api/equipment/draw'
import
{
listWbApply
,
deleteLogical
,
detailList
,
batchAddition
,
detail
}
from
'@/api/equipment/draw'
import
{
parseTime
}
from
'@/utils'
import
{
title
}
from
'@/settings'
export
default
{
name
:
'Role'
,
data
()
{
return
{
totalApplyDetail
:
0
,
applyList
:
[],
canceList
:
[],
applyId
:
''
,
multipleSelection
:
[],
...
...
@@ -432,7 +434,7 @@ export default {
ptype
:
1
,
delFlag
:
0
},
// 查询
apply_detail
的参数
// 查询
warehouse
的参数
queryParamsDetail
:
{
page
:
1
,
rows
:
10
,
...
...
@@ -448,7 +450,9 @@ export default {
children
:
'children'
,
label
:
'label'
},
deptOptions
:
[]
deptOptions
:
[],
// 判断状态显示表单
applyStatus
:
''
}
},
/** 路由离开前存储筛选条件*/
...
...
@@ -474,6 +478,7 @@ export default {
},
methods
:
{
handleCance
()
{
this
.
loadingDetail
=
true
console
.
log
(
'multipleSelection'
,
this
.
multipleSelection
)
if
(
this
.
multipleSelection
.
length
===
0
)
{
this
.
$message
.
warning
(
'请至少选择一个要处理的设备'
)
...
...
@@ -495,14 +500,20 @@ export default {
})
console
.
log
(
'canceList'
,
this
.
canceList
)
batchAddition
(
this
.
canceList
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
console
.
log
(
'res'
,
res
)
if
(
res
.
code
===
200
)
{
this
.
loadingDetail
=
false
this
.
openHandle
=
false
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
()
}
})
}
},
/** 查询
apply_detail
列表 */
/** 查询
warehouse
列表 */
getDeviceList
()
{
this
.
loadingDetail
=
true
detailList
(
this
.
queryParams
).
then
(
res
=>
{
detailList
(
this
.
queryParams
Detail
).
then
(
res
=>
{
res
.
rows
.
createDate
=
parseTime
(
res
.
rows
.
createDate
,
'{y}-{m}-{d}'
)
this
.
totalDetail
=
res
.
total
this
.
detailApplyList
=
res
.
rows
...
...
@@ -523,11 +534,20 @@ export default {
},
// 获取所选行详情信息
handleDetail
(
row
)
{
const
id
=
row
.
businessId
this
.
openDetails
=
true
this
.
singleDetails
=
row
this
.
title
=
'详情'
this
.
openDetails
=
!
this
.
openDetails
detail
(
id
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
res
.
data
.
createDate
=
parseTime
(
res
.
data
.
createDate
,
'{y}-{m}-{d}'
)
// this.totalApplyDetail = res.total
this
.
applyList
=
res
.
data
.
wbApplyDetailList
this
.
applyStatus
=
res
.
data
.
pstatus
this
.
loadingDetail
=
false
})
},
/** 查询
基础信息
列表 */
/** 查询
apply
列表 */
getList
()
{
this
.
loading
=
true
listWbApply
(
this
.
queryParams
).
then
(
...
...
@@ -573,6 +593,11 @@ export default {
}
this
.
resetForm
(
'form'
)
},
// warehouse查询
handleQueryWarehouse
()
{
this
.
queryParamsDetail
.
page
=
1
this
.
getDeviceList
()
},
/** 查询按钮操作 */
handleQuery
()
{
this
.
queryParams
.
page
=
1
...
...
@@ -584,6 +609,11 @@ export default {
this
.
resetForm
(
'queryForm'
)
this
.
handleQuery
()
},
// warehouse的重置按钮
resetQueryWarehouse
()
{
this
.
resetForm
(
'queryFormWarehouse'
)
this
.
handleQueryWarehouse
()
},
// 多选框选中数据
handleSelectionChange
:
function
(
selection
)
{
this
.
multipleSelection
=
selection
...
...
src/views/processManagement/draw.vue
View file @
1d6cc928
...
...
@@ -32,6 +32,22 @@
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"pstatus"
>
<el-select
v-model=
"queryParams.pstatus"
placeholder=
"请选择状态"
clearable
size=
"small"
style=
"width: 150px"
>
<el-option
v-for=
"dict in statusOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
...
...
@@ -39,7 +55,7 @@
</el-form>
<div
class=
"placeholder"
/>
<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=
"equipmentapplyList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
/>
<el-table-column
label=
"pn"
prop=
"pn"
>
...
...
@@ -59,13 +75,14 @@
</el-table-column>
<el-table-column
label=
"pgx"
prop=
"pgx"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
pgx
||
'-'
}}
<span
v-if=
"scope.row.pgx === '001'"
>
压缩
</span>
<span
v-if=
"scope.row.pgx === '002'"
>
排水
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"pissb"
prop=
"pissb"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.pissb === '0'"
>
否
</span>
<span
v-else
>
是
</span>
<span
v-else
>
是
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"状态"
prop=
"pstatus"
>
...
...
@@ -74,24 +91,30 @@
<span
v-else
style=
"color: green"
>
已完成
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"
操作员
"
prop=
"createName"
>
<el-table-column
label=
"
申请人
"
prop=
"createName"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
createName
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"
操作
时间"
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"updateDate"
width=
"200px"
>
<el-table-column
label=
"
申请
时间"
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"updateDate"
width=
"200px"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
updateDate
|
transformDateByFormat
(
'YYYY-MM-DD HH:mm'
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
class-name=
"small-padding fixed-width"
width=
"
15
0px"
>
<el-table-column
label=
"操作"
class-name=
"small-padding fixed-width"
width=
"
20
0px"
>
<
template
slot-scope=
"scope"
>
<el-button
v-if=
"scope.row.pstatus === '0'"
size=
"mini"
type=
"text"
style=
"color: #49cec9"
@
click=
"handle
Update
(scope.row)"
@
click=
"handle(scope.row)"
>
处理
</el-button>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleDetail(scope.row)"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
...
...
@@ -110,58 +133,247 @@
@
pagination=
"getList"
/>
<!-- 添加或修改设备基本信息配置对话框 -->
<el-dialog
title=
"设备基本信息"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
size=
"small"
label-width=
"80px"
>
<!-- TODO: 详情 -->
<el-dialog
class=
"aboutSingleDetails"
:title=
"title"
:visible
.
sync=
"openDetails"
width=
"1200px"
append-to-body
>
<el-form
ref=
"formDetails"
:model=
"singleDetails"
size=
"small"
label-width=
"90px"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"pn:"
prop=
"pn"
>
<el-input
v-model
.
trim=
"singleDetails.pn"
:readonly=
"true"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"phd:"
prop=
"phd"
>
<el-input
v-model
.
trim=
"singleDetails.phd"
:readonly=
"true"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"prank:"
prop=
"prank"
>
<el-input
v-model
.
trim=
"singleDetails.prank"
:readonly=
"true"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"pgx:"
prop=
"pgx"
>
<el-input
v-model
.
trim=
"singleDetails.pgx"
:readonly=
"true"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"pissb:"
prop=
"pissb"
>
<el-input
v-model
.
trim=
"singleDetails.pissb"
:readonly=
"true"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"状态:"
prop=
"pstatus"
>
<
template
>
<span
v-if=
"singleDetails.pstatus === '0'"
style=
"color: red"
>
未完成
</span>
<span
v-else
style=
"color: green"
>
已完成
</span>
</
template
>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"申请人:"
prop=
"createName"
>
<el-input
v-model
.
trim=
"singleDetails.createName"
:readonly=
"true"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
" 申请时间:"
prop=
"createDate"
>
<el-input
v-model
.
trim=
"singleDetails.createDate"
:readonly=
"true"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- apply详情-->
<el-table
v-if=
"applyStatus === '1'"
v-loading=
"loadingDetail"
border
:data=
"applyList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
/>
<el-table-column
label=
"pn"
prop=
"pn"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
pn
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"lot"
prop=
"lot"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
lot
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"plocation"
prop=
"plocation"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
plocation
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"prank"
prop=
"prank"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
prank
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"pzl"
prop=
"pzl"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
pzl
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"phd"
prop=
"phd"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
phd
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"psm"
prop=
"psm"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
psm
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"pissb"
prop=
"pissb"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.pissb === '0'"
>
否
</span>
<span
v-else
>
是
</span>
</
template
>
</el-table-column>
</el-table>
<!-- <pagination-->
<!-- v-show="totalDetail>0"-->
<!-- :total="totalDetail"-->
<!-- :page.sync="queryParams.page"-->
<!-- :limit.sync="queryParams.rows"-->
<!-- @pagination="getDeviceList"-->
<!-- />-->
</el-dialog>
<!-- TODO: 处理 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"openHandle"
width=
"1200px"
append-to-body
>
<el-form
ref=
"queryFormWarehouse"
style=
"padding: 0 0 0 10px"
:model=
"queryParamsDetail"
:inline=
"true"
>
<el-form-item
label=
"pn"
prop=
"pn"
>
<el-input
v-model
.
trim=
"form.pn"
show-word-limit
:maxlength=
"30"
placeholder=
"请输入pn"
/>
</el-form-item>
<el-form-item
label=
"ptype"
prop=
"ptype"
>
<el-input
v-model
.
trim=
"form.ptype"
show-word-limit
:maxlength=
"30"
placeholder=
"请输入ptype"
/>
</el-form-item>
<el-form-item
label=
"pgx"
prop=
"pgx"
>
<el-input-number
v-model=
"form.pgx"
style=
"width: 100%"
controls-position=
"right"
:min=
"0"
placeholder=
"请输入pgx"
/>
</el-form-item>
<el-form-item
label=
"prank"
prop=
"prank"
>
<el-input-number
v-model=
"form.prank"
style=
"width: 100%"
controls-position=
"right"
:min=
"0"
placeholder=
"请输入prank"
/>
<el-input
v-model=
"queryParamsDetail.pn"
placeholder=
"请输入pn"
clearable
:maxlength=
"30"
size=
"small"
style=
"width: 150px"
/>
</el-form-item>
<el-form-item
label=
"
pissb"
prop=
"pissb
"
>
<el-
selec
t
v-model=
"
form.pissb
"
placeholder=
"请
选择pissb
"
<el-form-item
label=
"
lot"
prop=
"lot
"
>
<el-
inpu
t
v-model=
"
queryParamsDetail.lot
"
placeholder=
"请
输入lot
"
clearable
size=
"small"
style=
"width: 150px"
>
<el-option
v-for=
"dict in statusOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
/>
</el-select>
/>
</el-form-item>
<el-form-item
label=
"psm"
prop=
"psm"
>
<el-input-number
v-model=
"form.psm"
style=
"width: 100%"
controls-position=
"right"
:min=
"0"
placeholder=
"请输入psm"
/>
<el-form-item
label=
"plocation"
prop=
"plocation"
>
<el-input
v-model=
"queryParamsDetail.plocation"
placeholder=
"请输入plocation"
clearable
size=
"small"
style=
"width: 150px"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"psy"
prop=
"psy"
>
<el-input-number
v-model=
"form.psy"
style=
"width: 100%"
controls-position=
"right"
:min=
"0"
placeholder=
"请输入psy"
/>
<el-form-item>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQueryWarehouse"
>
查询
</el-button>
<el-button
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQueryWarehouse"
>
重置
</el-button>
</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>
<el-table
v-loading=
"loadingDetail"
border
:data=
"detailApplyList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
/>
<el-table-column
label=
"pn"
prop=
"pn"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
pn
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"lot"
prop=
"lot"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
lot
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"plocation"
prop=
"plocation"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
plocation
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"prank"
prop=
"prank"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
prank
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"pzl"
prop=
"pzl"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
pzl
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"phd"
prop=
"phd"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
phd
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"psm"
prop=
"psm"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
psm
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"pissb"
prop=
"pissb"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.pissb === '0'"
>
否
</span>
<span
v-else
>
是
</span>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"totalDetail>0"
:total=
"totalDetail"
:page
.
sync=
"queryParams.page"
:limit
.
sync=
"queryParams.rows"
@
pagination=
"getDeviceList"
/>
<div
style=
"float: right;padding:3px 15px;"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"handleCance"
>
确定
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
listWbApply
,
deleteLogical
}
from
'@/api/equipment/draw'
import
{
listWbApply
,
deleteLogical
,
detailList
,
batchAddition
,
detail
}
from
'@/api/equipment/draw'
import
{
parseTime
}
from
'@/utils'
export
default
{
name
:
'Role'
,
data
()
{
return
{
totalApplyDetail
:
0
,
applyList
:
[],
canceList
:
[],
applyId
:
''
,
multipleSelection
:
[],
detailApplyList
:
[],
deviceList
:
[],
// TODO: 表单里的单项详情参数
singleDetails
:
{
pn
:
''
,
phd
:
''
,
prank
:
''
,
pgx
:
''
,
pissb
:
''
,
pstatus
:
''
,
createName
:
''
,
createTime
:
''
},
// 是否显示弹出层(申请处理)
openHandle
:
false
,
// 是否显示弹出层(数据详情)
openDetails
:
false
,
loadingDetail
:
false
,
// 遮罩层
loading
:
true
,
// 选中数组
...
...
@@ -172,6 +384,8 @@ export default {
multiple
:
true
,
// 总条数
total
:
0
,
// apply_detail的总条数
totalDetail
:
0
,
// 设备申请表格数据
equipmentapplyList
:
[],
// 弹出层标题
...
...
@@ -191,39 +405,25 @@ export default {
// 状态数据字典
statusOptions
:
[
{
dictLabel
:
'
是
'
,
dictLabel
:
'
已完成
'
,
dictValue
:
'1'
},
{
dictLabel
:
'
否
'
,
dictLabel
:
'
未完成
'
,
dictValue
:
'0'
}
],
// 数据范围选项
dataScopeOptions
:
[
{
value
:
'1'
,
label
:
'全部数据权限'
},
{
value
:
'2'
,
label
:
'自定数据权限'
},
// pissb数据字典
pissbOptions
:
[
{
value
:
'3'
,
label
:
'本部门数据权限'
},
{
value
:
'4'
,
label
:
'本部门及以下数据权限'
dictLabel
:
'是'
,
dictValue
:
'1'
},
{
value
:
'5
'
,
label
:
'仅本人数据权限
'
dictLabel
:
'否
'
,
dictValue
:
'0
'
}
],
// 部门列表
tOptions
:
[],
// 查询参数
queryParams
:
{
page
:
1
,
...
...
@@ -234,37 +434,25 @@ export default {
ptype
:
2
,
delFlag
:
0
},
// 查询warehouse的参数
queryParamsDetail
:
{
page
:
1
,
rows
:
10
,
pn
:
undefined
,
lot
:
undefined
,
plocation
:
undefined
,
ptype
:
1
,
delFlag
:
0
},
// 表单参数
form
:
{},
defaultProps
:
{
children
:
'children'
,
label
:
'label'
},
// 表单校验
rules
:
{
pn
:
[
{
required
:
true
,
message
:
'请输入pn'
,
trigger
:
'blur'
}
],
ptype
:
[
{
required
:
true
,
message
:
'请输入ptype'
,
trigger
:
'blur'
}
],
pgx
:
[
{
required
:
true
,
message
:
'请输入pgx'
,
trigger
:
'blur'
}
],
prank
:
[
{
required
:
true
,
message
:
'请输入prank'
,
trigger
:
'blur'
}
],
pissb
:
[
{
required
:
true
,
message
:
'请输入pissb'
,
trigger
:
'blur'
}
],
psm
:
[
{
required
:
true
,
message
:
'请输入psm'
,
trigger
:
'blur'
}
],
psy
:
[
{
required
:
true
,
message
:
'请输入psy'
,
trigger
:
'blur'
}
]
},
deptOptions
:
[]
deptOptions
:
[],
// 判断状态显示表单
applyStatus
:
''
}
},
/** 路由离开前存储筛选条件*/
...
...
@@ -289,18 +477,77 @@ export default {
// });
},
methods
:
{
getFontColor
(
state
)
{
if
(
state
===
1
)
{
return
'已完成'
}
else
if
(
state
===
'待审核'
)
{
return
'color: orange;'
}
else
if
(
state
===
'已通过'
)
{
return
'color: green;'
handleCance
()
{
this
.
loadingDetail
=
true
console
.
log
(
'multipleSelection'
,
this
.
multipleSelection
)
if
(
this
.
multipleSelection
.
length
===
0
)
{
this
.
$message
.
warning
(
'请至少选择一个要处理的设备'
)
}
else
{
return
''
this
.
canceList
=
[]
this
.
multipleSelection
.
forEach
(
item
=>
{
console
.
log
(
'item'
,
item
)
const
obj
=
{
applyId
:
this
.
applyId
,
pn
:
item
.
pn
,
pzl
:
item
.
pzl
,
lot
:
item
.
lot
,
plocation
:
item
.
plocation
,
phd
:
item
.
phd
,
psm
:
item
.
psm
,
prank
:
item
.
prank
}
this
.
canceList
.
push
(
obj
)
})
console
.
log
(
'canceList'
,
this
.
canceList
)
batchAddition
(
this
.
canceList
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
if
(
res
.
code
===
200
)
{
this
.
loadingDetail
=
false
this
.
openHandle
=
false
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
()
}
})
}
},
/** 查询基础信息列表 */
/** 查询warehouse列表 */
getDeviceList
()
{
this
.
loadingDetail
=
true
detailList
(
this
.
queryParamsDetail
).
then
(
res
=>
{
res
.
rows
.
createDate
=
parseTime
(
res
.
rows
.
createDate
,
'{y}-{m}-{d}'
)
this
.
totalDetail
=
res
.
total
this
.
detailApplyList
=
res
.
rows
this
.
loadingDetail
=
false
})
},
handle
(
row
)
{
this
.
applyId
=
row
.
businessId
this
.
title
=
'处理'
this
.
openHandle
=
!
this
.
openHandle
this
.
loadingDetail
=
true
detailList
(
this
.
queryParamsDetail
).
then
(
res
=>
{
res
.
rows
.
createDate
=
parseTime
(
res
.
rows
.
createDate
,
'{y}-{m}-{d}'
)
this
.
totalDetail
=
res
.
total
this
.
detailApplyList
=
res
.
rows
this
.
loadingDetail
=
false
})
},
// 获取所选行详情信息
handleDetail
(
row
)
{
const
id
=
row
.
businessId
this
.
openDetails
=
true
this
.
singleDetails
=
row
this
.
title
=
'详情'
detail
(
id
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
res
.
data
.
createDate
=
parseTime
(
res
.
data
.
createDate
,
'{y}-{m}-{d}'
)
// this.totalApplyDetail = res.total
this
.
applyList
=
res
.
data
.
wbApplyDetailList
this
.
applyStatus
=
res
.
data
.
pstatus
this
.
loadingDetail
=
false
})
},
/** 查询apply列表 */
getList
()
{
this
.
loading
=
true
listWbApply
(
this
.
queryParams
).
then
(
...
...
@@ -311,77 +558,6 @@ export default {
}
)
},
/** 查询菜单树结构 */
getMenuTreeselect
()
{
menuTreeselect
().
then
(
response
=>
{
this
.
menuOptions
=
response
.
data
})
},
/** 查询菜单列表 */
getMenuList
(
roleId
)
{
roleMenuTreeselectMC
(
roleId
).
then
(
response
=>
{
this
.
menuList
=
this
.
handleTree
(
response
.
data
.
menus
,
'businessId'
)
this
.
loading
=
false
})
},
/** 查询部门树结构 */
getDeptTreeselect
()
{
deptTreeselect
().
then
(
response
=>
{
this
.
deptOptions
=
response
.
data
})
},
// 所有菜单节点数据
getMenuAllCheckedKeys
()
{
// 目前被选中的菜单节点
const
checkedKeys
=
this
.
$refs
.
menu
.
getHalfCheckedKeys
()
// 半选中的菜单节点
const
halfCheckedKeys
=
this
.
$refs
.
menu
.
getCheckedKeys
()
checkedKeys
.
unshift
.
apply
(
checkedKeys
,
halfCheckedKeys
)
return
checkedKeys
},
// 所有部门节点数据
getDeptAllCheckedKeys
()
{
// 目前被选中的部门节点
const
checkedKeys
=
this
.
$refs
.
dept
.
getHalfCheckedKeys
()
// // 半选中的部门节点
const
halfCheckedKeys
=
this
.
$refs
.
dept
.
getCheckedKeys
()
checkedKeys
.
unshift
.
apply
(
checkedKeys
,
halfCheckedKeys
)
return
this
.
$refs
.
dept
.
getCheckedKeys
()
},
/** 根据角色ID查询菜单树结构 */
getRoleMenuTreeselect
(
roleId
)
{
return
roleMenuTreeselect
(
roleId
).
then
(
response
=>
{
this
.
menuOptions
=
response
.
data
.
menus
return
response
})
},
/** 根据角色ID和菜单ID查询部门树结构 */
getRoleDeptTreeselect
(
roleId
,
menuId
)
{
return
roleDeptTreeselect
(
roleId
,
menuId
).
then
(
response
=>
{
this
.
form
.
deptCheckStrictly
=
response
.
data
.
deptCheckStrictly
this
.
deptOptions
=
response
.
data
.
depts
this
.
form
.
dataScope
=
this
.
dataScopeOptions
[
response
.
data
.
dataScope
-
1
].
value
return
response
})
},
// 角色状态修改
handleStatusChange
(
row
)
{
const
text
=
row
.
flag
===
'1'
?
'启用'
:
'停用'
this
.
$confirm
(
'确认要"'
+
text
+
'""'
+
row
.
roleName
+
'"角色吗?'
,
'警告'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
function
()
{
return
changeRoleStatus
(
row
.
businessId
,
row
.
flag
)
}).
then
(()
=>
{
this
.
$message
({
message
:
text
+
'成功'
,
type
:
'success'
})
}).
catch
(
function
()
{
row
.
flag
=
row
.
flag
===
'0'
?
'1'
:
'0'
})
},
// 取消按钮
cancel
()
{
this
.
open
=
false
...
...
@@ -417,6 +593,11 @@ export default {
}
this
.
resetForm
(
'form'
)
},
// warehouse查询
handleQueryWarehouse
()
{
this
.
queryParamsDetail
.
page
=
1
this
.
getDeviceList
()
},
/** 查询按钮操作 */
handleQuery
()
{
this
.
queryParams
.
page
=
1
...
...
@@ -428,11 +609,14 @@ export default {
this
.
resetForm
(
'queryForm'
)
this
.
handleQuery
()
},
// warehouse的重置按钮
resetQueryWarehouse
()
{
this
.
resetForm
(
'queryFormWarehouse'
)
this
.
handleQueryWarehouse
()
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
roleId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
handleSelectionChange
:
function
(
selection
)
{
this
.
multipleSelection
=
selection
},
// 树权限(父子联动)
handleCheckedTreeConnect
(
value
,
type
)
{
...
...
@@ -464,54 +648,6 @@ export default {
}
}
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
()
this
.
getMenuTreeselect
()
this
.
open
=
true
this
.
title
=
'添加角色'
},
/** 修改按钮操作 */
// handleUpdate(row) {
// this.reset()
// const roleId = row.businessId || this.ids
// const roleMenu = this.getRoleMenuTreeselect(roleId)
// getRole(roleId).then(response => {
// this.form = response.data
// this.open = true
// this.getMenuTreeselect(roleId)
// this.$nextTick(() => {
// roleMenu.then(res => {
// this.$refs.menu.setCheckedKeys(res.data.checkedKeys)
// })
// })
// this.title = '修改角色'
// })
// },
/** 提交按钮 */
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
businessId
!==
undefined
)
{
this
.
form
.
menuIds
=
this
.
getMenuAllCheckedKeys
()
// eslint-disable-next-line no-undef
updateBasicInfo
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
'修改成功'
)
this
.
open
=
false
this
.
getList
()
})
}
else
{
this
.
form
.
menuIds
=
this
.
getMenuAllCheckedKeys
()
// eslint-disable-next-line no-undef
addBasicInfo
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
'新增成功'
)
this
.
open
=
false
this
.
getList
()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
id
=
row
.
businessId
...
...
@@ -532,6 +668,18 @@ export default {
}
</
script
>
<
style
lang=
"scss"
scoped
>
.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%
;
}
}
}
.app-container
{
font-size
:
18px
;
padding
:
0
;
...
...
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