diff --git a/src/views/projectFront/aiAnalysis/warningList.vue b/src/views/projectFront/aiAnalysis/warningList.vue index a2b871a5..5a6802cd 100644 --- a/src/views/projectFront/aiAnalysis/warningList.vue +++ b/src/views/projectFront/aiAnalysis/warningList.vue @@ -134,7 +134,7 @@ > - + diff --git a/src/views/projectFront/quality/businessModule/checkPoint.vue b/src/views/projectFront/quality/businessModule/checkPoint.vue index 8fe7b545..0c2e1351 100644 --- a/src/views/projectFront/quality/businessModule/checkPoint.vue +++ b/src/views/projectFront/quality/businessModule/checkPoint.vue @@ -25,16 +25,16 @@ > @@ -94,13 +94,13 @@ ]" > - - + + - {{ item.enterpriseName }} - - - + + - {{ item.realName }} @@ -243,7 +239,7 @@ export default { form: { regionName: '', dutyId: '', - personId: [], + personId: null, intendanceIds: [], intendanceNames: '', remark: '', @@ -255,6 +251,7 @@ export default { created() { this.projectSn = this.$store.state.projectSn this.getQualityRegionList() + this.getUpdateUnitListFn(); }, methods: { // 获取列表信息 @@ -282,15 +279,10 @@ export default { this.editDialog = true this.title ='新增区域' this.dialogType = 1 - this.getNotifierOrPeopleList() }, //切换 整改人 changeDutyId(value) { - for (let i = 0; i < this.notifierOrPeopleList.length; i++) { - if (value == this.notifierOrPeopleList[i].userId) { - this.form.dutyName = this.notifierOrPeopleList[i].workerName - } - } + this.getUpdatePersonListFn(); }, //切换 通知人 changeIntendanceIds(value) { @@ -315,12 +307,20 @@ export default { } console.log('编辑',value) this.form.regionName = value.regionName - this.form.dutyId = value.dutyId ? value.dutyId : '' + if(value.enterpriseInfos && value.enterpriseInfos.length > 0){ + this.form.dutyId = value.enterpriseInfos.map(item => { + return item.id + }) + } + if(value.systemUsers && value.systemUsers.length > 0){ + this.form.personId = value.systemUsers.map(item => { + return item.userId + }) + } this.form.remark = value.remark this.form.id = value.id this.title = '编辑区域' this.dialogType = 2 - this.getNotifierOrPeopleList() this.editDialog = true }, //新增下级---按钮 @@ -338,23 +338,9 @@ export default { this.editDialog = true this.title = this.$t('message.quality.newJunior') this.dialogType = 3 - this.getNotifierOrPeopleList() }, - - //获取 整改人 通知人下拉列表 - getNotifierOrPeopleList() { - let data = { - projectSn: this.projectSn, - enterpriseId: this.enterpriseId - } - getProjectChilderSystemUserListApi(data).then((res) => { - console.log(res); - if (res.code == 200) { - console.log('------整改人', res) - console.log('------form', this.form) - this.notifierOrPeopleList = res.result - } - }) + // 获取整改单位列表 + getUpdateUnitListFn(){ getEnterpriseInfoListApi({projectSn: this.projectSn}).then(res=>{ console.log(res); if(res.code==200){ @@ -362,12 +348,45 @@ export default { } }) }, + // 获取整改人列表 + getUpdatePersonListFn(){ + let data = { + projectSn: this.projectSn, + enterpriseId: this.form.dutyId?this.form.dutyId.join(','):"" + } + getProjectChilderSystemUserListApi(data).then((res) => { + console.log(res); + if (res.code == 200) { + this.notifierOrPeopleList = res.result + } + }) + }, + // //获取 整改人 通知人下拉列表 + // getNotifierOrPeopleList() { + // let data = { + // projectSn: this.projectSn, + // enterpriseId: this.enterpriseId + // } + // getProjectChilderSystemUserListApi(data).then((res) => { + // console.log(res); + // if (res.code == 200) { + // console.log('------整改人', res) + // console.log('------form', this.form) + // this.notifierOrPeopleList = res.result + // } + // }) + // getEnterpriseInfoListApi({projectSn: this.projectSn}).then(res=>{ + // console.log(res); + // if(res.code==200){ + // this.enterpriseInfoList = res.result + // } + // }) + // }, //弹窗---保存按钮 submit(formName) { this.$refs[formName].validate((valid) => { if (valid) { let data = { - dutyId: this.form.dutyId, dutyName: this.form.dutyName, // intendanceIds: this.form.intendanceIds.join(','), intendanceNames: this.form.intendanceNames, @@ -376,6 +395,16 @@ export default { projectSn: this.projectSn, parentRegion: this.form.parentRegion } + if(this.form.dutyId && this.form.dutyId.length > 0){ + data.enterpriseInfos = this.form.dutyId.map(item => { + return {id: item} + }) + } + if(this.form.personId && this.form.personId.length > 0){ + data.systemUsers = this.form.personId.map(item => { + return {userId: item} + }) + } if (this.dialogType == 1) { addQualityRegionApi(data).then((res) => { // console.log(res); diff --git a/src/views/projectFront/quality/inspectionLedger.vue b/src/views/projectFront/quality/inspectionLedger.vue index dad23c49..69279ba5 100644 --- a/src/views/projectFront/quality/inspectionLedger.vue +++ b/src/views/projectFront/quality/inspectionLedger.vue @@ -635,7 +635,7 @@ prop="inspectTime" > 0) { + if (data.intendanceIds && data.intendanceIds.split(',') > 0) { for (let j = 0; j < data.intendanceIds.split(',').length; j++) { if (this.addForm1.notifyPerson > 0) { this.addForm1.notifyPerson = [] @@ -2421,6 +2422,8 @@ export default { console.log(' this.addForm1.notifyPerson================', this.addForm1.notifyPerson); this.subcontractList = data.enterpriseInfos; this.crewUpdateList = data.systemUsers; + console.log(this.subcontractList,777) + console.log(this.crewUpdateList,888) } else if (this.recordType == 2) { let pathLabels = this.$refs['addFormRegion2'].getCheckedNodes()[0].pathLabels @@ -2607,6 +2610,20 @@ export default { this.fileList3 = [] } + let date = new Date() + let nowDate = moment(date).format('YYYY-MM-DD HH:mm:ss') + this.addForm1.inspectTime = nowDate + this.addForm2.inspectTime = nowDate + // 默认选择核验人逻辑 + let index = this.crewList.findIndex(item => { + return item.userId == this.$store.state.userInfo.userId + }) + if(index != -1){ + this.addForm1.verifyManId = this.$store.state.userInfo.userId + } else { + this.addForm1.verifyManId = this.$store.state.userInfo.realName + } + // 逻辑结束 this.addDialog = true this.getPositionList() this.getDescribeClassifyList() @@ -2750,23 +2767,25 @@ export default { this.addForm1.remark = '' } }, - + // 获取分包单位 + getDivisionUnitFn(){ + let data = { + // enterpriseTypeId: this.subcontractType, + pageNo: 1, + pageSize: 999, + projectSn: this.projectSn + } + getSubcontractListApi(data).then((res) => { + if (res.code == 200) { + this.subcontractList = res.result.records + } + }) + }, //获取分包单位 getEnterprise(type) { if (type != 1) { this.showEnterpriseDialog = true } - // let data = { - // // enterpriseTypeId: this.subcontractType, - // pageNo: 1, - // pageSize: 999, - // projectSn: this.projectSn - // } - // getSubcontractListApi(data).then((res) => { - // if (res.code == 200) { - // this.subcontractList = res.result.records - // } - // }) }, //切换分包公司类型 changeSubcontractType(val) { @@ -3070,6 +3089,9 @@ export default { data.notifyPerson = this.addForm1.notifyPerson.join(',') data.imageUrl = imgUrl.join(',') data.fileUrl = fileUrl.join(',') + if(data.verifyManId == this.$store.state.userInfo.realName){ + data.verifyManId = this.$store.state.userInfo.userId + } } else { data = JSON.parse(JSON.stringify(this.addForm2)) data.regionId =