bug修复
This commit is contained in:
parent
aff59d97be
commit
c8357b81bf
|
|
@ -576,14 +576,16 @@ export default {
|
|||
this.uploadData = []
|
||||
for (let i = 0; i < jsonData.length; i++) {
|
||||
if (
|
||||
StrUtil.isBlank(jsonData[i][1]) ||
|
||||
jsonData[i].length > 0 &&
|
||||
(StrUtil.isBlank(jsonData[i][1]) ||
|
||||
StrUtil.isBlank(jsonData[i][2]) ||
|
||||
StrUtil.isBlank(jsonData[i][3]) ||
|
||||
StrUtil.isBlank(jsonData[i][4]) ||
|
||||
StrUtil.isBlank(jsonData[i][5])
|
||||
StrUtil.isBlank(jsonData[i][5]))
|
||||
) {
|
||||
this.errorLine.push(jsonData[i][0])
|
||||
} else {
|
||||
if (jsonData[i].length > 0) {
|
||||
const answers = jsonData[i][3].split('|@|')
|
||||
const questionOptionArr = jsonData[i][2].split('|@|')
|
||||
mappedAnswers = answers.map(answer => {
|
||||
|
|
@ -600,6 +602,9 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (jsonData[i].length > 0) {
|
||||
const rowData = {
|
||||
questionId: jsonData[i][0],
|
||||
content: jsonData[i][1],
|
||||
|
|
@ -627,6 +632,7 @@ export default {
|
|||
}
|
||||
this.uploadData.push(rowDatas)
|
||||
}
|
||||
}
|
||||
console.log('excelData:', this.excelData)
|
||||
if (this.excelData.length > 999) {
|
||||
this.$message.warning('数据量大于999行')
|
||||
|
|
|
|||
|
|
@ -892,8 +892,10 @@ export default {
|
|||
this.errorLine = []
|
||||
let uuid = StrUtil.generateSimpleUUID()
|
||||
for (let i = 0; i < jsonData.length; i++) {
|
||||
console.log('jsonData', jsonData)
|
||||
if (
|
||||
StrUtil.isBlank(jsonData[i][1]) ||
|
||||
jsonData[i].length > 0 &&
|
||||
(StrUtil.isBlank(jsonData[i][1]) ||
|
||||
StrUtil.isBlank(jsonData[i][2]) ||
|
||||
StrUtil.isBlank(jsonData[i][3]) ||
|
||||
StrUtil.isBlank(jsonData[i][4]) ||
|
||||
|
|
@ -902,14 +904,19 @@ export default {
|
|||
StrUtil.isBlank(jsonData[i][7]) ||
|
||||
StrUtil.isBlank(jsonData[i][8]) ||
|
||||
StrUtil.isBlank(jsonData[i][9]) ||
|
||||
StrUtil.isBlank(jsonData[i][10])
|
||||
StrUtil.isBlank(jsonData[i][10]))
|
||||
) {
|
||||
this.errorLine.push(jsonData[i][0])
|
||||
|
||||
console.log('this.errorLine', this.errorLine)
|
||||
} 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])
|
||||
console.log('this.errorLine', this.errorLine)
|
||||
}
|
||||
}
|
||||
|
||||
if (jsonData[i].length > 0) {
|
||||
const rowData = {
|
||||
arg0: jsonData[i][0],
|
||||
arg1: jsonData[i][1],
|
||||
|
|
@ -933,6 +940,7 @@ export default {
|
|||
}
|
||||
this.excelData.push(rowData)
|
||||
}
|
||||
}
|
||||
if (this.excelData.length > 999) {
|
||||
this.$message.warning('数据量大于1000行')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2143,7 +2143,8 @@ export default {
|
|||
let uuid = StrUtil.generateSimpleUUID()
|
||||
for (let i = 0; i < jsonData.length; i++) {
|
||||
if (
|
||||
StrUtil.isBlank(jsonData[i][1]) ||
|
||||
jsonData[i].length > 0 &&
|
||||
(StrUtil.isBlank(jsonData[i][1]) ||
|
||||
StrUtil.isBlank(jsonData[i][2]) ||
|
||||
StrUtil.isBlank(jsonData[i][3]) ||
|
||||
StrUtil.isBlank(jsonData[i][4]) ||
|
||||
|
|
@ -2152,14 +2153,16 @@ export default {
|
|||
StrUtil.isBlank(jsonData[i][7]) ||
|
||||
StrUtil.isBlank(jsonData[i][8]) ||
|
||||
StrUtil.isBlank(jsonData[i][9]) ||
|
||||
StrUtil.isBlank(jsonData[i][10])
|
||||
StrUtil.isBlank(jsonData[i][10]))
|
||||
) {
|
||||
this.errorLine.push(jsonData[i][0])
|
||||
} 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])
|
||||
}
|
||||
}
|
||||
|
||||
if (jsonData[i].length > 0) {
|
||||
const rowData = {
|
||||
arg0: jsonData[i][0],
|
||||
arg1: jsonData[i][1],
|
||||
|
|
@ -2183,6 +2186,7 @@ export default {
|
|||
}
|
||||
this.excelData.push(rowData)
|
||||
}
|
||||
}
|
||||
if (this.excelData.length > 999) {
|
||||
this.$message.warning('数据量大于1000行')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -981,8 +981,12 @@ export default {
|
|||
uuid: this.$store.state.user.thisIds.uuid,
|
||||
parentUuid: this.$store.state.user.thisIds.parentUuid,
|
||||
}
|
||||
if (this.formData.enterpriseQualificationFiles.length === 0 || this.formData.securityAgreementFiles.length === 0 ||
|
||||
this.formData.supervisionPlanningFiles.length === 0 || this.formData.implementationRulesFiles.length === 0) {
|
||||
if (
|
||||
this.formData.enterpriseQualificationFiles.length === 0 ||
|
||||
this.formData.securityAgreementFiles.length === 0 ||
|
||||
this.formData.supervisionPlanningFiles.length === 0 ||
|
||||
this.formData.implementationRulesFiles.length === 0
|
||||
) {
|
||||
this.$message({
|
||||
message: '请先上传企业资质、安全协议书、监理规划、实施细则文件!',
|
||||
type: 'error',
|
||||
|
|
@ -997,7 +1001,7 @@ export default {
|
|||
if (response.msg === '部分人员文件不存在,请先仔细核对,上传相关文件!') {
|
||||
this.$message({
|
||||
message: '部分人员文件不存在,请先仔细核对,上传相关文件!',
|
||||
type: 'error'
|
||||
type: 'error',
|
||||
})
|
||||
// return false
|
||||
isReturn = true
|
||||
|
|
@ -1005,7 +1009,7 @@ export default {
|
|||
} catch (error) {
|
||||
this.$message({
|
||||
message: '文件检查失败,请稍后重试!',
|
||||
type: 'error'
|
||||
type: 'error',
|
||||
})
|
||||
// return false
|
||||
}
|
||||
|
|
@ -1074,7 +1078,8 @@ export default {
|
|||
this.loading = false
|
||||
this.$modal.msgError('提交失败')
|
||||
})
|
||||
})
|
||||
}
|
||||
)
|
||||
})
|
||||
},
|
||||
/**
|
||||
|
|
@ -1383,15 +1388,18 @@ export default {
|
|||
let uuid = StrUtil.generateSimpleUUID()
|
||||
for (let i = 0; i < jsonData.length; i++) {
|
||||
if (
|
||||
StrUtil.isBlank(jsonData[i][1]) ||
|
||||
jsonData[i].length > 0 &&
|
||||
(StrUtil.isBlank(jsonData[i][1]) ||
|
||||
StrUtil.isBlank(jsonData[i][2]) ||
|
||||
StrUtil.isBlank(jsonData[i][3]) ||
|
||||
StrUtil.isBlank(jsonData[i][4]) ||
|
||||
StrUtil.isBlank(jsonData[i][5]) ||
|
||||
StrUtil.isBlank(jsonData[i][6])
|
||||
StrUtil.isBlank(jsonData[i][6]))
|
||||
) {
|
||||
this.errorLine.push(jsonData[i][0])
|
||||
}
|
||||
|
||||
if (jsonData[i].length > 0) {
|
||||
const rowData = {
|
||||
arg0: jsonData[i][0],
|
||||
arg1: jsonData[i][1],
|
||||
|
|
@ -1410,6 +1418,7 @@ export default {
|
|||
}
|
||||
this.excelData.push(rowData)
|
||||
}
|
||||
}
|
||||
if (this.excelData.length > 999) {
|
||||
this.$message.warning('数据量大于1000行')
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue