Commit 5fd98b1e authored by p-wanping.song's avatar p-wanping.song

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

parents c8c956fe 6df45dfc
<template> <template>
<div> <div>
<!-- 搜索 --> <!-- 搜索 -->
<van-sticky offset-top="0"> <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> </van-sticky>
<div style="margin-bottom: 1.4rem;"> <div style="margin-bottom: 1.4rem;">
<van-checkbox-group v-model="checkbox"> <van-checkbox-group v-model="checkbox">
<!-- <van-list <!-- <van-list
v-model="loading" v-model="loading"
:finished="finished" :finished="finished"
finished-text="没有更多了" finished-text="没有更多了"
@load="getInsideUser()" @load="getInsideUser()"
> --> > -->
<van-checkbox style="margin: 0px 10px;" v-for="(item,index) in listdata" :name="item.dictLabel" :key="index" @click="selData(item)"> <van-checkbox
<van-cell :title="item.dictValue" /> style="margin: 0px 10px;"
</van-checkbox> v-for="(item, index) in listdata"
<!-- </van-list> --> :name="item.dictLabel"
</van-checkbox-group> :key="index"
@click="selData(item)"
</div> >
<!-- 底部信息 --> <van-cell :title="item.dictValue" />
<footer class="footer"> </van-checkbox>
<van-cell-group> <!-- </van-list> -->
<div class="operate"> </van-checkbox-group>
<van-button </div>
size="small" <!-- 底部信息 -->
ttype="info" <footer class="footer">
plain <van-cell-group>
native-type="button" <div class="operate">
style="border-radius: 5px; background-color: #f0f1f5;" <van-button
@click.native="cancel" size="small"
ttype="info"
plain
native-type="button"
style="border-radius: 5px; background-color: #f0f1f5;"
@click.native="cancel"
>取消 >取消
</van-button </van-button>
> <van-button
<van-button size="small"
size="small" type="info"
type="info" native-type="button"
native-type="button" style="margin:0 10px 0 20px;border-radius: 5px;"
style="margin:0 10px 0 20px;border-radius: 5px;" @click.native="save"
@click.native="save"
>保存 >保存
</van-button </van-button>
> </div>
</div> </van-cell-group>
</van-cell-group> </footer>
</footer> </div>
</div> </template>
</template>
<script>
<script> import { debounce } from "@/utils/common.js";
import {debounce} from "@/utils/common.js"; export default {
props: {
export default { listdata: {
props:{ type: Array,
listdata:{ default: () => []
type:Array, }
default:()=>[], },
} components: {
}, // LHeader
components: { },
// LHeader created() {},
}, data() {
created() { 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() { save() {
return { this.$emit("saveSlect", this.checkbox);
text: "选择人员", this.checkbox = [];
personName: "",
searchVal: "",
checkbox:[],
pageSize: 20,
pageNum: 1,
loading: false,
finished: false,
projectList:[],
itemSel:{
}
};
}, },
methods: { cancel() {
// 待搜索框内容发生变化 this.$emit("closeSlect");
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 { </script>
margin: 0.26667rem; <style lang="less" scoped>
/* @import url(); 引入css类 */
.van-search { // 搜索
border-radius: 5px; .content-wrap {
padding: 5px 12px; padding: 10px;
} background-color: #f0f1f5;
}
.van-search__content {
background-color: #ffffff; .search-wrap {
} margin: 0.26667rem;
.van-search {
border-radius: 5px;
padding: 5px 12px;
} }
.upStep { .van-search__content {
.van-cell-group { background-color: #ffffff;
}
}
.upStep {
.van-cell-group {
display: flex;
height: 1.2rem;
align-items: center;
.upStep-btn {
width: 25%;
text-align: center;
display: flex; display: flex;
height: 1.2rem;
align-items: center; span {
width: 1.866667rem;
.upStep-btn { background-color: #1989fa;
width: 25%;
text-align: center; text-align: center;
display: flex; display: inline-block;
color: white;
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; height: 0.8rem;
line-height: 0.8rem; line-height: 0.8rem;
padding-left: 0.42667rem; font-size: 0.346667rem;
box-sizing: border-box; border-radius: 0.08rem;
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
} }
.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; .footer {
width: 100%;
/deep/ .van-radio__label { 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; display: flex;
align-items: center; align-items: center;
} padding-left: 10px;
} border-bottom: 1px solid #cacbcb;
.footer { .selected-title {
width: 100%; color: #4187f7;
height: 1.4rem; }
z-index: 9;
position: fixed; .selected-content {
bottom: 0px; width: 80%;
box-shadow: 0px 8px 15px #000;
.van-cell-group {
height: 100%;
.selected {
height: 1.066667rem;
display: flex;
align-items: center;
padding-left: 10px; padding-left: 10px;
border-bottom: 1px solid #cacbcb; box-sizing: border-box;
.selected-title {
color: #4187f7;
}
.selected-content {
width: 80%;
padding-left: 10px;
box-sizing: border-box;
}
} }
}
.operate {
height: 1.333333rem; .operate {
display: flex; height: 1.333333rem;
justify-content: flex-end; display: flex;
align-items: center; justify-content: flex-end;
align-items: center;
.van-button {
width: 1.6rem; .van-button {
} width: 1.6rem;
} }
} }
} }
</style> }
</style>
\ No newline at end of file
...@@ -8,16 +8,19 @@ import qs from 'qs'; ...@@ -8,16 +8,19 @@ import qs from 'qs';
import './permission' 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 {
Step, Steps,Lazyload,Popover,Collapse, CollapseItem,TreeSelect } from 'vant' 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 '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(TreeSelect) .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(Switch);
Vue.use(DropdownItem); Vue.use(DropdownItem);
// 引用高德地图组件 main.js // 引用高德地图组件 main.js
import VueAMap from 'vue-amap' import VueAMap from 'vue-amap'
...@@ -27,7 +30,7 @@ VueAMap.initAMapApiLoader({ ...@@ -27,7 +30,7 @@ VueAMap.initAMapApiLoader({
key: '9b16720c3ea21877cfbe73229bba9032', key: '9b16720c3ea21877cfbe73229bba9032',
plugin: [ // 依赖配置,根据自己的需求引入 plugin: [ // 依赖配置,根据自己的需求引入
'AMap.PlaceSearch',//POI搜索插件 'AMap.PlaceSearch',//POI搜索插件
'AMap.Scale', 'AMap.Scale',
'AMap.Geocoder', 'AMap.Geocoder',
"AMap.Autocomplete", //输入提示插件 "AMap.Autocomplete", //输入提示插件
...@@ -37,7 +40,7 @@ VueAMap.initAMapApiLoader({ ...@@ -37,7 +40,7 @@ VueAMap.initAMapApiLoader({
"AMap.PolyEditor", //编辑 折线多边形 "AMap.PolyEditor", //编辑 折线多边形
"AMap.CircleEditor", //圆形编辑器插件 "AMap.CircleEditor", //圆形编辑器插件
"AMap.Geolocation", //定位控件,用来获取和展示用户主机所在的经纬度位置 "AMap.Geolocation", //定位控件,用来获取和展示用户主机所在的经纬度位置
"AMap.MouseTool", "AMap.MouseTool",
"AMap.Map", "AMap.Map",
"mouseTool.polygon", "mouseTool.polygon",
...@@ -46,7 +49,7 @@ VueAMap.initAMapApiLoader({ ...@@ -46,7 +49,7 @@ VueAMap.initAMapApiLoader({
"AMap.DistrictSearch", "AMap.DistrictSearch",
"AMap.Heatmap", // 绘制热力图插件 "AMap.Heatmap", // 绘制热力图插件
], ],
// 默认高德 sdk 版本为 1.4.4 // 默认高德 sdk 版本为 1.4.4
v: '1.4.4' v: '1.4.4'
}) })
...@@ -65,7 +68,7 @@ Vue.prototype.$md5 = md5; ...@@ -65,7 +68,7 @@ Vue.prototype.$md5 = md5;
Vue.prototype.qs = qs; Vue.prototype.qs = qs;
Array.prototype.remove = function(val) { Array.prototype.remove = function (val) {
var index = this.indexOf(val); var index = this.indexOf(val);
if (index > -1) { if (index > -1) {
this.splice(index, 1); this.splice(index, 1);
......
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
<span class="iconRight" v-show="isViews"></span> <span class="iconRight" v-show="isViews"></span>
</header> </header>
</van-sticky> </van-sticky>
<div class="north">
<img src="../../assets/imgs/north.png" alt="">
</div>
<grid-layout :layout.sync="layout" <grid-layout :layout.sync="layout"
:col-num="colNum" :col-num="colNum"
:row-height="30" :row-height="30"
...@@ -16,7 +19,7 @@ ...@@ -16,7 +19,7 @@
:prevent-collision="false" :prevent-collision="false"
:preventCollision="true" :preventCollision="true"
> >
<grid-item v-for="item in layout" <grid-item v-for="(item) in layout"
:static="item.static" :static="item.static"
:x="item.x" :x="item.x"
:y="item.y" :y="item.y"
...@@ -31,12 +34,15 @@ ...@@ -31,12 +34,15 @@
:style="{'backgroundColor':item.c,'border':(item.type == 'thorough'? 'none !important':'')}" :style="{'backgroundColor':item.c,'border':(item.type == 'thorough'? 'none !important':'')}"
> >
<span class="text" :class="item.w>(item.h*5) ? '': 'rowText'">{{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="showHeader">x</span>
<!-- <span class="remove" @click="removeItem(item.i)" v-if="item.i && isEdit">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-button @click="addOther" type="info" size="mini" v-if="!isViews">添加其他</van-button>
<van-button @click="addBase" type="info" size="mini" v-if="!isViews">添加基础设施</van-button>
<!-- <van-button @click="editItem" 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>重大风险
...@@ -110,6 +116,7 @@ export default { ...@@ -110,6 +116,7 @@ export default {
isViews:false,// true:查看页面; false: 添加页面 isViews:false,// true:查看页面; false: 添加页面
showHeader:true, showHeader:true,
isRoom:true,//是否为添加房间 isRoom:true,//是否为添加房间
layoutData:[]
} }
}, },
props:{ props:{
...@@ -123,6 +130,7 @@ export default { ...@@ -123,6 +130,7 @@ export default {
// this.$nextTick(() => { // this.$nextTick(() => {
// this.rotateBox(); // this.rotateBox();
// }); // });
console.log('floorId==>>',this.$route.params.floorId )
if (this._props.isView) { if (this._props.isView) {
console.log('作为组件传值==>>',) console.log('作为组件传值==>>',)
this.isViews = true this.isViews = true
...@@ -210,11 +218,15 @@ export default { ...@@ -210,11 +218,15 @@ export default {
getFun('/ledger/room/list',data).then((res) => { getFun('/ledger/room/list',data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.layout = [] this.layout = []
res.rows.forEach((item) => { this.layoutData = res.data
res.data.forEach((item) => {
item.position = JSON.parse(item.position) item.position = JSON.parse(item.position)
item.position.i = item.id item.position.i = item.id
item.position.isDraggable = false item.position.id = item.id
item.position.isResizable = false if (!this.showHeader) {
item.position.isDraggable = false
item.position.isResizable = false
}
if (!this.isViews || item.position.type == 'thorough') { //添加页面不显示颜色 if (!this.isViews || item.position.type == 'thorough') { //添加页面不显示颜色
item.position.c = '#e6e5e5' item.position.c = '#e6e5e5'
}else{ }else{
...@@ -281,53 +293,66 @@ export default { ...@@ -281,53 +293,66 @@ export default {
this.layout.splice(index, 1); this.layout.splice(index, 1);
return return
} }
postFun('/ledger/room/delete/'+val).then((res) => { this.$dialog.confirm({
if (res.code == 200) { title: '提示',
Toast.success('删除成功'); message: '是否删除',
this.getRoomInfo()
}
}).catch((err) => {
console.log('err==>>',err)
}) })
.then(() => {
postFun('/ledger/room/delete/'+val).then((res) => {
if (res.code == 200) {
Toast.success('删除成功');
this.getRoomInfo()
}
}).catch((err) => {
console.log('err==>>',err)
})
})
.catch(() => {
// on cancel
});
},
//添加基础设施
addBase(){
}, },
// 移动后的事件 // 移动后的事件
movedEvent(i, newX, newY){ movedEvent(i, newX, newY){
this.layOutItem.x = newX this.layOutItem.x = newX
this.layOutItem.y = newY this.layOutItem.y = newY
console.log('layOutItem==>>',this.layOutItem) // console.log('layOutItem==>>',this.layOutItem)
// console.log('this.layout==>>',this.layout)
}, },
// 调整大小后的事件 // 调整大小后的事件
resizedEvent: function(i, newH, newW){ resizedEvent: function(i, newH, newW){
this.layOutItem.w = newW this.layOutItem.w = newW
this.layOutItem.h = newH this.layOutItem.h = newH
console.log('layOutItem==>>',this.layOutItem) // console.log('layOutItem==>>',this.layOutItem)
// console.log('this.layout==>>',this.layout)
}, },
//关闭 //关闭
close(){ close(){
history.go(-1) history.go(-1)
}, },
// 确定 保存房间信息 //edger/room/update/batch
// 确定 执行批量编辑保存
confim(){ confim(){
if (this.roomName == '') { // if (this.roomName == '') {
Toast.fail({ // Toast.fail({
title: '提示', // title: '提示',
forbidClick: true, // forbidClick: true,
message: '请先添加房间!', // message: '请先添加房间!',
}) // })
return // return
} // }
let data = { let data = this.layoutData
floorId: this.$route.params.floorId ? this.$route.params.floorId : '18', this.layoutData.forEach((item) => {
name:this.roomName, item.position = JSON.stringify(item.position)
position: JSON.stringify(this.layOutItem), })
roomType: this.isRoom ? this.roomType : '9999', console.log('data==>>',data)
} postFun('/ledger/room/update/batch', data).then((res) => {
postFun('/ledger/room/save', data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
Toast.success('提交成功'); Toast.success('保存成功');
this.getRoomInfo() this.getRoomInfo()
this.roomType = ''
this.roomName = ''
} }
}).catch((err) => { }).catch((err) => {
console.log('err==>>',err) console.log('err==>>',err)
...@@ -350,13 +375,29 @@ export default { ...@@ -350,13 +375,29 @@ export default {
h: 3, h: 3,
i: '', i: '',
name: this.roomName, name: this.roomName,
c: '#0091EA', c: '#e6e5e5',
type:this.isRoom ? this.roomType : 'thorough', 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)
let data = {
floorId: this.$route.params.floorId ? this.$route.params.floorId : '18',
name:this.roomName,
position: JSON.stringify(this.layOutItem),
roomType: this.isRoom ? this.roomType : '9999',
}
postFun('/ledger/room/save', data).then((res) => {
if (res.code == 200) {
// Toast.success('保存成功');
this.getRoomInfo()
this.roomType = ''
this.roomName = ''
}
}).catch((err) => {
console.log('err==>>',err)
})
}, },
cancelDialog(){ cancelDialog(){
this.roomType = '' this.roomType = ''
...@@ -379,6 +420,17 @@ export default { ...@@ -379,6 +420,17 @@ export default {
width: 100vw; width: 100vw;
position: relative; position: relative;
} }
.north{
position: absolute;
display: inline-block;
top: 1.5rem;
right: 0.5rem;
z-index: 999;
}
.north img{
width: 15px;
height: 30px;
}
.footer{ .footer{
/* position: fixed; */ /* position: fixed; */
/* left: 0; */ /* left: 0; */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -94,6 +94,7 @@ ...@@ -94,6 +94,7 @@
<van-field <van-field
required required
readonly
name="leaderUserName" name="leaderUserName"
:value="form.leaderUserName" :value="form.leaderUserName"
label="评估小组组长" label="评估小组组长"
...@@ -104,6 +105,7 @@ ...@@ -104,6 +105,7 @@
<van-field <van-field
required required
readonly
name="workUserNames" name="workUserNames"
:value="form.workUserNames" :value="form.workUserNames"
label="评估小组成员" label="评估小组成员"
...@@ -357,8 +359,9 @@ export default { ...@@ -357,8 +359,9 @@ export default {
var userInfo = getUserInfo(); var userInfo = getUserInfo();
this.form.userId = userInfo.userId; this.form.userId = userInfo.userId;
this.form.userName = userInfo.nickName; this.form.userName = userInfo.nickName;
this.form.deptName = userInfo.dept.deptName;
this.form.deptId = userInfo.dept.deptId; this.form.deptId = userInfo.dept.deptId;
this.form.deptName = userInfo.dept.deptName;
getFun(`/risk/plan/project/list`).then(res => { getFun(`/risk/plan/project/list`).then(res => {
this.columnsSource = res.data; this.columnsSource = res.data;
}); });
...@@ -389,13 +392,6 @@ export default { ...@@ -389,13 +392,6 @@ export default {
this.currentDate = new Date(); this.currentDate = new Date();
}, },
getLeaderUserList(e) { getLeaderUserList(e) {
if (!this.form.projectId) {
this.$toast({
title: "提示",
message: "请选择关联项目!"
});
return false;
}
this.userPrefix = e; this.userPrefix = e;
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
...@@ -403,6 +399,7 @@ export default { ...@@ -403,6 +399,7 @@ export default {
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0
}); });
console.log(this.form.deptId,'00000')
getFun(`/risk/plan/user/list/${this.form.deptId}`).then(res => { getFun(`/risk/plan/user/list/${this.form.deptId}`).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.columnsTrouble = res.data; this.columnsTrouble = res.data;
...@@ -430,7 +427,6 @@ export default { ...@@ -430,7 +427,6 @@ export default {
this.projectDept = true; this.projectDept = true;
}, },
changeDept(id, name) { changeDept(id, name) {
console.log(id);
this.form.deptId = id; this.form.deptId = id;
this.form.deptName = name; this.form.deptName = name;
}, },
...@@ -439,14 +435,6 @@ export default { ...@@ -439,14 +435,6 @@ export default {
this.projectDept = false; this.projectDept = false;
}, },
getExecuteUser() { getExecuteUser() {
if (!this.form.projectId) {
this.$toast({
title: "提示",
message: "请选择关联项目!"
});
return false;
}
this.filedName = "nickName"; this.filedName = "nickName";
this.$toast.loading({ this.$toast.loading({
message: "加载中...", message: "加载中...",
......
...@@ -63,9 +63,13 @@ ...@@ -63,9 +63,13 @@
<van-button round type="primary" @click="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>编辑</van-button >编辑</van-button
> >
<!-- <van-button round type="info" @click="goConfirm(item)" v-show="active==0" <van-button
>确认</van-button round
> --> type="danger"
@click="delInherent(item)"
v-show="active == 0"
>删除</van-button
>
</div> </div>
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
...@@ -158,6 +162,18 @@ export default { ...@@ -158,6 +162,18 @@ export default {
// this.postList(); // this.postList();
}, },
methods: { methods: {
delInherent() {
Dialog.confirm({
title: "删除固有风险",
message: "是否确认删除?"
})
.then(() => {
// on confirm
})
.catch(() => {
// on cancel
});
},
timestampToTimes(time) { timestampToTimes(time) {
return timestampToTime(new Date(time), "DT2", true); return timestampToTime(new Date(time), "DT2", true);
}, },
......
...@@ -170,40 +170,50 @@ ...@@ -170,40 +170,50 @@
:key="index" :key="index"
> >
<van-row <van-row
class="list-row"
type="flex" type="flex"
justify="space-between" justify="space-between"
style="margin-top:10px;" style="margin-top:10px;"
@click="toRiskDetail(item)" @click="toRiskDetail(item)"
> >
<van-col span="20"> <van-col span="20">
<van-col span="5"> <van-col span="5" style="line-height: 9;">
<van-image <van-image
width="58" width="58"
height="58" height="58"
:src="require('@/assets/imgs/inherentOrange.png')" :src="(item.level == '重大风险' ?
require('@/assets/imgs/redInherent.png'):item.level == '较大风险'?
require('@/assets/imgs/inherentOrange.png'): item.level === '一般风险'?require('@/assets/imgs/yellowInherent.png') :require('@/assets/imgs/blueInherent.png')
)"
/> />
<!-- <van-image width="46" height="46" :src="item.avatar" /> --> <!-- <van-image width="46" height="46" :src="item.avatar" /> -->
</van-col> </van-col>
<van-col span="15"> <van-col span="17">
<van-row gutter=""> <van-row gutter="0">
<van-col span="9">风险名称:</van-col> <van-col span="10" style="font-weight: bold;color:#000;font-size: 16px;">风险名称:</van-col>
<van-col span="15">{{ item.name }}</van-col> <van-col span="14" style="color: #000;font-size: 16px;">{{ item.name }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="0">
<van-col span="9">风险等级:</van-col> <van-col span="9" style="font-weight: bold;color:#666666;font-size: 12px;">风险等级:</van-col>
<van-col span="15">{{ item.level }}</van-col> <van-col span="15" style="color: #9d9d9d;font-size: 12px;">{{ item.level }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="0">
<van-col span="9">上报时间:</van-col> <van-col span="9" style="font-weight: bold;color:#666666;font-size: 12px;">上报时间:</van-col>
<van-col span="15">{{ timestampToTimes(item.createTime, "DT2") }}</van-col> <van-col span="15" style="color: #9d9d9d;font-size: 12px;">{{ timestampToTimes(item.createTime, "DT2") }}</van-col>
</van-row>
<van-row gutter="0">
<van-col span="9" style="font-weight: bold;color:#666666;font-size: 12px;">所属房间:</van-col>
<van-col span="15" style="color: #9d9d9d;font-size: 12px;">{{ item.buildingName + item.floorName + item.roomName }}</van-col>
</van-row> </van-row>
</van-col> </van-col>
</van-col> </van-col>
<van-col span="4"> <van-col span="4" class="list-right">
<van-row type="flex"> <van-tag plain type="primary">详情<van-icon name="arrow" size="12px" /></van-tag>
<!-- <van-row type="flex">
详情 详情
<van-icon name="arrow" size="26px" />
</van-row> </van-row> -->
</van-col> </van-col>
</van-row> </van-row>
</van-cell-group> </van-cell-group>
...@@ -789,6 +799,9 @@ export default { ...@@ -789,6 +799,9 @@ export default {
.cell-wrap { .cell-wrap {
position: relative; position: relative;
} }
.van-cell-group--inset .van-row{
line-height: 1.5 !important;
}
p { p {
font-size: 0.4rem; font-size: 0.4rem;
...@@ -810,6 +823,13 @@ p { ...@@ -810,6 +823,13 @@ p {
line-height: 0.64rem; line-height: 0.64rem;
} }
} }
.list-row{
position: relative;
}
.list-right{
position: absolute;
right: 0;
}
.journal-wrap { .journal-wrap {
position: relative; position: relative;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<van-col span="17"> <van-col span="17">
<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.createUserName }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="9">发起时间:</van-col> <van-col span="9">发起时间:</van-col>
......
...@@ -8,11 +8,11 @@ module.exports = { ...@@ -8,11 +8,11 @@ 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:8081/', //这里是后台的地址
ws: true, ws: true,
changOrigin: true, //允许跨域 changOrigin: true, //允许跨域
// logLevel: 'debug', // 显示代理调试信息 // logLevel: 'debug', // 显示代理调试信息
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment