fix: BUG修改
This commit is contained in:
parent
4e732e78bf
commit
402c7c7b8b
@ -134,7 +134,7 @@
|
|||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="选择违章人员" prop="workerInfoList" v-if="addEditForm.handleResult != 2">
|
<el-form-item label="选择违章人员" prop="workerInfoList" v-if="addEditForm.handleResult != 2">
|
||||||
<el-select :disabled="isDetail" multiple v-model="selectList" placeholder="请选择" clearable @change="dutySelectChange">
|
<el-select :disabled="isDetail" filterable multiple v-model="selectList" placeholder="请选择" clearable @change="dutySelectChange">
|
||||||
<el-option v-for="(item, index) in workerListOptions" :key="index" :label="item.workerName" :value="item.id"> </el-option>
|
<el-option v-for="(item, index) in workerListOptions" :key="index" :label="item.workerName" :value="item.id"> </el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@ -25,16 +25,16 @@
|
|||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
|
|
||||||
prop="regionCode"
|
prop="enterpriseName"
|
||||||
:label="$t('message.quality.unit')"
|
label="整改单位"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
|
|
||||||
prop="dutyName"
|
prop="dutyUserName"
|
||||||
:label="$t('message.quality.rectificationPeople')"
|
:label="$t('message.quality.rectificationPeople')"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -94,13 +94,13 @@
|
|||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
placeholder="请输入区域名称"
|
placeholder="请输入区域名称"
|
||||||
v-model="form.regionName"
|
v-model="form.regionName"
|
||||||
:disabled="dialogType == 2"
|
:disabled="dialogType == 2"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 责任单位 start -->
|
<!-- 整改单位 -->
|
||||||
<el-form-item :label="$t('message.quality.personWork')">
|
<el-form-item label="整改单位">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.dutyId"
|
v-model="form.dutyId"
|
||||||
filterable
|
filterable
|
||||||
@ -117,18 +117,15 @@
|
|||||||
:label="item.enterpriseName"
|
:label="item.enterpriseName"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
>
|
||||||
<span style="float: left">{{ item.enterpriseName }}</span>
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 责任单位 end -->
|
<!-- 整改人 start -->
|
||||||
<!-- 责任人 start -->
|
<el-form-item label="整改人">
|
||||||
<el-form-item :label="$t('message.quality.personLiable')">
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.personId"
|
v-model="form.personId"
|
||||||
filterable
|
filterable
|
||||||
multiple
|
multiple
|
||||||
@change="changeDutyId"
|
|
||||||
:placeholder="$t('message.quality.pleaseSelect')"
|
:placeholder="$t('message.quality.pleaseSelect')"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
prop="personId"
|
prop="personId"
|
||||||
@ -137,10 +134,9 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in notifierOrPeopleList"
|
v-for="item in notifierOrPeopleList"
|
||||||
:key="item.userId"
|
:key="item.userId"
|
||||||
:label="item.notifierOrPeopleList"
|
:label="item.realName"
|
||||||
:value="item.userId"
|
:value="item.userId"
|
||||||
>
|
>
|
||||||
<span style="float: left">{{ item.realName }}</span>
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -243,7 +239,7 @@ export default {
|
|||||||
form: {
|
form: {
|
||||||
regionName: '',
|
regionName: '',
|
||||||
dutyId: '',
|
dutyId: '',
|
||||||
personId: [],
|
personId: null,
|
||||||
intendanceIds: [],
|
intendanceIds: [],
|
||||||
intendanceNames: '',
|
intendanceNames: '',
|
||||||
remark: '',
|
remark: '',
|
||||||
@ -255,6 +251,7 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.projectSn = this.$store.state.projectSn
|
this.projectSn = this.$store.state.projectSn
|
||||||
this.getQualityRegionList()
|
this.getQualityRegionList()
|
||||||
|
this.getUpdateUnitListFn();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取列表信息
|
// 获取列表信息
|
||||||
@ -282,15 +279,10 @@ export default {
|
|||||||
this.editDialog = true
|
this.editDialog = true
|
||||||
this.title ='新增区域'
|
this.title ='新增区域'
|
||||||
this.dialogType = 1
|
this.dialogType = 1
|
||||||
this.getNotifierOrPeopleList()
|
|
||||||
},
|
},
|
||||||
//切换 整改人
|
//切换 整改人
|
||||||
changeDutyId(value) {
|
changeDutyId(value) {
|
||||||
for (let i = 0; i < this.notifierOrPeopleList.length; i++) {
|
this.getUpdatePersonListFn();
|
||||||
if (value == this.notifierOrPeopleList[i].userId) {
|
|
||||||
this.form.dutyName = this.notifierOrPeopleList[i].workerName
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
//切换 通知人
|
//切换 通知人
|
||||||
changeIntendanceIds(value) {
|
changeIntendanceIds(value) {
|
||||||
@ -315,12 +307,20 @@ export default {
|
|||||||
}
|
}
|
||||||
console.log('编辑',value)
|
console.log('编辑',value)
|
||||||
this.form.regionName = value.regionName
|
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.remark = value.remark
|
||||||
this.form.id = value.id
|
this.form.id = value.id
|
||||||
this.title = '编辑区域'
|
this.title = '编辑区域'
|
||||||
this.dialogType = 2
|
this.dialogType = 2
|
||||||
this.getNotifierOrPeopleList()
|
|
||||||
this.editDialog = true
|
this.editDialog = true
|
||||||
},
|
},
|
||||||
//新增下级---按钮
|
//新增下级---按钮
|
||||||
@ -338,23 +338,9 @@ export default {
|
|||||||
this.editDialog = true
|
this.editDialog = true
|
||||||
this.title = this.$t('message.quality.newJunior')
|
this.title = this.$t('message.quality.newJunior')
|
||||||
this.dialogType = 3
|
this.dialogType = 3
|
||||||
this.getNotifierOrPeopleList()
|
|
||||||
},
|
},
|
||||||
|
// 获取整改单位列表
|
||||||
//获取 整改人 通知人下拉列表
|
getUpdateUnitListFn(){
|
||||||
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=>{
|
getEnterpriseInfoListApi({projectSn: this.projectSn}).then(res=>{
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if(res.code==200){
|
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) {
|
submit(formName) {
|
||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[formName].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let data = {
|
let data = {
|
||||||
dutyId: this.form.dutyId,
|
|
||||||
dutyName: this.form.dutyName,
|
dutyName: this.form.dutyName,
|
||||||
// intendanceIds: this.form.intendanceIds.join(','),
|
// intendanceIds: this.form.intendanceIds.join(','),
|
||||||
intendanceNames: this.form.intendanceNames,
|
intendanceNames: this.form.intendanceNames,
|
||||||
@ -376,6 +395,16 @@ export default {
|
|||||||
projectSn: this.projectSn,
|
projectSn: this.projectSn,
|
||||||
parentRegion: this.form.parentRegion
|
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) {
|
if (this.dialogType == 1) {
|
||||||
addQualityRegionApi(data).then((res) => {
|
addQualityRegionApi(data).then((res) => {
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
|
|||||||
@ -635,7 +635,7 @@
|
|||||||
prop="inspectTime"
|
prop="inspectTime"
|
||||||
>
|
>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:disabled="type == 'detail'"
|
:disabled="true"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
style="width: 400px"
|
style="width: 400px"
|
||||||
v-model="addForm1.inspectTime"
|
v-model="addForm1.inspectTime"
|
||||||
@ -742,7 +742,7 @@
|
|||||||
prop="verifyManId"
|
prop="verifyManId"
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
:disabled="type == 'detail'"
|
:disabled="true"
|
||||||
v-model="addForm1.verifyManId"
|
v-model="addForm1.verifyManId"
|
||||||
filterable
|
filterable
|
||||||
style="width: 400px"
|
style="width: 400px"
|
||||||
@ -1101,7 +1101,7 @@
|
|||||||
prop="inspectTime"
|
prop="inspectTime"
|
||||||
>
|
>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:disabled="type == 'detail'"
|
:disabled="true"
|
||||||
style="width: 400px"
|
style="width: 400px"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
v-model="addForm2.inspectTime"
|
v-model="addForm2.inspectTime"
|
||||||
@ -1949,7 +1949,7 @@ import { VueCropper } from 'vue-cropper'
|
|||||||
import {
|
import {
|
||||||
getSubdivisionProjectApi //所有分部分项工程, 以父子节点形式呈现
|
getSubdivisionProjectApi //所有分部分项工程, 以父子节点形式呈现
|
||||||
} from '@/assets/js/api/quality'
|
} from '@/assets/js/api/quality'
|
||||||
|
import moment from 'moment'
|
||||||
var VUE = null
|
var VUE = null
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -2389,6 +2389,7 @@ export default {
|
|||||||
let pathLabels =
|
let pathLabels =
|
||||||
this.$refs['formRegion1'].getCheckedNodes()[0].pathLabels
|
this.$refs['formRegion1'].getCheckedNodes()[0].pathLabels
|
||||||
let data = this.$refs['formRegion1'].getCheckedNodes()[0].data
|
let data = this.$refs['formRegion1'].getCheckedNodes()[0].data
|
||||||
|
console.log(data,666)
|
||||||
// console.log(pathLabels,data)
|
// console.log(pathLabels,data)
|
||||||
let text = ''
|
let text = ''
|
||||||
for (let i = 0; i < pathLabels.length; i++) {
|
for (let i = 0; i < pathLabels.length; i++) {
|
||||||
@ -2407,7 +2408,7 @@ export default {
|
|||||||
this.addForm1.regionName = text
|
this.addForm1.regionName = text
|
||||||
// console.log(data.intendanceIds.split(','))
|
// console.log(data.intendanceIds.split(','))
|
||||||
// console.log(text)
|
// console.log(text)
|
||||||
if (data.intendanceIds.split(',') > 0) {
|
if (data.intendanceIds && data.intendanceIds.split(',') > 0) {
|
||||||
for (let j = 0; j < data.intendanceIds.split(',').length; j++) {
|
for (let j = 0; j < data.intendanceIds.split(',').length; j++) {
|
||||||
if (this.addForm1.notifyPerson > 0) {
|
if (this.addForm1.notifyPerson > 0) {
|
||||||
this.addForm1.notifyPerson = []
|
this.addForm1.notifyPerson = []
|
||||||
@ -2421,6 +2422,8 @@ export default {
|
|||||||
console.log(' this.addForm1.notifyPerson================', this.addForm1.notifyPerson);
|
console.log(' this.addForm1.notifyPerson================', this.addForm1.notifyPerson);
|
||||||
this.subcontractList = data.enterpriseInfos;
|
this.subcontractList = data.enterpriseInfos;
|
||||||
this.crewUpdateList = data.systemUsers;
|
this.crewUpdateList = data.systemUsers;
|
||||||
|
console.log(this.subcontractList,777)
|
||||||
|
console.log(this.crewUpdateList,888)
|
||||||
} else if (this.recordType == 2) {
|
} else if (this.recordType == 2) {
|
||||||
let pathLabels =
|
let pathLabels =
|
||||||
this.$refs['addFormRegion2'].getCheckedNodes()[0].pathLabels
|
this.$refs['addFormRegion2'].getCheckedNodes()[0].pathLabels
|
||||||
@ -2607,6 +2610,20 @@ export default {
|
|||||||
|
|
||||||
this.fileList3 = []
|
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.addDialog = true
|
||||||
this.getPositionList()
|
this.getPositionList()
|
||||||
this.getDescribeClassifyList()
|
this.getDescribeClassifyList()
|
||||||
@ -2750,23 +2767,25 @@ export default {
|
|||||||
this.addForm1.remark = ''
|
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) {
|
getEnterprise(type) {
|
||||||
if (type != 1) {
|
if (type != 1) {
|
||||||
this.showEnterpriseDialog = true
|
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) {
|
changeSubcontractType(val) {
|
||||||
@ -3070,6 +3089,9 @@ export default {
|
|||||||
data.notifyPerson = this.addForm1.notifyPerson.join(',')
|
data.notifyPerson = this.addForm1.notifyPerson.join(',')
|
||||||
data.imageUrl = imgUrl.join(',')
|
data.imageUrl = imgUrl.join(',')
|
||||||
data.fileUrl = fileUrl.join(',')
|
data.fileUrl = fileUrl.join(',')
|
||||||
|
if(data.verifyManId == this.$store.state.userInfo.realName){
|
||||||
|
data.verifyManId = this.$store.state.userInfo.userId
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
data = JSON.parse(JSON.stringify(this.addForm2))
|
data = JSON.parse(JSON.stringify(this.addForm2))
|
||||||
data.regionId =
|
data.regionId =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user