Commit 2d1c9c05 authored by 杨帆's avatar 杨帆

Dev yf'

parent dc70a264
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -256,6 +256,8 @@ export default { ...@@ -256,6 +256,8 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getFun(`/risk/plan/floor/list/${id}`) getFun(`/risk/plan/floor/list/${id}`)
.then(res => { .then(res => {
console.log(res.data);
res.data = [{ name: "全部" }, ...res.data];
this.floorListData = res.data; this.floorListData = res.data;
this.changeBuild(res.data[0].name); this.changeBuild(res.data[0].name);
this.option0 = this.changeData(res.data); this.option0 = this.changeData(res.data);
...@@ -271,6 +273,8 @@ export default { ...@@ -271,6 +273,8 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getFun(`/risk/plan/room/list/${id}`) getFun(`/risk/plan/room/list/${id}`)
.then(res => { .then(res => {
if (!res.data) res.data = [];
res.data = [{ id: "-1", name: "全部" }, ...res.data];
this.option2 = this.changeData(res.data); this.option2 = this.changeData(res.data);
this.value2 = res.data[0].id || 0; this.value2 = res.data[0].id || 0;
resolve(res.data); resolve(res.data);
...@@ -291,8 +295,8 @@ export default { ...@@ -291,8 +295,8 @@ export default {
var paramsJson = {}; var paramsJson = {};
if (floorId || roomId) { if (floorId || roomId) {
paramsJson = { paramsJson = {
floorId, floorId: floorId == -1 ? null : floorId,
roomId roomId: roomId == -1 ? null : roomId
}; };
} else { } else {
paramsJson = {}; paramsJson = {};
...@@ -331,7 +335,9 @@ export default { ...@@ -331,7 +335,9 @@ export default {
if (this.value0) { if (this.value0) {
let arr = this.floorListData.filter(item => item.name == this.value0)[0] let arr = this.floorListData.filter(item => item.name == this.value0)[0]
.children; .children;
console.log(arr);
if (!arr) arr = [];
arr = [{ id: "-1", name: "全部" }, ...arr];
this.option1 = this.changeData(arr); this.option1 = this.changeData(arr);
this.value1 = arr[0].id; this.value1 = arr[0].id;
this.roomList(this.value1); this.roomList(this.value1);
......
...@@ -632,12 +632,12 @@ export default { ...@@ -632,12 +632,12 @@ export default {
performTasks() { performTasks() {
sessionStorage.setItem( sessionStorage.setItem(
"buildingId", "buildingId",
this.messageList.riskBuildingListDtos[0].buildingId this.messageList.detailsDto.buildingIds
); );
sessionStorage.setItem("planId", this.messageList.id); sessionStorage.setItem("planId", this.messageList.id);
sessionStorage.setItem( sessionStorage.setItem(
"buildingName", "buildingName",
this.messageList.riskBuildingListDtos[0].buildingName this.messageList.detailsDto.buildingNames
); );
sessionStorage.setItem( sessionStorage.setItem(
"projectId", "projectId",
...@@ -652,8 +652,8 @@ export default { ...@@ -652,8 +652,8 @@ export default {
name: "riskInherent", name: "riskInherent",
params: { params: {
id: this.messageList.id, id: this.messageList.id,
buildingId: this.messageList.riskBuildingListDtos[0].buildingId, buildingId: this.messageList.detailsDto.buildingIds,
buildingName: this.messageList.riskBuildingListDtos[0].buildingName buildingName: this.messageList.detailsDto.buildingNames
} }
}); });
}, },
......
...@@ -85,11 +85,18 @@ ...@@ -85,11 +85,18 @@
placeholder="请选择" placeholder="请选择"
:rules="[{ required: true, message: '风险点类型不能为空' }]" :rules="[{ required: true, message: '风险点类型不能为空' }]"
/> />
<van-field required name="specialEquipment" label="是否为特种设备" v-show="form.pointType=='设备设施类'"> <van-field
<template #input> required
<van-switch disabled v-model="form.specialEquipment" size="20" /> name="specialEquipment"
</template> label="是否为特种设备"
</van-field> v-show="form.pointType == '设备设施类'"
>
<template #input>
<span style="margin-right: 10px;color: red;"></span>
<van-switch disabled v-model="form.specialEquipment" size="20" />
<span style="margin-left: 10px;color: green;"></span>
</template>
</van-field>
<!-- 多选 --> <!-- 多选 -->
<van-field <van-field
v-model="form.safetyWarningSigns" v-model="form.safetyWarningSigns"
...@@ -194,21 +201,21 @@ ...@@ -194,21 +201,21 @@
/> />
应采取的管控措施 应采取的管控措施
</div> </div>
<van-field label="技术措施"> <van-field label="技术措施">
<template #input> <template #input>
<van-field <van-field
readonly readonly
v-model="form.measuresProject" v-model="form.measuresProject"
name="measuresProject" name="measuresProject"
label="" label=""
type="textarea" type="textarea"
rows="3" rows="3"
autosize autosize
placeholder="请输入" placeholder="请输入"
style="padding-left: 0;padding-top: 0;" style="padding-left: 0;padding-top: 0;"
/> />
</template> </template>
</van-field> </van-field>
<van-field name="measuresProjectFile[]" label="技术措施附件"> <van-field name="measuresProjectFile[]" label="技术措施附件">
<template #input> <template #input>
<van-uploader <van-uploader
...@@ -244,22 +251,22 @@ ...@@ -244,22 +251,22 @@
</template> </template>
</van-field> </van-field>
<van-field label="管控措施"> <van-field label="管理措施">
<template #input> <template #input>
<van-field <van-field
readonly readonly
v-model="form.measuresAdministration" v-model="form.measuresAdministration"
name="measuresAdministration" name="measuresAdministration"
label="" label=""
type="textarea" type="textarea"
rows="3" rows="3"
autosize autosize
placeholder="请输入" placeholder="请输入"
style="padding-left: 0;padding-top: 0;" style="padding-left: 0;padding-top: 0;"
/> />
</template> </template>
</van-field> </van-field>
<van-field name="measuresAdministrationFile[]" label="管措施附件"> <van-field name="measuresAdministrationFile[]" label="管措施附件">
<template #input> <template #input>
<van-uploader <van-uploader
multiple multiple
...@@ -293,21 +300,21 @@ ...@@ -293,21 +300,21 @@
</van-uploader> </van-uploader>
</template> </template>
</van-field> </van-field>
<van-field label="应急措施"> <van-field label="应急措施">
<template #input> <template #input>
<van-field <van-field
readonly readonly
v-model="form.measuresEmergency" v-model="form.measuresEmergency"
name="measuresEmergency" name="measuresEmergency"
label="" label=""
type="textarea" type="textarea"
rows="3" rows="3"
autosize autosize
placeholder="请输入" placeholder="请输入"
style="padding-left: 0;padding-top: 0;" style="padding-left: 0;padding-top: 0;"
/> />
</template> </template>
</van-field> </van-field>
<van-field name="measuresEmergencyFile[]" label="应急措施附件"> <van-field name="measuresEmergencyFile[]" label="应急措施附件">
<template #input> <template #input>
<van-uploader <van-uploader
...@@ -344,7 +351,7 @@ ...@@ -344,7 +351,7 @@
</template> </template>
</van-field> </van-field>
<van-field <van-field
v-model="form.measuresDeptName" v-model="form.measuresDeptName"
name="measuresDeptName" name="measuresDeptName"
label="管控责任单位 " label="管控责任单位 "
...@@ -364,17 +371,17 @@ ...@@ -364,17 +371,17 @@
placeholder="请输入" placeholder="请输入"
readonly readonly
/> />
<van-field <van-field
v-model="form.measuresUserPhone" v-model="form.measuresUserPhone"
name="measuresUserPhone" name="measuresUserPhone"
label="管控责任人联系方式" label="管控责任人联系方式"
type="textarea" type="textarea"
rows="1" rows="1"
autosize autosize
placeholder="请输入" placeholder="请输入"
maxlength="11" maxlength="11"
readonly readonly
/> />
<div <div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;" style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
...@@ -388,7 +395,9 @@ ...@@ -388,7 +395,9 @@
</div> </div>
<van-field name="majorHazardSource" label="是否为重大危险源"> <van-field name="majorHazardSource" label="是否为重大危险源">
<template #input> <template #input>
<span style="margin-right: 10px;color: red;"></span>
<van-switch disabled v-model="form.majorHazardSource" size="20" /> <van-switch disabled v-model="form.majorHazardSource" size="20" />
<span style="margin-left: 10px;color: green;"></span>
</template> </template>
</van-field> </van-field>
<van-field <van-field
...@@ -401,21 +410,20 @@ ...@@ -401,21 +410,20 @@
autosize autosize
placeholder="请输入" placeholder="请输入"
/> />
<van-field label="重大危险源描述" :required="form.majorHazardSource"> <van-field label="重大危险源描述" :required="form.majorHazardSource">
<template #input> <template #input>
<van-field <van-field
readonly readonly
v-model="form.majorHazardSourceDescription" v-model="form.majorHazardSourceDescription"
name="majorHazardSourceDescription" name="majorHazardSourceDescription"
label="" label=""
type="textarea" type="textarea"
rows="3" rows="3"
autosize autosize
placeholder="请输入" placeholder="请输入"
style="padding-left: 0;padding-top: 0;" style="padding-left: 0;padding-top: 0;"
/> />
</template> </template>
</van-field> </van-field>
...@@ -480,7 +488,7 @@ export default { ...@@ -480,7 +488,7 @@ export default {
isTimely: 1, isTimely: 1,
active: 0, active: 0,
form: { form: {
specialEquipment:false specialEquipment: false
}, },
projectId: "", // 所属工程 projectId: "", // 所属工程
projectName: "", // 所属工程 projectName: "", // 所属工程
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment