| | |
| | | <template> |
| | | <el-row :class="{ securityGuard: isSecurity }"> |
| | | <el-col :span="0" style="display: none"> |
| | | <el-col :span="0" |
| | | style="display: none"> |
| | | <div class="box"> |
| | | <el-scrollbar> |
| | | <basic-container> |
| | | <avue-tree |
| | | :option="treeOption" |
| | | <avue-tree :option="treeOption" |
| | | :data="treeData" |
| | | @node-click="nodeClick" |
| | | /> |
| | | @node-click="nodeClick" /> |
| | | </basic-container> |
| | | </el-scrollbar> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <basic-container> |
| | | <avue-crud |
| | | :option="option" |
| | | <avue-crud :option="option" |
| | | :search.sync="search" |
| | | :table-loading="loading" |
| | | :data="data" |
| | |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | > |
| | | @on-load="onLoad"> |
| | | <!-- @row-update="rowUpdate" --> |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="success" |
| | | <el-button type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | v-if="permission.securityGuard_import" |
| | | @click="handleImport1" |
| | | >保安员批量导入 |
| | | @click="handleImport1">保安员批量导入 |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | <el-button type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | v-if="permission.securityGuard_import" |
| | | @click="handleImport2" |
| | | >个人照片批量上传 |
| | | @click="handleImport2">个人照片批量上传 |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | <el-button type="primary" |
| | | size="small" |
| | | plain |
| | | v-if="permission.securityGuard_security_apply" |
| | | icon="el-icon-s-promotion" |
| | | @click="handleSecurityApply" |
| | | >制证申请 |
| | | @click="handleSecurityApply">上岗证制证申请 |
| | | </el-button> |
| | | |
| | | <el-button |
| | | type="danger" |
| | | <el-button type="danger" |
| | | style="display: none" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-delete" |
| | | @click="handleDelete" |
| | | >注 销 |
| | | @click="handleDelete">注 销 |
| | | </el-button> |
| | | <el-button |
| | | type="info" |
| | | <el-button type="info" |
| | | style="display: none" |
| | | size="small" |
| | | plain |
| | | v-if="permission.user_role" |
| | | icon="el-icon-user" |
| | | @click="handleGrant" |
| | | >角色配置 |
| | | @click="handleGrant">角色配置 |
| | | </el-button> |
| | | <el-button |
| | | type="info" |
| | | <el-button type="info" |
| | | style="display: none" |
| | | size="small" |
| | | plain |
| | | v-if="permission.user_reset" |
| | | icon="el-icon-refresh" |
| | | @click="handleReset" |
| | | >密码重置 |
| | | @click="handleReset">密码重置 |
| | | </el-button> |
| | | <el-button |
| | | type="info" |
| | | <el-button type="info" |
| | | style="display: none" |
| | | size="small" |
| | | plain |
| | | v-if="userInfo.role_name.includes('admin')" |
| | | icon="el-icon-setting" |
| | | @click="handlePlatform" |
| | | >平台配置 |
| | | @click="handlePlatform">平台配置 |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | <el-button type="success" |
| | | style="display: none" |
| | | size="small" |
| | | plain |
| | | v-if="userInfo.role_name.includes('admin')" |
| | | icon="el-icon-upload2" |
| | | @click="handleImport" |
| | | >导入 |
| | | @click="handleImport">导入 |
| | | </el-button> |
| | | <el-button |
| | | type="warning" |
| | | <el-button type="warning" |
| | | style="display: none" |
| | | size="small" |
| | | plain |
| | | v-if="userInfo.role_name.includes('admin')" |
| | | icon="el-icon-download" |
| | | @click="handleExport" |
| | | >导出 |
| | | @click="handleExport">导出 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button |
| | | icon="el-icon-s-custom" |
| | | <template slot-scope="{ type, size, row }" |
| | | slot="menu"> |
| | | <el-button icon="el-icon-s-custom" |
| | | :size="size" |
| | | :type="type" |
| | | @click.stop="rowClick(row)" |
| | | >查看 |
| | | @click.stop="rowClick(row)">查看 |
| | | </el-button> |
| | | <el-button |
| | | icon="el-icon-edit" |
| | | <el-button icon="el-icon-edit" |
| | | :size="size" |
| | | :type="type" |
| | | v-if="permission.securityGuard_delete && row.status != 2" |
| | | @click.stop="rowStatus(row)" |
| | | >离职登记 |
| | | @click.stop="rowStatus(row)">离职登记 |
| | | </el-button> |
| | | <el-button |
| | | icon="el-icon-edit" |
| | | <el-button icon="el-icon-edit" |
| | | :size="size" |
| | | :type="type" |
| | | v-if="row.status == 2" |
| | | @click.stop="rowDellook(row)" |
| | | >离职查询 |
| | | @click.stop="rowDellook(row)">离职查询 |
| | | </el-button> |
| | | <el-button |
| | | icon="el-icon-edit" |
| | | <el-button icon="el-icon-edit" |
| | | :size="size" |
| | | :type="type" |
| | | v-if="permission.securityGuard_check" |
| | | @click.stop="rowCheck(row)" |
| | | >异常 |
| | | @click.stop="rowCheck(row)">异常 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" |
| | | :size="size" |
| | | :type="type" |
| | | v-if="permission.securityGuard_check" |
| | | @click.stop="certificateClick(row)">纸质证书制作 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="sex"> |
| | | <template slot-scope="{ row }" |
| | | slot="sex"> |
| | | <el-tag v-if="row.sex == 1">男</el-tag> |
| | | <el-tag v-if="row.sex == 2">女</el-tag> |
| | | </template> |
| | | <template slot-scope="{ row }" slot="deptId"> |
| | | <el-tag |
| | | class="rowClickSelf" |
| | | <template slot-scope="{ row }" |
| | | slot="deptId"> |
| | | <el-tag class="rowClickSelf" |
| | | title="点击查看所属公司情况" |
| | | @click="rowClickSelf(row.deptId)" |
| | | >{{ row.deptName }}</el-tag |
| | | > |
| | | @click="rowClickSelf(row.deptId)">{{ row.deptName }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{ row }" slot="tenantName"> |
| | | <template slot-scope="{ row }" |
| | | slot="tenantName"> |
| | | <el-tag>{{ row.tenantName }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{ row }" slot="roleName"> |
| | | <template slot-scope="{ row }" |
| | | slot="roleName"> |
| | | <el-tag>{{ row.roleName }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{ row }" slot="deptName"> |
| | | <template slot-scope="{ row }" |
| | | slot="deptName"> |
| | | <el-tag>{{ row.deptName }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{ row }" slot="userTypeName"> |
| | | <template slot-scope="{ row }" |
| | | slot="userTypeName"> |
| | | <el-tag>{{ row.userTypeName }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{ row }" |
| | | slot="userType"> |
| | | |
| | | {{ |
| | | row.userType == 6 ? '已制证' : row.userType == 7 ? '未制证' : '' |
| | | }} |
| | | |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog |
| | | title="用户角色配置" |
| | | <el-dialog title="用户角色配置" |
| | | append-to-body |
| | | :visible.sync="roleBox" |
| | | width="345px" |
| | | > |
| | | <el-tree |
| | | :data="roleGrantList" |
| | | width="345px"> |
| | | <el-tree :data="roleGrantList" |
| | | show-checkbox |
| | | check-strictly |
| | | default-expand-all |
| | | node-key="id" |
| | | ref="treeRole" |
| | | :default-checked-keys="roleTreeObj" |
| | | :props="props" |
| | | > |
| | | :props="props"> |
| | | </el-tree> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <span slot="footer" |
| | | class="dialog-footer"> |
| | | <el-button @click="roleBox = false">取 消</el-button> |
| | | <el-button type="primary" @click="submitRole">确 定</el-button> |
| | | <el-button type="primary" |
| | | @click="submitRole">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="用户数据导入" |
| | | <el-dialog title="用户数据导入" |
| | | append-to-body |
| | | :visible.sync="excelBox" |
| | | width="555px" |
| | | > |
| | | <avue-form |
| | | :option="excelOption" |
| | | width="555px"> |
| | | <avue-form :option="excelOption" |
| | | v-model="excelForm" |
| | | :upload-after="uploadAfter" |
| | | > |
| | | :upload-after="uploadAfter"> |
| | | <template slot="excelTemplate"> |
| | | <el-button type="primary" @click="handleTemplate"> |
| | | <el-button type="primary" |
| | | @click="handleTemplate"> |
| | | 点击下载<i class="el-icon-download el-icon--right"></i> |
| | | </el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="用户平台配置" |
| | | <el-dialog title="用户平台配置" |
| | | append-to-body |
| | | :visible.sync="platformBox" |
| | | > |
| | | <avue-crud |
| | | :option="platformOption" |
| | | :visible.sync="platformBox"> |
| | | <avue-crud :option="platformOption" |
| | | :table-loading="platformLoading" |
| | | :data="platformData" |
| | | ref="platformCrud" |
| | |
| | | @current-change="platformCurrentChange" |
| | | @size-change="platformSizeChange" |
| | | @refresh-change="platformRefreshChange" |
| | | @on-load="platformOnLoad" |
| | | > |
| | | <template slot-scope="{ row }" slot="tenantName"> |
| | | @on-load="platformOnLoad"> |
| | | <template slot-scope="{ row }" |
| | | slot="tenantName"> |
| | | <el-tag>{{ row.tenantName }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{ row }" slot="userTypeName"> |
| | | <template slot-scope="{ row }" |
| | | slot="userTypeName"> |
| | | <el-tag>{{ row.userTypeName }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="保安员导入" |
| | | <el-dialog title="保安员导入" |
| | | append-to-body |
| | | :visible.sync="excelBox1" |
| | | width="555px" |
| | | > |
| | | <avue-form |
| | | :option="excelOption1" |
| | | width="555px"> |
| | | <avue-form :option="excelOption1" |
| | | v-model="excelForm1" |
| | | :upload-after="uploadAfter1" |
| | | > |
| | | :upload-after="uploadAfter1"> |
| | | <template slot="excelTemplate"> |
| | | <el-button type="primary" @click="handleTemplate1"> |
| | | <el-button type="primary" |
| | | @click="handleTemplate1"> |
| | | 点击下载<i class="el-icon-download el-icon--right"></i> |
| | | </el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="个人照片批量上传" |
| | | <el-dialog title="个人照片批量上传" |
| | | append-to-body |
| | | :visible.sync="excelBox2" |
| | | width="555px" |
| | | > |
| | | <avue-form |
| | | :option="excelOption2" |
| | | width="555px"> |
| | | <avue-form :option="excelOption2" |
| | | v-model="excelForm2" |
| | | :upload-after="uploadAfter2" |
| | | > |
| | | :upload-after="uploadAfter2"> |
| | | </avue-form> |
| | | </el-dialog> |
| | | </basic-container> |
| | |
| | | query: { row: JSON.stringify(row) }, |
| | | }); |
| | | }, |
| | | //行点击事件 |
| | | certificateClick (row) { |
| | | // console.log(row, 111); |
| | | this.$router.push({ |
| | | path: "/certificateOfPrint", |
| | | query: { row: JSON.stringify(row) }, |
| | | }); |
| | | }, |
| | | rowClickSelf(row) { |
| | | console.log(row, "baoan"); |
| | | this.$router.push({ |
| | |
| | | type: "warning", |
| | | }).then(() => { |
| | | window.open( |
| | | `/api/blade-user/export-user?${ |
| | | this.website.tokenHeader |
| | | }=${getToken()}&account=${this.search.account}&realName=${ |
| | | this.search.realName |
| | | `/api/blade-user/export-user?${this.website.tokenHeader |
| | | }=${getToken()}&account=${this.search.account}&realName=${this.search.realName |
| | | }` |
| | | ); |
| | | }); |
| | | }, |
| | | handleTemplate() { |
| | | window.open( |
| | | `/api/blade-user/export-template?${ |
| | | this.website.tokenHeader |
| | | `/api/blade-user/export-template?${this.website.tokenHeader |
| | | }=${getToken()}` |
| | | ); |
| | | }, |