添加人员性质字段
This commit is contained in:
parent
8550d97ac4
commit
af846aa220
@ -712,6 +712,27 @@
|
||||
<span v-else>{{ workerInfo.personMail }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="人员性质:"
|
||||
prop="workerNature"
|
||||
>
|
||||
<el-select
|
||||
v-if="detailInfoStatus"
|
||||
v-model="workerInfo.workerNature"
|
||||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||||
style="width: 80%"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in workerNatureList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.data"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<span v-else>{{ workerInfo.workernaturename }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12" v-if="workerInfo.personType == 1">
|
||||
@ -2435,6 +2456,7 @@ import {
|
||||
checkfaceHikvisionApi,
|
||||
getProjectUfaceConfigInfo,
|
||||
} from "@/assets/js/api/laborPerson.js";
|
||||
import { getDictionaryItemApi } from '@/assets/js/api/companyDiagram.js'
|
||||
import { getProjectConfigListApi } from "@/assets/js/api/project.js";
|
||||
import { selectUserDevAuthorityByUserIdApi } from "@/assets/js/api/configManage";
|
||||
import QRCode from "qrcodejs2";
|
||||
@ -2523,6 +2545,7 @@ export default {
|
||||
},
|
||||
],
|
||||
},
|
||||
workerNatureList: [],
|
||||
isIscDevice: false, //是否是海康门禁isc设备
|
||||
};
|
||||
},
|
||||
@ -2540,6 +2563,7 @@ export default {
|
||||
this.getAttendRuleList();
|
||||
this.getProjectConfig();
|
||||
this.getConfig();//判断是否为海康设备
|
||||
this.getWorkerNatureList();
|
||||
},
|
||||
mounted() {
|
||||
new QRCode("workerQRcode", {
|
||||
@ -2552,6 +2576,16 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 获取人员性质下拉
|
||||
async getWorkerNatureList () {
|
||||
const res = await getDictionaryItemApi({
|
||||
dictionaryEncoding: 'worker_nature',
|
||||
projectSn: this.projectSn
|
||||
})
|
||||
if (res.code == 200) {
|
||||
this.workerNatureList = res.result
|
||||
}
|
||||
},
|
||||
exportRecord() {
|
||||
// getExporExcelWorkerEducation({
|
||||
// projectSn: this.projectSn,
|
||||
@ -2780,7 +2814,7 @@ export default {
|
||||
let data = JSON.parse(JSON.stringify(res.result));
|
||||
console.log("基本人员信息", data.workerInfo);
|
||||
this.workerInfo = data.workerInfo; //基本人员信息
|
||||
|
||||
this.workerInfo.workerNature = String(this.workerInfo.workerNature)
|
||||
if (this.workerInfo.ruleId == 0) {
|
||||
this.workerInfo.ruleId = "";
|
||||
}
|
||||
|
||||
@ -1424,6 +1424,26 @@
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="人员性质"
|
||||
prop="workerNature"
|
||||
>
|
||||
<el-select
|
||||
v-model="personForm.workerNature"
|
||||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||||
style="width: 100%"
|
||||
:disabled="titleType == 'detail'"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in workerNatureList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.data"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -2197,6 +2217,7 @@ import {
|
||||
} from "@/assets/js/api/laborPerson";
|
||||
import { selectUserDevAuthorityByUserIdApi } from "@/assets/js/api/configManage";
|
||||
import { getProjectConfigListApi } from "@/assets/js/api/project.js";
|
||||
import { getDictionaryItemApi } from '@/assets/js/api/companyDiagram.js'
|
||||
import {
|
||||
checkPhone,
|
||||
CheckSocialCreditCode,
|
||||
@ -2325,6 +2346,7 @@ export default {
|
||||
payRollBankNumber: "",
|
||||
locationCardno: "",
|
||||
personMail: "",
|
||||
workerNature: ""
|
||||
},
|
||||
//人员录入校验
|
||||
personFormRules: this.$t("message.laborMange.personFormRules"),
|
||||
@ -2382,6 +2404,7 @@ export default {
|
||||
imgFileList: [], // 照片文件列表
|
||||
topicName: "topic",
|
||||
userId: "",
|
||||
workerNatureList: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -2415,6 +2438,7 @@ export default {
|
||||
this.getUfaceDevList();
|
||||
this.getUGroupDevList();
|
||||
this.getProjectConfig();
|
||||
this.getWorkerNatureList()
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (client) {
|
||||
@ -2439,6 +2463,16 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 获取人员性质下拉
|
||||
async getWorkerNatureList () {
|
||||
const res = await getDictionaryItemApi({
|
||||
dictionaryEncoding: 'worker_nature',
|
||||
projectSn: this.projectSn
|
||||
})
|
||||
if (res.code == 200) {
|
||||
this.workerNatureList = res.result
|
||||
}
|
||||
},
|
||||
// 监听mqtt下发信息然后刷新列表
|
||||
mqttMSG() {
|
||||
// mqtt连接 +"/#" +workerId
|
||||
@ -3088,6 +3122,7 @@ export default {
|
||||
ufaceDevId: [],
|
||||
ufaceDevGroupId: [],
|
||||
personSerial: "",
|
||||
workerNature: ""
|
||||
};
|
||||
if (this.attendRulesList.length > 0) {
|
||||
this.personForm.ruleId = this.attendRulesList[0].id;
|
||||
@ -3337,11 +3372,13 @@ export default {
|
||||
ufaceDevId: [],
|
||||
ufaceDevGroupId: [],
|
||||
personSerial: "",
|
||||
workerNature: ""
|
||||
};
|
||||
this.getUfaceDevList();
|
||||
// this.goTwo()
|
||||
this.addPersonDialog = true;
|
||||
this.personForm = JSON.parse(JSON.stringify(value));
|
||||
this.personForm.workerNature = String(value.workerNature)
|
||||
this.personForm.sex = Number(value.sex);
|
||||
this.personForm.inserviceType = type == 2 ? 1 : value.inserviceType;
|
||||
this.personForm.longTerm = value.longTerm == 1 ? true : false;
|
||||
|
||||
@ -1727,6 +1727,27 @@
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="人员性质"
|
||||
prop="workerNature"
|
||||
>
|
||||
<el-select
|
||||
v-model="personForm.workerNature"
|
||||
:placeholder="$t('message.laborMange.pleaseChoose')"
|
||||
style="width: 100%"
|
||||
:disabled="titleType == 'detail'"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in workerNatureList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.data"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="type-change">
|
||||
<el-radio-group v-model="typeRadio">
|
||||
@ -2448,6 +2469,7 @@ import {
|
||||
selectUserDevAuthorityByUserIdApi,
|
||||
exporExcelWorkerTemplateApi,
|
||||
} from "@/assets/js/api/configManage";
|
||||
import { getDictionaryItemApi } from '@/assets/js/api/companyDiagram.js'
|
||||
import {
|
||||
checkPhone,
|
||||
CheckSocialCreditCode,
|
||||
@ -2615,6 +2637,7 @@ export default {
|
||||
personSerial: "",
|
||||
locationCardno: "", //人员定位标签号
|
||||
personMail: "",
|
||||
workerNature: ""
|
||||
},
|
||||
//人员录入校验
|
||||
personFormRules: this.$t("message.laborMange.personFormRules2"),
|
||||
@ -2675,6 +2698,7 @@ export default {
|
||||
whoId: "",
|
||||
topicName: "topic",
|
||||
userId: "",
|
||||
workerNatureList: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -2708,6 +2732,7 @@ export default {
|
||||
this.getUfaceDevList();
|
||||
this.getUGroupDevList();
|
||||
this.getProjectConfig();
|
||||
this.getWorkerNatureList()
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (client) {
|
||||
@ -2732,6 +2757,16 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 获取人员性质下拉
|
||||
async getWorkerNatureList () {
|
||||
const res = await getDictionaryItemApi({
|
||||
dictionaryEncoding: 'worker_nature',
|
||||
projectSn: this.projectSn
|
||||
})
|
||||
if (res.code == 200) {
|
||||
this.workerNatureList = res.result
|
||||
}
|
||||
},
|
||||
// 监听mqtt下发信息然后刷新列表
|
||||
mqttMSG() {
|
||||
// mqtt连接 +"/#" +workerId
|
||||
@ -3659,6 +3694,7 @@ export default {
|
||||
ufaceDevId: [],
|
||||
ufaceDevGroupId: [],
|
||||
personSerial: "",
|
||||
workerNature: ""
|
||||
};
|
||||
if (this.attendRulesList.length > 0) {
|
||||
this.personForm.ruleId = this.attendRulesList[0].id;
|
||||
@ -3909,6 +3945,7 @@ export default {
|
||||
ufaceDevId: [],
|
||||
ufaceDevGroupId: [],
|
||||
personSerial: "",
|
||||
workerNature: ""
|
||||
};
|
||||
this.getUfaceDevList();
|
||||
setTimeout(() => {
|
||||
@ -3917,6 +3954,7 @@ export default {
|
||||
}, 120);
|
||||
this.addPersonDialog = true;
|
||||
this.personForm = JSON.parse(JSON.stringify(value));
|
||||
this.personForm.workerNature = String(value.workerNature)
|
||||
if (value.ufaceDevId) {
|
||||
this.personForm.ufaceDevId = value.ufaceDevId.split(",");
|
||||
this.handleUfaceDevChange(this.personForm.ufaceDevId); // 做一下全选按钮的选中与否
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user