Commit 307001b1 authored by p-wanping.song's avatar p-wanping.song

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

parents feeb85f6 007def98
...@@ -275,7 +275,7 @@ export default { ...@@ -275,7 +275,7 @@ export default {
item.position.isDraggable = false; item.position.isDraggable = false;
item.position.isResizable = false; item.position.isResizable = false;
} }
if (!this.isViews || item.position.type == "thorough") { if (!this.isViews ) {
//添加页面不显示颜色 //添加页面不显示颜色
item.position.c = "#e6e5e5"; item.position.c = "#e6e5e5";
} else { } else {
...@@ -293,7 +293,7 @@ export default { ...@@ -293,7 +293,7 @@ export default {
// }else if (item.score>=0 && item.score <= 6) { //差 // }else if (item.score>=0 && item.score <= 6) { //差
// item.position.c = this.colorList[0] // 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.layout.push(item.position);
}); });
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -258,7 +258,13 @@ ...@@ -258,7 +258,13 @@
</van-popup> </van-popup>
<div style="margin: 16px 16px 0"> <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 >提交</van-button
> >
</div> </div>
...@@ -297,6 +303,8 @@ export default { ...@@ -297,6 +303,8 @@ export default {
}, },
data() { data() {
return { return {
loadingStatus: false,
loadingText: "提交...",
taskId: "", taskId: "",
text: "创建任务", text: "创建任务",
id: "", id: "",
...@@ -504,12 +512,13 @@ export default { ...@@ -504,12 +512,13 @@ export default {
} }
}, },
onSubmit(values) { onSubmit(values) {
this.$toast.loading({ // this.$toast.loading({
message: "加载中...", // message: "加载中...",
forbidClick: true, // forbidClick: true,
loadingType: "spinner", // loadingType: "spinner",
duration: 0 // duration: 0
}); // });
this.loadingStatus = true;
let url = "/risk/plan"; let url = "/risk/plan";
postFun(url, this.form) postFun(url, this.form)
.then(res => { .then(res => {
...@@ -518,11 +527,13 @@ export default { ...@@ -518,11 +527,13 @@ export default {
message: "提交成功", message: "提交成功",
duration: 2000 duration: 2000
}); });
this.loadingStatus = false;
history.go(-1); history.go(-1);
}) })
.catch(() => { .catch(() => {
this.$toast.clear(); this.$toast.clear();
this.$toast.fail("提交失败,请稍后再试"); this.$toast.fail("提交失败,请稍后再试");
this.loadingStatus = false;
}); });
this.$toast.clear(); this.$toast.clear();
}, },
......
...@@ -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);
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<div class="section"> <div class="section">
<p>该次测评风险值为:</p> <p>该次测评风险值为:</p>
<div class="resultScore"> <div class="resultScore" :style="{ background: backgroundColor}" >
<p style="font-weight: bold;font-size: 20px;">{{ this.$route.params.score }}</p> <p style="font-weight: bold;font-size: 20px;color: white;">{{ this.$route.params.score }}</p>
</div> </div>
<p>本次评估结果评定为:{{ level }}</p> <p>本次评估结果评定为:{{ level }}</p>
<van-divider></van-divider> <van-divider></van-divider>
...@@ -34,7 +34,8 @@ import LHeader from "@/components/header.vue"; ...@@ -34,7 +34,8 @@ import LHeader from "@/components/header.vue";
return{ return{
text:'测评结果', text:'测评结果',
score:0, score:0,
level:'' level:'',
backgroundColor:'',
} }
}, },
created(){ created(){
...@@ -45,6 +46,8 @@ import LHeader from "@/components/header.vue"; ...@@ -45,6 +46,8 @@ import LHeader from "@/components/header.vue";
getFun(`/risk/plan/matrix/score/${this.$route.params.score}`).then(res=>{ getFun(`/risk/plan/matrix/score/${this.$route.params.score}`).then(res=>{
this.level = res.data.level this.level = res.data.level
this.score = res.data.max this.score = res.data.max
this.backgroundColor=this.level=='一般风险'?"#FFFF00":this.level=='较小风险'?"#0091EA":this.level=='较大风险'?"#FF9800":this.level=='重大风险'?"#FF4433":"orange";
}) })
}, },
resetClose(){ resetClose(){
...@@ -88,6 +91,6 @@ import LHeader from "@/components/header.vue"; ...@@ -88,6 +91,6 @@ import LHeader from "@/components/header.vue";
border-radius: 50%; border-radius: 50%;
margin: 0 auto; margin: 0 auto;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -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: "", // 所属工程
......
...@@ -9,11 +9,11 @@ module.exports = { ...@@ -9,11 +9,11 @@ module.exports = {
proxy: { proxy: {
//配置跨域 //配置跨域
"/app-api": { "/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.15.124:8080/', //这里是杨帆的地址
// target: 'http://192.168.10.137:8080/', //这里是昊哥的地址 // target: 'http://192.168.10.137:8080/', //这里是昊哥的地址
// target: 'http://192.168.10.36:8080/', //这里是昊哥的地址 // target: 'http://192.168.10.36:8080/', //这里是昊哥的地址
// target: 'http://localhost:8081/', //这里是后台的地址 target: 'http://localhost:8081/', //这里是后台的地址
ws: true, ws: true,
changOrigin: true //允许跨域 changOrigin: true //允许跨域
// logLevel: 'debug', // 显示代理调试信息 // 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