Commit 7e6f755d by 匡雅琴

排序

1 parent 6b051ef0
......@@ -13,8 +13,8 @@
<span class="tips">添加业务类型,该素材组里面的所有素材均会添加此业务类型</span> -->
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="submitForm">确定</el-button>
<el-button @click="dialogVisible = false" :size="size">取 消</el-button>
<el-button type="primary" @click="submitForm" :size="size">确定</el-button>
</span>
</el-dialog>
</div>
......
......@@ -93,7 +93,7 @@ export default {
var params = {}
params.groupId = item.id
params.pageNum = 1
params.pageSize = 10
params.pageSize = 1000
this.$emit('getList', params, item)
},
// 打开1-新增, 2-编辑 素材组弹框
......@@ -185,7 +185,10 @@ export default {
ul {
li {
text-align: left;
padding: 18px 16px 8px 18px;
padding: 8px 16px 8px 18px;
&:first-child {
padding-top: 16px;
}
i {
font-size: 16px;
padding-top: 6px;
......
......@@ -5,7 +5,7 @@
<el-button type="primary" :size="size" @click="handleSearch(scope)">查询</el-button>
</span>
</glsx-combi-form>
<GLTable ref="staffSendDetailRef" @setTableFinishFun="setTableFinishFun" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams"></GLTable>
<GLTable ref="staffSendDetailRef" :hasPage="false" @sortChange="sortChange" @setTableFinishFun="setTableFinishFun" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams"></GLTable>
</div>
</template>
......@@ -19,7 +19,9 @@ export default {
url,
searchForm: {
materialId: this.$route.query.id,
employeeName: ''
employeeName: '',
sortValue: '',
sort: ''
},
staffSendFormData: [
{
......@@ -84,9 +86,31 @@ export default {
setTableFinishFun() {
//接收到的数据为空
this.$refs.staffSendDetailRef.data.length ? (this.$refs.staffSendDetailRef.tableHeightValues = '') : this.$refs.staffSendDetailRef.setTableHeightFun()
},
sortChange({ column, prop, order }) {
// 添加-排序相关参数
console.log(prop, order, '------');
if (order === 'ascending') {
this.searchForm.sort = 2
} else {
this.searchForm.sort = 1
}
if (prop === 'sendNumber') {
this.searchForm.sortValue = 2
} else {
this.searchForm.sortValue = 1
}
this.handleSearch()
}
}
}
</script>
<style lang="" scoped></style>
<style lang="scss" scoped>
/deep/ .el-table .ascending .sort-caret.ascending {
border-bottom-color: #5850ff;
}
/deep/ .el-table .descending .sort-caret.descending {
border-top-color: #5850ff;
}
</style>
......@@ -30,7 +30,7 @@
<el-col :span="19">
<div class="right" :style="{ height: boxHeight }">
<div class="groupTitle">{{ materialGroupName }}(共{{ tableTotal }}条数据)</div>
<GLTable ref="materialRef" :noDataImg="url" @refreshTable="getListApi" :layout="layout" :searchForm="searchForm" :tableParams="tableParams" :tableData="materialTableData" :pageConf="pageConf" :tableTotal="tableTotal" @sortChange="sortChange" :isCustomHead="true" :customHeadShowList="customHeadShowList">
<GLTable ref="materialRef" :hasPage="false" :noDataImg="url" @refreshTable="getListApi" :layout="layout" :searchForm="searchForm" :tableParams="tableParams" :tableData="materialTableData" :pageConf="pageConf" :tableTotal="tableTotal" @sortChange="sortChange" :isCustomHead="true" :customHeadShowList="customHeadShowList">
<!-- 素材内容 -->
<div slot="materialContentRpcResponse" slot-scope="scope" style="text-align: center">
<!-- 素材为PDF -->
......@@ -47,7 +47,7 @@
<!-- 图文 -->
<span v-if="scope.scope.materialType == 3" class="material-content">
<el-tooltip effect="dark" placement="top" :content="scope.scope.materialContentRpcResponse.materialName" :disabled="scope.scope.materialContentRpcResponse.materialName.length < 16">
<span>{{ scope.scope.materialContentRpcResponse.materialName }}</span>
<span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>
</el-tooltip>
<el-popover placement="top" trigger="hover">
<div>
......@@ -77,12 +77,12 @@
<el-popover placement="right" trigger="click">
<ul>
<li>
<el-button :size="size" type="text" @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</el-button>
<!-- <GLButton :size="size" type="text" fn="禁用" @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</GLButton> -->
<!-- <el-button :size="size" type="text" @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</el-button> -->
<GLButton :size="size" type="text" fn="禁用" @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</GLButton>
</li>
<li>
<el-button :size="size" type="text" @click="handleDelete(scope.scope)">删除</el-button>
<!-- <GLButton :size="size" type="text" fn="删除营销素材" @click="handleDelete(scope.scope)">删除</GLButton> -->
<!-- <el-button :size="size" type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
<GLButton :size="size" type="text" fn="删除营销素材" @click="handleDelete(scope.scope)">删除</GLButton>
</li>
</ul>
<el-button type="text" slot="reference" class="btn-more">更多</el-button>
......@@ -230,13 +230,17 @@ export default {
prop: 'sendNum',
sortable: true,
width: 150,
formatter: cellVal => {
return cellVal.sendNum
},
renderHeader: (h, { column, $index }) => {
return h(
'div',
{
style: {
display: 'inline-flex',
'align-items': 'center'
'align-items': 'center',
padding: 0
}
},
[
......@@ -284,7 +288,8 @@ export default {
{
style: {
display: 'inline-flex',
'align-items': 'center'
'align-items': 'center',
padding: 0
}
},
[
......@@ -370,7 +375,7 @@ export default {
}
})
},
// 新增或编辑素材弹框打开
// 新增或编辑素材组弹框打开
addDialogShow(addOrEdit, value, group) {
this.materialGroupDialog = true
this.$refs.addMaterialGroup.init(addOrEdit, value, group)
......@@ -464,8 +469,10 @@ export default {
},
getListApi() {
var params = this.getParams()
params.pageSize = this.$refs.materialRef.page.pageSize
params.pageNum = this.$refs.materialRef.page.pageNum
// params.pageSize = this.$refs.materialRef.page.pageSize
// params.pageNum = this.$refs.materialRef.page.pageNum
params.pageSize = 1000000
params.pageNum = 1
params.groupId = ''
this.getTableList(params)
this.materialGroupName = '全部素材'
......@@ -474,7 +481,6 @@ export default {
// 点击素材组获取素材组素材
getList(params, item) {
this.materialGroupName = item.materialGroupName
this.searchForm.groupId = item.id
this.getTableList(params)
},
// 功能介绍弹框
......@@ -577,7 +583,7 @@ ul {
text-align: left;
display: inline-block;
min-width: 100px;
max-width: 200px;
max-width: 220px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
......@@ -598,13 +604,10 @@ ul {
.pdf-title {
text-align: right !important;
}
// /deep/ .el-table .ascending .sort-caret.ascending {
// border-bottom-color: #5850ff;
// }
// /deep/ .el-table .ascending .sort-caret.descending {
// border-top-color: #5850ff;
// }
// /deep/ .el-table .descending .sort-caret.descending {
// border-top-color: #5850ff;
// }
/deep/ .el-table .ascending .sort-caret.ascending {
border-bottom-color: #5850ff;
}
/deep/ .el-table .descending .sort-caret.descending {
border-top-color: #5850ff;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!