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
3ba829d9
Commit
3ba829d9
authored
Sep 23, 2021
by
xhx
Browse files
Options
Browse Files
Download
Plain Diff
消息资讯
parents
4be7af52
172f8488
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
1461 additions
and
608 deletions
+1461
-608
editorUpload.vue
src/components/Editor/editorUpload.vue
+45
-26
index.vue
src/components/Editor/index.vue
+34
-46
superManagerTable.vue
src/components/UserManage/superManagerTable.vue
+2
-2
const.ts
src/components/productManage/const.ts
+8
-0
productTable.vue
src/components/productManage/productTable.vue
+195
-76
topbar.vue
src/components/productManage/topbar.vue
+98
-46
activityColumn.ts
src/const/columns/activityColumn.ts
+4
-3
productColumn.ts
src/const/columns/productColumn.ts
+8
-4
index.ts
src/filter/index.ts
+34
-13
index.ts
src/router/index.ts
+5
-5
index.ts
src/service/ActivityService/index.ts
+92
-0
type.ts
src/service/ActivityService/type.ts
+15
-0
index.ts
src/service/LoanProductService/index.ts
+86
-24
type.ts
src/service/LoanProductService/type.ts
+22
-0
index.ts
src/service/UserManagementService/index.ts
+1
-1
index.ts
src/store/LoanProductManagement/index.ts
+47
-0
type.ts
src/store/LoanProductManagement/type.ts
+37
-0
index.ts
src/store/index.ts
+4
-1
loanProduct.ts
src/types/loanProduct.ts
+9
-4
role.ts
src/types/role.ts
+1
-1
index.ts
src/utils/StaffUtils/index.ts
+30
-25
index.ts
src/utils/outlet/index.ts
+1
-1
index.vue
src/views/Login/index.vue
+1
-0
detail.vue
src/views/Root/Activity/detail.vue
+36
-13
index.vue
src/views/Root/Activity/index.vue
+186
-103
publish.vue
src/views/Root/Activity/publish.vue
+128
-29
index.vue
src/views/Root/Banner/index.vue
+2
-0
index.vue
src/views/Root/Msg/index.vue
+4
-7
index.vue
src/views/Root/News/index.vue
+2
-0
publish.vue
src/views/Root/News/publish.vue
+9
-8
index.vue
...s/Root/OutletManagement/components/HeaderSelect/index.vue
+135
-38
index.vue
src/views/Root/OutletManagement/index.vue
+2
-41
index.vue
src/views/Root/Product/Loan/index.vue
+21
-11
publish.vue
src/views/Root/Product/Loan/publish.vue
+122
-57
getMenuList.ts
src/views/Root/getMenuList.ts
+33
-21
index.vue
src/views/Root/index.vue
+2
-2
No files found.
src/components/Editor/editorUpload.vue
View file @
3ba829d9
<
template
>
<!-- 上传概要图片 -->
<div
class=
"border-dotted border-2 p-4 mb-5"
>
<div
class=
"border-dotted border-2 p-4 mb-5"
:path=
"path"
>
<a-upload
name=
"uploadFile"
list-type=
"picture-card"
class=
"avatar-uploader"
:show-upload-list=
"false"
action=
"/proxyApi/api/v1/image/upload"
:accept=
"ACCEPT_IMAGE_TYPE"
:before-upload=
"beforeUpload"
@
change=
"handleChange"
>
<img
v-if=
"im
gUrl"
:src=
"imgUrl"
alt=
"avatar
"
/>
<img
v-if=
"im
ageUrl"
:src=
"imageUrl"
alt=
"图片不存在
"
/>
<div
v-else
>
<a-icon
:type=
"loading ? 'loading' : 'plus'"
/>
<div
class=
"ant-upload-text"
>
...
...
@@ -24,7 +25,14 @@
<
script
lang=
"ts"
>
import
Vue
from
'vue'
import
{
message
}
from
'ant-design-vue'
import
FileService
from
'@/service/FileService/index'
import
{
ACCEPT_IMAGE_TYPE
,
isAcceptImageType
,
TOAST_TEXT
,
TOAST_TEXT2
,
MAX_IMAGE_SIZE
,
}
from
'@/const/config/upload'
function
getBase64
(
img
:
Blob
,
callback
:
(
any
:
any
)
=>
void
)
{
const
reader
=
new
FileReader
();
...
...
@@ -33,15 +41,23 @@ function getBase64(img: Blob, callback: (any: any) => void) {
}
export
default
Vue
.
extend
({
data
(){
return
{
// imageUrl: "",
loading
:
false
props
:{
path
:{
type
:
String
,
required
:
true
}
},
watch
:{
path
(
newV
,
oldV
){
this
.
imageUrl
=
newV
}
},
props
:
{
imgUrl
:
{
type
:
String
data
(){
return
{
imageUrl
:
""
,
loading
:
false
,
ACCEPT_IMAGE_TYPE
,
file_name
:
''
,
}
},
methods
:{
...
...
@@ -51,22 +67,26 @@ export default Vue.extend({
return
;
}
if
(
info
.
file
.
status
===
'done'
)
{
const
res
=
info
.
file
.
response
?.
data
const
imageUrl
=
new
FileService
().
getImageSrc
(
res
)
this
.
$emit
(
'update:imgUrl'
,
imageUrl
)
}
},
beforeUpload
(
file
:
File
)
{
const
isJpgOrPng
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/png'
;
if
(
!
isJpgOrPng
)
{
message
.
error
(
'You can only upload JPG file!'
);
}
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
if
(
!
isLt2M
)
{
message
.
error
(
'Image must smaller than 2MB!'
);
// get file_hash
this
.
file_name
=
info
.
file
.
response
.
data
this
.
$emit
(
'getFileHash'
,
this
.
file_name
)
getBase64
(
info
.
file
.
originFileObj
,
imageUrl
=>
{
this
.
imageUrl
=
imageUrl
;
this
.
loading
=
false
;
});
}
return
isJpgOrPng
&&
isLt2M
;
},
beforeUpload
(
file
:
File
)
{
const
isAccpet
=
isAcceptImageType
(
file
)
if
(
!
isAccpet
)
{
message
.
error
(
TOAST_TEXT
)
}
const
isLt4M
=
file
.
size
<
MAX_IMAGE_SIZE
if
(
!
isLt4M
)
{
message
.
error
(
TOAST_TEXT2
)
}
return
isAccpet
&&
isLt4M
},
}
})
</
script
>
...
...
@@ -85,4 +105,4 @@ export default Vue.extend({
margin-top
:
8px
;
color
:
#666
;
}
</
style
>
\ No newline at end of file
</
style
>
src/components/Editor/index.vue
View file @
3ba829d9
<
template
>
<div
class=
"
border border-gray-300 p-3 rounded"
>
<EditorMenuBar
:editor=
"editor"
/>
<div
class=
"
border border-gray-300 p-3 rounded"
>
<EditorMenuBar
:editor=
"editor"
/>
<editor-content
:editor=
"editor"
class=
"editor__content"
/>
</div>
</
template
>
<
script
lang=
"ts"
>
import
Vue
from
'vue'
import
{
Editor
,
EditorContent
}
from
'@tiptap/vue-2'
import
StarterKit
from
'@tiptap/starter-kit'
import
{
Image
as
Timage
}
from
'@tiptap/extension-image'
import
EditorMenuBar
from
'./editorMenuBar.vue'
// async function handleUpload(file) {
// const ret = await upload(file);
// if (ret && ret.code === 200) {
// return ret.data.url;
// } else {
// return "";
// }
// }
import
Vue
from
"vue"
;
import
{
Editor
,
EditorContent
}
from
"@tiptap/vue-2"
;
import
StarterKit
from
"@tiptap/starter-kit"
;
import
{
Image
as
Timage
}
from
"@tiptap/extension-image"
;
import
EditorMenuBar
from
"./editorMenuBar.vue"
;
export
default
Vue
.
extend
({
components
:
{
EditorContent
,
EditorMenuBar
,
},
props
:{
visible
:{
type
:
Boolean
,
default
:
true
props
:
{
visible
:
{
type
:
Boolean
,
default
:
true
,
},
text
:
{
type
:
String
,
required
:
true
,
default
:
''
},
editorContent
:
{
type
:
String
},
watch
:{
text
(
newV
,
oldV
){
this
.
editor
.
commands
.
insertContent
(
newV
)
}
},
data
(){
let
editor
:
any
=
undefined
data
()
{
let
editor
:
any
=
undefined
;
return
{
editor
,
// content:''
}
};
},
mounted
(){
mounted
()
{
this
.
editor
=
new
Editor
({
onUpdate
:
()
=>
{
// this.content = this.editor.getHTML()
// this.$emit('getContent',this.content)
const
content
=
this
.
editor
.
getHTML
()
this
.
$emit
(
'update:editorContent'
,
content
)
const
content
=
this
.
editor
.
getHTML
();
this
.
$emit
(
"update:editorContent"
,
content
);
},
extensions
:
[
StarterKit
,
Timage
,
],
content
:
this
.
editorContent
,
autofocus
:
'start'
,
})
extensions
:
[
StarterKit
,
Timage
],
autofocus
:
"start"
,
});
},
beforeDestroy
()
{
this
.
editor
.
destroy
()
this
.
editor
.
destroy
()
;
},
})
})
;
</
script
>
<
style
lang=
"scss"
>
.editor__content
{
min-height
:
400px
;
img
{
img
{
display
:
block
;
margin
:
0
auto
;
}
...
...
@@ -76,12 +66,11 @@ export default Vue.extend({
/* Placeholder (at the top) */
.ProseMirror
p
.is-editor-empty
:first-child::before
{
content
:
'请输入文章正文'
;
content
:
"请输入文章正文"
;
float
:
left
;
color
:
#ced4da
;
pointer-events
:
none
;
height
:
0
;
font-style
:
italic
;
}
</
style
>
\ No newline at end of file
</
style
>
src/components/UserManage/superManagerTable.vue
View file @
3ba829d9
...
...
@@ -12,8 +12,8 @@
<template
#
created_at=
"text"
>
{{
text
|
formatDate
}}
</
template
>
<
template
#
status
=
"text"
>
{{
text
|
platformfilterUserStatus
}}
<
template
#
name
=
"text"
>
{{
text
+
1
}}
</
template
>
<div
slot=
"action"
slot-scope=
"text, record"
>
<a
...
...
src/components/productManage/const.ts
0 → 100644
View file @
3ba829d9
export
enum
modalType
{
add
,
remove
,
common
,
hot
,
delete
,
}
src/components/productManage/productTable.vue
View file @
3ba829d9
This diff is collapsed.
Click to expand it.
src/components/productManage/topbar.vue
View file @
3ba829d9
<
template
>
<div>
<a-input
placeholder=
"产品名称模糊搜索"
v-model=
"searchPageReqParams.name"
style=
" width:150px; margin-right:10px;"
/>
<span
class=
" font-semibold"
>
创建时间:
</span>
<timerange
class=
" mr-3"
@
getNewTime=
"getNewTime"
:startTime=
"searchPageReqParams.startTime"
:endTime=
"searchPageReqParams.endTime"
/>
<span
class=
" mr-3"
>
消息分类
</span>
<a-select
:default-value=
"productType[0]"
style=
"width: 120px; margin-right:10px;"
v-model=
"searchPageReqParams.type"
<a-input
placeholder=
"产品名称模糊搜索"
v-model=
"searchPageReqParams.name"
style=
"width: 150px; margin-right: 10px"
/>
<span
class=
"font-semibold"
>
创建时间:
</span>
<timerange
class=
"mr-3"
@
getNewTime=
"getNewTime"
:startTime=
"searchPageReqParams.startTime"
:endTime=
"searchPageReqParams.endTime"
/>
<span
class=
"mr-3"
>
消息分类
</span>
<a-select
:default-value=
"productType[0]"
style=
"width: 120px; margin-right: 10px"
v-model=
"searchPageReqParams.type"
>
<a-select-option
v-for=
"(type,i) in productType"
:key=
"i"
>
{{
type
}}
<a-select-option
v-for=
"(type,
i) in productType"
:key=
"i"
>
{{
type
}}
</a-select-option>
</a-select>
<a-button
type=
"primary"
style=
" margin-right:10px;"
@
click=
"query"
>
查询
</a-button>
<a-button
type=
"primary"
style=
" margin-right:10px;"
@
click=
"reset"
>
重置
</a-button>
<a-button
type=
"primary"
@
click=
"$router.push(
{name:'publishLoanProduct'})">发布
</a-button>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"query"
>
查询
</a-button
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"reset"
>
重置
</a-button
>
<a-button
type=
"primary"
@
click=
"$router.push(
{ name: 'publishLoanProduct' })"
>发布
</a-button
>
</div>
</
template
>
<
script
lang=
"ts"
>
import
Vue
,
{
PropType
}
from
'vue'
import
timerange
from
'@/components/TimePicker/index.vue'
import
Vue
,
{
PropType
}
from
"vue"
;
import
timerange
from
"@/components/TimePicker/index.vue"
;
import
LoanProductService
from
"@/service/LoanProductService/index"
;
import
{
PAGE_SIZE
}
from
"@/const/config/page"
;
import
{
mapActions
,
mapMutations
,
mapState
}
from
'vuex'
export
default
Vue
.
extend
({
components
:{
timerange
},
props
:{
productType
:{
type
:
Array
as
PropType
<
String
[]
>
,
default
(){
return
[
'全部'
,
'企业'
,
'个人'
]
}
}
components
:
{
timerange
},
props
:
{
productType
:
{
type
:
Array
as
PropType
<
String
[]
>
,
default
()
{
return
[
"全部"
,
"企业"
,
"个人"
];
}
,
}
,
},
data
(){
computed
:{
...
mapState
(
'loanProductManagement'
,
[
'start_time'
,
'end_time'
,
'name'
,
'loan_type'
,
]),
},
data
()
{
return
{
searchPageReqParams
:
{
name
:
''
,
type
:
''
,
name
:
""
,
type
:
""
,
startTime
:
undefined
as
undefined
|
number
,
endTime
:
undefined
as
undefined
|
number
,
offset
:
0
,
limit
:
PAGE_SIZE
,
},
};
},
watch
:
{
searchPageReqParams
:
{
deep
:
true
,
handler
(
newV
)
{
this
.
productSave
({
name
:
newV
.
name
,
start_time
:
newV
.
startTime
,
end_time
:
newV
.
endTime
,
loan_type
:
newV
.
type
,
})
},
}
}
,
},
methods
:{
getNewTime
(
startTime
:
number
,
endTime
:
number
){
this
.
searchPageReqParams
.
startTime
=
startTime
this
.
searchPageReqParams
.
endTime
=
endTime
methods
:
{
...
mapMutations
(
'loanProductManagement'
,
{
productSave
:
'save'
,
}),
...
mapActions
(
'loanProductManagement'
,
{
productQuery
:
'query'
,
}),
getNewTime
(
startTime
:
number
,
endTime
:
number
)
{
this
.
searchPageReqParams
.
startTime
=
startTime
;
this
.
searchPageReqParams
.
endTime
=
endTime
;
},
query
(){
console
.
log
(
this
.
searchPageReqParams
);
query
()
{
this
.
productSave
({
page
:
1
,
})
this
.
productQuery
()
},
reset
(){
this
.
searchPageReqParams
.
name
=
''
this
.
searchPageReqParams
.
type
=
''
this
.
searchPageReqParams
.
startTime
=
undefined
this
.
searchPageReqParams
.
endTime
=
undefined
reset
()
{
this
.
searchPageReqParams
.
name
=
""
;
this
.
searchPageReqParams
.
type
=
""
;
this
.
searchPageReqParams
.
startTime
=
undefined
;
this
.
searchPageReqParams
.
endTime
=
undefined
;
this
.
$nextTick
(()
=>
{
this
.
productSave
({
page
:
1
,
})
this
.
query
()
})
},
}
})
}
,
})
;
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/const/columns/activityColumn.ts
View file @
3ba829d9
...
...
@@ -3,7 +3,8 @@ const columns:Array<column>=[
{
title
:
'发布时间'
,
align
:
'center'
,
dataIndex
:
'time'
,
dataIndex
:
'created_at'
,
scopedSlots
:
{
customRender
:
'created_at'
},
},
{
title
:
'活动标题'
,
...
...
@@ -19,12 +20,12 @@ const columns:Array<column>=[
{
title
:
'状态'
,
align
:
'center'
,
dataIndex
:
'state'
,
dataIndex
:
'activity_status'
,
scopedSlots
:
{
customRender
:
'activity_status'
},
},
{
title
:
'操作'
,
align
:
'center'
,
dataIndex
:
'action'
,
scopedSlots
:
{
customRender
:
'action'
},
}
]
...
...
src/const/columns/productColumn.ts
View file @
3ba829d9
...
...
@@ -3,36 +3,39 @@ export default[
title
:
'发布时间'
,
align
:
'center'
,
dataIndex
:
'created_at'
,
scopedSlots
:
{
customRender
:
'created_at'
},
},
{
title
:
'产品名称'
,
align
:
'center'
,
dataIndex
:
'product_name'
,
scopedSlots
:
{
customRender
:
'name'
}
,
},
{
title
:
'产品分类'
,
align
:
'center'
,
dataIndex
:
'product_type'
,
scopedSlots
:
{
customRender
:
'product_type'
},
},
{
title
:
'贷款期限(月)'
,
align
:
'center'
,
dataIndex
:
'deadline'
,
scopedSlots
:
{
customRender
:
'date'
}
,
},
{
title
:
'参考利率(%)'
,
align
:
'center'
,
dataIndex
:
'interst'
,
scopedSlots
:
{
customRender
:
'rate'
}
,
},
{
title
:
'贷款额度(万元)'
,
align
:
'center'
,
dataIndex
:
'limit'
,
scopedSlots
:
{
customRender
:
'amount'
}
,
},
{
title
:
'担保方式'
,
align
:
'center'
,
dataIndex
:
'guarantee_type'
,
scopedSlots
:
{
customRender
:
'guarantee_type'
},
},
{
title
:
'产品介绍'
,
...
...
@@ -63,6 +66,7 @@ export default[
title
:
'状态'
,
align
:
'center'
,
dataIndex
:
'product_status'
,
scopedSlots
:
{
customRender
:
'product_status'
},
},
{
title
:
'操作'
,
...
...
src/filter/index.ts
View file @
3ba829d9
import
{
eBannerLocation
,
eBannerStatus
}
from
'@/types/banner'
import
{
eUserStatus
}
from
'@/types/user'
import
{
eGuaranteeType
,
eProductStatus
,
eProductType
}
from
'@/types/loanProduct'
import
{
editableProductStatus
,
eGuaranteeType
,
eProductType
}
from
'@/types/loanProduct'
import
{
activityStatus
}
from
"@/service/ActivityService/type"
import
moment
from
'moment'
export
default
{
...
...
@@ -52,26 +53,46 @@ export default {
return
'已发布'
}
},
filter
Guarantee
Type
(
type
:
eProductType
)
{
filter
Loan
Type
(
type
:
eProductType
)
{
switch
(
type
)
{
case
eProductType
.
all
:
return
'全部贷款'
case
eProductType
.
all
:
case
eProductType
.
company
:
return
'企业贷款'
case
eProductType
.
identity
:
return
'个人贷款'
}
},
filterProductStatus
(
status
:
eProductStatus
)
{
filterGuaranteeType
(
type
:
eGuaranteeType
)
{
switch
(
type
)
{
case
eGuaranteeType
.
credit
:
return
'信用'
case
eGuaranteeType
.
mortgage
:
return
'抵押'
case
eGuaranteeType
.
guarantee
:
return
'保证'
case
eGuaranteeType
.
discount
:
return
'贴现'
case
eGuaranteeType
.
composite
:
return
'综合'
case
eGuaranteeType
.
pledge
:
return
'质押'
}
},
filterProductStatus
(
status
:
editableProductStatus
)
{
switch
(
status
)
{
case
eProductStatus
.
all
:
return
'全部状态'
case
eProductStatus
.
unpublished
:
case
editableProductStatus
.
unpublished
:
return
'未发布'
case
eProductStatus
.
normal
:
return
'普通'
case
eProductStatus
.
hot
:
return
'热门'
case
editableProductStatus
.
normal
:
return
'已发布/普通'
case
editableProductStatus
.
hot
:
return
'已发布热门'
}
},
filterActivitytatus
(
status
:
activityStatus
)
{
switch
(
status
)
{
case
activityStatus
.
editable
:
return
'待发布'
case
activityStatus
.
published
:
return
'已发布'
}
},
}
as
{
...
...
src/router/index.ts
View file @
3ba829d9
...
...
@@ -64,7 +64,7 @@ const router = new VueRouter({
})
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
console
.
log
({
from
,
to
})
//
console.log({ from, to })
const
usermsg
=
getUserMsg
()
if
(
usermsg
===
undefined
)
{
...
...
@@ -80,17 +80,17 @@ router.beforeEach((to, from, next) => {
/* 有登录 */
const
roles
=
(
to
.
meta
as
{
roles
?:
eRole
[]
}).
roles
const
oldRole
=
getOldRoleFromUserMsg
(
usermsg
)
console
.
log
(
oldRole
,
roles
,
oldRole
&&
roles
&&
roles
.
includes
(
oldRole
))
//
console.log(oldRole, roles, oldRole && roles && roles.includes(oldRole))
const
userHasRoleInCurPage
=
oldRole
!==
undefined
&&
roles
!==
undefined
&&
roles
.
includes
(
oldRole
)
if
(
userHasRoleInCurPage
)
{
console
.
log
(
1
)
//
console.log(1)
next
()
}
else
{
if
(
oldRole
==
eRole
.
platform_management
)
{
console
.
log
(
2
)
//
console.log(2)
next
({
name
:
'platformUserManagement'
})
}
else
{
console
.
log
(
3
)
//
console.log(3)
next
({
name
:
'home'
})
}
}
...
...
src/service/ActivityService/index.ts
0 → 100644
View file @
3ba829d9
import
baseAxios
from
'../index'
const
prefix
=
'/activity/admin'
import
{
eActivityItem
}
from
"./type"
export
default
class
ActivityService
{
static
instance
:
ActivityService
static
getInstance
()
{
if
(
!
ActivityService
.
instance
)
{
ActivityService
.
instance
=
new
ActivityService
()
}
return
ActivityService
.
instance
}
addActivity
(
data
:
{
content
:
string
file_name
:
string
title
:
string
}
)
{
return
baseAxios
({
url
:
prefix
+
'/add'
,
method
:
'POST'
,
data
,
})
}
queryActivityList
(
data
:
{
activity_status
:
number
end_time
?:
number
limit
?:
number
offset
?:
number
start_time
?:
number
}
)
{
return
baseAxios
<
{
count
:
number
,
items
:
eActivityItem
[],
total
:
number
}
>
({
url
:
prefix
+
'/list'
,
method
:
'POST'
,
data
,
})
}
queryActivityInfo
(
uuid
:
string
)
{
return
baseAxios
<
{
count
:
number
,
items
:
eActivityItem
[],
total
:
number
}
>
({
url
:
'/activity/query/info?uuid='
+
uuid
,
method
:
'GET'
,
})
}
modifyActivity
(
data
:
{
content
:
string
file_name
:
string
title
:
string
uuid
:
string
})
{
return
baseAxios
({
url
:
prefix
+
'/modify'
,
method
:
'POST'
,
data
,
})
}
modifyActivityStatus
(
data
:
{
activity_status
:
number
,
uuid
:
string
,
})
{
return
baseAxios
({
url
:
prefix
+
'/modify/status'
,
method
:
'POST'
,
data
,
})
}
deleteActivity
(
uuid
:
string
)
{
return
baseAxios
({
url
:
prefix
+
'/delete?uuid='
+
uuid
,
method
:
'DELETE'
,
})
}
}
\ No newline at end of file
src/service/ActivityService/type.ts
0 → 100644
View file @
3ba829d9
export
enum
activityStatus
{
all
=
0
,
editable
=
1
,
//未发布
published
=
2
//已发布
}
export
interface
eActivityItem
{
activity_status
:
activityStatus
,
content
:
string
,
created_at
:
number
,
file_name
:
string
,
title
:
string
,
update_at
:
number
,
uuid
:
string
}
src/service/LoanProductService/index.ts
View file @
3ba829d9
import
baseAxios
from
'../index'
import
{
eProductType
,
eProductStatus
,
eGuaranteeType
}
from
"@/types/loanProduct"
import
{
eProductType
,
eProductStatus
,
eGuaranteeType
,
editableProductStatus
}
from
"@/types/loanProduct"
import
{
iLoanProdcutItem
}
from
"./type"
const
prefix
=
'/loan/admin'
export
default
class
LoanProductService
{
static
instance
:
LoanProductService
...
...
@@ -14,39 +16,98 @@ export default class LoanProductService {
data
:
{
apply_cond
:
string
apply_to
:
string
features
:
string
guarantee_type
:
eGuaranteeType
inst_name
:
string
loan_type
:
eProductType
max_amount
:
string
max_date
:
string
product_name
:
string
products
:
string
rate_lower
:
string
rate_upper
:
string
submit_cond
:
string
}
){
features
:
string
guarantee_type
:
eGuaranteeType
inst_name
:
string
loan_type
:
eProductType
max_amount
:
string
max_date
:
string
product_name
:
string
products
:
string
rate_lower
:
string
rate_upper
:
string
submit_cond
:
string
min_date
:
string
min_amount
:
string
}
)
{
return
baseAxios
({
url
:
'/loan/admin/list
'
,
url
:
prefix
+
'/add
'
,
method
:
'POST'
,
data
,
})
}
queryDirectLoanReq
(
data
:
{
end_time
?:
number
limit
?:
number
loan_type
:
eProductType
offset
:
number
product_status
:
eProductStatus
start_time
?:
number
})
{
modifyLoan
(
data
:
{
apply_cond
:
string
apply_to
:
string
features
:
string
guarantee_type
:
eGuaranteeType
inst_name
:
string
product_type
:
eProductType
max_amount
:
string
max_date
:
string
product_name
:
string
products
:
string
rate_lower
:
string
rate_upper
:
string
submit_cond
:
string
min_amount
:
string
min_date
:
string
uuid
:
string
}
)
{
return
baseAxios
({
url
:
prefix
+
'/modify'
,
method
:
'POST'
,
data
,
})
}
modifyLoanStatus
(
data
:
{
product_status
:
editableProductStatus
,
uuid
:
string
})
{
return
baseAxios
({
url
:
'/loan/admin/list
'
,
url
:
prefix
+
'/modify/status
'
,
method
:
'POST'
,
data
,
})
}
queryDirectLoanReq
(
data
:
{
end_time
?:
number
limit
?:
number
loan_type
:
eProductType
offset
?:
number
product_status
:
eProductStatus
start_time
?:
number
})
{
return
baseAxios
<
{
count
:
number
items
:
iLoanProdcutItem
[]
total
:
number
}
>
({
url
:
prefix
+
'/list'
,
method
:
'POST'
,
data
,
})
}
queryInfo
(
uuid
:
string
)
{
return
baseAxios
({
url
:
'/loan/query/info?uuid='
+
uuid
,
method
:
'get'
,
})
}
deleteLoanItem
(
uuid
:
string
)
{
return
baseAxios
({
url
:
prefix
+
'/delete?uuid='
+
uuid
,
method
:
'delete'
,
})
}
}
\ No newline at end of file
src/service/LoanProductService/type.ts
0 → 100644
View file @
3ba829d9
export
interface
iLoanProdcutItem
{
apply_cond
:
string
,
apply_to
:
string
,
created_at
:
number
,
features
:
string
,
guarantee_type
:
number
,
inst_name
:
string
,
max_amount
:
string
,
max_date
:
string
,
min_amount
:
string
,
min_date
:
string
,
product_name
:
string
,
product_status
:
number
,
product_type
:
number
,
products
:
string
,
rate_lower
:
string
,
rate_upper
:
string
,
submit_cond
:
string
,
update_at
:
number
,
uuid
:
string
}
\ No newline at end of file
src/service/UserManagementService/index.ts
View file @
3ba829d9
...
...
@@ -160,7 +160,7 @@ export default class UserService {
total
:
number
}
>
({
method
:
'get'
,
url
:
'/
admin/
query/banks'
,
url
:
'/query/banks'
,
})
}
}
...
...
src/store/LoanProductManagement/index.ts
0 → 100644
View file @
3ba829d9
import
{
eProductType
,
eProductStatus
}
from
"@/types/loanProduct"
import
{
PAGE_SIZE
}
from
'@/const/config/page'
import
LoanProductService
from
"@/service/LoanProductService/index"
import
{
Module
}
from
'vuex'
import
{
iListItem
,
iProductModuleState
}
from
'./type'
export
default
<
Module
<
iProductModuleState
,
{}
>>
{
namespaced
:
true
,
state
:
{
list
:
[]
as
iListItem
[],
end_time
:
undefined
,
limit
:
PAGE_SIZE
,
loan_type
:
eProductType
.
all
,
offset
:
0
,
product_status
:
eProductStatus
.
all
,
start_time
:
undefined
,
loading
:
false
,
total
:
0
,
page
:
1
,
name
:
''
},
mutations
:
{
save
(
state
,
payload
)
{
Object
.
assign
(
state
,
payload
)
},
},
actions
:
{
async
query
({
state
,
commit
},
payload
)
{
state
.
loading
=
true
const
ret
=
await
LoanProductService
.
getInstance
().
queryDirectLoanReq
({
end_time
:
state
.
end_time
as
number
,
limit
:
state
.
limit
,
loan_type
:
0
,
offset
:
state
.
offset
as
number
,
product_status
:
0
,
start_time
:
state
.
start_time
as
number
,
})
if
(
ret
.
code
===
200
)
{
commit
(
'save'
,
{
list
:
ret
.
data
.
items
,
total
:
ret
.
data
.
total
,
})
state
.
loading
=
false
}
},
},
}
src/store/LoanProductManagement/type.ts
0 → 100644
View file @
3ba829d9
import
{
eProductType
,
eProductStatus
}
from
"@/types/loanProduct"
export
interface
iListItem
{
apply_cond
:
string
,
apply_to
:
string
,
created_at
:
number
,
features
:
string
,
guarantee_type
:
number
,
inst_name
:
string
,
max_amount
:
string
,
max_date
:
string
,
min_amount
:
string
,
min_date
:
string
,
product_name
:
string
,
product_status
:
number
,
product_type
:
number
,
products
:
string
,
rate_lower
:
string
,
rate_upper
:
string
,
submit_cond
:
string
,
update_at
:
number
,
uuid
:
string
}
export
interface
iProductModuleState
{
list
:
iListItem
[]
end_time
:
number
|
undefined
limit
:
number
|
undefined
loan_type
:
eProductType
offset
:
number
|
undefined
product_status
:
eProductStatus
start_time
:
number
|
undefined
total
:
number
page
:
number
name
:
string
loading
:
boolean
}
src/store/index.ts
View file @
3ba829d9
...
...
@@ -2,16 +2,19 @@ import Vue from 'vue'
import
Vuex
from
'vuex'
import
platformUserManagement
from
'./platformUserManagement/index'
import
{
iPlatformModuleState
}
from
'./platformUserManagement/types'
import
loanProductManagement
from
'./LoanProductManagement/index'
import
{
iProductModuleState
}
from
'./LoanProductManagement/type'
Vue
.
use
(
Vuex
)
const
store
=
new
Vuex
.
Store
<
{
platformUserManagement
?:
iPlatformModuleState
}
>
(
const
store
=
new
Vuex
.
Store
<
{
platformUserManagement
?:
iPlatformModuleState
,
loanProductManagement
?:
iProductModuleState
}
>
(
{
state
:
{},
mutations
:
{},
actions
:
{},
modules
:
{
platformUserManagement
,
loanProductManagement
,
},
},
)
...
...
src/types/loanProduct.ts
View file @
3ba829d9
export
enum
eGuaranteeType
{
credit
=
1
,
mortgage
=
2
,
uarantee
=
3
,
g
uarantee
=
3
,
discount
=
4
,
composite
=
5
,
P
ledge
=
6
p
ledge
=
6
}
export
enum
eProductStatus
{
...
...
@@ -14,8 +14,14 @@ export enum eProductStatus{
hot
=
3
}
export
enum
editableProductStatus
{
unpublished
=
1
,
normal
=
2
,
hot
=
3
}
export
enum
eProductType
{
all
=
0
,
company
=
1
,
identity
=
2
}
\ No newline at end of file
}
src/types/role.ts
View file @
3ba829d9
export
enum
eRole
{
platform_management
,
// 平台管理员
platform_management
,
// 平台管理员
admin admin
superManager
,
// 超级管理员 也叫 银行管理员
firstLevel_branch
,
// 一级分行管理员
...
...
src/utils/StaffUtils/index.ts
View file @
3ba829d9
...
...
@@ -157,33 +157,38 @@ function parseJSYHSheet(Sheet: any) {
/* 只能解析xlsx文件 accpet设置 .xlsx */
export const handle建设银行excelFileChange = (e: Event) => {
const files = (e.target as HTMLInputElement).files
if (files && files.length !== 0) {
const f = files[0]
var reader = new FileReader()
reader.onload = function (e) {
var data = new Uint8Array(
((e.target as any).result as unknown) as ArrayBufferLike,
)
var workbook = xlsx.read(data, { type: 'array' })
/* DO SOMETHING WITH workbook HERE */
return new Promise((resolve) => {
const files = (e.target as HTMLInputElement).files
if (files && files.length !== 0) {
const f = files[0]
var reader = new FileReader()
reader.onload = function (e) {
var data = new Uint8Array(
((e.target as any).result as unknown) as ArrayBufferLike,
)
var workbook = xlsx.read(data, { type: 'array' })
/* DO SOMETHING WITH workbook HERE */
const Sheets = workbook.Sheets
const SheetsKeys = Object.keys(Sheets)
if (SheetsKeys.length !== 0) {
const list = (parseJSYHSheet(Sheets[SheetsKeys[0]]) as unknown) as any[]
const locationList = getAddressList((list as unknown) as any)
console.log(JSON.stringify(locationList))
getAddressLalonObj(locationList).then((addressLalonObj) => {
list.forEach((data) => {
data.la_lon = addressLalonObj[data.location]
const Sheets = workbook.Sheets
const SheetsKeys = Object.keys(Sheets)
if (SheetsKeys.length !== 0) {
const list = (parseJSYHSheet(
Sheets[SheetsKeys[0]],
) as unknown) as any[]
const locationList = getAddressList((list as unknown) as any)
console.log(JSON.stringify(locationList))
getAddressLalonObj(locationList).then((addressLalonObj) => {
list.forEach((data) => {
data.la_lon = addressLalonObj[data.location]
})
console.log(list, 'show list')
resolve(list)
})
console.log(list, 'show list')
})
} else {
throw new Error('excel文件无Sheet')
} else {
throw new Error('excel文件无Sheet')
}
}
reader.readAsArrayBuffer(f)
}
reader.readAsArrayBuffer(f)
}
})
}
src/utils/outlet/index.ts
View file @
3ba829d9
...
...
@@ -12,7 +12,7 @@ export async function getSelfOutLet(): Promise<iOutLet> {
const
data
:
iOutLet
=
ret
.
data
localStorage
.
setItem
(
OUT_LET
,
JSON
.
stringify
(
data
))
}
else
{
throw
new
Error
(
'用户网点信息获取失败
F
'
)
throw
new
Error
(
'用户网点信息获取失败'
)
}
}
const
storage
=
localStorage
.
getItem
(
OUT_LET
)
...
...
src/views/Login/index.vue
View file @
3ba829d9
...
...
@@ -219,6 +219,7 @@ export default Vue.extend({
const
ret
=
await
UserService
.
getInstance
().
login
({
is_admin
:
isAdminAccount
,
use_pwd
:
true
,
phone
:
isAdminAccount
?
undefined
:
name
,
pwd
,
});
console
.
log
(
ret
);
...
...
src/views/Root/Activity/detail.vue
View file @
3ba829d9
<
template
>
<div>
<p
class=
" text-2xl font-bold mb-5 "
>
{{
title
}}
</p>
<p
class=
" text-gray-400"
>
发布时间:
{{
time
}}
<span
class=
" ml-2"
>
作者:
{{
name
}}
</span></p>
<p
class=
"text-left p-5"
>
{{
content
}}
</p>
<p
class=
"text-2xl font-bold mb-5"
>
{{
title
}}
</p>
{{
$route
.
query
.
id
}}
<p
class=
"text-gray-400"
>
发布时间:
{{
time
|
formatDate
}}
</p>
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
" mx-auto my-5"
/>
<p
class=
"text-left p-5"
v-html=
"content"
>
{{
content
}}
</p>
</div>
</
template
>
<
script
lang=
"ts"
>
import
Vue
from
'vue'
import
Vue
from
"vue"
;
import
ActivityService
from
"@/service/ActivityService/index"
;
import
{
eActivityItem
}
from
"@/service/ActivityService/type"
;
import
FileService
from
"@/service/FileService/index"
;
export
default
Vue
.
extend
({
data
(){
return
{
title
:
'银保监会、人民银行联合出台现金管理类理财产品监管规则'
,
time
:
'2021-07-01'
,
name
:
'丁洁'
,
content
:
'“中国冰雪大篷车”是国家体育总局深入推进冰雪运动“南展西扩东进”战略,落实“带动三亿人参与冰雪运动”目标的重要群众性活动之一。“中国冰雪大篷车”将在为期半年的时间里,深入全国30余个城市,举办100场线下活动,同时结合持续的线上互动,以创新的体验模式、丰富的活动内容和众多的展示渠道,普及冰雪运动常识,推广冰雪运动理念,让普通大众在家门口就能感受冰雪运动的乐趣。'
data
()
{
return
{
uuid
:
""
,
title
:
""
,
file_name
:
undefined
as
undefined
|
string
,
time
:
0
,
content
:
""
,
imageUrl
:
""
,
};
},
async
mounted
()
{
this
.
uuid
=
this
.
$route
.
params
.
uuid
;
const
ret
=
await
ActivityService
.
getInstance
().
queryActivityInfo
(
this
.
uuid
);
if
(
ret
.
code
==
200
)
{
const
item
:
eActivityItem
=
ret
.
data
as
unknown
as
eActivityItem
;
this
.
title
=
item
.
title
;
this
.
time
=
item
.
created_at
;
this
.
content
=
item
.
content
;
this
.
file_name
=
item
.
file_name
;
}
}
})
if
(
this
.
file_name
)
{
this
.
imageUrl
=
FileService
.
getInstance
().
getImageSrc
(
this
.
file_name
)
}
},
});
</
script
>
\ No newline at end of file
src/views/Root/Activity/index.vue
View file @
3ba829d9
<
template
>
<div>
<p
class=
"
text-2xl font-bold mb-5"
>
活动管理
</p>
<p
class=
"text-2xl font-bold mb-5"
>
活动管理
</p>
<!-- 搜索框 -->
<a-input
placeholder=
"活动名称模糊搜索"
v-model=
"searchPageReqParams.name"
style=
"width: 150px; margin-right:10px;"
/>
<!-- timepicker -->
<span
class=
" font-semibold"
>
注册时间:
</span>
<timerange
class=
" mr-3"
@
getNewTime=
"getNewTime"
/>
<a-input
placeholder=
"活动名称模糊搜索"
v-model=
"searchPageReqParams.name"
style=
"width: 150px; margin-right: 10px"
/>
<!-- timepicker -->
<span
class=
"font-semibold"
>
注册时间:
</span>
<timerange
class=
"mr-3"
:startTime=
"searchPageReqParams.startTime"
:endTime=
"searchPageReqParams.endTime"
@
getNewTime=
"getNewTime"
/>
<!-- 操作 -->
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"query"
>
查询
</a-button
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"reset"
>
重置
</a-button
>
<a-button
type=
"primary"
@
click=
"release"
>
发布
</a-button>
<!-- 资讯列表 -->
<a-table
:columns=
"columns"
:data-source=
"list"
style=
"text-align: center; margin-top: 40px"
bordered
:loading=
"tableLoading"
:pagination=
"false"
>
<template
#
created_at=
"text"
>
{{
text
|
formatDate
}}
</
template
>
<
template
#
activity_status=
"text"
>
{{
text
|
filterActivitytatus
}}
</
template
>
<!-- 新闻内容 -->
<span
slot=
"content"
slot-scope=
"text, record"
>
<a
@
click=
"toDetail(record)"
>
查看
</a>
</span>
<!-- 操作 -->
<a-button
type=
"primary"
style=
" margin-right:10px;"
@
click=
"query"
>
查询
</a-button>
<a-button
type=
"primary"
style=
" margin-right:10px;"
@
click=
"reset"
>
重置
</a-button>
<a-button
type=
"primary"
@
click=
"release"
>
发布
</a-button>
<!-- 资讯列表 -->
<a-table
:columns=
"columns"
:data-source=
"list"
style=
" text-align: center; margin-top:40px;"
bordered
>
<!-- 新闻内容 -->
<span
slot=
"content"
slot-scope=
"text,record"
>
<a
@
click=
"toDetail(record.key)"
>
查看
</a>
</span>
<!-- 操作 -->
<span
slot=
"action"
slot-scope=
"text,record"
>
<a
v-if=
"record.state=='已下架'"
@
click=
"add(record.key)"
>
上架
</a>
<a
v-else
@
click=
"remove(record.key)"
>
下架
</a>
<span
slot=
"action"
slot-scope=
"text, record"
>
<span
v-if=
"record.activity_status == activityStatus.editable"
>
<a
@
click=
"add(record)"
>
上架
</a>
<a-divider
type=
"vertical"
/>
<a
@
click=
"edit(record)"
>
编辑
</a>
<a-divider
type=
"vertical"
/>
<a
@
click=
"onDelete(record.key)"
>
删除
</a>
<a
@
click=
"onDelete(record)"
>
删除
</a>
</span>
</a-table>
<!-- 操作Modal -->
<a-modal
:title=
"title"
v-model=
"show"
:centered=
"true"
:closable=
"false"
@
ok=
"handleOk"
@
cancle=
"show = false"
>
<p
class=
" text-center"
>
{{
text
}}
</p>
</a-modal>
<a
v-else
@
click=
"remove(record)"
>
下架
</a>
</span>
</a-table>
<a-pagination
class=
"text-right mt-4"
:current=
"current"
:total=
"total"
:pageSize=
"PAGE_SIZE"
@
change=
"handlePaginationChange"
></a-pagination>
<!-- 操作Modal -->
<a-modal
:title=
"title"
v-model=
"show"
:centered=
"true"
:closable=
"false"
@
ok=
"handleOk"
:confirmLoading=
"modalLoading"
@
cancle=
"show = false"
>
<p
class=
"text-center"
>
{{ text }}
</p>
</a-modal>
</div>
</template>
<
script
lang=
"ts"
>
import
Vue
from
'vue'
import
{
activityList
}
from
'@/mock/index'
import
{
columns
}
from
'@/const/columns/activityColumn'
import
{
modal
}
from
'./const'
import
timerange
from
'@/components/TimePicker/index.vue'
import
Vue
from
"vue"
;
import
{
columns
}
from
"@/const/columns/activityColumn"
;
import
{
modal
}
from
"./const"
;
import
timerange
from
"@/components/TimePicker/index.vue"
;
import
ActivityService
from
"@/service/ActivityService/index"
;
import
{
eActivityItem
,
activityStatus
}
from
"@/service/ActivityService/type"
;
import
{
PAGE_SIZE
}
from
"@/const/config/page"
;
export
default
Vue
.
extend
({
components
:{
timerange
},
computed
:{
columns
(){
return
columns
components
:
{
timerange
},
computed
:
{
columns
()
{
return
columns
;
},
current
():
number
{
return
this
.
searchPageReqParams
.
offset
/
PAGE_SIZE
+
1
;
},
list
(){
return
activityList
}
},
data
(){
return
{
data
()
{
return
{
searchPageReqParams
:
{
name
:
''
,
name
:
""
,
startTime
:
undefined
as
undefined
|
number
,
endTime
:
undefined
as
undefined
|
number
,
offset
:
0
,
},
show
:
false
,
title
:
''
,
type
:
modal
.
on
,
text
:
''
,
}
show
:
false
,
title
:
""
,
type
:
modal
.
on
,
text
:
""
,
activityStatus
,
uuid
:
""
,
modalLoading
:
false
,
list
:
[]
as
eActivityItem
[],
total
:
0
,
tableLoading
:
false
,
PAGE_SIZE
};
},
methods
:{
query
(){
console
.
log
(
this
.
searchPageReqParams
);
mounted
()
{
this
.
fetchList
();
},
methods
:
{
handlePaginationChange
(
current
:
number
)
{
this
.
searchPageReqParams
.
offset
=
(
current
-
1
)
*
PAGE_SIZE
;
console
.
log
(
current
,
this
.
searchPageReqParams
.
offset
);
this
.
fetchList
();
},
getNewTime
(
startTime
:
number
,
endTime
:
number
){
this
.
searchPageReqParams
.
startTime
=
startTime
this
.
searchPageReqParams
.
endTime
=
endTime
fetchList
()
{
this
.
tableLoading
=
true
ActivityService
.
getInstance
()
.
queryActivityList
({
activity_status
:
activityStatus
.
all
,
end_time
:
this
.
searchPageReqParams
.
endTime
,
limit
:
PAGE_SIZE
,
offset
:
this
.
searchPageReqParams
.
offset
,
start_time
:
this
.
searchPageReqParams
.
startTime
,
})
.
then
((
ret
)
=>
{
if
(
ret
.
code
===
200
)
{
this
.
list
=
ret
.
data
.
items
;
this
.
total
=
ret
.
data
.
total
;
this
.
tableLoading
=
false
}
});
},
reset
(){
this
.
searchPageReqParams
.
name
=
''
this
.
searchPageReqParams
.
startTime
=
undefined
this
.
searchPageReqParams
.
endTime
=
undefined
query
()
{
this
.
fetchList
();
},
release
(){
this
.
$router
.
push
({
name
:
'publishActivity'
})
getNewTime
(
startTime
:
number
,
endTime
:
number
)
{
this
.
searchPageReqParams
.
startTime
=
startTime
;
this
.
searchPageReqParams
.
endTime
=
endTime
;
},
edit
(
key
:
string
){
this
.
$router
.
push
({
name
:
'publishActivity'
,
query
:{
key
:
key
}})
reset
()
{
this
.
searchPageReqParams
.
name
=
""
;
this
.
searchPageReqParams
.
startTime
=
undefined
;
this
.
searchPageReqParams
.
endTime
=
undefined
;
},
add
(
record
:
any
){
this
.
type
=
modal
.
on
this
.
show
=
true
this
.
title
=
'上架资讯'
this
.
text
=
'确定上架该资讯吗?'
release
()
{
this
.
$router
.
push
({
name
:
"publishActivity"
});
},
remove
(
record
:
any
)
{
this
.
type
=
modal
.
off
this
.
show
=
true
this
.
title
=
'下架活动'
this
.
text
=
'确定下架该活动吗?'
edit
(
record
:
any
)
{
this
.
$router
.
push
({
name
:
"editActivity"
,
params
:
{
uuid
:
record
.
uuid
},
});
},
onDelete
(
record
:
any
){
this
.
type
=
modal
.
delete
this
.
show
=
true
this
.
title
=
'删除活动'
this
.
text
=
'确定删除该活动吗?'
add
(
record
:
any
)
{
this
.
uuid
=
record
.
uuid
;
this
.
type
=
modal
.
on
;
this
.
show
=
true
;
this
.
title
=
"上架资讯"
;
this
.
text
=
"确定上架该资讯吗?"
;
},
handleOk
(
record
:
any
){
if
(
this
.
type
==
modal
.
on
){
}
else
if
(
this
.
type
==
modal
.
off
){
}
else
if
(
this
.
type
==
modal
.
delete
){
}
this
.
show
=
false
remove
(
record
:
any
)
{
this
.
uuid
=
record
.
uuid
;
this
.
type
=
modal
.
off
;
this
.
show
=
true
;
this
.
title
=
"下架活动"
;
this
.
text
=
"确定下架该活动吗?"
;
},
toDetail
(
key
:
string
){
this
.
$router
.
push
({
name
:
'activityDetail'
,
query
:{
key
:
key
}})
}
}
})
onDelete
(
record
:
any
)
{
this
.
uuid
=
record
.
uuid
;
this
.
type
=
modal
.
delete
;
this
.
show
=
true
;
this
.
title
=
"删除活动"
;
this
.
text
=
"确定删除该活动吗?"
;
},
handleOk
(
record
:
any
)
{
this
.
modalLoading
=
true
;
try
{
if
(
this
.
type
==
modal
.
on
)
{
ActivityService
.
getInstance
().
modifyActivityStatus
({
uuid
:
this
.
uuid
,
activity_status
:
activityStatus
.
published
,
});
}
else
if
(
this
.
type
==
modal
.
off
)
{
ActivityService
.
getInstance
().
modifyActivityStatus
({
uuid
:
this
.
uuid
,
activity_status
:
activityStatus
.
editable
,
});
}
else
if
(
this
.
type
==
modal
.
delete
)
{
ActivityService
.
getInstance
().
deleteActivity
(
this
.
uuid
);
}
this
.
fetchList
();
this
.
show
=
false
;
}
catch
(
err
)
{}
this
.
modalLoading
=
false
;
},
toDetail
(
record
:
any
)
{
const
uuid
=
record
.
uuid
;
this
.
$router
.
push
({
name
:
"activityDetail"
,
params
:
{
uuid
:
uuid
}
});
},
},
});
</
script
>
src/views/Root/Activity/publish.vue
View file @
3ba829d9
<
template
>
<div
class=
" editor"
>
<p
class=
" text-2xl font-bold mb-5"
>
发布活动
</p>
<input
v-model=
"title"
placeholder=
"请输入标题"
class=
"border-gray-300 border-2 px-3 py-2 w-full focus:outline-none focus:ring rounded"
/>
<!-- 上传概要图片 -->
<editor-upload/>
<!-- 编辑器 -->
<editor
class=
"edit-news text-left"
@
getContent=
"getContent"
/>
<!-- 发布操作 -->
<a-button
type=
"primary"
@
click=
"onSubmit"
class=
" mt-5"
>
确定发布
</a-button>
<div
class=
"editor"
>
<p
class=
"text-2xl font-bold mb-5"
>
发布活动
</p>
<a-form-model
:model=
"form"
:rules=
"rules"
ref=
"activityPublishForm"
>
<a-form-model-item
prop=
"title"
>
<a-input
v-model=
"form.title"
placeholder=
"请输入标题"
/>
</a-form-model-item>
<!-- 上传概要图片 -->
<a-form-model-item
prop=
"file_hash"
ref=
"timeUploader"
:autoLink=
"false"
>
<editor-upload
@
getFileHash=
"getFileHash"
:path=
"file_src"
/>
</a-form-model-item>
<!-- 编辑器 -->
<a-form-model-item
prop=
"content"
ref=
"editor"
:autoLink=
"false"
>
<editor
class=
"edit-news text-left"
@
getContent=
"getContent"
:editorContent
.
sync=
"form.content"
:text=
"form.editableContent"
/>
</a-form-model-item>
<!-- 发布操作 -->
<a-button
type=
"primary"
@
click=
"onSubmit"
class=
"mt-5"
>
确定发布
</a-button
>
</a-form-model>
</div>
</
template
>
<
script
lang=
"ts"
>
import
Vue
from
'vue'
import
Editor
from
'@/components/Editor/index.vue'
import
EditorUpload
from
'@/components/Editor/editorUpload.vue'
import
Vue
from
"vue"
;
import
Editor
from
"@/components/Editor/index.vue"
;
import
EditorUpload
from
"@/components/Editor/editorUpload.vue"
;
import
ActivityService
from
"@/service/ActivityService/index"
;
import
{
message
,
FormModel
}
from
"ant-design-vue"
;
import
{
eActivityItem
}
from
"@/service/ActivityService/type"
;
import
FileService
from
"@/service/FileService/index"
;
export
default
Vue
.
extend
({
components
:{
Editor
,
EditorUpload
},
data
(){
return
{
title
:
''
,
content
:
''
components
:
{
Editor
,
EditorUpload
},
data
()
{
return
{
form
:
{
title
:
""
,
content
:
""
,
file_hash
:
""
,
editableContent
:
""
,
},
rules
:
{
title
:
[{
required
:
true
,
message
:
"请输入文章标题"
,
trigger
:
"blur"
}],
content
:
[
{
required
:
true
,
message
:
"请输入文章内容"
,
trigger
:
"blur"
},
],
file_hash
:
[
{
required
:
true
,
message
:
"请上传概要图片"
,
trigger
:
"blur"
},
],
},
uuid
:
""
,
isEditable
:
false
,
file_src
:
""
,
};
},
created
()
{
this
.
isEditable
=
this
.
$route
.
name
==
"editActivity"
?
true
:
false
;
if
(
this
.
isEditable
)
{
this
.
uuid
=
this
.
$route
.
params
.
uuid
;
ActivityService
.
getInstance
()
.
queryActivityInfo
(
this
.
uuid
)
.
then
((
ret
)
=>
{
const
items
:
eActivityItem
=
ret
.
data
as
unknown
as
eActivityItem
;
if
(
ret
.
code
===
200
)
{
this
.
form
.
title
=
items
.
title
;
this
.
form
.
editableContent
=
items
.
content
;
this
.
form
.
file_hash
=
items
.
file_name
;
if
(
this
.
form
.
file_hash
)
{
this
.
file_src
=
FileService
.
getInstance
().
getImageSrc
(
this
.
form
.
file_hash
);
}
}
else
{
return
;
}
});
}
},
methods
:{
getContent
(
value
:
string
){
this
.
content
=
value
methods
:
{
getContent
(
value
:
string
)
{
this
.
form
.
content
=
value
;
(
this
.
$refs
.
editor
as
any
).
onFieldBlur
();
},
getFileHash
(
value
:
string
)
{
this
.
form
.
file_hash
=
value
;
(
this
.
$refs
.
timeUploader
as
any
).
onFieldBlur
();
},
isValid
():
boolean
{
let
isValid
=
false
;
(
this
.
$refs
.
activityPublishForm
as
FormModel
).
validate
((
valid
)
=>
{
if
(
valid
)
{
isValid
=
true
;
}
else
{
isValid
=
false
;
}
});
return
isValid
;
},
onSubmit
()
{
async
onSubmit
()
{
if
(
this
.
isValid
())
{
if
(
this
.
isEditable
)
{
const
ret
=
await
ActivityService
.
getInstance
().
modifyActivity
({
title
:
this
.
form
.
title
,
content
:
this
.
form
.
content
,
file_name
:
this
.
form
.
file_hash
,
uuid
:
this
.
uuid
,
});
if
(
ret
.
code
==
200
)
{
message
.
success
(
"编辑成功"
);
this
.
$router
.
push
({
name
:
"activity"
});
}
else
{
return
;
}
}
else
{
const
ret
=
await
ActivityService
.
getInstance
().
addActivity
({
title
:
this
.
form
.
title
,
content
:
this
.
form
.
content
,
file_name
:
this
.
form
.
file_hash
,
});
console
.
log
(
ret
);
if
(
ret
.
code
==
200
)
{
message
.
success
(
"发布成功"
);
this
.
$router
.
push
({
name
:
"activity"
});
}
else
{
return
;
}
}
}
else
{
return
;
}
},
}
})
}
,
})
;
</
script
>
<
style
lang=
"scss"
>
</
style
>
\ No newline at end of file
src/views/Root/Banner/index.vue
View file @
3ba829d9
...
...
@@ -114,6 +114,7 @@
class=
"text-right mt-4"
:current=
"current"
:total=
"total"
:pageSize=
"PAGE_SIZE"
@
change=
"handlePaginationChange"
></a-pagination>
<!-- 操作Modal -->
...
...
@@ -207,6 +208,7 @@ export default Vue.extend({
{
required
:
true
,
message
:
'请上传文件'
,
trigger
:
'change'
},
],
},
PAGE_SIZE
,
showViewer
:
false
,
url
:
''
,
list
,
...
...
src/views/Root/Msg/index.vue
View file @
3ba829d9
...
...
@@ -3,7 +3,7 @@
<p
class=
" text-2xl font-bold mb-5"
>
消息管理
</p>
<!-- 消息分类 -->
<span
class=
" mr-3"
>
消息分类
</span>
<a-select
:default-value=
"1"
style=
"width: 120px; margin-right:10px;"
>
<a-select
:default-value=
"1"
style=
"width: 120px; margin-right:10px;"
v-model=
"form.type"
>
<a-select-option
v-for=
"type in msgType"
:key=
"type.value"
>
{{
type
.
label
}}
</a-select-option>
</a-select>
<!-- 操作 -->
...
...
@@ -125,10 +125,6 @@ export default Vue.extend({
type
:
Array
,
default
(){
return
[
// {
// label: '全部',
// value: 0
// },
{
label
:
'滚动通知'
,
value
:
1
...
...
@@ -146,12 +142,13 @@ export default Vue.extend({
},
methods
:{
getList
()
{
console
.
log
(
this
.
form
.
type
)
notify
.
notifyList
({
limit
:
this
.
pagination
.
defaultPageSize
,
offset
:
(
this
.
pagination
.
current
-
1
)
*
this
.
pagination
.
defaultPageSize
,
notify_status
:
0
,
// notify_type: this.form.type
notify_type
:
0
notify_type
:
this
.
form
.
type
//
notify_type: 0
}).
then
(
res
=>
{
this
.
list
=
res
.
data
.
items
this
.
pagination
.
total
=
res
.
data
.
total
...
...
src/views/Root/News/index.vue
View file @
3ba829d9
...
...
@@ -166,6 +166,8 @@ export default Vue.extend({
const
searchParams
=
this
.
searchPageReqParams
.
article_type
===
1
?
"searchByPolicy"
:
"searchByTitle"
news
[
searchParams
]({
title
:
this
.
searchPageReqParams
.
title
}).
then
(
res
=>
{
console
.
log
(
res
)
this
.
list
=
res
.
data
.
items
this
.
pagination
.
total
=
res
.
data
.
total
})
},
query
(){
...
...
src/views/Root/News/publish.vue
View file @
3ba829d9
...
...
@@ -12,11 +12,11 @@
</a-select>
</div>
<!-- 上传概要图片 -->
<editor-upload
class=
" mt-5"
:
imgUrl
.
sync=
"imgUrl
"
/>
<editor-upload
class=
" mt-5"
:
path=
"imageUrl"
@
getFileHash=
"getImage
"
/>
<!-- 文章概要 -->
<a-textarea
v-model=
"summary"
:maxLength=
"50"
placeholder=
"请输入文章概要,字数限制50字以内"
auto-size
/>
<!-- 编辑器 -->
<editor
class=
"edit-news text-left mt-5"
:editorContent
.
sync=
"content"
<editor
class=
"edit-news text-left mt-5"
:
text=
"editableContent"
:
editorContent
.
sync=
"content"
@
getContent=
"getContent"
/>
<!-- 发布操作 -->
<a-button
type=
"primary"
@
click=
"onSubmit"
class=
" mt-5"
>
确定发布
</a-button>
...
...
@@ -28,6 +28,7 @@ import Vue from 'vue';
import
Editor
from
'@/components/Editor/index.vue'
import
EditorUpload
from
'@/components/Editor/editorUpload.vue'
import
News
from
'@/service/News/index'
import
FileService
from
"@/service/FileService/index"
;
import
{
message
}
from
'ant-design-vue'
;
const
news
=
new
News
()
...
...
@@ -54,8 +55,10 @@ export default Vue.extend({
author
:
''
,
type
:
undefined
as
number
|
any
,
imgUrl
:
''
,
imageUrl
:
''
,
summary
:
''
,
content
:
''
content
:
''
,
editableContent
:
''
,
}
},
created
()
{
...
...
@@ -63,7 +66,6 @@ export default Vue.extend({
},
methods
:{
getDetails
()
{
console
.
log
(
Object
.
keys
(
this
.
$route
.
query
))
if
(
Object
.
keys
(
this
.
$route
.
query
).
length
===
0
)
{
this
.
type
=
undefined
return
...
...
@@ -73,7 +75,6 @@ export default Vue.extend({
this
.
type
=
+
type
if
(
+
type
===
1
)
{
news
.
searchPolicy
(
id
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
initData
(
res
.
data
)
})
}
else
{
...
...
@@ -86,8 +87,9 @@ export default Vue.extend({
this
.
title
=
res
.
title
this
.
author
=
res
.
writer
this
.
imgUrl
=
res
.
file_name
this
.
imageUrl
=
new
FileService
().
getImageSrc
(
res
.
file_name
)
this
.
summary
=
res
.
desc
this
.
c
ontent
=
res
.
content
this
.
editableC
ontent
=
res
.
content
},
getContent
(
value
:
string
){
this
.
content
=
value
...
...
@@ -130,13 +132,12 @@ export default Vue.extend({
})
},
onSubmit
()
{
console
.
log
(
this
.
imgUrl
)
console
.
log
(
this
.
content
)
if
(
this
.
$route
.
query
.
key
)
{
this
.
editForm
()
}
else
{
this
.
addForm
()
}
// console.log(this.content);
},
}
})
...
...
src/views/Root/OutletManagement/components/HeaderSelect/index.vue
View file @
3ba829d9
...
...
@@ -3,7 +3,7 @@
<a-select
v-for=
"(item, index) in fooList"
:key=
"index"
class=
"header-select-item mx-3"
class=
"header-select-item mx-3
my-2
"
@
change=
"(value) => handleSelectChange(value, index)"
:placeholder=
"item.placeholder"
:value=
"item.value"
...
...
@@ -23,13 +23,13 @@
import
{
eLevel
}
from
"@/types/level"
;
import
{
eNewRoleRelatedToBackEnd
}
from
"@/types/role"
;
import
{
getSelfOutLet
}
from
"@/utils/outlet"
;
import
{
getUserMsg
}
from
"@/utils/userMsg/userMsg"
;
import
{
message
}
from
"ant-design-vue"
;
import
StaffService
from
"@/service/StaffService"
;
import
{
fooList
}
from
"./const"
;
import
Vue
,
{
PropType
}
from
"vue"
;
import
{
iOutLet
}
from
"@/service/StaffService/types"
;
export
default
Vue
.
extend
({
props
:
{
fooList
:
{
...
...
@@ -89,50 +89,147 @@ export default Vue.extend({
});
this
.
setFooList
(
newList
);
},
resetList
()
{
const
list
=
this
.
fooList
.
map
((
i
)
=>
{
return
{
...
i
,
disable
:
false
,
value
:
undefined
,
options
:
[],
};
});
this
.
setFooList
([...
list
]);
},
async
init
()
{
const
selfOutLet
=
await
getSelfOutLet
();
if
(
this
.
role
===
eNewRoleRelatedToBackEnd
.
BackAdmin
)
{
const
ret
=
await
StaffService
.
getInstance
().
getBranch
({
level
:
eLevel
.
firstLevel_branch
,
});
if
(
ret
.
code
===
200
)
{
const
options
=
ret
.
data
.
item
;
this
.
fooList
[
0
].
options
=
options
;
const
newList
=
this
.
fooList
.
map
((
item
,
i
)
=>
{
return
{
...
item
,
disable
:
i
>=
1
,
};
});
this
.
setFooList
(
newList
);
this
.
resetList
();
this
.
$nextTick
(()
=>
{
if
(
this
.
role
===
eNewRoleRelatedToBackEnd
.
BackAdmin
)
{
this
.
initBackAdmin
(
selfOutLet
);
}
else
if
(
this
.
level
===
eLevel
.
firstLevel_branch
)
{
this
.
init_firstLevel
(
selfOutLet
);
}
else
if
(
this
.
level
===
eLevel
.
secondary_branch
)
{
this
.
init_secondLevel
(
selfOutLet
);
}
else
if
(
this
.
level
===
eLevel
.
firstLevel_sub_branch
)
{
this
.
init_first_sub_Level
(
selfOutLet
);
}
else
if
(
this
.
level
===
eLevel
.
secondary_sub_branch
)
{
this
.
init_second_sub_Level
(
selfOutLet
);
}
}
else
if
(
this
.
level
===
eLevel
.
firstLevel_branch
)
{
this
.
init_firstLevel
(
selfOutLet
);
}
else
if
(
this
.
level
===
eLevel
.
secondary_branch
)
{
this
.
init_firstLevel
(
selfOutLet
);
// this.setSelectValue([selfOutLet.fid, selfOutLet.sid]);
}
else
if
(
this
.
level
===
eLevel
.
firstLevel_sub_branch
)
{
// this.
// this.setSelectValue([selfOutLet.fid, selfOutLet.sid, selfOutLet.fs_id]);
}
else
if
(
this
.
level
===
eLevel
.
secondary_sub_branch
)
{
// this.setSelectValue([
// selfOutLet.fid,
// selfOutLet.sid,
// selfOutLet.fs_id,
// selfOutLet.ss_id,
// ]);
});
},
async
initBackAdmin
(
selfOutLet
:
iOutLet
)
{
const
ret
=
await
StaffService
.
getInstance
().
getBranch
({
level
:
eLevel
.
firstLevel_branch
,
});
if
(
ret
.
code
===
200
)
{
const
options
=
ret
.
data
.
item
;
this
.
fooList
[
0
].
options
=
options
;
const
newList
=
this
.
fooList
.
map
((
item
,
i
)
=>
{
return
{
...
item
,
disable
:
i
>=
1
,
};
});
this
.
setFooList
(
newList
);
}
},
init_firstLevel
(
selfOutLet
:
iOutLet
)
{
const
{
fid
,
first_branch
}
=
selfOutLet
;
this
.
fooList
[
0
].
value
=
fid
;
this
.
fooList
[
0
].
options
=
[{
ID
:
fid
,
Name
:
first_branch
}];
this
.
fooList
[
0
].
disable
=
true
;
const
list
=
this
.
initFooListBasicValues
(
selfOutLet
,
eLevel
.
firstLevel_branch
);
this
.
setFooList
(
list
);
},
async
init_secondLevel
(
selfOutLet
:
iOutLet
)
{
const
{
fid
,
first_branch
,
sid
,
second_branch
}
=
selfOutLet
;
const
list
=
this
.
initFooListBasicValues
(
selfOutLet
,
eLevel
.
secondary_branch
);
this
.
setFooList
(
list
);
const
ret
=
await
StaffService
.
getInstance
().
getBranch
({
level
:
eLevel
.
firstLevel_sub_branch
,
page_size
:
10000
,
parent_id
:
sid
,
});
if
(
ret
.
code
===
200
)
{
this
.
fooList
[
2
].
options
=
ret
.
data
.
item
;
}
this
.
setFooList
(
this
.
fooList
);
},
init_secondLevel
(
selfOutLet
:
iOutLet
)
{},
init_first_sub_Level
(
selfOutLet
:
iOutLet
)
{},
init_second_sub_Level
(
selfOutLet
:
iOutLet
)
{},
async
init_first_sub_Level
(
selfOutLet
:
iOutLet
)
{
const
{
fid
,
first_branch
,
sid
,
second_branch
,
fs_id
,
first_sub_branch
}
=
selfOutLet
;
const
list
=
this
.
initFooListBasicValues
(
selfOutLet
,
eLevel
.
firstLevel_sub_branch
);
this
.
setFooList
(
list
);
const
ret
=
await
StaffService
.
getInstance
().
getBranch
({
level
:
eLevel
.
secondary_sub_branch
,
page_size
:
1000
,
parent_id
:
fs_id
,
});
if
(
ret
.
code
===
200
)
{
this
.
fooList
[
3
].
options
=
ret
.
data
.
item
;
}
this
.
setFooList
(
this
.
fooList
);
},
init_second_sub_Level
(
selfOutLet
:
iOutLet
)
{
this
.
initFooListBasicValues
(
selfOutLet
,
eLevel
.
secondary_sub_branch
);
},
initFooListBasicValues
(
selfOutLet
:
iOutLet
,
level
:
eLevel
)
{
let
list
=
this
.
fooList
;
const
{
fid
,
first_branch
,
sid
,
second_branch
,
fs_id
,
first_sub_branch
,
ss_id
,
second_sub_branch
,
}
=
selfOutLet
;
if
(
[
eLevel
.
firstLevel_branch
,
eLevel
.
secondary_branch
,
eLevel
.
firstLevel_sub_branch
,
eLevel
.
secondary_sub_branch
,
].
includes
(
level
)
)
{
list
[
0
].
value
=
fid
;
list
[
0
].
options
=
[{
ID
:
fid
,
Name
:
first_branch
}];
list
[
0
].
disable
=
true
;
}
if
(
[
eLevel
.
secondary_branch
,
eLevel
.
firstLevel_sub_branch
,
eLevel
.
secondary_sub_branch
,
].
includes
(
level
)
)
{
list
[
1
].
value
=
sid
;
list
[
1
].
options
=
[{
ID
:
sid
,
Name
:
second_branch
}];
list
[
1
].
disable
=
true
;
}
if
(
[
eLevel
.
firstLevel_sub_branch
,
eLevel
.
secondary_sub_branch
].
includes
(
level
)
)
{
list
[
2
].
value
=
fs_id
;
list
[
2
].
options
=
[{
ID
:
fs_id
,
Name
:
first_sub_branch
}];
list
[
2
].
disable
=
true
;
}
if
([
eLevel
.
secondary_sub_branch
].
includes
(
level
))
{
list
[
3
].
value
=
ss_id
;
list
[
3
].
options
=
[{
ID
:
ss_id
,
Name
:
second_sub_branch
}];
list
[
3
].
disable
=
true
;
}
return
list
;
},
popupScroll1
(
e
:
Event
)
{
let
h
=
e
.
target
as
HTMLElement
;
if
(
h
.
scrollHeight
-
h
.
scrollTop
<=
h
.
clientHeight
)
{
...
...
src/views/Root/OutletManagement/index.vue
View file @
3ba829d9
...
...
@@ -4,6 +4,7 @@
<p
class=
"text-2xl font-bold mb-5"
>
网点管理
</p>
<div>
<header-select
ref=
"headerSelect"
:setFooList=
"setFooList"
:fooList=
"fooList"
:level=
"level"
...
...
@@ -360,49 +361,9 @@ export default Vue.extend({
},
clickQueryOnSearchPage
()
{},
clickReset
()
{
this
.
cascaderValue
=
[]
;
(
this
.
$refs
.
headerSelect
as
any
).
init
()
;
this
.
addressSearchValue
=
""
;
},
onChange
(
value
:
any
[])
{
this
.
cascaderValue
=
value
;
if
(
this
.
cascaderValue
.
length
===
LEVE_ORG
)
{
this
.
$router
.
push
({
query
:
{
cascaderValue
:
this
.
cascaderValue
.
toString
(),
},
});
}
},
loadData
(
selectedOptions
:
{
loading
:
boolean
;
isLeaf
:
boolean
;
value
:
any
;
label
:
string
;
children
:
any
[];
}[]
)
{
const
targetOption
=
selectedOptions
[
selectedOptions
.
length
-
1
];
targetOption
.
loading
=
true
;
// load options lazily
setTimeout
(()
=>
{
targetOption
.
loading
=
false
;
targetOption
.
children
=
[
{
label
:
`
${
targetOption
.
label
}
Dynamic 1`
,
value
:
"dynamic1"
,
isLeaf
:
false
,
},
{
label
:
`
${
targetOption
.
label
}
Dynamic 2`
,
isLeaf
:
true
,
value
:
"dynamic2"
,
},
];
this
.
options
=
[...
this
.
options
];
},
10
);
},
clickResetOnSearchPage
()
{
this
.
searchPageReqParams
.
name
=
""
;
this
.
searchPageReqParams
.
phone
=
""
;
...
...
src/views/Root/Product/Loan/index.vue
View file @
3ba829d9
<
template
>
<div>
<p
class=
"
text-2xl font-bold mb-5"
>
贷款产品管理
</p>
<topbar/>
<product-table/>
<p
class=
"text-2xl font-bold mb-5"
>
贷款产品管理
</p>
<topbar
/>
<product-table
/>
</div>
</
template
>
<
script
lang=
"ts"
>
import
Vue
from
'vue'
import
bar
from
'@/components/productManage/topbar.vue'
import
producttable
from
'@/components/productManage/productTable.vue'
import
Vue
from
"vue"
;
import
bar
from
"@/components/productManage/topbar.vue"
;
import
producttable
from
"@/components/productManage/productTable.vue"
;
import
{
mapActions
}
from
"vuex"
;
export
default
Vue
.
extend
({
components
:
{
'topbar'
:
bar
,
'product-table'
:
producttable
},
})
components
:
{
topbar
:
bar
,
"product-table"
:
producttable
},
mounted
()
{
this
.
fetchList
();
},
methods
:
{
...
mapActions
(
"loanProductManagement"
,
{
productQuery
:
"query"
,
}),
fetchList
()
{
this
.
productQuery
();
},
},
});
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/views/Root/Product/Loan/publish.vue
View file @
3ba829d9
...
...
@@ -26,23 +26,15 @@
>
<a-input
v-model=
"form.orgnization"
/>
</a-form-model-item>
<a-row
:gutter=
"[16,16]"
>
<a-col
:span=
"8"
>
<a-form-model-item
label=
"贷款期限(月)"
>
<a-input-number
v-model=
"form.startTime"
style=
"width: 20%"
:min=
"0"
/>
——
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-input-number
v-model=
"form.endTime"
:min=
"0"
style=
"width: 20%"
/>
</a-col>
<a-form-model-item
label=
"贷款期限(月)"
>
<a-input-number
v-model=
"form.startTime"
style=
"width: 20%"
:min=
"0"
/>
——
</a-row>
<a-form-model-item>
<a-input-number
v-model=
"form.endTime"
:min=
"0"
style=
"width: 20%"
/>
</a-form-model-item>
<a-form-model-item
label=
"参考利率(%)"
>
<a-input-number
...
...
@@ -119,29 +111,67 @@ import Vue, { PropType } from "vue";
import
{
InputNumber
,
FormModel
,
message
,
Row
,
Col
}
from
"ant-design-vue"
;
import
LoanProductService
from
"@/service/LoanProductService/index"
;
import
{
eProductType
,
eGuaranteeType
}
from
"@/types/loanProduct"
;
import
{
iListItem
}
from
"@/store/LoanProductManagement/type"
;
import
{
mapMutations
}
from
"vuex"
;
Vue
.
use
(
InputNumber
).
use
(
Col
).
use
(
Row
);
export
default
Vue
.
extend
({
props
:
{
guaranteeType
:
{
type
:
Array
as
PropType
<
String
[]
>
,
default
()
{
return
[
"信用"
,
"抵押"
,
"保证"
,
"贴现"
,
"综合"
,
"质押"
];
},
},
},
async
mounted
()
{
this
.
isEditable
=
this
.
$route
.
name
==
"editLoanProduct"
?
true
:
false
;
if
(
this
.
isEditable
)
{
const
uuid
=
this
.
$route
.
params
.
uuid
;
this
.
uuid
=
uuid
;
const
ret
=
await
LoanProductService
.
getInstance
().
queryInfo
(
uuid
);
if
(
ret
.
code
==
200
)
{
const
record
=
ret
.
data
as
unknown
as
iListItem
;
this
.
form
.
name
=
record
.
product_name
;
this
.
form
.
orgnization
=
record
.
inst_name
;
this
.
form
.
startTime
=
record
.
min_date
;
this
.
form
.
endTime
=
record
.
max_date
;
this
.
form
.
interstMin
=
record
.
rate_lower
;
this
.
form
.
interstMax
=
record
.
rate_upper
;
this
.
form
.
limitMin
=
record
.
min_amount
;
this
.
form
.
limitMax
=
record
.
max_amount
;
this
.
form
.
guarantee
=
record
.
guarantee_type
;
this
.
form
.
type
=
record
.
product_type
;
this
.
form
.
introduction
=
record
.
products
;
this
.
form
.
characteristic
=
record
.
features
;
this
.
form
.
target
=
record
.
apply_to
;
this
.
form
.
applicationCon
=
record
.
apply_cond
;
this
.
form
.
submissionCon
=
record
.
submit_cond
;
}
}
},
data
()
{
return
{
form
:
{
name
:
""
,
startTime
:
""
,
endTime
:
""
,
orgnization
:
""
,
interstMax
:
""
,
interstMin
:
""
,
limitMax
:
""
,
limitMin
:
""
,
guarantee
:
undefined
as
undefined
|
eGuaranteeType
,
type
:
undefined
as
undefined
|
eProductType
,
startTime
:
0
as
number
|
string
,
endTime
:
0
as
number
|
string
,
interstMax
:
0
as
number
|
string
,
interstMin
:
0
as
number
|
string
,
limitMax
:
0
as
number
|
string
,
limitMin
:
0
as
number
|
string
,
guarantee
:
eGuaranteeType
.
credit
,
type
:
eProductType
.
company
,
introduction
:
""
,
characteristic
:
""
,
target
:
""
,
applicationCon
:
""
,
submissionCon
:
""
,
},
isEditable
:
false
,
eProductType
,
uuid
:
""
,
eGuaranteeType
,
rules
:
{
name
:
[{
required
:
true
,
message
:
"请输入产品名称"
,
trigger
:
"blur"
}],
...
...
@@ -184,14 +214,6 @@ export default Vue.extend({
},
};
},
props
:
{
guaranteeType
:
{
type
:
Array
as
PropType
<
String
[]
>
,
default
()
{
return
[
"信用"
,
"抵押"
,
"保证"
,
"贴现"
,
"综合"
,
"质押"
];
},
},
},
methods
:
{
changeGuarantee
(
value
:
eGuaranteeType
)
{
this
.
form
.
guarantee
=
value
;
...
...
@@ -201,32 +223,75 @@ export default Vue.extend({
this
.
form
.
type
=
value
;
console
.
log
(
value
);
},
...
mapMutations
(
"loanProductManagement"
,
{
productSave
:
"save"
,
}),
onSubmit
()
{
(
this
.
$refs
.
addProductForm
as
FormModel
).
validate
((
valid
)
=>
{
if
(
!
valid
)
{
LoanProductService
.
getInstance
()
.
addLoan
({
apply_cond
:
this
.
form
.
applicationCon
,
apply_to
:
this
.
form
.
target
,
features
:
this
.
form
.
characteristic
,
guarantee_type
:
this
.
form
.
guarantee
as
eGuaranteeType
,
inst_name
:
this
.
form
.
orgnization
,
loan_type
:
this
.
form
.
type
as
eProductType
,
max_amount
:
this
.
form
.
limitMax
,
max_date
:
this
.
form
.
endTime
,
product_name
:
this
.
form
.
name
,
products
:
this
.
form
.
introduction
,
rate_lower
:
this
.
form
.
interstMin
,
rate_upper
:
this
.
form
.
interstMax
,
submit_cond
:
this
.
form
.
submissionCon
,
})
.
then
((
ret
)
=>
{
if
(
ret
.
code
==
200
)
{
console
.
log
(
this
.
form
);
message
.
success
(
"发布成功"
);
console
.
log
(
ret
);
}
if
(
valid
)
{
if
(
this
.
isEditable
)
{
// 编辑
LoanProductService
.
getInstance
()
.
modifyLoan
({
apply_cond
:
this
.
form
.
applicationCon
,
apply_to
:
this
.
form
.
target
,
features
:
this
.
form
.
characteristic
,
guarantee_type
:
this
.
form
.
guarantee
as
eGuaranteeType
,
inst_name
:
this
.
form
.
orgnization
,
max_amount
:
this
.
form
.
limitMax
.
toString
(),
max_date
:
this
.
form
.
endTime
.
toString
(),
product_name
:
this
.
form
.
name
,
products
:
this
.
form
.
introduction
,
product_type
:
this
.
form
.
type
,
rate_lower
:
this
.
form
.
interstMin
.
toString
(),
rate_upper
:
this
.
form
.
interstMax
.
toString
(),
submit_cond
:
this
.
form
.
submissionCon
,
min_amount
:
this
.
form
.
limitMin
.
toString
(),
min_date
:
this
.
form
.
startTime
.
toString
(),
uuid
:
this
.
uuid
,
})
.
then
((
ret
)
=>
{
if
(
ret
.
code
===
200
)
{
message
.
success
(
"编辑成功"
);
this
.
$router
.
push
({
name
:
"loanProduct"
});
}
else
if
(
ret
.
code
===
406
)
{
message
.
success
(
"发布失败"
);
}
});
}
else
{
// 新增
LoanProductService
.
getInstance
()
.
addLoan
({
apply_cond
:
this
.
form
.
applicationCon
,
apply_to
:
this
.
form
.
target
,
features
:
this
.
form
.
characteristic
,
guarantee_type
:
this
.
form
.
guarantee
as
eGuaranteeType
,
inst_name
:
this
.
form
.
orgnization
,
max_amount
:
this
.
form
.
limitMax
.
toString
(),
max_date
:
this
.
form
.
endTime
.
toString
(),
min_amount
:
this
.
form
.
limitMin
.
toString
(),
min_date
:
this
.
form
.
startTime
.
toString
(),
loan_type
:
this
.
form
.
type
as
eProductType
,
product_name
:
this
.
form
.
name
,
products
:
this
.
form
.
introduction
,
rate_lower
:
this
.
form
.
interstMin
.
toString
(),
rate_upper
:
this
.
form
.
interstMax
.
toString
(),
submit_cond
:
this
.
form
.
submissionCon
,
})
.
then
((
ret
)
=>
{
if
(
ret
.
code
===
200
)
{
message
.
success
(
"发布成功"
);
console
.
log
(
ret
);
this
.
$router
.
push
({
name
:
"loanProduct"
});
}
else
if
(
ret
.
code
===
406
)
{
message
.
success
(
"发布失败"
);
console
.
log
(
ret
);
this
.
$router
.
push
({
name
:
"loanProduct"
});
}
});
}
this
.
productSave
({
page
:
1
,
});
}
else
{
return
false
;
...
...
src/views/Root/getMenuList.ts
View file @
3ba829d9
...
...
@@ -50,7 +50,7 @@ export const menuList: iMenuConfigItem[] = [
// getName: () => '理财产品',
// roles: [eRole.superManager],
// routeName: 'financialManagement',
// hiddeInMenu: false,
// hiddeInMenu: false,
// path: '/backend/product/financialManagement',
// component: () => import('@/views/Root/Banner/index.vue'),
// onClick: (e: Event) => {},
...
...
@@ -93,7 +93,7 @@ export const menuList: iMenuConfigItem[] = [
eRole
.
firstLevel_sub_branch
,
eRole
.
secondary_sub_branch
,
eRole
.
secondary_sub_clientManager
,
eRole
.
firstLevel_sub_clientManager
eRole
.
firstLevel_sub_clientManager
,
],
onClick
:
(
e
:
Event
)
=>
{},
},
...
...
@@ -103,9 +103,7 @@ export const menuList: iMenuConfigItem[] = [
routeName
:
'loanProduct'
,
path
:
'/backend/loanProduct'
,
component
:
()
=>
import
(
'@/views/Root/Product/Loan/index.vue'
),
roles
:
[
eRole
.
superManager
,
],
roles
:
[
eRole
.
superManager
],
},
{
getName
:
()
=>
'发布贷款产品'
,
...
...
@@ -118,6 +116,16 @@ export const menuList: iMenuConfigItem[] = [
onClick
:
(
e
:
Event
)
=>
{},
},
{
getName
:
()
=>
'编辑贷款产品'
,
routeName
:
'editLoanProduct'
,
hiddeInMenu
:
true
,
belongToMenuName
:
'loanProduct'
,
path
:
'/backend/loanProduct/edit/:uuid'
,
component
:
()
=>
import
(
'@/views/Root/Product/Loan/publish.vue'
),
roles
:
[
eRole
.
superManager
],
onClick
:
(
e
:
Event
)
=>
{},
},
{
getName
:
()
=>
'一级支行客户名单'
,
onClick
:
(
e
:
Event
)
=>
{},
routeName
:
'firstSubClient'
,
...
...
@@ -126,7 +134,7 @@ export const menuList: iMenuConfigItem[] = [
belongToMenuName
:
'userManage'
,
component
:
()
=>
import
(
'@/views/Root/User/client.vue'
),
roles
:
[
eRole
.
superManager
,
eRole
.
superManager
,
eRole
.
firstLevel_branch
,
eRole
.
firstLevel_sub_clientManager
,
],
...
...
@@ -149,10 +157,7 @@ export const menuList: iMenuConfigItem[] = [
hiddeInMenu
:
true
,
belongToMenuName
:
'userManage'
,
component
:
()
=>
import
(
'@/views/Root/User/secondary.vue'
),
roles
:
[
eRole
.
superManager
,
eRole
.
firstLevel_branch
],
roles
:
[
eRole
.
superManager
,
eRole
.
firstLevel_branch
],
},
{
getName
:
()
=>
'一级支行搜索结果'
,
...
...
@@ -226,7 +231,7 @@ export const menuList: iMenuConfigItem[] = [
eRole
.
firstLevel_sub_branch
,
eRole
.
secondary_sub_branch
,
eRole
.
firstLevel_sub_clientManager
,
eRole
.
secondary_sub_clientManager
eRole
.
secondary_sub_clientManager
,
],
},
{
...
...
@@ -271,8 +276,7 @@ export const menuList: iMenuConfigItem[] = [
routeName
:
'activity'
,
path
:
'/backend/activity'
,
component
:
()
=>
import
(
'@/views/Root/Activity/index.vue'
),
roles
:
[
eRole
.
superManager
,
],
roles
:
[
eRole
.
superManager
],
},
{
getName
:
()
=>
'用户管理'
,
...
...
@@ -280,9 +284,7 @@ export const menuList: iMenuConfigItem[] = [
routeName
:
'platformUserManagement'
,
path
:
'/backend/platformUserManagement'
,
component
:
()
=>
import
(
'@/views/Root/Platform_UserManagement/index.vue'
),
roles
:
[
eRole
.
platform_management
,
],
roles
:
[
eRole
.
platform_management
],
},
{
getName
:
()
=>
'安全设置'
,
...
...
@@ -303,7 +305,7 @@ export const menuList: iMenuConfigItem[] = [
eRole
.
secondary_branch
,
eRole
.
secondary_sub_branch
,
eRole
.
firstLevel_sub_clientManager
,
eRole
.
secondary_sub_clientManager
eRole
.
secondary_sub_clientManager
,
],
onClick
:
(
e
:
Event
)
=>
{},
},
...
...
@@ -321,7 +323,7 @@ export const menuList: iMenuConfigItem[] = [
eRole
.
secondary_branch
,
eRole
.
secondary_sub_branch
,
eRole
.
firstLevel_sub_clientManager
,
eRole
.
secondary_sub_clientManager
eRole
.
secondary_sub_clientManager
,
],
},
],
...
...
@@ -333,7 +335,7 @@ export const menuList: iMenuConfigItem[] = [
eRole
.
secondary_branch
,
eRole
.
secondary_sub_branch
,
eRole
.
firstLevel_sub_clientManager
,
eRole
.
secondary_sub_clientManager
eRole
.
secondary_sub_clientManager
,
],
},
{
...
...
@@ -345,7 +347,7 @@ export const menuList: iMenuConfigItem[] = [
roles
:
[
eRole
.
superManager
],
},
{
getName
:
()
=>
'发布
新闻
内容'
,
getName
:
()
=>
'发布
活动
内容'
,
routeName
:
'publishActivity'
,
hiddeInMenu
:
true
,
belongToMenuName
:
'activity'
,
...
...
@@ -355,11 +357,21 @@ export const menuList: iMenuConfigItem[] = [
onClick
:
(
e
:
Event
)
=>
{},
},
{
getName
:
()
=>
'编辑活动内容'
,
routeName
:
'editActivity'
,
hiddeInMenu
:
true
,
belongToMenuName
:
'activity'
,
path
:
'/backend/activity/edit/:uuid'
,
component
:
()
=>
import
(
'@/views/Root/Activity/publish.vue'
),
roles
:
[
eRole
.
superManager
],
onClick
:
(
e
:
Event
)
=>
{},
},
{
getName
:
()
=>
'查看活动内容'
,
routeName
:
'activityDetail'
,
hiddeInMenu
:
true
,
belongToMenuName
:
'activity'
,
path
:
'/backend/activity/detail'
,
path
:
'/backend/activity/detail
/:uuid
'
,
component
:
()
=>
import
(
'@/views/Root/Activity/detail.vue'
),
roles
:
[
eRole
.
superManager
],
onClick
:
(
e
:
Event
)
=>
{},
...
...
src/views/Root/index.vue
View file @
3ba829d9
...
...
@@ -74,7 +74,7 @@ export default Vue.extend({
};
},
mounted
()
{
console
.
log
(
this
.
menuList
,
"show menulist"
);
//
console.log(this.menuList, "show menulist");
},
computed
:
{
role
():
eRole
|
undefined
{
...
...
@@ -84,7 +84,7 @@ export default Vue.extend({
|
undefined
;
},
menuList
():
iMenuList
{
console
.
log
(
this
.
role
,
"show this.role"
);
//
console.log(this.role, "show this.role");
return
(
this
.
role
!==
undefined
&&
getMenuList
(
this
.
role
))
||
[];
},
filteredMenuList
():
iMenuList
{
...
...
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