From 2c461eb9efb980d55dfd7407ee70088fc90a4a7a Mon Sep 17 00:00:00 2001
From: 钟日健 <5689795+arsn@user.noreply.gitee.com>
Date: Tue, 08 Feb 2022 14:24:31 +0800
Subject: [PATCH] 保安员详情修改
---
src/views/securityUnitChild/social.vue | 99 +++++++++++++++++++++++--------------------------
1 files changed, 46 insertions(+), 53 deletions(-)
diff --git a/src/views/securityUnitChild/social.vue b/src/views/securityUnitChild/social.vue
index d13c4a8..223c8a0 100644
--- a/src/views/securityUnitChild/social.vue
+++ b/src/views/securityUnitChild/social.vue
@@ -1,6 +1,9 @@
<template>
- <basic-container>
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
<avue-crud
+ v-if="visible"
:option="option"
:table-loading="loading"
:data="data"
@@ -73,7 +76,7 @@
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) {
@@ -82,6 +85,7 @@
deptid = this.$store.getters.userInfo.dept_id;
}
return {
+ visible: true,
form: { cardid: "" },
query: {},
@@ -91,11 +95,12 @@
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",
@@ -106,6 +111,7 @@
menu: false,
selection: true,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "姓名",
@@ -147,10 +153,6 @@
label: "女",
value: 2,
},
- {
- label: "未知",
- value: 3,
- },
],
labelWidth: 110,
addDisabled: true,
@@ -163,21 +165,21 @@
},
],
},
- {
- 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,
@@ -231,8 +233,8 @@
prop: "residence",
labelWidth: 110,
overHidden: true,
- addDisabled: true,
- editDisabled: true,
+ addDisabled: false,
+ editDisabled: false,
rules: [
{
required: true,
@@ -331,33 +333,6 @@
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",
@@ -380,9 +355,25 @@
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),
@@ -407,7 +398,7 @@
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;
@@ -552,6 +543,8 @@
this.page.total = data.total;
this.data = data.records;
this.loading = false;
+ this.$refs.crud.refreshTable();
+ this.$refs.crud.doLayout();
this.selectionClear();
});
},
--
Gitblit v1.9.3