fix: BUG修改
This commit is contained in:
parent
03f5697284
commit
36ab5be6d7
@ -428,7 +428,7 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="dev-content">
|
<!-- <div class="dev-content">
|
||||||
<span class="dev-content-title">车辆相机设备</span>
|
<span class="dev-content-title">车辆相机设备</span>
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
:indeterminate="isIndeterminate2"
|
:indeterminate="isIndeterminate2"
|
||||||
@ -450,7 +450,7 @@
|
|||||||
{{ item.cameraName }}
|
{{ item.cameraName }}
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button
|
<el-button
|
||||||
class="cancleBtn"
|
class="cancleBtn"
|
||||||
@ -669,7 +669,7 @@ export default {
|
|||||||
{realName: "李先生", value: 2},*/
|
{realName: "李先生", value: 2},*/
|
||||||
],
|
],
|
||||||
addEditForm: {
|
addEditForm: {
|
||||||
uDevId: [],
|
// uDevId: [],
|
||||||
},
|
},
|
||||||
pagInfo: {
|
pagInfo: {
|
||||||
pageNo: 1, //页数
|
pageNo: 1, //页数
|
||||||
@ -816,9 +816,9 @@ export default {
|
|||||||
.split(",")
|
.split(",")
|
||||||
.map(String);
|
.map(String);
|
||||||
}
|
}
|
||||||
if(obj.uDevId){
|
// if(obj.uDevId){
|
||||||
this.addEditForm.uDevId = obj.uDevId.split(",")
|
// this.addEditForm.uDevId = obj.uDevId.split(",")
|
||||||
}
|
// }
|
||||||
// this.$forceUpdate();
|
// this.$forceUpdate();
|
||||||
console.log("编辑", obj, "fileList", this.fileList);
|
console.log("编辑", obj, "fileList", this.fileList);
|
||||||
this.handle("edit", true);
|
this.handle("edit", true);
|
||||||
@ -881,11 +881,11 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.addEditForm.uDevId.length > 0) {
|
// if (this.addEditForm.uDevId.length > 0) {
|
||||||
data.uDevId = this.personForm.uDevId.join(",");
|
// data.uDevId = this.personForm.uDevId.join(",");
|
||||||
} else {
|
// } else {
|
||||||
data.uDevId = "";
|
// data.uDevId = "";
|
||||||
}
|
// }
|
||||||
this.$refs.addEditForm.validate((valid) => {
|
this.$refs.addEditForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.Popup.type === "add") {
|
if (this.Popup.type === "add") {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -905,7 +905,7 @@
|
|||||||
label=""
|
label=""
|
||||||
prop="devType"
|
prop="devType"
|
||||||
>
|
>
|
||||||
<el-radio-group v-model="workerInfo.devType">
|
<el-radio-group v-model="workerInfo.devType" @input="devTypeChange">
|
||||||
<el-radio :label="1">设备</el-radio>
|
<el-radio :label="1">设备</el-radio>
|
||||||
<el-radio :label="2">分组</el-radio>
|
<el-radio :label="2">分组</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
@ -915,7 +915,7 @@
|
|||||||
<el-row :gutter="24" v-if="workerInfo.devType == 1">
|
<el-row :gutter="24" v-if="workerInfo.devType == 1">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('message.laborMange.faceDevice')"
|
:label="$t('message.laborMange.faceDevice') + ':'"
|
||||||
prop="ufaceDevId"
|
prop="ufaceDevId"
|
||||||
>
|
>
|
||||||
<!-- <div v-if="detailInfoStatus"> -->
|
<!-- <div v-if="detailInfoStatus"> -->
|
||||||
@ -927,6 +927,7 @@
|
|||||||
>{{ $t('message.laborMange.checkAll') }}</el-checkbox
|
>{{ $t('message.laborMange.checkAll') }}</el-checkbox
|
||||||
>
|
>
|
||||||
<el-checkbox-group
|
<el-checkbox-group
|
||||||
|
key="ufaceDevId"
|
||||||
v-if="detailInfoStatus"
|
v-if="detailInfoStatus"
|
||||||
v-model="workerInfo.ufaceDevId"
|
v-model="workerInfo.ufaceDevId"
|
||||||
@change="ufaceDevIdChange"
|
@change="ufaceDevIdChange"
|
||||||
@ -957,7 +958,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="人脸分组:"
|
label="人脸分组:"
|
||||||
prop="uGroupId"
|
prop="ufaceDevGroupId"
|
||||||
>
|
>
|
||||||
<!-- <div v-if="detailInfoStatus"> -->
|
<!-- <div v-if="detailInfoStatus"> -->
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
@ -968,8 +969,9 @@
|
|||||||
>{{ $t('message.laborMange.checkAll') }}</el-checkbox
|
>{{ $t('message.laborMange.checkAll') }}</el-checkbox
|
||||||
>
|
>
|
||||||
<el-checkbox-group
|
<el-checkbox-group
|
||||||
|
key="ufaceDevGroupId"
|
||||||
v-if="detailInfoStatus"
|
v-if="detailInfoStatus"
|
||||||
v-model="workerInfo.uGroupId"
|
v-model="workerInfo.ufaceDevGroupId"
|
||||||
@change="uGroupIdChange"
|
@change="uGroupIdChange"
|
||||||
>
|
>
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
@ -2289,7 +2291,7 @@ export default {
|
|||||||
originalData: {}, // 获取的详情信息原数据. 用作判断 不作修改
|
originalData: {}, // 获取的详情信息原数据. 用作判断 不作修改
|
||||||
workerInfo: {
|
workerInfo: {
|
||||||
ufaceDevId: [],
|
ufaceDevId: [],
|
||||||
uGroupId: [],
|
ufaceDevGroupId: [],
|
||||||
}, //基本 详情信息
|
}, //基本 详情信息
|
||||||
contractList: [], //合同信息
|
contractList: [], //合同信息
|
||||||
certificateList: [], //证书
|
certificateList: [], //证书
|
||||||
@ -2366,6 +2368,13 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
devTypeChange(e){
|
||||||
|
if(e == 1){
|
||||||
|
this.getUfaceDevList();
|
||||||
|
} else {
|
||||||
|
this.getUGroupDevList();
|
||||||
|
}
|
||||||
|
},
|
||||||
checkImg() {
|
checkImg() {
|
||||||
console.log(this.radio);
|
console.log(this.radio);
|
||||||
this.imgRadiolist.forEach((item) => {
|
this.imgRadiolist.forEach((item) => {
|
||||||
@ -2387,14 +2396,14 @@ export default {
|
|||||||
},
|
},
|
||||||
handleCheckAllChangeGroup(val) {
|
handleCheckAllChangeGroup(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.workerInfo.uGroupId = [];
|
this.workerInfo.ufaceDevGroupId = [];
|
||||||
this.uGroupAllList.forEach((item) => {
|
this.uGroupAllList.forEach((item) => {
|
||||||
if (!item.disabled) {
|
if (!item.disabled) {
|
||||||
this.workerInfo.uGroupId.push(item.id + "");
|
this.workerInfo.ufaceDevGroupId.push(item.id + "");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.workerInfo.uGroupId = [];
|
this.workerInfo.ufaceDevGroupId = [];
|
||||||
}
|
}
|
||||||
console.log(val);
|
console.log(val);
|
||||||
this.isIndeterminate3 = false;
|
this.isIndeterminate3 = false;
|
||||||
@ -2402,7 +2411,8 @@ export default {
|
|||||||
uGroupIdChange(val) {
|
uGroupIdChange(val) {
|
||||||
let checkedCount = val.length;
|
let checkedCount = val.length;
|
||||||
let allCheckList = [];
|
let allCheckList = [];
|
||||||
console.log("---------55");
|
console.log(val,"---------55");
|
||||||
|
console.log(this.workerInfo.ufaceDevGroupId,"---------55");
|
||||||
for (let i = 0; i < this.uGroupAllList.length; i++) {
|
for (let i = 0; i < this.uGroupAllList.length; i++) {
|
||||||
if (!this.uGroupAllList[i].disabled) {
|
if (!this.uGroupAllList[i].disabled) {
|
||||||
allCheckList.push(this.uGroupAllList[i]);
|
allCheckList.push(this.uGroupAllList[i]);
|
||||||
@ -2431,7 +2441,7 @@ export default {
|
|||||||
ufaceDevIdChange(val) {
|
ufaceDevIdChange(val) {
|
||||||
let checkedCount = val.length;
|
let checkedCount = val.length;
|
||||||
let allCheckList = [];
|
let allCheckList = [];
|
||||||
console.log("---------55");
|
console.log(val,"---------55");
|
||||||
for (let i = 0; i < this.ufaceDevAllList.length; i++) {
|
for (let i = 0; i < this.ufaceDevAllList.length; i++) {
|
||||||
if (!this.ufaceDevAllList[i].disabled) {
|
if (!this.ufaceDevAllList[i].disabled) {
|
||||||
allCheckList.push(this.ufaceDevAllList[i]);
|
allCheckList.push(this.ufaceDevAllList[i]);
|
||||||
@ -2467,12 +2477,12 @@ export default {
|
|||||||
arr = res.result.devId.split(",");
|
arr = res.result.devId.split(",");
|
||||||
}
|
}
|
||||||
console.log(arr);
|
console.log(arr);
|
||||||
this.workerInfo.uGroupId = [];
|
this.workerInfo.ufaceDevGroupId = [];
|
||||||
this.uGroupNameList = [];
|
this.uGroupNameList = [];
|
||||||
let id = "";
|
let id = "";
|
||||||
console.log(this.workerInfo.uGroupId);
|
console.log(this.workerInfo.ufaceDevGroupId);
|
||||||
for (let i = 0; i < arr.length; i++) {
|
for (let i = 0; i < arr.length; i++) {
|
||||||
this.workerInfo.uGroupId.push(arr[i] + "");
|
this.workerInfo.ufaceDevGroupId.push(arr[i] + "");
|
||||||
id = arr[i];
|
id = arr[i];
|
||||||
for (let j = 0; j < this.uGroupAllList.length; j++) {
|
for (let j = 0; j < this.uGroupAllList.length; j++) {
|
||||||
console.log(this.uGroupAllList[j].id, id);
|
console.log(this.uGroupAllList[j].id, id);
|
||||||
@ -2559,7 +2569,7 @@ export default {
|
|||||||
if (this.workerInfo.ruleId == 0) {
|
if (this.workerInfo.ruleId == 0) {
|
||||||
this.workerInfo.ruleId = "";
|
this.workerInfo.ruleId = "";
|
||||||
}
|
}
|
||||||
|
this.ufaceDevNameList = [];
|
||||||
if (data.workerInfo.ufaceDevId) {
|
if (data.workerInfo.ufaceDevId) {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
if (data.workerInfo.ufaceDevId) {
|
if (data.workerInfo.ufaceDevId) {
|
||||||
@ -2586,7 +2596,6 @@ export default {
|
|||||||
// console.log("arr", arr);
|
// console.log("arr", arr);
|
||||||
// this.workerInfo.ufaceDevId = [];
|
// this.workerInfo.ufaceDevId = [];
|
||||||
this.workerInfo.ufaceDevId = arr;
|
this.workerInfo.ufaceDevId = arr;
|
||||||
this.ufaceDevNameList = [];
|
|
||||||
let id = "";
|
let id = "";
|
||||||
|
|
||||||
for (let i = 0; i < arr.length; i++) {
|
for (let i = 0; i < arr.length; i++) {
|
||||||
@ -2606,6 +2615,7 @@ export default {
|
|||||||
|
|
||||||
this.ufaceDevIdChange(this.workerInfo.ufaceDevId);
|
this.ufaceDevIdChange(this.workerInfo.ufaceDevId);
|
||||||
}
|
}
|
||||||
|
this.uGroupNameList = [];
|
||||||
if (data.workerInfo.ufaceDevGroupId) {
|
if (data.workerInfo.ufaceDevGroupId) {
|
||||||
console.log(123456789)
|
console.log(123456789)
|
||||||
let arr = [];
|
let arr = [];
|
||||||
@ -2613,8 +2623,7 @@ export default {
|
|||||||
arr = data.workerInfo.ufaceDevGroupId.split(",");
|
arr = data.workerInfo.ufaceDevGroupId.split(",");
|
||||||
}
|
}
|
||||||
console.log("arr", arr);
|
console.log("arr", arr);
|
||||||
this.workerInfo.uGroupId = arr;
|
this.workerInfo.ufaceDevGroupId = arr;
|
||||||
this.uGroupNameList = [];
|
|
||||||
let id = "";
|
let id = "";
|
||||||
|
|
||||||
for (let i = 0; i < arr.length; i++) {
|
for (let i = 0; i < arr.length; i++) {
|
||||||
@ -2627,7 +2636,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.uGroupIdChange(this.workerInfo.uGroupId);
|
this.uGroupIdChange(this.workerInfo.ufaceDevGroupId);
|
||||||
}
|
}
|
||||||
// console.log(this.workerInfo.ufaceDevId, this.ufaceDevNameList)
|
// console.log(this.workerInfo.ufaceDevId, this.ufaceDevNameList)
|
||||||
this.longTerm = this.workerInfo.longTerm == 1 ? true : false; //设置身份证有效期是否长期
|
this.longTerm = this.workerInfo.longTerm == 1 ? true : false; //设置身份证有效期是否长期
|
||||||
@ -2783,8 +2792,14 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
data.accountType = 1;
|
data.accountType = 1;
|
||||||
}
|
}
|
||||||
console.log(this.workerInfo.ufaceDevId);
|
console.log(this.workerInfo.ufaceDevId,123456);
|
||||||
data.ufaceDevId = this.workerInfo.ufaceDevId.join(",");
|
if(this.workerInfo.devType == 1){
|
||||||
|
data.ufaceDevId = this.workerInfo.ufaceDevId.join(",");
|
||||||
|
data.ufaceDevGroupId = "";
|
||||||
|
} else if(this.workerInfo.devType == 2){
|
||||||
|
data.ufaceDevGroupId = this.workerInfo.ufaceDevGroupId.join(",");
|
||||||
|
data.ufaceDevId = "";
|
||||||
|
}
|
||||||
delete data.addTime;
|
delete data.addTime;
|
||||||
if (data.ruleId == "") {
|
if (data.ruleId == "") {
|
||||||
data.ruleId = 0;
|
data.ruleId = 0;
|
||||||
@ -2801,6 +2816,8 @@ export default {
|
|||||||
this.$message.error(res.message);
|
this.$message.error(res.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.checkAllFaceDev = false;
|
||||||
|
this.checkAllGroup = false;
|
||||||
} else {
|
} else {
|
||||||
console.log("------------------3");
|
console.log("------------------3");
|
||||||
console.log(this.workerInfo.ufaceDevId);
|
console.log(this.workerInfo.ufaceDevId);
|
||||||
@ -2808,6 +2825,10 @@ export default {
|
|||||||
console.log("------------------5");
|
console.log("------------------5");
|
||||||
this.workerInfo.ufaceDevId = [];
|
this.workerInfo.ufaceDevId = [];
|
||||||
}
|
}
|
||||||
|
if (!this.workerInfo.ufaceDevGroupId) {
|
||||||
|
console.log("------------------5");
|
||||||
|
this.workerInfo.ufaceDevGroupId = [];
|
||||||
|
}
|
||||||
// console.log(this.workerInfo.ufaceDevId, '---1')
|
// console.log(this.workerInfo.ufaceDevId, '---1')
|
||||||
if (this.basicInfoStatus) {
|
if (this.basicInfoStatus) {
|
||||||
this.$message.warning(this.$t("message.laborMange.warningHint"));
|
this.$message.warning(this.$t("message.laborMange.warningHint"));
|
||||||
@ -2818,7 +2839,6 @@ export default {
|
|||||||
console.log("------------------4");
|
console.log("------------------4");
|
||||||
}
|
}
|
||||||
console.log(this.workerInfo);
|
console.log(this.workerInfo);
|
||||||
|
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -508,21 +508,26 @@
|
|||||||
@click.stop="addForm.idCardBigPhotoUrl = ''"
|
@click.stop="addForm.idCardBigPhotoUrl = ''"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="position">
|
<div class="position">
|
||||||
<img
|
<img
|
||||||
:src="$store.state.FILEURL+addForm.fieldAcquisitionUrl"
|
:src="$store.state.FILEURL+addForm.fieldAcquisitionUrl"
|
||||||
v-if="addForm.fieldAcquisitionUrl!=''"
|
v-if="addForm.fieldAcquisitionUrl!=''"
|
||||||
style="width:82px; height:97.5px; cursor: pointer;"
|
style="width: 100px; height: 119px; cursor: pointer"
|
||||||
|
@click="handlePreview(addForm.fieldAcquisitionUrl)"
|
||||||
|
/>
|
||||||
|
<img
|
||||||
|
v-else
|
||||||
|
:src="defaultImg"
|
||||||
|
style="width: 100%; height: auto; cursor: pointer"
|
||||||
/>
|
/>
|
||||||
<img v-else :src="defaultImg" style="width:82px; height:auto;cursor: pointer;" />
|
|
||||||
<img
|
<img
|
||||||
src="@/assets/images/shut_icon.png"
|
src="@/assets/images/shut_icon.png"
|
||||||
style="width:15px; height:auto"
|
style="width:16px; height:auto"
|
||||||
class="shut_icon"
|
class="shut_icon"
|
||||||
v-if="addForm.fieldAcquisitionUrl!=''"
|
v-if="addForm.fieldAcquisitionUrl!='' && operationType != 'detail'"
|
||||||
@click="addForm.fieldAcquisitionUrl=''"
|
@click="addForm.fieldAcquisitionUrl=''"
|
||||||
/>
|
/>
|
||||||
</div>-->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex5" style="margin: 5px 0">
|
<div class="flex5" style="margin: 5px 0">
|
||||||
<span>
|
<span>
|
||||||
@ -531,12 +536,12 @@
|
|||||||
{{ $t("message.laborMange.IdCardHead") }}
|
{{ $t("message.laborMange.IdCardHead") }}
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<!-- <span>
|
<span>
|
||||||
<span class="required">*</span>现场采集人脸
|
<span class="required">*</span>现场采集人脸
|
||||||
</span>-->
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex5" v-if="operationType != 'detail'">
|
<div class="flex5" v-if="operationType != 'detail'">
|
||||||
<el-upload
|
<!-- <el-upload
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
ref="upload"
|
ref="upload"
|
||||||
:action="$store.state.UPLOADURL"
|
:action="$store.state.UPLOADURL"
|
||||||
@ -550,7 +555,7 @@
|
|||||||
$t("message.laborMange.clickOnTheUpload")
|
$t("message.laborMange.clickOnTheUpload")
|
||||||
}}</el-button>
|
}}</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<!-- <el-upload
|
<el-upload
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
ref="upload"
|
ref="upload"
|
||||||
:action="$store.state.UPLOADURL"
|
:action="$store.state.UPLOADURL"
|
||||||
@ -560,7 +565,47 @@
|
|||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
>
|
>
|
||||||
<el-button slot="trigger" size="small" type="primary">点击上传</el-button>
|
<el-button slot="trigger" size="small" type="primary">点击上传</el-button>
|
||||||
</el-upload>-->
|
</el-upload> -->
|
||||||
|
<el-upload
|
||||||
|
action="uploadUrl"
|
||||||
|
:on-remove="(file) => handleTemporaryRemove(file, 3)"
|
||||||
|
:on-preview="(file) => handleTemporaryPreview(file, 3)"
|
||||||
|
:beforeUpload="(file) => handleBeforeUpload(file, 3)"
|
||||||
|
:show-file-list="false"
|
||||||
|
:file-list="idCardBigPhotoUrlFile"
|
||||||
|
list-type="picture"
|
||||||
|
:http-request="
|
||||||
|
(val) => handleTemporaryUpload(val, 'idCardAvatar')
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="medium"
|
||||||
|
style="padding: 9px 20px"
|
||||||
|
type="primary"
|
||||||
|
v-if="titleType != 'detail'"
|
||||||
|
>{{ $t("message.laborMange.clickOnTheUpload") }}</el-button
|
||||||
|
>
|
||||||
|
</el-upload>
|
||||||
|
<el-upload
|
||||||
|
action="uploadUrl"
|
||||||
|
:on-remove="(file) => handleTemporaryRemove(file, 4)"
|
||||||
|
:on-preview="(file) => handleTemporaryPreview(file, 4)"
|
||||||
|
:beforeUpload="(file) => handleBeforeUpload(file, 4)"
|
||||||
|
list-type="picture"
|
||||||
|
:show-file-list="false"
|
||||||
|
:file-list="fieldAcquisitionUrlFile"
|
||||||
|
:http-request="
|
||||||
|
(val) => handleTemporaryUpload(val, 'livesFace')
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="medium"
|
||||||
|
style="padding: 9px 20px"
|
||||||
|
type="primary"
|
||||||
|
v-if="titleType != 'detail'"
|
||||||
|
>{{ $t("message.laborMange.clickOnTheUpload") }}</el-button
|
||||||
|
>
|
||||||
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<div class="titleStyle flex">
|
<div class="titleStyle flex">
|
||||||
@ -612,6 +657,45 @@
|
|||||||
<img width="auto" height="auto" :src="bigImageUrl" alt />
|
<img width="auto" height="auto" :src="bigImageUrl" alt />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 图片裁剪弹框 -->
|
||||||
|
<el-dialog
|
||||||
|
:modal-append-to-body="false"
|
||||||
|
:title="
|
||||||
|
$t('message.personnelPosition.mapManage.dialog_KJNova_Clipper.title')
|
||||||
|
"
|
||||||
|
:visible.sync="cropperDialog"
|
||||||
|
width="767px"
|
||||||
|
>
|
||||||
|
<div class="dialog_content" style="height: 400px">
|
||||||
|
<!-- <vue-scroll> -->
|
||||||
|
<vueCropper
|
||||||
|
ref="cropper"
|
||||||
|
:img="cropperOption.img"
|
||||||
|
:outputType="cropperOption.outputType"
|
||||||
|
:autoCropWidth="cropperOption.autoCropWidth"
|
||||||
|
:autoCropHeight="cropperOption.autoCropHeight"
|
||||||
|
:autoCrop="true"
|
||||||
|
:fixedBox="true"
|
||||||
|
></vueCropper>
|
||||||
|
<!-- </vue-scroll> -->
|
||||||
|
</div>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button
|
||||||
|
class="cancleBtn"
|
||||||
|
@click="cropperDialog = false"
|
||||||
|
icon="el-icon-circle-close"
|
||||||
|
size="medium"
|
||||||
|
>{{ $t("message.personnelPosition.cancel") }}
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-circle-check"
|
||||||
|
@click="saveMapUrlFn"
|
||||||
|
size="medium"
|
||||||
|
>{{ $t("message.personnelPosition.determine") }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -625,13 +709,27 @@ import {
|
|||||||
import {
|
import {
|
||||||
IdentityCodeValid
|
IdentityCodeValid
|
||||||
} from '@/assets/js/util.js'
|
} from '@/assets/js/util.js'
|
||||||
|
import { VueCropper } from "vue-cropper";
|
||||||
|
import { apiUploadImage } from "@/assets/js/api/common";
|
||||||
|
import lrz from "lrz";
|
||||||
export default {
|
export default {
|
||||||
name: "temporary",
|
name: "temporary",
|
||||||
components: {
|
components: {
|
||||||
scroll,
|
scroll,
|
||||||
|
VueCropper
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
//显示的文件列表
|
||||||
|
fieldAcquisitionUrlFile: [],
|
||||||
|
idCardBigPhotoUrlFile: [],
|
||||||
|
cropperOption: {
|
||||||
|
outputType: "png",
|
||||||
|
img: "",
|
||||||
|
autoCropWidth: 300, // 默认生成截图框宽度
|
||||||
|
autoCropHeight: 360, // 默认生成截图框高度
|
||||||
|
},
|
||||||
|
cropperDialog: false,
|
||||||
COMPANY: COMPANY,
|
COMPANY: COMPANY,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
page: 1,
|
page: 1,
|
||||||
@ -652,7 +750,7 @@ export default {
|
|||||||
nation: "",
|
nation: "",
|
||||||
issuingAuthorityForIdcard: "",
|
issuingAuthorityForIdcard: "",
|
||||||
idCardBigPhotoUrl: "",
|
idCardBigPhotoUrl: "",
|
||||||
// fieldAcquisitionUrl: "",
|
fieldAcquisitionUrl: "",
|
||||||
idCardEndDate: "",
|
idCardEndDate: "",
|
||||||
nativePlace: "",
|
nativePlace: "",
|
||||||
birthday: "",
|
birthday: "",
|
||||||
@ -708,6 +806,185 @@ export default {
|
|||||||
this.getInfoList();
|
this.getInfoList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 人员照片库比对
|
||||||
|
checkImgLibrary(url) {
|
||||||
|
console.log(url);
|
||||||
|
checkImgLibraryApi({ fileUrl: url, projectSn: this.projectSn }).then(
|
||||||
|
(res) => {
|
||||||
|
if (res.result && res.result.length > 0) {
|
||||||
|
this.imgRadiolist = res.result;
|
||||||
|
this.radio = res.result[0].personSerial;
|
||||||
|
this.showImgList = true;
|
||||||
|
this.cropperDialog = false;
|
||||||
|
} else {
|
||||||
|
if (this.temporaryDialog1 || this.temporaryDialog2) {
|
||||||
|
this.personForm.personSerial = "";
|
||||||
|
this.personForm.fieldAcquisitionUrl = url;
|
||||||
|
this.fieldAcquisitionFile = [{ name: "", url: url }];
|
||||||
|
this.cropperDialog = false;
|
||||||
|
} else {
|
||||||
|
this.addForm.personSerial = "";
|
||||||
|
this.addForm.fieldAcquisitionUrl = url;
|
||||||
|
this.fieldAcquisitionFile = [{ name: "", url: url }];
|
||||||
|
this.cropperDialog = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(res, "-----人员库照片查询");
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
//人脸监测、
|
||||||
|
checkFace(url) {
|
||||||
|
checkFaceApi({ fileUrl: url }).then((res) => {
|
||||||
|
if (res.result.checkType == 1) {
|
||||||
|
if (this.temporaryDialog1 || this.temporaryDialog2) {
|
||||||
|
this.personForm.fieldAcquisitionUrl = url;
|
||||||
|
this.fieldAcquisitionFile = [{ name: "", url: url }];
|
||||||
|
this.cropperDialog = false;
|
||||||
|
} else {
|
||||||
|
this.addForm.fieldAcquisitionUrl = url;
|
||||||
|
this.fieldAcquisitionFile = [{ name: "", url: url }];
|
||||||
|
this.cropperDialog = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.result.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//保存截图
|
||||||
|
saveMapUrlFn() {
|
||||||
|
this.$refs.cropper.startCrop();
|
||||||
|
var _this = this;
|
||||||
|
this.$refs.cropper.getCropBlob((data) => {
|
||||||
|
const isLt2M = data.size / 1024 < 500;
|
||||||
|
if (!isLt2M) {
|
||||||
|
this.$message.error(this.$t("message.laborMange.hint9"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var param = new FormData();
|
||||||
|
param.append("files", data, "image.png");
|
||||||
|
_this.$http
|
||||||
|
.post("/upload/image", param, {
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "multipart/form-data",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log("aaaaa", res);
|
||||||
|
if (res.data.status == "SUCCESS") {
|
||||||
|
if (this.isSzProject == 1) {
|
||||||
|
this.checkImgLibrary(res.data.data[0].imageUrl);
|
||||||
|
} else {
|
||||||
|
this.checkFace(res.data.data[0].imageUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleTemporaryUpload(fileData, type) {
|
||||||
|
console.log(fileData, 111222);
|
||||||
|
const file = fileData.file;
|
||||||
|
// 压缩图片
|
||||||
|
lrz(file, { quality: 1 }).then((result) => {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append("files", result.file);
|
||||||
|
// 图片上传
|
||||||
|
apiUploadImage(formData).then((res) => {
|
||||||
|
if (res.code == 200 || res.status == "SUCCESS") {
|
||||||
|
const imgInfo = res.data[0];
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
case "idCardAvatar": // 身份证头像
|
||||||
|
this.addForm.idCardBigPhotoUrl = imgInfo.imageUrl;
|
||||||
|
this.idCardUpPhotoFile = [
|
||||||
|
{ name: imgInfo.filename, url: imgInfo.imageUrl },
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case "livesFace": // 现场采集人脸
|
||||||
|
this.cropperOption.img =
|
||||||
|
this.$store.state.FILEURL + imgInfo.imageUrl;
|
||||||
|
this.cropperDialog = true;
|
||||||
|
// let imgStatus = result.file.size / 1024 < 500
|
||||||
|
// if (!imgStatus) {
|
||||||
|
// this.cropperOption.img =
|
||||||
|
// this.$store.state.FILEURL + imgInfo.imageUrl
|
||||||
|
// this.cropperDialog = true
|
||||||
|
// } else {
|
||||||
|
// if (this.isSzProject == 1) {
|
||||||
|
// this.checkImgLibrary(imgInfo.imageUrl)
|
||||||
|
// } else {
|
||||||
|
// this.checkFace(imgInfo.imageUrl)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 文件上传 之前
|
||||||
|
handleBeforeUpload(file, type) {
|
||||||
|
if (
|
||||||
|
file.type != "image/jpeg" &&
|
||||||
|
file.type != "image/png" &&
|
||||||
|
file.type != "image/jpg" &&
|
||||||
|
file.type != "image/bmp"
|
||||||
|
) {
|
||||||
|
this.$message.error(this.$t("message.companyDiagram.uploadMsg")); //只能上传图片
|
||||||
|
return false;
|
||||||
|
} else if (type == 7) {
|
||||||
|
if (
|
||||||
|
file.type != "image/jpeg" &&
|
||||||
|
file.type != "image/jpg"
|
||||||
|
// file.type != "image/png"
|
||||||
|
) {
|
||||||
|
this.$message.error(this.$t("message.laborMange.hint8")); //"请上传jpg、jpeg格式图片"
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
//查看图片
|
||||||
|
handleTemporaryPreview(file, type) {
|
||||||
|
if (type === 0) {
|
||||||
|
this.bigImageDialog = true;
|
||||||
|
this.bigImageUrl = file;
|
||||||
|
} else {
|
||||||
|
// 新增企业 type == 1 资质照片; 2 logo;
|
||||||
|
// 人员录入 type == 3 体检报告; 4 合同附件; 5 从业资格证书; 6 身份证头像; 7 现场采集人脸;
|
||||||
|
let fileType = null;
|
||||||
|
if (file.response) {
|
||||||
|
let url = file.response.data[0];
|
||||||
|
fileType = url.imageUrl.split(".")[1];
|
||||||
|
} else {
|
||||||
|
fileType = file.url.split(".")[1];
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
fileType != "jpg" &&
|
||||||
|
fileType != "jpeg" &&
|
||||||
|
fileType != "png" &&
|
||||||
|
fileType != "bmp" &&
|
||||||
|
fileType != "gif"
|
||||||
|
) {
|
||||||
|
window.open(this.fileUrl + file.url);
|
||||||
|
//type== 0 直接查看列表中的图片
|
||||||
|
} else {
|
||||||
|
this.bigImageDialog = true;
|
||||||
|
this.bigImageUrl = file.response
|
||||||
|
? this.fileUrl + file.response.data[0].imageUrl
|
||||||
|
: this.fileUrl + file.url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleTemporaryRemove() {
|
||||||
|
if (file.status == "ready") {
|
||||||
|
} else {
|
||||||
|
this.$message.success(this.$t("message.laborMange.deleteSuccess"));
|
||||||
|
if (type == 1) {
|
||||||
|
this.addForm.fieldAcquisitionUrl = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
// 输入框输入后触发(输入身份证号码,自动产生出生日期)
|
// 输入框输入后触发(输入身份证号码,自动产生出生日期)
|
||||||
handleIdCardInput(idCard) {
|
handleIdCardInput(idCard) {
|
||||||
// console.log('身份证输入',idCard)
|
// console.log('身份证输入',idCard)
|
||||||
@ -815,7 +1092,7 @@ export default {
|
|||||||
nation: "",
|
nation: "",
|
||||||
issuingAuthorityForIdcard: "",
|
issuingAuthorityForIdcard: "",
|
||||||
idCardBigPhotoUrl: "",
|
idCardBigPhotoUrl: "",
|
||||||
// fieldAcquisitionUrl: "",
|
fieldAcquisitionUrl: "",
|
||||||
idCardEndDate: "",
|
idCardEndDate: "",
|
||||||
nativePlace: "",
|
nativePlace: "",
|
||||||
birthday: "",
|
birthday: "",
|
||||||
@ -826,12 +1103,12 @@ export default {
|
|||||||
|
|
||||||
//人员录入 提交
|
//人员录入 提交
|
||||||
submitForm(formName) {
|
submitForm(formName) {
|
||||||
// if (this.addForm.idCardBigPhotoUrl == "") {
|
if (this.addForm.idCardBigPhotoUrl == "") {
|
||||||
// this.$message.error(
|
this.$message.error(
|
||||||
// this.$t("message.laborMange.pleaseUploadYourIDPhoto")
|
this.$t("message.laborMange.pleaseUploadYourIDPhoto")
|
||||||
// );
|
);
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
//身份证校验
|
//身份证校验
|
||||||
if (!IdentityCodeValid(this.addForm.idCard)) {
|
if (!IdentityCodeValid(this.addForm.idCard)) {
|
||||||
this.$message.error(this.$t('message.laborMange.correctCellIdCard'))
|
this.$message.error(this.$t('message.laborMange.correctCellIdCard'))
|
||||||
@ -846,6 +1123,7 @@ export default {
|
|||||||
this.resetForm(formName);
|
this.resetForm(formName);
|
||||||
this.temporaryDialog = false;
|
this.temporaryDialog = false;
|
||||||
this.addForm.idCardBigPhotoUrl = "";
|
this.addForm.idCardBigPhotoUrl = "";
|
||||||
|
this.addForm.fieldAcquisitionUrl = "";
|
||||||
this.getInfoList();
|
this.getInfoList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -856,6 +1134,7 @@ export default {
|
|||||||
this.resetForm(formName);
|
this.resetForm(formName);
|
||||||
this.temporaryDialog = false;
|
this.temporaryDialog = false;
|
||||||
this.addForm.idCardBigPhotoUrl = "";
|
this.addForm.idCardBigPhotoUrl = "";
|
||||||
|
this.addForm.fieldAcquisitionUrl = "";
|
||||||
this.getInfoList();
|
this.getInfoList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -954,7 +1233,7 @@ export default {
|
|||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
this.addForm.idCardBigPhotoUrl = file.data[0].imageUrl;
|
this.addForm.idCardBigPhotoUrl = file.data[0].imageUrl;
|
||||||
} else {
|
} else {
|
||||||
// this.addForm.fieldAcquisitionUrl = file.data[0].imageUrl;
|
this.addForm.fieldAcquisitionUrl = file.data[0].imageUrl;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//下载高拍仪插件
|
//下载高拍仪插件
|
||||||
@ -1073,7 +1352,7 @@ export default {
|
|||||||
.flex5 {
|
.flex5 {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: space-around;
|
||||||
}
|
}
|
||||||
.temporary {
|
.temporary {
|
||||||
// width: 100%;
|
// width: 100%;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user