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);
}); });
......
...@@ -96,9 +96,19 @@ ...@@ -96,9 +96,19 @@
@click="selectData('pointType', true)" @click="selectData('pointType', true)"
:rules="[{ required: true, message: '风险点类型不能为空' }]" :rules="[{ required: true, message: '风险点类型不能为空' }]"
/> />
<van-field required label="是否为特种设备" v-show="form.pointType=='设备设施类'"> <van-field
required
label="是否为特种设备"
v-show="form.pointType == '设备设施类'"
>
<template #input> <template #input>
<van-switch v-model="form.specialEquipment" size="20" name="specialEquipment" /> <span style="margin-right: 10px;color: red;"></span>
<van-switch
v-model="form.specialEquipment"
size="20"
name="specialEquipment"
/>
<span style="margin-left: 10px;color: green;"></span>
</template> </template>
</van-field> </van-field>
<!-- 多选 --> <!-- 多选 -->
...@@ -256,7 +266,7 @@ ...@@ -256,7 +266,7 @@
</van-uploader> </van-uploader>
</template> </template>
</van-field> </van-field>
<van-field label="管控措施"> <van-field label="管理措施">
<template #input> <template #input>
<van-field <van-field
v-model="form.measuresAdministration" v-model="form.measuresAdministration"
...@@ -270,7 +280,7 @@ ...@@ -270,7 +280,7 @@
/> />
</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
...@@ -356,30 +366,43 @@ ...@@ -356,30 +366,43 @@
v-model="form.measuresDeptName" v-model="form.measuresDeptName"
name="measuresDeptName" name="measuresDeptName"
label="管控责任单位 " label="管控责任单位 "
type="textarea" type="input"
rows="1" rows="1"
autosize autosize
placeholder="请输入" placeholder="请输入"
list="measure-deptname"
@input="measuresDeptNameChange"
/> />
<select> <datalist id="measure-deptname">
<option>JAVA</option> <option
<option>C++</option> :value="item.measuresDeptName"
<option>C+</option> v-for="item in measureDeptList"
</select> :key="item.measuresDeptName"
></option>
</datalist>
<van-field <van-field
v-model="form.measuresUserName" v-model="form.measuresUserName"
name="measuresUserName" name="measuresUserName"
label="管控责任人 " label="管控责任人 "
type="textarea" type="input"
rows="1" rows="1"
autosize autosize
placeholder="请输入" placeholder="请输入"
list="measure-name"
@input="measuresUserNameChange"
/> />
<datalist id="measure-name">
<option
v-for="item in measureNameList"
:key="item.measuresUserName"
:value="item.measuresUserName"
></option>
</datalist>
<van-field <van-field
v-model="form.measuresUserPhone" v-model="form.measuresUserPhone"
name="measuresUserPhone" name="measuresUserPhone"
label="管控责任人联系方式" label="管控责任人联系方式"
type="textarea" type="input"
rows="1" rows="1"
autosize autosize
placeholder="请输入" placeholder="请输入"
...@@ -399,7 +422,9 @@ ...@@ -399,7 +422,9 @@
<van-field name="majorHazardSource" label="是否为重大危险源"> <van-field name="majorHazardSource" label="是否为重大危险源">
<template #input> <template #input>
<span style="margin-right: 10px;color: red;"></span>
<van-switch v-model="form.majorHazardSource" size="20" /> <van-switch v-model="form.majorHazardSource" size="20" />
<span style="margin-left: 10px;color: green;"></span>
</template> </template>
</van-field> </van-field>
<van-field <van-field
...@@ -412,10 +437,18 @@ ...@@ -412,10 +437,18 @@
rows="1" rows="1"
autosize autosize
placeholder="请输入" placeholder="请输入"
:key="form.majorHazardSource+'123'" :key="form.majorHazardSource + '123'"
:rules="form.majorHazardSource?[{ required: true, message: '危险源名称不能为空' }]:[]" :rules="
form.majorHazardSource
? [{ required: true, message: '危险源名称不能为空' }]
: []
"
/> />
<van-field label="重大危险源描述" :disabled="!form.majorHazardSource" :required="form.majorHazardSource"> <van-field
label="重大危险源描述"
:disabled="!form.majorHazardSource"
:required="form.majorHazardSource"
>
<template #input> <template #input>
<van-field <van-field
:disabled="!form.majorHazardSource" :disabled="!form.majorHazardSource"
...@@ -425,10 +458,13 @@ ...@@ -425,10 +458,13 @@
rows="3" rows="3"
autosize autosize
placeholder="请输入" placeholder="请输入"
:key="form.majorHazardSource+'456'" :key="form.majorHazardSource + '456'"
:rules="form.majorHazardSource?[{ required: true, message: '重大危险源描述不能为空' }]:[]" :rules="
form.majorHazardSource
? [{ required: true, message: '重大危险源描述不能为空' }]
: []
"
style="padding-left: 0;padding-top: 0;" style="padding-left: 0;padding-top: 0;"
/> />
</template> </template>
</van-field> </van-field>
...@@ -438,16 +474,22 @@ ...@@ -438,16 +474,22 @@
readonly readonly
clickable clickable
name="referenceBasis" name="referenceBasis"
:value="form.referenceBasis=='null'?'':form.referenceBasis" :value="form.referenceBasis == 'null' ? '' : form.referenceBasis"
label="判断依据" label="判断依据"
placeholder="请选择" placeholder="请选择"
:key="form.majorHazardSource+'789'" :key="form.majorHazardSource + '789'"
:rules="form.majorHazardSource?[{ required: true, message: '判断依据不能为空' }]:[]" :rules="
@click="()=>{ form.majorHazardSource
if(form.majorHazardSource){ ? [{ required: true, message: '判断依据不能为空' }]
selectData('referenceBasis', false) : []
"
@click="
() => {
if (form.majorHazardSource) {
selectData('referenceBasis', false);
}
} }
}" "
/> />
<!-- <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;"
...@@ -627,7 +669,13 @@ ...@@ -627,7 +669,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>
...@@ -853,6 +901,10 @@ export default { ...@@ -853,6 +901,10 @@ export default {
}, },
data() { data() {
return { return {
loadingStatus: false,
loadingText: "提交...",
measureNameList: [],
measureDeptList: [],
showIndex: null, showIndex: null,
measuresDept: false, measuresDept: false,
ShowfloorList: false, ShowfloorList: false,
...@@ -877,7 +929,7 @@ export default { ...@@ -877,7 +929,7 @@ export default {
id: "", id: "",
isTimely: 1, isTimely: 1,
active: 0, active: 0,
form: { }, form: {},
projectId: "", // 所属工程 projectId: "", // 所属工程
projectName: "", // 所属工程 projectName: "", // 所属工程
projectDirectorName: "", // 所属工程 projectDirectorName: "", // 所属工程
...@@ -954,6 +1006,25 @@ export default { ...@@ -954,6 +1006,25 @@ export default {
} }
}, },
methods: { methods: {
measuresUserNameChange(e) {
getFun(
`/risk/plan/inherent/getResponsibilityPersons?personName=${e}&projectId=${this.form.projectId}`
).then(res => {
this.measureNameList = res.data;
this.measureNameList.forEach(item => {
if (item.measuresUserName == e)
this.form.measuresUserPhone = item.measuresUserPhone;
});
console.log(e, 1111);
});
},
measuresDeptNameChange(e) {
getFun(
`/risk/plan/inherent/getResponsibilityUnits?unitName=${e}&projectId=${this.form.projectId}`
).then(res => {
this.measureDeptList = res.data;
});
},
// 详情 // 详情
goDetail(data) { goDetail(data) {
sessionStorage.setItem("inherentId", this.inherentId); sessionStorage.setItem("inherentId", this.inherentId);
...@@ -1302,7 +1373,8 @@ export default { ...@@ -1302,7 +1373,8 @@ export default {
// console.log('%c [ values ]-592', 'font-size:13px; background:pink; color:#bf2c9f;', values) // console.log('%c [ values ]-592', 'font-size:13px; background:pink; color:#bf2c9f;', values)
var formDataJson = this.jsonToFormData(this.form); var formDataJson = this.jsonToFormData(this.form);
let url = "/risk/plan/inherent"; let url = "/risk/plan/inherent";
(values.hdPicture1||[]).forEach(item => { this.loadingStatus = true;
(values.hdPicture1 || []).forEach(item => {
if (item.file) { if (item.file) {
formDataJson.append("pictureFile[]", item.file); formDataJson.append("pictureFile[]", item.file);
} else { } else {
...@@ -1337,11 +1409,13 @@ export default { ...@@ -1337,11 +1409,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();
}, },
...@@ -1463,12 +1537,12 @@ export default { ...@@ -1463,12 +1537,12 @@ export default {
} }
}, },
watch: { watch: {
'form.pointType'(val,old){ "form.pointType"(val, old) {
if(old){ if (old) {
if(val=='设备设施类'){ if (val == "设备设施类") {
this.form.specialEquipment = false this.form.specialEquipment = false;
}else{ } else {
this.form.specialEquipment='' this.form.specialEquipment = "";
} }
} }
} }
......
...@@ -94,9 +94,19 @@ ...@@ -94,9 +94,19 @@
@click="selectData('pointType', true)" @click="selectData('pointType', true)"
:rules="[{ required: true, message: '风险点类型不能为空' }]" :rules="[{ required: true, message: '风险点类型不能为空' }]"
/> />
<van-field required label="是否为特种设备" v-show="form.pointType=='设备设施类'"> <van-field
required
label="是否为特种设备"
v-show="form.pointType == '设备设施类'"
>
<template #input> <template #input>
<van-switch name="specialEquipment" v-model="form.specialEquipment" size="20" /> <span style="margin-right: 10px;color: red;"></span>
<van-switch
name="specialEquipment"
v-model="form.specialEquipment"
size="20"
/>
<span style="margin-left: 10px;color: green;"></span>
</template> </template>
</van-field> </van-field>
<!-- 多选 --> <!-- 多选 -->
...@@ -253,7 +263,7 @@ ...@@ -253,7 +263,7 @@
</van-uploader> </van-uploader>
</template> </template>
</van-field> </van-field>
<van-field label="管控措施"> <van-field label="管理措施">
<template #input> <template #input>
<van-field <van-field
v-model="form.measuresAdministration" v-model="form.measuresAdministration"
...@@ -267,7 +277,7 @@ ...@@ -267,7 +277,7 @@
/> />
</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
...@@ -356,11 +366,15 @@ ...@@ -356,11 +366,15 @@
rows="1" rows="1"
autosize autosize
placeholder="请输入" placeholder="请输入"
list="measure-deptname-input" list="measure-deptname"
@input="measuresDeptNameChange" @input="measuresDeptNameChange"
/> />
<datalist id="measure-deptname"> <datalist id="measure-deptname">
<option value="Chocolate" v-for="item in measureDeptList" :key="item.id"/> <option
:value="item.measuresDeptName"
v-for="item in measureDeptList"
:key="item.measuresDeptName"
></option>
</datalist> </datalist>
<van-field <van-field
v-model="form.measuresUserName" v-model="form.measuresUserName"
...@@ -374,7 +388,11 @@ ...@@ -374,7 +388,11 @@
@input="measuresUserNameChange" @input="measuresUserNameChange"
/> />
<datalist id="measure-name"> <datalist id="measure-name">
<option value="Chocolate" v-for="item in measureNameList" :key="item.id"/> <option
v-for="item in measureNameList"
:key="item.measuresUserName"
:value="item.measuresUserName"
></option>
</datalist> </datalist>
<van-field <van-field
v-model="form.measuresUserPhone" v-model="form.measuresUserPhone"
...@@ -399,7 +417,9 @@ ...@@ -399,7 +417,9 @@
<van-field name="majorHazardSource" label="是否为重大危险源"> <van-field name="majorHazardSource" label="是否为重大危险源">
<template #input> <template #input>
<span style="margin-right: 10px;color: red;"></span>
<van-switch v-model="form.majorHazardSource" size="20" /> <van-switch v-model="form.majorHazardSource" size="20" />
<span style="margin-left: 10px;color: green;"></span>
</template> </template>
</van-field> </van-field>
<van-field <van-field
...@@ -412,11 +432,18 @@ ...@@ -412,11 +432,18 @@
rows="1" rows="1"
autosize autosize
placeholder="请输入" placeholder="请输入"
:key="form.majorHazardSource+'456'" :key="form.majorHazardSource + '456'"
:rules="form.majorHazardSource?[{ required: true, message: '危险源名称不能为空' }]:[]" :rules="
form.majorHazardSource
? [{ required: true, message: '危险源名称不能为空' }]
: []
"
/> />
<van-field label="重大危险源描述" :disabled="!form.majorHazardSource" <van-field
:required="form.majorHazardSource"> label="重大危险源描述"
:disabled="!form.majorHazardSource"
:required="form.majorHazardSource"
>
<template #input> <template #input>
<van-field <van-field
:disabled="!form.majorHazardSource" :disabled="!form.majorHazardSource"
...@@ -427,8 +454,12 @@ ...@@ -427,8 +454,12 @@
rows="3" rows="3"
autosize autosize
placeholder="请输入" placeholder="请输入"
:key="form.majorHazardSource+'123'" :key="form.majorHazardSource + '123'"
:rules="form.majorHazardSource?[{ required: true, message: '重大危险源描述不能为空' }]:[]" :rules="
form.majorHazardSource
? [{ required: true, message: '重大危险源描述不能为空' }]
: []
"
style="padding-left: 0;padding-top: 0;" style="padding-left: 0;padding-top: 0;"
/> />
</template> </template>
...@@ -440,16 +471,22 @@ ...@@ -440,16 +471,22 @@
readonly readonly
clickable clickable
name="referenceBasis" name="referenceBasis"
:value="form.referenceBasis=='null'?'':form.referenceBasis" :value="form.referenceBasis == 'null' ? '' : form.referenceBasis"
label="判断依据" label="判断依据"
placeholder="请选择" placeholder="请选择"
:key="form.majorHazardSource+'7'" :key="form.majorHazardSource + '7'"
:rules="form.majorHazardSource?[{ required: true, message: '判断依据不能为空' }]:[]" :rules="
@click="()=>{ form.majorHazardSource
if(form.majorHazardSource){ ? [{ required: true, message: '判断依据不能为空' }]
selectData('referenceBasis', false) : []
"
@click="
() => {
if (form.majorHazardSource) {
selectData('referenceBasis', false);
}
} }
}" "
/> />
<van-dialog <van-dialog
v-model="showGradeDialog" v-model="showGradeDialog"
...@@ -615,7 +652,13 @@ ...@@ -615,7 +652,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>
...@@ -682,8 +725,10 @@ export default { ...@@ -682,8 +725,10 @@ export default {
}, },
data() { data() {
return { return {
measureNameList:[], loadingStatus: false,
measureDeptList:[], loadingText: "提交...",
measureNameList: [],
measureDeptList: [],
measuresDept: false, measuresDept: false,
ShowfloorList: false, ShowfloorList: false,
floorSource: [], floorSource: [],
...@@ -708,7 +753,7 @@ export default { ...@@ -708,7 +753,7 @@ export default {
isTimely: 1, isTimely: 1,
active: 0, active: 0,
form: { form: {
specialEquipment:'' specialEquipment: ""
}, },
projectId: "", // 所属工程 projectId: "", // 所属工程
projectName: "", // 所属工程 projectName: "", // 所属工程
...@@ -720,14 +765,7 @@ export default { ...@@ -720,14 +765,7 @@ export default {
factor: "", //风险因素 factor: "", //风险因素
showFactor: false, showFactor: false,
columnsFactor: [], columnsFactor: [],
messageList: [ messageList: [],
{
title: "回显风险源名称",
time: "2022-12-12",
name: "Mr.周",
state: 1
}
],
source: "", //风险源 source: "", //风险源
userPrefix: "", //风险源 userPrefix: "", //风险源
showSource: false, showSource: false,
...@@ -799,21 +837,24 @@ export default { ...@@ -799,21 +837,24 @@ export default {
methods: { methods: {
/* swp add */ /* swp add */
measuresUserNameChange(e){ measuresUserNameChange(e) {
this.getMeasureList(e) getFun(
}, `/risk/plan/inherent/getResponsibilityPersons?personName=${e}&projectId=${this.form.projectId}`
measuresDeptNameChange(e){ ).then(res => {
this.getMeasureList(e) this.measureNameList = res.data;
this.measureNameList.forEach(item => {
if (item.measuresUserName == e)
this.form.measuresUserPhone = item.measuresUserPhone;
});
console.log(e, 1111);
});
}, },
getMeasureList(search){ measuresDeptNameChange(e) {
getFun('').then(res => { getFun(
if (isSinge) { `/risk/plan/inherent/getResponsibilityUnits?unitName=${e}&projectId=${this.form.projectId}`
).then(res => {
} else { this.measureDeptList = res.data;
this.columnsCheckData = res.data; });
this.showCheckSelect = true;
}
})
}, },
/* swp add end */ /* swp add end */
// 项目负责人 // 项目负责人
...@@ -1037,6 +1078,7 @@ export default { ...@@ -1037,6 +1078,7 @@ export default {
// console.log('%c [ values ]-592', 'font-size:13px; background:pink; color:#bf2c9f;', values) // console.log('%c [ values ]-592', 'font-size:13px; background:pink; color:#bf2c9f;', values)
var formDataJson = this.jsonToFormData(this.form); var formDataJson = this.jsonToFormData(this.form);
let url = "/risk/plan/inherent"; let url = "/risk/plan/inherent";
this.loadingStatus = true;
values.hdPicture1.forEach(item => { values.hdPicture1.forEach(item => {
if (item.file) { if (item.file) {
formDataJson.append("pictureFile[]", item.file); formDataJson.append("pictureFile[]", item.file);
...@@ -1065,6 +1107,7 @@ export default { ...@@ -1065,6 +1107,7 @@ export default {
formDataJson.append("measuresAdministrationFile[]", item.fileId); formDataJson.append("measuresAdministrationFile[]", item.fileId);
} }
}); });
postFun(url, formDataJson) postFun(url, formDataJson)
.then(res => { .then(res => {
this.$toast.clear(); this.$toast.clear();
...@@ -1072,11 +1115,13 @@ export default { ...@@ -1072,11 +1115,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();
}, },
...@@ -1240,11 +1285,11 @@ export default { ...@@ -1240,11 +1285,11 @@ export default {
} }
}, },
watch: { watch: {
'form.pointType'(val,old){ "form.pointType"(val, old) {
if(val=='设备设施类'){ if (val == "设备设施类") {
this.form.specialEquipment = false this.form.specialEquipment = false;
}else{ } else {
this.form.specialEquipment = '' this.form.specialEquipment = "";
} }
} }
} }
......
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
</van-uploader> </van-uploader>
</template> </template>
</van-field> </van-field>
<van-field label="管控措施"> <van-field label="管理措施">
<template #input> <template #input>
<van-field <van-field
v-model="form.measuresAdministration" v-model="form.measuresAdministration"
...@@ -219,7 +219,7 @@ ...@@ -219,7 +219,7 @@
/> />
</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
...@@ -305,25 +305,43 @@ ...@@ -305,25 +305,43 @@
v-model="form.measuresDeptName" v-model="form.measuresDeptName"
name="measuresDeptName" name="measuresDeptName"
label="管控责任单位 " label="管控责任单位 "
type="textarea" type="input"
rows="1" rows="1"
autosize autosize
placeholder="请输入" placeholder="请输入"
list="measure-deptname"
@input="measuresDeptNameChange"
/> />
<datalist id="measure-deptname">
<option
:value="item.measuresDeptName"
v-for="item in measureDeptList"
:key="item.measuresDeptName"
></option>
</datalist>
<van-field <van-field
v-model="form.measuresUserName" v-model="form.measuresUserName"
name="measuresUserName" name="measuresUserName"
label="管控责任人 " label="管控责任人 "
type="textarea" type="input"
rows="1" rows="1"
autosize autosize
placeholder="请输入" placeholder="请输入"
list="measure-name"
@input="measuresUserNameChange"
/> />
<datalist id="measure-name">
<option
v-for="item in measureNameList"
:key="item.measuresUserName"
:value="item.measuresUserName"
></option>
</datalist>
<van-field <van-field
v-model="form.measuresUserPhone" v-model="form.measuresUserPhone"
name="measuresUserPhone" name="measuresUserPhone"
label="管控责任人联系方式" label="管控责任人联系方式"
type="textarea" type="input"
rows="1" rows="1"
autosize autosize
placeholder="请输入" placeholder="请输入"
...@@ -525,7 +543,13 @@ ...@@ -525,7 +543,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>
...@@ -571,6 +595,10 @@ export default { ...@@ -571,6 +595,10 @@ export default {
}, },
data() { data() {
return { return {
loadingStatus: false,
loadingText: "提交...",
measureNameList: [],
measureDeptList: [],
isEdit: false, isEdit: false,
existingId: 0, existingId: 0,
measuresDept: false, measuresDept: false,
...@@ -667,6 +695,25 @@ export default { ...@@ -667,6 +695,25 @@ export default {
} }
}, },
methods: { methods: {
measuresUserNameChange(e) {
getFun(
`/risk/plan/inherent/getResponsibilityPersons?personName=${e}&projectId=${this.form.projectId}`
).then(res => {
this.measureNameList = res.data;
this.measureNameList.forEach(item => {
if (item.measuresUserName == e)
this.form.measuresUserPhone = item.measuresUserPhone;
});
console.log(e, 1111);
});
},
measuresDeptNameChange(e) {
getFun(
`/risk/plan/inherent/getResponsibilityUnits?unitName=${e}&projectId=${this.form.projectId}`
).then(res => {
this.measureDeptList = res.data;
});
},
// 请求详情数据 // 请求详情数据
postReturnEcho() { postReturnEcho() {
this.$toast.loading({ this.$toast.loading({
...@@ -731,37 +778,11 @@ export default { ...@@ -731,37 +778,11 @@ export default {
this.form.factor = res.data.factor; this.form.factor = res.data.factor;
this.form.type = res.data.type; this.form.type = res.data.type;
this.form.planId = res.data.planId; this.form.planId = res.data.planId;
this.form.measuresProject = res.data.measuresProject;
this.uploaderImg = (res.data.pictureFile || []).map(item => { this.form.measuresAdministration = res.data.measuresAdministration;
return { this.form.measuresDeptName = res.data.measuresDeptName;
...item, this.form.measuresUserName = res.data.measuresUserName;
url: item.filePath this.form.measuresUserPhone = res.data.measuresUserPhone;
};
});
this.measuresProjectFile = (res.data.measuresProjectFile || []).map(
item => {
return {
...item,
url: item.filePath
};
}
);
this.measuresAdministrationFile = (
res.data.measuresAdministrationFile || []
).map(item => {
return {
...item,
url: item.filePath
};
});
this.measuresEmergencyFile = (
res.data.measuresEmergencyFile || []
).map(item => {
return {
...item,
url: item.filePath
};
});
this.$forceUpdate(); this.$forceUpdate();
}) })
.catch(() => { .catch(() => {
...@@ -975,6 +996,7 @@ export default { ...@@ -975,6 +996,7 @@ export default {
// console.log('%c [ values ]-592', 'font-size:13px; background:pink; color:#bf2c9f;', values) // console.log('%c [ values ]-592', 'font-size:13px; background:pink; color:#bf2c9f;', values)
var formDataJson = this.jsonToFormData(this.form); var formDataJson = this.jsonToFormData(this.form);
// let url = "/risk/plan/inherent"; // let url = "/risk/plan/inherent";
this.loadingStatus = true;
let url = "/risk/plan/existing"; let url = "/risk/plan/existing";
values.hdPicture1.forEach(item => { values.hdPicture1.forEach(item => {
if (item.file) { if (item.file) {
...@@ -1011,11 +1033,13 @@ export default { ...@@ -1011,11 +1033,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();
}, },
......
...@@ -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(){
......
...@@ -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
} }
}); });
}, },
......
...@@ -210,7 +210,7 @@ ...@@ -210,7 +210,7 @@
</template> </template>
</van-field> </van-field>
<van-field label="管措施"> <van-field label="管措施">
<template #input> <template #input>
<van-field <van-field
readonly readonly
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
/> />
</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
...@@ -348,7 +348,6 @@ ...@@ -348,7 +348,6 @@
:value="form.referenceBasis" :value="form.referenceBasis"
label="判断依据" label="判断依据"
placeholder="请选择" placeholder="请选择"
/> />
<van-field <van-field
readonly readonly
......
...@@ -85,9 +85,16 @@ ...@@ -85,9 +85,16 @@
placeholder="请选择" placeholder="请选择"
:rules="[{ required: true, message: '风险点类型不能为空' }]" :rules="[{ required: true, message: '风险点类型不能为空' }]"
/> />
<van-field required name="specialEquipment" label="是否为特种设备" v-show="form.pointType=='设备设施类'"> <van-field
required
name="specialEquipment"
label="是否为特种设备"
v-show="form.pointType == '设备设施类'"
>
<template #input> <template #input>
<span style="margin-right: 10px;color: red;"></span>
<van-switch disabled v-model="form.specialEquipment" size="20" /> <van-switch disabled v-model="form.specialEquipment" size="20" />
<span style="margin-left: 10px;color: green;"></span>
</template> </template>
</van-field> </van-field>
<!-- 多选 --> <!-- 多选 -->
...@@ -244,7 +251,7 @@ ...@@ -244,7 +251,7 @@
</template> </template>
</van-field> </van-field>
<van-field label="管控措施"> <van-field label="管理措施">
<template #input> <template #input>
<van-field <van-field
readonly readonly
...@@ -259,7 +266,7 @@ ...@@ -259,7 +266,7 @@
/> />
</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
...@@ -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
...@@ -402,7 +411,6 @@ ...@@ -402,7 +411,6 @@
placeholder="请输入" placeholder="请输入"
/> />
<van-field label="重大危险源描述" :required="form.majorHazardSource"> <van-field label="重大危险源描述" :required="form.majorHazardSource">
<template #input> <template #input>
<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