| | |
| | | disabled: true, |
| | | }, |
| | | { |
| | | label: "考试时间", |
| | | prop: "month", |
| | | type: "month", |
| | | hide:true, |
| | | search:true, |
| | | searchSpan:4, |
| | | format: "yyyy-MM", |
| | | valueFormat: "yyyy-MM", |
| | | }, |
| | | { |
| | | label: "理论成绩", |
| | | prop: "theoryGrade", |
| | | disabled: true, |
| | |
| | | methods: { |
| | | getPractitionersPageInfo(page, params = {}) { |
| | | params = this.search; |
| | | params = { |
| | | ...params, |
| | | ...this.card, |
| | | }; |
| | | params['deptId'] = this.card.deptid; |
| | | params['jurisdiction'] = this.card.jurisdiction; |
| | | getinformationstatisticsXX(page.currentPage, page.pageSize, params).then( |
| | | (res) => { |
| | | // console.log(res.data.data.records); |
| | | const data = res.data.data; |
| | | var d = data.records; |
| | | for (var k in d) { |
| | |
| | | <template> |
| | | <basic-container |
| | | :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']" |
| | | <div |
| | | :class="[ |
| | | 'certificateTJ', |
| | | $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '', |
| | | ]" |
| | | > |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crud" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @row-del="rowDel" |
| | | :option="option1" |
| | | :data="data1" |
| | | :page.sync="page1" |
| | | :table-loading="loading1" |
| | | @on-load="getPractitionersPageInfo(page1)" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="seess" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | <!-- v-if="permission.social_delete" --> |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | v-if="seess" |
| | | @click="handleImport" |
| | | >批量导入 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog |
| | | title="用户数据导入" |
| | | append-to-body |
| | | :visible.sync="excelBox" |
| | | width="555px" |
| | | > |
| | | <avue-form |
| | | :option="excelOption" |
| | | v-model="excelForm" |
| | | :upload-after="uploadAfter" |
| | | > |
| | | <template slot="excelTemplate"> |
| | | <el-button type="primary" @click="handleTemplate"> |
| | | 点击下载<i class="el-icon-download el-icon--right"></i> |
| | | </el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getListJurisdiction, |
| | | getuseList, |
| | | getList, |
| | | getDetail, |
| | | add, |
| | | update, |
| | | remove, |
| | | } from "@/api/social/social"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getToken } from "@/util/auth"; |
| | | import { getList } from "@/api/securityGuard/securityGuard"; // 保安员 |
| | | export default { |
| | | props: ["card", "reself"], |
| | | props: ["card"], |
| | | data() { |
| | | var card = this.card; |
| | | var deptid, |
| | | sees = true, |
| | | baoan = "namb", |
| | | baoanSearch = { |
| | | type: "tree", |
| | | change: (res) => { |
| | | this.changes(res); |
| | | }, |
| | | }, |
| | | jurisdiction; |
| | | if (this.card.jurisdiction == "") { |
| | | // deptid = this.userInfo |
| | | // console.log(this.$store.getters.userInfo.dept_id); |
| | | jurisdiction = ""; |
| | | deptid = card.deptid; |
| | | } else { |
| | | jurisdiction = card.jurisdiction; |
| | | baoan = "realname"; |
| | | (baoanSearch = {}), (deptid = ""); |
| | | sees = false; |
| | | var dicUrl = |
| | | "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697", |
| | | search = true; |
| | | if (this.card.jurisdiction != "") { |
| | | dicUrl = |
| | | "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697&jurisdiction=" + |
| | | this.card.jurisdiction; |
| | | } else if (this.card.jurisdiction == 1372091709474910209) { |
| | | // a = ""; |
| | | } |
| | | // console.log(this.card); |
| | | if (this.card.deptId != "") { |
| | | search = false; |
| | | } |
| | | return { |
| | | seess: sees, |
| | | deptid: deptid, |
| | | jurisdiction: jurisdiction, |
| | | |
| | | form: { cardid: "" }, |
| | | |
| | | query: {}, |
| | | loading: true, |
| | | excelBox: false, |
| | | page: { |
| | | securityid1: "", |
| | | ExperienceVisible: false, |
| | | loading1: true, |
| | | page1: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | ...this.$store.state.control.changePageSize, |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | align: "center", |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | addBtn: sees, |
| | | viewBtn: true, |
| | | query1: {}, |
| | | data1: [], |
| | | option1: { |
| | | addBtn: false, |
| | | searchShowBtn: false, |
| | | columnBtn: false, |
| | | // refreshBtn: false, |
| | | // card: true, |
| | | menu: false, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | height: "auto", |
| | | widtd: "auto", |
| | | // calcHeight: 54, |
| | | border: true, //liu |
| | | stripe: true, |
| | | // tip: false, |
| | | index: true, |
| | | ...this.$store.state.control.clearOtherBut, |
| | | // dialogClickModal: false, |
| | | // headerAlign: "center", |
| | | align: "center", |
| | | column: [ |
| | | { |
| | | label: "姓名", |
| | | prop: baoan, |
| | | |
| | | width: 65, |
| | | labelWidth: 110, |
| | | dicUrl: "/api/blade-user/page-security-unit?deptId=" + deptid, |
| | | prop: "realName", |
| | | disabled: true, |
| | | searchLabelWidth: "50", |
| | | overHidden: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "企业名称", |
| | | searchLabelWidth: "110", |
| | | // prop: "deptName", |
| | | prop: "deptId", |
| | | type: "tree", |
| | | dicUrl: dicUrl, |
| | | props: { |
| | | label: "realName", |
| | | label: "title", |
| | | value: "id", |
| | | }, |
| | | search: true, |
| | | searchLabelWidth: 45, |
| | | // hide: true, |
| | | // slot: true, |
| | | searchSpan: 4, |
| | | ...baoanSearch, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入姓名", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | display: false, |
| | | search: search, |
| | | minWidth: 220, |
| | | }, |
| | | { |
| | | label: "性别", |
| | | prop: "sex", |
| | | width: 55, |
| | | type: "select", |
| | | dicData: [ |
| | | { |
| | |
| | | value: 3, |
| | | }, |
| | | ], |
| | | labelWidth: 110, |
| | | addDisabled: true, |
| | | editDisabled: true, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请输入性别", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "民族", |
| | | prop: "nation", |
| | | addDisabled: true, |
| | | editDisabled: true, |
| | | width: 55, |
| | | labelWidth: 110, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请输入民族", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | label: "身份证号码", |
| | | prop: "cardid", |
| | | search: true, |
| | | searchLabelWidth: 90, |
| | | searchSpan: 4, |
| | | }, |
| | | // { |
| | | // label: "出生日期", |
| | | // labelWidth: 110, |
| | | // width: 90, |
| | | // // addDisabled: true, |
| | | // // editDisabled: true, |
| | | // prop: "birthday", |
| | | // type: "date", |
| | | // format: "yyyy-MM-dd", |
| | | // valueFormat: "yyyy-MM-dd", |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请输入出生日期", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | { |
| | | label: "学历", |
| | | prop: "education", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | }, |
| | | type: "select", |
| | | search:true, |
| | | searchSpan:4, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择学历", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | | prop: "telephone", |
| | | labelWidth: 110, |
| | | addDisabled: true, |
| | | editDisabled: true, |
| | | width: 98, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请输入联系电话", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | prop: "cardid", |
| | | labelWidth: 110, |
| | | addDisabled: true, |
| | | editDisabled: true, |
| | | width: 150, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入身份证号", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "户籍所在地址", |
| | | prop: "residence", |
| | | labelWidth: 110, |
| | | overHidden: true, |
| | | addDisabled: true, |
| | | editDisabled: true, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请输入户籍所在地址", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | }, |
| | | // { |
| | | // label: "居住地址 ", |
| | | // prop: "address", |
| | | // overHidden: true, |
| | | // addDisabled: true, |
| | | // editDisabled: true, |
| | | // labelWidth: 110, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请输入居住地址 ", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // { |
| | | // label: "户籍性质", |
| | | // prop: "nature", |
| | | // // addDisabled: true, |
| | | // // editDisabled: true, |
| | | // labelWidth: 110, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请输入户籍性质", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | { |
| | | label: "个人缴费额", |
| | | prop: "amount", |
| | | labelWidth: 110, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入个人缴费额", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "参保时间", |
| | | labelWidth: 110, |
| | | width: 90, |
| | | prop: "insuredtime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入参保时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // label: "所属机构", |
| | | // labelWidth: 110, |
| | | // prop: "deptid", |
| | | // addDisplay: false, |
| | | // type: "select", |
| | | // dicUrl: "/api/blade-system/dept/selectIn", |
| | | // props: { |
| | | // label: "deptname", |
| | | // value: "deptid", |
| | | // }, |
| | | // }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | excelForm: {}, |
| | | excelOption: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | column: [ |
| | | { |
| | | label: "模板上传", |
| | | prop: "excelFile", |
| | | type: "upload", |
| | | drag: true, |
| | | loadText: "模板上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/social/import-user?deptid=" + deptid, |
| | | }, |
| | | // { |
| | | // label: "数据覆盖", |
| | | // prop: "isCovered", |
| | | // type: "switch", |
| | | // align: "center", |
| | | // hide: true, |
| | | // width: 80, |
| | | // dicData: [ |
| | | // { |
| | | // label: "否", |
| | | // value: 0, |
| | | // }, |
| | | // { |
| | | // label: "是", |
| | | // value: 1, |
| | | // }, |
| | | // ], |
| | | // value: 0, |
| | | // slot: true, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请选择是否覆盖", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24, |
| | | prop: "phone", |
| | | display: false, |
| | | }, |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | watch: { |
| | | "excelForm.isCovered"() { |
| | | console.log(123123); |
| | | if (this.excelForm.isCovered !== "") { |
| | | const column = this.findObject(this.excelOption.column, "excelFile"); |
| | | column.action = |
| | | `/api/social/import-user?isCovered=${this.excelForm.isCovered}` + |
| | | "&deptid=" + |
| | | // this.userInfo.dept_id; |
| | | this.deptid; |
| | | } |
| | | }, |
| | | reself() { |
| | | //刷新表格 |
| | | this.$refs.crud.refreshTable(); |
| | | this.$refs.crud.doLayout(); |
| | | }, |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.social_add, true), |
| | | viewBtn: this.vaildData(this.permission.social_view, false), |
| | | delBtn: this.vaildData(this.permission.social_delete, false), |
| | | editBtn: this.vaildData(this.permission.social_edit, false), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | }, |
| | | methods: { |
| | | changes(val) { |
| | | if (val.value != "") { |
| | | getuseList(val.value).then((res) => { |
| | | // console.log(res); |
| | | var d = res.data.data; |
| | | this.form.cardid = d.cardid; |
| | | this.form.telephone = d.phone; |
| | | this.form.residence = d.nativeplace; |
| | | this.form.address = d.address; |
| | | this.form.sex = d.sex; |
| | | this.form.nation = d.nation; |
| | | this.form.birthday = d.birthday; |
| | | }); |
| | | getPractitionersPageInfo(page, params = {}) { |
| | | if (this.card.jurisdiction == 1372091709474910209) { |
| | | this.card.jurisdiction = ""; |
| | | } |
| | | |
| | | params = { |
| | | ...this.card, |
| | | ...params, |
| | | status: 1, |
| | | ...this.query1, |
| | | }; |
| | | getList(page.currentPage, page.pageSize, params).then((res) => { |
| | | // console.log(res.data.data.records); |
| | | const data = res.data.data; |
| | | this.data1 = data.records; |
| | | this.page1.total = data.total; |
| | | this.loading1 = false; |
| | | }); |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | console.log(row); |
| | | row.deptid = this.deptid; |
| | | // return; |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | loading(); |
| | | window.console.log(error); |
| | | } |
| | | ); |
| | | refreshChange() { |
| | | this.getPractitionersPageInfo(this.page1, this.query1); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | console.log(row); |
| | | // return; |
| | | row.deptid = this.deptid; |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | loading(); |
| | | console.log(error); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | handleTemplate() { |
| | | window.open( |
| | | `/api/social/export-template?${this.website.tokenHeader}=${getToken()}` |
| | | ); |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox = false; |
| | | searchChange(params, done) { |
| | | this.query1 = params; |
| | | this.page1.currentPage = 1; |
| | | this.refreshChange(); |
| | | done(); |
| | | }, |
| | | handleImport() { |
| | | this.excelBox = true; |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then((res) => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | | done(); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | params["deptid"] = this.deptid; |
| | | |
| | | if (this.userInfo.role_name == "公安管理员") { |
| | | params["jurisdiction"] = this.userInfo.jurisdiction; |
| | | } |
| | | getListJurisdiction( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | this.query1 = {}; |
| | | this.page1.currentPage = 1; |
| | | this.refreshChange(); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | | <style scoped> |
| | | </style> |
| | |
| | | </div> |
| | | <div class="securityAnalysisright"> |
| | | <div class="dispatchSecurity" ref="ech5"> |
| | | <!-- 保安派遣情况统计 |
| | | <!-- 保安员年龄分布情况统计 |
| | | <div>饼图</div> --> |
| | | </div> |
| | | <div class="socialSecurity" ref="ech6"> |
| | |
| | | d = this.setColor(d, this.colors); |
| | | option = { |
| | | title: { |
| | | text: "保安派遣情况统计", |
| | | text: "保安员年龄分布情况统计", |
| | | // subtext: "纯属虚构", |
| | | top: 25, |
| | | left: "center", |
| | |
| | | tooltip: { |
| | | trigger: "item", |
| | | }, |
| | | toolbox: this.gettoolbox("派遣情况查询", "保安员派遣情况明细", 5), |
| | | toolbox: this.gettoolbox("保安员年龄分布情况查询", "保安员年龄分布情况明细", 5), |
| | | legend: { |
| | | // orient: "vertical", |
| | | // left: "left", |
| | |
| | | // d = this.setColor(d, this.colors); |
| | | option = { |
| | | title: { |
| | | text: "保安员学历分布统计", |
| | | // subtext: "纯属虚构", |
| | | text: "保安员学历分布情况统计", |
| | | top: 25, |
| | | left: "center", |
| | | }, |
| | | tooltip: { |
| | | trigger: "item", |
| | | }, |
| | | toolbox: this.gettoolbox("社保缴纳查询", "保安员社保缴纳明细", 6), |
| | | toolbox: this.gettoolbox("保安员学历分布情况查询", "保安员学历分布情况明细", 6), |
| | | legend: { |
| | | // orient: "vertical", |
| | | // left: "left", |