Commit 7e6f755d by 匡雅琴

排序

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