Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
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
youjj
cloud-platform-ui
Commits
566f9ebf
Commit
566f9ebf
authored
Sep 03, 2020
by
rencs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
9.3 后台列表
parent
543b011a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
30 deletions
+39
-30
index.vue
src/views/admin/user/index.vue
+39
-30
No files found.
src/views/admin/user/index.vue
View file @
566f9ebf
...
@@ -259,7 +259,14 @@
...
@@ -259,7 +259,14 @@
</template>
</template>
<
script
type=
"javascript"
>
<
script
type=
"javascript"
>
import
{
page
,
addObj
,
getObj
,
delObj
,
putObj
,
companyListById
}
from
"api/admin/user/index"
;
import
{
page
,
addObj
,
getObj
,
delObj
,
putObj
,
companyListById
,
}
from
"api/admin/user/index"
;
import
{
mapGetters
}
from
"vuex"
;
import
{
mapGetters
}
from
"vuex"
;
...
@@ -401,8 +408,8 @@ export default {
...
@@ -401,8 +408,8 @@ export default {
list_All
:
[],
list_All
:
[],
companys_list
:
[],
companys_list
:
[],
branchCompany_list
:
[],
// 所属门店列表
branchCompany_list
:
[],
// 所属门店列表
branchCompany_list_select
:
[],
// 全部所属门店
branchCompany_list_select
:
[],
// 全部所属门店
edit_item
:
{}
edit_item
:
{}
,
};
};
},
},
created
()
{
created
()
{
...
@@ -445,18 +452,18 @@ export default {
...
@@ -445,18 +452,18 @@ export default {
/**
/**
* 选择所属公司后--查询所属门店列表
* 选择所属公司后--查询所属门店列表
*/
*/
changeCorporation
(){
changeCorporation
()
{
this
.
form
.
companyId
=
undefined
// 切换所属公司----所属门店置空
this
.
form
.
companyId
=
undefined
;
// 切换所属公司----所属门店置空
companyListById
({
companyId
:
this
.
form
.
corporationId
}).
then
((
res
)
=>
{
companyListById
({
companyId
:
this
.
form
.
corporationId
}).
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
if
(
res
.
status
==
200
)
{
this
.
branchCompany_list
=
res
.
data
;
this
.
branchCompany_list
=
res
.
data
;
}
else
{
}
else
{
this
.
$notify
({
this
.
$notify
({
title
:
'失败'
,
title
:
"失败"
,
message
:
res
.
message
,
message
:
res
.
message
,
type
:
'error'
,
type
:
"error"
,
duration
:
2000
duration
:
2000
,
})
})
;
}
}
});
});
},
},
...
@@ -467,11 +474,11 @@ export default {
...
@@ -467,11 +474,11 @@ export default {
this
.
companys_list
=
res
.
data
;
this
.
companys_list
=
res
.
data
;
}
else
{
}
else
{
this
.
$notify
({
this
.
$notify
({
title
:
'失败'
,
title
:
"失败"
,
message
:
res
.
message
,
message
:
res
.
message
,
type
:
'error'
,
type
:
"error"
,
duration
:
2000
duration
:
2000
,
})
})
;
}
}
});
});
},
},
...
@@ -524,8 +531,8 @@ export default {
...
@@ -524,8 +531,8 @@ export default {
this
.
listQuery
.
companyId
=
undefined
;
this
.
listQuery
.
companyId
=
undefined
;
}
}
page
(
this
.
listQuery
).
then
((
response
)
=>
{
page
(
this
.
listQuery
).
then
((
response
)
=>
{
this
.
list
=
response
.
data
.
rows
;
this
.
list
=
response
.
data
.
data
;
this
.
total
=
response
.
data
.
total
;
this
.
total
=
response
.
data
.
total
Count
;
this
.
listLoading
=
false
;
this
.
listLoading
=
false
;
});
});
},
},
...
@@ -593,18 +600,18 @@ export default {
...
@@ -593,18 +600,18 @@ export default {
dataLimit
:
undefined
,
//数据权限
dataLimit
:
undefined
,
//数据权限
members
:
[],
members
:
[],
};
};
if
(
this
.
form
.
corporationId
)
{
if
(
this
.
form
.
corporationId
)
{
// 所属公司 -所属门店
// 所属公司 -所属门店
companyListById
({
companyId
:
this
.
form
.
corporationId
}).
then
((
res
)
=>
{
companyListById
({
companyId
:
this
.
form
.
corporationId
}).
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
if
(
res
.
status
==
200
)
{
this
.
branchCompany_list
=
res
.
data
;
this
.
branchCompany_list
=
res
.
data
;
}
else
{
}
else
{
this
.
$notify
({
this
.
$notify
({
title
:
'失败'
,
title
:
"失败"
,
message
:
res
.
message
,
message
:
res
.
message
,
type
:
'error'
,
type
:
"error"
,
duration
:
2000
duration
:
2000
,
})
})
;
}
}
});
});
}
}
...
@@ -661,14 +668,15 @@ export default {
...
@@ -661,14 +668,15 @@ export default {
// if ( this.form.corporationId == undefined && this.form.companyId == undefined ) {
// if ( this.form.corporationId == undefined && this.form.companyId == undefined ) {
// this.form.dataAll = 1;
// this.form.dataAll = 1;
// }
// }
if
(
this
.
form
.
corporationId
==
0
&&
this
.
form
.
companyId
==
0
){
// 所属公司、所属门店 均为全部
if
(
this
.
form
.
corporationId
==
0
&&
this
.
form
.
companyId
==
0
)
{
// 所属公司、所属门店 均为全部
this
.
form
.
dataAll
=
1
;
this
.
form
.
dataAll
=
1
;
}
else
if
(
this
.
form
.
corporationId
>
0
&&
this
.
form
.
companyId
==
0
)
{
}
else
if
(
this
.
form
.
corporationId
>
0
&&
this
.
form
.
companyId
==
0
)
{
// 选择所属公司 全部门店
// 选择所属公司 全部门店
this
.
form
.
dataCorporation
=
this
.
form
.
corporationId
;
this
.
form
.
dataCorporation
=
this
.
form
.
corporationId
;
}
else
if
(
this
.
form
.
corporationId
>
0
&&
this
.
form
.
companyId
>
0
)
{
}
else
if
(
this
.
form
.
corporationId
>
0
&&
this
.
form
.
companyId
>
0
)
{
this
.
form
.
dataAll
=
undefined
;
this
.
form
.
dataAll
=
undefined
;
this
.
form
.
dataCorporation
=
undefined
this
.
form
.
dataCorporation
=
undefined
;
this
.
form
.
dataCompany
=
this
.
form
.
companyId
;
this
.
form
.
dataCompany
=
this
.
form
.
companyId
;
}
}
...
@@ -729,14 +737,15 @@ export default {
...
@@ -729,14 +737,15 @@ export default {
}
else
{
}
else
{
this
.
form
.
password
=
undefined
;
this
.
form
.
password
=
undefined
;
}
}
if
(
this
.
form
.
corporationId
==
0
&&
this
.
form
.
companyId
==
0
){
// 所属公司、所属门店 均为全部
if
(
this
.
form
.
corporationId
==
0
&&
this
.
form
.
companyId
==
0
)
{
// 所属公司、所属门店 均为全部
this
.
form
.
dataAll
=
1
;
this
.
form
.
dataAll
=
1
;
}
else
if
(
this
.
form
.
corporationId
>
0
&&
this
.
form
.
companyId
==
0
)
{
}
else
if
(
this
.
form
.
corporationId
>
0
&&
this
.
form
.
companyId
==
0
)
{
// 选择所属公司 全部门店
// 选择所属公司 全部门店
this
.
form
.
dataCorporation
=
this
.
form
.
corporationId
;
this
.
form
.
dataCorporation
=
this
.
form
.
corporationId
;
}
else
if
(
this
.
form
.
corporationId
>
0
&&
this
.
form
.
companyId
>
0
)
{
}
else
if
(
this
.
form
.
corporationId
>
0
&&
this
.
form
.
companyId
>
0
)
{
this
.
form
.
dataAll
=
undefined
;
this
.
form
.
dataAll
=
undefined
;
this
.
form
.
dataCorporation
=
undefined
this
.
form
.
dataCorporation
=
undefined
;
this
.
form
.
dataCompany
=
this
.
form
.
companyId
;
this
.
form
.
dataCompany
=
this
.
form
.
companyId
;
}
}
putObj
(
this
.
form
.
id
,
this
.
form
).
then
((
response
)
=>
{
putObj
(
this
.
form
.
id
,
this
.
form
).
then
((
response
)
=>
{
...
...
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