Browse Source

page分页

dev
xuhuajiao 3 years ago
parent
commit
b4b700c25e
  1. 7
      src/views/device/deviceConfig.vue
  2. 4
      src/views/device/index.vue
  3. 21
      src/views/materialContent/index.vue
  4. 15
      src/views/materialContent/materialList/index.vue
  5. 33
      src/views/publishContent/historyList/index.vue
  6. 20
      src/views/publishContent/urgentMessage/index.vue

7
src/views/device/deviceConfig.vue

@ -54,7 +54,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination style="margin-top: 20px; text-align: center" :current-page="queryInfo.page" :total="total" :page-size="queryInfo.size" :pager-count="7" :page-sizes="[3, 5, 10]" layout="prev, pager, next, jumper,->,sizes,total" @current-change="getStartUpList" @size-change="handleSizeChange" />
<el-pagination style="margin-top: 20px;" background :current-page="queryInfo.page" :total="total" :page-size="queryInfo.size" :pager-count="7" :page-sizes="[3, 5, 10]" layout="prev, pager, next, jumper,->,sizes,total" @current-change="getStartUpList" @size-change="handleSizeChange" />
</el-col> </el-col>
</el-row> </el-row>
@ -216,7 +216,7 @@ export default {
device_name: '', device_name: '',
is_state: '', is_state: '',
page: 1, page: 1,
size: 3
size: 10
}, },
total: 0, total: 0,
// //
@ -324,9 +324,6 @@ export default {
if (row.open_weekly) { if (row.open_weekly) {
this.selectOpenWeekly = row.open_weekly.split(',') this.selectOpenWeekly = row.open_weekly.split(',')
} }
// console.log(this.form.open_weekly)
// console.log(typeof this.form.open_weekly)
// console.log(this.selectOpenWeekly)
this.form.close_weekly = row.close_weekly this.form.close_weekly = row.close_weekly
if (row.close_weekly) { if (row.close_weekly) {
this.selectCloseweekly = row.close_weekly.split(',') this.selectCloseweekly = row.close_weekly.split(',')

4
src/views/device/index.vue

@ -64,7 +64,7 @@
</el-table> </el-table>
</el-col> </el-col>
</el-row> </el-row>
<el-pagination style="margin-top: 20px; text-align: center" :current-page="queryInfo.page" :total="total" :page-size="queryInfo.size" :pager-count="7" :page-sizes="[3, 5, 10]" layout="prev, pager, next, jumper,->,sizes,total" @current-change="getDevice" @size-change="handleSizeChange" />
<el-pagination style="margin-top: 20px;" background :current-page="queryInfo.page" :total="total" :page-size="queryInfo.size" :pager-count="7" :page-sizes="[3, 5, 10]" layout="prev, pager, next, jumper,->,sizes,total" @current-change="getDevice" @size-change="handleSizeChange" />
<!-- 编辑设备 --> <!-- 编辑设备 -->
<div class="layer"> <div class="layer">
<el-dialog :title="dialogTitle" :close-on-click-modal="false" :show-close="false" :visible.sync="addFromVisible" width="576px"> <el-dialog :title="dialogTitle" :close-on-click-modal="false" :show-close="false" :visible.sync="addFromVisible" width="576px">
@ -158,7 +158,7 @@ export default {
device_name: '', device_name: '',
is_state: '', is_state: '',
page: 1, page: 1,
size: 3
size: 10
}, },
total: 0, total: 0,
// device_id:'', // device_id:'',

21
src/views/materialContent/index.vue

@ -5,17 +5,17 @@
<el-tab-pane label="全部" name="0" /> <el-tab-pane label="全部" name="0" />
<el-tab-pane name="1"> <el-tab-pane name="1">
<span slot="label"> <span slot="label">
图片<i class="emrgencyCount">1</i>
图片<i class="emrgencyCount">{{ imgNum }}</i>
</span> </span>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="2"> <el-tab-pane name="2">
<span slot="label"> <span slot="label">
视频<i class="emrgencyCount">1</i>
视频<i class="emrgencyCount">{{ videoNum }}</i>
</span> </span>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="3"> <el-tab-pane name="3">
<span slot="label"> <span slot="label">
音频<i class="emrgencyCount">1</i>
音频<i class="emrgencyCount">{{ audioNum }}</i>
</span> </span>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -37,9 +37,19 @@ export default {
return { return {
activeIndex: 0 || '0', activeIndex: 0 || '0',
isMultiSelected: false, isMultiSelected: false,
mulitText: '多选'
mulitText: '多选',
audioNum: 0,
imgNum: 0,
videoNum: 0
} }
}, },
mounted: function() {
setTimeout(() => {
this.audioNum = this.$refs.MaterialList.audioNum
this.imgNum = this.$refs.MaterialList.imgNum
this.videoNum = this.$refs.MaterialList.videoNum
}, 1000)
},
methods: { methods: {
handleClick(tab) { handleClick(tab) {
this.activeIndex = tab.index this.activeIndex = tab.index
@ -82,4 +92,7 @@ export default {
position: relative; position: relative;
padding: 6px 0 20px 0; padding: 6px 0 20px 0;
} }
.emrgencyCount{
padding: 0 4px;
}
</style> </style>

15
src/views/materialContent/materialList/index.vue

@ -10,8 +10,8 @@
<!-- 上传 / 创建文件夹 --> <!-- 上传 / 创建文件夹 -->
<div class="material_item cont_upload"> <div class="material_item cont_upload">
<Upload ref="uploadMaterial" :is-theme="isTheme" @saveMaterial="saveMaterial" /> <Upload ref="uploadMaterial" :is-theme="isTheme" @saveMaterial="saveMaterial" />
<el-button v-if="!isToFolder" class="mkdir_btn" round type="primary" @click="handleMkdir(0)">创建文件夹</el-button>
<el-button v-else class="return_btn" round type="primary"><a href="/content">返回</a></el-button>
<el-button v-if="!isToFolder && tabType == null" class="mkdir_btn" round type="primary" @click="handleMkdir(0)">创建文件夹</el-button>
<el-button v-if="isToFolder" class="return_btn" round type="primary"><a href="/content">返回</a></el-button>
</div> </div>
<!-- 文件夹list --> <!-- 文件夹list -->
<div v-for="(item,index) in materialFolders" :key="item.id" :class="['material_item', 'folder', { 'item_multi': folderChecked == index }]" @click.stop="editFolder(item,index)" @dblclick="floderDbClick(item,index)"> <div v-for="(item,index) in materialFolders" :key="item.id" :class="['material_item', 'folder', { 'item_multi': folderChecked == index }]" @click.stop="editFolder(item,index)" @dblclick="floderDbClick(item,index)">
@ -162,7 +162,10 @@ export default {
uploadListData: [ // uploadListData: [ //
], ],
folderListChecked: -1, folderListChecked: -1,
tabType: null
tabType: null,
audioNum: 0,
imgNum: 0,
videoNum: 0
} }
}, },
computed: { computed: {
@ -178,7 +181,6 @@ export default {
} }
}, },
activeIndex(newName, oldName) { activeIndex(newName, oldName) {
// console.log(newName)
this.tabIndex = newName this.tabIndex = newName
}, },
'$route.query.folderTag'(Val) { '$route.query.folderTag'(Val) {
@ -186,7 +188,7 @@ export default {
} }
}, },
created() { created() {
console.log(localStorage.getItem('materialTabIndex'))
// console.log(localStorage.getItem('materialTabIndex'))
}, },
mounted: function() { mounted: function() {
console.log(this.$route.query.folderTag) console.log(this.$route.query.folderTag)
@ -228,6 +230,9 @@ export default {
} }
this.materialFolders = res.data.materialFolders this.materialFolders = res.data.materialFolders
this.materialList = res.data.pageThemeVO this.materialList = res.data.pageThemeVO
this.audioNum = res.data.audioNum
this.imgNum = res.data.imgNum
this.videoNum = res.data.videoNum
// data // data
this.thisFoldId = res.data.thisFoldId this.thisFoldId = res.data.thisFoldId
}) })

33
src/views/publishContent/historyList/index.vue

@ -2,7 +2,6 @@
<div class="list_warp"> <div class="list_warp">
<el-row :gutter="15"> <el-row :gutter="15">
<el-col> <el-col>
<!-- v-loading="crud.loading" -->
<el-table ref="table" :data="publishHistoryList" :header-cell-style="{ background: '#3a8aeb', color: '#fff' }" @selection-change="handleSelectionChange"> <el-table ref="table" :data="publishHistoryList" :header-cell-style="{ background: '#3a8aeb', color: '#fff' }" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column label="发布名称" align="center" prop="relaase_name" /> <el-table-column label="发布名称" align="center" prop="relaase_name" />
@ -48,7 +47,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!--分页组件-->
<!-- 分页器 -->
<el-pagination style="margin-top: 20px;" background :current-page="page" :total="total" :page-size="size" :pager-count="5" :page-sizes="[3, 5, 10]" layout="prev, pager, next, jumper,->,sizes,total" @current-change="getPublishHistory" @size-change="handleSizeChange" />
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -67,21 +67,14 @@ export default {
data() { data() {
return { return {
form: {
},
queryInfo: {
release_name: '',
orga_id: '133221333123111', orga_id: '133221333123111',
page: 1, page: 1,
size: 3
},
//
publishHistoryList: [],
size: 10,
// //
total: 0, total: 0,
//
publishHistoryList: [],
selectedList: [] selectedList: []
} }
}, },
mounted() { mounted() {
@ -89,8 +82,14 @@ export default {
}, },
methods: { methods: {
// //
getPublishHistory() {
const params = this.queryInfo
getPublishHistory(pager = 1) {
this.page = pager
const params = {
release_name: '',
orga_id: this.orga_id,
page: this.page,
size: this.size
}
reqPublishHistory(params).then(res => { reqPublishHistory(params).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.publishHistoryList = res.data.content this.publishHistoryList = res.data.content
@ -119,6 +118,12 @@ export default {
this.clearBtnDisabled = true this.clearBtnDisabled = true
} }
console.log(val) console.log(val)
},
//
handleSizeChange(size) {
//
this.size = size
this.getPublishHistory()
} }
} }
} }

20
src/views/publishContent/urgentMessage/index.vue

@ -36,7 +36,7 @@
</el-col> </el-col>
</el-row> </el-row>
<!-- 分页器 --> <!-- 分页器 -->
<el-pagination style="margin-top: 20px; text-align: center" :current-page="queryInfo.page" :total="total" :page-size="queryInfo.size" :pager-count="5" :page-sizes="[3, 5, 10]" layout="prev, pager, next, jumper,->,sizes,total" @current-change="getUrgentMessage" @size-change="handleSizeChange" />
<el-pagination style="margin-top: 20px;" background :current-page="queryInfo.page" :total="total" :page-size="queryInfo.size" :pager-count="5" :page-sizes="[3, 5, 10]" layout="prev, pager, next, jumper,->,sizes,total" @current-change="getUrgentMessage" @size-change="handleSizeChange" />
<!-- 编辑紧急通知 --> <!-- 编辑紧急通知 -->
<div class="publish_layer"> <div class="publish_layer">
@ -178,7 +178,7 @@ export default {
notice_name: '', notice_name: '',
orga_id: '133221333123111', orga_id: '133221333123111',
page: 1, page: 1,
size: 3
size: 10
}, },
total: 0, total: 0,
messageVisible: false, messageVisible: false,
@ -293,13 +293,13 @@ export default {
this.form.context_position_name = '底部' this.form.context_position_name = '底部'
} }
// //
// if(context_speed_name == 0){
// this.form.context_speed_name='1s'
// }else if(this.form.context_speed==1){
// this.form.context_speed_name='2s'
// }else{
// this.form.context_speed_name='3s'
// }
if (this.form.context_speed_name == 0) {
this.form.context_speed_name = '1s'
} else if (this.form.context_speed == 1) {
this.form.context_speed_name = '2s'
} else {
this.form.context_speed_name = '3s'
}
// //
if (this.form.context_size == 0) { if (this.form.context_size == 0) {
this.form.context_size_name = '16' this.form.context_size_name = '16'
@ -345,7 +345,7 @@ export default {
: '添加紧急通知成功' : '添加紧急通知成功'
}) })
this.messageVisible = false this.messageVisible = false
this.getUrgentMessage(this.form.notice_id ? this.queryInfo : 1)
this.getUrgentMessage(this.queryInfo.page)
} }
}) })
} }

Loading…
Cancel
Save