Commit 18ffe249 authored by yf's avatar yf

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

parents 9a5db343 4860ee0a
...@@ -56,7 +56,14 @@ export default { ...@@ -56,7 +56,14 @@ export default {
"riskBigDetail", "riskBigDetail",
"riskView", "riskView",
"resultPage", "resultPage",
"riskAppvoreText" "riskAppvoreText",
"taskLedger",
"riskManage",
"riskExecution",
"riskAssess",
"riskApprove",
"taskList",
"taskDetail",
], ],
// cachePage预先定义的缓存页面 // cachePage预先定义的缓存页面
otherCache: [], otherCache: [],
......
<template>
<div>
<!-- 搜索 -->
<!-- <van-sticky offset-top="0">
<div class="content-wrap">
<div class="search-wrap">
<van-search v-model="searchVal" placeholder="搜索" @input="onInput"/>
</div>
</div>
</van-sticky> -->
<div style="margin-bottom: 1.4rem;">
<van-tree-select :items="listdata" :active-id.sync="activeId" :main-active-index.sync="activeIndex" @click-item="clickItem">
</van-tree-select>
</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>
</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: "选择人员",
activeId: 1,
activeIndex: 0,
seletedItem:{}
};
},
methods: {
// 待搜索框内容发生变化
onInput: debounce(function () {
}, 800),
selData(e) {
this.itemSel = e
},
clickItem(data) {
console.log(data, 'llll')
this.seletedItem = data
},
save() {
this.$emit('saveSlect', this.seletedItem)
},
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;
}
}
.upStep {
.van-cell-group {
display: flex;
height: 1.2rem;
align-items: center;
.upStep-btn {
width: 25%;
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%;
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;
}
.people-wrap {
margin-top: 0.266667rem;
/deep/ .van-radio__label {
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;
box-sizing: border-box;
}
}
.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
<template>
<div>
<!-- 搜索 -->
<van-sticky offset-top="0">
<div class="content-wrap">
<div class="search-wrap">
<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
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-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() {
},
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
},
save() {
this.$emit('saveSlect', this.checkbox)
},
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;
}
}
.upStep {
.van-cell-group {
display: flex;
height: 1.2rem;
align-items: center;
.upStep-btn {
width: 25%;
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%;
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;
}
.people-wrap {
margin-top: 0.266667rem;
/deep/ .van-radio__label {
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;
box-sizing: border-box;
}
}
.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
...@@ -9,14 +9,14 @@ import './permission' ...@@ -9,14 +9,14 @@ import './permission'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import util from './api/util.js' 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, 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 } from 'vant' Step, Steps,Lazyload,Popover,Collapse, CollapseItem,TreeSelect } from 'vant'
import 'lib-flexible/flexible' import 'lib-flexible/flexible'
import vueEsign from 'vue-esign' import vueEsign from 'vue-esign'
Vue.use(vueEsign) Vue.use(vueEsign)
Vue.prototype.util = util 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) 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(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(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(DropdownMenu);
Vue.use(DropdownItem); Vue.use(DropdownItem);
// 引用高德地图组件 main.js // 引用高德地图组件 main.js
......
...@@ -166,6 +166,11 @@ const routes = [{ ...@@ -166,6 +166,11 @@ const routes = [{
name: 'addPresent', name: 'addPresent',
component: () => import('../views/riskProject/add/addPresent.vue'), component: () => import('../views/riskProject/add/addPresent.vue'),
}, },
{//现状风险详情
path: '/presentDetail',
name: 'presentDetail',
component: () => import('../views/riskProject/taskLedger/presentDetail.vue'),
},
{//风险评估列表详情页 {//风险评估列表详情页
path: '/riskBigDetail', path: '/riskBigDetail',
name: 'riskBigDetail', name: 'riskBigDetail',
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
<div class="wrap" ref="mapmidbox"> <div class="wrap" ref="mapmidbox">
<van-sticky v-if="showHeader"> <van-sticky v-if="showHeader">
<header class="header"> <header class="header">
<span @click="close" class="iconLeft"> 关闭</span> <span @click="close" class="iconLeft"> 返回</span>
<span>{{text}}</span> <span>{{text}}</span>
<span @click="confim" class="iconRight" v-show="!isViews">确定</span> <span @click="confim" class="iconRight" v-show="!isViews">保存</span>
<span class="iconRight" v-show="isViews"></span> <span class="iconRight" v-show="isViews"></span>
</header> </header>
</van-sticky> </van-sticky>
...@@ -28,14 +28,15 @@ ...@@ -28,14 +28,15 @@
:isResizable="item.isResizable" :isResizable="item.isResizable"
@resized="resizedEvent" @resized="resizedEvent"
@moved="movedEvent" @moved="movedEvent"
:style="{'backgroundColor':item.c,}" :style="{'backgroundColor':item.c,'border':(item.type == 'thorough'? 'none !important':'')}"
> >
<span class="text">{{item.name}}</span> <span class="text" :class="item.w>(item.h*5) ? '': 'rowText'">{{item.name}}</span>
<span class="remove" @click="removeItem(item.i)" v-if="!item.i">x</span> <span class="remove" @click="removeItem(item.i)" v-if="!item.i">x</span>
</grid-item> </grid-item>
</grid-layout> </grid-layout>
<div class="setBtns"> <div class="setBtns">
<van-button @click="addItem" type="info" size="mini" v-if="!isViews">添加房间</van-button> <van-button @click="addItem" type="info" size="mini" v-if="!isViews">添加房间</van-button>
<van-button @click="addOther" type="info" size="mini" v-if="!isViews">添加其他</van-button>
<van-grid direction="horizontal" :column-num="2" class="footer" v-if="isViews"> <van-grid direction="horizontal" :column-num="2" class="footer" v-if="isViews">
风险等级图例: 风险等级图例:
<span class="riskTab type1"></span>重大风险 <span class="riskTab type1"></span>重大风险
...@@ -44,8 +45,8 @@ ...@@ -44,8 +45,8 @@
<span class="riskTab type4"></span>较小风险 <span class="riskTab type4"></span>较小风险
</van-grid> </van-grid>
</div> </div>
<van-dialog v-model="show" title="创建房间" show-cancel-button @confirm="saveRoomName"> <van-dialog v-model="show" :title="title" show-cancel-button @confirm="saveRoomName" @cancel = "cancelDialog">
<van-cell-group> <van-cell-group v-if="isRoom">
<van-field v-model="roomName" label="房间名称" placeholder="请输入房间名称" /> <van-field v-model="roomName" label="房间名称" placeholder="请输入房间名称" />
<van-field <van-field
readonly readonly
...@@ -57,6 +58,9 @@ ...@@ -57,6 +58,9 @@
/> />
</van-cell-group> </van-cell-group>
<van-cell-group v-else>
<van-field v-model="roomName" label="名称" placeholder="请输入名称" />
</van-cell-group>
</van-dialog> </van-dialog>
<van-popup v-model="showPicker" round position="bottom"> <van-popup v-model="showPicker" round position="bottom">
<van-picker <van-picker
...@@ -94,16 +98,18 @@ export default { ...@@ -94,16 +98,18 @@ export default {
draggable: false, draggable: false,
resizable: true, resizable: true,
colNum: 12, colNum: 12,
isScreenFull :null, // isScreenFull :null,
layOutItem:{},//新增的房间对象 layOutItem:{},//新增的房间对象
show:false, show:false,
title:'',
showPicker: false, showPicker: false,
roomType:'', roomType:'',
roomName:'', roomName:'',
columns: ['办公', '餐饮', '住宅', '超市'], columns: ['办公', '餐饮', '住宅', '超市'],
colorList:['#FF4433','#FF9800','#FFFF00','#0091EA'], colorList:['#FF4433','#FF9800','#FFFF00','#0091EA'],
isViews:false,// true:查看页面; false: 添加页面 isViews:false,// true:查看页面; false: 添加页面
showHeader:true showHeader:true,
isRoom:true,//是否为添加房间
} }
}, },
props:{ props:{
...@@ -160,7 +166,7 @@ export default { ...@@ -160,7 +166,7 @@ export default {
wrapper.style.cssText = style; wrapper.style.cssText = style;
}, },
rotateBox() { rotateBox() {
this.isScreenFull = !this.isScreenFull;//是否全屏状态 // this.isScreenFull = !this.isScreenFull;//是否全屏状态
let width = document.documentElement.clientWidth,//页面宽度 let width = document.documentElement.clientWidth,//页面宽度
height = document.documentElement.clientHeight,//页面高度 height = document.documentElement.clientHeight,//页面高度
wrapper = this.$refs.mapmidbox,//需要横屏的块,与全屏的块要区分开,不区分全屏的块无法显示横屏效果 wrapper = this.$refs.mapmidbox,//需要横屏的块,与全屏的块要区分开,不区分全屏的块无法显示横屏效果
...@@ -209,9 +215,23 @@ export default { ...@@ -209,9 +215,23 @@ export default {
item.position.i = item.id item.position.i = item.id
item.position.isDraggable = false item.position.isDraggable = false
item.position.isResizable = false item.position.isResizable = false
if (!this.isViews) { //添加页面不显示颜色 if (!this.isViews || item.position.type == 'thorough') { //添加页面不显示颜色
item.position.c = '#eee' item.position.c = '#e6e5e5'
}else{ }else{
/**
* 根据风险评分来匹配相应的颜色
* score 风险评分字段
*/
// item.score = Number(item.score)
// if (item.score>=21 && item.score <= 27) { //优
// item.position.c = this.colorList[3]
// }else if(item.score>=14 && item.score <=20){ //良
// item.position.c = this.colorList[2]
// }else if (item.score>=7&& item.score <= 13) { //中
// item.position.c = this.colorList[1]
// }else if (item.score>=0 && item.score <= 6) { //差
// item.position.c = this.colorList[0]
// }
item.position.c = this.colorList[Math.floor(Math.random()*4)] item.position.c = this.colorList[Math.floor(Math.random()*4)]
} }
this.layout.push(item.position) this.layout.push(item.position)
...@@ -223,21 +243,39 @@ export default { ...@@ -223,21 +243,39 @@ export default {
}) })
}, },
// 增加 // 增加
addItem: function () { addItem () {
if (this.layout.find((item) => item.i == '')) { if (this.layout.find((item) => item.i == '')) {
Toast.fail({ Toast.fail({
title: '提示', title: '提示',
forbidClick: true, forbidClick: true,
message: '一次只能增加一个房间', message: '请先点击确定,保存当前房间信息',
}) })
return return
} }
this.roomType = '' this.roomType = ''
this.roomName = '' this.roomName = ''
this.title = '创建房间'
this.isRoom = true
this.show = true
},
// 添加其他
addOther(){
if (this.layout.find((item) => item.i == '')) {
Toast.fail({
title: '提示',
forbidClick: true,
message: '请先点击确定,保存当前房间信息',
})
return
}
this.isRoom = false
this.roomType = ''
this.roomName = ''
this.title = '创建其他'
this.show = true this.show = true
}, },
// 删除 // 删除
removeItem: function (val) { removeItem (val) {
if (val == '') { if (val == '') {
const index = this.layout.map(item => item.i).indexOf(val); const index = this.layout.map(item => item.i).indexOf(val);
this.layout.splice(index, 1); this.layout.splice(index, 1);
...@@ -282,7 +320,7 @@ export default { ...@@ -282,7 +320,7 @@ export default {
floorId: this.$route.params.floorId ? this.$route.params.floorId : '18', floorId: this.$route.params.floorId ? this.$route.params.floorId : '18',
name:this.roomName, name:this.roomName,
position: JSON.stringify(this.layOutItem), position: JSON.stringify(this.layOutItem),
roomType: this.roomType roomType: this.isRoom ? this.roomType : '9999',
} }
postFun('/ledger/room/save', data).then((res) => { postFun('/ledger/room/save', data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
...@@ -297,6 +335,14 @@ export default { ...@@ -297,6 +335,14 @@ export default {
}, },
//保存房间名称 //保存房间名称
saveRoomName(){ saveRoomName(){
if (this.roomName == '') {
Toast.fail({
title: '提示',
forbidClick: true,
message: '请输入名称!',
})
return
}
this.layOutItem = { this.layOutItem = {
x: (this.layout.length * 2) % (this.colNum || 12), x: (this.layout.length * 2) % (this.colNum || 12),
y: this.layout.length + (this.colNum/2 || 12), y: this.layout.length + (this.colNum/2 || 12),
...@@ -305,12 +351,16 @@ export default { ...@@ -305,12 +351,16 @@ export default {
i: '', i: '',
name: this.roomName, name: this.roomName,
c: '#0091EA', c: '#0091EA',
type:this.roomType, type:this.isRoom ? this.roomType : 'thorough',
isDraggable:true, isDraggable:true,
isResizable:true isResizable:true
} }
this.layout.push(this.layOutItem) this.layout.push(this.layOutItem)
// console.log('layOutItem==>>',this.layOutItem) console.log('layOutItem==>>',this.layOutItem)
},
cancelDialog(){
this.roomType = ''
this.roomName = ''
}, },
onConfirm(value) { onConfirm(value) {
this.roomType = value; this.roomType = value;
...@@ -325,10 +375,8 @@ export default { ...@@ -325,10 +375,8 @@ export default {
padding-bottom: 0px !important; padding-bottom: 0px !important;
} }
.wrap{ .wrap{
height: 100vh; /* height: 100vh; */
width: 100vw; width: 100vw;
/* transform: rotate(90deg);
transform-origin: bottom left; */
position: relative; position: relative;
} }
.footer{ .footer{
...@@ -382,7 +430,7 @@ export default { ...@@ -382,7 +430,7 @@ export default {
vertical-align: middle; vertical-align: middle;
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
flex-direction: column; /* flex-direction: column; */
} }
.setBtns .van-button--mini{ .setBtns .van-button--mini{
padding: 0 10px; padding: 0 10px;
...@@ -393,16 +441,19 @@ export default { ...@@ -393,16 +441,19 @@ export default {
top: 0; top: 0;
cursor: pointer; cursor: pointer;
} }
::v-deep .van-dialog__header{
padding-top: 15px !important;
padding-bottom: 15px !important;
}
.vue-grid-item { .vue-grid-item {
-ms-touch-action: none; -ms-touch-action: none;
touch-action: none; touch-action: none;
box-sizing: border-box; box-sizing: border-box;
container-type: inline-size; /* container-type: inline-size; */
} }
.vue-grid-layout { .vue-grid-layout {
background: #f0f1f5; background: #f0f1f5;
} }
.vue-grid-item:not(.vue-grid-placeholder) { .vue-grid-item:not(.vue-grid-placeholder) {
background: #ccc; background: #ccc;
border: 1px solid black; border: 1px solid black;
...@@ -417,22 +468,23 @@ export default { ...@@ -417,22 +468,23 @@ export default {
} }
.vue-grid-item .text { .vue-grid-item .text {
writing-mode:vertical-rl; /* font-size: 6cqw; */
-webkit-writing-mode: vertical-rl;
font-size: 10cqw;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: absolute; /* position: absolute;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0; */
margin: auto; margin: auto;
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
.rowText{
writing-mode:vertical-rl;
-webkit-writing-mode: vertical-rl;
}
.vue-grid-item .no-drag { .vue-grid-item .no-drag {
height: 100%; height: 100%;
width: 100%; width: 100%;
......
This diff is collapsed.
This diff is collapsed.
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<van-tabs v-model="active" @change="tabList" color="#2980f7" animated> <van-tabs v-model="active" @change="tabList" color="#2980f7" animated>
<van-tab :title="buildingName"> <van-tab :title="buildingName">
<van-dropdown-menu z-index="1000"> <van-dropdown-menu z-index="1000">
<van-dropdown-item v-model="value0" @change="changeBuild" :options="option0" get-container="body" />
<van-dropdown-item v-model="value1" @change="changeFloor" :options="option1" get-container="body" /> <van-dropdown-item v-model="value1" @change="changeFloor" :options="option1" get-container="body" />
<van-dropdown-item v-model="value2" @change="changeRoom" :options="option2" get-container="body" /> <van-dropdown-item v-model="value2" @change="changeRoom" :options="option2" get-container="body" />
</van-dropdown-menu> </van-dropdown-menu>
...@@ -97,8 +98,10 @@ export default { ...@@ -97,8 +98,10 @@ export default {
planId: 0, planId: 0,
buildingId: 0, buildingId: 0,
buildingName: "", buildingName: "",
value0:'',
value1: 0, value1: 0,
value2: 0, value2: 0,
option0:[],
option1: [], option1: [],
option2: [], option2: [],
isHaveNews: false, isHaveNews: false,
...@@ -108,7 +111,8 @@ export default { ...@@ -108,7 +111,8 @@ export default {
showIndex: null, // 是否显示遮罩层, showIndex: null, // 是否显示遮罩层,
active: 1, active: 1,
form: {}, form: {},
tabs: [] tabs: [],
floorListData:[]
}; };
}, },
created() { created() {
...@@ -127,7 +131,7 @@ export default { ...@@ -127,7 +131,7 @@ export default {
arr.forEach(item => { arr.forEach(item => {
arrList.push({ arrList.push({
text: item.name, text: item.name,
value: item.id value: item.id || item.name
}); });
}); });
return arrList; return arrList;
...@@ -189,9 +193,10 @@ export default { ...@@ -189,9 +193,10 @@ 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 => {
this.option1 = this.changeData(res.data); this.floorListData = res.data
this.value1 = res.data[0].id || 0; this.option0 = this.changeData(res.data)
resolve(res.data); this.value0 = res.data[0].name || ''
this.changeBuild(res.data[0].name )
}) })
.catch(() => { .catch(() => {
this.$toast.fail("加载失败,请稍后再试"); this.$toast.fail("加载失败,请稍后再试");
...@@ -249,6 +254,15 @@ export default { ...@@ -249,6 +254,15 @@ export default {
let room = await this.roomList(floor[0].id); let room = await this.roomList(floor[0].id);
let risk = await this.riskList(this.planId, value); let risk = await this.riskList(this.planId, value);
}, },
changeBuild(name){
let arr = this.floorListData.map((item)=>{
if(item.name == name){
return item.children
}
});
this.option1 = this.changeData(arr[0])
this.value1 = this.changeData(arr[0]).id
},
async changeFloor() { async changeFloor() {
let room = await this.roomList(this.value1); let room = await this.roomList(this.value1);
let risk = await this.riskList(this.planId, this.buildingId, this.value1, this.value2); let risk = await this.riskList(this.planId, this.buildingId, this.value1, this.value2);
......
<template> <template>
<div> <div>
<!-- 搜索 --> <!-- 搜索 -->
<van-sticky offset-top="0">
<div class="content-wrap"> <div class="content-wrap">
<div class="search-wrap"> <div class="search-wrap">
<van-search v-model="searchVal" placeholder="搜索" @input="onInput"/> <van-search v-model="searchVal" placeholder="搜索" @input="onInput"/>
</div> </div>
</div> </div>
</van-sticky>
<div style="margin-bottom: 1.4rem;"> <div style="margin-bottom: 1.4rem;">
<van-radio-group v-model="radio"> <van-radio-group v-model="radio">
<van-list <van-list
......
...@@ -228,15 +228,15 @@ ...@@ -228,15 +228,15 @@
<van-col span="7" <van-col span="7"
><span class="field-title">任务节点:</span></van-col ><span class="field-title">任务节点:</span></van-col
> >
<van-col span="17">{{ item.taskName }}</van-col> <van-col span="17">{{ item.taskName }}{{
item.taskResult && item.taskResult == 1 ? "(审批通过)" : "(审批否决)"
}}</van-col>
</van-row> </van-row>
<van-row v-show="item.taskResult"> <van-row v-show="item.taskResult">
<van-col span="7" <van-col span="7"
><span class="field-title">审批结果</span></van-col ><span class="field-title">审批意见</span></van-col
> >
<van-col span="17">{{ <van-col span="17">{{item.taskOpinion}}</van-col>
item.taskResult == 1 ? "审批通过" : "审批否决"
}}</van-col>
</van-row> </van-row>
<!-- <van-row> <!-- <van-row>
<van-col span="7" <van-col span="7"
...@@ -566,7 +566,6 @@ export default { ...@@ -566,7 +566,6 @@ export default {
}, },
//执行任务 //执行任务
performTasks() { performTasks() {
console.log(this.messageList, "LLLL");
sessionStorage.setItem( sessionStorage.setItem(
"buildingId", "buildingId",
this.messageList.riskBuildingListDtos[0].buildingId this.messageList.riskBuildingListDtos[0].buildingId
...@@ -758,7 +757,8 @@ export default { ...@@ -758,7 +757,8 @@ export default {
this.$router.push({ this.$router.push({
name: "taskDetail", name: "taskDetail",
params: { params: {
id: item.id id: item.id,
floorId:item.floorId
} }
}); });
} }
......
...@@ -230,7 +230,7 @@ export default { ...@@ -230,7 +230,7 @@ export default {
padding: 0.25rem; padding: 0.25rem;
font-size: 0.4rem; font-size: 0.4rem;
position: relative; position: relative;
border-radius: 4%; border-radius: 8px;
box-shadow: 0px 0px 10px 2px #f3f3f3; box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%; width: 90%;
margin: 0.4rem auto; margin: 0.4rem auto;
......
...@@ -3,18 +3,16 @@ ...@@ -3,18 +3,16 @@
<van-sticky offset-top="0"> <van-sticky offset-top="0">
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
</van-sticky> </van-sticky>
<van-tabs <van-sticky offset-top="1.5rem">
v-model="active" <van-search v-model="searchValue" show-action placeholder="请输入搜索内容" @search="onSearch">
color="#2980f7" <template #action>
animated <div @click="onSearch">搜索</div>
:sticky="true" </template>
> </van-search>
<van-tab title="排序"> </van-sticky>
<template #title> 排序 <van-icon name="down" /></template> <div class="con-list">
<div class="con-list" > <van-cell-group v-for="(item, index) in taskList" :key="index" inset @click="touchstart(index, item)">
<van-cell-group v-for="(item,index) in taskList" :key="index" inset @click="touchstart(index, item)" > <div style="font-size: 0.45rem;padding: 5px 0;">{{ item.name }}</div>
<div style="font-size: 0.45rem;padding: 5px 0;">{{item.name}}</div>
<van-row gutter=""> <van-row gutter="">
<van-col span="17"> <van-col span="17">
<van-row gutter=""> <van-row gutter="">
...@@ -23,28 +21,21 @@ ...@@ -23,28 +21,21 @@
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="9">处理人员:</van-col> <van-col span="9">处理人员:</van-col>
<van-col span="15">{{item.leaderUserName}}</van-col> <van-col span="15">{{ item.leaderUserName }}</van-col>
</van-row> </van-row>
</van-col> </van-col>
<van-col span="7" :style="{'color':'#03b615'}"> <van-col span="7" :style="{ 'color': '#03b615' }">
{{item.state}} {{ item.state }}
</van-col> </van-col>
</van-row> </van-row>
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null"> <div class="wrapper" @click.stop="showIndex = null">
<van-button round type="primary" @click="goDetail(item)" <van-button round type="primary" @click="goDetail(item)">详情</van-button>
>详情</van-button
>
</div> </div>
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
</div> </div>
</van-tab>
<van-tab title="筛选">
<template #title> 筛选 <van-icon name="filter-o" /></template>
</van-tab>
</van-tabs>
</div> </div>
</template> </template>
...@@ -53,11 +44,12 @@ import LHeader from "@/components/header.vue"; ...@@ -53,11 +44,12 @@ import LHeader from "@/components/header.vue";
import { timestampToTime, generateId } from "@/utils/format"; import { timestampToTime, generateId } from "@/utils/format";
import { getFun, postFun } from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
export default { export default {
name:'taskLedger',//任务台账 name: 'taskLedger',//任务台账
data() { data() {
return { return {
text:'任务台账', text: '任务台账',
active: 0, active: 0,
searchValue: '',
showIndex: null, // 是否显示遮罩层, showIndex: null, // 是否显示遮罩层,
taskList: [], // 是否显示遮罩层, taskList: [], // 是否显示遮罩层,
} }
...@@ -72,10 +64,10 @@ export default { ...@@ -72,10 +64,10 @@ export default {
timestampToTimes(time) { timestampToTimes(time) {
return timestampToTime(new Date(time), "DT2", true); return timestampToTime(new Date(time), "DT2", true);
}, },
getList(){ getList() {
getFun('/risk/plan/details/list').then(res=>{ getFun('/risk/plan/details/list').then(res => {
console.log('%c [ res ]-77', 'font-size:13px; background:pink; color:#bf2c9f;', res) console.log('%c [ res ]-77', 'font-size:13px; background:pink; color:#bf2c9f;', res)
this.taskList=res.data this.taskList = res.data
}) })
}, },
//点击列表 //点击列表
...@@ -87,43 +79,52 @@ export default { ...@@ -87,43 +79,52 @@ export default {
this.showIndex = index; this.showIndex = index;
}, },
// 详情 // 详情
goDetail(item){ goDetail(item) {
this.$router.push({ this.$router.push({
name: "riskTaskList", name: "riskTaskList",
params: { params: {
id:item.id, id: item.id,
}, },
}); });
},
onSearch(searchValue) {
} }
}, },
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.wrap{ .wrap {
height: 100vh; height: 100vh;
width: 100vw; width: 100vw;
} }
.con-list {
.con-list {
padding: 0; padding: 0;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 0.26667rem; margin-bottom: 0.26667rem;
padding: 0.25rem; padding: 0.25rem;
font-size: 0.4rem; font-size: 0.4rem;
position: relative; position: relative;
border-radius: 4%; border-radius: 8px;
box-shadow: 0px 0px 10px 2px #f3f3f3; box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%; width: 90%;
margin: 0.4rem auto; margin: 0.4rem auto;
.van-row { .van-row {
font-size: 0.4rem; font-size: 0.4rem;
line-height: 0.8rem; line-height: 0.8rem;
margin-bottom: 0; margin-bottom: 0;
} }
.van-overlay { .van-overlay {
position: absolute; position: absolute;
.wrapper { .wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -132,5 +133,5 @@ export default { ...@@ -132,5 +133,5 @@ export default {
} }
} }
} }
} }
</style> </style>
This diff is collapsed.
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
:rules="[{ required: true, message: '风险源名称不能为空' }]" /> :rules="[{ required: true, message: '风险源名称不能为空' }]" />
<van-field v-model="InherentRisk.factor" required name="factor" label="风险因素" placeholder="请选择" <van-field v-model="InherentRisk.factor" required name="factor" label="风险因素" placeholder="请选择"
:rules="[{ required: true, message: '风险因素不能为空' }]" /> :rules="[{ required: true, message: '风险因素不能为空' }]" />
<van-field v-model="InherentRisk.type" required name="type" label="准事故类型" placeholder="请选择" @click="seletType('type')" <van-field v-model="InherentRisk.type" required name="type" label="准事故类型" placeholder="请选择"
:rules="[{ required: true, message: '准事故类型不能为空' }]" /> :rules="[{ required: true, message: '准事故类型不能为空' }]" />
<van-field readonly v-model="InherentRisk.level" required name="level" label="风险等级" placeholder="请选择" <van-field readonly v-model="InherentRisk.level" required name="level" label="风险等级" placeholder="请选择"
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</div> </div>
<van-field name="hdPicture1" label="风险源图片"> <van-field name="hdPicture1" label="风险源图片">
<template #input> <template #input>
<van-uploader multiple :max-count="5" <van-uploader multiple :max-count="5" disabled
upload-text="最多上传五个" v-model="uploaderImg"> upload-text="最多上传五个" v-model="uploaderImg">
<template slot="default"> <template slot="default">
<div style=" <div style="
...@@ -59,13 +59,13 @@ ...@@ -59,13 +59,13 @@
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"> <div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt="" <img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"> style="position: relative;top: 32%;transform: translateY(-50%);">
技术措施 应有技术措施
</div> </div>
<van-field v-model="InherentRisk.measuresProject" name="measuresProject" label="技术措施" type="textarea" rows="1" autosize <van-field disabled v-model="InherentRisk.measuresProject" name="measuresProject" label="技术措施" type="textarea" rows="1" autosize
placeholder="请输入" /> placeholder="请输入" />
<van-field name="measuresProjectFile[]" label=" "> <van-field name="measuresProjectFile[]" label=" ">
<template #input> <template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresProjectFile" accept="file" <van-uploader disabled multiple :max-count="5" upload-text="最多上传五个" v-model="measuresProjectFile" accept="file"
result-type="file" @delete="deleteFile(...arguments, 'measuresProjectFile')"> result-type="file" @delete="deleteFile(...arguments, 'measuresProjectFile')">
<template slot="default"> <template slot="default">
<div style=" <div style="
...@@ -87,13 +87,13 @@ ...@@ -87,13 +87,13 @@
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"> <div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt="" <img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"> style="position: relative;top: 32%;transform: translateY(-50%);">
管理措施 应有管理措施
</div> </div>
<van-field v-model="InherentRisk.measuresAdministration" name="measuresAdministration" label="管理措施" type="textarea" <van-field disabled v-model="InherentRisk.measuresAdministration" name="measuresAdministration" label="管理措施" type="textarea"
rows="1" autosize placeholder="请输入" /> rows="1" autosize placeholder="请输入" />
<van-field name="measuresAdministrationFile[]" label=" "> <van-field name="measuresAdministrationFile[]" label=" ">
<template #input> <template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresAdministrationFile" <van-uploader disabled multiple :max-count="5" upload-text="最多上传五个" v-model="measuresAdministrationFile"
accept="file" result-type="file" @delete="deleteFile(...arguments, 'measuresAdministrationFile')"> accept="file" result-type="file" @delete="deleteFile(...arguments, 'measuresAdministrationFile')">
<template slot="default"> <template slot="default">
<div style=" <div style="
...@@ -115,13 +115,13 @@ ...@@ -115,13 +115,13 @@
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"> <div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt="" <img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"> style="position: relative;top: 32%;transform: translateY(-50%);">
应急措施 应有应急措施
</div> </div>
<van-field v-model="InherentRisk.measuresEmergency" name="measuresEmergency" label="应急措施" type="textarea" rows="1" <van-field disabled v-model="InherentRisk.measuresEmergency" name="measuresEmergency" label="应急措施" type="textarea" rows="1"
autosize placeholder="请输入" /> autosize placeholder="请输入" />
<van-field name="measuresEmergencyFile[]" label=" "> <van-field name="measuresEmergencyFile[]" label=" ">
<template #input> <template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresEmergencyFile" accept="file" <van-uploader disabled multiple :max-count="5" upload-text="最多上传五个" v-model="measuresEmergencyFile" accept="file"
result-type="file" @delete="deleteFile(...arguments, 'measuresEmergencyFile')"> result-type="file" @delete="deleteFile(...arguments, 'measuresEmergencyFile')">
<template slot="default"> <template slot="default">
<div style=" <div style="
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</div> </div>
</van-tab> </van-tab>
<van-tab title="四色图" name="c"> <van-tab title="四色图" name="c">
<drawCanvas :isView="true"/> <drawCanvas :isView="true" :floorId="floorId"/>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</div> </div>
...@@ -72,7 +72,8 @@ export default { ...@@ -72,7 +72,8 @@ export default {
activeName: 'a', activeName: 'a',
quoRiskList: [],//现状风险列表 quoRiskList: [],//现状风险列表
InherentRisk: {},//固有风险 InherentRisk: {},//固有风险
inherentId: '' inherentId: '',
floorId:'',
} }
}, },
components: { components: {
...@@ -81,11 +82,12 @@ export default { ...@@ -81,11 +82,12 @@ export default {
TabDetail TabDetail
}, },
created() { created() {
this.inherentId = this.$route.params.id this.inherentId = this.$route.params.id ||sessionStorage.getItem('inherntId')
this.floorId = this.$route.params.floorId
}, },
mounted() { mounted() {
this.getInherentRiskList(this.$route.params.id) this.getInherentRiskList(this.inherentId)
this.getQuoRiskList(this.$route.params.id) this.getQuoRiskList(this.inherentId)
}, },
methods: { methods: {
getInherentRiskList(inherentId){ getInherentRiskList(inherentId){
...@@ -102,25 +104,19 @@ export default { ...@@ -102,25 +104,19 @@ export default {
return timestampToTime(new Date(time), "DT1", true); return timestampToTime(new Date(time), "DT1", true);
}, },
goDetail(item){ goDetail(item){
console.log(item,'???') sessionStorage.setItem('inherntId',this.inherentId)
this.$router.push({ this.$router.push({
name:'taskDetail', name:'presentDetail',
params:{ params:{
isView:false, isView:false,
// buildingId:,
// planId:,
// floorId:,
// roomId:,
// inherentId:,
// roomName:,
} }
}) })
}, },
onClick(name){ onClick(name){
if(name==='a'){ if(name==='a'){
this.getQuoRiskList(this.$route.params.id) this.getQuoRiskList(this.inherentId)
}else if(name==='b'){ }else if(name==='b'){
this.getInherentRiskList(this.$route.params.id) this.getInherentRiskList(this.inherentId)
} }
} }
}, },
...@@ -129,13 +125,13 @@ export default { ...@@ -129,13 +125,13 @@ export default {
<style scoped> <style scoped>
.wrap { .wrap {
height: 100vh; /* height: 100vh; */
width: 100vw; width: 100vw;
} }
.section { .section {
width: 100%; width: 100%;
height: 100%; /* height: 100%; */
overflow-y: auto; overflow-y: auto;
} }
.quolist{ .quolist{
......
...@@ -8,9 +8,9 @@ module.exports = { ...@@ -8,9 +8,9 @@ module.exports = {
//以上的ip和端口是我们本机的;下面为需要跨域的 //以上的ip和端口是我们本机的;下面为需要跨域的
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:8080/', //这里是后台的地址 // target: 'http://localhost:8080/', //这里是后台的地址
ws: true, ws: true,
......
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