Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bims
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
孙海亮
bims
Commits
bd86d569
Commit
bd86d569
authored
Dec 21, 2021
by
吴婷慧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录模块完成
parent
2b3df4d2
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
59 additions
and
25 deletions
+59
-25
base.js
src/api/funcs_modules/base.js
+1
-3
index.js
src/components/Antd/index.js
+2
-0
router.config.js
src/router/router.config.js
+2
-1
index.js
src/store/index.js
+1
-1
common.js
src/store/modules/common.js
+4
-0
forget.vue
src/views/author/forget.vue
+1
-1
login.vue
src/views/author/login.vue
+1
-2
index.vue
src/views/customer/index.vue
+1
-1
index.vue
src/views/customer/info/index.vue
+36
-8
Header.vue
src/views/layout/components/Header.vue
+8
-6
index.js
src/views/layout/components/menu/index.js
+1
-1
subMenu.vue
src/views/layout/components/menu/subMenu.vue
+1
-1
No files found.
src/api/funcs_modules/base.js
View file @
bd86d569
...
@@ -10,9 +10,7 @@ const GETUSERINFO = (params) => {
...
@@ -10,9 +10,7 @@ const GETUSERINFO = (params) => {
};
};
// get corporate Code
// get corporate Code
const
GETCORPORATECODE
=
(
data
)
=>
{
const
GETCORPORATECODE
=
(
data
)
=>
{
return
req
.
post
(
apis
.
corporateCodeList
,
{
return
req
.
post
(
apis
.
corporateCodeList
,
data
);
data
,
});
};
};
// 对象数组
// 对象数组
...
...
src/components/Antd/index.js
View file @
bd86d569
...
@@ -13,6 +13,7 @@ import {
...
@@ -13,6 +13,7 @@ import {
Table
,
Table
,
InputNumber
,
InputNumber
,
message
,
message
,
pagination
,
}
from
"
ant-design-vue
"
;
}
from
"
ant-design-vue
"
;
export
default
()
=>
{
export
default
()
=>
{
...
@@ -30,6 +31,7 @@ export default () => {
...
@@ -30,6 +31,7 @@ export default () => {
Table
,
Table
,
InputNumber
,
InputNumber
,
message
,
message
,
pagination
,
];
];
// 注册
// 注册
els
.
forEach
((
item
)
=>
{
els
.
forEach
((
item
)
=>
{
...
...
src/router/router.config.js
View file @
bd86d569
import
NProgress
from
"
nprogress
"
;
import
NProgress
from
"
nprogress
"
;
import
"
nprogress/nprogress.css
"
;
import
"
nprogress/nprogress.css
"
;
//
import store from "@/store/index";
import
store
from
"
@/store/index
"
;
// 路由页面路由首位配置
// 路由页面路由首位配置
export
default
(
VueRouter
,
router
)
=>
{
export
default
(
VueRouter
,
router
)
=>
{
...
@@ -15,6 +15,7 @@ export default (VueRouter, router) => {
...
@@ -15,6 +15,7 @@ export default (VueRouter, router) => {
// 页面路由切换时进度条
// 页面路由切换时进度条
// let router = new VueRouter();
// let router = new VueRouter();
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
console
.
log
(
store
);
NProgress
.
start
();
NProgress
.
start
();
next
();
next
();
});
});
...
...
src/store/index.js
View file @
bd86d569
...
@@ -11,7 +11,7 @@ Vue.use(Vuex);
...
@@ -11,7 +11,7 @@ Vue.use(Vuex);
export
default
new
Vuex
.
Store
({
export
default
new
Vuex
.
Store
({
modules
:
{
modules
:
{
namespaced
:
true
,
//
namespaced: true,
common
,
common
,
},
},
plugins
:
[
createPersistedState
()],
plugins
:
[
createPersistedState
()],
...
...
src/store/modules/common.js
View file @
bd86d569
...
@@ -7,6 +7,7 @@ const actions = {
...
@@ -7,6 +7,7 @@ const actions = {
setMenuStack
({
state
},
data
)
{
setMenuStack
({
state
},
data
)
{
console
.
log
(
data
);
console
.
log
(
data
);
state
.
menuStack
=
data
;
state
.
menuStack
=
data
;
state
.
token
=
JSON
.
stringify
(
data
);
},
},
};
};
const
mutations
=
{
const
mutations
=
{
...
@@ -18,6 +19,9 @@ const mutations = {
...
@@ -18,6 +19,9 @@ const mutations = {
setUserInfo
(
state
,
userInfo
)
{
setUserInfo
(
state
,
userInfo
)
{
state
.
userInfo
=
userInfo
;
state
.
userInfo
=
userInfo
;
},
},
setMenuStack
(
state
,
data
)
{
state
.
menuStack
=
data
;
},
};
};
export
default
{
export
default
{
namespaced
:
true
,
namespaced
:
true
,
...
...
src/views/author/forget.vue
View file @
bd86d569
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<a-input
<a-input
size=
"large"
size=
"large"
v-model=
"form.userName"
v-model=
"form.userName"
placeholder=
"请输入
邮箱
"
placeholder=
"请输入
用户名
"
></a-input>
></a-input>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
prop=
"verificationCode"
>
<a-form-model-item
prop=
"verificationCode"
>
...
...
src/views/author/login.vue
View file @
bd86d569
...
@@ -79,9 +79,8 @@ export default {
...
@@ -79,9 +79,8 @@ export default {
},
},
_login
()
{
_login
()
{
this
.
$apis
.
LOGIN
(
this
.
form
).
then
((
res
)
=>
{
this
.
$apis
.
LOGIN
(
this
.
form
).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
returnCode
===
"
0000
"
)
{
if
(
res
.
returnCode
===
"
0000
"
)
{
console
.
log
(
res
.
content
);
this
.
$store
.
commit
(
"
common/setUserInfo
"
,
res
.
content
);
this
.
$router
.
replace
(
"
/customer
"
);
this
.
$router
.
replace
(
"
/customer
"
);
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
returnMsg
||
"
出现错误
"
);
this
.
$message
.
error
(
res
.
returnMsg
||
"
出现错误
"
);
...
...
src/views/customer/index.vue
View file @
bd86d569
...
@@ -36,7 +36,7 @@ export default {
...
@@ -36,7 +36,7 @@ export default {
},
},
},
},
mounted
()
{
mounted
()
{
console
.
log
(
"
this.apis
"
,
this
.
$apis
.
GETUSERINFO
(),
this
.
$lodash
);
//
console.log("this.apis", this.$apis.GETUSERINFO(), this.$lodash);
},
},
};
};
</
script
>
</
script
>
...
...
src/views/customer/info/index.vue
View file @
bd86d569
...
@@ -37,8 +37,8 @@
...
@@ -37,8 +37,8 @@
size=
"large"
size=
"large"
placeholder=
"请选择保险公司"
placeholder=
"请选择保险公司"
>
>
<a-select-option
v-for=
"item in companyCode"
:key=
"item.code"
>
<a-select-option
v-for=
"item in companyCode"
:key=
"item.co
rpCo
de"
>
{{
item
.
n
ame
}}
{{
item
.
longN
ame
}}
</a-select-option>
</a-select-option>
</a-select>
</a-select>
</a-form-model-item>
</a-form-model-item>
...
@@ -111,16 +111,20 @@ export default {
...
@@ -111,16 +111,20 @@ export default {
dataList
:
[],
dataList
:
[],
pager
:
{
pager
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
1
,
pageSize
:
1
0
,
},
},
total
:
0
,
total
:
0
,
};
};
},
},
moun
ted
()
{
crea
ted
()
{
this
.
_getCustomerList
();
this
.
_getCustomerList
();
this
.
_getCorporateCode
();
},
},
computed
:
{
computed
:
{
pagination
()
{
pagination
()
{
if
(
!
this
.
pager
||
!
this
.
dataList
.
length
)
{
return
false
;
}
const
{
pageNum
,
pageSize
}
=
this
.
pager
;
const
{
pageNum
,
pageSize
}
=
this
.
pager
;
const
pages
=
Math
.
ceil
(
this
.
total
/
pageSize
);
const
pages
=
Math
.
ceil
(
this
.
total
/
pageSize
);
return
{
return
{
...
@@ -130,11 +134,16 @@ export default {
...
@@ -130,11 +134,16 @@ export default {
align
:
"
right
"
,
align
:
"
right
"
,
hideOnSinglePage
:
false
,
hideOnSinglePage
:
false
,
itemRender
:
(
current
,
type
,
originalElement
)
=>
{
itemRender
:
(
current
,
type
,
originalElement
)
=>
{
originalElement
.
children
=
undefined
;
if
(
type
===
"
prev
"
)
{
if
(
type
===
"
prev
"
)
{
originalElement
.
children
=
undefined
;
originalElement
.
text
=
"
上一页
"
;
originalElement
.
text
=
"
上一页
"
;
}
}
if
(
type
===
"
page
"
)
{
if
(
type
===
"
page
"
)
{
if
(
current
!==
pageNum
)
{
return
undefined
;
}
// originalElement.children = undefined;
// originalElement.text = `${current} / ${pages}`;
return
(
return
(
<
p
>
<
p
>
<
span
class
=
"
current-page
"
>
{
current
}
<
/span> /
{
pages
}
<
span
class
=
"
current-page
"
>
{
current
}
<
/span> /
{
pages
}
...
@@ -142,6 +151,7 @@ export default {
...
@@ -142,6 +151,7 @@ export default {
);
);
}
}
if
(
type
===
"
next
"
)
{
if
(
type
===
"
next
"
)
{
originalElement
.
children
=
undefined
;
originalElement
.
text
=
"
下一页
"
;
originalElement
.
text
=
"
下一页
"
;
return
(
return
(
<
div
>
<
div
>
...
@@ -160,13 +170,19 @@ export default {
...
@@ -160,13 +170,19 @@ export default {
},
},
methods
:
{
methods
:
{
onChange
(
pager
)
{
onChange
(
pager
)
{
console
.
log
(
pager
);
const
{
current
}
=
pager
;
const
{
current
}
=
pager
;
this
.
apger
.
pageNum
=
current
;
console
.
log
(
pager
);
this
.
pager
.
pageNum
=
current
;
// this._getCustomerList();
},
},
onShowSizeChange
(
e
)
{
onShowSizeChange
(
e
)
{
e
&&
e
.
stopPropagation
();
e
&&
e
.
stopPropagation
();
console
.
log
(
e
);
const
val
=
e
.
target
.
value
;
if
(
!
val
)
{
return
false
;
}
this
.
pager
.
pageSize
=
val
;
this
.
_getCustomerList
();
},
},
handlerSearch
()
{
handlerSearch
()
{
console
.
log
(
this
.
$refs
.
form
.
validate
);
console
.
log
(
this
.
$refs
.
form
.
validate
);
...
@@ -179,6 +195,15 @@ export default {
...
@@ -179,6 +195,15 @@ export default {
this
.
_getCustomerList
();
this
.
_getCustomerList
();
});
});
},
},
_getCorporateCode
()
{
const
params
=
{
longName
:
""
,
payorId
:
0
,
};
this
.
$apis
.
GETCORPORATECODE
(
params
).
then
((
res
)
=>
{
this
.
companyCode
=
res
.
content
||
[];
});
},
_getCustomerList
()
{
_getCustomerList
()
{
const
data
=
{
const
data
=
{
...
this
.
pageForm
,
...
this
.
pageForm
,
...
@@ -233,5 +258,8 @@ export default {
...
@@ -233,5 +258,8 @@ export default {
background-color: #f8fafb;
background-color: #f8fafb;
border: none;
border: none;
}
}
.ant-pagination-item:not(.ant-pagination-item-active) {
display: none;
}
}
}
</
style
>
</
style
>
src/views/layout/components/Header.vue
View file @
bd86d569
...
@@ -23,14 +23,16 @@
...
@@ -23,14 +23,16 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
mapState
}
from
"
vuex
"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{};
userInfo
:
{
name
:
"
Holo
"
,
avator
:
""
,
},
},
};
computed
:
{
...
mapState
({
userInfo
:
(
state
)
=>
state
.
common
.
userInfo
,
}),
},
},
methods
:
{
methods
:
{
getPopupContainer
()
{
getPopupContainer
()
{
...
...
src/views/layout/components/menu/index.js
View file @
bd86d569
...
@@ -62,7 +62,7 @@ export default {
...
@@ -62,7 +62,7 @@ export default {
}
else
if
(
item
.
path
&&
item
.
path
===
key
)
{
}
else
if
(
item
.
path
&&
item
.
path
===
key
)
{
console
.
log
(
item
,
key
);
console
.
log
(
item
,
key
);
menuStack
.
push
(
item
);
menuStack
.
push
(
item
);
this
.
$store
.
dispatch
(
"
common/setMenuStack
"
,
menuStack
);
this
.
$store
.
commit
(
"
common/setMenuStack
"
,
menuStack
);
return
true
;
return
true
;
}
}
}
}
...
...
src/views/layout/components/menu/subMenu.vue
View file @
bd86d569
...
@@ -35,7 +35,7 @@ export default {
...
@@ -35,7 +35,7 @@ export default {
const
menuStack
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
menuStack
));
const
menuStack
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
menuStack
));
const
isVisit
=
this
.
isVisit
(
menuStack
[
index
].
path
);
const
isVisit
=
this
.
isVisit
(
menuStack
[
index
].
path
);
menuStack
.
splice
(
index
,
1
);
menuStack
.
splice
(
index
,
1
);
this
.
$store
.
dispatch
(
"
common/setMenuStack
"
,
menuStack
);
this
.
$store
.
commit
(
"
common/setMenuStack
"
,
menuStack
);
if
(
isVisit
)
{
if
(
isVisit
)
{
// 关闭的是当前正在查看的
// 关闭的是当前正在查看的
const
i
=
Math
.
max
(
0
,
index
-
1
);
const
i
=
Math
.
max
(
0
,
index
-
1
);
...
...
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