|
@@ -0,0 +1,1059 @@
|
|
|
+<template>
|
|
|
+ <div class="record-warp">
|
|
|
+ <div class="record-main">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <div class="search-head" style="padding-bottom: 10px">
|
|
|
+ <el-input v-model="userName" clearable placeholder="请输入姓名"></el-input>
|
|
|
+ <el-input v-model="userNo" clearable placeholder="请输入学号"></el-input>
|
|
|
+ <!-- <el-select
|
|
|
+ v-model="group3"
|
|
|
+ clearable
|
|
|
+ placeholder="请选择组织架构"
|
|
|
+ v-show="userInfo.roleType == '3'"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in options3"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-cascader
|
|
|
+ change=""
|
|
|
+ v-show="userInfo.roleType == '4'"
|
|
|
+ placeholder="请选择组织架构"
|
|
|
+ v-model="group"
|
|
|
+ :options="groupData"
|
|
|
+ clearable
|
|
|
+ ></el-cascader>
|
|
|
+ -->
|
|
|
+ <el-select v-model="auditStatusObj" clearable placeholder="请选择状态">
|
|
|
+ <el-option v-for="item in listOption" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <!--
|
|
|
+
|
|
|
+ <div style="display: flex; flex-direction: row; align-items: center">
|
|
|
+ <span
|
|
|
+ style="
|
|
|
+ font-size: 16px;
|
|
|
+ margin-right: 10px;
|
|
|
+ line-height: 20px;
|
|
|
+ min-width: 40px;
|
|
|
+ "
|
|
|
+ >性别:</span
|
|
|
+ >
|
|
|
+ <el-radio v-model="sex" label="1">男</el-radio>
|
|
|
+ <el-radio v-model="sex" label="0">女</el-radio>
|
|
|
+ </div> -->
|
|
|
+
|
|
|
+ <el-button type="primary" round icon="el-icon-search" @click="searchTarget">搜索</el-button>
|
|
|
+ <el-button type="info" round @click="clearSearch">清空</el-button>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <div class="table-content" style="flex: 1; overflow: auto">
|
|
|
+ <el-table height="100%" :data="tableData" :row-style="{ height: '0px' }" :cell-style="{ padding: '5px' }"
|
|
|
+ :header-cell-style="{ background: '#F8F8F8', color: '#606266' }">
|
|
|
+ <el-table-column show-overflow-tooltip prop="userName" label="姓名" align="center" width="">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="userNo" label="学号" align="center" width="">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="leaveType" label="是否离郑" width="" :formatter="leaveTypeFormatter" />
|
|
|
+ <!-- <el-table-column prop="userPhone" label="本人手机号码" width="" /> -->
|
|
|
+ <!-- <el-table-column prop="monitorName" label="班长姓名" width="" />
|
|
|
+ <el-table-column prop="dormitory" label="宿舍" width="" /> -->
|
|
|
+ <el-table-column prop="reason" label="请假原因" :show-overflow-tooltip="true" width="" />
|
|
|
+ <el-table-column prop="destination" label="出行目的地" :show-overflow-tooltip="true" width="" />
|
|
|
+ <!-- <el-table-column
|
|
|
+ prop="isKnow"
|
|
|
+ label="父母是否知情"
|
|
|
+ width=""
|
|
|
+ :formatter="isKnowFormatter"
|
|
|
+ />
|
|
|
+ <el-table-column prop="companionsPhone" label="同行人电话" width="" />
|
|
|
+ <el-table-column prop="motherPhone" label="母亲电话" width="" />
|
|
|
+ <el-table-column prop="fatherPhone" label="父亲电话" width="" /> -->
|
|
|
+ <!-- <el-table-column prop="travelMode" label="出行方式" width="" /> -->
|
|
|
+ <el-table-column prop="startTime" label="请假时间" :show-overflow-tooltip="true" width="" />
|
|
|
+
|
|
|
+ <el-table-column prop="endTime" label="返校时间" :show-overflow-tooltip="true" width="" />
|
|
|
+ <!-- <el-table-column prop="auditSuggest" label="审核建议" width="" /> -->
|
|
|
+ <el-table-column prop="auditStatus" label="审核状态" width="" :formatter="auditStatusFormatter" />
|
|
|
+ <!-- <el-table-column
|
|
|
+
|
|
|
+ prop="auditResult"
|
|
|
+ label="审核结果"
|
|
|
+ width="100"
|
|
|
+ :formatter="auditResultFormatter"
|
|
|
+ /> -->
|
|
|
+ <el-table-column prop="auditResult" label="审核结果" width="100" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div style="display: flex; justify-content: center; align-items: center"
|
|
|
+ v-show="scope.row.auditResult == '1'">
|
|
|
+ <img style="width: 14px" src="../../assets/img/table/dui.png" alt="" />
|
|
|
+ <div>通过</div>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex; justify-content: center; align-items: center"
|
|
|
+ v-show="scope.row.auditResult == '0'">
|
|
|
+ <img style="width: 14px" src="../../assets/img/table/cuo.png" alt="" />
|
|
|
+ <div>驳回</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="150" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="detail_button_out">
|
|
|
+ <div class="detail_button" @click="viewUser(scope.row)" v-show="scope.row.auditStatus == '1'">
|
|
|
+ <img src="../../assets/img/table/search.png" />
|
|
|
+ <span> 查看 </span>
|
|
|
+ </div>
|
|
|
+ <div class="detail_button" @click="viewUser(scope.row)" v-show="scope.row.auditStatus == '0'">
|
|
|
+ <img src="../../assets/img/table/pass.png" />
|
|
|
+ <span> 驳回/通过 </span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 弹出提示框 提示是否确认重置-->
|
|
|
+
|
|
|
+ <!-- 弹出提示框 提示是否确认删除-->
|
|
|
+
|
|
|
+ <!-- <div
|
|
|
+ class="detail_button"
|
|
|
+ @click="resetUser(true, scope.row)"
|
|
|
+ v-show="scope.row.auditStatus == '0'"
|
|
|
+ >
|
|
|
+ <img src="../../assets/img/table/pass.png" />
|
|
|
+ <span> 通过 </span>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="detail_button"
|
|
|
+ @click="resetUser(false, scope.row)"
|
|
|
+ v-show="scope.row.auditStatus == '0'"
|
|
|
+ >
|
|
|
+ <img src="../../assets/img/table/noPass.png" />
|
|
|
+ <span> 驳回 </span>
|
|
|
+ </div> -->
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <!-- small -->
|
|
|
+ <el-pagination class="pag_class" background @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
|
+ :current-page.sync="pageNum" layout="total, sizes, prev, pager, next" :page-size="pageSize"
|
|
|
+ :page-sizes="[10, 20, 50, 100]" :total="total">
|
|
|
+ </el-pagination>
|
|
|
+ <!-- <el-pagination small background layout="total prev, pager, next" :total="36">
|
|
|
+ </el-pagination> -->
|
|
|
+ </div>
|
|
|
+ <Register ref="register" @search="searchTarget" />
|
|
|
+ <el-dialog class="dig_update" :visible.sync="centerDialogVisible" width="90%" center top="5vh"
|
|
|
+ style="border-radius: 40px">
|
|
|
+ <div slot="title">
|
|
|
+ <div class="demo-ruleForm">
|
|
|
+ <p class="dig_title" v-show="view.auditStatus == '1'">详情</p>
|
|
|
+ <p class="dig_title" v-show="view.auditStatus == '0'">审核/驳回</p>
|
|
|
+ <div class="user_out_new">
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">姓名</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ view.userName }}
|
|
|
+ <!-- <el-input v-model=" view.userName" :disabled="true" placeholder="请输入审核建议" /> -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">学号</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ view.userNo }}
|
|
|
+ <!-- <el-input v-model=" view.userNo" :disabled="true" placeholder="请输入审核建议" /> -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">是否离郑</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ view.leaveType == "1" ? "离郑" : "不离郑" }}
|
|
|
+ <!-- <el-input v-model=" view.userNo" :disabled="true" placeholder="请输入审核建议" /> -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">本人手机号</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ view.userPhone }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">班长姓名</div>
|
|
|
+ <div class="user_out_subNext">{{ view.monitorName }} </div>
|
|
|
+ </div>
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">宿舍</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ view.dormitory }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">请假原因</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ view.reason }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">出行目的地</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ view.destination }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">父母是否知情</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ view.isKnow == "1" ? "知情" : "不知情" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="user_out" v-if="view.leaveType == 1">
|
|
|
+ <div class="user_out_sub">同行人电话</div>
|
|
|
+ <div class="user_out_subNext">{{ view.companionsPhone }} </div>
|
|
|
+ </div>
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">家长电话</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ view.motherPhone }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">紧急联系人电话</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ view.fatherPhone }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">出行方式</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ view.travelMode }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">请假时间</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ view.startTime }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">返校时间</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ view.endTime }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">审核结果</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ <div style="display: flex; align-items: center">
|
|
|
+ <img src="../../assets/img/table/dui.png" style="width: 20px; height: 20px" alt=""
|
|
|
+ v-show="view.auditResult == '1'" />
|
|
|
+ <div v-show="view.auditResult == '1'" style="color: #12bb65; font-weight: 700">
|
|
|
+ 已同意
|
|
|
+ </div>
|
|
|
+ <img src="../../assets/img/table/cuo.png" alt="" style="width: 20px; height: 20px"
|
|
|
+ v-show="view.auditResult == '0'" />
|
|
|
+ <div v-show="view.auditResult == '0'" style="color: #ff9000; font-weight: 700">
|
|
|
+ 已驳回
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <!-- {{
|
|
|
+ view.auditResult == null
|
|
|
+ ? ""
|
|
|
+ : view.auditResult == "0"
|
|
|
+ ? "驳回"
|
|
|
+ : "通过"
|
|
|
+ }} -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">审核状态</div>
|
|
|
+ <div class="user_out_subNext">
|
|
|
+ {{ view.auditStatus == "0" ? "待审批" : "已审批" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="user_out">
|
|
|
+ <div class="user_out_sub">审核建议</div>
|
|
|
+ <div class="user_out_subNext" v-show="view.auditStatus == '1'">
|
|
|
+ {{ view.auditSuggest }}
|
|
|
+ </div>
|
|
|
+ <div class="user_out_subNext record" style="background-color: #ffffff" v-show="view.auditStatus == '0'">
|
|
|
+ <el-input v-model="record" placeholder="请输入审核建议" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="user_button_detail" v-show="view.auditStatus == '0'">
|
|
|
+ <el-button type="success" round @click="submitCom(true)" style="padding: 10px 40px">
|
|
|
+ 通过
|
|
|
+ </el-button>
|
|
|
+ <el-button type="info" round @click="submitCom(false)" style="padding: 10px 40px">
|
|
|
+ 驳回
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog class="dig_update" :visible.sync="resetVisible" width="30%" center style="border-radius: 40px">
|
|
|
+ <div slot="title">
|
|
|
+ <div class="demo-ruleForm">
|
|
|
+ <p v-show="!isDelete" class="dig_title">审批提示</p>
|
|
|
+ <p v-show="isDelete" class="dig_title">审批提示</p>
|
|
|
+ <p v-show="!isDelete">确认驳回{{ userName }}的请假审批吗?</p>
|
|
|
+ <el-input v-show="!isDelete" type="textarea" :rows="5" placeholder="请输入驳回内容" style="margin-top: 10px"
|
|
|
+ v-model="record">
|
|
|
+ </el-input>
|
|
|
+ <p v-show="isDelete">确认通过{{ userName }}的请假审批吗?</p>
|
|
|
+ <div class="dig_button">
|
|
|
+ <el-button type="info" round @click="cancle()">取消</el-button>
|
|
|
+ <!-- <el-button type="success" round @click="submitForm('ruleForm')"
|
|
|
+ >提交</el-button
|
|
|
+ > -->
|
|
|
+ <el-button type="success" round @click="submitCom()">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { oSessionStorage } from "../../utils/utils";
|
|
|
+import register from "../../components/Register.vue";
|
|
|
+import { basePath } from "../../utils/http";
|
|
|
+export default {
|
|
|
+ name: "userManage",
|
|
|
+ components: {
|
|
|
+ Register: register,
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ userName: "",
|
|
|
+ userNo: "",
|
|
|
+ //审核字段
|
|
|
+ auditStatusObj: "",
|
|
|
+ record: "",
|
|
|
+ basePath: basePath,
|
|
|
+ //上传文件的弹出款的标志
|
|
|
+ fileVisible: false,
|
|
|
+ //判断点击的是重置密码还是点击删除
|
|
|
+ isDelete: false,
|
|
|
+ //重置密码需要调用个userId
|
|
|
+ userId: "",
|
|
|
+ //充值密码使用userName
|
|
|
+
|
|
|
+ //重置密码弹出框
|
|
|
+ resetVisible: false,
|
|
|
+ //根据名称搜索
|
|
|
+ name: "",
|
|
|
+ //搜索的用户编号
|
|
|
+ studentNumber: "",
|
|
|
+ //搜索的组织架构
|
|
|
+ // 搜索需要的性别
|
|
|
+ sex: "",
|
|
|
+ // 辅导用户的group
|
|
|
+ group3: "",
|
|
|
+ //辅导员用户的选项
|
|
|
+ options3: [],
|
|
|
+
|
|
|
+ group: "",
|
|
|
+ ppData: [],
|
|
|
+ groupData: [],
|
|
|
+ //批量上传时的组织架构
|
|
|
+ groupLead: [],
|
|
|
+ options: [
|
|
|
+ {
|
|
|
+ value: "1",
|
|
|
+ label: "选项1",
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ value: "11",
|
|
|
+ label: "选项11",
|
|
|
+ children: [{ value: "111", label: "选项111" }],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+
|
|
|
+ centerDialogVisible: false,
|
|
|
+ editUserFlag: false,
|
|
|
+ startTime: "",
|
|
|
+ endTime: "",
|
|
|
+ value1: null,
|
|
|
+ total: 0,
|
|
|
+ pageSize: 10,
|
|
|
+ pageNum: 1,
|
|
|
+ keyword: "",
|
|
|
+ tableData: [],
|
|
|
+ userInfo: {}, //用户信息
|
|
|
+
|
|
|
+ invitationCode: "",
|
|
|
+ roleType: "0",
|
|
|
+ type: 0,
|
|
|
+ view: {
|
|
|
+ // name: "",
|
|
|
+ // studentNumber: "",
|
|
|
+ // sex: "",
|
|
|
+ // orgName: "",
|
|
|
+ // //当前学生的届数
|
|
|
+ // grade: "",
|
|
|
+ },
|
|
|
+ channel: "",
|
|
|
+ channelList: [{ name: "渠道天成", id: "1" }],
|
|
|
+ headers: {},
|
|
|
+ grade: "",
|
|
|
+ group4: "",
|
|
|
+ filePath: "/user/userImport",
|
|
|
+ listOption: [
|
|
|
+ {
|
|
|
+ label: "待审批",
|
|
|
+ value: "0",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "已审批",
|
|
|
+ value: "1",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ position: "",
|
|
|
+ currentObj: {},
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() { },
|
|
|
+ mounted() {
|
|
|
+ this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
|
|
|
+ this.headers = {
|
|
|
+ Authorization: oSessionStorage.getItem("token")
|
|
|
+ ? `Bearer ${oSessionStorage.getItem("token")}`
|
|
|
+ : "",
|
|
|
+ };
|
|
|
+
|
|
|
+ if (!this.userInfo) {
|
|
|
+ //如果用户信息不存在跳转登陆页
|
|
|
+ this.$router.push({ path: "/" });
|
|
|
+ }
|
|
|
+
|
|
|
+ this.searchTarget();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //格式化是否离郑
|
|
|
+
|
|
|
+ leaveTypeFormatter(val) {
|
|
|
+ if (val.leaveType == "0") {
|
|
|
+ return "不离郑";
|
|
|
+ } else {
|
|
|
+ return "离郑";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //格式化父母是否知情
|
|
|
+ isKnowFormatter(val) {
|
|
|
+ if (val.isKnow == "1") {
|
|
|
+ return "知情";
|
|
|
+ } else {
|
|
|
+ return "不知情";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //格式审核状态状态
|
|
|
+ auditStatusFormatter(val) {
|
|
|
+ if (val.auditStatus == "0") {
|
|
|
+ return "待审批";
|
|
|
+ } else {
|
|
|
+ return "已审批";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //审核结果
|
|
|
+ auditResultFormatter(val) {
|
|
|
+ if (val.auditResult == null) {
|
|
|
+ return "";
|
|
|
+ } else {
|
|
|
+ if (val.auditResult == "0") {
|
|
|
+ return "驳回";
|
|
|
+ } else {
|
|
|
+ return "通过";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //调用接口得到列表的数据
|
|
|
+
|
|
|
+ openFileUp() {
|
|
|
+ //打开弹出框
|
|
|
+ this.$refs.uploadFileUser.clearFiles();
|
|
|
+ this.fileVisible = true;
|
|
|
+ this.group4 = "";
|
|
|
+ this.groupLead = [];
|
|
|
+ },
|
|
|
+ //当登录的角色是院管理员时
|
|
|
+ //得到届数
|
|
|
+ queryGrade() {
|
|
|
+ if (this.userInfo.roleType == "4") {
|
|
|
+ for (let i = 0; i < this.ppData.length; i++) {
|
|
|
+ if (this.groupLead[this.groupLead.length - 1] == this.ppData[i].orgNo) {
|
|
|
+ this.grade = this.ppData[i].extend;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.filePath =
|
|
|
+ basePath +
|
|
|
+ `/user/userImport?orgNo=${this.groupLead[this.groupLead.length - 1]
|
|
|
+ }&roleType=1&grade=${this.grade}`;
|
|
|
+ } else if (this.userInfo.roleType == "3") {
|
|
|
+ for (let i = 0; i < this.options3.length; i++) {
|
|
|
+ if (this.options3[i].value == this.group4) {
|
|
|
+ // this.groupName = this.options3[i].label;
|
|
|
+ this.grade = this.options3[i].extend;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.filePath =
|
|
|
+ basePath +
|
|
|
+ `/user/userImport?orgNo=${this.group4}&roleType=1&grade=${this.grade}`;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // queryOrgName3() {
|
|
|
+ // for (let i = 0; i < this.options3.length; i++) {
|
|
|
+ // if (this.options3[i].value == this.group4) {
|
|
|
+ // // this.groupName = this.options3[i].label;
|
|
|
+ // this.grade = this.options3[i].extend;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // queryGrade() {
|
|
|
+ // for (let i = 0; i < this.ppData.length; i++) {
|
|
|
+ // if (this.groupLead[this.groupLead.length - 1] == this.ppData[i].orgNo) {
|
|
|
+ // this.grade = this.ppData[i].extend;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ gradeFormatter(row) {
|
|
|
+ //格式化当前届数
|
|
|
+ return row.grade + "级";
|
|
|
+ },
|
|
|
+ //获取当前届数
|
|
|
+ //文件上传之前
|
|
|
+ beforeUploadFun(file) {
|
|
|
+ //判断当前用户时辅导员还是院管理员
|
|
|
+ if (this.userInfo.roleType == "4") {
|
|
|
+ //查询是否选择了组织架构
|
|
|
+ if (this.groupLead.length == 0) {
|
|
|
+ this.$message({
|
|
|
+ message: "请选择组织架构",
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ // this.filePath =
|
|
|
+ // basePath +
|
|
|
+ // `/user/userImport?orgNo=${
|
|
|
+ // this.groupLead[this.groupLead.length - 1]
|
|
|
+ // }&roleType=1&grade=${this.grade}`;
|
|
|
+ } else if (this.userInfo.roleType == "3") {
|
|
|
+ if (this.group4 == "") {
|
|
|
+ this.$message({
|
|
|
+ message: "请选择组织架构",
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // this.filePath =
|
|
|
+ // basePath +
|
|
|
+ // `/user/userImport?orgNo=${this.group4}&roleType=1&grade=${this.grade}`;
|
|
|
+ }
|
|
|
+ // if (this.grade == "") {
|
|
|
+ // this.$message({
|
|
|
+ // message: "请选择所属届",
|
|
|
+ // type: "error",
|
|
|
+ // });
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ //文件上传成功
|
|
|
+ fileSuccess(res) {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.searchTarget();
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ //查询列表
|
|
|
+ },
|
|
|
+ //文件上传失败
|
|
|
+ fileError() {
|
|
|
+ this.$message({
|
|
|
+ message: "上传失败",
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ },
|
|
|
+ cancle() {
|
|
|
+ this.resetVisible = false;
|
|
|
+ },
|
|
|
+ //提交文本
|
|
|
+ submitCom(val) {
|
|
|
+ //判断当前是否是 就是通过请假审批
|
|
|
+ this.isDelete = val;
|
|
|
+ if (this.isDelete) {
|
|
|
+ this.deleteUser();
|
|
|
+ //调用删除方法
|
|
|
+ } else {
|
|
|
+ //拒绝审批
|
|
|
+ this.deleteUser();
|
|
|
+ // 调用重置密码方法
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //性别---
|
|
|
+ genderFun(val) {
|
|
|
+ let sex = val.gender;
|
|
|
+ if (sex == "1") {
|
|
|
+ return "男";
|
|
|
+ } else if (sex == "0") {
|
|
|
+ return "女";
|
|
|
+ } else {
|
|
|
+ return sex;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //每页多少条
|
|
|
+ handleSizeChange(val) {
|
|
|
+ this.pageSize = val;
|
|
|
+ this.searchTarget();
|
|
|
+ //将首页重置为1时---且总条数变化
|
|
|
+ //设置为当前总条数
|
|
|
+ },
|
|
|
+
|
|
|
+ //获取辅导员组织架构方法
|
|
|
+ getInstructor() {
|
|
|
+ this.options3 = [];
|
|
|
+ //根据辅导员ID查询其下边的组织架构
|
|
|
+ let url = `/user/findUserById?id=${this.userInfo.id}`;
|
|
|
+ this.$http.get(url, {}, (res) => {
|
|
|
+ if (res && res.code == 200) {
|
|
|
+ //辅导员组织架构
|
|
|
+ // res.data.gradeEntities;
|
|
|
+ for (let i = 0; i < res.data.gradeEntities.length; i++) {
|
|
|
+ let obj = {
|
|
|
+ value: res.data.gradeEntities[i].orgNo,
|
|
|
+ label: res.data.gradeEntities[i].orgName,
|
|
|
+ extend: res.data.gradeEntities[i].extend,
|
|
|
+ };
|
|
|
+ this.options3.push(obj);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // this.$toast.fail(res.msg);
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //获取组织架构方法--------------------开始-----------------------
|
|
|
+ getChannel() {
|
|
|
+ this.$http.get(
|
|
|
+ `/org/findAllOrgByPOrgNo?orgNo=${this.userInfo.orgNo}`,
|
|
|
+ {},
|
|
|
+ (res) => {
|
|
|
+ // this.$toast.success({message:'成功'});
|
|
|
+ if (res && res.code == 200) {
|
|
|
+ //将值赋值给list
|
|
|
+ if (res.data.length > 0) {
|
|
|
+ let resAdd = this.addPro(res.data);
|
|
|
+ this.ppData = JSON.parse(JSON.stringify(resAdd));
|
|
|
+ let forRes = this.arrToTree(resAdd);
|
|
|
+ // console.log('格式化的结构')
|
|
|
+ // console.log(forRes)
|
|
|
+ let resultRes = this.deleteChildren(forRes);
|
|
|
+ let list = resultRes[0].children;
|
|
|
+ this.groupData = list.filter((item) => {
|
|
|
+ return item.extend != -1;
|
|
|
+ });
|
|
|
+ //将级等于-1的过滤掉
|
|
|
+ } else {
|
|
|
+ this.groupData = [];
|
|
|
+ }
|
|
|
+ // this.channelList = res.data;
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ //z增加
|
|
|
+ addPro(val) {
|
|
|
+ let data = JSON.parse(JSON.stringify(val));
|
|
|
+ for (let i = 0; i < val.length; i++) {
|
|
|
+ data[i].value = val[i].orgNo;
|
|
|
+ data[i].label = val[i].orgName;
|
|
|
+ }
|
|
|
+ return data;
|
|
|
+ },
|
|
|
+ //非递归方式:将平铺数据转换为树形结构数据
|
|
|
+ arrToTree(arr) {
|
|
|
+ let data = arr.filter((item) => {
|
|
|
+ item.children = arr.filter((e) => {
|
|
|
+ return item.orgNo === e.parentOrgNo;
|
|
|
+ });
|
|
|
+ // return !item.parentOrgNo;
|
|
|
+ return item.orgNo == this.userInfo.orgNo;
|
|
|
+ });
|
|
|
+ return data;
|
|
|
+ },
|
|
|
+ //去除转换树形结构数据后存在的空children
|
|
|
+ deleteChildren(arr) {
|
|
|
+ let childs = arr;
|
|
|
+ for (let i = childs.length; i--; i > 0) {
|
|
|
+ if (childs[i].children) {
|
|
|
+ if (childs[i].children.length) {
|
|
|
+ this.deleteChildren(childs[i].children);
|
|
|
+ } else {
|
|
|
+ delete childs[i].children;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return arr;
|
|
|
+ },
|
|
|
+ //获取组织架构方法--------------------结束-----------------------
|
|
|
+ formatterDelete(row) {
|
|
|
+ if (row.state == 0) {
|
|
|
+ return "已删除";
|
|
|
+ } else {
|
|
|
+ return "正常";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ resetUser(flag, val) {
|
|
|
+ //将驳回建议修改为空
|
|
|
+ this.record = "";
|
|
|
+ //将当前对象保存
|
|
|
+ //currentObj
|
|
|
+ this.currentObj = val;
|
|
|
+ this.resetVisible = true;
|
|
|
+ this.isDelete = flag;
|
|
|
+ this.userId = val.id;
|
|
|
+ this.userName = val.userName;
|
|
|
+ },
|
|
|
+ editUser(row) {
|
|
|
+ this.editRegisterUser(row);
|
|
|
+ },
|
|
|
+ viewUser(row) {
|
|
|
+ this.record = "";
|
|
|
+ this.view = row;
|
|
|
+ this.centerDialogVisible = true;
|
|
|
+ },
|
|
|
+ addUser() {
|
|
|
+ this.addRegisterUser(true);
|
|
|
+ },
|
|
|
+ clearSearch() {
|
|
|
+ this.auditStatusObj = "";
|
|
|
+ this.userNo = "";
|
|
|
+ this.userName = "";
|
|
|
+ this.searchTarget();
|
|
|
+ },
|
|
|
+
|
|
|
+ addRegisterUser(val) {
|
|
|
+ this.$refs.register.open(val);
|
|
|
+ },
|
|
|
+ editRegisterUser(val) {
|
|
|
+ this.$refs.register.edit(val);
|
|
|
+ },
|
|
|
+ resetFun() {
|
|
|
+ this.$http.get(
|
|
|
+ `/leave/approvalRecord?auditResult=${1}&id=${this.currentObj.id}`,
|
|
|
+ {},
|
|
|
+ (res) => {
|
|
|
+ // this.$toast.success({message:'成功'});
|
|
|
+ if (res && res.code == 200) {
|
|
|
+ this.resetVisible = false;
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.searchTarget();
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ deleteUser() {
|
|
|
+ //先判断
|
|
|
+ //是通过还是驳回
|
|
|
+ let url = "";
|
|
|
+
|
|
|
+ url = `/leave/approvalRecord?auditResult=${this.isDelete ? 1 : 0}&id=${this.view.id
|
|
|
+ }${this.record == "" ? "" : `&auditSuggest=${this.record}`}`;
|
|
|
+ this.$http.get(url, {}, (res) => {
|
|
|
+ this.centerDialogVisible = false;
|
|
|
+ // this.$toast.success({message:'成功'});
|
|
|
+ if (res && res.code == 200) {
|
|
|
+ if (this.isDelete) {
|
|
|
+ this.$message.success("已审批通过");
|
|
|
+ } else {
|
|
|
+ this.$message.success("已驳回申请");
|
|
|
+ }
|
|
|
+ this.resetVisible = false;
|
|
|
+ this.searchTarget();
|
|
|
+ } else {
|
|
|
+ this.$message.error("失败");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.pageNum = val;
|
|
|
+ this.searchList();
|
|
|
+ },
|
|
|
+ //根据现有情况进行搜索
|
|
|
+ searchList() {
|
|
|
+ let url = "";
|
|
|
+ //测试
|
|
|
+
|
|
|
+ url = `/leave/findAllByCurrentUser?pageNum=${this.pageNum}&pageSize=${this.pageSize
|
|
|
+ }${this.auditStatusObj == "" ? "" : `&auditStatus=${this.auditStatusObj}`}${this.userName == ""
|
|
|
+ ? ""
|
|
|
+ : `&userName=${this.userName}${this.userNo == "" ? "" : `&userNo=${this.userNo}`
|
|
|
+ }`
|
|
|
+ }`;
|
|
|
+ //院管理员进来的时候
|
|
|
+
|
|
|
+ this.$http.get(url, {}, (res) => {
|
|
|
+ console.log(res.data.content);
|
|
|
+ if (res && res.code == 200) {
|
|
|
+ this.tableData = res.data.content;
|
|
|
+ this.total = res.data.totalElements;
|
|
|
+ } else {
|
|
|
+ // this.$toast.fail(res.msg);
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ searchTarget() {
|
|
|
+ this.pageNum = 1;
|
|
|
+ this.searchList();
|
|
|
+ },
|
|
|
+ //跳转首页
|
|
|
+ goHome() {
|
|
|
+ this.$router.push({ path: "/home" });
|
|
|
+ },
|
|
|
+ //跳转记录页
|
|
|
+ goRecord() {
|
|
|
+ this.$router.push({ path: "/record" });
|
|
|
+ },
|
|
|
+ //退出登陆
|
|
|
+ logout() {
|
|
|
+ oSessionStorage.removeItem("userInfo");
|
|
|
+ oSessionStorage.removeItem("token");
|
|
|
+ this.$router.push({ path: "/" });
|
|
|
+ },
|
|
|
+
|
|
|
+ //点击获取月出勤次数
|
|
|
+ getTimes(param) {
|
|
|
+ this.monthTimes = param;
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+@import "../../styles/theme.less";
|
|
|
+
|
|
|
+.record /deep/ .el-input__inner {
|
|
|
+ background-color: #ffffff !important;
|
|
|
+}
|
|
|
+
|
|
|
+.user_button_detail {
|
|
|
+ width: 60%;
|
|
|
+ margin-left: 20%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ margin-top: 40px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.pag_class {
|
|
|
+ text-align: end;
|
|
|
+}
|
|
|
+
|
|
|
+.pag_class /deep/.el-input__inner {
|
|
|
+ width: 100% !important;
|
|
|
+}
|
|
|
+
|
|
|
+.pag_class /deep/.el-pagination--small span:not([class*="suffix"]) {
|
|
|
+ height: 22px;
|
|
|
+ line-height: 28px !important;
|
|
|
+}
|
|
|
+
|
|
|
+.record-warp {
|
|
|
+ width: 100%;
|
|
|
+ height: 80vh;
|
|
|
+ //background: url(../../assets/img/index/19.png) no-repeat center;
|
|
|
+ //background-size: 100% 100%;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ .record-main {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ overflow-y: auto;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+
|
|
|
+ .search-head {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: flex-start;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .zc-title {
|
|
|
+ color: #606266;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .table-content {
|
|
|
+ margin: 10px 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.add_user_class {
|
|
|
+ margin-top: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.user_out_new {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+
|
|
|
+.user_out {
|
|
|
+ display: flex;
|
|
|
+ width: 48%;
|
|
|
+ align-items: center;
|
|
|
+ // border: 1px solid #eeeeef;
|
|
|
+ // line-height: 50px;
|
|
|
+ margin-top: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.user_out_sub {
|
|
|
+ // flex: 1;
|
|
|
+ width: 95px;
|
|
|
+ // background-color: #fafafa;
|
|
|
+ text-align: center;
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: left;
|
|
|
+ align-items: center;
|
|
|
+ // color:#ffffff
|
|
|
+}
|
|
|
+
|
|
|
+.user_out_subNext {
|
|
|
+ border-radius: 40px;
|
|
|
+ border: 1px solid #e6e6e6;
|
|
|
+ background-color: #f7f7f7;
|
|
|
+ color: #999999;
|
|
|
+ padding-left: 10px;
|
|
|
+ flex: 3;
|
|
|
+ line-height: 40px;
|
|
|
+ text-align: left;
|
|
|
+}
|
|
|
+
|
|
|
+.detail_button_out {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-start;
|
|
|
+
|
|
|
+ .detail_button {
|
|
|
+ margin-left: 20px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ cursor: pointer;
|
|
|
+ letter-spacing: 2px;
|
|
|
+
|
|
|
+ img {
|
|
|
+ width: 15px;
|
|
|
+ margin-right: 5px;
|
|
|
+ }
|
|
|
+
|
|
|
+ span {
|
|
|
+ color: #00bf78;
|
|
|
+ // font-weight: 600;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+//弹出框样式
|
|
|
+
|
|
|
+.dig_update /deep/.el-cascader {
|
|
|
+ position: relative;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 40px;
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+
|
|
|
+.dig_update /deep/.el-dialog {
|
|
|
+ box-shadow: none !important;
|
|
|
+ background: transparent !important;
|
|
|
+}
|
|
|
+
|
|
|
+.demo-ruleForm /deep/ .el-form-item {
|
|
|
+ margin-right: 10px;
|
|
|
+ vertical-align: top;
|
|
|
+ display: flex !important;
|
|
|
+ flex-direction: column;
|
|
|
+}
|
|
|
+
|
|
|
+.demo-ruleForm /deep/.el-dialog__header {
|
|
|
+ background-color: #ffffff;
|
|
|
+ padding-left: 140px !important;
|
|
|
+}
|
|
|
+
|
|
|
+.demo-ruleForm /deep/.el-form-item__label {
|
|
|
+ text-align: left;
|
|
|
+ vertical-align: middle;
|
|
|
+ float: left;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #606266;
|
|
|
+ line-height: 40px;
|
|
|
+ padding: 0 12px 0 0;
|
|
|
+ -webkit-box-sizing: border-box;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+
|
|
|
+.demo-ruleForm /deep/.el-input {
|
|
|
+ width: 100% !important;
|
|
|
+}
|
|
|
+
|
|
|
+.demo-ruleForm /deep/.el-input__inner {
|
|
|
+ width: 100% !important;
|
|
|
+ background-color: #f7f7f7;
|
|
|
+ border: 0px;
|
|
|
+}
|
|
|
+
|
|
|
+.dig_button {
|
|
|
+ margin-top: 40px;
|
|
|
+ display: flex;
|
|
|
+ width: 100%;
|
|
|
+ justify-content: space-around;
|
|
|
+}
|
|
|
+
|
|
|
+.demo-ruleForm {
|
|
|
+ background-color: #ffffff;
|
|
|
+ // border-radius: 20px;
|
|
|
+ margin-right: -10px;
|
|
|
+ margin-top: -10px;
|
|
|
+ padding-right: 100px;
|
|
|
+ padding-left: 100px;
|
|
|
+ border-radius: 20px;
|
|
|
+ padding-top: 20px;
|
|
|
+ padding-bottom: 20px;
|
|
|
+
|
|
|
+ .dig_title {
|
|
|
+ margin-bottom: 30px;
|
|
|
+ text-align: center;
|
|
|
+ font-weight: 700;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|