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
9f6590f1
Commit
9f6590f1
authored
Jul 29, 2023
by
刘宇扬
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/project1' into project1
parents
82b3a3ab
f201124b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
125 deletions
+55
-125
basicInfo.js
src/api/equipment/basicInfo.js
+8
-39
basicInfo.vue
src/views/equipment/basicInfo.vue
+37
-80
draw.vue
src/views/equipment/draw.vue
+5
-3
draw.vue
src/views/processManagement/draw.vue
+5
-3
No files found.
src/api/equipment/basicInfo.js
View file @
9f6590f1
import
request
from
'@/utils/request'
import
Qs
from
'qs'
// 查询基础信息列表
export
function
listBasicInfo
(
query
)
{
return
request
({
...
...
@@ -8,57 +7,27 @@ export function listBasicInfo(query) {
params
:
query
})
}
export
function
getlistRole
()
{
return
request
({
url
:
'system/role/listAll'
,
method
:
'get'
})
}
// 查询角色详细
export
function
getRole
(
businessId
)
{
return
request
({
url
:
'/system/role/detail/'
+
businessId
,
method
:
'get'
})
}
// 新增角色
export
function
addRole
(
data
)
{
data
=
Qs
.
stringify
(
data
)
// 新增设备基本信息
export
function
add
(
data
)
{
return
request
({
url
:
'/
system/role
/add'
,
url
:
'/
wbbaseinfo
/add'
,
method
:
'post'
,
data
:
data
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
}
// 修改角色
export
function
updateRole
(
data
)
{
const
businessId
=
data
.
businessId
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/system/role/update/'
+
businessId
,
method
:
'put'
,
data
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
'Content-Type'
:
'application/json;charset=UTF-8'
}
})
}
// 角色数据权限
export
function
dataScope
(
data
)
{
data
=
Qs
.
stringify
(
data
)
// 修改基础信息接口
export
function
updataInfo
(
data
)
{
return
request
({
url
:
'/
system/role/dataScop
e'
,
url
:
'/
wbbaseinfo/updat
e'
,
method
:
'put'
,
data
,
headers
:
{
'Content-Type'
:
'application/
x-www-form-urlencoded
'
'Content-Type'
:
'application/
json;charset=UTF-8
'
}
})
}
...
...
src/views/equipment/basicInfo.vue
View file @
9f6590f1
...
...
@@ -34,7 +34,7 @@
</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
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
<div
style=
"float: right;padding:3px 15px;"
>
<el-button
...
...
@@ -49,7 +49,7 @@
<div
class=
"placeholder"
/>
<div
style=
"padding:5px 10px"
>
<div
class=
"mb12 font-small-bold"
>
设备基本信息列表
</div>
<el-table
v-loading=
"loading"
border
:data=
"basicInfoList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
border
:data=
"basicInfoList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
/>
<el-table-column
label=
"pn"
prop=
"pn"
>
<template
slot-scope=
"scope"
>
...
...
@@ -73,7 +73,8 @@
</el-table-column>
<el-table-column
label=
"pissb"
prop=
"pissb"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
prank
||
'-'
}}
<span
v-if=
"scope.row.pissb === '0'"
>
否
</span>
<span
v-else
>
是
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"psm"
prop=
"psm"
>
...
...
@@ -123,7 +124,7 @@
/>
<!-- 添加或修改设备基本信息配置对话框 -->
<el-dialog
title=
"设备基本信息"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
:close-on-click-modal=
"false"
@
close=
"cancel"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
size=
"small"
label-width=
"80px"
>
<el-form-item
label=
"pn"
prop=
"pn"
>
<el-input
v-model
.
trim=
"form.pn"
show-word-limit
:maxlength=
"30"
placeholder=
"请输入pn"
/>
...
...
@@ -132,10 +133,10 @@
<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-input
v-model
.
trim=
"form.pgx"
show-word-limit
:maxlength=
"3
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
.
trim=
"form.prank"
show-word-limit
:maxlength=
"3
0"
placeholder=
"请输入prank"
/>
</el-form-item>
<el-form-item
label=
"pissb"
prop=
"pissb"
>
<el-select
...
...
@@ -154,10 +155,10 @@
</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-input
v-model
.
trim=
"form.psm"
show-word-limit
:maxlength=
"3
0"
placeholder=
"请输入psm"
/>
</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-input
v-model
.
trim=
"form.psy"
show-word-limit
:maxlength=
"3
0"
placeholder=
"请输入psy"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -169,20 +170,8 @@
</template>
<
script
>
// import {
// addRole,
// changeRoleStatus,
// dataScope,
// delRole,
// exportRole,
// getRole,
// listBasicInfo,
// updateRole
// } from '@/api/equipment/basicInfo'
import
{
roleMenuTreeselect
,
roleMenuTreeselectMC
,
treeselect
as
menuTreeselect
}
from
'@/api/system/menu'
import
{
roleDeptTreeselect
,
treeselect
as
deptTreeselect
}
from
'@/api/system/dept'
import
{
listBasicInfo
}
from
'@/api/equipment/basicInfo'
// import { getRolesByInsId } from '../../../api/businessManage/template'
import
{
add
,
listBasicInfo
,
updataInfo
}
from
'@/api/equipment/basicInfo'
import
{
parseTime
}
from
'@/utils'
export
default
{
name
:
'Role'
,
data
()
{
...
...
@@ -255,7 +244,8 @@ export default {
rows
:
10
,
pn
:
undefined
,
ptype
:
undefined
,
pgx
:
undefined
pgx
:
undefined
,
delFlag
:
0
},
// 表单参数
form
:
{},
...
...
@@ -315,33 +305,13 @@ export default {
/** 查询基础信息列表 */
getList
()
{
this
.
loading
=
true
listBasicInfo
(
this
.
queryParams
).
then
(
response
=>
{
this
.
basicInfoList
=
response
.
rows
this
.
total
=
response
.
total
this
.
loading
=
false
}
)
},
/** 查询菜单树结构 */
getMenuTreeselect
()
{
menuTreeselect
().
then
(
response
=>
{
this
.
menuOptions
=
response
.
data
})
},
/** 查询菜单列表 */
getMenuList
(
roleId
)
{
roleMenuTreeselectMC
(
roleId
).
then
(
response
=>
{
this
.
menuList
=
this
.
handleTree
(
response
.
data
.
menus
,
'businessId'
)
listBasicInfo
(
this
.
queryParams
).
then
(
res
=>
{
res
.
rows
.
createDate
=
parseTime
(
res
.
rows
.
createDate
,
'{y}-{m}-{d}'
)
this
.
total
=
res
.
total
this
.
basicInfoList
=
res
.
rows
this
.
loading
=
false
})
},
/** 查询部门树结构 */
getDeptTreeselect
()
{
deptTreeselect
().
then
(
response
=>
{
this
.
deptOptions
=
response
.
data
})
},
// 所有菜单节点数据
getMenuAllCheckedKeys
()
{
// 目前被选中的菜单节点
...
...
@@ -376,24 +346,6 @@ export default {
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
...
...
@@ -478,10 +430,8 @@ export default {
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
()
this
.
getMenuTreeselect
()
this
.
open
=
true
this
.
title
=
'添加
角色
'
this
.
title
=
'添加
设备基础信息表单
'
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
...
...
@@ -502,23 +452,30 @@ export default {
},
/** 提交按钮 */
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
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
()
updataInfo
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
open
=
false
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
()
this
.
reFrom
()
}
else
if
(
res
.
code
===
null
)
{
this
.
$message
.
error
(
res
.
message
)
}
})
}
else
{
this
.
form
.
menuIds
=
this
.
getMenuAllCheckedKeys
()
// eslint-disable-next-line no-undef
addBasicInfo
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
'新增成功'
)
this
.
open
=
false
this
.
getList
()
add
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
open
=
false
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
()
this
.
reFrom
()
}
else
if
(
res
.
code
===
null
)
{
this
.
$message
.
error
(
res
.
message
)
}
})
}
}
...
...
src/views/equipment/draw.vue
View file @
9f6590f1
...
...
@@ -34,7 +34,7 @@
</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
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<div
class=
"placeholder"
/>
...
...
@@ -64,7 +64,8 @@
</el-table-column>
<el-table-column
label=
"pissb"
prop=
"pissb"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
pissb
||
'-'
}}
<span
v-if=
"scope.row.pissb === '0'"
>
否
</span>
<span
v-else
>
是
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"状态"
prop=
"pstatus"
>
...
...
@@ -244,7 +245,8 @@ export default {
pn
:
undefined
,
lot
:
undefined
,
plocation
:
undefined
,
ptype
:
1
ptype
:
1
,
delFlag
:
0
},
// 表单参数
form
:
{},
...
...
src/views/processManagement/draw.vue
View file @
9f6590f1
...
...
@@ -34,7 +34,7 @@
</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
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<div
class=
"placeholder"
/>
...
...
@@ -64,7 +64,8 @@
</el-table-column>
<el-table-column
label=
"pissb"
prop=
"pissb"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
pissb
||
'-'
}}
<span
v-if=
"scope.row.pissb === '0'"
>
否
</span>
<span
v-else
>
是
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"状态"
prop=
"pstatus"
>
...
...
@@ -244,7 +245,8 @@ export default {
pn
:
undefined
,
lot
:
undefined
,
plocation
:
undefined
,
ptype
:
2
ptype
:
2
,
delFlag
:
0
},
// 表单参数
form
:
{},
...
...
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