添加人员性质字段

This commit is contained in:
jiayu 2024-10-11 18:25:06 +08:00
parent 8550d97ac4
commit af846aa220
3 changed files with 110 additions and 1 deletions

View File

@ -712,6 +712,27 @@
<span v-else>{{ workerInfo.personMail }}</span> <span v-else>{{ workerInfo.personMail }}</span>
</el-form-item> </el-form-item>
</el-col> </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>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="12" v-if="workerInfo.personType == 1"> <el-col :span="12" v-if="workerInfo.personType == 1">
@ -2435,6 +2456,7 @@ import {
checkfaceHikvisionApi, checkfaceHikvisionApi,
getProjectUfaceConfigInfo, getProjectUfaceConfigInfo,
} from "@/assets/js/api/laborPerson.js"; } from "@/assets/js/api/laborPerson.js";
import { getDictionaryItemApi } from '@/assets/js/api/companyDiagram.js'
import { getProjectConfigListApi } from "@/assets/js/api/project.js"; import { getProjectConfigListApi } from "@/assets/js/api/project.js";
import { selectUserDevAuthorityByUserIdApi } from "@/assets/js/api/configManage"; import { selectUserDevAuthorityByUserIdApi } from "@/assets/js/api/configManage";
import QRCode from "qrcodejs2"; import QRCode from "qrcodejs2";
@ -2523,6 +2545,7 @@ export default {
}, },
], ],
}, },
workerNatureList: [],
isIscDevice: false, //isc isIscDevice: false, //isc
}; };
}, },
@ -2540,6 +2563,7 @@ export default {
this.getAttendRuleList(); this.getAttendRuleList();
this.getProjectConfig(); this.getProjectConfig();
this.getConfig();// this.getConfig();//
this.getWorkerNatureList();
}, },
mounted() { mounted() {
new QRCode("workerQRcode", { new QRCode("workerQRcode", {
@ -2552,6 +2576,16 @@ export default {
}); });
}, },
methods: { methods: {
//
async getWorkerNatureList () {
const res = await getDictionaryItemApi({
dictionaryEncoding: 'worker_nature',
projectSn: this.projectSn
})
if (res.code == 200) {
this.workerNatureList = res.result
}
},
exportRecord() { exportRecord() {
// getExporExcelWorkerEducation({ // getExporExcelWorkerEducation({
// projectSn: this.projectSn, // projectSn: this.projectSn,
@ -2780,7 +2814,7 @@ export default {
let data = JSON.parse(JSON.stringify(res.result)); let data = JSON.parse(JSON.stringify(res.result));
console.log("基本人员信息", data.workerInfo); console.log("基本人员信息", data.workerInfo);
this.workerInfo = data.workerInfo; // this.workerInfo = data.workerInfo; //
this.workerInfo.workerNature = String(this.workerInfo.workerNature)
if (this.workerInfo.ruleId == 0) { if (this.workerInfo.ruleId == 0) {
this.workerInfo.ruleId = ""; this.workerInfo.ruleId = "";
} }

View File

@ -1424,6 +1424,26 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </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-row>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -2197,6 +2217,7 @@ import {
} from "@/assets/js/api/laborPerson"; } from "@/assets/js/api/laborPerson";
import { selectUserDevAuthorityByUserIdApi } from "@/assets/js/api/configManage"; import { selectUserDevAuthorityByUserIdApi } from "@/assets/js/api/configManage";
import { getProjectConfigListApi } from "@/assets/js/api/project.js"; import { getProjectConfigListApi } from "@/assets/js/api/project.js";
import { getDictionaryItemApi } from '@/assets/js/api/companyDiagram.js'
import { import {
checkPhone, checkPhone,
CheckSocialCreditCode, CheckSocialCreditCode,
@ -2325,6 +2346,7 @@ export default {
payRollBankNumber: "", payRollBankNumber: "",
locationCardno: "", locationCardno: "",
personMail: "", personMail: "",
workerNature: ""
}, },
// //
personFormRules: this.$t("message.laborMange.personFormRules"), personFormRules: this.$t("message.laborMange.personFormRules"),
@ -2382,6 +2404,7 @@ export default {
imgFileList: [], // imgFileList: [], //
topicName: "topic", topicName: "topic",
userId: "", userId: "",
workerNatureList: []
}; };
}, },
created() { created() {
@ -2415,6 +2438,7 @@ export default {
this.getUfaceDevList(); this.getUfaceDevList();
this.getUGroupDevList(); this.getUGroupDevList();
this.getProjectConfig(); this.getProjectConfig();
this.getWorkerNatureList()
}, },
beforeDestroy() { beforeDestroy() {
if (client) { if (client) {
@ -2439,6 +2463,16 @@ export default {
}, },
}, },
methods: { methods: {
//
async getWorkerNatureList () {
const res = await getDictionaryItemApi({
dictionaryEncoding: 'worker_nature',
projectSn: this.projectSn
})
if (res.code == 200) {
this.workerNatureList = res.result
}
},
// mqtt // mqtt
mqttMSG() { mqttMSG() {
// mqtt +"/#" +workerId // mqtt +"/#" +workerId
@ -3088,6 +3122,7 @@ export default {
ufaceDevId: [], ufaceDevId: [],
ufaceDevGroupId: [], ufaceDevGroupId: [],
personSerial: "", personSerial: "",
workerNature: ""
}; };
if (this.attendRulesList.length > 0) { if (this.attendRulesList.length > 0) {
this.personForm.ruleId = this.attendRulesList[0].id; this.personForm.ruleId = this.attendRulesList[0].id;
@ -3337,11 +3372,13 @@ export default {
ufaceDevId: [], ufaceDevId: [],
ufaceDevGroupId: [], ufaceDevGroupId: [],
personSerial: "", personSerial: "",
workerNature: ""
}; };
this.getUfaceDevList(); this.getUfaceDevList();
// this.goTwo() // this.goTwo()
this.addPersonDialog = true; this.addPersonDialog = true;
this.personForm = JSON.parse(JSON.stringify(value)); this.personForm = JSON.parse(JSON.stringify(value));
this.personForm.workerNature = String(value.workerNature)
this.personForm.sex = Number(value.sex); this.personForm.sex = Number(value.sex);
this.personForm.inserviceType = type == 2 ? 1 : value.inserviceType; this.personForm.inserviceType = type == 2 ? 1 : value.inserviceType;
this.personForm.longTerm = value.longTerm == 1 ? true : false; this.personForm.longTerm = value.longTerm == 1 ? true : false;

View File

@ -1727,6 +1727,27 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </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-row>
<div class="type-change"> <div class="type-change">
<el-radio-group v-model="typeRadio"> <el-radio-group v-model="typeRadio">
@ -2448,6 +2469,7 @@ import {
selectUserDevAuthorityByUserIdApi, selectUserDevAuthorityByUserIdApi,
exporExcelWorkerTemplateApi, exporExcelWorkerTemplateApi,
} from "@/assets/js/api/configManage"; } from "@/assets/js/api/configManage";
import { getDictionaryItemApi } from '@/assets/js/api/companyDiagram.js'
import { import {
checkPhone, checkPhone,
CheckSocialCreditCode, CheckSocialCreditCode,
@ -2615,6 +2637,7 @@ export default {
personSerial: "", personSerial: "",
locationCardno: "", // locationCardno: "", //
personMail: "", personMail: "",
workerNature: ""
}, },
// //
personFormRules: this.$t("message.laborMange.personFormRules2"), personFormRules: this.$t("message.laborMange.personFormRules2"),
@ -2675,6 +2698,7 @@ export default {
whoId: "", whoId: "",
topicName: "topic", topicName: "topic",
userId: "", userId: "",
workerNatureList: []
}; };
}, },
created() { created() {
@ -2708,6 +2732,7 @@ export default {
this.getUfaceDevList(); this.getUfaceDevList();
this.getUGroupDevList(); this.getUGroupDevList();
this.getProjectConfig(); this.getProjectConfig();
this.getWorkerNatureList()
}, },
beforeDestroy() { beforeDestroy() {
if (client) { if (client) {
@ -2732,6 +2757,16 @@ export default {
}, },
}, },
methods: { methods: {
//
async getWorkerNatureList () {
const res = await getDictionaryItemApi({
dictionaryEncoding: 'worker_nature',
projectSn: this.projectSn
})
if (res.code == 200) {
this.workerNatureList = res.result
}
},
// mqtt // mqtt
mqttMSG() { mqttMSG() {
// mqtt +"/#" +workerId // mqtt +"/#" +workerId
@ -3659,6 +3694,7 @@ export default {
ufaceDevId: [], ufaceDevId: [],
ufaceDevGroupId: [], ufaceDevGroupId: [],
personSerial: "", personSerial: "",
workerNature: ""
}; };
if (this.attendRulesList.length > 0) { if (this.attendRulesList.length > 0) {
this.personForm.ruleId = this.attendRulesList[0].id; this.personForm.ruleId = this.attendRulesList[0].id;
@ -3909,6 +3945,7 @@ export default {
ufaceDevId: [], ufaceDevId: [],
ufaceDevGroupId: [], ufaceDevGroupId: [],
personSerial: "", personSerial: "",
workerNature: ""
}; };
this.getUfaceDevList(); this.getUfaceDevList();
setTimeout(() => { setTimeout(() => {
@ -3917,6 +3954,7 @@ export default {
}, 120); }, 120);
this.addPersonDialog = true; this.addPersonDialog = true;
this.personForm = JSON.parse(JSON.stringify(value)); this.personForm = JSON.parse(JSON.stringify(value));
this.personForm.workerNature = String(value.workerNature)
if (value.ufaceDevId) { if (value.ufaceDevId) {
this.personForm.ufaceDevId = value.ufaceDevId.split(","); this.personForm.ufaceDevId = value.ufaceDevId.split(",");
this.handleUfaceDevChange(this.personForm.ufaceDevId); // this.handleUfaceDevChange(this.personForm.ufaceDevId); //