| | |
| | | <template> |
| | | <basic-container |
| | | :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']" |
| | | :class="[ |
| | | $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize', |
| | | $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '' |
| | | ]" |
| | | > |
| | | <avue-crud |
| | | class="tablesss" |
| | | v-if="visible" |
| | | :option="option" |
| | | :table-loading="loading" |
| | |
| | | getDetail, |
| | | add, |
| | | update, |
| | | remove, |
| | | remove |
| | | } from "@/api/social/social"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getToken } from "@/util/auth"; |
| | |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | ...this.$store.state.control.changePageSize, |
| | | ...this.$store.state.control.changePageSize |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | |
| | | |
| | | width: 65, |
| | | labelWidth: 110, |
| | | change: (res) => { |
| | | change: res => { |
| | | this.changes(res); |
| | | }, |
| | | dicUrl: "/api/blade-user/page-security-unit?deptId=" + deptid, |
| | | props: { |
| | | label: "realName", |
| | | value: "id", |
| | | value: "id" |
| | | }, |
| | | search: true, |
| | | searchLabelWidth: 45, |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入姓名", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "性别", |
| | |
| | | dicData: [ |
| | | { |
| | | label: "男", |
| | | value: 1, |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "女", |
| | | value: 2, |
| | | }, |
| | | value: 2 |
| | | } |
| | | ], |
| | | labelWidth: 110, |
| | | addDisabled: true, |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入性别", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | // { |
| | | // label: "民族", |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入联系电话", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "身份证号", |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入身份证号", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "户籍所在地址", |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入户籍所在地址", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | // { |
| | | // label: "居住地址 ", |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入个人缴费额", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "参保时间", |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入参保时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | } |
| | | // { |
| | | // label: "所属机构", |
| | | // labelWidth: 110, |
| | |
| | | // value: "deptid", |
| | | // }, |
| | | // }, |
| | | ], |
| | | ] |
| | | }, |
| | | data: [], |
| | | excelForm: {}, |
| | |
| | | loadText: "模板上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | res: "data" |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/social/import-user?deptid=" + deptid, |
| | | action: "/api/social/import-user?deptid=" + deptid |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | span: 24 |
| | | } |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | socialRE() { |
| | | this.$refs.crud.refreshTable(); |
| | | this.$refs.crud.doLayout(); |
| | | }, |
| | | windowHeight() { |
| | | console.log(this.windowHeight); |
| | | this.option.height = this.windowHeight - 320; |
| | | this.visible = false; |
| | | this.$nextTick(() => { |
| | | this.visible = true; |
| | | this.refreshChange(); |
| | | }); |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | this.option.height = this.windowHeight - 320; |
| | |
| | | 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), |
| | | editBtn: this.vaildData(this.permission.social_edit, false) |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | }, |
| | | methods: { |
| | | changes(val) { |
| | | if (val.value != "") { |
| | | getuseList(val.value).then((res) => { |
| | | getuseList(val.value).then(res => { |
| | | // console.log(res); |
| | | var d = res.data.data; |
| | | this.form.cardid = d.cardid; |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | loading(); |
| | | window.console.log(error); |
| | | } |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | loading(); |
| | | console.log(error); |
| | | } |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then((res) => { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | ).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.$refs.crud.refreshTable(); |
| | | this.$refs.crud.doLayout(); |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | | <style></style> |