Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 9fb865eb
authored
Mar 29, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
表格调整
1 parent
f492d89e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
184 additions
and
32 deletions
src/views/material/components/staffSendDetail.vue
src/views/material/index.vue
src/views/material/components/staffSendDetail.vue
View file @
9fb865e
...
@@ -2,10 +2,11 @@
...
@@ -2,10 +2,11 @@
<div>
<div>
<glsx-combi-form
ref=
"staffSendFormRef"
:formObj=
"searchForm"
:formData=
"staffSendFormData"
:inline=
"true"
>
<glsx-combi-form
ref=
"staffSendFormRef"
:formObj=
"searchForm"
:formData=
"staffSendFormData"
:inline=
"true"
>
<span
slot=
"footer"
slot-scope=
"scope"
class=
"select-pro"
>
<span
slot=
"footer"
slot-scope=
"scope"
class=
"select-pro"
>
<el-button
type=
"primary"
:size=
"size"
@
click=
"handleSearch(scope)"
>
查询
</el-button>
<el-button
type=
"primary"
:size=
"size"
@
click=
"getListApi"
>
查询
</el-button>
<el-button
type=
"default"
:size=
"size"
@
click=
"handleReset(scope)"
>
重置
</el-button>
</span>
</span>
</glsx-combi-form>
</glsx-combi-form>
<GLTable
ref=
"staffSendDetailRef"
:hasPage=
"false"
@
sortChange=
"sortChange"
@
setTableFinishFun=
"setTableFinishFun"
:pageConf=
"pageConf"
:getListApi=
"getListApi
"
:beforeSearchFn=
"beforeSearchFn"
:noDataImg=
"url"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
></GLTable>
<GLTable
ref=
"staffSendDetailRef"
:hasPage=
"false"
:tableData=
"sendStaffTableData"
@
sortChange=
"sortChange"
@
setTableFinishFun=
"setTableFinishFun
"
:beforeSearchFn=
"beforeSearchFn"
:noDataImg=
"url"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
></GLTable>
</div>
</div>
</
template
>
</
template
>
...
@@ -32,8 +33,154 @@ export default {
...
@@ -32,8 +33,154 @@ export default {
prefixIcon
:
'el-icon-search'
prefixIcon
:
'el-icon-search'
}
}
],
],
getListApi
:
this
.
$apis
.
material
.
sendDetailPage
,
// getListApi: this.$apis.material.sendDetailPage,
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
// pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
sendStaffTableData
:
[
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
3
,
readNumber
:
5
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
3
,
readNumber
:
5
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
3
,
readNumber
:
5
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
3
,
readNumber
:
5
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
3
,
readNumber
:
5
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
3
,
readNumber
:
5
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
3
,
readNumber
:
8
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
5
,
readNumber
:
5
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
}
],
tableParams
:
{
tableParams
:
{
listName
:
'data'
,
listName
:
'data'
,
tableOption
:
false
,
tableOption
:
false
,
...
@@ -45,18 +192,12 @@ export default {
...
@@ -45,18 +192,12 @@ export default {
{
{
label
:
'发送次数'
,
label
:
'发送次数'
,
prop
:
'sendNumber'
,
prop
:
'sendNumber'
,
sortable
:
true
,
sortable
:
true
formatter
:
cellVal
=>
{
return
cellVal
.
sendNumber
}
},
},
{
{
label
:
'阅读次数'
,
label
:
'阅读次数'
,
prop
:
'readNumber'
,
prop
:
'readNumber'
,
sortable
:
true
,
sortable
:
true
formatter
:
cellVal
=>
{
return
cellVal
.
readNumber
}
},
},
{
{
label
:
'阅读人数'
,
label
:
'阅读人数'
,
...
@@ -70,37 +211,44 @@ export default {
...
@@ -70,37 +211,44 @@ export default {
}
}
}
}
},
},
mounted
()
{
this
.
getListApi
()
},
methods
:
{
methods
:
{
// 搜索
// 搜索
handleSearch
()
{
//
handleSearch() {
this
.
$refs
.
staffSendDetailRef
.
refreshTable
()
//
this.$refs.staffSendDetailRef.refreshTable()
},
//
},
// 重置
// 重置
handleReset
()
{
handleReset
()
{
this
.
searchForm
=
{
this
.
searchForm
=
{
staffName
:
''
,
staffName
:
''
,
materialId
:
this
.
$route
.
query
.
id
materialId
:
this
.
$route
.
query
.
id
}
}
this
.
handleSearch
()
this
.
getListApi
()
},
},
setTableFinishFun
()
{
setTableFinishFun
()
{
//接收到的数据为空
//接收到的数据为空
this
.
$refs
.
staffSendDetailRef
.
data
.
length
?
(
this
.
$refs
.
staffSendDetailRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
staffSendDetailRef
.
setTableHeightFun
()
this
.
$refs
.
staffSendDetailRef
.
data
.
length
?
(
this
.
$refs
.
staffSendDetailRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
staffSendDetailRef
.
setTableHeightFun
()
},
},
sortChange
({
column
,
prop
,
order
})
{
sortChange
({
column
,
prop
,
order
})
{
// 添加-排序相关参数
order
===
'ascending'
?
(
this
.
searchForm
.
sort
=
2
)
:
(
this
.
searchForm
.
sort
=
1
)
console
.
log
(
prop
,
order
,
'------'
);
prop
===
'sendNumber'
?
(
this
.
searchForm
.
sortValue
=
2
)
:
(
this
.
searchForm
.
sortValue
=
1
)
if
(
order
===
'ascending'
)
{
this
.
getListApi
()
this
.
searchForm
.
sort
=
2
},
}
else
{
getParams
()
{
this
.
searchForm
.
sort
=
1
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
}
return
params
if
(
prop
===
'sendNumber'
)
{
},
this
.
searchForm
.
sortValue
=
2
getListApi
()
{
}
else
{
var
params
=
this
.
getParams
()
this
.
searchForm
.
sortValue
=
1
}
this
.
$apis
.
material
.
sendDetailPage
(
params
).
then
(
res
=>
{
this
.
handleSearch
()
this
.
sendStaffTableData
=
res
res
.
length
?
(
this
.
$refs
.
staffSendDetailRef
.
tableHeightValues
=
'230px'
)
:
this
.
$refs
.
staffSendDetailRef
.
setTableHeightFun
()
// this.$refs.staffSendDetailRef.tableHeightValues = '100px'
// this.$refs.staffSendDetailRef.tableHeightValues = '230px'
})
}
}
}
}
}
}
...
...
src/views/material/index.vue
View file @
9fb865e
...
@@ -131,6 +131,7 @@ export default {
...
@@ -131,6 +131,7 @@ export default {
materialGroupDialog
:
false
,
materialGroupDialog
:
false
,
introductionDialog
:
false
,
introductionDialog
:
false
,
boxHeight
:
''
,
boxHeight
:
''
,
tableHeight
:
''
,
businessTypes
:
[],
businessTypes
:
[],
materialGroupName
:
''
,
materialGroupName
:
''
,
materialFormData
:
[
materialFormData
:
[
...
@@ -341,6 +342,7 @@ export default {
...
@@ -341,6 +342,7 @@ export default {
let
clientHeight
=
document
.
documentElement
.
clientHeight
let
clientHeight
=
document
.
documentElement
.
clientHeight
let
offTop
=
document
.
querySelector
(
'.tabelList'
).
offsetTop
let
offTop
=
document
.
querySelector
(
'.tabelList'
).
offsetTop
this
.
boxHeight
=
clientHeight
-
offTop
-
80
+
'px'
this
.
boxHeight
=
clientHeight
-
offTop
-
80
+
'px'
this
.
tableHeight
=
clientHeight
-
offTop
-
130
+
'px'
this
.
findAllDictData
(
'business_type'
)
this
.
findAllDictData
(
'business_type'
)
this
.
firstCome
()
this
.
firstCome
()
this
.
getListApi
()
this
.
getListApi
()
...
@@ -444,6 +446,7 @@ export default {
...
@@ -444,6 +446,7 @@ export default {
// 获取素材列表
// 获取素材列表
getTableList
(
params
)
{
getTableList
(
params
)
{
this
.
$apis
.
material
.
materialList
(
params
).
then
(
res
=>
{
this
.
$apis
.
material
.
materialList
(
params
).
then
(
res
=>
{
console
.
log
(
res
,
'------------'
);
let
data
=
res
let
data
=
res
let
tableData
=
[]
let
tableData
=
[]
data
.
forEach
(
item
=>
{
data
.
forEach
(
item
=>
{
...
@@ -463,8 +466,9 @@ export default {
...
@@ -463,8 +466,9 @@ export default {
tableData
.
push
(
item
)
tableData
.
push
(
item
)
})
})
this
.
materialTableData
=
tableData
this
.
materialTableData
=
tableData
this
.
tableTotal
=
res
.
count
this
.
tableTotal
=
res
.
length
res
.
count
?
(
this
.
$refs
.
materialRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
materialRef
.
setTableHeightFun
()
this
.
$refs
.
materialRef
.
tableHeightValues
=
this
.
tableHeight
// res.length ? (this.$refs.materialRef.tableHeightValues = this.tableHeight) : (this.$refs.materialRef.tableHeightValues = '230px')
})
})
},
},
getListApi
()
{
getListApi
()
{
...
@@ -561,7 +565,7 @@ ul {
...
@@ -561,7 +565,7 @@ ul {
border-right
:
1px
solid
#e8e8ea
;
border-right
:
1px
solid
#e8e8ea
;
}
}
.right
{
.right
{
overflow
:
auto
;
//
overflow
:
auto
;
.groupTitle
{
.groupTitle
{
padding
:
20px
0
16px
19px
;
padding
:
20px
0
16px
19px
;
font-weight
:
600
;
font-weight
:
600
;
...
...
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