fix: BUG修改
This commit is contained in:
parent
2f8967a956
commit
d6d2c337be
@ -3395,6 +3395,7 @@ export default {
|
|||||||
projectSn: this.$store.state.projectSn,
|
projectSn: this.$store.state.projectSn,
|
||||||
workerId: this.userId,
|
workerId: this.userId,
|
||||||
state: "",
|
state: "",
|
||||||
|
photoUrl: "",
|
||||||
fileList: [],
|
fileList: [],
|
||||||
insuranceState: true,
|
insuranceState: true,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1933,14 +1933,14 @@
|
|||||||
v-if="scope.row.insuranceState"
|
v-if="scope.row.insuranceState"
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
:action="uploadUrl"
|
:action="uploadUrl"
|
||||||
:on-preview="(file) => handlePreview(file, 6)"
|
:on-preview="(file) => handlePreview(file, 7)"
|
||||||
:on-remove="
|
:on-remove="
|
||||||
(file) =>
|
(file) =>
|
||||||
handleRemove({ file: file, index: scope.$index }, 6)
|
handleRemove({ file: file, index: scope.$index }, 7)
|
||||||
"
|
"
|
||||||
:on-success="
|
:on-success="
|
||||||
(file) =>
|
(file) =>
|
||||||
handleSuccess({ file: file, index: scope.$index }, 6)
|
handleSuccess({ file: file, index: scope.$index }, 7)
|
||||||
"
|
"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
name="files"
|
name="files"
|
||||||
@ -1954,7 +1954,7 @@
|
|||||||
v-else
|
v-else
|
||||||
v-for="(item, index) in scope.row.fileList"
|
v-for="(item, index) in scope.row.fileList"
|
||||||
@click="
|
@click="
|
||||||
handlePreview({ url: item.url }, { name: item.name }, 6)
|
handlePreview({ url: item.url }, { name: item.name }, 7)
|
||||||
"
|
"
|
||||||
:key="index"
|
:key="index"
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
@ -2869,6 +2869,12 @@ export default {
|
|||||||
data.workerInfo.insuranceInfo = JSON.parse(data.workerInfo.insuranceInfo)
|
data.workerInfo.insuranceInfo = JSON.parse(data.workerInfo.insuranceInfo)
|
||||||
data.workerInfo.insuranceInfo.forEach((item) => {
|
data.workerInfo.insuranceInfo.forEach((item) => {
|
||||||
item.insuranceState = false; //设置可编辑状态
|
item.insuranceState = false; //设置可编辑状态
|
||||||
|
if (item.photoUrl) {
|
||||||
|
let arr = item.photoUrl.split("*");
|
||||||
|
item.fileList = [{ name: arr[0], url: arr[1] }];
|
||||||
|
} else {
|
||||||
|
item.fileList = [];
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.insuranceList = data.workerInfo.insuranceInfo; //保险
|
this.insuranceList = data.workerInfo.insuranceInfo; //保险
|
||||||
}
|
}
|
||||||
@ -3111,6 +3117,14 @@ export default {
|
|||||||
file.file.data[0].fileInfo.originalFilename + "*" + file.file.data[0].imageUrl;
|
file.file.data[0].fileInfo.originalFilename + "*" + file.file.data[0].imageUrl;
|
||||||
} else if (type == 6) {
|
} else if (type == 6) {
|
||||||
this.workerInfo.idCardBigPhotoUrl = file.data[0].imageUrl;
|
this.workerInfo.idCardBigPhotoUrl = file.data[0].imageUrl;
|
||||||
|
} else if(type == 7){
|
||||||
|
let data = {
|
||||||
|
name: file.file.data[0].fileInfo.originalFilename,
|
||||||
|
url: file.file.data[0].imageUrl,
|
||||||
|
};
|
||||||
|
this.insuranceList[file.index].fileList = [data];
|
||||||
|
this.insuranceList[file.index].photoUrl =
|
||||||
|
file.file.data[0].fileInfo.originalFilename + "*" + file.file.data[0].imageUrl;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 人员照片库比对
|
// 人员照片库比对
|
||||||
@ -3310,6 +3324,9 @@ export default {
|
|||||||
} else if (type == 5) {
|
} else if (type == 5) {
|
||||||
this.certificateList[file.index].fileList = [];
|
this.certificateList[file.index].fileList = [];
|
||||||
this.certificateList[file.index].photoUrl = "";
|
this.certificateList[file.index].photoUrl = "";
|
||||||
|
} else if (type == 7) {
|
||||||
|
this.insuranceList[file.index].fileList = [];
|
||||||
|
this.insuranceList[file.index].photoUrl = "";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -3464,6 +3481,8 @@ export default {
|
|||||||
projectSn: this.$store.state.projectSn,
|
projectSn: this.$store.state.projectSn,
|
||||||
workerId: this.userId,
|
workerId: this.userId,
|
||||||
state: "",
|
state: "",
|
||||||
|
photoUrl: "",
|
||||||
|
fileList: [],
|
||||||
insuranceState: true,
|
insuranceState: true,
|
||||||
};
|
};
|
||||||
this.insuranceList.push(data);
|
this.insuranceList.push(data);
|
||||||
@ -3517,6 +3536,17 @@ export default {
|
|||||||
if (this.isNew == true) {
|
if (this.isNew == true) {
|
||||||
this.insuranceList.splice(index, 1)
|
this.insuranceList.splice(index, 1)
|
||||||
} else {
|
} else {
|
||||||
|
if (data.workerInfo.insuranceList) {
|
||||||
|
JSON.parse(data.workerInfo.insuranceList).forEach((item) => {
|
||||||
|
item.insuranceState = false; //设置可编辑状态
|
||||||
|
if (item.photoUrl) {
|
||||||
|
let arr = item.photoUrl.split("*");
|
||||||
|
item.fileList = [{ name: arr[0], url: arr[1] }];
|
||||||
|
} else {
|
||||||
|
item.fileList = [];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
this.insuranceList[index].insuranceState = false;
|
this.insuranceList[index].insuranceState = false;
|
||||||
}
|
}
|
||||||
} else if (type == 4) {
|
} else if (type == 4) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user