人生啊人生 3 months ago
parent
commit
9e4788df6e

+ 113 - 1
user_web/src/view/admin/ManageUser.vue

@@ -3,11 +3,123 @@ import { computed, onMounted, onUnmounted, watch, ref } from "vue";
 import { useRouter } from 'vue-router';
 const router = useRouter();
 
+let state = ref({
+    organizationList: [],
+    userListParams: {
+        keyword: '',
+        page: 1,
+        limit: 5,
+    },
+    userList: [],
+    userTotal: 0,
+    showDialog: false,
+    ids: [],
+    showDel: false,
+})
+
 </script>
 
 <template>
     <div class="ManageUser">
-        账号管理
+        
+        <div class="content commonsScrollbar">
+            <div class="contentTitle">
+                <div class="contentTitle-line"></div>
+                <div class="contentTitle-text">学生管理</div>
+            </div>
+            <div class="contentRow">
+                <div class="rowLeft">
+                    <div class="rowSelect">
+                        <el-select
+                            v-model="state.userListParams.orgId"
+                            clearable
+                            placeholder="全部班级"
+                            size="large"
+                            style="width: 15rem"
+                            @change="classChange"
+                        >
+                            <el-option v-for="item in state.organizationList" :key="item.id" :label="item.name" :value="item.id" />
+                        </el-select>
+                    </div>
+                    <div class="rowBtn rowBtn1" @click="btnAddStudent(ruleFormRef)">
+                        <img src="./assets/img/manageUser/add.svg" alt="" />
+                        <span class="rowBtn-text rowBtn-text1">添加学生</span>
+                    </div>
+                    <div class="rowBtn rowBtn2">
+                        <img src="./assets/img/manageUser/download.svg" alt="" />
+                        <span class="rowBtn-text rowBtn-text2">模板下载</span>
+                    </div>
+                    <div class="rowBtn rowBtn1">
+                        <img src="./assets/img/manageUser/import.svg" alt="" />
+                        <span class="rowBtn-text rowBtn-text1">批量导入</span>
+                    </div>
+                    <div class="rowBtn rowBtn1">
+                        <img src="./assets/img/manageUser/export.svg" alt="" />
+                        <span class="rowBtn-text rowBtn-text1">批量导出</span>
+                    </div>
+                    <div class="rowBtn rowBtn3" @click="btnShowDel">
+                        <img src="./assets/img/manageUser/delete.svg" alt="" />
+                        <span class="rowBtn-text rowBtn-text3">批量删除</span>
+                    </div>
+                </div>
+                <div class="rowRight">
+                    <el-input
+                        v-model="state.userListParams.keyword"
+                        :prefix-icon="Search"
+                        clearable
+                        style="width: 17rem; height: 3rem"
+                        placeholder="搜索学生姓名/学号"
+                        @clear="btnSearchName"
+                    />
+                    <div class="rowSearch" @click="btnSearchName">搜索</div>
+                </div>
+            </div>
+            <div class="contentTable">
+                <el-table :data="state.userList" style="width: 100%" @selection-change="selectionChange">
+                    <el-table-column align="center" type="selection" width="110" />
+                    <el-table-column prop="name" label="姓名/学号" />
+                    <el-table-column prop="name" label="学校" />
+                    <el-table-column prop="orgName" label="班级" />
+                    <el-table-column prop="orgName" label="加入时间" />
+                    <el-table-column label="操作">
+                        <template #default="scope">
+                            <el-button link type="primary" @click="btnDetail(scope.row)">详情</el-button>
+                            <el-popconfirm :title="`你确定删除${scope.row.name}吗?`" @confirm="btnDel(scope.row)">
+                                <template #reference>
+                                    <el-button link type="danger" style="margin-left: 3rem">移除</el-button>
+                                </template>
+                            </el-popconfirm>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </div>
+            <!-- <el-pagination
+                class="classPagination"
+                v-model:current-page="state.userListParams.page"
+                v-model:page-size="state.userListParams.limit"
+                :page-sizes="[10, 20, 50, 100]"
+                background
+                :layout="config.layout.shrink ? 'prev, next, jumper' : ' ->, total,prev, pager, next, jumper'"
+                :total="state.userTotal"
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+            >
+            </el-pagination> -->
+
+            <el-pagination
+                class="classPagination"
+                v-model:current-page="state.userListParams.page"
+                v-model:page-size="state.userListParams.limit"
+                :page-sizes="[10, 20, 50, 100]"
+                background
+                :layout="'prev, next, jumper'"
+                :total="state.userTotal"
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+            >
+            </el-pagination>
+        </div>
+
     </div>
 </template>
 

+ 5 - 0
user_web/src/view/admin/assets/img/manageUser/add.svg

@@ -0,0 +1,5 @@
+<svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="file-add-fill">
+<path id="Vector" d="M13.3333 2.1665L17.5 6.33317V18.0067C17.5 18.4632 17.1292 18.8332 16.6722 18.8332H3.32783C2.87063 18.8332 2.5 18.4538 2.5 18.0067V2.993C2.5 2.53655 2.87079 2.1665 3.32783 2.1665H13.3333ZM9.16667 9.6665H6.66667V11.3332H9.16667V13.8332H10.8333V11.3332H13.3333V9.6665H10.8333V7.1665H9.16667V9.6665Z" fill="#3D7CFF"/>
+</g>
+</svg>

+ 5 - 0
user_web/src/view/admin/assets/img/manageUser/delete.svg

@@ -0,0 +1,5 @@
+<svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="delete-bin-2-fill">
+<path id="Vector" d="M5.83317 5.49984V2.99984C5.83317 2.5396 6.20627 2.1665 6.6665 2.1665H13.3332C13.7934 2.1665 14.1665 2.5396 14.1665 2.99984V5.49984H18.3332V7.1665H16.6665V17.9998C16.6665 18.4601 16.2934 18.8332 15.8332 18.8332H4.1665C3.70627 18.8332 3.33317 18.4601 3.33317 17.9998V7.1665H1.6665V5.49984H5.83317ZM11.1783 12.1663L12.6515 10.6932L11.473 9.51467L9.99984 10.9878L8.52667 9.51467L7.34819 10.6932L8.82134 12.1663L7.34819 13.6394L8.52667 14.8179L9.99984 13.3448L11.473 14.8179L12.6515 13.6394L11.1783 12.1663ZM7.49984 3.83317V5.49984H12.4998V3.83317H7.49984Z" fill="#E84D4D"/>
+</g>
+</svg>

+ 5 - 0
user_web/src/view/admin/assets/img/manageUser/download.svg

@@ -0,0 +1,5 @@
+<svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="file-download-fill">
+<path id="Vector" d="M13.3333 2.1665L17.5 6.33317V18.0067C17.5 18.4632 17.1292 18.8332 16.6722 18.8332H3.32783C2.87063 18.8332 2.5 18.4538 2.5 18.0067V2.993C2.5 2.53655 2.87079 2.1665 3.32783 2.1665H13.3333ZM10.8333 10.4998V7.1665H9.16667V10.4998H6.66667L10 13.8332L13.3333 10.4998H10.8333Z" fill="#D8A216"/>
+</g>
+</svg>

+ 5 - 0
user_web/src/view/admin/assets/img/manageUser/error-line.svg

@@ -0,0 +1,5 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="error-warning-line">
+<path id="Vector" d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 15H13V17H11V15ZM11 7H13V13H11V7Z" fill="#E84D4D"/>
+</g>
+</svg>

+ 5 - 0
user_web/src/view/admin/assets/img/manageUser/export.svg

@@ -0,0 +1,5 @@
+<svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="export-fill">
+<path id="Vector" d="M17.4998 3H2.49984C2.0396 3 1.6665 3.3731 1.6665 3.83333V17.1667C1.6665 17.6269 2.0396 18 2.49984 18H17.4998C17.9601 18 18.3332 17.6269 18.3332 17.1667V3.83333C18.3332 3.3731 17.9601 3 17.4998 3ZM9.99984 13.8333C8.61909 13.8333 7.49984 12.7141 7.49984 11.3333H3.33317V4.66667H16.6665V11.3333H12.4998C12.4998 12.7141 11.3806 13.8333 9.99984 13.8333ZM13.3332 9.66667H10.8332V12.1667H9.1665V9.66667H6.6665L9.99984 5.91667L13.3332 9.66667Z" fill="#3D7CFF"/>
+</g>
+</svg>

+ 5 - 0
user_web/src/view/admin/assets/img/manageUser/import.svg

@@ -0,0 +1,5 @@
+<svg width="22" height="23" viewBox="0 0 22 23" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="import-fill">
+<path id="Vector" d="M19.2502 3.25H2.75016C2.24391 3.25 1.8335 3.66041 1.8335 4.16667V18.8333C1.8335 19.3396 2.24391 19.75 2.75016 19.75H19.2502C19.7564 19.75 20.1668 19.3396 20.1668 18.8333V4.16667C20.1668 3.66041 19.7564 3.25 19.2502 3.25ZM11.0002 15.1667C9.48134 15.1667 8.25016 13.9355 8.25016 12.4167H3.66683V5.08333H18.3335V12.4167H13.7502C13.7502 13.9355 12.519 15.1667 11.0002 15.1667ZM14.6668 8.75H11.9168V6H10.0835V8.75H7.3335L11.0002 12.875L14.6668 8.75Z" fill="#3D7CFF"/>
+</g>
+</svg>