Commit c3e985cb authored by yf's avatar yf

修改导出文件名

parent aa866db2
<template> <template>
<div class="wrapper"> <div class="wrapper">
<el-descriptions :title="InfoList.detailsDto.name" class="margin-top" :column="3" :size="size" border> <el-descriptions
:title="InfoList.detailsDto.name"
<el-descriptions-item label="所属项目">{{ InfoList.detailsDto.projectName }}</el-descriptions-item> class="margin-top"
<el-descriptions-item label="所属楼栋">{{ InfoList.detailsDto.buildingNames }}</el-descriptions-item> :column="3"
<el-descriptions-item label="所属单位">{{ InfoList.detailsDto.deptName }}</el-descriptions-item> :size="size"
<el-descriptions-item label="所属省市">{{ InfoList.detailsDto.city}}</el-descriptions-item> border
<el-descriptions-item label="项目负责人">{{ InfoList.detailsDto.leaderUserName }}</el-descriptions-item> >
<el-descriptions-item label="评估组成员">{{ InfoList.detailsDto.workUserNames }}</el-descriptions-item> <el-descriptions-item label="所属项目">{{
<el-descriptions-item label="开始时间">{{ InfoList.startTime }}</el-descriptions-item> InfoList.detailsDto.projectName
<el-descriptions-item label="结束时间">{{ InfoList.endTime }}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="项目状态">{{ InfoList.status }}</el-descriptions-item> <el-descriptions-item label="所属楼栋">{{
<el-descriptions-item label="创建人">{{ InfoList.createUserName }}</el-descriptions-item> InfoList.detailsDto.buildingNames
<el-descriptions-item label="创建单位">{{ InfoList.detailsDto.createDeptName }}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="创建时间">{{ InfoList.detailsDto.createTime }}</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-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"> <el-tab-pane label="风险评估清单" name="first">
<div class="approveResult"> <div class="approveResult">
<div class="approveL"> <div class="approveL">
<!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" <!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="82px"> label-width="82px">
<el-form-item label="风险源名称" prop="name"> <el-form-item label="风险源名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入风险源名称" clearable <el-input v-model="queryParams.name" placeholder="请输入风险源名称" clearable
...@@ -43,64 +71,116 @@ ...@@ -43,64 +71,116 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> --> </el-form> -->
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="downList(InfoList.detailsDto.id)" <el-button
style="float: right;margin-bottom: 8px;">导出风险清单</el-button> type="warning"
<el-table v-loading="loading" :data="listList" > plain
<el-table-column label="序号" align="center"> icon="el-icon-download"
<template slot-scope="scope"> size="mini"
<span>{{ scope.$index + 1 }}</span> @click="downList(InfoList.detailsDto.id)"
</template> style="float: right; margin-bottom: 8px"
</el-table-column> >导出风险清单</el-button
<el-table-column label="风险名称" align="center" prop="name" /> >
<el-table-column label="所属建筑" align="center" prop="buildingName" /> <el-table v-loading="loading" :data="listList">
<el-table-column label="所属楼层" align="center" prop="floorName" /> <el-table-column label="序号" align="center">
<el-table-column label="所属房间" align="center" prop="roomName" /> <template slot-scope="scope">
<el-table-column label="风险等级(系数)" align="center" prop="level" /> <span>{{ scope.$index + 1 }}</span>
<el-table-column label="风险因素" align="center" prop="factor" /> </template>
<el-table-column label="准事故类型" align="center" prop="type" /> </el-table-column>
<el-table-column label="存在部位" align="center" prop="presenceLocation" /> <el-table-column label="风险名称" align="center" prop="name" />
<el-table-column label="操作" align="center" prop="describe"> <el-table-column
<template slot-scope="scope"> label="所属建筑"
<div> align="center"
<el-button size="mini" type="text" icon="el-icon-download" prop="buildingName"
@click="exportList(scope.row.id)">下载风险告知卡</el-button> />
<el-button size="mini" type="text" icon="el-icon-view" <el-table-column
@click="showDrawCanvas(scope.row.floorId)">查看四色图</el-button> label="所属楼层"
</div> align="center"
</template> prop="floorName"
</el-table-column> />
</el-table> <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" <pagination
:limit.sync="queryParams.pageSize" @pagination="getRiskList" /> v-show="total > 0"
</div> :total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getRiskList"
/>
</div> </div>
</div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="评估结果审核" name="second"> <el-tab-pane label="评估结果审核" name="second">
<div class="approveResult"> <div class="approveResult">
<div class="approveL"> <div class="approveL">
<div class="titles">审批流程</div> <div class="titles">审批流程</div>
<el-steps direction="vertical" :active="999"> <el-steps direction="vertical" :active="999">
<el-step v-for="approveDto in InfoList.approveListDtos" :title="approveDto.taskName" <el-step
:key="approveDto.taskId" icon="el-icon-success"> v-for="approveDto in InfoList.approveListDtos"
:title="approveDto.taskName"
:key="approveDto.taskId"
icon="el-icon-success"
>
<template slot="description"> <template slot="description">
<el-card
<el-card class="box-card" style="line-height: 25px;font-size: 14px;margin: 15px;"> class="box-card"
<span style="display: block;"><b>操作时间: </b>{{ approveDto.startTime}}</span> style="line-height: 25px; font-size: 14px; margin: 15px"
<span style="display: block;"><b> 操作人:</b>{{ approveDto.approvalUserName}}</span> >
<span style="display: block;"><b>任务节点: </b>{{ approveDto.taskName}}</span> <span style="display: block"
<span style="display: block;" v-if="approveDto.taskOpinion!=null"><b>审批意见: ><b>操作时间: </b>{{ approveDto.startTime }}</span
</b>{{'' + approveDto.taskOpinion}}</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> </el-card>
</template> </template>
</el-step> </el-step>
</el-steps> </el-steps>
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="风险评估报告" name="third"> <el-tab-pane label="风险评估报告" name="third">
...@@ -114,125 +194,51 @@ ...@@ -114,125 +194,51 @@
<el-table-column label="操作" align="center" prop="describe"> <el-table-column label="操作" align="center" prop="describe">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <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> </div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</template> </template>
<script> <script>
import { import {
getPlan, getPlan,
riskListInfo, riskListInfo,
riskList, riskList,
exportRiskList exportRiskList,
} from "@/api/risk/plan"; } from "@/api/risk/plan";
export default { export default {
data() { data() {
return { return {
activeName: 'first', activeName: "first",
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 选中数组 // 选中数组
ids: [], ids: [],
// 非单个禁用 // 非单个禁用
single: true, single: true,
// 非多个禁用 // 非多个禁用
multiple: true, multiple: true,
// 显示搜索条件 // 显示搜索条件
showSearch: true, showSearch: true,
// 总条数 // 总条数
total: 0, total: 0,
// 现有风险清单库表格数据 // 现有风险清单库表格数据
listList: [], listList: [],
// 弹出层标题 // 弹出层标题
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, 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,
inherentId: null, inherentId: null,
code: null, code: null,
name: null, name: null,
...@@ -249,81 +255,149 @@ ...@@ -249,81 +255,149 @@
measuresEmergency: null, measuresEmergency: null,
measuresEmergencyFileIds: null, measuresEmergencyFileIds: null,
referenceBasis: null, referenceBasis: null,
delFlag: null, planId: null,
createBy: null, },
createTime: null, // 表单参数
updateBy: null, form: {},
updateTime: null // 表单校验
}; rules: {},
this.resetForm("form"); 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) {
handleQuery() { riskListInfo(id).then((res) => {
this.queryParams.pageNum = 1; this.InfoList = res.data;
this.getList(); });
}, },
/** 重置按钮操作 */ getRiskList(id) {
resetQuery() { this.loading = true;
this.resetForm("queryForm"); riskList(this.queryParams).then((res) => {
this.handleQuery(); 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.wrapper { .wrapper {
height: 100%; height: 100%;
width: 100%; width: 100%;
padding: 10px; padding: 10px;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
::v-deep .el-tabs__content { ::v-deep .el-tabs__content {
height: calc(100vh - 334px) !important; height: calc(100vh - 334px) !important;
} }
.titles { .titles {
position: relative; position: relative;
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
margin: 10px 0 10px 20px; margin: 10px 0 10px 20px;
color: #666666; color: #666666;
} }
.titles::before { .titles::before {
content: ""; content: "";
width: 8px; width: 8px;
height: 20px; height: 20px;
background: #3f9eff; background: #3f9eff;
position: absolute; position: absolute;
left: -14px; left: -14px;
top: 0; top: 0;
} }
.approveResult { .approveResult {
flex: 1; flex: 1;
width: 100%; width: 100%;
height: calc(100vh - 360px) !important; height: calc(100vh - 360px) !important;
overflow-y: auto; overflow-y: auto;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.approveL {
flex: 3;
width: 100%;
}
.approveR { .approveL {
flex: 7; flex: 3;
width: 100%; width: 100%;
padding: 0 0 0 30px; }
border-left: 1px solid #d7d7d7d7;
}
.approveR {
flex: 7;
width: 100%;
padding: 0 0 0 30px;
border-left: 1px solid #d7d7d7d7;
} }
}
</style> </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