From c58ada7f49aac20b06ea2ebda2cb5c006decf122 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 10 五月 2024 17:01:55 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit

---
 admin/src/views/meeting/roomStatistics.vue |  230 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 230 insertions(+), 0 deletions(-)

diff --git a/admin/src/views/meeting/roomStatistics.vue b/admin/src/views/meeting/roomStatistics.vue
new file mode 100644
index 0000000..908efdf
--- /dev/null
+++ b/admin/src/views/meeting/roomStatistics.vue
@@ -0,0 +1,230 @@
+<template>
+  <TableLayout :permissions="['business:rooms:query']">
+    <!-- 鎼滅储琛ㄥ崟 -->
+    <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="80px" inline>
+      <!-- <el-form-item label="浼氳瀹ゅ悕绉�" prop="name">
+        <el-input v-model="searchForm.name" placeholder="璇疯緭鍏ュ悕绉�" @keypress.enter.native="search"></el-input>
+      </el-form-item> -->
+      <!-- <el-form-item label="浼氳瀹�" prop="roomId">
+        <el-select
+          v-model="searchForm.roomId"
+          filterable
+          clearable
+          placeholder="璇烽�夋嫨浼氳瀹�"
+        >
+          <el-option
+            v-for="item in rooms"
+            :key="item.id"
+            :value="item.id"
+            :label="item.name"
+          />
+        </el-select>
+      </el-form-item> -->
+      <el-form-item label="骞翠唤" prop="yearNum">
+        <!-- <div @click="selectMemberAction">
+          <el-input v-model="searchForm.id" disabled placeholder="閫夋嫨閮ㄩ棬鎴愬憳"></el-input>
+        </div> -->
+        <!-- {{ searchForm.sysList }} -->
+        <el-select
+          v-model="searchForm.yearNum"
+          clearable
+          placeholder="閫夋嫨閮ㄩ棬鎴愬憳"
+        >
+          <el-option
+            v-for="item in years"
+            :key="item"
+            :value="item"
+            :label="`${item}骞碻"
+          ></el-option>
+          <!-- <el-option :key="1" :value="1" label="绂佺敤" /> -->
+        </el-select>
+      </el-form-item>
+
+      <section>
+        <el-button type="primary" @click="search">鎼滅储</el-button>
+
+        <el-button @click="reset">閲嶇疆</el-button>
+      </section>
+    </el-form>
+    <!-- 琛ㄦ牸鍜屽垎椤� -->
+    <template v-slot:table-wrap>
+      <ul class="toolbar" v-permissions="['business:rooms:create', 'business:rooms:delete']">
+        <li><el-button :loading="isWorking.export" v-permissions="['business:rooms:exportExcel']" @click="exportExcel">瀵煎嚭</el-button></li>
+        <!-- <li><el-button type="primary" @click="$refs.operaRoomsWindow.open('鏂板缓浼氳瀹�')" v-permissions="['business:rooms:create']">鏂板缓</el-button></li>
+        <li><el-button @click="deleteByIdInBatch" v-permissions="['business:rooms:delete']">鍒犻櫎</el-button></li> -->
+      </ul>
+      <el-table
+        v-loading="isWorking.search"
+        :data="tableData.list"
+        stripe
+        border
+        @selection-change="handleSelectionChange"
+      >
+        <el-table-column prop="roomName" label="浼氳瀹�" align="center" min-width="120px"></el-table-column>
+        <el-table-column prop="januaryCount" label="涓�鏈�" align="center" min-width="80px">
+          <template slot-scope="{row}">
+            {{ `${row.januaryCount}H` }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="januaryCount" label="浜屾湀" align="center" min-width="80px">
+          <template slot-scope="{row}">
+            {{ `${row.februaryCount}H` }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="januaryCount" label="涓夋湀" align="center" min-width="80px">
+          <template slot-scope="{row}">
+            {{ `${row.marchCount}H` }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="januaryCount" label="鍥涙湀" align="center" min-width="80px">
+          <template slot-scope="{row}">
+            {{ `${row.aprilCount}H` }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="januaryCount" label="浜旀湀" align="center" min-width="80px">
+          <template slot-scope="{row}">
+            {{ `${row.mayCount}H` }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="januaryCount" label="鍏湀" align="center" min-width="80px">
+          <template slot-scope="{row}">
+            {{ `${row.juneCount}H` }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="januaryCount" label="涓冩湀" align="center" min-width="80px">
+          <template slot-scope="{row}">
+            {{ `${row.julyCount}H` }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="januaryCount" label="鍏湀" align="center" min-width="80px">
+          <template slot-scope="{row}">
+            {{ `${row.augustCount}H` }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="januaryCount" label="涔濇湀" align="center" min-width="80px">
+          <template slot-scope="{row}">
+            {{ `${row.septemberCount}H` }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="januaryCount" label="鍗佹湀" align="center" min-width="80px">
+          <template slot-scope="{row}">
+            {{ `${row.octoberCount}H` }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="januaryCount" label="鍗佷竴鏈�" align="center" min-width="80px">
+          <template slot-scope="{row}">
+            {{ `${row.novemberCount}H` }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="januaryCount" label="鍗佷簩鏈�" align="center" min-width="80px">
+          <template slot-scope="{row}">
+            {{ `${row.decemberCount}H` }}
+          </template>
+        </el-table-column>
+
+      </el-table>
+    </template>
+  </TableLayout>
+</template>
+
+<script>
+import BaseTable from '@/components/base/BaseTable'
+import TableLayout from '@/layouts/TableLayout'
+import { getRoomStatistics, exportRoomStatistics } from '@/api/meeting/bookings'
+// import { findList } from '@/api/meeting/rooms'
+export default {
+  name: 'Rooms',
+  extends: BaseTable,
+  components: { TableLayout,  },
+  data () {
+    return {
+      years: [
+        '2021', '2022', '2023'
+      ],
+      rooms: [],
+      // 鎼滅储
+      searchForm: {
+        yearNum: '',
+        roomId: ''
+      }
+    }
+  },
+
+  created () {
+    this.config({
+      module: '浼氳瀹や俊鎭〃',
+      api: '/meeting/rooms',
+      'field.id': 'id',
+      'field.main': 'id'
+    })
+    // findList({})
+    //   .then(res => {
+    //     this.rooms = res
+    //   })
+    let tempYear = new Date().getFullYear()
+    this.searchForm.yearNum = tempYear
+    this.years = [tempYear-2, tempYear-1, tempYear]
+    this.search()
+  },
+  methods: {
+    // 瀵煎嚭Excel
+    exportExcel () {
+      this.__checkApi()
+      this.$dialog.exportConfirm('纭瀵煎嚭鍚楋紵')
+        .then(() => {
+          this.isWorking.export = true
+          exportRoomStatistics({
+            page: this.tableData.pagination.pageIndex,
+            capacity: 1000000,
+            model: this.searchForm,
+            sorts: this.tableData.sorts
+          })
+            .then(response => {
+              this.download(response)
+            })
+            .catch(e => {
+              this.$tip.apiFailed(e)
+            })
+            .finally(() => {
+              this.isWorking.export = false
+            })
+        })
+        .catch(() => {})
+    },
+    // 椤电爜鍙樻洿澶勭悊
+    handlePageChange () {
+      this.isWorking.search = true
+      getRoomStatistics(this.searchForm.yearNum, this.searchForm.roomId)
+        .then(data => {
+          this.tableData.list = data
+          // this.tableData.pagination.total = data.total
+        })
+        .catch(e => {
+          this.$tip.apiFailed(e)
+        })
+        .finally(() => {
+          this.isWorking.search = false
+        })
+    },
+    // selectMemberAction() {
+    //   console.log('21212');
+    //   this.$refs.selectMember.open('閫夋嫨绠$悊鍛�')
+    // },
+    changeStatus(item) {
+      updateById({
+        id: item.id,
+        status: item.status
+      }).then(res => {
+        this.search()
+      })
+    }
+  },
+}
+</script>
+
+<style scoped>
+::v-deep .el-input.is-disabled .el-input__inner {
+  background-color: #fff !important;
+  cursor: pointer;
+}
+</style>

--
Gitblit v1.9.3