fix: BUG修改
This commit is contained in:
parent
fe59365a5b
commit
0ed4895a2b
@ -22,6 +22,7 @@ export const updateWorkerTeam = data => post('xmgl/workerInfo/updateWorkerTeam',
|
||||
export const deleteWorkerInfo = data => post('xmgl/workerInfo/delete', data); //删除 人员 信息
|
||||
export const sendBatchWokerApi = data => post('xmgl/ufaceDev/sendBatchWokerDev', data); // 下发通行人员
|
||||
export const pullMemberDataApi = data => post('xmgl/hikvision/getDoorEvents', data); // 拉取人员通行数据
|
||||
export const importImgDataApi = data => post('xmgl/workerInfo/uploadWorkerInfoImgs', data); // 导入照片数据
|
||||
|
||||
//详情
|
||||
export const getWorkerInfoData = data => post('xmgl/workerInfo/viewWorkerInfoDetail', data); //获取 人员 详细所有信息
|
||||
|
||||
@ -83,9 +83,9 @@ if (process.env.NODE_ENV == 'development') {
|
||||
// axios.defaults.baseURL ='http://huli.zjzhiliao.com/jxjgdapi/' //金林湾测试线上
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45001/' //上海张江
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45011/' //上海优益(上海建工)
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28888/' //郭圣雄本地
|
||||
axios.defaults.baseURL = 'http://192.168.34.221:28888/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28889/' //郭圣雄本地
|
||||
axios.defaults.baseURL ='http://192.168.34.221:9111/' //郭圣雄本地
|
||||
// axios.defaults.baseURL ='http://192.168.34.221:9111/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
|
||||
// axios.defaults.baseURL = 'http://182.90.224.237:51234' //郭圣雄远程
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈
|
||||
|
||||
@ -533,13 +533,19 @@
|
||||
<div class="import-operation">
|
||||
<span>导入文件:</span>
|
||||
<div>
|
||||
<!-- :action="
|
||||
$http.defaults.baseURL + 'xmgl/workerInfo/uploadWorkerInfoImgs'
|
||||
" -->
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
drag
|
||||
:action="
|
||||
$http.defaults.baseURL + 'xmgl/workerInfo/uploadExcelWorkerInfo'
|
||||
"
|
||||
multiple
|
||||
name="files"
|
||||
:action="$store.state.UPLOADURL"
|
||||
:multiple="false"
|
||||
:on-exceed="handleExceed"
|
||||
:on-success="handleImportSuccess"
|
||||
:file-list="imgFileList"
|
||||
accept=".zip"
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">
|
||||
@ -548,7 +554,10 @@
|
||||
</el-upload>
|
||||
</div>
|
||||
</div>
|
||||
<div class="upload-tip">
|
||||
<div
|
||||
class="upload-tip"
|
||||
:style="{ 'margin-top': imgFileList.length > 0 ? '40px' : '5px' }"
|
||||
>
|
||||
支持导入200MB以内的ZIP文件,建议文件中包含照片的数量在1000张以内;
|
||||
照片命名规则为姓名_证件号码jpg,需露出眉毛和眼睛;单张照片文件大小10
|
||||
KB~200 KB。
|
||||
@ -567,7 +576,7 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-circle-check"
|
||||
@click="saveEnterpriseFn('enterpriseForm')"
|
||||
@click="saveImportFn()"
|
||||
size="medium"
|
||||
>导入</el-button
|
||||
>
|
||||
@ -2091,6 +2100,7 @@ import {
|
||||
checkImgLibraryApi,
|
||||
updateByIdWorkerInfo,
|
||||
sendBatchWokerApi,
|
||||
importImgDataApi,
|
||||
} from "@/assets/js/api/laborPerson";
|
||||
import {
|
||||
selectUserDevAuthorityByUserIdApi,
|
||||
@ -2154,7 +2164,7 @@ export default {
|
||||
enterpriseFormRules: this.$t("message.laborMange.enterpriseFormRules"),
|
||||
//民族
|
||||
nationList: this.$t("message.laborMange.nationList"),
|
||||
|
||||
imgFileList: [], // 照片文件列表
|
||||
aptitudeFileList: [], //资质照片列表
|
||||
logoFileList: [], //logo 文件列表
|
||||
enterpriseTypeList: [], //新增企业 企业类型下拉
|
||||
@ -2334,6 +2344,21 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleImportSuccess(response, file, fileList) {
|
||||
console.log(response, file, fileList);
|
||||
this.imgFileList = fileList;
|
||||
console.log(this.imgFileList);
|
||||
},
|
||||
handleExceed(files, fileList) {
|
||||
/*this.$message.warning(
|
||||
`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
|
||||
files.length + fileList.length
|
||||
} 个文件`
|
||||
);*/
|
||||
this.$message.warning(
|
||||
this.$t("message.docManage.dialog_upload_files.limitingChoice")
|
||||
); //当前限制选择 1 个文件
|
||||
},
|
||||
handleUpload(fileData, type) {
|
||||
const file = fileData.file;
|
||||
// 压缩图片
|
||||
@ -2701,6 +2726,23 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 导入照片数据
|
||||
saveImportFn() {
|
||||
if (this.imgFileList.length == 0) {
|
||||
this.$message.success("请先导入文件");
|
||||
return;
|
||||
}
|
||||
let data = new FormData(); //new出来的对象
|
||||
data.append("file", this.imgFileList[0].raw);
|
||||
data.append("projectSn", this.$store.state.projectSn);
|
||||
importImgDataApi(data).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success("操作成功");
|
||||
this.imgImportDialog = false;
|
||||
this.getTableData();
|
||||
}
|
||||
});
|
||||
},
|
||||
//新增企业 保存
|
||||
saveEnterpriseFn(formName) {
|
||||
// if (!checkPhone(this.enterpriseForm.legalPersonTel)) {
|
||||
@ -4295,8 +4337,8 @@ export default {
|
||||
padding: 0;
|
||||
}
|
||||
// 照片导入
|
||||
.importImgDialog{
|
||||
/deep/.el-dialog__body{
|
||||
.importImgDialog {
|
||||
/deep/.el-dialog__body {
|
||||
padding: 15px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user