Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_web
Overview
Overview
Details
Activity
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
pseer
gxpt_web
Commits
62759e80
Commit
62759e80
authored
Jan 23, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加分配保洁页面
parent
d6e028dc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
256 additions
and
9 deletions
+256
-9
index.js
src/router/index.js
+15
-0
cleanConsumer.vue
src/views/system/store/cleanConsumer.vue
+7
-5
index.vue
src/views/system/store/index.vue
+12
-0
positionConsumer.vue
src/views/system/store/positionConsumer.vue
+214
-0
selectConsumer.vue
src/views/system/store/selectConsumer.vue
+8
-4
No files found.
src/router/index.js
View file @
62759e80
...
...
@@ -135,6 +135,21 @@ export const dynamicRoutes = [
]
},
{
path
:
'/share/store-position'
,
component
:
Layout
,
hidden
:
true
,
permissions
:
[
'system:store:edit'
],
children
:
[
{
path
:
'clean/:storeId(
\\
d+)'
,
component
:
()
=>
import
(
'@/views/system/store/positionConsumer'
),
name
:
'CleanConsumer'
,
meta
:
{
title
:
'分配管理员'
,
activeMenu
:
'/system/store'
}
}
]
},
{
path
:
'/system/dict-data'
,
component
:
Layout
,
hidden
:
true
,
...
...
src/views/system/store/cleanConsumer.vue
View file @
62759e80
...
...
@@ -74,7 +74,7 @@
<el-table-column
label=
"手机号"
align=
"center"
prop=
"phone"
/>
<el-table-column
label=
"角色类型"
align=
"center"
prop=
"roleType"
>
<template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.
consumer
_role_type"
:value=
"scope.row.roleType"
/>
<dict-tag
:options=
"dict.type.
wechat
_role_type"
:value=
"scope.row.roleType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"性别"
align=
"center"
prop=
"sex"
>
...
...
@@ -102,7 +102,7 @@
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<select-consumer
ref=
"select"
:storeId=
"queryParams.storeId"
@
ok=
"handleQuery"
/>
<select-consumer
ref=
"select"
:storeId=
"queryParams.storeId"
:position=
"queryParams.position"
@
ok=
"handleQuery"
/>
</div>
</template>
...
...
@@ -112,7 +112,7 @@ import selectConsumer from "./selectConsumer";
export
default
{
name
:
"CleanConsumer"
,
dicts
:
[
'sys_user_sex'
,
'consumer
_role_type'
],
dicts
:
[
'sys_user_sex'
,
'wechat
_role_type'
],
components
:
{
selectConsumer
},
data
()
{
return
{
...
...
@@ -140,6 +140,7 @@ export default {
},
created
()
{
const
storeId
=
this
.
$route
.
params
&&
this
.
$route
.
params
.
storeId
;
this
.
queryParams
.
position
=
1
;
if
(
storeId
)
{
this
.
queryParams
.
storeId
=
storeId
;
this
.
getList
();
...
...
@@ -149,6 +150,7 @@ export default {
/** 查询授权用户列表 */
getList
()
{
this
.
loading
=
true
;
this
.
queryParams
.
position
=
1
;
allocatedUserList
(
this
.
queryParams
).
then
(
response
=>
{
this
.
consumerList
=
response
.
rows
;
this
.
total
=
response
.
total
;
...
...
@@ -184,7 +186,7 @@ export default {
cancelAuthUser
(
row
)
{
const
storeId
=
this
.
queryParams
.
storeId
;
this
.
$modal
.
confirm
(
'确认要取消分配保洁员"'
+
row
.
nickName
+
'"吗?'
).
then
(
function
()
{
return
authUserCancel
({
consumerId
:
row
.
id
,
storeId
:
storeId
});
return
authUserCancel
({
consumerId
:
row
.
id
,
storeId
:
storeId
,
position
:
1
});
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"取消成功"
);
...
...
@@ -195,7 +197,7 @@ export default {
const
storeId
=
this
.
queryParams
.
storeId
;
const
consumerIds
=
this
.
consumerIds
.
join
(
","
);
this
.
$modal
.
confirm
(
'是否取消选中分配保洁员数据项?'
).
then
(
function
()
{
return
authUserCancelAll
({
storeId
:
storeId
,
consumerIds
:
consumerIds
});
return
authUserCancelAll
({
storeId
:
storeId
,
consumerIds
:
consumerIds
,
position
:
1
});
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"取消成功"
);
...
...
src/views/system/store/index.vue
View file @
62759e80
...
...
@@ -147,6 +147,14 @@
@
click=
"handleCleanConsumer(scope.row)"
v-hasPermi=
"['system:store:edit']"
>
分配保洁
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-user"
@
click=
"handlePositionConsumer(scope.row)"
v-hasPermi=
"['system:store:edit']"
>
分配管理员
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -527,6 +535,10 @@ export default {
const
storeId
=
row
.
id
;
this
.
$router
.
push
(
"/share/store-consumer/clean/"
+
storeId
);
},
handlePositionConsumer
:
function
(
row
)
{
const
storeId
=
row
.
id
;
this
.
$router
.
push
(
"/share/store-position/clean/"
+
storeId
);
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
...
...
src/views/system/store/positionConsumer.vue
0 → 100644
View file @
62759e80
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"用户昵称"
prop=
"nickName"
>
<el-input
v-model=
"queryParams.nickName"
placeholder=
"请输入用户昵称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"手机号"
prop=
"phone"
>
<el-input
v-model=
"queryParams.phone"
placeholder=
"请输入手机号"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<!--
<el-form-item
label=
"会员性别"
prop=
"sex"
>
-->
<!--
<el-input-->
<!-- v-model="queryParams.sex"-->
<!-- placeholder="请输入会员性别"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!--
</el-form-item>
-->
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"openSelectUser"
v-hasPermi=
"['system:store:add']"
>
添加管理员
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-circle-close"
size=
"mini"
:disabled=
"multiple"
@
click=
"cancelAuthUserAll"
v-hasPermi=
"['system:store:remove']"
>
批量取消
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-close"
size=
"mini"
@
click=
"handleClose"
>
关闭
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"consumerList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"账号"
align=
"center"
prop=
"account"
/>
<el-table-column
label=
"用户昵称"
align=
"center"
prop=
"nickName"
/>
<el-table-column
label=
"手机号"
align=
"center"
prop=
"phone"
/>
<el-table-column
label=
"角色类型"
align=
"center"
prop=
"roleType"
>
<template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.wechat_role_type"
:value=
"scope.row.roleType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"性别"
align=
"center"
prop=
"sex"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.sys_user_sex"
:value=
"scope.row.sex"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-circle-close"
@
click=
"cancelAuthUser(scope.row)"
v-hasPermi=
"['system:store:remove']"
>
取消分配
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<select-consumer
ref=
"select"
:storeId=
"queryParams.storeId"
:position=
"queryParams.position"
@
ok=
"handleQuery"
/>
</div>
</template>
<
script
>
import
{
allocatedUserList
,
authUserCancel
,
authUserCancelAll
}
from
"@/api/system/store"
;
import
selectConsumer
from
"./selectConsumer"
;
export
default
{
name
:
"CleanConsumer"
,
dicts
:
[
'sys_user_sex'
,
'wechat_role_type'
],
components
:
{
selectConsumer
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 选中用户组
consumerIds
:
[],
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 用户表格数据
consumerList
:
[],
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
storeId
:
undefined
,
nickName
:
undefined
,
phone
:
undefined
}
};
},
created
()
{
const
storeId
=
this
.
$route
.
params
&&
this
.
$route
.
params
.
storeId
;
this
.
queryParams
.
position
=
2
;
if
(
storeId
)
{
this
.
queryParams
.
storeId
=
storeId
;
this
.
getList
();
}
},
methods
:
{
/** 查询授权用户列表 */
getList
()
{
this
.
loading
=
true
;
this
.
queryParams
.
position
=
2
;
allocatedUserList
(
this
.
queryParams
).
then
(
response
=>
{
this
.
consumerList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
}
);
},
// 返回按钮
handleClose
()
{
const
obj
=
{
path
:
"/share/store"
};
this
.
$tab
.
closeOpenPage
(
obj
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
consumerIds
=
selection
.
map
(
item
=>
item
.
id
)
this
.
multiple
=
!
selection
.
length
},
/** 打开授权用户表弹窗 */
openSelectUser
()
{
this
.
$refs
.
select
.
show
();
},
/** 取消授权按钮操作 */
cancelAuthUser
(
row
)
{
const
storeId
=
this
.
queryParams
.
storeId
;
this
.
$modal
.
confirm
(
'确认要取消分配管理员"'
+
row
.
nickName
+
'"吗?'
).
then
(
function
()
{
return
authUserCancel
({
consumerId
:
row
.
id
,
storeId
:
storeId
,
position
:
2
});
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"取消成功"
);
}).
catch
(()
=>
{
});
},
/** 批量取消授权按钮操作 */
cancelAuthUserAll
(
row
)
{
const
storeId
=
this
.
queryParams
.
storeId
;
const
consumerIds
=
this
.
consumerIds
.
join
(
","
);
this
.
$modal
.
confirm
(
'是否取消选中分配管理员数据项?'
).
then
(
function
()
{
return
authUserCancelAll
({
storeId
:
storeId
,
consumerIds
:
consumerIds
,
position
:
2
});
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"取消成功"
);
}).
catch
(()
=>
{
});
}
}
};
</
script
>
src/views/system/store/selectConsumer.vue
View file @
62759e80
...
...
@@ -33,7 +33,7 @@
<el-table-column
label=
"手机号"
align=
"center"
prop=
"phone"
/>
<el-table-column
label=
"角色类型"
align=
"center"
prop=
"roleType"
>
<template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.
consumer
_role_type"
:value=
"scope.row.roleType"
/>
<dict-tag
:options=
"dict.type.
wechat
_role_type"
:value=
"scope.row.roleType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"性别"
align=
"center"
prop=
"sex"
>
...
...
@@ -60,11 +60,14 @@
<
script
>
import
{
unallocatedUserList
,
authUserSelectAll
}
from
"@/api/system/store"
;
export
default
{
dicts
:
[
'sys_user_sex'
,
'consumer
_role_type'
],
dicts
:
[
'sys_user_sex'
,
'wechat
_role_type'
],
props
:
{
// 角色编号
storeId
:
{
type
:
[
Number
,
String
]
},
position
:
{
type
:
[
Number
,
String
]
}
},
data
()
{
...
...
@@ -91,6 +94,7 @@ export default {
// 显示弹框
show
()
{
this
.
queryParams
.
storeId
=
this
.
storeId
;
this
.
queryParams
.
position
=
this
.
position
;
this
.
getList
();
this
.
visible
=
true
;
},
...
...
@@ -123,10 +127,10 @@ export default {
const
storeId
=
this
.
queryParams
.
storeId
;
const
consumerIds
=
this
.
consumerIds
.
join
(
","
);
if
(
consumerIds
==
""
)
{
this
.
$modal
.
msgError
(
"请选择要分配的
保洁
员"
);
this
.
$modal
.
msgError
(
"请选择要分配的
店
员"
);
return
;
}
authUserSelectAll
({
storeId
:
storeId
,
consumerIds
:
consumerIds
}).
then
(
res
=>
{
authUserSelectAll
({
storeId
:
storeId
,
consumerIds
:
consumerIds
,
position
:
this
.
position
}).
then
(
res
=>
{
this
.
$modal
.
msgSuccess
(
res
.
msg
);
if
(
res
.
code
===
200
)
{
this
.
visible
=
false
;
...
...
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