| | |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | :upload-before="uploadBefore" |
| | | :defaults.sync="defaults" |
| | | :before-close="beforeClose" |
| | | > |
| | |
| | | remove, |
| | | update, |
| | | updatePlatform, |
| | | add, |
| | | securitySave, |
| | | grant, |
| | | resetPassword, |
| | | getUserPractitionersInfo, |
| | | updatePaperTime, |
| | | saveOrUpdateUserPractitionersInfo, |
| | | getzhiwen, //指纹 |
| | | } from "@/api/system/user"; |
| | | import { securityApply } from "@/api/accreditationRecords/accreditationRecords"; |
| | | import { getList } from "@/api/securityGuard/securityGuard"; |
| | | import { getDeptLazyTree } from "@/api/system/dept"; |
| | | import { getRoleTree, getRoleDetail } from "@/api/system/role"; |
| | | import { getPostList } from "@/api/system/post"; |
| | | import { mapGetters } from "vuex"; |
| | | import website from "@/config/website"; |
| | | import { getToken } from "@/util/auth"; |
| | | import { securityFormPageColumn } from "./data"; |
| | | import { mapState } from "vuex"; |
| | | import Qs from "qs"; |
| | | |
| | | import { MessageBox } from 'element-ui'; |
| | | //加载指纹类 |
| | | import Client from "./Client"; |
| | | import doneVue from "../work/done.vue"; |
| | | // import func from "vue-editor-bridge"; |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | var roleName = this.userInfo.role_name; |
| | | // console.log(this.userInfo,52252); |
| | | // this.userInfo.rname.forEach((roleName) => { |
| | | if ( |
| | | roleName == "保安公司管理员" || |
| | | roleName == "保安" || |
| | | roleName == "分公司管理员" |
| | | ) { |
| | | //查询保安单位信息(包含子级) |
| | | const column = this.findObject(this.option.column, "deptId"); |
| | | // column.search = false; |
| | | //默认全部展开 |
| | | column.defaultExpandAll = true; |
| | | column.dicUrl = |
| | | "/api/blade-system/dept/security_lazy-tree?deptId=" + |
| | | this.userInfo.dept_id; |
| | | } else if (roleName == "公安管理员" || roleName == "administrator") { |
| | | var columnDept = that.findObject(that.option.column, "deptId"); |
| | | columnDept.dicUrl = |
| | | "/api/blade-system/dept/security_lazy-tree?jurisdiction=" + |
| | | that.userInfo.jurisdiction; |
| | | } else { |
| | | //查询保安单位信息(包含子级) |
| | | const column = this.findObject(this.option.column, "deptId"); |
| | | // column.search = false; |
| | | //默认全部展开 |
| | | column.dicUrl = "/api/blade-system/dept/security_lazy-tree"; |
| | | } |
| | | if ( |
| | | roleName == "保安公司管理员" || |
| | | roleName == "保安" || |
| | | roleName == "分公司管理员" |
| | | ) { |
| | | //查询保安单位信息(包含子级) |
| | | const column = this.findObject(this.option.column, "deptId"); |
| | | // column.search = false; |
| | | //默认全部展开 |
| | | column.defaultExpandAll = true; |
| | | column.dicUrl = |
| | | "/api/blade-system/dept/security_lazy-tree?deptId=" + |
| | | this.userInfo.dept_id; |
| | | } else if (roleName == "公安管理员" || roleName == "administrator") { |
| | | var columnDept = that.findObject(that.option.column, "deptId"); |
| | | columnDept.dicUrl = |
| | | "/api/blade-system/dept/security_lazy-tree?jurisdiction=" + |
| | | that.userInfo.jurisdiction; |
| | | } else { |
| | | //查询保安单位信息(包含子级) |
| | | const column = this.findObject(this.option.column, "deptId"); |
| | | // column.search = false; |
| | | //默认全部展开 |
| | | column.dicUrl = "/api/blade-system/dept/security_lazy-tree"; |
| | | } |
| | | // }); |
| | | |
| | | if ( |
| | |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | //排序 |
| | | sortChange(value){ |
| | | console.log(value,51151515); |
| | | sortChange(value) { |
| | | console.log(value, 51151515); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | params = this.search; |
| | |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | //照片上传拦截 |
| | | uploadBefore(file, done, loading, column) { |
| | | //如果你想修改file文件,由于上传的file是只读文件,必须复制新的file才可以修改名字,完后赋值到done函数里,如果不修改的话直接写done()即可 |
| | | if (file.type.indexOf("image/") == -1) { |
| | | MessageBox.alert("上传图片格式错误,请上传图片类型,如:JPG,PNG后缀的文件。") |
| | | loading(); |
| | | return false; |
| | | } |
| | | let data = window.URL.createObjectURL(new Blob([file])); |
| | | this.filename = file; |
| | | this.option.img = data; |
| | | //判断文件大小 |
| | | const isLt1M = file.size >= 30*1024 && file.size <= 500*1024; |
| | | if (!isLt1M) { |
| | | MessageBox.alert("上传图片大小必须大于30KB,且小于500KB!") |
| | | loading(); |
| | | return false; |
| | | } |
| | | done(); |
| | | return isLt1M; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |