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
5323a0b0
Commit
5323a0b0
authored
Sep 26, 2021
by
Zhang Xiaojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:发布贷款产品
parent
7f979919
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
208 additions
and
112 deletions
+208
-112
login_background.png
src/assets/login_background.png
+0
-0
statics_bg.png
src/assets/statics_bg.png
+0
-0
main.ts
src/main.ts
+1
-1
index.vue
src/views/Login/index.vue
+117
-77
card.vue
src/views/Root/Home/card.vue
+9
-3
index.vue
src/views/Root/Home/index.vue
+27
-10
publish.vue
src/views/Root/Product/Loan/publish.vue
+39
-16
index.vue
src/views/Root/User/index.vue
+4
-3
index.vue
src/views/Root/index.vue
+2
-1
tailwind.config.js
tailwind.config.js
+4
-1
vue.config.js
vue.config.js
+5
-0
No files found.
src/assets/login_background.png
0 → 100644
View file @
5323a0b0
This image diff could not be displayed because it is too large. You can
view the blob
instead.
src/assets/statics_bg.png
0 → 100644
View file @
5323a0b0
16.4 KB
src/main.ts
View file @
5323a0b0
...
...
@@ -2,7 +2,7 @@ import Vue from 'vue'
import
App
from
'./App.vue'
import
router
from
'./router'
import
store
from
'./store'
import
'ant-design-vue/dist/antd.
c
ss'
import
'ant-design-vue/dist/antd.
le
ss'
import
'tailwindcss/tailwind.css'
import
'element-ui/lib/theme-chalk/index.css'
import
filter
from
'./filter'
...
...
src/views/Login/index.vue
View file @
5323a0b0
<
template
>
<div
class=
"min-h-screen bg-color-primary flex items-center"
>
<div
class=
"w-96 h-80 bg-white mx-auto border border-gray-500 py-9"
>
<p
class=
"font-extrabold text-xl text-center"
>
登录
</p>
<div
class=
"w-60 mx-auto text-center"
>
<a-tabs
default-active-key=
"1"
@
change=
"toggleLoginWay"
>
<!-- 账号登录 -->
<a-tab-pane
key=
"1"
tab=
"密码登录"
>
<a-form-model
v-if=
"!loading"
:model=
"loginByPwdForm"
:rules=
"loginByPwdForm.rule"
ref=
"loginByPwdForm"
>
<a-form-model-item
prop=
"username"
>
<a-input
placeholder=
"请输入账号"
v-model=
"loginByPwdForm.username"
/>
</a-form-model-item>
<a-form-model-item
prop=
"password"
>
<a-input
placeholder=
"请输入密码"
type=
"password"
v-model=
"loginByPwdForm.password"
/>
</a-form-model-item>
</a-form-model>
<div
v-else
class=
"example"
>
<a-spin
size=
"large"
/>
</div>
</a-tab-pane>
<!-- 验证码登录 -->
<a-tab-pane
key=
"2"
tab=
"验证码登录"
force-render
>
<a-form-model
v-if=
"!loading"
:model=
"loginBySmsForm"
:rules=
"loginBySmsForm.rule"
ref=
"loginBySmsForm"
>
<a-form-model-item
prop=
"phoneNumber"
>
<div
class=
"w-full flex justify-between"
>
<div
class=
"
login_background
min-h-screen
bg-center bg-cover
flex flex-col
justify-center
"
>
<p
class=
"text-3xl semi-bold text-white text-center mb-10"
>
中小企业普惠金融管理平台
</p>
<div
class=
"flex items-center"
>
<div
class=
"
w-96
bg-white
mx-auto
py-9
rounded-lg
ring-15 ring-white ring-opacity-40
"
>
<div
class=
"w-60 mx-auto text-center"
>
<a-tabs
default-active-key=
"1"
@
change=
"toggleLoginWay"
>
<!-- 账号登录 -->
<a-tab-pane
key=
"1"
tab=
"密码登录"
>
<a-form-model
v-if=
"!loading"
:model=
"loginByPwdForm"
:rules=
"loginByPwdForm.rule"
ref=
"loginByPwdForm"
>
<a-form-model-item
prop=
"username"
>
<a-input
placeholder=
"请输入账号"
v-model=
"loginByPwdForm.username"
>
<a-icon
slot=
"prefix"
type=
"user"
/>
</a-input>
</a-form-model-item>
<a-form-model-item
prop=
"password"
>
<a-input-password
placeholder=
"请输入密码"
type=
"password"
v-model=
"loginByPwdForm.password"
>
<a-icon
slot=
"prefix"
type=
"lock"
/>
</a-input-password>
</a-form-model-item>
</a-form-model>
<div
v-else
class=
"example"
>
<a-spin
size=
"large"
/>
</div>
</a-tab-pane>
<!-- 验证码登录 -->
<a-tab-pane
key=
"2"
tab=
"验证码登录"
force-render
>
<a-form-model
v-if=
"!loading"
:model=
"loginBySmsForm"
:rules=
"loginBySmsForm.rule"
ref=
"loginBySmsForm"
>
<a-form-model-item
prop=
"phoneNumber"
>
<a-input
placeholder=
"请输入手机号"
style=
"width: 60%; margin-right: 10px"
v-model=
"loginBySmsForm.phoneNumber"
/>
<a-button
type=
"primary"
v-if=
"smsCount === 60"
@
click=
"handleClickSendSms"
>
获取验证码
</a-button>
<a-button
v-else
type=
"primary"
disabled
>
已发送
{{
smsCount
}}
S
</a-button>
</div>
</a-form-model-item>
<a-form-model-item
prop=
"validation"
>
<a-input
placeholder=
"请输入验证码"
v-model=
"loginBySmsForm.validation"
/>
</a-form-model-item>
</a-form-model>
<div
v-else
class=
"example"
>
<a-spin
size=
"large"
/>
</div>
</a-tab-pane>
</a-tabs>
<a-button
v-if=
"!loading"
type=
"primary"
@
click=
"handleClickLogin"
>
确定
</a-button>
<a-icon
slot=
"prefix"
type=
"phone"
/>
</a-input>
</a-form-model-item>
<a-form-model-item
prop=
"validation"
>
<div
class=
"w-full flex justify-between"
>
<a-input
style=
"width: 60%; margin-right: 10px"
placeholder=
"请输入验证码"
v-model=
"loginBySmsForm.validation"
/>
<a-button
v-if=
"smsCount === 60"
@
click=
"handleClickSendSms"
>
获取验证码
</a-button>
<a-button
v-else
type=
"primary"
disabled
>
已发送
{{
smsCount
}}
S
</a-button>
</div>
</a-form-model-item>
</a-form-model>
<div
v-else
class=
"example"
>
<a-spin
size=
"large"
/>
</div>
</a-tab-pane>
</a-tabs>
<a-button
v-if=
"!loading"
type=
"primary"
@
click=
"handleClickLogin"
style=
"width: 100%; margin-bottom: 30px"
>
登录
</a-button>
</div>
</div>
</div>
</div>
...
...
@@ -82,13 +113,13 @@ import { eNewRoleRelatedToBackEnd, eRole } from "@/types/role";
import
{
setUserMsg
}
from
"@/utils/userMsg/userMsg"
;
import
{
eLoginWay
}
from
"./type"
;
import
{
phoneValid
}
from
"./const"
;
import
{
isPhoneValid
}
from
'@/utils/phone/index'
;
import
{
Tabs
,
FormModel
,
message
}
from
"ant-design-vue"
;
import
{
isPhoneValid
}
from
"@/utils/phone/index"
;
import
{
Tabs
,
FormModel
,
message
,
Icon
}
from
"ant-design-vue"
;
import
Vue
from
"vue"
;
import
UserService
from
"@/service/UserManagementService"
;
import
VerifyCodeService
,
{
eSmsType
}
from
"@/service/VerifyCodeService"
;
Vue
.
use
(
Tabs
);
Vue
.
use
(
Tabs
)
.
use
(
Icon
)
;
export
default
Vue
.
extend
({
props
:
{
...
...
@@ -202,11 +233,13 @@ export default Vue.extend({
const
{
accessToken
,
level
,
phone
,
role
,
userType
}
=
ret
.
data
;
setUserMsg
({
token
:
accessToken
,
newRole
:
this
.
adminLogin
?
eNewRoleRelatedToBackEnd
.
PlatformAdmin
:
role
,
newRole
:
this
.
adminLogin
?
eNewRoleRelatedToBackEnd
.
PlatformAdmin
:
role
,
level
:
level
,
phone
,
userType
,
})
})
;
this
.
$router
.
push
({
name
:
"home"
,
});
...
...
@@ -223,16 +256,18 @@ export default Vue.extend({
pwd
,
});
console
.
log
(
ret
);
if
(
ret
.
code
===
200
)
{
const
{
accessToken
,
level
,
phone
,
role
,
userType
}
=
ret
.
data
;
setUserMsg
({
token
:
accessToken
,
newRole
:
this
.
adminLogin
?
eNewRoleRelatedToBackEnd
.
PlatformAdmin
:
role
,
newRole
:
this
.
adminLogin
?
eNewRoleRelatedToBackEnd
.
PlatformAdmin
:
role
,
level
:
level
,
phone
,
userType
,
})
})
;
this
.
$router
.
push
({
name
:
"home"
,
});
...
...
@@ -270,4 +305,8 @@ export default Vue.extend({
padding
:
30px
50px
;
margin
:
20px
0
;
}
.login_background
{
background-image
:
url(../../assets/login_background.png)
;
}
</
style
>
\ No newline at end of file
src/views/Root/Home/card.vue
View file @
5323a0b0
<
template
>
<div>
<a-card
:title=
"title"
style=
"width: 400px; border-radius: 0.75rem"
>
<p
class=
"
text-blue-400 text-3xl font-medium mb-0 mt-4"
>
{{
total
}}
</p>
<a-card
:title=
"title"
style=
"width: 400px; border-radius: 0.75rem
;
"
>
<p
class=
"
text-color-primary text-3xl font-bold mb-0 mt-4"
>
{{
total
}}
<span
class=
" text-base"
>
人
</span>
</p>
</a-card>
</div>
</
template
>
...
...
@@ -27,5 +27,10 @@ export default Vue.extend({
</
script
>
<
style
>
<
style
lang=
"less"
scoped
>
/deep/.ant-card-body{
background-image: url(../../../assets/statics_bg.png);
background-size: cover;
background-position: center;
}
</
style
>
\ No newline at end of file
src/views/Root/Home/index.vue
View file @
5323a0b0
...
...
@@ -14,16 +14,16 @@
</a-row>
<p
class=
"text-2xl font-bold my-5"
>
日活折线图
</p>
<!-- 数据源 -->
<span>
统计
:
</span>
<span>
数据
:
</span>
<a-radio-group
@
change=
"handleChangeSource"
:default-value=
"eBarChart.login_dau
"
v-model=
"chartType
"
>
<a-radio-button
:value=
"eBarChart.not_login_dau"
>
全局日活
</a-radio-button>
<a-radio-button
:value=
"eBarChart.login_dau"
>
注册日活
</a-radio-button>
</a-radio-group>
<!-- 日期范围 -->
<span
class=
"ml-7"
>
统计
:
</span>
<span
class=
"ml-7"
>
日期区间
:
</span>
<a-radio-group
@
change=
"handleChangeTimeRange"
default-value=
"10"
>
<a-radio-button
value=
"10"
>
10天
</a-radio-button>
<a-radio-button
value=
"15"
>
15天
</a-radio-button>
...
...
@@ -40,6 +40,7 @@ import { Row, Col, Radio } from "ant-design-vue";
import
*
as
echarts
from
"echarts"
;
import
{
eBarChart
}
from
"./const"
;
import
DashboardService
from
"@/service/DashboardService/index"
;
import
{
getPastDaysUtilYesterday
}
from
"@/utils/days/index"
;
Vue
.
use
(
Row
).
use
(
Col
).
use
(
Radio
);
export
default
Vue
.
extend
({
...
...
@@ -54,25 +55,31 @@ export default Vue.extend({
data
()
{
return
{
option
:
{
color
:
"#
60A5FA
"
,
color
:
"#
3E4FAF
"
,
xAxis
:
{
type
:
"category"
,
data
:
[
0
],
// mock
data
:
[]
as
Array
<
any
>
// data: [] as Array
<
number
>
,
},
yAxis
:
{
type
:
"value"
,
},
series
:
[
{
data
:
[
100
],
type
:
"bar"
,
// data: [] as Array
<
number
>
,
// mock
data
:
[
820
,
932
,
901
,
934
,
1290
,
1330
,
1320
,
934
,
1290
,
1330
,
1320
,
820
,
932
,
901
,
934
,
1290
,
1330
,
1320
,
934
,
1290
,
1330
,
1320
],
type
:
"line"
,
areaStyle
:
{
color
:
"#F5F5FB"
},
smooth
:
true
,
showBackground
:
false
,
},
],
},
timeRange
:
10
,
myChart
:
undefined
as
undefined
|
echarts
.
ECharts
,
chartType
:
''
,
chartType
:
eBarChart
.
not_login_dau
,
eBarChart
,
type
:
''
,
login_dau
:
0
,
...
...
@@ -95,10 +102,17 @@ export default Vue.extend({
},
handleChangeSource
(
e
:
any
)
{
let
type
=
e
.
target
!
.
value
console
.
log
(
type
);
this
.
chartType
=
type
===
eBarChart
.
login_dau
?
eBarChart
.
login_dau
:
eBarChart
.
not_login_dau
this
.
queryChart
()
},
initEchart
(
period
:
number
)
{
// mock
(
this
.
option
.
xAxis
.
data
as
Array
<
String
>
)
=
getPastDaysUtilYesterday
(
period
)
as
Array
<
String
>
;
//
(
this
.
myChart
as
echarts
.
ECharts
).
setOption
(
this
.
option
);
this
.
queryChart
()
},
...
...
@@ -111,6 +125,8 @@ export default Vue.extend({
}
},
async
queryChart
()
{
console
.
log
(
this
.
timeRange
,
this
.
chartType
);
const
ret
=
await
DashboardService
.
getInstance
().
queryChart
(
{
days
:
this
.
timeRange
,
...
...
@@ -120,8 +136,9 @@ export default Vue.extend({
if
(
ret
.
code
===
200
)
{
console
.
log
(
ret
);
ret
.
data
.
map
((
data
)
=>
{
this
.
option
.
series
[
0
].
data
.
push
(
data
.
value
)
this
.
option
.
xAxis
.
data
.
push
(
data
.
time
)
// 真实数据
// this.option.series[0].data.push(data.value)
// this.option.xAxis.data.push(data.time)
})
}
},
...
...
src/views/Root/Product/Loan/publish.vue
View file @
5323a0b0
...
...
@@ -28,35 +28,54 @@
</a-form-model-item>
<a-form-model-item
label=
"贷款期限(月)"
>
<a-input-number
v-model=
"form.startTime"
:value=
"form.startTime"
@
change=
"(v) => (form.startTime = Math.floor(v))"
:step=
"1"
style=
"width: 20%"
:min=
"0"
/>
——
<a-input-number
v-model=
"form.endTime"
:min=
"0"
style=
"width: 20%"
/>
<a-input-number
:value=
"form.endTime"
@
change=
"(v) => (form.endTime = Math.floor(v))"
:step=
"1"
:min=
"Math.floor(form.startTime + 1)"
style=
"width: 20%"
/>
</a-form-model-item>
<a-form-model-item
label=
"参考利率(%)"
>
<a-input-number
v-model=
"form.interstMin"
placeholder=
"最多可输小数点后两位"
:value=
"isNaN(form.interstMin)? 0:form.interstMin"
@
change=
"(v) => ( form.interstMin = Number.parseFloat(v).toFixed(2))"
placeholder=
"最多可输小数点后两位"
:step=
"0.01"
:min=
"0"
style=
"width: 20%"
/>
——
<a-input-number
v-model=
"form.interstMax"
:value=
"isNaN(form.interstMax)? +Number.parseFloat(form.interstMin).toFixed(2)+0.01:form.interstMax"
@
change=
"(v) => (form.interstMax = isNaN(v)? 0: Number.parseFloat(v).toFixed(2))"
placeholder=
"最多可输小数点后两位"
:step=
"0.01"
:min=
"
0
"
:min=
"
+Number.parseFloat(form.interstMin).toFixed(2)+0.01
"
style=
"width: 20%"
/>
</a-form-model-item>
<a-form-model-item
label=
"贷款额度(万元)"
>
<a-input-number
v-model=
"form.limitMin"
style=
"width: 20%"
:min=
"0"
/>
<a-input-number
:value=
"form.limitMin"
@
change=
"(v) => (form.limitMin = Math.floor(v))"
style=
"width: 20%"
:min=
"0"
/>
——
<a-input-number
style=
"width: 20%"
v-model=
"form.limitMax"
:min=
"0"
/>
<a-input-number
style=
"width: 20%"
:value=
"form.limitMax"
@
change=
"(v) => (form.limitMax = Math.floor(v))"
:min=
"Math.floor(form.limitMin + 1)"
/>
</a-form-model-item>
<a-form-model-item
label=
"担保方式"
:wrapper-col=
"
{ span: 5 }">
<a-select
...
...
@@ -64,7 +83,11 @@
@
change=
"changeGuarantee"
v-model=
"form.guarantee"
>
<a-select-option
v-for=
"(type,i) in guaranteeType"
:key=
"type"
:value=
"i+1"
>
<a-select-option
v-for=
"(type, i) in guaranteeType"
:key=
"type"
:value=
"i + 1"
>
{{
type
}}
</a-select-option>
</a-select>
...
...
@@ -125,7 +148,7 @@ export default Vue.extend({
},
},
},
async
moun
ted
()
{
async
crea
ted
()
{
this
.
isEditable
=
this
.
$route
.
name
==
"editLoanProduct"
?
true
:
false
;
if
(
this
.
isEditable
)
{
const
uuid
=
this
.
$route
.
params
.
uuid
;
...
...
@@ -157,10 +180,10 @@ export default Vue.extend({
name
:
""
,
orgnization
:
""
,
startTime
:
0
,
endTime
:
0
,
endTime
:
0
,
interstMax
:
0
,
interstMin
:
0
,
limitMax
:
0
as
number
,
limitMax
:
0
,
limitMin
:
0
,
guarantee
:
eGuaranteeType
.
credit
,
type
:
eProductType
.
company
,
...
...
@@ -291,9 +314,9 @@ export default Vue.extend({
}
});
}
this
.
productSave
({
page
:
1
,
});
this
.
productSave
({
page
:
1
,
});
}
else
{
return
false
;
}
...
...
src/views/Root/User/index.vue
View file @
5323a0b0
...
...
@@ -37,7 +37,7 @@
<
script
lang=
"ts"
>
import
Vue
from
'vue'
import
{
Cascader
}
from
'ant-design-vue'
import
{
Cascader
,
Icon
}
from
'ant-design-vue'
import
{
options
}
from
'@/mock/index'
import
{
message
}
from
'ant-design-vue'
import
StaffService
from
"@/service/StaffService"
;
...
...
@@ -52,7 +52,8 @@ Vue.prototype.$message = message
export
default
Vue
.
extend
({
components
:
{
HeaderSelect
HeaderSelect
,
Icon
},
computed
:{
options
(){
...
...
@@ -122,7 +123,7 @@ export default Vue.extend({
}
}
if
(
levelList
.
length
==
0
&&
this
.
search
.
length
==
0
){
this
.
$message
.
info
(
'请通过选择或者输入详细地址搜索'
)
this
.
$message
.
info
(
{
content
:
"请通过选择或者输入详细地址搜索"
,
icon
:()
=>
{
return
this
.
$createElement
(
'Icon'
,{
style
:{
color
:
'#3E4FAF'
},
props
:{
type
:
'exclamation-circle'
}})}}
)
}
else
{
const
search
:
string
|
Array
<
{
value
:
number
,
name
:
string
}
>
=
levelList
.
length
==
0
?
this
.
search
:
levelList
console
.
log
(
search
)
...
...
src/views/Root/index.vue
View file @
5323a0b0
...
...
@@ -127,6 +127,6 @@ export default Vue.extend({
<
style
lang=
"less"
scoped
>
/deep/a {
color: #
1890ff
;
color: #
3E4FAF
;
}
</
style
>
\ No newline at end of file
tailwind.config.js
View file @
5323a0b0
...
...
@@ -8,9 +8,12 @@ module.exports = {
extend
:{
colors
:{
// 主题色
'color-primary'
:
'#
1890ff
'
,
'color-primary'
:
'#
3E4FAF
'
,
// 登录按钮
'btn-login'
:
'#03CDFF'
},
ringWidth
:
{
'15'
:
'15px'
,
}
},
screens
:
{
...
...
vue.config.js
View file @
5323a0b0
...
...
@@ -3,6 +3,11 @@ module.exports = {
css
:
{
loaderOptions
:
{
less
:
{
modifyVars
:
{
'primary-color'
:
'#3E4FAF'
,
// 'link-color': '#1DA57A',
// 'border-radius-base': '2px',
},
javascriptEnabled
:
true
,
// 加载LESS 需要把JS设置一下
},
sass
:
{
...
...
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