|
|
@@ -0,0 +1,110 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-form :model="queryForm" inline size="small">
|
|
|
+ <el-form-item label="点位类型">
|
|
|
+ <el-input v-model="queryForm.keyword" placeholder="关键词"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="点位分布">
|
|
|
+ <el-input v-model="queryForm.keyword" placeholder="关键词"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="时间维度">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="queryForm.serviceBeginTime"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-row class="action-bar-container" type="flex" justify="end">
|
|
|
+ <el-button type="primary" size="small" @click.native="fetchData">查询</el-button>
|
|
|
+ <el-button-group>
|
|
|
+ <el-button v-permission="['bz.base.venue.add']" size="small" @click.native="$refs.dialogForm.open({})">
|
|
|
+ 新建
|
|
|
+ </el-button>
|
|
|
+ <el-button v-permission="['bz.base.venue.delete']" size="small" @click.native="deleteByIds(multipleSelection)">
|
|
|
+ 删除
|
|
|
+ </el-button>
|
|
|
+ </el-button-group>
|
|
|
+ </el-row>
|
|
|
+ <el-card :style="{ padding: '0px',float:'left' }" shadow="hover" v-for="item in pageData.records">
|
|
|
+ <img :src="item.litpic" class="image" style="width: 200px;max-height: 200px;">
|
|
|
+ <div style="padding: 14px;">
|
|
|
+ <span>{{ item.brief }}</span>
|
|
|
+ <div class="bottom clearfix">
|
|
|
+ <time class="time">currentDate</time>
|
|
|
+ <el-button type="text" class="button">操作按钮</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ <div style="clear: both"></div>
|
|
|
+ <el-pagination
|
|
|
+ class="pagination-container"
|
|
|
+ background
|
|
|
+ layout="prev, pager, next"
|
|
|
+ :total="pageData.total"
|
|
|
+ :page-size="pageData.pageSize"
|
|
|
+ @current-change="paginationChange"
|
|
|
+ />
|
|
|
+ <dialog-form ref="dialogForm" @ok="fetchData"/>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { deleteByIds, findPage } from '@/api/bz/equipment'
|
|
|
+import { dateTimeFormatter } from '@/utils/formater'
|
|
|
+import DialogForm from './DialogForm'
|
|
|
+
|
|
|
+export default {
|
|
|
+ components: { DialogForm },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ queryForm: {},
|
|
|
+ isLoading: true,
|
|
|
+ pageData: {
|
|
|
+ records: []
|
|
|
+ },
|
|
|
+ currentPage: 1,
|
|
|
+ multipleSelection: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.fetchData()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ dateTimeFormatter,
|
|
|
+ selectionChange(val) {
|
|
|
+ const temp = []
|
|
|
+ val.forEach(o => {
|
|
|
+ temp.push(o.id)
|
|
|
+ })
|
|
|
+ this.multipleSelection = temp
|
|
|
+ },
|
|
|
+ deleteByIds(ids) {
|
|
|
+ this.$confirm('确认要删除吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ deleteByIds(ids).then(() => {
|
|
|
+ this.fetchData()
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ paginationChange(val) {
|
|
|
+ this.currentPage = val
|
|
|
+ this.fetchData()
|
|
|
+ },
|
|
|
+ fetchData() {
|
|
|
+ this.isLoading = true
|
|
|
+ findPage({ ...this.queryForm, current: this.currentPage })
|
|
|
+ .then((response) => {
|
|
|
+ this.pageData = response
|
|
|
+ })
|
|
|
+ .finally(() => (this.isLoading = false))
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|