From bd2bb680010b44b3d23ff0a5c5ace9cb3732cc89 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期一, 20 十月 2025 15:29:49 +0800
Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/dream_web
---
src/views/student/index.vue | 212 ++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 162 insertions(+), 50 deletions(-)
diff --git a/src/views/student/index.vue b/src/views/student/index.vue
index d91dae9..23f6c7a 100644
--- a/src/views/student/index.vue
+++ b/src/views/student/index.vue
@@ -6,8 +6,8 @@
<el-tab-pane label="宸茶繃鏈�" name="expired" />
<el-tab-pane label="宸插仠鐢�" name="deactivated" />
</el-tabs>
- <div style="display: flex; justify-content: space-between;">
- <el-button type="primary" size="small" @click="showCreate">鏂板缓瀛﹀憳</el-button>
+ <div style="display: flex">
+ <!-- <el-button type="primary" size="small" @click="showCreate">鏂板缓瀛﹀憳</el-button> -->
<div style="width: 300px">
<el-input
placeholder="鎸夊鍚嶆悳绱�"
@@ -18,43 +18,96 @@
<el-button
slot="append"
icon="el-icon-search"
- @click="fetchData"
+ @click="handleClick"
></el-button>
</el-input>
</div>
+ <div style="margin-left: 30px">
+ <el-button type="primary" size="small" @click="handleExport"
+ >瀵煎嚭瀛﹀憳</el-button
+ >
+ <el-button type="primary" size="small" @click="handleImport"
+ >瀵煎叆瀛﹀憳</el-button
+ >
+ </div>
+ <div style="width: 500px">
+ <!-- <el-date-picker v-model="dateRange" type="daterange" range-separator="鑷�" start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡" value-format="yyyy-MM-dd" style="margin-right: 10px">
+ </el-date-picker>
+ <el-button type="primary" @click="handleExport2">瀵煎嚭璇惧寘</el-button> -->
+ </div>
</div>
- <el-table
- v-loading="listLoading"
- :data="list"
- element-loading-text="Loading"
- fit
- >
- <el-table-column label="濮撳悕" prop="">
- <template slot-scope="scope">
- <el-link
- type="primary"
- :underline="false"
- @click="goDetails(scope.row)"
- >{{ scope.row.name }}</el-link
- >
- </template>
- </el-table-column>
- <el-table-column label="鎬у埆" width="80">
- <template slot-scope="scope">
- {{ scope.row.gender == "FEMALE" ? "濂�" : "鐢�" }}
- </template>
- </el-table-column>
- <el-table-column label="鎵嬫満鍙�" width="200" prop="mobile">
- <template slot-scope="scope">
- {{ scope.row.mobile ? scope.row.mobile : "--" }}
- </template>
- </el-table-column>
- <el-table-column label="鏄惁缁戝畾寰俊" width="200">
- <template slot-scope="scope">
- {{ scope.row.user ? "鏄�" : "鍚�" }}
- </template>
- </el-table-column>
- </el-table>
+ <div style="height: calc(100vh - 208px)">
+ <el-table
+ v-loading="listLoading"
+ :data="list"
+ element-loading-text="Loading"
+ fit
+ height="100%"
+ >
+ <el-table-column label="濮撳悕" prop="" width="300">
+ <template slot-scope="scope">
+ <el-link
+ type="primary"
+ :underline="false"
+ @click="goDetails(scope.row)"
+ >{{ scope.row.name }}</el-link
+ >
+ <!-- <el-link type="primary" :underline="false">{{
+ scope.row.name
+ }}</el-link> -->
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎬у埆"
+ width="200"
+ v-if="activeName !== 'deactivated'"
+ >
+ <template slot-scope="scope">
+ {{ scope.row.gender == "FEMALE" ? "濂�" : "鐢�" }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎵嬫満鍙�"
+ width="300"
+ prop="mobile"
+ v-if="activeName !== 'deactivated'"
+ >
+ <template slot-scope="scope">
+ {{ scope.row.mobile ? scope.row.mobile : "--" }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鏄惁缁戝畾寰俊"
+ v-if="activeName !== 'deactivated'"
+ min-width="200"
+ >
+ <template slot-scope="scope">
+ {{ scope.row.user ? "鏄�" : "鍚�" }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎿嶄綔"
+ width="200"
+ v-if="activeName == 'deactivated'"
+ >
+ <template slot-scope="">
+ <el-link type="primary" :underline="false">鍒犻櫎</el-link>
+
+ <el-link type="primary" :underline="false">鎭㈠</el-link>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鍋滅敤鏃堕棿"
+ width="200"
+ v-if="activeName == 'deactivated'"
+ >
+ <template slot-scope="scope">
+ {{ scope.row.modifyTime }}
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
<div>
<el-pagination
@size-change="handleSizeChange"
@@ -67,13 +120,18 @@
>
</el-pagination>
</div>
- <StudentCreate ref="studentCreate"/>
+ <el-dialog :visible.sync="dialogVisible" width="560px" title="瀵煎叆瀛﹀憳">
+ <UploadStudent
+ v-if="dialogVisible"
+ @load-success="reloadData"
+ ></UploadStudent>
+ </el-dialog>
</div>
</template>
<script>
import { getData, getRenew, getExpire, getDeleted } from "@/api/student";
-import StudentCreate from './components/create.vue'
+import UploadStudent from "./components/upload-student.vue";
export default {
filters: {
@@ -86,17 +144,18 @@
return statusMap[status];
},
},
- components:{
- StudentCreate,
+ components: {
+ UploadStudent,
},
data() {
return {
+ dateRange: [],
list: null,
listLoading: true,
activeName: "all",
total: 0,
data: {
- staffId: JSON.parse(localStorage.getItem('user')).staffs[0].id,
+ staffId: JSON.parse(localStorage.getItem("selectStaff")).id,
keyword: "",
pageIn: {
//鍙�夛紝濡傛灉鏄垎椤垫煡璇紝闇�瑕佸姞涓娿��
@@ -108,12 +167,58 @@
},
},
},
+ dialogVisible: false,
};
},
created() {
+ // 鑾峰彇鍦板潃鏍廲ode
+ // let code = this.$route.query.code;
+ // if (code) {
+ // if (localStorage.getItem("code")) {
+ // if (code !== localStorage.getItem("code")) {
+ // this.getUserDate(code);
+ // }
+ // } else {
+ // this.getUserDate(code);
+ // }
+ // } else {
+ // if (!localStorage.getItem("user")) {
+ // this.$router.push("/login");
+ // }
+ // }
this.fetchData();
},
methods: {
+ handleExport() {
+ this.download(
+ "exportPlayer?orgId=" +
+ JSON.parse(localStorage.getItem("selectStaff")).org.id+"&type=" +
+ this.activeName,
+ {},
+ `瀵煎嚭_${new Date().getTime()}.xlsx`
+ );
+ },
+ handleExport2() {
+ if (this.dateRange.length == 0) {
+ this.$message.warning("璇烽�夋嫨鏃ユ湡鑼冨洿");
+ return;
+ }
+ this.download(
+ "exportReport?startDate=" +
+ this.dateRange[0] +
+ "&endDate=" +
+ this.dateRange[1],
+ {},
+ `瀵煎嚭_${new Date().getTime()}.xlsx`
+ );
+ },
+ handleImport() {
+ this.dialogVisible = true;
+ },
+ reloadData() {
+ this.dialogVisible = false;
+ this.fetchData();
+ },
fetchData() {
this.listLoading = true;
getData(this.data).then((response) => {
@@ -124,18 +229,19 @@
},
handleSizeChange(val) {
this.data.pageIn.size = val;
- this.fetchData();
+ this.handleClick();
},
handleCurrentChange(val) {
this.data.pageIn.index = val - 1;
- this.fetchData();
+ this.handleClick();
},
handleClick(tab, event) {
+ this.data.staffId = JSON.parse(localStorage.getItem("selectStaff")).id;
if (this.activeName == "pendingFees") {
this.listLoading = true;
getRenew(this.data).then((response) => {
- this.list = response.data.findPlayerRenew.ls;
- this.total = response.data.findPlayerRenew.pageOut.total;
+ this.list = response.data.findRenewPlayerAcc.ls;
+ this.total = response.data.findRenewPlayerAcc.pageOut.total;
this.listLoading = false;
});
} else if (this.activeName == "expired") {
@@ -149,9 +255,15 @@
this.fetchData();
} else if (this.activeName == "deactivated") {
this.listLoading = true;
- getExpire(this.data).then((response) => {
- this.list = response.data.findPlayerExpire.ls;
- this.total = response.data.findPlayerExpire.pageOut.total;
+ let data = {
+ itemType: "PLAYER",
+ staffId: JSON.parse(localStorage.getItem("selectStaff")).id,
+ keyword: this.data.keyword,
+ pageIn: { ...this.data.pageIn },
+ };
+ getDeleted(data).then((response) => {
+ this.list = response.data.findDeletedItem.ls;
+ this.total = response.data.findDeletedItem.pageOut.total;
this.listLoading = false;
});
}
@@ -164,9 +276,9 @@
},
});
},
- showCreate(){
- this.$refs.studentCreate.showDialog()
- }
+ showCreate() {
+ this.$refs.studentCreate.showDialog();
+ },
},
};
</script>
--
Gitblit v1.8.0