|
|
@@ -26,27 +26,82 @@
|
|
|
v-if="permission.staff_delete"
|
|
|
@click="handleDelete">删 除
|
|
|
</el-button>
|
|
|
+ <cy-excel-import :flag="3" file-name="员工信息导入模板" @success="onLoad(page)"></cy-excel-import>
|
|
|
+ <el-button type="success"
|
|
|
+ size="small"
|
|
|
+ icon="el-icon-sort-down"
|
|
|
+ plain
|
|
|
+ @click="handleBatchPushUserFace">批量下发人脸
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
+
|
|
|
+ <template slot="menu" slot-scope="scope">
|
|
|
+ <el-button type="text" size="small" icon="el-icon-setting">
|
|
|
+ <el-dropdown>
|
|
|
+ <span class="el-dropdown-link">
|
|
|
+ 操作<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </span>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item divided v-if="permission.staff_view" @click.native="detail(scope.row)" icon="el-icon-view">查看
|
|
|
+ </el-dropdown-item>
|
|
|
+ <el-dropdown-item divided v-if="permission.staff_edit" @click.native="edit(scope.row)" icon="el-icon-edit">编辑
|
|
|
+ </el-dropdown-item>
|
|
|
+ <el-dropdown-item style="color: limegreen" divided v-if="!!scope.row.face && scope.row.auditStatus == 1" @click.native="pushUserFaceToDevice(scope.row)" icon="el-icon-sort-down">人脸下发
|
|
|
+ </el-dropdown-item>
|
|
|
+ <el-dropdown-item divided icon="el-icon-s-order" @click.native="reviewHandler(scope.row)" :class=" [scope.row.auditStatus === 0 ? '' : 'recheck']">{{scope.row.auditStatus===0?'审核':'重审'}}</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </el-button>
|
|
|
+ <!--<el-button icon="el-icon-s-order" type="text" @click="reviewHandler(scope.row)">审核</el-button>-->
|
|
|
+ </template>
|
|
|
+
|
|
|
<template slot="auditStatus" slot-scope="scope">
|
|
|
<el-tag v-if="scope.row.auditStatus===0" type="info">待审核</el-tag>
|
|
|
<el-tag v-if="scope.row.auditStatus===1" type="success">审核通过</el-tag>
|
|
|
<el-tag v-if="scope.row.auditStatus===2" type="danger">审核不通过</el-tag>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
+
|
|
|
+ <el-dialog :modal-append-to-body="false" title = "员工信息审核" :visible.sync = "reviewVisible" width="60%"
|
|
|
+ :close-on-click-modal="false" >
|
|
|
+ <review-staff :reviewDetail="reviewDetail" @visibleemit="visibleUpdate"></review-staff>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false" :visible.sync="editVisible"
|
|
|
+ title="编辑" width="60%">
|
|
|
+ <avue-form v-model="editForm" :option="option" @submit="submitEnterprisestaff"></avue-form>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false" :visible.sync="detailVisible"
|
|
|
+ title="详情" width="60%">
|
|
|
+ <staff-detail :detailForm="detailForm"></staff-detail>
|
|
|
+ <!--<avue-detail :option="option" v-model="detailForm"></avue-detail>-->
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</basic-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {getList, getDetail, add, update, remove} from "@/api/enterprise/staff";
|
|
|
+ import {getList, getDetail, add, update, remove, pushUserFace, pushUserFaceBatch} from "@/api/enterprise/staff";
|
|
|
import {mapGetters} from "vuex";
|
|
|
import {validatedEmail, validatePhone} from "../../util/validator";
|
|
|
+ import StaffDetail from "../../components/staff/staffDetail";
|
|
|
+ import ReviewStaff from "../../components/staff/review-staff";
|
|
|
|
|
|
export default {
|
|
|
+ components: {ReviewStaff, StaffDetail},
|
|
|
data() {
|
|
|
return {
|
|
|
form: {},
|
|
|
query: {},
|
|
|
loading: true,
|
|
|
+ reviewVisible: false,
|
|
|
+ reviewDetail: {},
|
|
|
+ editVisible: false,
|
|
|
+ editForm: {},
|
|
|
+ detailVisible: false,
|
|
|
+ detailForm: {},
|
|
|
+ forbidden: false,
|
|
|
page: {
|
|
|
pageSize: 10,
|
|
|
currentPage: 1,
|
|
|
@@ -462,6 +517,48 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleBatchPushUserFace() {
|
|
|
+ if (this.selectionList.length === 0) {
|
|
|
+ this.$message.warning("请选择至少一条数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ pushUserFaceBatch(this.ids).then(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ visibleUpdate(data) {
|
|
|
+ this.reviewVisible = data;
|
|
|
+ this.onLoad(this.page);
|
|
|
+ },
|
|
|
+ detail(row) {
|
|
|
+ this.detailForm = row;
|
|
|
+ this.detailForm['gender'] = row.$sex;
|
|
|
+ this.detailVisible = true;
|
|
|
+ },
|
|
|
+ edit(row) {
|
|
|
+ this.editForm = row;
|
|
|
+ this.editVisible = true;
|
|
|
+ },
|
|
|
+ pushUserFaceToDevice(row){
|
|
|
+ //下发人脸到测温系统和设备
|
|
|
+ pushUserFace(row).then(res => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ reviewHandler(row) {
|
|
|
+ debugger
|
|
|
+ this.reviewDetail = row;
|
|
|
+ this.reviewVisible = true;
|
|
|
+ // debugger
|
|
|
+ this.url = row.face;
|
|
|
+ },
|
|
|
rowSave(row, done, loading) {
|
|
|
if (row.avatar.length == 0) {
|
|
|
row.avatar = '';
|