|
@@ -474,7 +474,7 @@
|
|
|
<el-form-item>
|
|
|
<!-- <el-button type="primary" size="btn" @click="handleQuery"
|
|
|
>搜索</el-button
|
|
|
- > -->
|
|
|
+ >-->
|
|
|
<el-button size="btr" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -529,7 +529,7 @@
|
|
|
<!-- <right-toolbar
|
|
|
:showSearch.sync="showSearch"
|
|
|
@queryTable="getList"
|
|
|
- ></right-toolbar> -->
|
|
|
+ ></right-toolbar>-->
|
|
|
</el-row>
|
|
|
|
|
|
<el-table
|
|
@@ -570,8 +570,18 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="命令号" align="center" prop="command" />-->
|
|
|
- <el-table-column label="部职别" align="center" width="300" prop="duty" />
|
|
|
- <el-table-column label="职务" align="center" width="120" prop="postId">
|
|
|
+ <el-table-column
|
|
|
+ label="部职别"
|
|
|
+ align="center"
|
|
|
+ width="300"
|
|
|
+ prop="duty"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="职务"
|
|
|
+ align="center"
|
|
|
+ width="120"
|
|
|
+ prop="postId"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<dict-tag
|
|
|
:options="dict.type.post_Level"
|
|
@@ -754,19 +764,19 @@
|
|
|
width="200"
|
|
|
fixed="right"
|
|
|
>
|
|
|
- <template slot-scope="scope">
|
|
|
+ <template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="btu"
|
|
|
type="text"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
- v-hasPermi="['peopleManage:people:edit']"
|
|
|
+ v-hasPermi="['peopleManage:people:edit']"
|
|
|
>修改</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
size="btk"
|
|
|
type="text"
|
|
|
@click="handlesee(scope.row)"
|
|
|
- v-hasPermi="['peopleManage:people:query']"
|
|
|
+ v-hasPermi="['peopleManage:people:query']"
|
|
|
>查看</el-button
|
|
|
>
|
|
|
<el-button
|
|
@@ -1169,7 +1179,7 @@
|
|
|
v-for="(item, index) in jtlist"
|
|
|
:key="index"
|
|
|
>
|
|
|
- <el-form-item label="姓名">
|
|
|
+ <el-form-item label="姓名" prop="name">
|
|
|
<el-input v-model="item.name" placeholder />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="与本人关系" prop="characterRelationship">
|
|
@@ -1206,7 +1216,7 @@
|
|
|
style="height: 36px; margin-left: 575px"
|
|
|
v-if="index != 0"
|
|
|
>删除</el-button
|
|
|
- > -->
|
|
|
+ >-->
|
|
|
</el-row>
|
|
|
<div class="jiben">培训经历</div>
|
|
|
<el-form-item label prop="training">
|
|
@@ -1227,11 +1237,13 @@
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label prop="readmeFile">
|
|
|
<el-input v-model="form.readmeFile" type="textarea" placeholder />
|
|
|
- </el-form-item>-->
|
|
|
+ </el-form-item>-->
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitForm" v-if="btnflg" >确 定</el-button>
|
|
|
+ <el-button type="primary" @click="submitForm" v-if="btnflg"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
<el-button @click="cancel" size="btn">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -1248,7 +1260,7 @@ import {
|
|
|
exportPeople,
|
|
|
getDept,
|
|
|
listDept,
|
|
|
- treeselect,
|
|
|
+ treeselect
|
|
|
} from "@/api/peopleManage/people";
|
|
|
|
|
|
export default {
|
|
@@ -1267,7 +1279,7 @@ export default {
|
|
|
"bloodType",
|
|
|
"sys_yes_no",
|
|
|
"sys_yes_no",
|
|
|
- "people_state",
|
|
|
+ "people_state"
|
|
|
],
|
|
|
data() {
|
|
|
return {
|
|
@@ -1358,7 +1370,7 @@ export default {
|
|
|
userId: null,
|
|
|
nowMilitaryRank: null,
|
|
|
treatmentLevel: null,
|
|
|
- rankUpgradeTime: null,
|
|
|
+ rankUpgradeTime: null
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
@@ -1368,69 +1380,69 @@ export default {
|
|
|
idcard: [
|
|
|
{ required: true, message: "身份证号不能为空", trigger: "blur" },
|
|
|
{
|
|
|
- pattern:
|
|
|
- /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
|
|
|
+ pattern: /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
|
|
|
message: "请输入正确的身份证号",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
],
|
|
|
nationId: [
|
|
|
- { required: true, message: "民族不能为空", trigger: "blur" },
|
|
|
+ { required: true, message: "民族不能为空", trigger: "blur" }
|
|
|
],
|
|
|
sex: [{ required: true, message: "性别不能为空", trigger: "blur" }],
|
|
|
age: [{ required: true, message: "年龄不能为空", trigger: "blur" }],
|
|
|
birthDate: [
|
|
|
- { required: true, message: "出生年月不能为空", trigger: "blur" },
|
|
|
+ { required: true, message: "出生年月不能为空", trigger: "blur" }
|
|
|
],
|
|
|
origin: [{ required: true, message: "籍贯不能为空", trigger: "blur" }],
|
|
|
live: [
|
|
|
- { required: true, message: "家庭住址不能为空", trigger: "blur" },
|
|
|
+ { required: true, message: "家庭住址不能为空", trigger: "blur" }
|
|
|
],
|
|
|
partyId: [
|
|
|
- { required: true, message: "政治面貌不能为空", trigger: "change" },
|
|
|
+ { required: true, message: "政治面貌不能为空", trigger: "change" }
|
|
|
],
|
|
|
healthy: [
|
|
|
- { required: true, message: "健康情况不能为空", trigger: "change" },
|
|
|
+ { required: true, message: "健康情况不能为空", trigger: "change" }
|
|
|
],
|
|
|
marryList: [
|
|
|
- { required: true, message: "婚姻情况不能为空", trigger: "change" },
|
|
|
+ { required: true, message: "婚姻情况不能为空", trigger: "change" }
|
|
|
],
|
|
|
educationId: [
|
|
|
- { required: true, message: "学历不能为空", trigger: "change" },
|
|
|
+ { required: true, message: "学历不能为空", trigger: "change" }
|
|
|
],
|
|
|
admissionTime: [
|
|
|
- { required: true, message: "入学时间不能为空", trigger: "change" },
|
|
|
+ { required: true, message: "入学时间不能为空", trigger: "change" }
|
|
|
],
|
|
|
graduationDate: [
|
|
|
- { required: true, message: "毕业时间不能为空", trigger: "change" },
|
|
|
+ { required: true, message: "毕业时间不能为空", trigger: "change" }
|
|
|
],
|
|
|
school: [
|
|
|
- { required: true, message: "毕业学校不能为空", trigger: "blur" },
|
|
|
+ { required: true, message: "毕业学校不能为空", trigger: "blur" }
|
|
|
],
|
|
|
phone: [
|
|
|
{ required: true, message: "手机号码不能为空", trigger: "blur" },
|
|
|
{
|
|
|
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
|
|
message: "请输入正确的手机号码",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
],
|
|
|
phoneStandby: [
|
|
|
{
|
|
|
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
|
|
message: "请输入正确的手机号码",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
],
|
|
|
enlistDate: [
|
|
|
- { required: true, message: "入伍时间不能为空", trigger: "change" },
|
|
|
+ { required: true, message: "入伍时间不能为空", trigger: "change" }
|
|
|
],
|
|
|
authorizedStrength: [
|
|
|
- { required: true, message: "是否编制不能为空", trigger: "change" },
|
|
|
+ { required: true, message: "是否编制不能为空", trigger: "change" }
|
|
|
],
|
|
|
deptId: [
|
|
|
- { required: true, message: "单位不能为空", trigger: "change" },
|
|
|
+ { required: true, message: "单位不能为空", trigger: "change" }
|
|
|
],
|
|
|
+ name: [{ required: true, message: "亲属姓名不能为空", trigger: "blur" }]
|
|
|
// jtname:[{ validator: jtnameblur, trigger: "blur" }],
|
|
|
// characterRelationship: [
|
|
|
// { required: true, message: "与本人关系必填一个", trigger: "blur" }
|
|
@@ -1479,79 +1491,79 @@ export default {
|
|
|
name: null,
|
|
|
characterRelationship: null,
|
|
|
phoneNumber: null,
|
|
|
- unitName: null,
|
|
|
- },
|
|
|
+ unitName: null
|
|
|
+ }
|
|
|
],
|
|
|
defaultProps: {
|
|
|
children: "children",
|
|
|
- label: "label",
|
|
|
+ label: "label"
|
|
|
},
|
|
|
deptOptions: [],
|
|
|
value: null,
|
|
|
- btnflg:false
|
|
|
+ btnflg: false
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.getList();
|
|
|
//性别
|
|
|
- this.getDicts("sys_user_sex").then((response) => {
|
|
|
+ this.getDicts("sys_user_sex").then(response => {
|
|
|
this.sexList = response.data;
|
|
|
});
|
|
|
//血型
|
|
|
- this.getDicts("bloodType").then((response) => {
|
|
|
+ this.getDicts("bloodType").then(response => {
|
|
|
this.bloodType = response.data;
|
|
|
});
|
|
|
//政治面貌
|
|
|
- this.getDicts("Caucus").then((response) => {
|
|
|
+ this.getDicts("Caucus").then(response => {
|
|
|
this.partyIds = response.data;
|
|
|
});
|
|
|
//健康情况
|
|
|
- this.getDicts("healthy").then((response) => {
|
|
|
+ this.getDicts("healthy").then(response => {
|
|
|
this.healthy = response.data;
|
|
|
});
|
|
|
//婚姻情况
|
|
|
- this.getDicts("marryList").then((response) => {
|
|
|
+ this.getDicts("marryList").then(response => {
|
|
|
this.marryList = response.data;
|
|
|
});
|
|
|
//学历
|
|
|
- this.getDicts("Degree_level").then((response) => {
|
|
|
+ this.getDicts("Degree_level").then(response => {
|
|
|
this.educationId = response.data;
|
|
|
});
|
|
|
//婚姻情况
|
|
|
- this.getDicts("degree").then((response) => {
|
|
|
+ this.getDicts("degree").then(response => {
|
|
|
this.degree = response.data;
|
|
|
});
|
|
|
//是否编制
|
|
|
- this.getDicts("sys_yes_no").then((response) => {
|
|
|
+ this.getDicts("sys_yes_no").then(response => {
|
|
|
this.authorizedStrength = response.data;
|
|
|
});
|
|
|
//子女情况
|
|
|
- this.getDicts("sys_yw").then((response) => {
|
|
|
+ this.getDicts("sys_yw").then(response => {
|
|
|
this.childrenList = response.data;
|
|
|
});
|
|
|
//人员类别
|
|
|
- this.getDicts("personnel_type").then((response) => {
|
|
|
+ this.getDicts("personnel_type").then(response => {
|
|
|
this.classId = response.data;
|
|
|
});
|
|
|
//职务层级
|
|
|
- this.getDicts("post_Level").then((response) => {
|
|
|
+ this.getDicts("post_Level").then(response => {
|
|
|
this.postIds = response.data;
|
|
|
});
|
|
|
//军衔
|
|
|
- this.getDicts("sys_user_rank").then((response) => {
|
|
|
+ this.getDicts("sys_user_rank").then(response => {
|
|
|
this.rankIds = response.data;
|
|
|
});
|
|
|
//民族
|
|
|
- this.getDicts("sys_familyName").then((response) => {
|
|
|
+ this.getDicts("sys_familyName").then(response => {
|
|
|
this.nationIds = response.data;
|
|
|
});
|
|
|
//部门数据
|
|
|
- getDept().then((res) => {
|
|
|
+ getDept().then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.unitId = res.data;
|
|
|
}
|
|
|
});
|
|
|
- treeselect().then((res) => {
|
|
|
+ treeselect().then(res => {
|
|
|
console.log(res);
|
|
|
if (res.code == 200) {
|
|
|
this.deptOptions = res.data;
|
|
@@ -1562,7 +1574,7 @@ export default {
|
|
|
//单位翻译
|
|
|
deptIdformatter(row, column) {
|
|
|
var deptName = "";
|
|
|
- this.unitId.map((item) => {
|
|
|
+ this.unitId.map(item => {
|
|
|
if (item.deptId == row.deptId) {
|
|
|
deptName = item.deptName;
|
|
|
}
|
|
@@ -1572,7 +1584,7 @@ export default {
|
|
|
/** 查询人员管理列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listPeople(this.queryParams).then((response) => {
|
|
|
+ listPeople(this.queryParams).then(response => {
|
|
|
this.peopleList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
@@ -1650,7 +1662,7 @@ export default {
|
|
|
rankUpgradeTime: null,
|
|
|
phoneStandby: null,
|
|
|
deptName: null,
|
|
|
- isBianzhi: null,
|
|
|
+ isBianzhi: null
|
|
|
};
|
|
|
this.bdglPeopleList = [];
|
|
|
this.resetForm("form");
|
|
@@ -1667,7 +1679,7 @@ export default {
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map((item) => item.id);
|
|
|
+ this.ids = selection.map(item => item.id);
|
|
|
this.single = selection.length !== 1;
|
|
|
this.multiple = !selection.length;
|
|
|
},
|
|
@@ -1676,13 +1688,13 @@ export default {
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
this.title = "添加人员管理";
|
|
|
- this.btnflg=true;
|
|
|
- this.jtlist= [
|
|
|
+ this.btnflg = true;
|
|
|
+ this.jtlist = [
|
|
|
{
|
|
|
name: null,
|
|
|
characterRelationship: null,
|
|
|
phoneNumber: null,
|
|
|
- unitName: null,
|
|
|
+ unitName: null
|
|
|
}
|
|
|
];
|
|
|
},
|
|
@@ -1690,41 +1702,67 @@ export default {
|
|
|
handlesee(row) {
|
|
|
this.reset();
|
|
|
const id = row.id || this.ids;
|
|
|
- getPeople(id).then((response) => {
|
|
|
+ getPeople(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
this.jtlist = response.data.familyInformation;
|
|
|
+ //家庭人员判空处理
|
|
|
+ if (this.form.familyInformation.length > 0) {
|
|
|
+ this.jtlist = response.data.familyInformation;
|
|
|
+ } else {
|
|
|
+ this.jtlist = [
|
|
|
+ {
|
|
|
+ name: null,
|
|
|
+ characterRelationship: null,
|
|
|
+ phoneNumber: null,
|
|
|
+ unitName: null
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ }
|
|
|
this.bdglPeopleList = response.data.bdglPeopleList;
|
|
|
this.open = true;
|
|
|
this.title = "查看人员管理";
|
|
|
- this.btnflg=false;
|
|
|
+ this.btnflg = false;
|
|
|
});
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
const id = row.id || this.ids;
|
|
|
- getPeople(id).then((response) => {
|
|
|
+ getPeople(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
- this.jtlist = response.data.familyInformation;
|
|
|
+ //家庭人员判空处理
|
|
|
+ if (this.form.familyInformation.length > 0) {
|
|
|
+ this.jtlist = response.data.familyInformation;
|
|
|
+ } else {
|
|
|
+ this.jtlist = [
|
|
|
+ {
|
|
|
+ name: null,
|
|
|
+ characterRelationship: null,
|
|
|
+ phoneNumber: null,
|
|
|
+ unitName: null
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
this.bdglPeopleList = response.data.bdglPeopleList;
|
|
|
this.open = true;
|
|
|
this.title = "修改人员管理";
|
|
|
- this.btnflg=true;
|
|
|
+ this.btnflg = true;
|
|
|
});
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
// console.log(this.form.laborContractUploading)
|
|
|
- this.$refs["form"].validate((valid) => {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
- if (this.form.readmeFile) {
|
|
|
+ if (this.form.readmeFile) {
|
|
|
this.form.readmeFile = this.form.readmeFile[0].name;
|
|
|
}
|
|
|
this.form.deptName = this.$refs["deptId"].selectedLabel;
|
|
|
this.form.bdglPeopleList = this.bdglPeopleList;
|
|
|
this.form.familyInformation = this.jtlist;
|
|
|
if (this.form.id != null) {
|
|
|
- updatePeople(this.form).then((response) => {
|
|
|
+ updatePeople(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
@@ -1732,7 +1770,7 @@ export default {
|
|
|
} else {
|
|
|
this.form.familyInformation = this.jtlist;
|
|
|
this.form.deptName = this.$refs["deptId"].selectedLabel;
|
|
|
- addPeople(this.form).then((response) => {
|
|
|
+ addPeople(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
@@ -1746,7 +1784,7 @@ export default {
|
|
|
const ids = row.id || this.ids;
|
|
|
this.$modal
|
|
|
.confirm("是否确认删除人员管理的数据项?")
|
|
|
- .then(function () {
|
|
|
+ .then(function() {
|
|
|
return delPeople(ids);
|
|
|
})
|
|
|
.then(() => {
|
|
@@ -1830,14 +1868,14 @@ export default {
|
|
|
} else {
|
|
|
const bdglPeopleList = this.bdglPeopleList;
|
|
|
const checkedBdglPeople = this.checkedBdglPeople;
|
|
|
- this.bdglPeopleList = bdglPeopleList.filter(function (item) {
|
|
|
+ this.bdglPeopleList = bdglPeopleList.filter(function(item) {
|
|
|
return checkedBdglPeople.indexOf(item.index) == -1;
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
/** 复选框选中数据 */
|
|
|
handleBdglPeopleSelectionChange(selection) {
|
|
|
- this.checkedBdglPeople = selection.map((item) => item.index);
|
|
|
+ this.checkedBdglPeople = selection.map(item => item.index);
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
@@ -1848,7 +1886,7 @@ export default {
|
|
|
this.exportLoading = true;
|
|
|
return exportPeople(queryParams);
|
|
|
})
|
|
|
- .then((response) => {
|
|
|
+ .then(response => {
|
|
|
this.$download.name(response.msg);
|
|
|
this.exportLoading = false;
|
|
|
})
|
|
@@ -1860,7 +1898,7 @@ export default {
|
|
|
name: null,
|
|
|
characterRelationship: null,
|
|
|
phoneNumber: null,
|
|
|
- unitName: null,
|
|
|
+ unitName: null
|
|
|
});
|
|
|
},
|
|
|
//删除家庭成员
|
|
@@ -1881,16 +1919,16 @@ export default {
|
|
|
this.form.idcard.substr(12, 2);
|
|
|
var myDate = new Date();
|
|
|
this.form.age = myDate.getFullYear() - this.form.idcard.substr(6, 4);
|
|
|
- listPeople({idcard:this.form.idcard}).then((response)=>{
|
|
|
- console.log()
|
|
|
- if(response.rows.length>0){
|
|
|
- this.form.idcard=null;
|
|
|
- this.form.age=null;
|
|
|
- this.form.birthDate=null;
|
|
|
- this.form.sex=null;
|
|
|
- this.$modal.msgError("该人员已存在,无需重复添加");
|
|
|
- }
|
|
|
- })
|
|
|
+ listPeople({ idcard: this.form.idcard }).then(response => {
|
|
|
+ console.log();
|
|
|
+ if (response.rows.length > 0) {
|
|
|
+ this.form.idcard = null;
|
|
|
+ this.form.age = null;
|
|
|
+ this.form.birthDate = null;
|
|
|
+ this.form.sex = null;
|
|
|
+ this.$modal.msgError("该人员已存在,无需重复添加");
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
// 筛选节点
|
|
|
filterNode(value, data) {
|
|
@@ -1901,8 +1939,8 @@ export default {
|
|
|
handleNodeClick(data) {
|
|
|
this.queryParams.deptId = data.id;
|
|
|
this.getList();
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped>
|