3 files modified
3 files added
| | |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api1/social/list', |
| | | url: '/api/social/list', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api1/social/detail', |
| | | url: '/api/social/detail', |
| | | method: 'get', |
| | | params: { |
| | | id |
| | |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api1/social/remove', |
| | | url: '/api/social/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api1/blade-social/social/submit', |
| | | url: '/api/social/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api1/social/submit', |
| | | url: '/api/social/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | |
| | | > |
| | | </avue-crud> |
| | | </span> |
| | | <span v-else-if="typeTABS.prop === 'tab4'"> |
| | | <!-- 保安员证 --> |
| | | <div class="baoanzheng" id="baoanzheng"> |
| | | <div class="baz-main"> |
| | | <div class="baz-m-body" ref="baoanzheng"> |
| | | <div class="bmb-heard">保安员证</div> |
| | | <div class="img"> |
| | | <div v-if="!obj0.myPicture">暂无照片</div> |
| | | <img :src="obj0.myPicture" alt="" v-else /> |
| | | </div> |
| | | <div class="imgs"> |
| | | <!-- <div v-if="obj0.myPicture">暂无二维码</div> --> |
| | | <!-- <img :src="obj0.myPicture" alt="" v-else/> --> |
| | | <img src="/img/register/ewm.png" alt="" /> |
| | | </div> |
| | | |
| | | <!-- <img src="/img/mock/card/card-1.jpg" alt="" /> --> |
| | | <div class="bmb-b"> |
| | | 姓名:<span class="bmb-b-s">{{ obj0.realName }}</span> |
| | | </div> |
| | | <div class="bmb-b"> |
| | | 性别:<span class="bmb-b-s">{{ obj0.$sex }}</span> |
| | | </div> |
| | | <div class="bmb-b"> |
| | | 编号:<span class="bmb-b-s">{{ obj0.securitynumber }}</span> |
| | | </div> |
| | | <div class="bmb-b"> |
| | | 发证机关:<span class="bmb-b-s">南昌市公安局</span> |
| | | </div> |
| | | <div class="bmb-b"> |
| | | 发证日期:<span class="bmb-b-s">{{ |
| | | obj0.paperTime.slice(0, 10) |
| | | }}</span> |
| | | </div> |
| | | <!-- <div class="bmb-b"> |
| | | 发证机关:<span class="bmb-b-s" style="margin-right: 15px" |
| | | >南昌市公安局</span |
| | | >发证日期:<span class="bmb-b-s">{{ |
| | | obj0.createTime.slice(0, 10) |
| | | }}</span> |
| | | </div> --> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer no-print PrintBut"> |
| | | <el-button type="primary" @click="Print">打 印</el-button> |
| | | <!-- <el-button type="primary" @click="closePrint"> 取 消 </el-button> --> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | </span> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | data() { |
| | | return { |
| | | typeTABS: {}, //标签页 |
| | | row: {}, //数据 |
| | | optionTABS: { |
| | | column: [ |
| | | { |
| | |
| | | // icon: "el-icon-info", |
| | | label: "现实表现记录", |
| | | prop: "tab3", |
| | | }, |
| | | { |
| | | // icon: "el-icon-info", |
| | | label: "保安员证", |
| | | prop: "tab4", |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | Print() { |
| | | var printDom = document.getElementById("baoanzheng"); |
| | | printDom.style.position = "fixed"; |
| | | printDom.style.left = "-10%"; |
| | | printDom.style.width = "120%"; |
| | | printDom.style.height = "100%"; |
| | | this.$Print(this.$refs.baoanzheng); |
| | | printDom.style.position = "relative"; |
| | | printDom.style.left = "0"; |
| | | printDom.style.width = "100%"; |
| | | printDom.style.height = "calc(100% - 100px)"; |
| | | }, |
| | | handleChangeTABS(column) { |
| | | this.typeTABS = column; |
| | | if (column.prop == "tab1") { |
| | |
| | | this.name = row.name; |
| | | this.dispatcherCompany = row.dispatcherCompany; |
| | | this.id = row.id; |
| | | console.log(this.obj0); |
| | | } |
| | | |
| | | var flag = false, |
| | |
| | | // .el-tag--light { |
| | | // padding: 0 !important; |
| | | // } |
| | | |
| | | .baoanzheng { |
| | | // position: fixed; |
| | | position: relative; |
| | | // top: 0; |
| | | top: 0; |
| | | // left: -10%; |
| | | left: 0; |
| | | // height: 0; |
| | | width: 100%; |
| | | height: calc(100% - 100px); |
| | | // background-color: rgba(0, 0, 0, 0.5); |
| | | background-color: #fff; |
| | | z-index: 9000; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .baz-main { |
| | | position: relative; |
| | | top: 15px; |
| | | // width: 441px; |
| | | // height: 358px; |
| | | width: 750px; |
| | | height: 550px; |
| | | // background-color: #004ca7; |
| | | background-color: #fff; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | flex-direction: column; |
| | | } |
| | | .baz-m-body { |
| | | width: 750px; |
| | | height: 550px; |
| | | background-image: url("/img/register/bazbj.png"); |
| | | background-size: 100% 100%; |
| | | .bmb-heard { |
| | | font-size: 4rem; |
| | | width: 100%; |
| | | text-align: center; |
| | | letter-spacing: 1.4rem; |
| | | margin-bottom: 40px; |
| | | padding-left: 10px; |
| | | position: relative; |
| | | top: 20px; |
| | | } |
| | | .img { |
| | | width: 152px; |
| | | height: 205px; |
| | | border-radius: 10px; |
| | | position: absolute; |
| | | // border: 1px solid rgba($color: #888888, $alpha: 0.5); |
| | | top: 110px; |
| | | right: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | img { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | .imgs { |
| | | width: 110px; |
| | | height: 110px; |
| | | border-radius: 10px; |
| | | position: absolute; |
| | | border: 1px solid rgba($color: #888888, $alpha: 0.5); |
| | | top: 330px; |
| | | right: 103px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | img { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | .bmb-b { |
| | | padding-left: 20px; |
| | | box-sizing: border-box; |
| | | height: 3.9rem; |
| | | margin-left: 3rem; |
| | | width: 100%; |
| | | font-size: 2rem; |
| | | font-weight: 300; |
| | | .bmb-b-s { |
| | | display: inline-block; |
| | | width: 20rem; |
| | | font-size: 2rem; |
| | | font-weight: 300; |
| | | } |
| | | } |
| | | } |
| | | .PrintBut { |
| | | margin-top: 15px; |
| | | } |
| | | </style> |
| | |
| | | <!-- 许可证 --> |
| | | <licence :row="obj0"></licence> |
| | | </span> |
| | | <span v-else-if="typeTABS.prop === 'tab9'" class="tab"> 社保记录 </span> |
| | | <span v-else-if="typeTABS.prop === 'tab9'" class="tab"> |
| | | <!-- 社保记录 --> |
| | | <social :deptid="obj0.departmentid"></social> |
| | | </span> |
| | | <el-dialog |
| | | title="出资人导入" |
| | | append-to-body |
| | |
| | | import gun from "../securityEquipment/gun.vue"; |
| | | import licence from "./licence.vue"; |
| | | import businessLicense from "./businessLicense.vue"; |
| | | import social from "./social.vue"; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | gun: gun, |
| | | licence: licence, |
| | | businessLicense: businessLicense, |
| | | social: social, |
| | | }, |
| | | data() { |
| | | var DIC = { |
| New file |
| | |
| | | <template> |
| | | <basic-container> |
| | | <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" |
| | | @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 |
| | | @click="handleDelete" |
| | | >删 除 |
| | | <!-- v-if="permission.social_delete" --> |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | @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> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getList, getDetail, add, update, remove } from "@/api/social/social"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getToken } from "@/util/auth"; |
| | | |
| | | export default { |
| | | props: ["deptid"], |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | excelBox: false, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | align: "center", |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | menu: false, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "姓名", |
| | | prop: "namb", |
| | | |
| | | width: 65, |
| | | labelWidth: 110, |
| | | |
| | | search: true, |
| | | searchLabelWidth: 45, |
| | | searchSpan: 4, |
| | | |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入姓名", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "性别", |
| | | prop: "sex", |
| | | width: 55, |
| | | labelWidth: 110, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入性别", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "民族", |
| | | prop: "nation", |
| | | width: 55, |
| | | labelWidth: 110, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入民族", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "出生日期", |
| | | labelWidth: 110, |
| | | width: 90, |
| | | prop: "birthday", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入出生日期", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | | prop: "telephone", |
| | | labelWidth: 110, |
| | | width: 98, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入联系电话", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | | prop: "cardid", |
| | | labelWidth: 110, |
| | | width: 150, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入身份证号", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "户籍所在地址", |
| | | prop: "residence", |
| | | labelWidth: 110, |
| | | overHidden: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入户籍所在地址", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "居住地址 ", |
| | | prop: "address", |
| | | overHidden: true, |
| | | labelWidth: 110, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入居住地址 ", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "户籍性质", |
| | | prop: "nature", |
| | | 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", |
| | | }, |
| | | // { |
| | | // 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, |
| | | }, |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | 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; |
| | | } |
| | | }, |
| | | }, |
| | | 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: { |
| | | 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); |
| | | } |
| | | ); |
| | | }, |
| | | 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; |
| | | 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; |
| | | getList( |
| | | 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(); |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |