Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pptist
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
viitto
pptist
Commits
a4af1baf
Commit
a4af1baf
authored
Feb 18, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复销售 模版 广告翻页
parent
83b2495b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
86 deletions
+84
-86
SellTemplate.vue
src/views/SellTemplate/SellTemplate.vue
+83
-79
index.vue
src/views/SellTemplate/index.vue
+1
-7
No files found.
src/views/SellTemplate/SellTemplate.vue
View file @
a4af1baf
<
template
>
<
template
>
<div
ref=
"SellTemplateRef"
>
<div
ref=
"SellTemplateRef"
style=
"background: #f3f6fb;height:100vh;overflow: auto;"
>
<el-row
justify=
"space-between"
class=
"items-center"
>
<div
style=
"padding: 30px; max-width:1440px; margin:0 auto;"
>
<el-col
:span=
"6"
class=
"row items-center"
>
<el-row
justify=
"space-between"
class=
"items-center"
>
<el-button-group
class=
"ml-4"
>
<el-col
:span=
"6"
class=
"row items-center"
>
<template
v-for=
"item in TemplateTypeList"
>
<el-button-group
class=
"ml-4"
>
<el-button
type=
"primary"
<template
v-for=
"item in TemplateTypeList"
>
:plain=
"queryObj.TemplateType==item.Id?false:true"
size=
"small"
<el-button
type=
"primary"
@
click=
"setTemplateType(item.Id)"
>
:plain=
"queryObj.TemplateType==item.Id?false:true"
size=
"small"
{{
item
.
Name
}}
@
click=
"setTemplateType(item.Id)"
>
</el-button>
{{
item
.
Name
}}
</
template
>
</el-button>
</el-button-group>
</
template
>
</el-col>
</el-button-group>
<el-col
:span=
"6"
>
</el-col>
<el-input
v-model=
"queryObj.Title"
placeholder=
"输入关键字快速查找"
class=
"input-with-select"
>
<el-col
:span=
"6"
>
<
template
#
append
>
<el-input
v-model=
"queryObj.Title"
placeholder=
"输入关键字快速查找"
class=
"input-with-select"
>
<el-button
type=
"primary"
@
click=
"querySearchHandler"
>
搜索
</el-button>
<
template
#
append
>
</
template
>
<el-button
type=
"primary"
@
click=
"querySearchHandler"
>
搜索
</el-button>
</el-input>
</
template
>
</el-col>
</el-input>
<el-col
:span=
"6"
class=
"row flex-end"
>
</el-col>
<sellNavs
/>
<el-col
:span=
"6"
class=
"row flex-end"
>
</el-col>
<sellNavs
/>
</el-row>
</el-col>
<div
style=
"margin-top: 20px;"
>
</el-row>
<div
v-if=
"dataList.length>0"
class=
"bg-white column q-mt-lg rounded q-px-lg"
>
<div
style=
"margin-top: 20px;"
>
<div
class=
"row flex-between nowrap sellHeader"
>
<div
v-if=
"dataList.length>0"
class=
"bg-white column q-mt-lg rounded q-px-lg"
>
<div>
名称
</div>
<div
class=
"row flex-between nowrap sellHeader"
>
<div>
创建人
</div>
<div>
名称
</div>
<div>
更新时间
</div>
<div>
创建人
</div>
<div>
操作
</div>
<div>
更新时间
</div>
</div>
<div>
操作
</div>
<div
class=
"row flex-between nowrap sellList pointer"
v-for=
"(item,index) in dataList"
>
<div>
<el-tag
class=
"mx-1 q-mr-md"
effect=
"dark"
v-if=
"item.TemplateType==2"
size=
"small"
>
广告
</el-tag>
<span
v-else
class=
"iconfont icon-pdf sellPdf"
></span>
<span>
{{item.Title}}
</span>
</div>
<div>
{{item.CreateByName}}
<span
class=
"sellCreateTime"
>
{{item.CreateTime}}
</span>
</div>
</div>
<div>
{{item.UpdateTime}}
</div>
<div
class=
"row flex-between nowrap sellList pointer"
v-for=
"(item,index) in dataList"
>
<div
class=
"row flex-between"
>
<div>
<div>
<el-tooltip
class=
"box-item"
<el-tag
class=
"mx-1 q-mr-md"
effect=
"dark"
v-if=
"item.TemplateType==2"
effect=
"dark"
size=
"small"
>
广告
</el-tag>
content=
"编辑"
<span
v-else
class=
"iconfont icon-pdf sellPdf"
></span>
placement=
"top"
>
<span>
{{item.Title}}
</span>
<el-button
type=
"primary"
icon=
"Edit"
size=
"small"
@
click=
"editDelete(item,0)"
></el-button>
</el-tooltip>
</div>
</div>
<div>
<div>
<el-tooltip
{{item.CreateByName}}
class=
"box-item q-mr-md"
<span
class=
"sellCreateTime"
>
{{item.CreateTime}}
</span>
effect=
"dark"
content=
"删除"
placement=
"top"
>
<el-button
type=
"primary"
icon=
"Delete"
size=
"small"
@
click=
"editDelete(item,1)"
></el-button>
</el-tooltip>
</div>
</div>
<div>
<div>
{{item.UpdateTime}}
</div>
<Popover
trigger=
"click"
placement=
"bottom-start"
v-model:value=
"item.show"
>
<div
class=
"row flex-between"
>
<
template
#
content
>
<div>
<QRCode
:value=
"item.ShareUrl"
:bordered=
"false"
/>
</
template
>
<el-tooltip
<el-tooltip
class=
"box-item"
class=
"box-item"
effect=
"dark"
effect=
"dark"
content=
"
分享
"
content=
"
编辑
"
placement=
"top"
>
placement=
"top"
>
<el-button
type=
"primary"
icon=
"Share"
size=
"small"
></el-button>
<el-button
type=
"primary"
icon=
"Edit"
size=
"small"
@
click=
"editDelete(item,0)"
></el-button>
</el-tooltip>
</div>
<div>
<el-tooltip
class=
"box-item q-mr-md"
effect=
"dark"
content=
"删除"
placement=
"top"
>
<el-button
type=
"primary"
icon=
"Delete"
size=
"small"
@
click=
"editDelete(item,1)"
></el-button>
</el-tooltip>
</el-tooltip>
</Popover>
</div>
<div>
<Popover
trigger=
"click"
placement=
"bottom-start"
v-model:value=
"item.show"
>
<
template
#
content
>
<QRCode
:value=
"item.ShareUrl"
:bordered=
"false"
/>
</
template
>
<el-tooltip
class=
"box-item"
effect=
"dark"
content=
"分享"
placement=
"top"
>
<el-button
type=
"primary"
icon=
"Share"
size=
"small"
></el-button>
</el-tooltip>
</Popover>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
v-else-if=
"dataList.length == 0 && !loading"
class=
"q-mt-lg bg-white rounded"
style=
"padding: 30px 10px 30px 10px;"
>
<el-empty
description=
"暂无数据"
/>
</div>
<el-divider
class=
"no-bg q-mt-lg"
v-if=
'queryObj.pageCount == queryObj.pageIndex && !loading'
>
<span
class=
"text-samll bg-white"
style=
"background: #f3f6fb;padding: 0 10px;color:#a3a3a3"
>
已加载完成所有数据
</span>
</el-divider>
<div
style=
"height:40px;"
class=
"q-mt-md no-bg"
background=
"transparent"
v-loading=
"loading"
element-loading-text=
"正在加载中"
></div>
</div>
</div>
<div
v-else-if=
"dataList.length == 0 && !loading"
class=
"q-mt-lg bg-white rounded"
style=
"padding: 30px 10px 30px 10px;"
>
<el-empty
description=
"暂无数据"
/>
</div>
<el-divider
class=
"no-bg q-mt-lg"
v-if=
'queryObj.pageCount == queryObj.pageIndex && !loading'
>
<span
class=
"text-samll bg-white"
style=
"background: #f3f6fb;padding: 0 10px;color:#a3a3a3"
>
已加载完成所有数据
</span>
</el-divider>
<div
style=
"height:40px;"
class=
"q-mt-md no-bg"
background=
"transparent"
v-loading=
"loading"
element-loading-text=
"正在加载中"
></div>
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -142,6 +145,7 @@
...
@@ -142,6 +145,7 @@
console
.
log
(
Id
)
console
.
log
(
Id
)
queryObj
.
TemplateType
=
Id
queryObj
.
TemplateType
=
Id
searchData
.
value
.
SellTemplateType
=
Id
searchData
.
value
.
SellTemplateType
=
Id
queryObj
.
pageIndex
=
1
querySearchHandler
()
querySearchHandler
()
}
}
const
DeleteTemplate
=
async
(
item
:
any
)
=>
{
const
DeleteTemplate
=
async
(
item
:
any
)
=>
{
...
@@ -231,7 +235,7 @@
...
@@ -231,7 +235,7 @@
if
(
SellTemplateRef
.
value
&&
!
loading
.
value
){
if
(
SellTemplateRef
.
value
&&
!
loading
.
value
){
let
maxHeight
=
SellTemplateRef
.
value
.
scrollHeight
-
SellTemplateRef
.
value
.
offsetHeight
let
maxHeight
=
SellTemplateRef
.
value
.
scrollHeight
-
SellTemplateRef
.
value
.
offsetHeight
let
scrollTop
=
SellTemplateRef
.
value
.
scrollTop
let
scrollTop
=
SellTemplateRef
.
value
.
scrollTop
if
(
maxHeight
-
scrollTop
==
0
&&
queryObj
.
pageCount
>
queryObj
.
pageIndex
)
{
if
(
(
maxHeight
-
scrollTop
==
0
||
maxHeight
-
scrollTop
<
1
)
&&
queryObj
.
pageCount
>
queryObj
.
pageIndex
)
{
queryObj
.
pageIndex
++
queryObj
.
pageIndex
++
querySearchHandler
()
querySearchHandler
()
}
}
...
...
src/views/SellTemplate/index.vue
View file @
a4af1baf
<
template
>
<
template
>
<div
class=
"common-layout"
style=
"background: #f3f6fb;height:100vh;overflow: auto;"
>
<SellTemplate
/>
<div
style=
"padding: 30px; max-width:1440px; margin:0 auto;height: 100%;"
>
<div
class=
"rounded-bottom rounded-top"
>
<SellTemplate
/>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
...
...
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