Commit fd5f5198 authored by dlkong's avatar dlkong

Merge branch 'develop' into dev_kdl

parents 8bebfd47 36c7a736
<template>
<div>
<!-- 搜索 -->
<van-sticky offset-top="0">
<div>
<!-- 搜索 -->
<van-sticky offset-top="0">
<div class="content-wrap">
<div class="search-wrap">
<van-search v-model="searchVal" placeholder="搜索" @input="onInput"/>
<van-search v-model="searchVal" placeholder="搜索" @input="onInput" />
</div>
</div>
</van-sticky>
<div style="margin-bottom: 1.4rem;">
<van-checkbox-group v-model="checkbox">
<!-- <van-list
</van-sticky>
<div style="margin-bottom: 1.4rem;">
<van-checkbox-group v-model="checkbox">
<!-- <van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了"
@load="getInsideUser()"
> -->
<van-checkbox style="margin: 0px 10px;" v-for="(item,index) in listdata" :name="item.dictLabel" :key="index" @click="selData(item)">
<van-cell :title="item.dictValue" />
</van-checkbox>
<!-- </van-list> -->
</van-checkbox-group>
</div>
<!-- 底部信息 -->
<footer class="footer">
<van-cell-group>
<div class="operate">
<van-button
size="small"
ttype="info"
plain
native-type="button"
style="border-radius: 5px; background-color: #f0f1f5;"
@click.native="cancel"
<van-checkbox
style="margin: 0px 10px;"
v-for="(item, index) in listdata"
:name="item.dictLabel"
:key="index"
@click="selData(item)"
>
<van-cell :title="item.dictValue" />
</van-checkbox>
<!-- </van-list> -->
</van-checkbox-group>
</div>
<!-- 底部信息 -->
<footer class="footer">
<van-cell-group>
<div class="operate">
<van-button
size="small"
ttype="info"
plain
native-type="button"
style="border-radius: 5px; background-color: #f0f1f5;"
@click.native="cancel"
>取消
</van-button
>
<van-button
size="small"
type="info"
native-type="button"
style="margin:0 10px 0 20px;border-radius: 5px;"
@click.native="save"
</van-button>
<van-button
size="small"
type="info"
native-type="button"
style="margin:0 10px 0 20px;border-radius: 5px;"
@click.native="save"
>保存
</van-button
>
</div>
</van-cell-group>
</footer>
</div>
</template>
<script>
import {debounce} from "@/utils/common.js";
export default {
props:{
listdata:{
type:Array,
default:()=>[],
}
},
components: {
// LHeader
},
created() {
</van-button>
</div>
</van-cell-group>
</footer>
</div>
</template>
<script>
import { debounce } from "@/utils/common.js";
export default {
props: {
listdata: {
type: Array,
default: () => []
}
},
components: {
// LHeader
},
created() {},
data() {
return {
text: "选择人员",
personName: "",
searchVal: "",
checkbox: [],
pageSize: 20,
pageNum: 1,
loading: false,
finished: false,
projectList: [],
itemSel: {}
};
},
methods: {
// 待搜索框内容发生变化
onInput: debounce(function() {
this.projectList = [];
this.pageNum = 1;
this.finished = false;
this.loading = true;
this.getInsideUser();
}, 800),
selData(e) {
this.itemSel = e;
},
data() {
return {
text: "选择人员",
personName: "",
searchVal: "",
checkbox:[],
pageSize: 20,
pageNum: 1,
loading: false,
finished: false,
projectList:[],
itemSel:{
}
};
save() {
this.$emit("saveSlect", this.checkbox);
this.checkbox = [];
},
methods: {
// 待搜索框内容发生变化
onInput: debounce(function () {
this.projectList=[]
this.pageNum=1
this.finished = false
this.loading = true
this.getInsideUser();
}, 800),
selData(e){
this.itemSel=e
},
save() {
this.$emit('saveSlect', this.checkbox)
},
cancel() {
this.$emit('closeSlect')
}
cancel() {
this.$emit("closeSlect");
}
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
// 搜索
.content-wrap {
padding: 10px;
background-color: #f0f1f5;
}
.search-wrap {
margin: 0.26667rem;
.van-search {
border-radius: 5px;
padding: 5px 12px;
}
.van-search__content {
background-color: #ffffff;
}
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
// 搜索
.content-wrap {
padding: 10px;
background-color: #f0f1f5;
}
.search-wrap {
margin: 0.26667rem;
.van-search {
border-radius: 5px;
padding: 5px 12px;
}
.upStep {
.van-cell-group {
.van-search__content {
background-color: #ffffff;
}
}
.upStep {
.van-cell-group {
display: flex;
height: 1.2rem;
align-items: center;
.upStep-btn {
width: 25%;
text-align: center;
display: flex;
height: 1.2rem;
align-items: center;
.upStep-btn {
width: 25%;
span {
width: 1.866667rem;
background-color: #1989fa;
text-align: center;
display: flex;
span {
width: 1.866667rem;
background-color: #1989fa;
text-align: center;
display: inline-block;
color: white;
height: 0.8rem;
line-height: 0.8rem;
font-size: 0.346667rem;
border-radius: 0.08rem;
}
}
.upStep-content {
width: 75%;
display: inline-block;
color: white;
height: 0.8rem;
line-height: 0.8rem;
padding-left: 0.42667rem;
box-sizing: border-box;
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 0.346667rem;
border-radius: 0.08rem;
}
}
.upStep-content {
width: 75%;
height: 0.8rem;
line-height: 0.8rem;
padding-left: 0.42667rem;
box-sizing: border-box;
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.dept-list-wrap {
margin-top: 0.266667rem;
}
.dept-list-wrap {
margin-top: 0.266667rem;
}
.people-wrap {
margin-top: 0.266667rem;
/deep/ .van-radio__label {
display: flex;
align-items: center;
}
.people-wrap {
margin-top: 0.266667rem;
/deep/ .van-radio__label {
}
.footer {
width: 100%;
height: 1.4rem;
z-index: 9;
position: fixed;
bottom: 0px;
box-shadow: 0px 8px 15px #000;
.van-cell-group {
height: 100%;
.selected {
height: 1.066667rem;
display: flex;
align-items: center;
}
}
.footer {
width: 100%;
height: 1.4rem;
z-index: 9;
position: fixed;
bottom: 0px;
box-shadow: 0px 8px 15px #000;
.van-cell-group {
height: 100%;
.selected {
height: 1.066667rem;
display: flex;
align-items: center;
padding-left: 10px;
border-bottom: 1px solid #cacbcb;
.selected-title {
color: #4187f7;
}
.selected-content {
width: 80%;
padding-left: 10px;
border-bottom: 1px solid #cacbcb;
.selected-title {
color: #4187f7;
}
.selected-content {
width: 80%;
padding-left: 10px;
box-sizing: border-box;
}
box-sizing: border-box;
}
.operate {
height: 1.333333rem;
display: flex;
justify-content: flex-end;
align-items: center;
.van-button {
width: 1.6rem;
}
}
.operate {
height: 1.333333rem;
display: flex;
justify-content: flex-end;
align-items: center;
.van-button {
width: 1.6rem;
}
}
}
</style>
\ No newline at end of file
}
</style>
......@@ -8,16 +8,19 @@ import qs from 'qs';
import './permission'
import Cookies from 'js-cookie'
import util from './api/util.js'
import {DropdownMenu, DropdownItem, Divider, Popup, Overlay, Loading, Dialog, ContactCard, Form, AddressEdit, AddressList, Field, CellGroup, Cell, SwipeCell, Icon, Stepper, Card, Checkbox, CheckboxGroup, Button, Swipe, SwipeItem, PullRefresh, List, Tab, Tabs, GoodsAction, GoodsActionIcon, GoodsActionButton, SubmitBar, Toast ,Search,Picker,Uploader,Notify ,ContactList,Calendar,Radio,RadioGroup,Tag,Tabbar,TabbarItem,Sticky, Grid, GridItem,Skeleton,Col,Row, Image as VanImage, Badge,NoticeBar,DatetimePicker,
Step, Steps,Lazyload,Popover,Collapse, CollapseItem,TreeSelect } from 'vant'
import {
DropdownMenu, DropdownItem, Divider, Popup, Overlay, Loading, Dialog, ContactCard, Form, AddressEdit, AddressList, Field, CellGroup, Cell, SwipeCell, Icon, Stepper, Card, Checkbox, CheckboxGroup, Button, Swipe, SwipeItem, PullRefresh, List, Tab, Tabs, GoodsAction, GoodsActionIcon, GoodsActionButton, SubmitBar, Toast, Search, Picker, Uploader, Notify, ContactList, Calendar, Radio, RadioGroup, Tag, Tabbar, TabbarItem, Sticky, Grid, GridItem, Skeleton, Col, Row, Image as VanImage, Badge, NoticeBar, DatetimePicker,
Step, Steps, Lazyload, Popover, Collapse, CollapseItem, TreeSelect, Switch
} from 'vant'
import 'lib-flexible/flexible'
import vueEsign from 'vue-esign'
Vue.use(vueEsign)
Vue.prototype.util = util
Vue.use(Divider).use(Popup).use(Overlay).use(Loading).use(Dialog).use(Toast).use(ContactCard).use(Form).use(AddressEdit).use(AddressList).use(Field).use(CellGroup).use(Cell).use(SwipeCell).use(Icon).use(Stepper).use(Card).use(Button).use(Swipe).use(SwipeItem).use(PullRefresh).use(List).use(Tab).use(Tabs).use(GoodsAction).use(GoodsActionIcon).use(GoodsActionButton).use(SubmitBar).use(Checkbox).use(CheckboxGroup).use(Search).use(Picker).use(Uploader).use(Notify)
.use(ContactList).use(Calendar).use(Radio).use(RadioGroup).use(Tag).use(Tabbar).use(TabbarItem).use(Sticky)
.use(Grid).use(GridItem).use(Skeleton).use(Col).use(Row).use(VanImage).use(Badge).use(NoticeBar).use(DatetimePicker).use(Step).use(Steps).use(Popover).use(Lazyload).use(Collapse).use(CollapseItem).use(TreeSelect)
.use(ContactList).use(Calendar).use(Radio).use(RadioGroup).use(Tag).use(Tabbar).use(TabbarItem).use(Sticky)
.use(Grid).use(GridItem).use(Skeleton).use(Col).use(Row).use(VanImage).use(Badge).use(NoticeBar).use(DatetimePicker).use(Step).use(Steps).use(Popover).use(Lazyload).use(Collapse).use(CollapseItem).use(TreeSelect)
Vue.use(DropdownMenu);
Vue.use(Switch);
Vue.use(DropdownItem);
// 引用高德地图组件 main.js
import VueAMap from 'vue-amap'
......@@ -27,7 +30,7 @@ VueAMap.initAMapApiLoader({
key: '9b16720c3ea21877cfbe73229bba9032',
plugin: [ // 依赖配置,根据自己的需求引入
'AMap.PlaceSearch',//POI搜索插件
'AMap.Scale',
'AMap.Scale',
'AMap.Geocoder',
"AMap.Autocomplete", //输入提示插件
......@@ -37,7 +40,7 @@ VueAMap.initAMapApiLoader({
"AMap.PolyEditor", //编辑 折线多边形
"AMap.CircleEditor", //圆形编辑器插件
"AMap.Geolocation", //定位控件,用来获取和展示用户主机所在的经纬度位置
"AMap.MouseTool",
"AMap.Map",
"mouseTool.polygon",
......@@ -46,7 +49,7 @@ VueAMap.initAMapApiLoader({
"AMap.DistrictSearch",
"AMap.Heatmap", // 绘制热力图插件
],
],
// 默认高德 sdk 版本为 1.4.4
v: '1.4.4'
})
......@@ -65,7 +68,7 @@ Vue.prototype.$md5 = md5;
Vue.prototype.qs = qs;
Array.prototype.remove = function(val) {
Array.prototype.remove = function (val) {
var index = this.indexOf(val);
if (index > -1) {
this.splice(index, 1);
......
<template>
<div>
<LHeader :text="text"></LHeader>
<van-form @submit="onSubmit" :scroll-to-error="true" :show-error="false" validate-trigger="onSubmit">
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
<van-form
@submit="onSubmit"
:scroll-to-error="true"
:show-error="false"
validate-trigger="onSubmit"
>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
风险信息
</div>
<van-field readonly required name="userName" :value="form.userName" label="评估人" placeholder="请输入" />
<van-field readonly required name="projectId" :value="form.projectId" label="所属项目" placeholder="请输入" />
<van-field readonly required name="buildingName" :value="form.buildingName" label="所属建筑物" placeholder="请输入 " />
<van-field
readonly
required
name="userName"
:value="form.userName"
label="评估人"
placeholder="请输入"
/>
<van-field
readonly
required
name="projectId"
:value="form.projectId"
label="所属项目"
placeholder="请输入"
/>
<van-field
readonly
required
name="buildingName"
:value="form.buildingName"
label="所属建筑物"
placeholder="请输入 "
/>
<van-field required clickable name="floorName" :value="form.floorName" label="所属楼层" placeholder="请选择"
@click="seletFloor('floor')" :rules="[{ required: true, message: '所属楼层不能为空' }]" />
<van-field
required
clickable
name="floorName"
:value="form.floorName"
label="所属楼层"
placeholder="请选择"
@click="seletFloor('floor')"
:rules="[{ required: true, message: '所属楼层不能为空' }]"
/>
<div style="display: flex;">
<van-field readonly required name="roomName" :value="form.roomName" label="所属房间" placeholder="请输入"
@click="seletRoom('room')" :rules="[{ required: true, message: '所属房间不能为空' }]" />
<van-button style="color: #cccc;background-color: #f0f1f5;" icon="plus" type="info" native-type="button"
@click="tjfjClcik" />
<van-field
readonly
required
name="roomName"
:value="form.roomName"
label="所属房间"
placeholder="请输入"
@click="seletRoom('room')"
:rules="[{ required: true, message: '所属房间不能为空' }]"
/>
<van-button
style="color: #cccc;background-color: #f0f1f5;"
icon="plus"
type="info"
native-type="button"
@click="tjfjClcik"
/>
</div>
<van-field required clickable name="name" v-model="form.name" label="危险源名称" placeholder="请输入"
:rules="[{ required: true, message: '危险源名称不能为空' }]" />
<van-field required clickable name="name" v-model="form.name" label="风险点类型" placeholder="请输入"
:rules="[{ required: true, message: '风险点类型不能为空' }]" />
<van-field required clickable name="name" v-model="form.name" label="安全警示标志" placeholder="请输入"
:rules="[{ required: true, message: '安全警示标志不能为空' }]" />
<van-field v-model="form.factor" readonly required name="factor" label="风险因素" placeholder="请选择"
@click="seletFactor('factor')" :rules="[{ required: true, message: '风险因素不能为空' }]" />
<van-field
required
clickable
name="name"
v-model="form.name"
label="危险源名称"
placeholder="请输入"
:rules="[{ required: true, message: '危险源名称不能为空' }]"
/>
<!-- 单选 -->
<van-field
required
clickable
name="pointType"
v-model="form.pointType"
label="风险点类型"
placeholder="请选择"
@click="selectData('pointType', true)"
:rules="[{ required: true, message: '风险点类型不能为空' }]"
/>
<!-- 多选 -->
<van-field
v-model="form.safetyWarningSigns"
readonly
required
name="safetyWarningSigns"
label="安全警示标志"
placeholder="请选择"
@click="selectData('safetyWarningSigns', false)"
:rules="[{ required: true, message: '安全警示标志不能为空' }]"
/>
<van-field
v-model="form.factor"
readonly
required
name="factor"
label="风险因素"
placeholder="请选择"
@click="selectData('factor', false)"
:rules="[{ required: true, message: '风险因素不能为空' }]"
/>
<van-field readonly v-model="form.type" required name="type" label="准事故类型" placeholder="请选择"
@click="seletType('type')" :rules="[{ required: true, message: '准事故类型不能为空' }]" />
<van-field
readonly
v-model="form.type"
required
name="type"
label="准事故类型"
placeholder="请选择"
@click="selectData('type', false)"
:rules="[{ required: true, message: '准事故类型不能为空' }]"
/>
<van-field readonly v-model="form.level" required name="level" label="风险等级" placeholder="请选择" @click="seletGrade"
:rules="[{ required: true, message: '风险等级不能为空' }]" />
<van-field
readonly
v-model="form.level"
required
name="level"
label="风险等级"
placeholder="请选择"
@click="seletGrade"
:rules="[{ required: true, message: '风险等级不能为空' }]"
/>
<!-- <van-field readonly v-model="form.level" required name="level" label="风险等级" placeholder="请选择"
@click="seletGrade('level')" :rules="[{ required: true, message: '风险等级不能为空' }]" /> -->
<van-field required name="presenceLocation" v-model="form.presenceLocation" label="存在部位" placeholder="请输入"
:rules="[{ required: true, message: '存在部位不能为空' }]" />
<van-field
required
name="presenceLocation"
v-model="form.presenceLocation"
label="存在部位"
placeholder="请输入"
:rules="[{ required: true, message: '存在部位不能为空' }]"
/>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
风险源图片
</div>
<van-field name="hdPicture1" label="风险源图片">
<template #input>
<van-uploader @delete="deleteFile(...arguments, 'uploaderImg')" multiple :max-count="5" upload-text="最多上传五个"
v-model="uploaderImg">
<van-uploader
@delete="deleteFile(...arguments, 'uploaderImg')"
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="uploaderImg"
>
<template slot="default">
<!-- 11111111111 -->
<div style="
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -60,27 +178,52 @@
align-items: center;
justify-content: center;
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>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
技术措施
</div>
<van-field v-model="form.measuresProject" name="measuresProject" label="技术措施" type="textarea" rows="1" autosize
placeholder="请输入" />
<van-field
v-model="form.measuresProject"
name="measuresProject"
label=""
type="textarea"
rows="3"
autosize
placeholder="请输入"
/>
<van-field name="measuresProjectFile[]" label="上传附件">
<template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresProjectFile" accept="file"
result-type="file" @delete="deleteFile(...arguments, 'measuresProjectFile')">
<van-uploader
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="measuresProjectFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresProjectFile')"
>
<template slot="default">
<div style="
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -88,15 +231,21 @@
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<!-- <div
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
......@@ -107,34 +256,56 @@
应采取的管控措施
</div>
<van-field
v-model="form.measuresAdministration"
name="measuresAdministration"
v-model="form.takenMeasuresAdministration"
name="takenMeasuresAdministration"
label=""
type="textarea"
rows="3"
autosize
placeholder="请输入"
/> -->
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
应采取的管控措施
</div>
<van-field v-model="form.takenMeasuresAdministration" name="takenMeasuresAdministration" label="" type="textarea"
rows="3" autosize placeholder="请输入" />
/>
<van-field
required
v-model="form.measuresDeptName"
name="measuresDeptName"
label="管控责任单位 "
type="textarea"
rows="1"
autosize
@click="
{
measuresDept = true;
}
"
placeholder="请选择"
/>
<van-field
required
v-model="form.measuresUserName"
name="measuresUserName"
label="管控责任人 "
type="textarea"
rows="1"
autosize
@click="getUserData('measuresUser')"
placeholder="请选择"
/>
<van-field required v-model="form.measuresDeptId" name="measuresDeptId" label="管控责任单位 " type="textarea" rows="1"
autosize placeholder="请输入" />
<van-field required v-model="form.measuresUserId" name="measuresUserId" label="管控责任人 " type="textarea" rows="1"
autosize placeholder="请输入" />
<van-field name="measuresAdministrationFile[]" label=" ">
<van-field name="measuresAdministrationFile[]" label="上传附件">
<template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresAdministrationFile" accept="file"
result-type="file" @delete="deleteFile(...arguments, 'measuresAdministrationFile')">
<van-uploader
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="measuresAdministrationFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresAdministrationFile')"
>
<template slot="default">
<div style="
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -142,45 +313,97 @@
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
危险源管理
</div>
<van-field v-model="form.hazardSourceName" name="hazardSourceName" label="危险源名称 " type="textarea" rows="1" autosize
placeholder="请输入" />
<van-field v-model="form.majorHazardSource" name="majorHazardSource" label="是否存在重大危险源 " type="textarea" rows="1"
autosize placeholder="请输入" />
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
<van-field
v-model="form.hazardSourceName"
name="hazardSourceName"
label="危险源名称 "
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="majorHazardSource" label="是否存在重大危险源">
<template #input>
<van-switch v-model="form.majorHazardSource" size="20" />
</template>
</van-field>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
重大危险源描述
</div>
<van-field v-model="form.majorHazardSourceDescription" name="majorHazardSourceDescription" label=" " type="textarea"
rows="3" autosize placeholder="请输入" />
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
<van-field
v-model="form.majorHazardSourceDescription"
name="majorHazardSourceDescription"
label=""
type="textarea"
rows="3"
autosize
placeholder="请输入"
/>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
应急措施
</div>
<van-field v-model="form.measuresEmergency" name="measuresEmergency" label="应急措施" type="textarea" rows="1" autosize
placeholder="请输入" />
<van-field name="measuresEmergencyFile[]" label=" ">
<van-field
v-model="form.measuresEmergency"
name="measuresEmergency"
label=""
type="textarea"
rows="3"
autosize
placeholder="请输入"
/>
<van-field name="measuresEmergencyFile[]" label="上传附件">
<template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresEmergencyFile" accept="file"
result-type="file" @delete="deleteFile(...arguments, 'measuresEmergencyFile')">
<van-uploader
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="measuresEmergencyFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresEmergencyFile')"
>
<template slot="default">
<!-- 11111111111 -->
<div style="
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -188,8 +411,13 @@
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
......@@ -197,93 +425,217 @@
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
参考依据
</div>
<van-field readonly required clickable name="trouble" :value="form.trouble" label="参考依据" placeholder="请选择"
@click="showTrouble = true" :rules="[{ required: true, message: '事故类型不能为空' }]" />
<van-dialog v-model="showGradeDialog" title="风险评测配置" :show-cancel-button="false" :show-confirm-button="false">
<van-field
readonly
required
clickable
name="referenceBasis"
:value="form.referenceBasis"
label="参考依据"
placeholder="请选择"
@click="selectData('referenceBasis', false)"
:rules="[{ required: true, message: '事故类型不能为空' }]"
/>
<van-dialog
v-model="showGradeDialog"
title="风险评测配置"
:show-cancel-button="false"
:show-confirm-button="false"
>
<div class="dialogContain">
<van-collapse v-model="activeNames">
<van-collapse-item title="风险模型" name="1">
<van-field readonly required name="level" label="当前风险模型" placeholder="LS风险矩阵评估模型" />
<van-field
readonly
required
name="level"
label="当前风险模型"
placeholder="LS风险矩阵评估模型"
/>
</van-collapse-item>
<van-collapse-item title="风险模型配置" name="2">
<van-popover v-model="showPopover" trigger="click" :actions="columnsRiskRank" @select="onSelect">
<van-popover
v-model="showPopover"
trigger="click"
:actions="columnsRiskRank"
@select="onSelect"
>
<template #reference>
<van-field v-model="possibleValue" readonly required name="level" label="发生的可能性" placeholder="请选择" />
<van-field
v-model="possibleValue"
readonly
required
name="level"
label="发生的可能性"
placeholder="请选择"
/>
</template>
</van-popover>
<van-popover v-model="showPopoveSetRank" trigger="click" :actions="columnsSetRank"
@select="onSelectSetRank">
<van-popover
v-model="showPopoveSetRank"
trigger="click"
:actions="columnsSetRank"
@select="onSelectSetRank"
>
<template #reference>
<van-field v-model="severityValue" readonly required name="level" label="后果严重程度" placeholder="请选择" />
<van-field
v-model="severityValue"
readonly
required
name="level"
label="后果严重程度"
placeholder="请选择"
/>
</template>
</van-popover>
</van-collapse-item>
</van-collapse>
<van-row type="flex" justify="center" style="margin-top:10px">
<van-col span="6"><van-button size="small" plain native-type="button" type="info"
@click="showGradeDialog = false">取消</van-button></van-col>
<van-col span="6"><van-button size="small" type="info" native-type="button"
@click="goResultPage">开始测评</van-button></van-col>
<van-col span="6"
><van-button
size="small"
plain
native-type="button"
type="info"
@click="showGradeDialog = false"
>取消</van-button
></van-col
>
<van-col span="6"
><van-button
size="small"
type="info"
native-type="button"
@click="goResultPage"
>开始测评</van-button
></van-col
>
</van-row>
</div>
</van-dialog>
<van-popup v-model="showTrouble" position="bottom">
<van-picker show-toolbar value-key="name" :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="showSource" position="bottom">
<van-picker show-toolbar value-key="name" :columns="columnsSource" @confirm="onConSource"
@cancel="showSource = false" />
<!-- 单选弹出层 -->
<van-popup v-model="showSelect" position="bottom">
<van-picker
show-toolbar
value-key="dictValue"
:columns="columnsData"
@confirm="saveSelect"
@cancel="showSelect = false"
/>
</van-popup>
<!-- 楼层弹出层 -->
<van-popup v-model="ShowfloorList" position="bottom" :style="{ height: '100%' }">
<selectFloor :listdata="floorSource" @closeSlect="closeSlectfloor" @saveSlect="saveSlectfloor"></selectFloor>
<!-- 复选弹出层 -->
<van-popup
v-model="showCheckSelect"
position="bottom"
:style="{ height: '100%' }"
>
<selectList
:listdata="columnsCheckData"
@closeSlect="showCheckSelect = false"
@saveSlect="saveCheckSelect"
></selectList>
</van-popup>
<!-- 风险源弹出层 -->
<van-popup v-model="ShowSelectList" position="bottom" :style="{ height: '100%' }">
<selectList :listdata="columnsTrouble" @closeSlect="closeSlect" @saveSlect="saveSlect"></selectList>
<!-- 房间弹出层 -->
<van-popup v-model="showSource" position="bottom">
<van-picker
show-toolbar
value-key="name"
:columns="columnsSource"
@confirm="onConSource"
@cancel="showSource = false"
/>
</van-popup>
<!-- 准事故类型 -->
<van-popup v-model="ShowAccidentList" position="bottom" :style="{ height: '100%' }">
<selectList :listdata="columnsAccident" @closeSlect="closeSlectAccident" @saveSlect="saveSlectAccident">
</selectList>
<!-- 管控责任单位 -->
<van-popup
v-model="measuresDept"
position="bottom"
:style="{ height: '100%' }"
>
<div
class="van-picker__toolbar"
style="position: absolute;width: 100%;top: 0;"
>
<button
type="button"
class="van-picker__cancel"
v-on:click="
{
form.measuresDeptId = 0;
projectDept = false;
}
"
>
取消</button
><button type="button" class="van-picker__confirm" @click="closeDept">
确认
</button>
</div>
<div style="display:flex;margin-top: 44px;">
<selectDept @changeDept="changeDept"></selectDept>
</div>
</van-popup>
<!-- 管控责任人 -->
<van-popup v-model="showTrouble" position="bottom">
<van-picker
show-toolbar
value-key="nickName"
:columns="columnsTrouble"
@confirm="onConTrouble"
@cancel="showTrouble = false"
/>
</van-popup>
<div style="margin: 16px 16px 0">
<van-button round block type="info" native-type="submit">提交</van-button>
<van-button round block type="info" native-type="submit"
>提交</van-button
>
</div>
</van-form>
<div style="margin: 10px 16px 0px; padding-bottom: 16px">
<van-button round block type="warning" @click.native="cancel">取消</van-button>
<van-button round block type="warning" @click.native="cancel"
>取消</van-button
>
</div>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
import selectDept from "@/components/selectDept/index.vue";
import SelectList from "@/components/selectList.vue";
import selectFloor from "@/components/selectFloor.vue";
// import selectPeople from "@/views/riskTask/selectPeople/index.vue";
import { getUserInfo, getLocalUserInfo } from "@/utils/userInfo";
import { getFun, postFun } from "@/service/table.js";
// import {
// getFormList,
// postHdSource,
// postHdType,
// postHdPeople,
// postReAdd,
// postriskConiCause,
// postRiskShowMeasures,
// } from "@/service/risk";
export default {
name: "addInherent",
components: {
LHeader,
selectDept,
SelectList,
selectFloor
},
......@@ -324,8 +676,18 @@ export default {
},
data() {
return {
measuresDept: false,
ShowfloorList: false,
floorSource: [],
dataName: "",
// 单选
showSelect: false,
columnsData: [],
// 多选
showCheckSelect: false,
columnsCheckData: [],
ShowAccidentList: false,
ShowSelectList: false,
showPopoveSetRank: false,
......@@ -422,10 +784,80 @@ export default {
this.form.level = sessionStorage.getItem("level");
}
this.getFloor();
this.getFXYS();
this.getZSGLX();
},
methods: {
// 项目负责人
onConTrouble(value) {
if (!value) {
this.showTrouble = false;
return;
}
this.form[this.userPrefix + "Id"] = value.userId;
this.form[this.userPrefix + "Name"] = value.nickName;
console.log("this.form :>> ", this.form);
this.showTrouble = false;
},
getUserData(e) {
this.userPrefix = e;
if (!this.form.measuresDeptId) {
this.$toast({
title: "提示",
message: "请选择管控责任单位!"
});
return false;
}
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0
});
getFun(`/risk/plan/user/list/${this.form.measuresDeptId}`).then(res => {
if (res.code == 200) {
this.columnsTrouble = res.data;
// 对数据进行赋值
this.$toast.clear();
this.showTrouble = true;
} else {
this.$toast.clear();
}
});
},
changeDept(id, name) {
console.log(id);
this.form.measuresDeptId = id;
this.form.measuresDeptName = name;
},
closeDept() {
console.log(this.form.deptId);
this.measuresDept = false;
},
selectData(dataName, isSinge) {
this.dataName = dataName;
getFun(
`/risk/plan/dict/data/list?dictType=risk_plan_${dataName.toLowerCase()}`
)
.then(res => {
if (isSinge) {
this.columnsData = res.data;
this.showSelect = true;
} else {
this.columnsCheckData = res.data;
this.showCheckSelect = true;
}
})
.catch(() => {
this.$toast.fail("加载失败,请稍后再试");
});
},
saveSelect(data) {
this.form[this.dataName] = data.dictValue;
this.showSelect = false;
},
saveCheckSelect(data) {
this.form[this.dataName] = data.join(",");
this.showCheckSelect = false;
},
renameKeyInTree(data, oldKey, newKey) {
let arr = data.map(item => {
const newItem = { ...item };
......@@ -460,31 +892,7 @@ export default {
this.$toast.fail("加载失败,请稍后再试");
});
},
getFXYS() {
getFun(`/risk/plan/dict/data/list?dictType=risk_plan_factor`)
.then(res => {
this.columnsTrouble = res.data;
})
.catch(() => {
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.$toast.loading({
// message: "加载中...",
// forbidClick: true,
// loadingType: "spinner",
// duration: 0
// });
this.ShowfloorList = true;
this.userPrefix = name;
},
......@@ -506,18 +914,7 @@ export default {
this.$toast.fail("加载失败,请稍后再试");
});
},
//风险因素
seletFactor(name) {
// this.showTrouble = true;
this.riskName = name;
this.ShowSelectList = true;
},
//准事故类型
seletType(name) {
// this.showTrouble = true;
this.riskName = name;
this.ShowAccidentList = true;
},
//风险等级
seletGrade(name) {
this.getGradeList("possibility");
......@@ -544,12 +941,7 @@ export default {
}
});
},
// //后果严重程度
// getConsequence(){
// getFun(`/risk/plan/matrix/${type}/list`).then(res=>{
// })
// },
closeSlectfloor() {
this.ShowfloorList = false;
},
......@@ -558,20 +950,7 @@ export default {
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;
},
onSelect(data) {
this.possibleValue = data.text;
this.possibleScore = data.score;
......@@ -744,7 +1123,7 @@ export default {
}
);
},
// 风险源
// 房间
onConSource(value) {
if (!value) {
this.showSource = false;
......@@ -754,20 +1133,6 @@ export default {
this.form[this.userPrefix + "Name"] = value.name;
this.showSource = false;
},
// 事故类型
onConTrouble(value) {
console.log(
"%c [ value ]-653",
"font-size:13px; background:pink; color:#bf2c9f;",
value
);
if (!value) {
this.showTrouble = false;
return;
}
this.form[this.riskName] = value.name;
this.showTrouble = false;
},
// 风险定级
onConSetRank(value) {
this.showSetRank = false;
......
......@@ -389,13 +389,6 @@ export default {
this.currentDate = new Date();
},
getLeaderUserList(e) {
if (!this.form.projectId) {
this.$toast({
title: "提示",
message: "请选择关联项目!"
});
return false;
}
this.userPrefix = e;
this.$toast.loading({
message: "加载中...",
......@@ -439,14 +432,6 @@ export default {
this.projectDept = false;
},
getExecuteUser() {
if (!this.form.projectId) {
this.$toast({
title: "提示",
message: "请选择关联项目!"
});
return false;
}
this.filedName = "nickName";
this.$toast.loading({
message: "加载中...",
......
......@@ -8,11 +8,11 @@ module.exports = {
//以上的ip和端口是我们本机的;下面为需要跨域的
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:8080/', //这里是后台的地址
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