Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhang Xiaojie
fns_backend
Commits
941cf41e
Commit
941cf41e
authored
Sep 16, 2021
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
a3f57396
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
149 additions
and
5 deletions
+149
-5
index.ts
src/service/StaffService/index.ts
+12
-5
types.ts
src/service/StaffService/types.ts
+11
-0
index.ts
src/utils/outlet/index.ts
+21
-0
types.ts
src/utils/outlet/types.ts
+0
-0
index.vue
...s/Root/OutletManagement/components/HeaderSelect/index.vue
+105
-0
index.vue
src/views/Root/OutletManagement/index.vue
+0
-0
No files found.
src/service/StaffService/index.ts
View file @
941cf41e
import
{
eLevel
}
from
'@/types/level'
import
{
eUserStatusAction
}
from
'@/types/user'
import
baseAxios
from
'../index'
import
{
iStaffItem
}
from
'./types'
import
{
i
OutLet
,
i
StaffItem
}
from
'./types'
export
default
class
StaffService
{
static
instance
:
StaffService
...
...
@@ -36,10 +36,10 @@ export default class StaffService {
}
getBranch
(
data
:
{
leve
:
eLevel
page
:
number
page_size
:
number
parent_id
:
number
leve
l
:
eLevel
page
?
:
number
page_size
?
:
number
parent_id
?
:
number
})
{
return
baseAxios
({
url
:
'/staff/branch'
,
...
...
@@ -47,4 +47,11 @@ export default class StaffService {
data
,
})
}
getSelfOutLet
()
{
return
baseAxios
<
iOutLet
>
({
url
:
'/staff/outlet'
,
method
:
'get'
,
})
}
}
src/service/StaffService/types.ts
View file @
941cf41e
...
...
@@ -13,3 +13,14 @@ export interface iStaffItem {
time
:
string
work
:
number
}
export
interface
iOutLet
{
fid
:
number
first_branch
:
string
fs_id
:
number
first_sub_branch
:
string
second_branch
:
string
second_sub_branch
:
string
sid
:
number
ss_id
:
number
}
src/utils/outlet/index.ts
0 → 100644
View file @
941cf41e
import
StaffService
from
'@/service/StaffService'
import
{
iOutLet
}
from
'@/service/StaffService/types'
const
OUT_LET
=
'out-let'
export
async
function
getSelfOutLet
():
Promise
<
iOutLet
>
{
const
outletStorage
=
localStorage
.
getItem
(
OUT_LET
)
const
outlet
=
(
outletStorage
&&
JSON
.
parse
(
outletStorage
))
||
undefined
if
(
!
outlet
)
{
const
ret
=
await
StaffService
.
getInstance
().
getSelfOutLet
()
if
(
ret
.
code
===
200
)
{
const
data
:
iOutLet
=
ret
.
data
localStorage
.
setItem
(
OUT_LET
,
JSON
.
stringify
(
data
))
}
else
{
throw
new
Error
(
'用户网点信息获取失败F'
)
}
}
const
storage
=
localStorage
.
getItem
(
OUT_LET
)
const
result
=
(
storage
&&
JSON
.
parse
(
storage
))
||
undefined
return
result
}
src/utils/outlet/types.ts
0 → 100644
View file @
941cf41e
src/views/Root/OutletManagement/components/HeaderSelect/index.vue
0 → 100644
View file @
941cf41e
<
template
>
<div
class=
"header-select"
>
<a-select
class=
"header-select-item mx-3"
:value=
"selectValue.f"
:disabled=
"selectDisable.f"
@
popupScroll=
"popupScroll1"
>
<a-select-option
:value=
"option.value"
:key=
"option.value"
v-for=
"option in selectOptions.f"
>
{{
option
.
label
}}
</a-select-option
>
</a-select>
<a-select
class=
"header-select-item mx-3"
:value=
"selectValue.s"
:disabled=
"selectDisable.s"
@
popupScroll=
"popupScroll1"
>
<a-select-option
:value=
"option.value"
:key=
"option.value"
v-for=
"option in selectOptions.s"
>
{{
option
.
label
}}
</a-select-option
>
</a-select>
<a-select
class=
"header-select-item mx-3"
:value=
"selectValue.fs"
:disabled=
"selectDisable.fs"
@
popupScroll=
"popupScroll1"
>
<a-select-option
:value=
"option.value"
:key=
"option.value"
v-for=
"option in selectOptions.fs"
>
{{
option
.
label
}}
</a-select-option
>
</a-select>
<a-select
class=
"header-select-item mx-3"
:value=
"selectValue.ss"
:disabled=
"selectDisable.ss"
@
popupScroll=
"popupScroll1"
>
<a-select-option
:value=
"option.value"
:key=
"option.value"
v-for=
"option in selectOptions.ss"
>
{{
option
.
label
}}
</a-select-option
>
</a-select>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
message
}
from
"ant-design-vue"
;
import
Vue
from
"vue"
;
export
default
Vue
.
extend
({
props
:
[
"selectValue"
,
"selectDisable"
,
"selectOptions"
,
"setSelectValue"
,
"setSelectDisable"
,
"setSelectOptions"
,
],
methods
:
{
popupScroll1
(
e
:
Event
)
{
let
h
=
e
.
target
as
HTMLElement
;
if
(
h
.
scrollHeight
-
h
.
scrollTop
<=
h
.
clientHeight
)
{
message
.
info
(
"臣妾做不到啊"
);
}
},
popupScroll2
(
e
:
Event
)
{
let
h
=
e
.
target
as
HTMLElement
;
if
(
h
.
scrollHeight
-
h
.
scrollTop
<=
h
.
clientHeight
)
{
message
.
info
(
"臣妾做不到啊"
);
}
},
popupScroll3
(
e
:
Event
)
{
let
h
=
e
.
target
as
HTMLElement
;
if
(
h
.
scrollHeight
-
h
.
scrollTop
<=
h
.
clientHeight
)
{
message
.
info
(
"臣妾做不到啊"
);
}
},
popupScroll4
(
e
:
Event
)
{
let
h
=
e
.
target
as
HTMLElement
;
if
(
h
.
scrollHeight
-
h
.
scrollTop
<=
h
.
clientHeight
)
{
message
.
info
(
"臣妾做不到啊"
);
}
},
},
});
</
script
>
<
style
scoped
lang=
"less"
>
.header-select {
.header-select-item {
width: 200px;
}
}
</
style
>
\ No newline at end of file
src/views/Root/OutletManagement/index.vue
View file @
941cf41e
This diff is collapsed.
Click to expand it.
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