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
6b7c2147
Commit
6b7c2147
authored
Jul 31, 2023
by
吴志坤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基础信息,两个设备申请
parent
09816a70
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
237 deletions
+64
-237
draw.js
src/api/equipment/draw.js
+3
-82
basicInfo.vue
src/views/equipment/basicInfo.vue
+7
-69
draw.vue
src/views/equipment/draw.vue
+25
-41
draw.vue
src/views/processManagement/draw.vue
+29
-45
No files found.
src/api/equipment/draw.js
View file @
6b7c2147
import
request
from
'@/utils/request'
import
Qs
from
'qs'
// 查询基础信息列表
export
function
listWbApply
(
query
)
{
return
request
({
...
...
@@ -8,88 +7,10 @@ export function listWbApply(query) {
params
:
query
})
}
export
function
getlistRole
()
{
// 逻辑删除基础信息接口
export
function
deleteLogical
(
id
)
{
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
)
return
request
({
url
:
'/system/role/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'
}
})
}
// 角色数据权限
export
function
dataScope
(
data
)
{
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/system/role/dataScope'
,
method
:
'put'
,
data
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
}
// 角色状态修改
export
function
changeRoleStatus
(
businessId
,
flag
)
{
const
data
=
{
businessId
,
flag
}
return
request
({
url
:
'/system/role/changeStatus'
,
method
:
'put'
,
params
:
data
})
}
// 删除角色
export
function
delRole
(
roleId
)
{
return
request
({
url
:
'/system/role/deleteLogical/'
+
roleId
,
url
:
'/wbapply/deleteLogical/'
+
id
,
method
:
'delete'
})
}
// 导出角色
export
function
exportRole
(
query
)
{
return
request
({
url
:
'/system/role/export'
,
method
:
'get'
,
params
:
query
,
responseType
:
'blob'
})
}
src/views/equipment/basicInfo.vue
View file @
6b7c2147
...
...
@@ -127,24 +127,21 @@
<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"
/>
</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-input
v-model
.
trim=
"form.pn"
:maxlength=
"30"
placeholder=
"请输入pn"
/>
</el-form-item>
<el-form-item
label=
"pgx"
prop=
"pgx"
>
<el-input
v-model
.
trim=
"form.pgx"
show-word-limit
:maxlength=
"30"
placeholder=
"请输入pgx"
/>
<el-input
v-model
.
trim=
"form.pgx"
:maxlength=
"30"
placeholder=
"请输入pgx"
/>
</el-form-item>
<el-form-item
label=
"prank"
prop=
"prank"
>
<el-input
v-model
.
trim=
"form.prank"
show-word-limit
:maxlength=
"30"
placeholder=
"请输入prank"
/>
<el-input
v-model
.
trim=
"form.prank"
:maxlength=
"30"
placeholder=
"请输入prank"
/>
</el-form-item>
<el-form-item
label=
"pissb"
prop=
"pissb"
>
<el-form-item
label=
"pissb"
prop=
"pissb"
>
<el-select
v-model=
"form.pissb"
placeholder=
"请选择pissb"
clearable
size=
"small"
style=
"width:
150
px"
style=
"width:
341
px"
>
<el-option
v-for=
"dict in statusOptions"
...
...
@@ -155,10 +152,10 @@
</el-select>
</el-form-item>
<el-form-item
label=
"psm"
prop=
"psm"
>
<el-input
v-model
.
trim=
"form.psm"
show-word-limit
:maxlength=
"30"
placeholder=
"请输入psm"
/>
<el-input
v-model
.
trim=
"form.psm"
:maxlength=
"30"
placeholder=
"请输入psm"
/>
</el-form-item>
<el-form-item
label=
"psy"
prop=
"psy"
>
<el-input
v-model
.
trim=
"form.psy"
show-word-limit
:maxlength=
"30"
placeholder=
"请输入psy"
/>
<el-input
v-model
.
trim=
"form.psy"
:maxlength=
"30"
placeholder=
"请输入psy"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -213,31 +210,6 @@ export default {
dictValue
:
'0'
}
],
// 数据范围选项
dataScopeOptions
:
[
{
value
:
'1'
,
label
:
'全部数据权限'
},
{
value
:
'2'
,
label
:
'自定数据权限'
},
{
value
:
'3'
,
label
:
'本部门数据权限'
},
{
value
:
'4'
,
label
:
'本部门及以下数据权限'
},
{
value
:
'5'
,
label
:
'仅本人数据权限'
}
],
// 部门列表
tOptions
:
[],
// 查询参数
queryParams
:
{
page
:
1
,
...
...
@@ -308,40 +280,6 @@ export default {
this
.
loading
=
false
})
},
// 所有菜单节点数据
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
})
},
// 取消按钮
cancel
()
{
this
.
open
=
false
...
...
src/views/equipment/draw.vue
View file @
6b7c2147
...
...
@@ -157,21 +157,7 @@
</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
{
listWbApply
}
from
'@/api/equipment/draw'
// import { getRolesByInsId } from '../../../api/businessManage/template'
import
{
listWbApply
,
deleteLogical
}
from
'@/api/equipment/draw'
export
default
{
name
:
'Role'
,
data
()
{
...
...
@@ -486,22 +472,22 @@ export default {
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
=
'修改角色'
})
},
//
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
=>
{
...
...
@@ -528,20 +514,18 @@ export default {
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
roleIds
=
row
.
businessId
||
this
.
ids
this
.
$confirm
(
'
所选择数据被删除后不可再恢复,是否继续?
'
,
'提示'
,
{
const
id
=
row
.
businessId
this
.
$confirm
(
'
是否确认操作?
'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
function
()
{
return
delRole
(
roleIds
)
}).
then
(()
=>
{
this
.
getList
()
this
.
$message
({
message
:
'删除成功'
,
type
:
'success'
}).
then
(
res
=>
{
deleteLogical
(
id
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
()
}
})
}).
catch
(
function
()
{
})
}
}
...
...
src/views/processManagement/draw.vue
View file @
6b7c2147
...
...
@@ -12,9 +12,9 @@
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"phd"
prop=
"phd"
>
<el-form-item
label=
"phd"
prop=
"phd
Str
"
>
<el-input
v-model=
"queryParams.phd"
v-model=
"queryParams.phd
Str
"
placeholder=
"请输入phd"
clearable
size=
"small"
...
...
@@ -22,9 +22,9 @@
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"prank"
prop=
"prank"
>
<el-form-item
label=
"prank"
prop=
"prank
Str
"
>
<el-input
v-model=
"queryParams.prank"
v-model=
"queryParams.prank
Str
"
placeholder=
"请输入prank"
clearable
size=
"small"
...
...
@@ -157,21 +157,7 @@
</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
{
listWbApply
}
from
'@/api/equipment/draw'
// import { getRolesByInsId } from '../../../api/businessManage/template'
import
{
listWbApply
,
deleteLogical
}
from
'@/api/equipment/draw'
export
default
{
name
:
'Role'
,
data
()
{
...
...
@@ -486,22 +472,22 @@ export default {
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
=
'修改角色'
})
},
//
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
=>
{
...
...
@@ -528,20 +514,18 @@ export default {
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
roleIds
=
row
.
businessId
||
this
.
ids
this
.
$confirm
(
'
所选择数据被删除后不可再恢复,是否继续?
'
,
'提示'
,
{
const
id
=
row
.
businessId
this
.
$confirm
(
'
是否确认操作?
'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
function
()
{
return
delRole
(
roleIds
)
}).
then
(()
=>
{
this
.
getList
()
this
.
$message
({
message
:
'删除成功'
,
type
:
'success'
}).
then
(
res
=>
{
deleteLogical
(
id
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
()
}
})
}).
catch
(
function
()
{
})
}
}
...
...
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