Commit f6db7daf authored by p-wanping.song's avatar p-wanping.song

Merge branch 'develop' of http://git.censoft.com.cn/rongtong/rongtong-app into dev-swp

parents feeb85f6 007def98
......@@ -275,7 +275,7 @@ export default {
item.position.isDraggable = false;
item.position.isResizable = false;
}
if (!this.isViews || item.position.type == "thorough") {
if (!this.isViews ) {
//添加页面不显示颜色
item.position.c = "#e6e5e5";
} else {
......@@ -293,7 +293,7 @@ export default {
// }else if (item.score>=0 && item.score <= 6) { //差
// item.position.c = this.colorList[0]
// }
item.position.c = this.colorList[Math.floor(Math.random() * 4)];
item.position.c = item.color;
}
this.layout.push(item.position);
});
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -258,7 +258,13 @@
</van-popup>
<div style="margin: 16px 16px 0">
<van-button round block type="info" native-type="submit"
<van-button
:loading="loadingStatus"
:loading-text="loadingText"
round
block
type="info"
native-type="submit"
>提交</van-button
>
</div>
......@@ -297,6 +303,8 @@ export default {
},
data() {
return {
loadingStatus: false,
loadingText: "提交...",
taskId: "",
text: "创建任务",
id: "",
......@@ -504,12 +512,13 @@ export default {
}
},
onSubmit(values) {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0
});
// this.$toast.loading({
// message: "加载中...",
// forbidClick: true,
// loadingType: "spinner",
// duration: 0
// });
this.loadingStatus = true;
let url = "/risk/plan";
postFun(url, this.form)
.then(res => {
......@@ -518,11 +527,13 @@ export default {
message: "提交成功",
duration: 2000
});
this.loadingStatus = false;
history.go(-1);
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("提交失败,请稍后再试");
this.loadingStatus = false;
});
this.$toast.clear();
},
......
......@@ -256,6 +256,8 @@ export default {
return new Promise((resolve, reject) => {
getFun(`/risk/plan/floor/list/${id}`)
.then(res => {
console.log(res.data);
res.data = [{ name: "全部" }, ...res.data];
this.floorListData = res.data;
this.changeBuild(res.data[0].name);
this.option0 = this.changeData(res.data);
......@@ -271,6 +273,8 @@ export default {
return new Promise((resolve, reject) => {
getFun(`/risk/plan/room/list/${id}`)
.then(res => {
if (!res.data) res.data = [];
res.data = [{ id: "-1", name: "全部" }, ...res.data];
this.option2 = this.changeData(res.data);
this.value2 = res.data[0].id || 0;
resolve(res.data);
......@@ -291,8 +295,8 @@ export default {
var paramsJson = {};
if (floorId || roomId) {
paramsJson = {
floorId,
roomId
floorId: floorId == -1 ? null : floorId,
roomId: roomId == -1 ? null : roomId
};
} else {
paramsJson = {};
......@@ -331,7 +335,9 @@ export default {
if (this.value0) {
let arr = this.floorListData.filter(item => item.name == this.value0)[0]
.children;
console.log(arr);
if (!arr) arr = [];
arr = [{ id: "-1", name: "全部" }, ...arr];
this.option1 = this.changeData(arr);
this.value1 = arr[0].id;
this.roomList(this.value1);
......
......@@ -3,8 +3,8 @@
<LHeader :text="text"></LHeader>
<div class="section">
<p>该次测评风险值为:</p>
<div class="resultScore">
<p style="font-weight: bold;font-size: 20px;">{{ this.$route.params.score }}</p>
<div class="resultScore" :style="{ background: backgroundColor}" >
<p style="font-weight: bold;font-size: 20px;color: white;">{{ this.$route.params.score }}</p>
</div>
<p>本次评估结果评定为:{{ level }}</p>
<van-divider></van-divider>
......@@ -34,7 +34,8 @@ import LHeader from "@/components/header.vue";
return{
text:'测评结果',
score:0,
level:''
level:'',
backgroundColor:'',
}
},
created(){
......@@ -45,6 +46,8 @@ import LHeader from "@/components/header.vue";
getFun(`/risk/plan/matrix/score/${this.$route.params.score}`).then(res=>{
this.level = res.data.level
this.score = res.data.max
this.backgroundColor=this.level=='一般风险'?"#FFFF00":this.level=='较小风险'?"#0091EA":this.level=='较大风险'?"#FF9800":this.level=='重大风险'?"#FF4433":"orange";
})
},
resetClose(){
......@@ -88,6 +91,6 @@ import LHeader from "@/components/header.vue";
border-radius: 50%;
margin: 0 auto;
}
}
</style>
\ No newline at end of file
</style>
......@@ -632,12 +632,12 @@ export default {
performTasks() {
sessionStorage.setItem(
"buildingId",
this.messageList.riskBuildingListDtos[0].buildingId
this.messageList.detailsDto.buildingIds
);
sessionStorage.setItem("planId", this.messageList.id);
sessionStorage.setItem(
"buildingName",
this.messageList.riskBuildingListDtos[0].buildingName
this.messageList.detailsDto.buildingNames
);
sessionStorage.setItem(
"projectId",
......@@ -652,8 +652,8 @@ export default {
name: "riskInherent",
params: {
id: this.messageList.id,
buildingId: this.messageList.riskBuildingListDtos[0].buildingId,
buildingName: this.messageList.riskBuildingListDtos[0].buildingName
buildingId: this.messageList.detailsDto.buildingIds,
buildingName: this.messageList.detailsDto.buildingNames
}
});
},
......
......@@ -85,11 +85,18 @@
placeholder="请选择"
:rules="[{ required: true, message: '风险点类型不能为空' }]"
/>
<van-field required name="specialEquipment" label="是否为特种设备" v-show="form.pointType=='设备设施类'">
<template #input>
<van-switch disabled v-model="form.specialEquipment" size="20" />
</template>
</van-field>
<van-field
required
name="specialEquipment"
label="是否为特种设备"
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
v-model="form.safetyWarningSigns"
......@@ -194,21 +201,21 @@
/>
应采取的管控措施
</div>
<van-field label="技术措施">
<template #input>
<van-field
readonly
v-model="form.measuresProject"
name="measuresProject"
label=""
type="textarea"
rows="3"
autosize
placeholder="请输入"
style="padding-left: 0;padding-top: 0;"
/>
</template>
</van-field>
<van-field label="技术措施">
<template #input>
<van-field
readonly
v-model="form.measuresProject"
name="measuresProject"
label=""
type="textarea"
rows="3"
autosize
placeholder="请输入"
style="padding-left: 0;padding-top: 0;"
/>
</template>
</van-field>
<van-field name="measuresProjectFile[]" label="技术措施附件">
<template #input>
<van-uploader
......@@ -244,22 +251,22 @@
</template>
</van-field>
<van-field label="管控措施">
<template #input>
<van-field
readonly
v-model="form.measuresAdministration"
name="measuresAdministration"
label=""
type="textarea"
rows="3"
autosize
placeholder="请输入"
style="padding-left: 0;padding-top: 0;"
/>
</template>
</van-field>
<van-field name="measuresAdministrationFile[]" label="管措施附件">
<van-field label="管理措施">
<template #input>
<van-field
readonly
v-model="form.measuresAdministration"
name="measuresAdministration"
label=""
type="textarea"
rows="3"
autosize
placeholder="请输入"
style="padding-left: 0;padding-top: 0;"
/>
</template>
</van-field>
<van-field name="measuresAdministrationFile[]" label="管措施附件">
<template #input>
<van-uploader
multiple
......@@ -293,21 +300,21 @@
</van-uploader>
</template>
</van-field>
<van-field label="应急措施">
<template #input>
<van-field
readonly
v-model="form.measuresEmergency"
name="measuresEmergency"
label=""
type="textarea"
rows="3"
autosize
placeholder="请输入"
style="padding-left: 0;padding-top: 0;"
/>
</template>
</van-field>
<van-field label="应急措施">
<template #input>
<van-field
readonly
v-model="form.measuresEmergency"
name="measuresEmergency"
label=""
type="textarea"
rows="3"
autosize
placeholder="请输入"
style="padding-left: 0;padding-top: 0;"
/>
</template>
</van-field>
<van-field name="measuresEmergencyFile[]" label="应急措施附件">
<template #input>
<van-uploader
......@@ -344,7 +351,7 @@
</template>
</van-field>
<van-field
<van-field
v-model="form.measuresDeptName"
name="measuresDeptName"
label="管控责任单位 "
......@@ -364,17 +371,17 @@
placeholder="请输入"
readonly
/>
<van-field
v-model="form.measuresUserPhone"
name="measuresUserPhone"
label="管控责任人联系方式"
type="textarea"
rows="1"
autosize
placeholder="请输入"
maxlength="11"
readonly
/>
<van-field
v-model="form.measuresUserPhone"
name="measuresUserPhone"
label="管控责任人联系方式"
type="textarea"
rows="1"
autosize
placeholder="请输入"
maxlength="11"
readonly
/>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
......@@ -388,7 +395,9 @@
</div>
<van-field name="majorHazardSource" label="是否为重大危险源">
<template #input>
<span style="margin-right: 10px;color: red;"></span>
<van-switch disabled v-model="form.majorHazardSource" size="20" />
<span style="margin-left: 10px;color: green;"></span>
</template>
</van-field>
<van-field
......@@ -401,21 +410,20 @@
autosize
placeholder="请输入"
/>
<van-field label="重大危险源描述" :required="form.majorHazardSource">
<van-field label="重大危险源描述" :required="form.majorHazardSource">
<template #input>
<van-field
readonly
v-model="form.majorHazardSourceDescription"
name="majorHazardSourceDescription"
label=""
type="textarea"
rows="3"
autosize
placeholder="请输入"
<van-field
readonly
v-model="form.majorHazardSourceDescription"
name="majorHazardSourceDescription"
label=""
type="textarea"
rows="3"
autosize
placeholder="请输入"
style="padding-left: 0;padding-top: 0;"
/>
/>
</template>
</van-field>
......@@ -480,7 +488,7 @@ export default {
isTimely: 1,
active: 0,
form: {
specialEquipment:false
specialEquipment: false
},
projectId: "", // 所属工程
projectName: "", // 所属工程
......
......@@ -9,11 +9,11 @@ module.exports = {
proxy: {
//配置跨域
"/app-api": {
target: "http://192.168.4.232:8080/", //这里是后台的地址
// target: "http://192.168.4.232:8080/", //这里是后台的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: 'http://192.168.10.137:8080/', //这里是昊哥的地址
// target: 'http://192.168.10.36:8080/', //这里是昊哥的地址
// target: 'http://localhost:8081/', //这里是后台的地址
target: 'http://localhost:8081/', //这里是后台的地址
ws: true,
changOrigin: true //允许跨域
// logLevel: 'debug', // 显示代理调试信息
......
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