Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
confucius
Commits
b3d32d17
Commit
b3d32d17
authored
Dec 08, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增同业小程序幻灯片设置
parent
d879b96e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
313 additions
and
10 deletions
+313
-10
webkit.js
src/api/system/webkit.js
+23
-0
b2bindex-form.vue
src/components/system/b2bindex-form.vue
+167
-0
b2bindex.vue
src/pages/system/b2bindex.vue
+123
-10
No files found.
src/api/system/webkit.js
View file @
b3d32d17
...
@@ -615,4 +615,27 @@ export function UpdateWebJobApply(data) {
...
@@ -615,4 +615,27 @@ export function UpdateWebJobApply(data) {
method
:
'post'
,
method
:
'post'
,
data
data
})
})
}
/**
* 同业小程序 获取幻灯片配置
*
*/
export
function
getB2BSlideShowInfo
(
data
)
{
return
request
({
url
:
'/B2BRemit/GetB2BSlideShowInfo'
,
method
:
'post'
,
data
})
}
/**
* 同业小程序 获取幻灯片配置
*
*/
export
function
setB2BSlideShowInfo
(
data
)
{
return
request
({
url
:
'/B2BRemit/SetB2BSlideShowInfo'
,
method
:
'post'
,
data
})
}
}
\ No newline at end of file
src/components/system/b2bindex-form.vue
0 → 100644
View file @
b3d32d17
<
template
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 600px;max-width:900px;"
>
<q-card-section>
<div
class=
"text-h6"
v-if=
"type===0"
>
新增
</div>
<div
class=
"text-h6"
v-if=
"type===1"
>
编辑
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<h6
class=
"q-my-sm text-grey-6"
>
图片信息
</h6>
<div
class=
"row wrap q-mb-lg"
>
<div
style=
"display:flex;flex-wrap: wrap;"
>
<div
v-if=
"objOption.Image"
>
<div
class=
"ItemImgDiv"
>
<q-img
:src=
"objOption.Image"
spinner-color=
"white"
style=
"height: 100%;height:100%"
/>
<q-btn
size=
"7px"
@
click=
"deleteItemImg"
style=
"position:absolute;right:-5px;top:-5px;"
round
color=
"red"
icon=
"iconfont icon-guanbi1"
/>
</div>
</div>
<el-upload
v-else
class=
"avatar-uploader addDutyMain"
action=
""
:before-upload=
"uploadFile"
:show-file-list=
"false"
>
<i
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</div>
</div>
<div
class=
"row"
>
<q-input
filled
stack-label
maxlength=
"20"
v-model=
"objOption.Path"
ref=
"Path"
class=
"col-12 q-pb-lg"
:rules=
"[val => !!val || '请输入跳转路径']"
label=
"跳转路径"
/>
</div>
<div
class=
"row"
>
<q-input
filled
stack-label
maxlength=
"20"
v-model
.
number=
"objOption.Sort"
ref=
"Sort"
class=
"col-12 q-pb-lg"
:rules=
"[val => !!val || '请输入排序']"
label=
"排序"
/>
</div>
<div
class=
"row"
>
<q-input
filled
stack-label
maxlength=
"20"
type=
"textarea"
v-model
.
number=
"objOption.Remark"
ref=
"SubjectName"
class=
"col-12 q-pb-lg"
label=
"描述"
/>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeDig"
/>
<q-btn
label=
"保存"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
@
click=
"save"
/>
</q-card-actions>
</q-card>
</q-dialog>
</
template
>
<
script
>
import
{
UploadSelfFile
,
}
from
'../../api/common/common'
export
default
{
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
},
type
:{
type
:
Number
,
default
:
0
}
},
data
()
{
return
{
persistent
:
true
,
objOption
:
{
Image
:
""
,
Path
:
""
,
Remark
:
""
,
Sort
:
0
}
}
},
mounted
()
{
this
.
init
()
},
methods
:
{
closeDig
()
{
this
.
persistent
=
false
this
.
$emit
(
'close'
)
},
//删除图片
deleteItemImg
()
{
this
.
objOption
.
Image
=
''
;
},
uploadFile
(
files
)
{
UploadSelfFile
(
'b2bIndex'
,
files
,
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
objOption
.
Image
=
res
.
FileUrl
;
}
})
},
init
(){
this
.
objOption
.
Image
=
this
.
saveObj
.
Image
this
.
objOption
.
Path
=
this
.
saveObj
.
Path
this
.
objOption
.
Remark
=
this
.
saveObj
.
Remark
this
.
objOption
.
Sort
=
this
.
saveObj
.
Sort
},
save
(){
if
(
!
this
.
objOption
.
Image
){
this
.
$q
.
notify
({
type
:
'warning'
,
position
:
'top'
,
message
:
"请上传图片"
})
return
}
this
.
$refs
.
Path
.
validate
()
this
.
$refs
.
Sort
.
validate
()
if
(
!
this
.
$refs
.
Path
.
hasError
&&!
this
.
$refs
.
Sort
.
hasError
)
{
this
.
persistent
=
false
this
.
$emit
(
'save'
,
this
.
objOption
)
}
}
}
}
</
script
>
<
style
>
.avatar-uploader
.el-upload
{
border-radius
:
6px
;
cursor
:
pointer
;
width
:
100%
;
height
:
100%
;
color
:
#8c939d
;
position
:
relative
;
overflow
:
hidden
;
}
.addDutyMain
{
display
:
inline-block
;
width
:
118px
;
height
:
118px
;
font-size
:
70px
;
border
:
1px
dashed
#d9d9d9
;
line-height
:
120px
;
}
.ItemImgDiv
{
width
:
118px
;
height
:
118px
;
position
:
relative
;
margin
:
0
10px
10px
0
;
display
:
inline-block
;
}
._delete_img
{
position
:
absolute
;
top
:
0px
;
height
:
82px
;
width
:
143px
;
line-height
:
34px
;
text-align
:
center
;
background-color
:
rgba
(
2
,
2
,
2
,
0.6
);
display
:
inherit
;
opacity
:
0
;
transition
:
all
linear
.5s
}
._delete_img
i
.iconfont
{
display
:
inline-block
;
width
:
32px
;
height
:
32px
;
border-radius
:
50%
;
color
:
#E95252
!important
;
color
:
#fff
;
background-color
:
rgba
(
251
,
251
,
251
,
0.9
);
margin-top
:
26px
;
}
</
style
>
\ No newline at end of file
src/pages/system/b2bindex.vue
View file @
b3d32d17
...
@@ -3,42 +3,155 @@
...
@@ -3,42 +3,155 @@
<div
class=
"page-search row items-center"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<div
class=
"col-3"
>
<q-input
clearable
standout=
"bg-primary text-white"
class=
"col-6 q-pr-lg q-pr-lg
"
<q-input
clearable
standout=
"bg-primary text-white"
class=
"col-6 q-pr-lg q-pr-lg"
v-model=
"msg.Title
"
v-model=
"msg.LinkMan"
label=
"标题"
maxlength=
"20"
/>
label=
"标题"
maxlength=
"20"
/>
</div>
</div>
<div
class=
"col-3"
>
<div
class=
"col-3"
>
<q-input
clearable
standout=
"bg-primary text-white"
class=
"col-6 q-pr-lg q-pr-lg"
<q-input
clearable
standout=
"bg-primary text-white"
class=
"col-6 q-pr-lg q-pr-lg"
v-model=
"msg.SubTitle"
v-model=
"msg.PositionName"
label=
"副标题"
maxlength=
"20"
/>
label=
"副标题"
maxlength=
"20"
/>
</div>
<div
class=
"col-6"
>
<div
class=
"full-width full-height flex justify-end items-center"
>
<q-btn
size=
"sm"
icon=
"add"
color=
"accent"
label=
"新增"
@
click=
"add"
/>
<q-btn
size=
"sm"
icon=
"add"
color=
"accent"
label=
"保存"
class=
"q-ml-md"
@
click=
"setInfo"
/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"page-content"
>
<div
class=
"page-content"
>
<q-table
:pagination=
"pagination"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
:data=
"msg.SlideShowList"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top=
"props"
>
</
template
>
<
template
v-slot:body-cell-img=
"props"
>
<q-td>
</q-td>
</
template
>
<
template
v-slot:bottom
>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"Edit(props.row,props.rowIndex)"
/>
<!--
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
style=
"font-weight:400"
label=
"删除"
@
click=
"del(props.row)"
/>
-->
</q-td>
</
template
>
</q-table>
<editForm
v-if=
"ShowForm"
:type=
"editType"
:save-obj=
"FormOption"
@
close=
"ShowForm=false"
@
save=
"getForm"
>
</editForm>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
import
{
GetWebJobApplyPage
,
getB2BSlideShowInfo
,
setB2BSlideShowInfo
}
from
'../../api/system/webkit'
}
from
'../../api/system/webkit'
import
editForm
from
"../../components/system/b2bindex-form"
export
default
{
export
default
{
meta
:
{
meta
:
{
title
:
"同业小程序配置"
title
:
"同业小程序配置"
},
},
components
:
{
components
:
{
jobapply
Form
edit
Form
},
},
data
()
{
data
()
{
return
{
return
{
pagination
:
{
rowsPerPage
:
0
,
},
editType
:
0
,
ShowForm
:
false
,
FormOption
:{},
rowIndex
:
0
,
msg
:
{
Title
:
""
,
SubTitle
:
""
,
SlideShowList
:
[]
},
loading
:
false
,
columns
:
[{
name
:
'Sort'
,
label
:
'排序'
,
field
:
'Sort'
,
align
:
'left'
},
{
name
:
'Image'
,
label
:
'图片'
,
field
:
'Image'
,
align
:
'left'
},
{
name
:
'Path'
,
label
:
'跳转路径'
,
field
:
'Path'
,
align
:
'left'
},
{
name
:
'Remark'
,
label
:
'描述'
,
field
:
'Remark'
,
align
:
'left'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'MenuId'
}],
}
}
},
},
mounted
()
{
mounted
()
{
// this.getList
()
this
.
getInfo
()
},
},
methods
:
{
methods
:
{
//获取幻灯片配置
getInfo
()
{
this
.
loading
=
true
;
getB2BSlideShowInfo
({}).
then
(
res
=>
{
this
.
loading
=
false
this
.
msg
.
SlideShowList
=
res
.
Data
.
List
;
this
.
msg
.
Title
=
res
.
Data
.
Title
;
this
.
msg
.
SubTitle
=
res
.
Data
.
SubTitle
;
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
setInfo
(){
setB2BSlideShowInfo
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
){
this
.
$q
.
notify
({
type
:
'positive'
,
position
:
'top'
,
message
:
res
.
Message
})
this
.
getInfo
()
}
})
},
add
(){
this
.
editType
=
0
this
.
ShowForm
=
true
this
.
FormOption
=
{}
},
Edit
(
row
,
index
){
this
.
rowIndex
=
index
this
.
editType
=
1
this
.
ShowForm
=
true
this
.
FormOption
=
row
},
getForm
(
val
){
this
.
ShowForm
=
false
if
(
this
.
editType
===
0
){
this
.
msg
.
SlideShowList
.
push
(
val
)
}
else
if
(
this
.
editType
===
1
){
this
.
msg
.
SlideShowList
.
splice
(
this
.
rowIndex
,
1
,
val
)
}
this
.
setInfo
()
}
}
}
}
}
...
...
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