fix: BUG修改

This commit is contained in:
kun 2024-04-24 11:55:57 +08:00
parent 205868b90c
commit 6827ff9fa6
3 changed files with 61 additions and 16 deletions

View File

@ -707,7 +707,7 @@ export default {
specialConstructionSchemeType: this.addForm.specialConstructionSchemeType ? 2:1,
technicalDisclosureType: this.addForm.technicalDisclosureType ? 2:1,
typeDescribeList,
controlItemList: this.checkList,
controlItemList: this.checkList?this.checkList:null,
technicalDisclosureFile: JSON.stringify(this.fileList),
securityConstructionSchemeFile: JSON.stringify(this.fileList3),
specialConstructionSchemeFile: JSON.stringify(this.fileList2)

View File

@ -133,15 +133,28 @@
label="责任分包单位:"
:label-width="formLabelWidth"
>
<el-cascader
<!-- <el-cascader
:disabled="isDisabled"
v-model="detailData.responsibilityCompany"
v-model="detailData.responsibilityCompanyId"
placeholder="请选择责任分包单位"
:options="options"
:props="props"
clearable
>
</el-cascader>
</el-cascader> -->
<el-select
v-model="detailData.responsibilityCompanyId"
placeholder="请选择责任分包单位"
disabled
>
<el-option
:label="item.enterpriseName"
:value="item.id"
v-for="(item, index) in responsibilityList"
:key="index"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<!-- <div v-if="COMPANY != 'longguang'" class="qr-box">
@ -1166,10 +1179,14 @@ import {
deletehiddenDangerInspectRecordApi,
} from "@/assets/js/api/dangerousBigProject";
import { getCooperatorListApi } from "@/assets/js/api/cooperationUnit";
import {
getEnterpriseInfoList
} from "@/assets/js/api/laborPerson";
export default {
props: ["id", "isSuperDanger"],
data() {
return {
responsibilityList: [],
ops: {
scrollPanel: {
scrollingX: false,
@ -1245,8 +1262,19 @@ export default {
this.$nextTick(() => {
this.bindQRCode();
});
this.getProjectList();
},
methods: {
// ||
getProjectList() {
let data = {
projectSn: this.projectSn,
// enterpriseTypeId: this.enterpriseTypeId,
};
getEnterpriseInfoList(data).then((res) => {
this.responsibilityList = res.result;
});
},
//
printBtn() {
// setTimeout(() => {

View File

@ -161,7 +161,7 @@
clearable>
</el-cascader> -->
<el-select
v-model="addForm.responsibilityCompany"
v-model="addForm.responsibilityCompanyId"
placeholder="请选择责任分包单位"
@change="unitChange"
disabled
@ -518,7 +518,7 @@ export default {
planTime: "",
buildTime: "",
constructionLocation: "",
responsibilityCompany: "",
responsibilityCompanyId: "",
securityConstructionSchemeType: false,
specialConstructionSchemeType: false,
technicalDisclosureType: false,
@ -626,18 +626,21 @@ export default {
this.fileList = JSON.parse(this.addForm.technicalDisclosureFile);
this.addForm.technicalDisclosureType =
this.addForm.technicalDisclosureType == 2 ? true : false;
this.fileList3 = JSON.parse(
this.addForm.securityConstructionSchemeFile
);
this.addForm.securityConstructionSchemeType =
this.addForm.securityConstructionSchemeType == 2 ? true : false;
this.fileList2 = JSON.parse(
this.addForm.specialConstructionSchemeFile
);
this.addForm.specialConstructionSchemeType =
this.addForm.specialConstructionSchemeType == 2 ? true : false;
this.fileList3 = JSON.parse(
this.addForm.securityConstructionSchemeFile
);
this.addForm.securityConstructionSchemeType =
this.addForm.securityConstructionSchemeType == 2 ? true : false;
}
this.checkList = this.addForm.controlItemList;
this.checkList = this.addForm.controlItemList?this.addForm.controlItemList:[];
});
},
queryTypeList() {
@ -752,6 +755,8 @@ export default {
console.log(this.checkList);
},
checkChidren(val) {
console.log(val,789654)
console.log(this.checkList,789654)
let arr = [],
arr2 = [],
allCheck = true;
@ -962,7 +967,7 @@ export default {
this.$message.error("请选择施工时间!");
return;
}
if (!this.addForm.responsibilityCompany) {
if (!this.addForm.responsibilityCompanyId) {
this.$message.error("请选择责任分包单位!");
return;
}
@ -994,7 +999,7 @@ export default {
: "",
planEndTime: this.addForm.planTime[1] ? this.addForm.planTime[1] : "",
// typeDescribeId: this.addForm.typeDescribeId.join(','),
responsibilityCompany: this.addForm.responsibilityCompany,
responsibilityCompanyId: this.addForm.responsibilityCompanyId,
securityConstructionSchemeType: this.addForm
.securityConstructionSchemeType
? 2
@ -1003,17 +1008,29 @@ export default {
.specialConstructionSchemeType
? 2
: 1,
technicalDisclosureType: this.addForm.specialConstructionSchemeType
technicalDisclosureType: this.addForm.technicalDisclosureType
? 2
: 1,
typeDescribeList,
controlItemList: this.checkList,
controlItemList: this.checkList?this.checkList:null,
technicalDisclosureFile: JSON.stringify(this.fileList),
securityConstructionSchemeFile: JSON.stringify(this.fileList3),
specialConstructionSchemeFile: JSON.stringify(this.fileList2),
id: this.addForm.id,
};
data.projectSn = this.projectSn;
if(data.responsibilityCompanyId){
let find = this.responsibilityList.find(item => {
return item.id == data.responsibilityCompanyId
})
data.responsibilityCompany = find.enterpriseName;
}
if(data.personLiableId){
let find = this.personList.find(item => {
return item.userId == data.personLiableId
})
data.personLiable = find.realName;
}
editDangerousEngineeringRecordApi(data).then((res) => {
console.log(res);
if (res.code == 200) {