Commit a4aa1936 authored by p-wanping.song's avatar p-wanping.song

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

parents 17699257 ee16aa03
......@@ -144,7 +144,21 @@ export const dynamicRoutes = [
path: 'index/:id(\\d+)',
component: () => import('@/views/risk/plan/ledgerdata'),
name: 'ledgerdata',
meta: { title: '台账数据', activeMenu: '/risk/plan/ledgerdata' }
meta: { title: '任务详情', activeMenu: '/risk/plan/ledgerdata' }
}
]
},
{
path: '/risk/drawCanvas/index',
component: Layout,
hidden: true,
permissions: ['system:ledgerRoom:list'],
children: [
{
path: 'index/:id(\\d+)',
component: () => import('@/views/risk/drawCanvas/index'),
name: 'drawCanvas',
meta: { title: '四色图', activeMenu: '/risk/drawCanvas/index' }
}
]
},
......
......@@ -4,6 +4,7 @@
<img src="../../assets/imgs/north.png" alt="" />
</div> -->
<grid-layout
id="gridView"
:layout.sync="layout"
:col-num="colNum"
:row-height="30"
......@@ -27,7 +28,7 @@
@moved="movedEvent"
:style="{
backgroundColor: item.c,
border: item.type == 'thorough' ? 'none !important' : ''
border: item.type == 'thorough' ? 'none !important' : '',
}"
>
<span class="text" :class="item.w > item.h * 5 ? '' : 'rowText'">{{
......@@ -36,19 +37,25 @@
<!-- <span class="remove" @click="removeItem(item.i)" v-if="item.i && isEdit">x</span> -->
</grid-item>
</grid-layout>
<el-row style="margin-top: 20px; margin-left: 20px">
<el-button type="primary" @click="getPdf">导 出</el-button>
<el-button @click="cancelDraw">取 消</el-button>
</el-row>
</div>
</template>
<script>
import html2Canvas from "html2canvas";
import JsPDF from "jspdf";
import { GridLayout, GridItem } from "vue-grid-layout";
import { ledgerRoomList ,getDictList} from "@/api/risk/draw";
import { ledgerRoomList, getDictList } from "@/api/risk/draw";
// 动态添加/删除
export default {
name: "riskView",
components: {
GridLayout,
GridItem
GridItem,
},
data() {
return {
......@@ -78,14 +85,14 @@ export default {
isBase: false,
baseName: "",
baseArr: [],
layoutData: []
layoutData: [],
};
},
props: {
isView: {
type: Boolean,
default: false
}
default: false,
},
},
mounted() {
// screenfull.toggle(this.$refs.mapbox);
......@@ -110,6 +117,53 @@ export default {
this.getRoomInfo();
},
methods: {
getPdf() {
var title = "四色图";
// html2Canvas(document.querySelector('#pdfDom'), { //这是在界面上设置一个id
//只下载id为pdfDom的内容
html2Canvas(document.querySelector("#gridView"), {
//body是下载整个界面
useCORS: true, //是否尝试使用CORS从服务器加载图像
allowTaint: true,
dpi: 300, //解决生产图片模糊
// width: 490, //canvas宽度
// height: 240, //canvas高度
// x: 0, //x坐标
// y: 0, //y坐标
async: false, //是否异步解析和呈现元素
foreignObjectRendering: true, //是否在浏览器支持的情况下使用ForeignObject渲染
}).then(function (canvas) {
console.log(canvas);
let contentWidth = canvas.width;
let contentHeight = canvas.height;
let pageHeight = (contentWidth / 592.28) * 841.89; // 一页pdf显示html页面生成的canvas高度;
let leftHeight = contentHeight; //未生成pdf的html页面高度
let position = 0; //pdf页面偏移
//a4纸的尺寸[595.28,841.89],html页面生成的canvas在pdf中图片的宽高
let imgWidth = 595.28;
let imgHeight = (592.28 / contentWidth) * contentHeight;
let pageData = canvas.toDataURL("image/jpeg", 1.0);
let PDF = new JsPDF("", "pt", "a4");
// 有两个高度需要区分,一个是html页面的实际高度,和生成pdf的页面高度(841.89)
//当内容未超过pdf一页显示的范围,无需分页
if (leftHeight < pageHeight) {
PDF.addImage(pageData, "JPEG", 0, 0, imgWidth, imgHeight);
} else {
while (leftHeight > 0) {
PDF.addImage(pageData, "JPEG", 20, position, imgWidth, imgHeight);
leftHeight -= pageHeight;
position -= 841.89;
if (leftHeight > 0) {
PDF.addPage();
}
}
}
PDF.save(title + ".pdf");
});
},
cancelDraw() {
this.$router.go(-1);
},
orientationChange() {
if (window.orientation === 180 || window.orientation === 0) {
console.log("竖屏状态!");
......@@ -179,14 +233,14 @@ export default {
},
getRoomInfo() {
let data = {
floorId: this.$route.params.floorId ? this.$route.params.floorId : "4"
floorId: this.$route.params.floorId ? this.$route.params.floorId : "4",
};
ledgerRoomList(data)
.then(res => {
ledgerRoomList(data)
.then((res) => {
if (res.code == 200) {
this.layout = [];
this.layoutData = res.data;
res.data.forEach(item => {
res.data.forEach((item) => {
item.position = JSON.parse(item.position);
item.position.i = item.id;
item.position.id = item.id;
......@@ -198,49 +252,49 @@ export default {
// //添加页面不显示颜色
// item.position.c = "#e6e5e5";
// } 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)];
/**
* 根据风险评分来匹配相应的颜色
* 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)];
// }
this.layout.push(item.position);
});
// console.log('layout==>>',this.layout)
}
})
.catch(err => {
.catch((err) => {
console.log("err==>>", err);
});
// getDictList({
// dictType: "risk_plan_room_type"
// }).then(res => {
// this.roomArr = res.data;
// });
// getDictList({
// dictType: "risk_plan_base_room"
// }).then(res => {
// this.baseArr = res.data;
// });
// getDictList({
// dictType: "risk_plan_room_type"
// }).then(res => {
// this.roomArr = res.data;
// });
// getDictList({
// dictType: "risk_plan_base_room"
// }).then(res => {
// this.baseArr = res.data;
// });
},
// 增加
addItem() {
if (this.layout.find(item => item.i == "")) {
if (this.layout.find((item) => item.i == "")) {
Toast.fail({
title: "提示",
forbidClick: true,
message: "请先点击确定,保存当前房间信息"
message: "请先点击确定,保存当前房间信息",
});
return;
}
......@@ -253,11 +307,11 @@ export default {
},
// 添加其他
addOther() {
if (this.layout.find(item => item.i == "")) {
if (this.layout.find((item) => item.i == "")) {
Toast.fail({
title: "提示",
forbidClick: true,
message: "请先点击确定,保存当前房间信息"
message: "请先点击确定,保存当前房间信息",
});
return;
}
......@@ -271,11 +325,11 @@ export default {
//添加基础设施
addBase() {
if (this.layout.find(item => item.i == "")) {
if (this.layout.find((item) => item.i == "")) {
Toast.fail({
title: "提示",
forbidClick: true,
message: "请先点击确定,保存当前房间信息"
message: "请先点击确定,保存当前房间信息",
});
return;
}
......@@ -294,7 +348,7 @@ export default {
// console.log('this.layout==>>',this.layout)
},
// 调整大小后的事件
resizedEvent: function(i, newH, newW) {
resizedEvent: function (i, newH, newW) {
this.layOutItem.w = newW;
this.layOutItem.h = newH;
// console.log('layOutItem==>>',this.layOutItem)
......@@ -342,8 +396,8 @@ export default {
this.roomName = value.dictValue;
}
this.showPicker = false;
}
}
},
},
};
</script>
......@@ -353,7 +407,7 @@ export default {
}
.wrap {
/* height: 100vh; */
width: 100vw;
width: 100%;
position: relative;
}
.north {
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="任务名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入任务名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<!-- <el-form-item label="任务编号" prop="no">
<el-input
v-model="queryParams.no"
placeholder="请输入任务编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="项目id" prop="projectId">
<el-input
v-model="queryParams.projectId"
placeholder="请输入项目id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="楼栋ids" prop="buildingIds">
<el-input
v-model="queryParams.buildingIds"
placeholder="请输入楼栋ids"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人员id" prop="createUserId">
<el-input
v-model="queryParams.createUserId"
placeholder="请输入创建人员id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建单位" prop="createDeptId">
<el-input
v-model="queryParams.createDeptId"
placeholder="请输入创建单位"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="负责人id" prop="leaderUserId">
<el-input
v-model="queryParams.leaderUserId"
placeholder="请输入负责人id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="执行人员ids" prop="workUserIds">
<el-input
v-model="queryParams.workUserIds"
placeholder="请输入执行人员ids"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="开始时间" prop="startTime">
<el-date-picker clearable
v-model="queryParams.startTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="endTime">
<el-date-picker clearable
v-model="queryParams.endTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择结束时间">
</el-date-picker>
</el-form-item> -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="任务名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入任务名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="planList" @selection-change="handleSelectionChange">
<el-table-column label="序号" align="center">
<template slot-scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="任务名称" align="center" prop="name" />
<el-table-column label="任务编号" align="center" prop="no" />
<el-table-column label="项目名称" align="center" prop="projectName" />
<el-table-column label="楼栋名称" align="center" prop="buildingNames" />
<el-table-column label="创建人员" align="center" prop="createUserName" />
<el-table-column label="创建单位" align="center" prop="createDeptName" />
<el-table-column label="负责人" align="center" prop="leaderUserName" />
<el-table-column label="执行人员" align="center" prop="workUserNames" />
<el-table-column label="开始时间" align="center" prop="startTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="结束时间" align="center" prop="endTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" />
<el-table-column label="操作" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<router-link :to="'/risk/plan/ledgerdata/index/' + scope.row.id" class="link-type">
<el-button size="mini" type="text" icon="el-icon-view">详情</el-button>
</router-link>
</template>
</el-table-column>
</el-table>
<el-table
v-loading="loading"
:data="planList"
@selection-change="handleSelectionChange"
>
<el-table-column label="序号" align="center">
<template slot-scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="任务名称" align="center" prop="name" />
<el-table-column label="任务编号" align="center" prop="no" />
<el-table-column label="项目名称" align="center" prop="projectName" />
<el-table-column label="楼栋名称" align="center" prop="buildingNames" />
<el-table-column label="创建人员" align="center" prop="createUserName" />
<el-table-column label="创建单位" align="center" prop="createDeptName" />
<el-table-column label="负责人" align="center" prop="leaderUserName" />
<el-table-column label="执行人员" align="center" prop="workUserNames" />
<el-table-column
label="开始时间"
align="center"
prop="startTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.startTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column
label="结束时间"
align="center"
prop="endTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" />
<el-table-column
label="操作"
align="center"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<router-link
:to="'/risk/plan/ledgerdata/index/' + scope.row.id"
class="link-type"
>
<el-button size="mini" type="text" icon="el-icon-view"
>详情</el-button
>
</router-link>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
</div>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listPlan, addPlan, updatePlan } from "@/api/risk/plan";
export default {
name: "Plan",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 风险计划表格数据
planList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
name: null,
no: null,
projectId: null,
buildingIds: null,
createUserId: null,
createDeptId: null,
leaderUserId: null,
workUserIds: null,
startTime: null,
endTime: null,
status: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
name: "Plan",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 风险计划表格数据
planList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
name: null,
no: null,
projectId: null,
buildingIds: null,
createUserId: null,
createDeptId: null,
leaderUserId: null,
workUserIds: null,
startTime: null,
endTime: null,
status: null,
},
// 表单参数
form: {},
// 表单校验
rules: {},
};
},
created() {
this.getList();
},
methods: {
/** 查询风险计划列表 */
getList() {
this.loading = true;
listPlan(this.queryParams).then((response) => {
this.planList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
name: null,
no: null,
projectId: null,
buildingIds: null,
createUserId: null,
createDeptId: null,
leaderUserId: null,
workUserIds: null,
startTime: null,
endTime: null,
status: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
created() {
this.getList();
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
methods: {
/** 查询风险计划列表 */
getList() {
this.loading = true;
listPlan(this.queryParams).then(response => {
this.planList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
name: null,
no: null,
projectId: null,
buildingIds: null,
createUserId: null,
createDeptId: null,
leaderUserId: null,
workUserIds: null,
startTime: null,
endTime: null,
status: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
}
},
};
</script>
\ No newline at end of file
<template>
<div class="wrapper">
<el-descriptions title="集团安全咨询服务项目">
<el-descriptions-item label="创建人">{{ InfoList.createUserName }}</el-descriptions-item>
<el-descriptions-item label="创建单位">{{ InfoList.detailsDto.createDeptName }}</el-descriptions-item>
<el-descriptions-item label="创建时间">{{ InfoList.detailsDto.createTime }}</el-descriptions-item>
<el-descriptions-item label="所属单位">{{ InfoList.createDeptId }}</el-descriptions-item>
<el-descriptions-item label="所属省市">苏州市</el-descriptions-item>
<el-descriptions-item label="项目坐标">{{ InfoList.workUserIds }}</el-descriptions-item>
<el-descriptions-item label="项目负责人">{{ InfoList.detailsDto.createUserName }}</el-descriptions-item>
<el-descriptions-item label="评估组成员">{{ InfoList.detailsDto.workUserNames }}</el-descriptions-item>
<el-descriptions-item label="开始时间">{{ InfoList.startTime }}</el-descriptions-item>
<el-descriptions-item label="联系地址">{{ InfoList.name }}</el-descriptions-item>
</el-descriptions>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="风险评估清单" name="first">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="82px">
<el-form-item label="风险源名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入风险源名称" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="风险等级" prop="level">
<el-input v-model="queryParams.level" placeholder="请输入风险等级" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="风险类型" prop="factor">
<el-input v-model="queryParams.factor" placeholder="请输入风险因素" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="存在部位" prop="referenceBasis">
<el-input v-model="queryParams.referenceBasis" placeholder="请输入参考依据" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<div class="wrapper">
<el-descriptions title="集团安全咨询服务项目">
<el-descriptions-item label="创建人">{{
InfoList.createUserName
}}</el-descriptions-item>
<el-descriptions-item label="创建单位">{{
InfoList.detailsDto.createDeptName
}}</el-descriptions-item>
<el-descriptions-item label="创建时间">{{
InfoList.detailsDto.createTime
}}</el-descriptions-item>
<el-descriptions-item label="所属单位">{{
InfoList.createDeptId
}}</el-descriptions-item>
<el-descriptions-item label="所属省市">苏州市</el-descriptions-item>
<el-descriptions-item label="项目坐标">{{
InfoList.workUserIds
}}</el-descriptions-item>
<el-descriptions-item label="项目负责人">{{
InfoList.detailsDto.createUserName
}}</el-descriptions-item>
<el-descriptions-item label="评估组成员">{{
InfoList.detailsDto.workUserNames
}}</el-descriptions-item>
<el-descriptions-item label="开始时间">{{
InfoList.startTime
}}</el-descriptions-item>
<el-descriptions-item label="联系地址">{{
InfoList.name
}}</el-descriptions-item>
</el-descriptions>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="风险评估清单" name="first">
<!-- <el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="82px"
>
<el-form-item label="风险源名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入风险源名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="风险等级" prop="level">
<el-input
v-model="queryParams.level"
placeholder="请输入风险等级"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="风险类型" prop="factor">
<el-input
v-model="queryParams.factor"
placeholder="请输入风险因素"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="存在部位" prop="referenceBasis">
<el-input
v-model="queryParams.referenceBasis"
placeholder="请输入参考依据"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form> -->
<el-table v-loading="loading" :data="listList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="id" align="center" prop="id" />
<el-table-column label="风险名称" align="center" prop="name" />
<el-table-column label="所属建筑" align="center" prop="buildingName" />
<el-table-column label="所属楼层" align="center" prop="floorName" />
<el-table-column label="所属房间" align="center" prop="roomName" />
<el-table-column label="风险等级(系数)" align="center" prop="level" />
<el-table-column label="风险因素" align="center" prop="factor" />
<el-table-column label="准事故类型" align="center" prop="type" />
<el-table-column label="存在部位" align="center" prop="presenceLocation" />
<el-table-column label="操作" align="center" prop="describe">
<template slot-scope="scope">
<div>
<el-button size="mini" type="text" icon="el-icon-download"
@click="exportList(scope.row.id)">下载风险告知卡</el-button>
</div>
</template>
</el-table-column>
</el-table>
<el-table v-loading="loading" :data="listList">
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column type="index" width="50" />
<!-- <el-table-column label="id" align="center" prop="id" /> -->
<el-table-column label="风险名称" align="center" prop="name" />
<el-table-column
label="所属建筑"
align="center"
prop="buildingName"
/>
<el-table-column label="所属楼层" align="center" prop="floorName" />
<el-table-column label="所属房间" align="center" prop="roomName" />
<el-table-column
label="风险等级(系数)"
align="center"
prop="level"
/>
<el-table-column label="风险因素" align="center" prop="factor" />
<el-table-column label="准事故类型" align="center" prop="type" />
<el-table-column
label="存在部位"
align="center"
prop="presenceLocation"
/>
<el-table-column label="操作" align="center" prop="describe">
<template slot-scope="scope">
<div>
<el-button
size="mini"
type="text"
icon="el-icon-download"
@click="exportList(scope.row.id)"
>下载风险告知卡</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="showDrawCanvas(scope.row.floorId)"
>查看四色图</el-button
>
</div>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getRiskList" />
</el-tab-pane>
<el-tab-pane label="评估结果审核" name="second">
<div class="approveResult">
<div class="approveL">
<div class="titles">审批流程</div>
<el-steps direction="vertical" :active="1">
<el-step title="发起审批" icon="el-icon-success"></el-step>
<el-step title="评估负责人审批" icon="el-icon-success"></el-step>
<el-step title="项目负责人审批" icon="el-icon-success"></el-step>
</el-steps>
</div>
<div class="approveR">
<div class="titles">审批信息</div>
<el-steps direction="vertical" :active="1">
<el-step title="发起审批" icon="el-icon-success"></el-step>
<el-step title="评估负责人审批" icon="el-icon-success"></el-step>
<el-step title="项目负责人审批" icon="el-icon-success" description="这是一段很长很长很长的描述性文字"></el-step>
</el-steps>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="风险评估报告" name="third">
<div class="titles">评估报告生成</div>
<el-table :data="reportList">
<el-table-column label="编号" align="center" prop="id" />
<el-table-column label="生成时间" align="center" prop="inherentId" />
<el-table-column label="生成人员" align="center" prop="code" />
<el-table-column label="所属建筑" align="center" prop="name" />
<el-table-column label="所属承租户" align="center" prop="type" />
<el-table-column label="操作" align="center" prop="describe">
<template slot-scope="scope">
<div>
<el-button size="mini" type="text" icon="el-icon-download">下载</el-button>
</div>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
</div>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getRiskList"
/>
</el-tab-pane>
<el-tab-pane label="评估结果审核" name="second">
<div class="approveResult">
<div class="approveL">
<div class="titles">审批流程</div>
<el-steps direction="vertical" :active="1">
<el-step title="发起审批" icon="el-icon-success"></el-step>
<el-step title="评估负责人审批" icon="el-icon-success"></el-step>
<el-step title="项目负责人审批" icon="el-icon-success"></el-step>
</el-steps>
</div>
<div class="approveR">
<div class="titles">审批信息</div>
<el-steps direction="vertical" :active="1">
<el-step title="发起审批" icon="el-icon-success"></el-step>
<el-step title="评估负责人审批" icon="el-icon-success"></el-step>
<el-step
title="项目负责人审批"
icon="el-icon-success"
description="这是一段很长很长很长的描述性文字"
></el-step>
</el-steps>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="风险评估报告" name="third">
<div class="titles">评估报告生成</div>
<el-table :data="reportList">
<el-table-column label="编号" align="center" prop="id" />
<el-table-column label="生成时间" align="center" prop="inherentId" />
<el-table-column label="生成人员" align="center" prop="code" />
<el-table-column label="所属建筑" align="center" prop="name" />
<el-table-column label="所属承租户" align="center" prop="type" />
<el-table-column label="操作" align="center" prop="describe">
<template slot-scope="scope">
<div>
<el-button size="mini" type="text" icon="el-icon-download"
>下载</el-button
>
</div>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import { getPlan, riskListInfo, riskList, exportRiskList } from "@/api/risk/plan";
import {
getPlan,
riskListInfo,
riskList,
exportRiskList,
} from "@/api/risk/plan";
export default {
data() {
return {
activeName: 'first',
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 现有风险清单库表格数据
listList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
inherentId: null,
code: null,
name: null,
type: null,
describe: null,
evaluationModel: null,
evaluationRange: null,
level: null,
factor: null,
measuresProject: null,
measuresProjectFileIds: null,
measuresAdministration: null,
measuresAdministrationFileIds: null,
measuresEmergency: null,
measuresEmergencyFileIds: null,
referenceBasis: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
},
reportList: [],
InfoList: {},
}
},
mounted() {
// console.log(this.$route.params, 'lll')
this.getInfo(this.$route.params.id)
this.getRiskList(this.$route.params.id)
},
methods: {
getInfo(id) {
riskListInfo(id).then(res => {
this.InfoList = res.data
})
data() {
return {
activeName: "first",
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 现有风险清单库表格数据
listList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
inherentId: null,
code: null,
name: null,
type: null,
describe: null,
evaluationModel: null,
evaluationRange: null,
level: null,
factor: null,
measuresProject: null,
measuresProjectFileIds: null,
measuresAdministration: null,
measuresAdministrationFileIds: null,
measuresEmergency: null,
measuresEmergencyFileIds: null,
referenceBasis: null,
},
// 表单参数
form: {},
// 表单校验
rules: {},
reportList: [],
InfoList: {},
};
},
mounted() {
// console.log(this.$route.params, 'lll')
this.getInfo(this.$route.params.id);
this.getRiskList(this.$route.params.id);
},
methods: {
showDrawCanvas(floorId) {
this.$router.push({
name: "drawCanvas",
params: {
floorId: floorId,
},
getRiskList(id) {
riskList({ planId: id }).then(res => {
this.loading = false
this.listList = res.rows
})
},
exportList(id) {
console.log(id,'kkkk')
this.download('system/risk/plan/exportWord/riskNotification/' + id, {}, `风险告知卡.docx`)
}
},
handleClick() {
});
},
// 表单重置
reset() {
this.form = {
id: null,
inherentId: null,
code: null,
name: null,
type: null,
describe: null,
evaluationModel: null,
evaluationRange: null,
level: null,
factor: null,
measuresProject: null,
measuresProjectFileIds: null,
measuresAdministration: null,
measuresAdministrationFileIds: null,
measuresEmergency: null,
measuresEmergencyFileIds: null,
referenceBasis: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
getInfo(id) {
riskListInfo(id).then((res) => {
this.InfoList = res.data;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
getRiskList(id) {
riskList({ planId: id }).then((res) => {
this.loading = false;
this.listList = res.rows;
});
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
exportList(id) {
console.log(id, "kkkk");
this.download(
"system/risk/plan/exportWord/riskNotification/" + id,
{},
`风险告知卡.docx`
);
},
handleSelectionChange() {
}
}
},
handleClick() {},
// 表单重置
reset() {
this.form = {
id: null,
inherentId: null,
code: null,
name: null,
type: null,
describe: null,
evaluationModel: null,
evaluationRange: null,
level: null,
factor: null,
measuresProject: null,
measuresProjectFileIds: null,
measuresAdministration: null,
measuresAdministrationFileIds: null,
measuresEmergency: null,
measuresEmergencyFileIds: null,
referenceBasis: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
handleSelectionChange() {},
};
</script>
<style lang="scss" scoped>
.wrapper {
height: 100%;
width: 100%;
padding: 10px;
box-sizing: border-box;
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
padding: 10px;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
::v-deep .el-tabs__content {
height: calc(100vh - 334px) !important;
height: calc(100vh - 334px) !important;
}
.titles {
position: relative;
font-size: 18px;
font-weight: bold;
margin: 10px 0 10px 20px;
color: #666666;
position: relative;
font-size: 18px;
font-weight: bold;
margin: 10px 0 10px 20px;
color: #666666;
}
.titles::before {
content: "";
width: 8px;
height: 20px;
background: #3f9eff;
position: absolute;
left: -14px;
top: 0;
content: "";
width: 8px;
height: 20px;
background: #3f9eff;
position: absolute;
left: -14px;
top: 0;
}
.approveResult {
flex: 1;
width: 100%;
height: calc(100vh - 360px) !important;
overflow-y: auto;
display: flex;
justify-content: space-between;
flex: 1;
width: 100%;
height: calc(100vh - 360px) !important;
overflow-y: auto;
display: flex;
justify-content: space-between;
.approveL {
flex: 3;
width: 100%;
}
.approveR {
flex: 7;
width: 100%;
padding: 0 0 0 30px;
border-left: 1px solid #d7d7d7d7;
}
.approveL {
flex: 3;
width: 100%;
}
.approveR {
flex: 7;
width: 100%;
padding: 0 0 0 30px;
border-left: 1px solid #d7d7d7d7;
}
}
</style>
\ No newline at end of file
</style>
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