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/userStatistics.vue | 245 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 245 insertions(+), 0 deletions(-)
diff --git a/admin/src/views/meeting/userStatistics.vue b/admin/src/views/meeting/userStatistics.vue
new file mode 100644
index 0000000..27a2fb0
--- /dev/null
+++ b/admin/src/views/meeting/userStatistics.vue
@@ -0,0 +1,245 @@
+<template>
+ <TableLayout :permissions="['business:rooms:query']">
+ <!-- 鎼滅储琛ㄥ崟 -->
+ <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
+ <el-form-item label="浜哄憳" prop="userId">
+ <el-select
+ v-model="searchForm.userId"
+ clearable
+ filterable
+ placeholder="閫夋嫨浜哄憳"
+ >
+ <el-option
+ v-for="item in sysList"
+ :key="item.id"
+ :value="item.id"
+ :label="item.department?`${item.department.name}-${item.realname}`:item.realname"
+ ></el-option>
+ <!-- :label="item.name" -->
+ </el-select>
+ </el-form-item>
+ <el-form-item label="骞翠唤" prop="yearNum">
+ <el-select
+ v-model="searchForm.yearNum"
+ clearable
+ placeholder="閫夋嫨骞翠唤"
+ >
+ <el-option
+ v-for="item in years"
+ :key="item"
+ :value="item"
+ :label="`${item}骞碻"
+ ></el-option>
+ </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>
+ <!-- v-permissions="['business:rooms:create', 'business:rooms:delete']" -->
+ <ul class="toolbar" >
+ <!-- v-permissions="['business:rooms:exportExcel']" -->
+ <li><el-button :loading="isWorking.export" @click="exportExcel">瀵煎嚭</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="100px"></el-table-column> -->
+ <el-table-column prop="realname" label="濮撳悕" align="center" min-width="100px"></el-table-column>
+ <el-table-column prop="januaryCount" label="涓�鏈�" align="center" min-width="120px">
+ <template slot-scope="{row}">
+ {{ `${row.januaryCount}H` }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="januaryCount" label="浜屾湀" align="center" min-width="120px">
+ <template slot-scope="{row}">
+ {{ `${row.februaryCount}H` }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="januaryCount" label="涓夋湀" align="center" min-width="120px">
+ <template slot-scope="{row}">
+ {{ `${row.marchCount}H` }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="januaryCount" label="鍥涙湀" align="center" min-width="120px">
+ <template slot-scope="{row}">
+ {{ `${row.aprilCount}H` }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="januaryCount" label="浜旀湀" align="center" min-width="120px">
+ <template slot-scope="{row}">
+ {{ `${row.mayCount}H` }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="januaryCount" label="鍏湀" align="center" min-width="120px">
+ <template slot-scope="{row}">
+ {{ `${row.juneCount}H` }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="januaryCount" label="涓冩湀" align="center" min-width="120px">
+ <template slot-scope="{row}">
+ {{ `${row.julyCount}H` }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="januaryCount" label="鍏湀" align="center" min-width="120px">
+ <template slot-scope="{row}">
+ {{ `${row.augustCount}H` }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="januaryCount" label="涔濇湀" align="center" min-width="120px">
+ <template slot-scope="{row}">
+ {{ `${row.septemberCount}H` }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="januaryCount" label="鍗佹湀" align="center" min-width="120px">
+ <template slot-scope="{row}">
+ {{ `${row.octoberCount}H` }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="januaryCount" label="鍗佷竴鏈�" align="center" min-width="120px">
+ <template slot-scope="{row}">
+ {{ `${row.novemberCount}H` }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="januaryCount" label="鍗佷簩鏈�" align="center" min-width="120px">
+ <template slot-scope="{row}">
+ {{ `${row.decemberCount}H` }}
+ </template>
+ </el-table-column>
+
+ </el-table>
+ <pagination
+ @size-change="handleSizeChange"
+ @current-change="handlePageChange"
+ :pagination="tableData.pagination"
+ ></pagination>
+ </template>
+ </TableLayout>
+</template>
+
+<script>
+import BaseTable from '@/components/base/BaseTable'
+import TableLayout from '@/layouts/TableLayout'
+import Pagination from '@/components/common/Pagination'
+import { getUserStatistics, exportUserStatistics } from '@/api/meeting/bookings'
+import { fetchList as userList } from '@/api/system/user'
+
+export default {
+ name: 'Rooms',
+ extends: BaseTable,
+ components: { TableLayout, Pagination },
+ data () {
+ return {
+ years: [
+ '2021', '2022', '2023'
+ ],
+ sysList: [],
+ // 鎼滅储
+ searchForm: {
+ yearNum: '',
+ userId: ''
+ }
+ }
+ },
+
+ created () {
+ this.config({
+ module: '浼氳瀹や俊鎭〃',
+ api: '/meeting/rooms',
+ 'field.id': 'id',
+ 'field.main': 'id'
+ })
+ let tempYear = new Date().getFullYear()
+ this.searchForm.yearNum = tempYear
+ this.years = [tempYear-2, tempYear-1, tempYear]
+
+ // findList({})
+ // .then(res => {
+ // this.rooms = res
+ // })
+ userList({
+ page: 1,
+ capacity: 9999,
+ model: { realname: this.filterText },
+ })
+ .then(res => {
+ console.log('userList', res);
+ this.sysList = res.records
+ })
+ this.search()
+ },
+ methods: {
+ // 瀵煎嚭Excel
+ exportExcel () {
+ this.__checkApi()
+ this.$dialog.exportConfirm('纭瀵煎嚭鍚楋紵')
+ .then(() => {
+ this.isWorking.export = true
+ exportUserStatistics({
+ 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 (pageIndex) {
+ this.__checkApi()
+ this.tableData.pagination.pageIndex = pageIndex || this.tableData.pagination.pageIndex
+ this.isWorking.search = true
+ getUserStatistics({
+ page: this.tableData.pagination.pageIndex,
+ capacity: this.tableData.pagination.pageSize,
+ model: this.searchForm,
+ sorts: this.tableData.sorts
+ })
+ .then(data => {
+ this.tableData.list = data.records
+ 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