| | |
| | | <template> |
| | | <basic-container> |
| | | <basic-container |
| | | :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']" |
| | | > |
| | | <avue-crud |
| | | v-if="visible" |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | |
| | | import { mapGetters } from "vuex"; |
| | | import { getToken } from "@/util/auth"; |
| | | export default { |
| | | props: ["deptid"], |
| | | props: ["deptid", "socialRE"], |
| | | data() { |
| | | var deptid = this.deptid; |
| | | if (this.deptid == undefined) { |
| | |
| | | deptid = this.$store.getters.userInfo.dept_id; |
| | | } |
| | | return { |
| | | visible: true, |
| | | form: { cardid: "" }, |
| | | |
| | | query: {}, |
| | |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | ...this.$store.state.control.changePageSize, |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 30, |
| | | // calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | align: "center", |
| | |
| | | menu: false, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | ...this.$store.state.control.clearOtherBut, |
| | | column: [ |
| | | { |
| | | label: "姓名", |
| | |
| | | label: "女", |
| | | value: 2, |
| | | }, |
| | | { |
| | | label: "未知", |
| | | value: 3, |
| | | }, |
| | | ], |
| | | labelWidth: 110, |
| | | addDisabled: true, |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "民族", |
| | | prop: "nation", |
| | | addDisabled: true, |
| | | editDisabled: true, |
| | | width: 55, |
| | | labelWidth: 110, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入民族", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // label: "民族", |
| | | // prop: "nation", |
| | | // addDisabled: true, |
| | | // editDisabled: true, |
| | | // width: 55, |
| | | // labelWidth: 110, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请输入民族", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // { |
| | | // label: "出生日期", |
| | | // labelWidth: 110, |
| | |
| | | prop: "residence", |
| | | labelWidth: 110, |
| | | overHidden: true, |
| | | addDisabled: true, |
| | | editDisabled: true, |
| | | addDisabled: false, |
| | | editDisabled: false, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | 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", |
| | |
| | | this.deptid; |
| | | } |
| | | }, |
| | | 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; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | ...mapGetters(["permission", "userInfo", "windowHeight"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.social_add, true), |
| | |
| | | var d = res.data.data; |
| | | this.form.cardid = d.cardid; |
| | | this.form.telephone = d.phone; |
| | | this.form.residence = d.nativeplace; |
| | | this.form.residence = d.registered; |
| | | this.form.address = d.address; |
| | | this.form.sex = d.sex; |
| | | this.form.nation = d.nation; |
| | |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.$refs.crud.refreshTable(); |
| | | this.$refs.crud.doLayout(); |
| | | this.selectionClear(); |
| | | }); |
| | | }, |