Commit c3e985cb authored by yf's avatar yf

修改导出文件名

parent aa866db2
<template>
<div class="wrapper">
<el-descriptions :title="InfoList.detailsDto.name" class="margin-top" :column="3" :size="size" border>
<el-descriptions-item label="所属项目">{{ InfoList.detailsDto.projectName }}</el-descriptions-item>
<el-descriptions-item label="所属楼栋">{{ InfoList.detailsDto.buildingNames }}</el-descriptions-item>
<el-descriptions-item label="所属单位">{{ InfoList.detailsDto.deptName }}</el-descriptions-item>
<el-descriptions-item label="所属省市">{{ InfoList.detailsDto.city}}</el-descriptions-item>
<el-descriptions-item label="项目负责人">{{ InfoList.detailsDto.leaderUserName }}</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.endTime }}</el-descriptions-item>
<el-descriptions-item label="项目状态">{{ InfoList.status }}</el-descriptions-item>
<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
:title="InfoList.detailsDto.name"
class="margin-top"
:column="3"
:size="size"
border
>
<el-descriptions-item label="所属项目">{{
InfoList.detailsDto.projectName
}}</el-descriptions-item>
<el-descriptions-item label="所属楼栋">{{
InfoList.detailsDto.buildingNames
}}</el-descriptions-item>
<el-descriptions-item label="所属单位">{{
InfoList.detailsDto.deptName
}}</el-descriptions-item>
<el-descriptions-item label="所属省市">{{
InfoList.detailsDto.city
}}</el-descriptions-item>
<el-descriptions-item label="项目负责人">{{
InfoList.detailsDto.leaderUserName
}}</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.endTime
}}</el-descriptions-item>
<el-descriptions-item label="项目状态">{{
InfoList.status
}}</el-descriptions-item>
<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>
<el-tabs v-model="activeName" type="border-card" style="margin-top: 10px;" >
<el-tabs v-model="activeName" type="border-card" style="margin-top: 10px">
<el-tab-pane label="风险评估清单" name="first">
<div class="approveResult">
<div class="approveL">
<!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
<div class="approveResult">
<div class="approveL">
<!-- <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
......@@ -43,64 +71,116 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form> -->
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="downList(InfoList.detailsDto.id)"
style="float: right;margin-bottom: 8px;">导出风险清单</el-button>
<el-table v-loading="loading" :data="listList" >
<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="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>
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="downList(InfoList.detailsDto.id)"
style="float: right; margin-bottom: 8px"
>导出风险清单</el-button
>
<el-table v-loading="loading" :data="listList">
<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="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" />
</div>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getRiskList"
/>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="评估结果审核" name="second">
<div class="approveResult">
<div class="approveL">
<div class="titles">审批流程</div>
<el-steps direction="vertical" :active="999">
<el-step v-for="approveDto in InfoList.approveListDtos" :title="approveDto.taskName"
:key="approveDto.taskId" icon="el-icon-success">
<el-step
v-for="approveDto in InfoList.approveListDtos"
:title="approveDto.taskName"
:key="approveDto.taskId"
icon="el-icon-success"
>
<template slot="description">
<el-card class="box-card" style="line-height: 25px;font-size: 14px;margin: 15px;">
<span style="display: block;"><b>操作时间: </b>{{ approveDto.startTime}}</span>
<span style="display: block;"><b> 操作人:</b>{{ approveDto.approvalUserName}}</span>
<span style="display: block;"><b>任务节点: </b>{{ approveDto.taskName}}</span>
<span style="display: block;" v-if="approveDto.taskOpinion!=null"><b>审批意见:
</b>{{'' + approveDto.taskOpinion}}</span>
<el-card
class="box-card"
style="line-height: 25px; font-size: 14px; margin: 15px"
>
<span style="display: block"
><b>操作时间: </b>{{ approveDto.startTime }}</span
>
<span style="display: block"
><b> 操作人:</b>{{ approveDto.approvalUserName }}</span
>
<span style="display: block"
><b>任务节点: </b>{{ approveDto.taskName }}</span
>
<span
style="display: block"
v-if="approveDto.taskOpinion != null"
><b>审批意见: </b>{{ "" + approveDto.taskOpinion }}</span
>
</el-card>
</template>
</el-step>
</el-steps>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="风险评估报告" name="third">
......@@ -114,125 +194,51 @@
<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>
<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";
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,
planId:null,
},
// 表单参数
form: {},
// 表单校验
rules: {},
reportList: [],
InfoList: {},
}
},
created() {
if(this.$route.params.id){
this.queryParams.planId=this.$route.params.id
this.getRiskList(this.queryParams)
}
},
mounted() {
// console.log(this.$route.params, 'lll')
this.getInfo(this.$route.params.id)
},
methods: {
downList(planId) {
this.download("/system/risk/plan/exportExcel/InherentList/" + planId, {});
},
showDrawCanvas(floorId) {
this.$router.push({
name: "drawCanvas",
params: {
floorId: floorId,
},
});
},
getInfo(id) {
riskListInfo(id).then(res => {
this.InfoList = res.data
})
},
getRiskList(id) {
this.loading = true;
riskList(this.queryParams).then(res => {
this.listList = res.rows;
this.total = res.total;
this.loading = false;
})
},
exportList(id) {
console.log(id, 'kkkk')
this.download('system/risk/plan/exportWord/riskNotification/' + id, {}, `风险告知卡.docx`)
}
},
// 表单重置
reset() {
this.form = {
id: null,
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,
......@@ -249,81 +255,149 @@
measuresEmergency: null,
measuresEmergencyFileIds: null,
referenceBasis: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
planId: null,
},
// 表单参数
form: {},
// 表单校验
rules: {},
reportList: [],
InfoList: {},
};
},
created() {
if (this.$route.params.id) {
this.queryParams.planId = this.$route.params.id;
this.getRiskList(this.queryParams);
}
},
mounted() {
// console.log(this.$route.params, 'lll')
this.getInfo(this.$route.params.id);
},
methods: {
downList(planId) {
this.download("/system/risk/plan/exportExcel/InherentList/" + planId, {});
},
showDrawCanvas(floorId) {
this.$router.push({
name: "drawCanvas",
params: {
floorId: floorId,
},
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
getInfo(id) {
riskListInfo(id).then((res) => {
this.InfoList = res.data;
});
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
getRiskList(id) {
this.loading = true;
riskList(this.queryParams).then((res) => {
this.listList = res.rows;
this.total = res.total;
this.loading = false;
});
},
handleSelectionChange() {
exportList(id) {
console.log(id, "kkkk");
this.download("system/risk/plan/exportWord/riskNotification/" + id, {});
},
},
}
}
// 表单重置
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;
}
.wrapper {
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;
}
::v-deep .el-tabs__content {
height: calc(100vh - 334px) !important;
}
.titles {
position: relative;
font-size: 18px;
font-weight: bold;
margin: 10px 0 10px 20px;
color: #666666;
}
.titles {
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;
}
.titles::before {
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;
.approveL {
flex: 3;
width: 100%;
}
.approveResult {
flex: 1;
width: 100%;
height: calc(100vh - 360px) !important;
overflow-y: auto;
display: flex;
justify-content: space-between;
.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>
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