Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-activity-center
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b2df02b0
authored
Dec 07, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
第一bug修复
1 parent
86f6b477
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
143 additions
and
50 deletions
src/components/glsx-table/index.vue
src/views/seckillActivity/components/selectStore.vue
src/views/seckillActivity/dataBoard.vue
src/views/seckillActivity/editCrowdFund.vue
src/components/glsx-table/index.vue
View file @
b2df02b
<
template
>
<div
class=
"glsx-table"
>
<el-scrollbar
:native=
"false"
wrapStyle=
""
wrapClass=
""
viewClass=
""
viewStyle=
""
noresize=
"false"
tag=
"section"
>
<el-table
id=
"initTable"
:ref=
"tableParams.mutiSelectName + 'MutiTable' || 'MutiTable'"
:data=
"getListApi ? data : tableData"
:row-key=
"tableParams.mutiSelectUniqueKey || ''"
v-loading=
"loading"
:height=
"tableHeightValues"
:border=
"border"
:tableId=
"tableId"
:highlight-current-row=
"true"
:stripe=
"true"
@
sort-change=
"sortChange"
@
selection-change=
"handleSelect"
:size=
"size"
:header-cell-style=
"headerStyle"
>
<el-table-column
v-if=
"tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
type=
"selection"
width=
"55"
:selectable=
"checkSelectable"
:reserve-selection=
"true"
></el-table-column>
<el-table-column
v-if=
"hasNum"
align=
"center"
width=
"60px"
label=
"序号"
type=
"index"
:index=
"index => index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1"
></el-table-column>
<el-table-column
v-for=
"(item, index) in tableColumns"
:key=
"index"
:label=
"item.label"
:prop=
"item.prop"
:width=
"item.width"
:min-width=
"item.minWidth"
:align=
"item.align || 'center'"
:sortable=
"item.sortable"
>
<el-scrollbar
:native=
"false"
wrapStyle=
""
wrapClass=
""
viewClass=
""
viewStyle=
""
noresize=
"false"
tag=
"section"
>
<el-table
id=
"initTable"
:ref=
"tableParams.mutiSelectName + 'MutiTable' || 'MutiTable'"
:data=
"getListApi ? data : tableData"
:row-key=
"tableParams.mutiSelectUniqueKey || ''"
v-loading=
"loading"
:height=
"tableHeightValues"
:border=
"border"
:tableId=
"tableId"
:highlight-current-row=
"true"
:stripe=
"true"
@
sort-change=
"sortChange"
@
selection-change=
"handleSelect"
:size=
"size"
:header-cell-style=
"headerStyle"
>
<el-table-column
v-if=
"tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
type=
"selection"
width=
"55"
:selectable=
"checkSelectable"
:reserve-selection=
"true"
></el-table-column>
<el-table-column
v-if=
"hasNum"
align=
"center"
width=
"60px"
label=
"序号"
type=
"index"
:index=
"index => index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1"
>
</el-table-column>
<el-table-column
v-for=
"(item, index) in tableColumns"
:key=
"index"
:label=
"item.label"
:prop=
"item.prop"
:width=
"item.width"
:min-width=
"item.minWidth"
:align=
"item.align || 'center'"
:sortable=
"item.sortable"
>
<template
slot-scope=
"scope"
>
<slot
v-if=
"item.addHtml"
:name=
"item.addHtml"
:scope=
"scope.row"
:prop=
"item.prop"
:width=
"item.width"
></slot>
<slot
v-if=
"item.addHtml"
:name=
"item.addHtml"
:scope=
"scope.row"
:prop=
"item.prop"
:width=
"item.width"
></slot>
<template
v-else-if=
"item.formatter"
>
<span
class=
"line-ellipsis"
:style=
"
{ '-webkit-line-clamp': item.line ? item.line : '' }" :title="item.formatter(scope.row)" v-text="item.formatter(scope.row)">
</span>
<span
class=
"line-ellipsis"
:style=
"
{ '-webkit-line-clamp': item.line ? item.line : '' }"
:title="item.formatter(scope.row)"
v-text="item.formatter(scope.row)">
</span>
</
template
>
<
template
v-else-if=
"getListApi"
>
<span
class=
"line-ellipsis"
:style=
"
{ '-webkit-line-clamp': item.line ? item.line : '' }" :title="scope.row[item.prop]" v-text="scope.row[item.prop]">
</span>
<span
class=
"line-ellipsis"
:style=
"
{ '-webkit-line-clamp': item.line ? item.line : '' }"
:title="scope.row[item.prop]"
v-text="scope.row[item.prop]">
</span>
</
template
>
<
template
v-else
>
<span
class=
"line-ellipsis"
:style=
"
{ '-webkit-line-clamp': item.line ? item.line : '' }" :title="tableData[scope.$index][item.prop]" v-text="tableData[scope.$index][item.prop]">
</span>
<span
class=
"line-ellipsis"
:style=
"
{ '-webkit-line-clamp': item.line ? item.line : '' }"
:title="tableData[scope.$index][item.prop]"
v-text="tableData[scope.$index][item.prop]">
</span>
</
template
>
<
template
v-if=
"item.addSymbol"
>
<span
v-text=
"item.addSymbol"
></span>
</
template
>
</template>
</el-table-column>
<el-table-column
v-if=
"tableParams.tableOption"
label=
"操作"
:align=
"tableParams.tableOption.align || 'center'"
:width=
"tableParams.tableOption.width || '200'"
fixed=
"right"
>
<el-table-column
v-if=
"tableParams.tableOption"
label=
"操作"
:align=
"tableParams.tableOption.align || 'center'"
:width=
"tableParams.tableOption.width || '200'"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<slot
name=
"auth-button"
:scope=
"scope.row"
></slot>
<slot
name=
"auth-button"
:scope=
"scope.row"
></slot>
</
template
>
</el-table-column>
<
template
slot=
"empty"
class=
"emptyBg"
>
<img
class=
"noDataImg"
:src=
"noDataImg"
v-if=
"noDataImg"
alt=
""
/>
<
template
slot=
"empty"
class=
"emptyBg"
>
<img
class=
"noDataImg"
:src=
"noDataImg"
v-if=
"noDataImg"
alt=
""
/>
<div>
{{
noDataText
}}
</div>
<slot
name=
"additionalContent"
></slot>
</
template
>
</el-table>
</el-scrollbar>
<el-pagination
v-if=
"hasPage"
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"page[this.pageConf.pageNum]"
:page-sizes=
"[10, 20, 30, 40]"
:page-size=
"page[this.pageConf.pageSize]"
:total=
"getListApi ? total : tableTotal"
:layout=
"layout"
></el-pagination>
<el-pagination
v-if=
"hasPage"
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"page[this.pageConf.pageNum]"
:page-sizes=
"[10, 20, 30, 40]"
:page-size=
"page[this.pageConf.pageSize]"
:total=
"getListApi ? total : tableTotal"
:layout=
"layout"
></el-pagination>
</div>
</template>
...
...
@@ -76,7 +142,7 @@ export default {
},
headerStyle
:
{
type
:
Object
,
default
:
()
=>
{}
default
:
()
=>
{
}
},
//表格需要多传入一个id的情况
tableId
:
{
...
...
@@ -86,7 +152,7 @@ export default {
// 搜索条件
searchForm
:
{
type
:
Object
,
default
:
()
=>
{}
default
:
()
=>
{
}
},
// 是否定制表头
isCustomHead
:
{
...
...
src/views/seckillActivity/components/selectStore.vue
View file @
b2df02b
...
...
@@ -15,11 +15,13 @@
<span
slot=
"footer"
>
<el-button
:size=
"size"
type=
"primary"
@
click=
"
getList
"
>
查询
</el-button>
@
click=
"
resetTable
"
>
查询
</el-button>
</span>
</glsx-combi-form>
<!-- : :hasPage="false"
:hasNum="false" :tableData="storeList" -->
:getListApi="getListApi"
:tableData="storeList" -->
<GLTable
ref=
"storeRef"
:noDataImg=
"url"
:tableTotal=
"total"
...
...
@@ -27,7 +29,8 @@
:tableParams=
"tableParams"
:pageConf=
"pageConf"
@
refreshTable=
"getList"
:getListApi=
"getListApi"
:tableData=
"storeList"
:hasNum=
"false"
:setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"radioHtml"
class=
"store-table"
...
...
@@ -58,7 +61,7 @@ export default {
},
getListApi
:
this
.
$apis
.
common
.
getMerchantList
,
total
:
0
,
//
storeList: [],
storeList
:
[],
heightBox
:
200
,
merchantId
:
''
,
merchantName
:
''
,
...
...
@@ -81,10 +84,15 @@ export default {
labelWidth
:
'10px'
}
],
pageConfig
:
{
pageSize
:
10
,
currentPage
:
1
},
// 表格
// getListApi: this.$apis.common.getstaffTreeListApi,
tableParams
:
{
listName
:
'list'
,
// tableOption: true,
// 行数据的key
// mutiSelectUniqueKey: 'staffId',
...
...
@@ -99,11 +107,11 @@ export default {
width
:
80
,
addHtml
:
'radioHtml'
},
//
{
//
label: '序号',
//
prop: 'idx',
//
width: 80
//
},
{
label
:
'序号'
,
prop
:
'idx'
,
width
:
80
},
{
label
:
'商户名称'
,
prop
:
'merchantName'
,
...
...
@@ -151,32 +159,44 @@ export default {
let
clientHeight
=
document
.
documentElement
.
clientHeight
this
.
heightBox
=
clientHeight
-
0.15
*
clientHeight
-
425
this
.
merchantId
=
this
.
merchantInfo
//
this.getList()
this
.
getList
()
},
methods
:
{
getList
()
{
// var params = {
// merchantId: this.merchantId,
// ...this.searchForm
// // merchantId: '44209390',
// }
this
.
$refs
.
storeRef
.
refreshTable
()
getList
(
pageCon
)
{
console
.
log
(
pageCon
,
'pageCon'
)
pageCon
&&
(
this
.
pageConfig
=
pageCon
)
var
params
=
{
merchantId
:
this
.
merchantId
,
...
this
.
searchForm
,
...
this
.
pageConfig
// merchantId: '44209390',
}
console
.
log
(
params
)
// this.$apis.common.getSimpleMerchantList(params).then(res => {
// console.log(res)
// this.storeList = res
// // this.storeList = res.staffUnitList
// // this.total = res.total
// // var page = this.$refs.staffRef.page
// // // 添加序号
// this.storeList.forEach((item, index) => {
// item.idx = index + 1
// })
// this.$refs.staffRef.tableHeightValues = '460px'
// })
},
this
.
$apis
.
common
.
getMerchantList
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
storeList
=
res
.
list
this
.
total
=
res
.
total
// // this.storeList = res.staffUnitList
// // var page = this.$refs.staffRef.page
// // // 添加序号
// pageConfig
let
nowIndex
=
this
.
pageConfig
.
pageSize
*
(
this
.
pageConfig
.
currentPage
-
1
)
console
.
log
(
nowIndex
)
this
.
storeList
.
forEach
((
item
,
index
)
=>
{
item
.
idx
=
index
+
1
+
nowIndex
})
console
.
log
(
this
.
storeList
)
// this.$refs.staffRef.tableHeightValues = '460px'
// })
})
},
resetTable
()
{
this
.
$refs
.
storeRef
&&
this
.
$refs
.
storeRef
.
refreshTable
()
this
.
getList
()
},
setTableFinishFun
()
{
// console.log(this.$refs.staffRef.data)
// this.storeList = this.$refs.staffRef.data
...
...
src/views/seckillActivity/dataBoard.vue
View file @
b2df02b
...
...
@@ -146,14 +146,13 @@
@
click=
"handleExport('liveData')"
>
导出
</el-button>
</div>
<!-- :searchForm="tableSearchForm" -->
<GLTable
ref=
"dataTableRef"
<GLTable
ref=
"dataTableRef
DetailPage
"
:getListApi=
"getLiveDetailPage"
:noDataImg=
"url"
:tableParams=
"liveTableParams"
:searchForm=
"LiveTableSearchForm"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
:beforeSearchFn=
"beforeSearchFn"
>
<div
slot=
"weChatName"
class=
"flex-align"
slot-scope=
"scope"
>
...
...
@@ -222,7 +221,8 @@ export default {
}
],
searchRankForm
:
{
statDimension
:
'1'
statDimension
:
'1'
,
shareName
:
''
},
searchFormRankData
:
[
{
...
...
@@ -234,6 +234,12 @@ export default {
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionsName
:
'statusList'
},
{
label
:
'员工名称'
,
name
:
'shareName'
,
type
:
'input'
,
maxlength
:
100
}
],
getListApi
:
this
.
$apis
.
seckillActivity
.
getRankListApi
,
...
...
@@ -405,6 +411,7 @@ export default {
getParams
()
{
let
{
activityId
}
=
this
.
$route
.
query
,
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchRankForm
))
console
.
log
(
params
)
params
.
activityId
=
activityId
return
params
},
...
...
src/views/seckillActivity/editCrowdFund.vue
View file @
b2df02b
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
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 post a comment