bug修复
This commit is contained in:
parent
aff59d97be
commit
c8357b81bf
|
|
@ -576,56 +576,62 @@ export default {
|
||||||
this.uploadData = []
|
this.uploadData = []
|
||||||
for (let i = 0; i < jsonData.length; i++) {
|
for (let i = 0; i < jsonData.length; i++) {
|
||||||
if (
|
if (
|
||||||
StrUtil.isBlank(jsonData[i][1]) ||
|
jsonData[i].length > 0 &&
|
||||||
StrUtil.isBlank(jsonData[i][2]) ||
|
(StrUtil.isBlank(jsonData[i][1]) ||
|
||||||
StrUtil.isBlank(jsonData[i][3]) ||
|
StrUtil.isBlank(jsonData[i][2]) ||
|
||||||
StrUtil.isBlank(jsonData[i][4]) ||
|
StrUtil.isBlank(jsonData[i][3]) ||
|
||||||
StrUtil.isBlank(jsonData[i][5])
|
StrUtil.isBlank(jsonData[i][4]) ||
|
||||||
|
StrUtil.isBlank(jsonData[i][5]))
|
||||||
) {
|
) {
|
||||||
this.errorLine.push(jsonData[i][0])
|
this.errorLine.push(jsonData[i][0])
|
||||||
} else {
|
} else {
|
||||||
const answers = jsonData[i][3].split('|@|')
|
if (jsonData[i].length > 0) {
|
||||||
const questionOptionArr = jsonData[i][2].split('|@|')
|
const answers = jsonData[i][3].split('|@|')
|
||||||
mappedAnswers = answers.map(answer => {
|
const questionOptionArr = jsonData[i][2].split('|@|')
|
||||||
return answer
|
mappedAnswers = answers.map(answer => {
|
||||||
.split('.')
|
return answer
|
||||||
.map(letter => letter.charCodeAt(0) - 65)
|
.split('.')
|
||||||
.join('.')
|
.map(letter => letter.charCodeAt(0) - 65)
|
||||||
})
|
.join('.')
|
||||||
for (let j = 0; j < mappedAnswers.length; j++) {
|
})
|
||||||
if (mappedAnswers[j] >= questionOptionArr.length) {
|
for (let j = 0; j < mappedAnswers.length; j++) {
|
||||||
if (i !== 0) {
|
if (mappedAnswers[j] >= questionOptionArr.length) {
|
||||||
this.errorCorrectAnswers.push(jsonData[i][0])
|
if (i !== 0) {
|
||||||
|
this.errorCorrectAnswers.push(jsonData[i][0])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const rowData = {
|
|
||||||
questionId: jsonData[i][0],
|
if (jsonData[i].length > 0) {
|
||||||
content: jsonData[i][1],
|
const rowData = {
|
||||||
questionAnswerVoList: jsonData[i][2],
|
questionId: jsonData[i][0],
|
||||||
correctAnswer: jsonData[i][3],
|
content: jsonData[i][1],
|
||||||
analysis: jsonData[i][4],
|
questionAnswerVoList: jsonData[i][2],
|
||||||
questionType: jsonData[i][5],
|
correctAnswer: jsonData[i][3],
|
||||||
|
analysis: jsonData[i][4],
|
||||||
|
questionType: jsonData[i][5],
|
||||||
|
}
|
||||||
|
this.excelData.push(rowData)
|
||||||
|
const rowDatas = {
|
||||||
|
questionId: jsonData[i][0],
|
||||||
|
content: jsonData[i][1],
|
||||||
|
questionAnswerVoList: [],
|
||||||
|
correctAnswer: mappedAnswers.join(','),
|
||||||
|
analysis: jsonData[i][4],
|
||||||
|
questionType: this.questionType[jsonData[i][5]],
|
||||||
|
}
|
||||||
|
let arr = jsonData[i][2].split('|@|')
|
||||||
|
console.log('arr', arr)
|
||||||
|
for (let j = 0; j < arr.length; j++) {
|
||||||
|
rowDatas.questionAnswerVoList.push({
|
||||||
|
options: arr[j],
|
||||||
|
sort: j,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.uploadData.push(rowDatas)
|
||||||
}
|
}
|
||||||
this.excelData.push(rowData)
|
|
||||||
const rowDatas = {
|
|
||||||
questionId: jsonData[i][0],
|
|
||||||
content: jsonData[i][1],
|
|
||||||
questionAnswerVoList: [],
|
|
||||||
correctAnswer: mappedAnswers.join(','),
|
|
||||||
analysis: jsonData[i][4],
|
|
||||||
questionType: this.questionType[jsonData[i][5]],
|
|
||||||
}
|
|
||||||
let arr = jsonData[i][2].split('|@|')
|
|
||||||
console.log('arr', arr)
|
|
||||||
for (let j = 0; j < arr.length; j++) {
|
|
||||||
rowDatas.questionAnswerVoList.push({
|
|
||||||
options: arr[j],
|
|
||||||
sort: j,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.uploadData.push(rowDatas)
|
|
||||||
}
|
}
|
||||||
console.log('excelData:', this.excelData)
|
console.log('excelData:', this.excelData)
|
||||||
if (this.excelData.length > 999) {
|
if (this.excelData.length > 999) {
|
||||||
|
|
|
||||||
|
|
@ -892,46 +892,54 @@ export default {
|
||||||
this.errorLine = []
|
this.errorLine = []
|
||||||
let uuid = StrUtil.generateSimpleUUID()
|
let uuid = StrUtil.generateSimpleUUID()
|
||||||
for (let i = 0; i < jsonData.length; i++) {
|
for (let i = 0; i < jsonData.length; i++) {
|
||||||
|
console.log('jsonData', jsonData)
|
||||||
if (
|
if (
|
||||||
StrUtil.isBlank(jsonData[i][1]) ||
|
jsonData[i].length > 0 &&
|
||||||
StrUtil.isBlank(jsonData[i][2]) ||
|
(StrUtil.isBlank(jsonData[i][1]) ||
|
||||||
StrUtil.isBlank(jsonData[i][3]) ||
|
StrUtil.isBlank(jsonData[i][2]) ||
|
||||||
StrUtil.isBlank(jsonData[i][4]) ||
|
StrUtil.isBlank(jsonData[i][3]) ||
|
||||||
StrUtil.isBlank(jsonData[i][5]) ||
|
StrUtil.isBlank(jsonData[i][4]) ||
|
||||||
StrUtil.isBlank(jsonData[i][6]) ||
|
StrUtil.isBlank(jsonData[i][5]) ||
|
||||||
StrUtil.isBlank(jsonData[i][7]) ||
|
StrUtil.isBlank(jsonData[i][6]) ||
|
||||||
StrUtil.isBlank(jsonData[i][8]) ||
|
StrUtil.isBlank(jsonData[i][7]) ||
|
||||||
StrUtil.isBlank(jsonData[i][9]) ||
|
StrUtil.isBlank(jsonData[i][8]) ||
|
||||||
StrUtil.isBlank(jsonData[i][10])
|
StrUtil.isBlank(jsonData[i][9]) ||
|
||||||
|
StrUtil.isBlank(jsonData[i][10]))
|
||||||
) {
|
) {
|
||||||
this.errorLine.push(jsonData[i][0])
|
this.errorLine.push(jsonData[i][0])
|
||||||
|
|
||||||
|
console.log('this.errorLine', this.errorLine)
|
||||||
} else {
|
} else {
|
||||||
if (jsonData[i][10] === '特殊工种' && StrUtil.isBlank(jsonData[i][11])) {
|
if (jsonData[i].length > 0 && jsonData[i][10] === '特殊工种' && StrUtil.isBlank(jsonData[i][11])) {
|
||||||
this.errorLine.push(jsonData[i][0])
|
this.errorLine.push(jsonData[i][0])
|
||||||
|
console.log('this.errorLine', this.errorLine)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const rowData = {
|
|
||||||
arg0: jsonData[i][0],
|
if (jsonData[i].length > 0) {
|
||||||
arg1: jsonData[i][1],
|
const rowData = {
|
||||||
arg2: jsonData[i][2],
|
arg0: jsonData[i][0],
|
||||||
arg3: jsonData[i][3],
|
arg1: jsonData[i][1],
|
||||||
arg4: jsonData[i][4],
|
arg2: jsonData[i][2],
|
||||||
arg5: jsonData[i][5],
|
arg3: jsonData[i][3],
|
||||||
arg6: jsonData[i][6],
|
arg4: jsonData[i][4],
|
||||||
arg7: jsonData[i][7],
|
arg5: jsonData[i][5],
|
||||||
arg8: jsonData[i][8],
|
arg6: jsonData[i][6],
|
||||||
arg9: jsonData[i][9],
|
arg7: jsonData[i][7],
|
||||||
arg10: jsonData[i][10],
|
arg8: jsonData[i][8],
|
||||||
arg11: jsonData[i][11],
|
arg9: jsonData[i][9],
|
||||||
uuid: uuid,
|
arg10: jsonData[i][10],
|
||||||
personType: jsonData[i][10] === '特殊工种' ? '1' : jsonData[i][10] === '普通职工' ? '2' : '0',
|
arg11: jsonData[i][11],
|
||||||
sex: jsonData[i][2] === '男' ? '0' : '1',
|
uuid: uuid,
|
||||||
|
personType: jsonData[i][10] === '特殊工种' ? '1' : jsonData[i][10] === '普通职工' ? '2' : '0',
|
||||||
|
sex: jsonData[i][2] === '男' ? '0' : '1',
|
||||||
|
}
|
||||||
|
const isDuplicate = this.excelData.some(item => item.arg4 === rowData.arg4)
|
||||||
|
if (isDuplicate) {
|
||||||
|
this.errorPhone.push(rowData.arg4)
|
||||||
|
}
|
||||||
|
this.excelData.push(rowData)
|
||||||
}
|
}
|
||||||
const isDuplicate = this.excelData.some(item => item.arg4 === rowData.arg4)
|
|
||||||
if (isDuplicate) {
|
|
||||||
this.errorPhone.push(rowData.arg4)
|
|
||||||
}
|
|
||||||
this.excelData.push(rowData)
|
|
||||||
}
|
}
|
||||||
if (this.excelData.length > 999) {
|
if (this.excelData.length > 999) {
|
||||||
this.$message.warning('数据量大于1000行')
|
this.$message.warning('数据量大于1000行')
|
||||||
|
|
|
||||||
|
|
@ -2143,45 +2143,49 @@ export default {
|
||||||
let uuid = StrUtil.generateSimpleUUID()
|
let uuid = StrUtil.generateSimpleUUID()
|
||||||
for (let i = 0; i < jsonData.length; i++) {
|
for (let i = 0; i < jsonData.length; i++) {
|
||||||
if (
|
if (
|
||||||
StrUtil.isBlank(jsonData[i][1]) ||
|
jsonData[i].length > 0 &&
|
||||||
StrUtil.isBlank(jsonData[i][2]) ||
|
(StrUtil.isBlank(jsonData[i][1]) ||
|
||||||
StrUtil.isBlank(jsonData[i][3]) ||
|
StrUtil.isBlank(jsonData[i][2]) ||
|
||||||
StrUtil.isBlank(jsonData[i][4]) ||
|
StrUtil.isBlank(jsonData[i][3]) ||
|
||||||
StrUtil.isBlank(jsonData[i][5]) ||
|
StrUtil.isBlank(jsonData[i][4]) ||
|
||||||
StrUtil.isBlank(jsonData[i][6]) ||
|
StrUtil.isBlank(jsonData[i][5]) ||
|
||||||
StrUtil.isBlank(jsonData[i][7]) ||
|
StrUtil.isBlank(jsonData[i][6]) ||
|
||||||
StrUtil.isBlank(jsonData[i][8]) ||
|
StrUtil.isBlank(jsonData[i][7]) ||
|
||||||
StrUtil.isBlank(jsonData[i][9]) ||
|
StrUtil.isBlank(jsonData[i][8]) ||
|
||||||
StrUtil.isBlank(jsonData[i][10])
|
StrUtil.isBlank(jsonData[i][9]) ||
|
||||||
|
StrUtil.isBlank(jsonData[i][10]))
|
||||||
) {
|
) {
|
||||||
this.errorLine.push(jsonData[i][0])
|
this.errorLine.push(jsonData[i][0])
|
||||||
} else {
|
} else {
|
||||||
if (jsonData[i][10] === '特殊工种' && StrUtil.isBlank(jsonData[i][11])) {
|
if (jsonData[i][10] === '特殊工种' && StrUtil.isBlank(jsonData[i][11]) && jsonData[i].length > 0) {
|
||||||
this.errorLine.push(jsonData[i][0])
|
this.errorLine.push(jsonData[i][0])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const rowData = {
|
|
||||||
arg0: jsonData[i][0],
|
if (jsonData[i].length > 0) {
|
||||||
arg1: jsonData[i][1],
|
const rowData = {
|
||||||
arg2: jsonData[i][2],
|
arg0: jsonData[i][0],
|
||||||
arg3: jsonData[i][3],
|
arg1: jsonData[i][1],
|
||||||
arg4: jsonData[i][4],
|
arg2: jsonData[i][2],
|
||||||
arg5: jsonData[i][5],
|
arg3: jsonData[i][3],
|
||||||
arg6: jsonData[i][6],
|
arg4: jsonData[i][4],
|
||||||
arg7: jsonData[i][7],
|
arg5: jsonData[i][5],
|
||||||
arg8: jsonData[i][8],
|
arg6: jsonData[i][6],
|
||||||
arg9: jsonData[i][9],
|
arg7: jsonData[i][7],
|
||||||
arg10: jsonData[i][10],
|
arg8: jsonData[i][8],
|
||||||
arg11: jsonData[i][11],
|
arg9: jsonData[i][9],
|
||||||
uuid: uuid,
|
arg10: jsonData[i][10],
|
||||||
personType: jsonData[i][10] === '特殊工种' ? '1' : jsonData[i][10] === '普通职工' ? '2' : '0',
|
arg11: jsonData[i][11],
|
||||||
sex: jsonData[i][2] === '男' ? '0' : '1',
|
uuid: uuid,
|
||||||
|
personType: jsonData[i][10] === '特殊工种' ? '1' : jsonData[i][10] === '普通职工' ? '2' : '0',
|
||||||
|
sex: jsonData[i][2] === '男' ? '0' : '1',
|
||||||
|
}
|
||||||
|
const isDuplicate = this.excelData.some(item => item.arg4 === rowData.arg4)
|
||||||
|
if (isDuplicate) {
|
||||||
|
this.errorPhone.push(rowData.arg4)
|
||||||
|
}
|
||||||
|
this.excelData.push(rowData)
|
||||||
}
|
}
|
||||||
const isDuplicate = this.excelData.some(item => item.arg4 === rowData.arg4)
|
|
||||||
if (isDuplicate) {
|
|
||||||
this.errorPhone.push(rowData.arg4)
|
|
||||||
}
|
|
||||||
this.excelData.push(rowData)
|
|
||||||
}
|
}
|
||||||
if (this.excelData.length > 999) {
|
if (this.excelData.length > 999) {
|
||||||
this.$message.warning('数据量大于1000行')
|
this.$message.warning('数据量大于1000行')
|
||||||
|
|
|
||||||
|
|
@ -981,8 +981,12 @@ export default {
|
||||||
uuid: this.$store.state.user.thisIds.uuid,
|
uuid: this.$store.state.user.thisIds.uuid,
|
||||||
parentUuid: this.$store.state.user.thisIds.parentUuid,
|
parentUuid: this.$store.state.user.thisIds.parentUuid,
|
||||||
}
|
}
|
||||||
if (this.formData.enterpriseQualificationFiles.length === 0 || this.formData.securityAgreementFiles.length === 0 ||
|
if (
|
||||||
this.formData.supervisionPlanningFiles.length === 0 || this.formData.implementationRulesFiles.length === 0) {
|
this.formData.enterpriseQualificationFiles.length === 0 ||
|
||||||
|
this.formData.securityAgreementFiles.length === 0 ||
|
||||||
|
this.formData.supervisionPlanningFiles.length === 0 ||
|
||||||
|
this.formData.implementationRulesFiles.length === 0
|
||||||
|
) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '请先上传企业资质、安全协议书、监理规划、实施细则文件!',
|
message: '请先上传企业资质、安全协议书、监理规划、实施细则文件!',
|
||||||
type: 'error',
|
type: 'error',
|
||||||
|
|
@ -997,7 +1001,7 @@ export default {
|
||||||
if (response.msg === '部分人员文件不存在,请先仔细核对,上传相关文件!') {
|
if (response.msg === '部分人员文件不存在,请先仔细核对,上传相关文件!') {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '部分人员文件不存在,请先仔细核对,上传相关文件!',
|
message: '部分人员文件不存在,请先仔细核对,上传相关文件!',
|
||||||
type: 'error'
|
type: 'error',
|
||||||
})
|
})
|
||||||
// return false
|
// return false
|
||||||
isReturn = true
|
isReturn = true
|
||||||
|
|
@ -1005,77 +1009,78 @@ export default {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '文件检查失败,请稍后重试!',
|
message: '文件检查失败,请稍后重试!',
|
||||||
type: 'error'
|
type: 'error',
|
||||||
})
|
})
|
||||||
// return false
|
// return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isReturn) return
|
if (isReturn) return
|
||||||
this.$refs[formName].validate(valid => {
|
this.$refs[formName].validate(valid => {
|
||||||
if (submitType === '提交' && !valid) {
|
if (submitType === '提交' && !valid) {
|
||||||
return this.$modal.msgError('请完善全部上传信息')
|
return this.$modal.msgError('请完善全部上传信息')
|
||||||
}
|
}
|
||||||
console.log(this.formData)
|
console.log(this.formData)
|
||||||
const reqData = new FormData()
|
const reqData = new FormData()
|
||||||
this.formData.proId = this.$store.state.user.thisIds.proId
|
this.formData.proId = this.$store.state.user.thisIds.proId
|
||||||
this.formData.supId = this.$store.state.user.thisIds.supId
|
this.formData.supId = this.$store.state.user.thisIds.supId
|
||||||
this.formData.supUuid = this.$store.state.user.thisIds.supUuid
|
this.formData.supUuid = this.$store.state.user.thisIds.supUuid
|
||||||
this.formData.uuid = this.$store.state.user.thisIds.uuid
|
this.formData.uuid = this.$store.state.user.thisIds.uuid
|
||||||
this.formData.delFileIds = this.delFileIds.join(',')
|
this.formData.delFileIds = this.delFileIds.join(',')
|
||||||
this.formData.submitType = submitType
|
this.formData.submitType = submitType
|
||||||
reqData.append('params', JSON.stringify(this.formData))
|
reqData.append('params', JSON.stringify(this.formData))
|
||||||
|
|
||||||
// 使用 Promise.all 并行处理文件数据获取,提高效率
|
// 使用 Promise.all 并行处理文件数据获取,提高效率
|
||||||
Promise.all([
|
Promise.all([
|
||||||
this.getFileData(this.formData.enterpriseQualificationFiles),
|
this.getFileData(this.formData.enterpriseQualificationFiles),
|
||||||
this.getFileData(this.formData.securityAgreementFiles),
|
this.getFileData(this.formData.securityAgreementFiles),
|
||||||
this.getFileData(this.formData.supervisionPlanningFiles),
|
this.getFileData(this.formData.supervisionPlanningFiles),
|
||||||
this.getFileData(this.formData.implementationRulesFiles),
|
this.getFileData(this.formData.implementationRulesFiles),
|
||||||
]).then(
|
]).then(
|
||||||
([
|
([
|
||||||
enterpriseQualificationFiles,
|
enterpriseQualificationFiles,
|
||||||
securityAgreementFiles,
|
securityAgreementFiles,
|
||||||
supervisionPlanningFiles,
|
supervisionPlanningFiles,
|
||||||
implementationRulesFiles,
|
implementationRulesFiles,
|
||||||
]) => {
|
]) => {
|
||||||
if (!enterpriseQualificationFiles || enterpriseQualificationFiles.length === 0) {
|
if (!enterpriseQualificationFiles || enterpriseQualificationFiles.length === 0) {
|
||||||
reqData.append('enterpriseQualificationFiles', new Blob())
|
reqData.append('enterpriseQualificationFiles', new Blob())
|
||||||
} else {
|
} else {
|
||||||
enterpriseQualificationFiles.forEach(item => reqData.append('enterpriseQualificationFiles', item))
|
enterpriseQualificationFiles.forEach(item => reqData.append('enterpriseQualificationFiles', item))
|
||||||
}
|
}
|
||||||
if (!securityAgreementFiles || securityAgreementFiles.length === 0) {
|
if (!securityAgreementFiles || securityAgreementFiles.length === 0) {
|
||||||
reqData.append('securityAgreementFiles', new Blob())
|
reqData.append('securityAgreementFiles', new Blob())
|
||||||
} else {
|
} else {
|
||||||
securityAgreementFiles.forEach(item => reqData.append('securityAgreementFiles', item))
|
securityAgreementFiles.forEach(item => reqData.append('securityAgreementFiles', item))
|
||||||
}
|
}
|
||||||
if (!supervisionPlanningFiles || supervisionPlanningFiles.length === 0) {
|
if (!supervisionPlanningFiles || supervisionPlanningFiles.length === 0) {
|
||||||
reqData.append('supervisionPlanningFiles', new Blob())
|
reqData.append('supervisionPlanningFiles', new Blob())
|
||||||
} else {
|
} else {
|
||||||
supervisionPlanningFiles.forEach(item => reqData.append('supervisionPlanningFiles', item))
|
supervisionPlanningFiles.forEach(item => reqData.append('supervisionPlanningFiles', item))
|
||||||
}
|
}
|
||||||
if (!implementationRulesFiles || implementationRulesFiles.length === 0) {
|
if (!implementationRulesFiles || implementationRulesFiles.length === 0) {
|
||||||
reqData.append('implementationRulesFiles', new Blob())
|
reqData.append('implementationRulesFiles', new Blob())
|
||||||
} else {
|
} else {
|
||||||
implementationRulesFiles.forEach(item => reqData.append('implementationRulesFiles', item))
|
implementationRulesFiles.forEach(item => reqData.append('implementationRulesFiles', item))
|
||||||
}
|
}
|
||||||
addSupervisoryApply(reqData)
|
addSupervisoryApply(reqData)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (submitType === '提交') {
|
if (submitType === '提交') {
|
||||||
this.submitApply()
|
this.submitApply()
|
||||||
} else {
|
} else {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.$modal.msgSuccess('保存成功')
|
this.$modal.msgSuccess('保存成功')
|
||||||
this.$tab.closePage()
|
this.$tab.closePage()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
// 增加错误处理
|
// 增加错误处理
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.$modal.msgError('提交失败')
|
this.$modal.msgError('提交失败')
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
})
|
)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 提交审批
|
* 提交审批
|
||||||
|
|
@ -1383,32 +1388,36 @@ export default {
|
||||||
let uuid = StrUtil.generateSimpleUUID()
|
let uuid = StrUtil.generateSimpleUUID()
|
||||||
for (let i = 0; i < jsonData.length; i++) {
|
for (let i = 0; i < jsonData.length; i++) {
|
||||||
if (
|
if (
|
||||||
StrUtil.isBlank(jsonData[i][1]) ||
|
jsonData[i].length > 0 &&
|
||||||
StrUtil.isBlank(jsonData[i][2]) ||
|
(StrUtil.isBlank(jsonData[i][1]) ||
|
||||||
StrUtil.isBlank(jsonData[i][3]) ||
|
StrUtil.isBlank(jsonData[i][2]) ||
|
||||||
StrUtil.isBlank(jsonData[i][4]) ||
|
StrUtil.isBlank(jsonData[i][3]) ||
|
||||||
StrUtil.isBlank(jsonData[i][5]) ||
|
StrUtil.isBlank(jsonData[i][4]) ||
|
||||||
StrUtil.isBlank(jsonData[i][6])
|
StrUtil.isBlank(jsonData[i][5]) ||
|
||||||
|
StrUtil.isBlank(jsonData[i][6]))
|
||||||
) {
|
) {
|
||||||
this.errorLine.push(jsonData[i][0])
|
this.errorLine.push(jsonData[i][0])
|
||||||
}
|
}
|
||||||
const rowData = {
|
|
||||||
arg0: jsonData[i][0],
|
if (jsonData[i].length > 0) {
|
||||||
arg1: jsonData[i][1],
|
const rowData = {
|
||||||
arg2: jsonData[i][2],
|
arg0: jsonData[i][0],
|
||||||
arg3: jsonData[i][3],
|
arg1: jsonData[i][1],
|
||||||
arg4: jsonData[i][4],
|
arg2: jsonData[i][2],
|
||||||
arg5: jsonData[i][5],
|
arg3: jsonData[i][3],
|
||||||
arg6: jsonData[i][6],
|
arg4: jsonData[i][4],
|
||||||
uuid: uuid,
|
arg5: jsonData[i][5],
|
||||||
personType: jsonData[i][6] === '监理负责人' ? '1' : '2',
|
arg6: jsonData[i][6],
|
||||||
sex: jsonData[i][2] === '男' ? '0' : '1',
|
uuid: uuid,
|
||||||
|
personType: jsonData[i][6] === '监理负责人' ? '1' : '2',
|
||||||
|
sex: jsonData[i][2] === '男' ? '0' : '1',
|
||||||
|
}
|
||||||
|
const isDuplicate = this.excelData.some(item => item.arg5 === rowData.arg5)
|
||||||
|
if (isDuplicate) {
|
||||||
|
this.errorPhone.push(rowData.arg5)
|
||||||
|
}
|
||||||
|
this.excelData.push(rowData)
|
||||||
}
|
}
|
||||||
const isDuplicate = this.excelData.some(item => item.arg5 === rowData.arg5)
|
|
||||||
if (isDuplicate) {
|
|
||||||
this.errorPhone.push(rowData.arg5)
|
|
||||||
}
|
|
||||||
this.excelData.push(rowData)
|
|
||||||
}
|
}
|
||||||
if (this.excelData.length > 999) {
|
if (this.excelData.length > 999) {
|
||||||
this.$message.warning('数据量大于1000行')
|
this.$message.warning('数据量大于1000行')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue