Commit 14b930e3 authored by wei's avatar wei

edit

parent d85fa855
...@@ -3,143 +3,53 @@ ...@@ -3,143 +3,53 @@
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<van-tabs v-model="active" @change="tabList" color="#2980f7" animated> <van-tabs v-model="active" @change="tabList" color="#2980f7" animated>
<van-tab title="固有风险信息"> <van-tab title="固有风险信息">
<van-form <van-form @submit="onSubmit" :scroll-to-error="true" :show-error="false" validate-trigger="onSubmit">
@submit="onSubmit"
:scroll-to-error="true"
:show-error="false"
validate-trigger="onSubmit"
>
<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;">
> <img src="@/assets/accidentIcon/bookmark.svg" alt=""
<img style="position: relative;top: 32%;transform: translateY(-50%);" />
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
风险信息 风险信息
</div> </div>
<van-field <van-field readonly required name="userName" :value="form.userName" label="评估人" placeholder="请输入" />
readonly <van-field readonly required name="projectId" :value="form.projectName" label="所属项目"
required placeholder="请输入" />
name="userName" <van-field readonly required name="buildingName" :value="form.buildingName" label="所属建筑物"
:value="form.userName" placeholder="请输入" />
label="评估人"
placeholder="请输入"
/>
<van-field
readonly
required
name="projectId"
:value="form.projectName"
label="所属项目"
placeholder="请输入"
/>
<van-field
readonly
required
name="buildingName"
:value="form.buildingName"
label="所属建筑物"
placeholder="请输入"
/>
<van-field <van-field required clickable name="floorName" :value="form.floorName" label="所属楼层" placeholder="请选择"
required @click="seletFloor('floor')" :rules="[{ required: true, message: '所属楼层不能为空' }]" />
clickable
name="floorName"
:value="form.floorName"
label="所属楼层"
placeholder="请选择"
@click="seletFloor('floor')"
:rules="[{ required: true, message: '所属楼层不能为空' }]"
/>
<van-field <van-field readonly required name="roomName" :value="form.roomName" label="所属房间" placeholder="请输入"
readonly @click="seletRoom('room')" :rules="[{ required: true, message: '所属房间不能为空' }]" />
required
name="roomName"
:value="form.roomName"
label="所属房间"
placeholder="请输入"
@click="seletRoom('room')"
:rules="[{ required: true, message: '所属房间不能为空' }]"
/>
<van-field <van-field readonly required name="name" v-model="form.name" label="风险源名称" placeholder="请输入"
readonly :rules="[{ required: true, message: '风险源名称不能为空' }]" @click="seletSource()" />
required
name="name"
v-model="form.name"
label="风险源名称"
placeholder="请输入"
:rules="[{ required: true, message: '风险源名称不能为空' }]"
@click="seletSource()"
/>
<van-field <van-field v-model="form.factor" required name="factor" label="风险因素" placeholder="请选择"
v-model="form.factor" @click="seletFactor('factor')" :rules="[{ required: true, message: '风险因素不能为空' }]" />
required
name="factor"
label="风险因素"
placeholder="请选择"
@click="seletFactor('factor')"
:rules="[{ required: true, message: '风险因素不能为空' }]"
/>
<van-field <van-field v-model="form.type" required name="type" label="准事故类型" placeholder="请选择"
v-model="form.type" @click="seletType('type')" :rules="[{ required: true, message: '准事故类型不能为空' }]" />
required
name="type"
label="准事故类型"
placeholder="请选择"
@click="seletType('type')"
:rules="[{ required: true, message: '准事故类型不能为空' }]"
/>
<van-field <van-field readonly v-model="form.level" required name="level" label="风险等级" placeholder="请选择"
readonly @click="seletGrade('level')" :rules="[{ required: true, message: '风险等级不能为空' }]" />
v-model="form.level"
required
name="level"
label="风险等级"
placeholder="请选择"
@click="seletGrade('level')"
:rules="[{ required: true, message: '风险等级不能为空' }]"
/>
<van-field <van-field required name="presenceLocation" v-model="form.presenceLocation" label="存在部位"
required placeholder="请输入" :rules="[{ required: true, message: '存在部位不能为空' }]" />
name="presenceLocation"
v-model="form.presenceLocation"
label="存在部位"
placeholder="请输入"
:rules="[{ required: true, message: '存在部位不能为空' }]"
/>
<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;">
> <img src="@/assets/accidentIcon/bookmark.svg" alt=""
<img style="position: relative;top: 32%;transform: translateY(-50%);" />
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
风险源图片 风险源图片
</div> </div>
<van-field name="hdPicture1" label="风险源图片"> <van-field name="hdPicture1" label="风险源图片">
<template #input> <template #input>
<van-uploader <van-uploader @delete="deleteFile(...arguments, 'uploaderImg')" multiple :max-count="5"
@delete="deleteFile(...arguments, 'uploaderImg')" upload-text="最多上传五个" v-model="uploaderImg">
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="uploaderImg"
>
<template slot="default"> <template slot="default">
<!-- 11111111111 --> <!-- 11111111111 -->
<div <div style="
style="
width: 2.13333rem; width: 2.13333rem;
height: 2.13333rem; height: 2.13333rem;
background: #f7f8fa; background: #f7f8fa;
...@@ -147,13 +57,8 @@ ...@@ -147,13 +57,8 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
" ">
> <img src="@/assets/upload/pic.png" alt="" style="width: 0.64rem; height: 0.64rem" />
<img
src="@/assets/upload/pic.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span> <span class="van-uploader__upload-text">最多上传五个</span>
</div> </div>
</template> </template>
...@@ -161,39 +66,20 @@ ...@@ -161,39 +66,20 @@
</template> </template>
</van-field> </van-field>
<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;">
> <img src="@/assets/accidentIcon/bookmark.svg" alt=""
<img style="position: relative;top: 32%;transform: translateY(-50%);" />
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
技术措施 技术措施
</div> </div>
<van-field <van-field v-model="form.measuresProject" name="measuresProject" label="技术措施" type="textarea" rows="1"
v-model="form.measuresProject" autosize placeholder="请输入" />
name="measuresProject"
label="技术措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="measuresProjectFile[]" label=" "> <van-field name="measuresProjectFile[]" label=" ">
<template #input> <template #input>
<van-uploader <van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresProjectFile"
multiple accept="file" result-type="file" @delete="deleteFile(...arguments, 'measuresProjectFile')">
:max-count="5"
upload-text="最多上传五个"
v-model="measuresProjectFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresProjectFile')"
>
<template slot="default"> <template slot="default">
<!-- 11111111111 --> <!-- 11111111111 -->
<div <div style="
style="
width: 2.13333rem; width: 2.13333rem;
height: 2.13333rem; height: 2.13333rem;
background: #f7f8fa; background: #f7f8fa;
...@@ -201,13 +87,9 @@ ...@@ -201,13 +87,9 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
" ">
> <img src="@/assets/upload/file.png" alt=""
<img style="width: 0.64rem; height: 0.64rem" />
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span> <span class="van-uploader__upload-text">最多上传五个</span>
</div> </div>
</template> </template>
...@@ -215,39 +97,21 @@ ...@@ -215,39 +97,21 @@
</template> </template>
</van-field> </van-field>
<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;">
> <img src="@/assets/accidentIcon/bookmark.svg" alt=""
<img style="position: relative;top: 32%;transform: translateY(-50%);" />
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
管理措施 管理措施
</div> </div>
<van-field <van-field v-model="form.measuresAdministration" name="measuresAdministration" label="管理措施"
v-model="form.measuresAdministration" type="textarea" rows="1" autosize placeholder="请输入" />
name="measuresAdministration"
label="管理措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="measuresAdministrationFile[]" label=" "> <van-field name="measuresAdministrationFile[]" label=" ">
<template #input> <template #input>
<van-uploader <van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresAdministrationFile"
multiple accept="file" result-type="file"
:max-count="5" @delete="deleteFile(...arguments, 'measuresAdministrationFile')">
upload-text="最多上传五个"
v-model="measuresAdministrationFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresAdministrationFile')"
>
<template slot="default"> <template slot="default">
<!-- 11111111111 --> <!-- 11111111111 -->
<div <div style="
style="
width: 2.13333rem; width: 2.13333rem;
height: 2.13333rem; height: 2.13333rem;
background: #f7f8fa; background: #f7f8fa;
...@@ -255,13 +119,9 @@ ...@@ -255,13 +119,9 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
" ">
> <img src="@/assets/upload/file.png" alt=""
<img style="width: 0.64rem; height: 0.64rem" />
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span> <span class="van-uploader__upload-text">最多上传五个</span>
</div> </div>
</template> </template>
...@@ -269,39 +129,21 @@ ...@@ -269,39 +129,21 @@
</template> </template>
</van-field> </van-field>
<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;">
> <img src="@/assets/accidentIcon/bookmark.svg" alt=""
<img style="position: relative;top: 32%;transform: translateY(-50%);" />
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
应急措施 应急措施
</div> </div>
<van-field <van-field v-model="form.measuresEmergency" name="measuresEmergency" label="应急措施" type="textarea"
v-model="form.measuresEmergency" rows="1" autosize placeholder="请输入" />
name="measuresEmergency"
label="应急措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="measuresEmergencyFile[]" label=" "> <van-field name="measuresEmergencyFile[]" label=" ">
<template #input> <template #input>
<van-uploader <van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresEmergencyFile"
multiple accept="file" result-type="file"
:max-count="5" @delete="deleteFile(...arguments, 'measuresEmergencyFile')">
upload-text="最多上传五个"
v-model="measuresEmergencyFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresEmergencyFile')"
>
<template slot="default"> <template slot="default">
<!-- 11111111111 --> <!-- 11111111111 -->
<div <div style="
style="
width: 2.13333rem; width: 2.13333rem;
height: 2.13333rem; height: 2.13333rem;
background: #f7f8fa; background: #f7f8fa;
...@@ -309,13 +151,9 @@ ...@@ -309,13 +151,9 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
" ">
> <img src="@/assets/upload/file.png" alt=""
<img style="width: 0.64rem; height: 0.64rem" />
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span> <span class="van-uploader__upload-text">最多上传五个</span>
</div> </div>
</template> </template>
...@@ -323,13 +161,9 @@ ...@@ -323,13 +161,9 @@
</template> </template>
</van-field> </van-field>
<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;">
> <img src="@/assets/accidentIcon/bookmark.svg" alt=""
<img style="position: relative;top: 32%;transform: translateY(-50%);" />
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
参考依据 参考依据
</div> </div>
<!-- <van-field <!-- <van-field
...@@ -345,24 +179,16 @@ ...@@ -345,24 +179,16 @@
/> --> /> -->
<div style="margin: 16px 16px 0"> <div style="margin: 16px 16px 0">
<van-button round block type="info" native-type="submit" <van-button round block type="info" native-type="submit">提交</van-button>
>提交</van-button
>
</div> </div>
</van-form> </van-form>
<div style="margin: 10px 16px 0px; padding-bottom: 16px"> <div style="margin: 10px 16px 0px; padding-bottom: 16px">
<van-button round block type="warning" @click.native="cancel" <van-button round block type="warning" @click.native="cancel">取消</van-button>
>取消</van-button
>
</div> </div>
</van-tab> </van-tab>
<van-tab title="现状风险"> <van-tab title="现状风险">
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
<van-cell-group <van-cell-group inset v-for="(item, index) in messageList" :key="index">
inset
v-for="(item, index) in messageList"
:key="index"
>
<div style="font-size: 0.45rem;padding: 5px 0;"> <div style="font-size: 0.45rem;padding: 5px 0;">
{{ item.title }} {{ item.title }}
</div> </div>
...@@ -382,51 +208,47 @@ ...@@ -382,51 +208,47 @@
<van-col span="15">{{ item.name }}</van-col> <van-col span="15">{{ item.name }}</van-col>
</van-row> </van-row>
</van-col> </van-col>
<van-col <van-col span="7" :style="{ color: item.state == 1 ? '#0069e5' : '#03b615' }">
span="7"
:style="{ color: item.state == 1 ? '#0069e5' : '#03b615' }"
>
{{ "●待审批" }} {{ "●待审批" }}
</van-col> </van-col>
</van-row> </van-row>
</van-cell-group> </van-cell-group>
<div <div style="
style="
width: 100%; width: 100%;
text-align: center; text-align: center;
font-size: 0.48rem; font-size: 0.48rem;
position: fixed; position: fixed;
top: 30%; top: 30%;
" " v-if="messageList['length'] == 0">
v-if="messageList['length'] == 0"
>
暂无数据 暂无数据
</div> </div>
</div> </div>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
<van-popup v-model="showTrouble" position="bottom"> <van-popup v-model="showTrouble" position="bottom">
<van-picker <van-picker show-toolbar value-key="name" :columns="columnsTrouble" @confirm="onConTrouble"
show-toolbar @cancel="showTrouble = false" />
value-key="name" </van-popup>
:columns="columnsTrouble"
@confirm="onConTrouble" <!-- 楼层弹出层 -->
@cancel="showTrouble = false" <van-popup v-model="ShowfloorList" position="bottom" :style="{ height: '100%' }">
/> <selectFloor :listdata="floorSource" @closeSlect="closeSlectfloor" @saveSlect="saveSlectfloor"></selectFloor>
</van-popup>
<!-- 风险源弹出层 -->
<van-popup v-model="ShowSelectList" position="bottom" :style="{ height: '100%' }">
<selectList :listdata="columnsTrouble" @closeSlect="closeSlect" @saveSlect="saveSlect"></selectList>
</van-popup>
<!-- 准事故类型 -->
<van-popup v-model="ShowAccidentList" position="bottom" :style="{ height: '100%' }">
<selectList :listdata="columnsAccident" @closeSlect="closeSlectAccident" @saveSlect="saveSlectAccident">
</selectList>
</van-popup> </van-popup>
<van-popup v-model="showSource" position="bottom"> <van-popup v-model="showSource" position="bottom">
<van-picker <van-picker show-toolbar value-key="name" :columns="columnsSource" @confirm="onConSource"
show-toolbar @cancel="showSource = false" />
value-key="name"
:columns="columnsSource"
@confirm="onConSource"
@cancel="showSource = false"
/>
</van-popup> </van-popup>
<div <div v-if="active != 0" style="display: flex;
v-if="active != 0"
style="display: flex;
justify-content: space-around; justify-content: space-around;
background-color: #fff; background-color: #fff;
border-top: 1px solid #e3e3e3; border-top: 1px solid #e3e3e3;
...@@ -434,36 +256,27 @@ ...@@ -434,36 +256,27 @@
width: 100%; width: 100%;
text-align: center; text-align: center;
position: fixed; position: fixed;
bottom: 0;" bottom: 0;">
> <div @click="performTasks" style="color: #4bced0;font-size: 14px;font-weight: 600;">
<div
@click="performTasks"
style="color: #4bced0;font-size: 14px;font-weight: 600;"
>
<div style="font-size: 22px;"><van-icon name="plus" /></div> <div style="font-size: 22px;"><van-icon name="plus" /></div>
<div>新增现状风险</div> <div>新增现状风险</div>
</div> </div>
</div> </div>
<!-- 风险源 --> <!-- 风险源 -->
<van-popup <van-popup v-model="visiableSource" round position="bottom"
v-model="visiableSource" :style="{ height: '30%', display: 'flex', flexDirection: 'column' }">
round <van-button class="btns" @click="nameByselfInput">输入风险源名称</van-button>
position="bottom" <van-button class="btns" @click="importFromList">从风险清单导入</van-button>
:style="{ height: '30%', display: 'flex', flexDirection: 'column' }"
>
<van-button class="btns" @click="nameByselfInput"
>输入风险源名称</van-button
>
<van-button class="btns" @click="importFromList"
>从风险清单导入</van-button
>
<van-button class="btns" @click="cancleSource">取消</van-button> <van-button class="btns" @click="cancleSource">取消</van-button>
</van-popup> </van-popup>
</div> </div>
</template> </template>
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import SelectList from "@/components/selectList.vue";
import selectFloor from "@/components/selectFloor.vue";
// import selectPeople from "@/views/riskTask/selectPeople/index.vue"; // import selectPeople from "@/views/riskTask/selectPeople/index.vue";
import { getFun, postFun } from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
// import { // import {
...@@ -478,7 +291,9 @@ import { getFun, postFun } from "@/service/table.js"; ...@@ -478,7 +291,9 @@ import { getFun, postFun } from "@/service/table.js";
export default { export default {
name: "addCurrent", name: "addCurrent",
components: { components: {
LHeader LHeader,
SelectList,
selectFloor
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
if (to.name != "matrix-grad") { if (to.name != "matrix-grad") {
...@@ -487,6 +302,11 @@ export default { ...@@ -487,6 +302,11 @@ export default {
}, },
data() { data() {
return { return {
ShowfloorList: false,
floorSource: [],
ShowAccidentList: false,
ShowSelectList: false,
columnsAccident: [],
inherentId: "", inherentId: "",
text: "编辑固有风险", text: "编辑固有风险",
id: "", id: "",
...@@ -555,7 +375,9 @@ export default { ...@@ -555,7 +375,9 @@ export default {
this.$route.params.buildingId || sessionStorage.getItem("buildingId"); this.$route.params.buildingId || sessionStorage.getItem("buildingId");
this.postReturnEcho(); this.postReturnEcho();
} }
// this.getList(); this.getFloor();
this.getFXYS();
this.getZSGLX();
}, },
methods: { methods: {
tabList(value) { tabList(value) {
...@@ -568,24 +390,40 @@ export default { ...@@ -568,24 +390,40 @@ export default {
this.getList(); this.getList();
} }
}, },
seletFloor(name) { getFloor() {
this.$toast.loading({ getFun(`/risk/plan/floor/list/${this.inherentId}`)
message: "加载中...", .then(res => {
forbidClick: true, // this.$toast.clear();
loadingType: "spinner", // this.showSource = true;
duration: 0 let newArr = this.renameKeyInTree(res.data, "name", "text");
this.floorSource = newArr;
})
.catch(() => {
this.$toast.fail("加载失败,请稍后再试");
}); });
this.userPrefix = name; },
getFun(`/risk/plan/floor/list/${this.buildingIds}`) getFXYS() {
getFun(`/risk/plan/dict/data/list?dictType=risk_plan_factor`)
.then(res => { .then(res => {
this.$toast.clear(); this.columnsTrouble = res.data;
this.showSource = true;
this.columnsSource = res.data;
}) })
.catch(() => { .catch(() => {
this.$toast.fail("加载失败,请稍后再试"); this.$toast.fail("加载失败,请稍后再试");
}); });
}, },
getZSGLX() {
getFun(`/risk/plan/dict/data/list?dictType=risk_plan_type`)
.then(res => {
this.columnsAccident = res.data;
})
.catch(() => {
this.$toast.fail("加载失败,请稍后再试");
});
},
seletFloor(name) {
this.ShowfloorList = true;
this.userPrefix = name;
},
seletRoom(name) { seletRoom(name) {
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
...@@ -604,41 +442,17 @@ export default { ...@@ -604,41 +442,17 @@ export default {
this.$toast.fail("加载失败,请稍后再试"); this.$toast.fail("加载失败,请稍后再试");
}); });
}, },
//风险因素
seletFactor(name) { seletFactor(name) {
this.showTrouble = true; // this.showTrouble = true;
this.riskName = name; this.riskName = name;
this.columnsTrouble = [ this.ShowSelectList = true;
{
name: "人的因素"
},
{
name: "物的因素"
},
{
name: "环境因素"
},
{
name: "管理因素"
}
];
}, },
//准事故类型
seletType(name) { seletType(name) {
this.showTrouble = true; // this.showTrouble = true;
this.riskName = name; this.riskName = name;
this.columnsTrouble = [ this.ShowAccidentList = true;
{
name: "物体打击"
},
{
name: "车辆伤害"
},
{
name: "起重伤害"
},
{
name: "机械伤害"
}
];
}, },
seletGrade(name) { seletGrade(name) {
this.showTrouble = true; this.showTrouble = true;
...@@ -667,6 +481,7 @@ export default { ...@@ -667,6 +481,7 @@ export default {
buildingId: this.buildingId, buildingId: this.buildingId,
planId: this.inherentId, planId: this.inherentId,
floorId: this.form.floorId, floorId: this.form.floorId,
floorName:this.form.floorName,
roomName: this.form.roomName, roomName: this.form.roomName,
roomId: this.form.roomId roomId: this.form.roomId
} }
...@@ -821,9 +636,9 @@ export default { ...@@ -821,9 +636,9 @@ export default {
this.visiableSource = true; this.visiableSource = true;
}, },
//从风险清单列表导入 //从风险清单列表导入
importFromList() {}, importFromList() { },
//输入风险源名称 //输入风险源名称
nameByselfInput() {}, nameByselfInput() { },
//取消风险弹窗 //取消风险弹窗
cancleSource() { cancleSource() {
this.visiableSource = false; this.visiableSource = false;
...@@ -905,7 +720,29 @@ export default { ...@@ -905,7 +720,29 @@ export default {
this.projectDirector = e[0].loginName; this.projectDirector = e[0].loginName;
this.projectDirectorName = e[0].userName; this.projectDirectorName = e[0].userName;
this.show = false; this.show = false;
} },
closeSlectfloor() {
this.ShowfloorList = false;
},
saveSlectfloor(data) {
this.form.floorId = data.id;
this.form.floorName = data.text;
this.ShowfloorList = false;
},
closeSlect() {
this.ShowSelectList = false;
},
saveSlect(data) {
this.form.factor = data.join(",");
this.ShowSelectList = false;
},
closeSlectAccident() {
this.ShowAccidentList = false;
},
saveSlectAccident(data) {
this.form.type = data.join(",");
this.ShowAccidentList = false;
},
}, },
watch: { watch: {
// setRank(newVal, oldVal) { // setRank(newVal, oldVal) {
...@@ -954,6 +791,7 @@ export default { ...@@ -954,6 +791,7 @@ export default {
} }
} }
} }
.btns { .btns {
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
border: none; border: none;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
readonly readonly
required required
name="projectId" name="projectId"
:value="form.projectId" :value="form.projectName"
label="所属项目" label="所属项目"
placeholder="请输入" placeholder="请输入"
/> />
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
readonly readonly
required required
name="projectId" name="projectId"
:value="form.projectId" :value="form.projectName"
label="所属项目" label="所属项目"
placeholder="请输入" placeholder="请输入"
/> />
...@@ -44,12 +44,11 @@ ...@@ -44,12 +44,11 @@
<van-field <van-field
required required
clickable readonly
name="floorName" name="floorName"
:value="form.floorName" :value="form.floorName"
label="所属楼层" label="所属楼层"
placeholder="请选择" placeholder="请选择"
@click="seletFloor('floor')"
:rules="[{ required: true, message: '所属楼层不能为空' }]" :rules="[{ required: true, message: '所属楼层不能为空' }]"
/> />
...@@ -60,7 +59,6 @@ ...@@ -60,7 +59,6 @@
:value="form.roomName" :value="form.roomName"
label="所属房间" label="所属房间"
placeholder="请输入" placeholder="请输入"
@click="seletRoom('room')"
:rules="[{ required: true, message: '所属房间不能为空' }]" :rules="[{ required: true, message: '所属房间不能为空' }]"
/> />
...@@ -616,6 +614,7 @@ export default { ...@@ -616,6 +614,7 @@ export default {
this.form.deptName = userInfo.dept.deptName; this.form.deptName = userInfo.dept.deptName;
this.form.planId = this.$route.params.planId; this.form.planId = this.$route.params.planId;
this.form.floorId = this.$route.params.floorId; this.form.floorId = this.$route.params.floorId;
this.form.floorName = this.$route.params.floorName;
this.form.roomId = this.$route.params.roomId; this.form.roomId = this.$route.params.roomId;
this.form.inherentId = this.$route.params.id; this.form.inherentId = this.$route.params.id;
this.form.roomName = this.$route.params.roomName; this.form.roomName = this.$route.params.roomName;
...@@ -753,7 +752,7 @@ export default { ...@@ -753,7 +752,7 @@ export default {
}, },
//开始测评 //开始测评
goResultPage() { goResultPage() {
this.$router.push({ this.$router.replace({
name: "resultPage", name: "resultPage",
params: { params: {
score: this.severityScore * this.possibleScore score: this.severityScore * this.possibleScore
......
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