Commit 553e71e6 authored by wuqinghua's avatar wuqinghua

Merge remote-tracking branch 'origin/master'

parents 58107bbd f787c3d7
...@@ -97,7 +97,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter ...@@ -97,7 +97,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求 // 过滤请求
.authorizeRequests() .authorizeRequests()
// 对于登录login 验证码captchaImage 允许匿名访问 // 对于登录login 验证码captchaImage 允许匿名访问
.antMatchers("/login", "/captchaImage","/common/upload").anonymous() .antMatchers("/login", "/captchaImage").anonymous()
.antMatchers( .antMatchers(
HttpMethod.GET, HttpMethod.GET,
"/*.html", "/*.html",
......
...@@ -37,8 +37,8 @@ public class TEventInfo extends BaseEntity ...@@ -37,8 +37,8 @@ public class TEventInfo extends BaseEntity
private String eventLocation; private String eventLocation;
/** 报案时间 */ /** 报案时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "报案时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "报案时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date reportTime; private Date reportTime;
/** 报案人 */ /** 报案人 */
......
...@@ -38,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -38,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="reportPerson != null and reportPerson != ''"> and report_person like concat('%', #{reportPerson}, '%')</if> <if test="reportPerson != null and reportPerson != ''"> and report_person like concat('%', #{reportPerson}, '%')</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != ''"> and beyond_enterprise_id = #{beyondEnterpriseId}</if> <if test="beyondEnterpriseId != null and beyondEnterpriseId != ''"> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
</where> </where>
order by report_time
</select> </select>
<select id="selectTEventInfoById" parameterType="Long" resultMap="TEventInfoResult"> <select id="selectTEventInfoById" parameterType="Long" resultMap="TEventInfoResult">
......
...@@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="planLevel != null and planLevel != ''"> and plan_level = #{planLevel}</if> <if test="planLevel != null and planLevel != ''"> and plan_level = #{planLevel}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != ''"> and beyond_enterprise_id = #{beyondEnterpriseId}</if> <if test="beyondEnterpriseId != null and beyondEnterpriseId != ''"> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
</where> </where>
order by create_time desc
</select> </select>
<select id="selectTPlanInfoById" parameterType="Long" resultMap="TPlanInfoResult"> <select id="selectTPlanInfoById" parameterType="Long" resultMap="TPlanInfoResult">
......
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1644901265903" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7343" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M527.053 96.924c-169.131 0.322-306.127 137.496-306.127 306.7 0 157.986 128.978 324.17 278.121 502.935 7.838 9.418 17.977 14.485 28.006 15.061 10.029-0.576 20.168-5.643 28.002-15.061 149.144-178.765 278.123-344.948 278.123-502.935 0-169.205-136.997-306.378-306.126-306.7zM527.053 500.967c-66.070-0.358-119.562-53.956-119.562-120.099s53.492-119.74 119.562-120.099c66.069 0.358 119.557 53.956 119.557 120.099s-53.487 119.74-119.557 120.099z" p-id="7344" fill="#1296db"></path></svg>
\ No newline at end of file
<svg id="组_2449" data-name="组 2449" xmlns="http://www.w3.org/2000/svg" width="23" height="33.9" viewBox="0 0 23 33.9">
<g id="路径_186" data-name="路径 186" fill="none">
<path d="M11.5,0A11.5,11.5,0,0,1,23,11.5c0,6.351-11.6,18.226-11.5,18.3S0,17.851,0,11.5A11.5,11.5,0,0,1,11.5,0Z" stroke="none"/>
<path d="M 11.5 0.9999942779541016 C 5.71027946472168 0.9999942779541016 1 5.710294723510742 1 11.50003433227539 C 1 15.44047451019287 6.295700073242188 22.62868881225586 11.47670364379883 28.30246925354004 C 12.68497562408447 26.95181846618652 15.33078575134277 23.97880172729492 17.65543937683105 20.72857475280762 C 19.63740921020508 17.95747375488281 22 14.10698509216309 22 11.50003433227539 C 22 5.710294723510742 17.28972053527832 0.9999942779541016 11.5 0.9999942779541016 M 11.5 -5.7220458984375e-06 C 17.85127067565918 -5.7220458984375e-06 23 5.148744583129883 23 11.50003433227539 C 23 17.82767868041992 11.48916530609131 29.63789367675781 11.49940204620361 29.80171203613281 C 11.36462783813477 29.63816833496094 0 17.78736114501953 0 11.50003433227539 C 0 5.148744583129883 5.14872932434082 -5.7220458984375e-06 11.5 -5.7220458984375e-06 Z M 11.49940204620361 29.80171203613281 C 11.50076866149902 29.80337142944336 11.50098419189453 29.80383491516113 11.5 29.80305480957031 C 11.49963855743408 29.80276870727539 11.49944019317627 29.80232429504395 11.49940204620361 29.80171203613281 Z" stroke="none" fill="#7bf8f4"/>
</g>
<path id="多边形_33" data-name="多边形 33" d="M4.471,0,8.941,5.961H0Z" transform="translate(16.094 29.804) rotate(180)" fill="#7bf8f4"/>
<path id="路径_966" data-name="路径 966" d="M99.476,156.616a6.028,6.028,0,0,1-1.622,2.267.9.9,0,0,1-.583.252.8.8,0,0,1-.567-.236.765.765,0,0,1-.236-.535.705.705,0,0,1,.236-.535,6.035,6.035,0,0,0,1.748-4.377A5.726,5.726,0,0,0,96.7,149.2a6.645,6.645,0,0,0-9.085.016,5.836,5.836,0,0,0-1.763,4.283,6.134,6.134,0,0,0,1.952,4.346.765.765,0,0,1,.236.535.705.705,0,0,1-.236.535.748.748,0,0,1-.567.236.8.8,0,0,1-.567-.236,7.414,7.414,0,0,1-2.047-2.724,7.528,7.528,0,0,1,1.748-8.266,7.836,7.836,0,0,1,2.629-1.685,9.392,9.392,0,0,1,6.361-.063,6.113,6.113,0,0,1,2.141,1.26c2.866,2.425,3.023,5.9,2.047,8.943Zm-7.337-7.684a4.366,4.366,0,0,0-4.377,4.267.5.5,0,0,1-.236.5.527.527,0,0,1-.567,0,.513.513,0,0,1-.236-.5,5.254,5.254,0,0,1,1.575-3.684,5.533,5.533,0,0,1,7.7,0,5.208,5.208,0,0,1,1.606,3.732.5.5,0,0,1-.236.5.527.527,0,0,1-.567,0,.513.513,0,0,1-.236-.5,4.382,4.382,0,0,0-4.424-4.314Zm.913,5.4a1.113,1.113,0,0,1-1.559-.047,1.054,1.054,0,0,1-.268-1.149l-1.212-1.2a.418.418,0,0,1,0-.6.479.479,0,0,1,.63,0l1.228,1.2a1.162,1.162,0,0,1,1.2.268,1.024,1.024,0,0,1,.331.771A1.093,1.093,0,0,1,93.052,154.333Zm.016-.016" transform="translate(-80.582 -142.727)" fill="#7bf8f4"/>
</svg>
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2022-02-12 11:07:10 * @Date: 2022-02-12 11:07:10
* @LastEditTime: 2022-02-12 15:13:41 * @LastEditTime: 2022-02-15 10:33:20
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/components/GetPos.vue/index.vue * @FilePath: /test/hello-world/src/components/GetPos.vue/index.vue
...@@ -14,32 +14,33 @@ ...@@ -14,32 +14,33 @@
width="60%" width="60%"
:before-close="handleClose" :before-close="handleClose"
> >
<div class="search-wrapper pos"> <template v-if="inputVisible">
<el-input <div class="search-wrapper pos">
v-model="searchinput" <el-input
class="searchinput" v-model="searchinput"
placeholder="请输入内容" class="searchinput"
size="mini" placeholder="请输入内容"
style="width: 150px" size="mini"
ref="input" style="width: 150px"
></el-input> ref="input"
</div> ></el-input>
</div>
<div @click="pos" class="positionBtn pos">
<el-button type="primary" size="mini" icon="el-icon-position"
>定位</el-button
>
</div>
<div @click="pos" class="positionBtn pos">
<el-button type="primary" size="mini" icon="el-icon-position"
>定位</el-button
>
</div>
</template>
<div id="getposmap"></div> <div id="getposmap"></div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { EditorMap } from "./untils/getPath.js"; import { EditorMap } from "@/utils/mapClass/getPath.js";
export default { export default {
props: { props: {
//管道路径,二维数组 //管道路径,二维数组s
pipePath: { pipePath: {
type: Array, type: Array,
default: () => [], default: () => [],
...@@ -55,10 +56,15 @@ export default { ...@@ -55,10 +56,15 @@ export default {
default: "", default: "",
}, },
// 显示隐藏 // 显示隐藏
dialogVisible:{ dialogVisible: {
type:Boolean, type: Boolean,
default:false, default: false,
} },
// input跟定位按钮是否展示
inputVisible: {
type: Boolean,
default: true,
},
}, },
data() { data() {
return { return {
...@@ -80,8 +86,7 @@ export default { ...@@ -80,8 +86,7 @@ export default {
}); });
}, },
}, },
mounted() { mounted() {},
},
methods: { methods: {
init() { init() {
this.$nextTick(() => { this.$nextTick(() => {
...@@ -90,13 +95,13 @@ export default { ...@@ -90,13 +95,13 @@ export default {
if (this.device == "") { if (this.device == "") {
// 如果传了路径就创建一个marker,如果没传就直接激活手动创建 // 如果传了路径就创建一个marker,如果没传就直接激活手动创建
if (this.devicePos.length > 0) { if (this.devicePos.length > 0) {
this.map.addDevice({path:this.devicePos}); this.map.addDevice({ path: this.devicePos });
} else { } else {
this.map.mouseAddMarker(); this.map.mouseAddMarker();
} }
} else { } else {
if (this.pipePath.length > 0) { if (this.pipePath.length > 0) {
this.map.addPipeLine({path:this.pipePath}); this.map.addPipeLine({ path: this.pipePath });
} else { } else {
this.mouseAddPipeline(); this.mouseAddPipeline();
} }
...@@ -104,7 +109,7 @@ export default { ...@@ -104,7 +109,7 @@ export default {
}); });
}, },
handleClose() { handleClose() {
this.$emit("close") this.$emit("close");
}, },
open() { open() {
this.dialogVisible = true; this.dialogVisible = true;
...@@ -113,7 +118,7 @@ export default { ...@@ -113,7 +118,7 @@ export default {
pos() { pos() {
this.path = this.map.getPath(); this.path = this.map.getPath();
this.$emit("getPath", this.path); this.$emit("getPath", this.path);
console.log(this.path) console.log(this.path);
if (this.path?.length > 0) { if (this.path?.length > 0) {
this.$emit("update:dialogVisible", false); this.$emit("update:dialogVisible", false);
} }
......
...@@ -248,7 +248,7 @@ export class EditorMap { ...@@ -248,7 +248,7 @@ export class EditorMap {
let device = this.createMarker({ let device = this.createMarker({
map: this.map, map: this.map,
anchor: "bottom-center", anchor: "bottom-center",
icon: require("@/assets/mapImages/yalibiao.svg"), icon: require("@/assets/mapImages/coordinate.svg"),
position: path, position: path,
extData: deviceData, extData: deviceData,
}); });
......
...@@ -74,13 +74,13 @@ ...@@ -74,13 +74,13 @@
</el-row> </el-row>
<el-table v-loading="loading" :data="equipmentList" > <el-table v-loading="loading" :data="equipmentList" >
<el-table-column label="用户名称" align="center" prop="userName" width="220px"/> <el-table-column label="用户名称" align="center" prop="userName" width="200px"/>
<el-table-column label="身份证号" align="center" prop="idCard"/> <el-table-column label="身份证号" align="center" prop="idCard" width="180px"/>
<el-table-column label="联系电话" align="center" prop="linkMobile"/> <el-table-column label="联系电话" align="center" prop="linkMobile"/>
<el-table-column label="详细地址" align="center" prop="userAddress" width="380px"/> <el-table-column label="详细地址" align="center" prop="userAddress" width="380px"/>
<el-table-column label="安装时间" align="center" prop="installTime"/> <el-table-column label="安装时间" align="center" prop="installTime"/>
<el-table-column label="品牌名称" align="center" prop="brandName" width="130px"/> <el-table-column label="品牌名称" align="center" prop="brandName"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="180px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
...@@ -385,13 +385,13 @@ export default { ...@@ -385,13 +385,13 @@ export default {
if (this.form.safeEquipmentId != null) { if (this.form.safeEquipmentId != null) {
updateEquipment(this.form).then(response => { updateEquipment(this.form).then(response => {
this.msgSuccess("修改成功"); this.msgSuccess("修改成功");
this.open = false; this.open1 = false;
this.getList(); this.getList();
}); });
} else { } else {
addEquipment(this.form).then(response => { addEquipment(this.form).then(response => {
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
this.open = false; this.open1 = false;
this.getList(); this.getList();
}); });
} }
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<el-table v-loading="loading" :data="hiddenList" > <el-table v-loading="loading" :data="hiddenList" >
<el-table-column label="隐患名称" align="center" prop="hiddenTitle" width="200px"/> <el-table-column label="隐患名称" align="center" prop="hiddenTitle" width="200px"/>
<el-table-column label="隐患等级" align="center" prop="hiddenType" width="150px"> <el-table-column label="隐患等级" align="center" prop="hiddenType">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.hiddenType == '1'">一级隐患</span> <span v-if="scope.row.hiddenType == '1'">一级隐患</span>
<span v-if="scope.row.hiddenType == '2'">二级隐患</span> <span v-if="scope.row.hiddenType == '2'">二级隐患</span>
...@@ -75,9 +75,9 @@ ...@@ -75,9 +75,9 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="隐患位置" align="center" prop="hiddenLocation" width="300px"/> <el-table-column label="隐患位置" align="center" prop="hiddenLocation" width="300px"/>
<el-table-column label="隐患发现人员" align="center" prop="hiddenFindPeople" width="150px"/> <el-table-column label="隐患发现人员" align="center" prop="hiddenFindPeople"/>
<el-table-column label="发现时间" align="center" prop="hiddenFindDate" width="150px"/> <el-table-column label="发现时间" align="center" prop="hiddenFindDate" width="150px"/>
<el-table-column label="处理方案" align="center" prop="dealPlanUrl" width="150px"> <el-table-column label="处理方案" align="center" prop="dealPlanUrl">
<template slot-scope="scope"> <template slot-scope="scope">
<span <span
class="dbtn" class="dbtn"
...@@ -89,13 +89,13 @@ ...@@ -89,13 +89,13 @@
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="整治情况" align="center" prop="remediation" width="180px"> <el-table-column label="整治情况" align="center" prop="remediation">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.remediation != '' && scope.row.remediation != null">{{ scope.row.remediation }}</span> <span v-if="scope.row.remediation != '' && scope.row.remediation != null">{{ scope.row.remediation }}</span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="180px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
...@@ -233,60 +233,66 @@ ...@@ -233,60 +233,66 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="title2" :visible.sync="open2" width="800px" append-to-body @cancel="cancel2"> <el-dialog :title="title2" :visible.sync="open2" width="1200px" append-to-body @cancel="cancel2" @close="cancel2">
<el-form ref="detailForm" :model="detailForm" label-width="120px"> <el-row>
<el-row> <el-col :span="14">
<el-col :span="11"> <el-form ref="detailForm" :model="detailForm" label-width="120px">
<el-form-item label="隐患名称:"> <el-row>
<font>{{detailForm.hiddenTitle}}</font> <el-col :span="10">
</el-form-item> <el-form-item label="隐患名称:">
<el-form-item label="隐患发现人员:"> <font>{{detailForm.hiddenTitle}}</font>
<font>{{detailForm.hiddenFindPeople}}</font> </el-form-item>
</el-form-item> <el-form-item label="隐患发现人员:">
<el-form-item label="隐患位置:"> <font>{{detailForm.hiddenFindPeople}}</font>
<font>{{detailForm.hiddenLocation}}</font> </el-form-item>
</el-form-item> <el-form-item label="发现时间:">
</el-col> <font>{{detailForm.hiddenFindDate}}</font>
<el-col :span="12"> </el-form-item>
<el-form-item label="隐患等级:"> </el-col>
<font v-if="detailForm.hiddenType == '1'">一级隐患</font> <el-col :span="13">
<font v-if="detailForm.hiddenType == '2'">二级隐患</font> <el-form-item label="隐患等级:">
<font v-if="detailForm.hiddenType == '3'">三级隐患</font> <font v-if="detailForm.hiddenType == '1'">一级隐患</font>
</el-form-item> <font v-if="detailForm.hiddenType == '2'">二级隐患</font>
<el-form-item label="发现时间:"> <font v-if="detailForm.hiddenType == '3'">三级隐患</font>
<font>{{detailForm.hiddenFindDate}}</font> </el-form-item>
</el-form-item> <el-form-item label="隐患位置:">
<el-form-item label="处理方案:"> <font>{{detailForm.hiddenLocation}}</font>
<span </el-form-item>
class="dbtn" <el-form-item label="处理方案:">
@click="checkFile(detailForm.dealPlanUrl)" <span class="dbtn" @click="checkFile(detailForm.dealPlanUrl)" v-if="detailForm.dealPlan != ''">
v-if="detailForm.dealPlan != ''" <i class="el-icon el-icon-view"></i>查看/下载
> </span>
<i class="el-icon el-icon-view"></i>查看/下载 <span v-else>-</span>
</span> </el-form-item>
<span v-else>-</span> </el-col>
</el-form-item> </el-row>
</el-col> <el-row>
</el-row> <el-form-item label="隐患内容:">
<el-row> <font>{{detailForm.hiddenContent}}</font>
<el-form-item label="隐患内容:"> </el-form-item>
<font>{{detailForm.hiddenContent}}</font> </el-row>
</el-form-item> <el-row>
</el-row> <el-form-item label="整治情况:">
<el-row> <font v-if="detailForm.remediation != '' && detailForm.remediation != null">{{detailForm.remediation}}</font>
<el-form-item label="整治情况:"> <font v-else> - </font>
<font v-if="detailForm.remediation != '' && detailForm.remediation != null">{{detailForm.remediation}}</font> </el-form-item>
<font v-else> - </font> </el-row>
</el-form-item> <el-row>
</el-row> <el-form-item label="备注信息:">
<el-row> <font v-if="detailForm.remarks != '' && detailForm.remarks != null">{{detailForm.remarks}}</font>
<el-form-item label="备注信息:"> <font v-else> - </font>
<font v-if="detailForm.remarks != '' && detailForm.remarks != null">{{detailForm.remarks}}</font> </el-form-item>
<font v-else> - </font> </el-row>
</el-form-item> </el-form>
</el-row> </el-col>
</el-form>
</el-dialog> <el-col :span="9">
<div style="width: 100%;height: 390px;margin-top: -25px; border: 1px solid rgb(218, 213, 213);margin-bottom: 10px;">
<div style="width: 100%;height: 100%" id="hiddenContainer"></div>
</div>
</el-col>
</el-row>
</el-dialog>
<GetPos <GetPos
:dialogVisible.sync="dialogTableVisible" :dialogVisible.sync="dialogTableVisible"
...@@ -301,15 +307,14 @@ ...@@ -301,15 +307,14 @@
<script> <script>
import { listHidden, getHidden, delHidden, addHidden, updateHidden, exportHidden } from "@/api/standingBook/hidden"; import { listHidden, getHidden, delHidden, addHidden, updateHidden, exportHidden } from "@/api/standingBook/hidden";
import Editor from '@/components/Editor';
import FileUpload from '@/components/FileUpload'; import FileUpload from '@/components/FileUpload';
import GetPos from '@/components/GetPos'; import GetPos from '@/components/GetPos';
import { EditorMap } from "@/utils/mapClass/getPath.js";
let uploadfile = require("@/assets/uploadfile.png"); let uploadfile = require("@/assets/uploadfile.png");
export default { export default {
name: "Hidden", name: "Hidden",
components: { components: {
Editor,
FileUpload, FileUpload,
GetPos GetPos
}, },
...@@ -344,6 +349,7 @@ export default { ...@@ -344,6 +349,7 @@ export default {
// 地图 // 地图
dialogTableVisible: false, dialogTableVisible: false,
devicePos: [], devicePos: [],
map: null,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
...@@ -406,11 +412,11 @@ export default { ...@@ -406,11 +412,11 @@ export default {
this.open1 = false; this.open1 = false;
this.reset1(); this.reset1();
this.fileList = []; this.fileList = [];
this.devicePos = [];
}, },
cancel2() { cancel2() {
this.open2 = false; this.open2 = false;
this.reset2(); this.reset2();
this.map.destroy();
}, },
// 表单重置 // 表单重置
reset1() { reset1() {
...@@ -458,6 +464,7 @@ export default { ...@@ -458,6 +464,7 @@ export default {
remarks: null remarks: null
}; };
this.resetForm("detailForm"); this.resetForm("detailForm");
this.devicePos = [];
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
...@@ -546,8 +553,16 @@ export default { ...@@ -546,8 +553,16 @@ export default {
this.reset2(); this.reset2();
getHidden(row.hiddenId).then(response => { getHidden(row.hiddenId).then(response => {
this.detailForm = response.data; this.detailForm = response.data;
this.devicePos = [this.detailForm.longitude, this.detailForm.latitude];
this.open2 = true; this.open2 = true;
this.title2 = "隐患整治台账详情"; this.title2 = "隐患整治台账详情";
this.$nextTick(() => {
this.map = new EditorMap("hiddenContainer", {}, this);
this.map.addDevice({ path: this.devicePos });
this.map.nowMouseTarget = null;
this.map.mousetoolClose(false);
});
}); });
}, },
checkFile(url) { checkFile(url) {
......
...@@ -77,24 +77,24 @@ ...@@ -77,24 +77,24 @@
<el-table v-loading="loading" :data="troubleList" > <el-table v-loading="loading" :data="troubleList" >
<el-table-column label="事故名称" align="center" prop="troubleName" width="200px"/> <el-table-column label="事故名称" align="center" prop="troubleName" width="200px"/>
<el-table-column label="事故类型" align="center" prop="troubleType" width="180px"> <el-table-column label="事故类型" align="center" prop="troubleType">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.troubleType == 1">生产安全事故</span> <span v-if="scope.row.troubleType == 1">生产安全事故</span>
<span v-if="scope.row.troubleType == 2">非生产安全事故</span> <span v-if="scope.row.troubleType == 2">非生产安全事故</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="事故地点" align="center" prop="troubleLocation" width="300px"/> <el-table-column label="事故地点" align="center" prop="troubleLocation" width="300px"/>
<el-table-column label="事故发生时间" align="center" prop="happenDate" width="180px"/> <el-table-column label="事故发生时间" align="center" prop="happenDate" width="150px"/>
<el-table-column label="责任单位" align="center" prop="responsibleUnit" width="150px"/> <el-table-column label="责任单位" align="center" prop="responsibleUnit"/>
<el-table-column label="责任人员" align="center" prop="responsiblePeople" width="150px"/> <el-table-column label="责任人员" align="center" prop="responsiblePeople"/>
<el-table-column label="是否处理" align="center" prop="isDeal" width="120px"> <el-table-column label="是否处理" align="center" prop="isDeal">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.isDeal == 1">已处理</span> <span v-if="scope.row.isDeal == 1">已处理</span>
<span v-if="scope.row.isDeal == 2">未处理</span> <span v-if="scope.row.isDeal == 2">未处理</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="处理完成时间" align="center" prop="dealDate" width="180px"/>--> <!-- <el-table-column label="处理完成时间" align="center" prop="dealDate" width="180px"/>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="180px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
...@@ -242,61 +242,71 @@ ...@@ -242,61 +242,71 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="title2" :visible.sync="open2" width="800px" append-to-body @cancel="cancel2"> <el-dialog :title="title2" :visible.sync="open2" width="1200px" append-to-body @cancel="cancel2" @close="cancel2">
<el-form ref="detailForm" :model="detailForm" label-width="120px"> <el-row>
<el-row> <el-col :span="14">
<el-col :span="11"> <el-form ref="detailForm" :model="detailForm" label-width="120px">
<el-form-item label="事故名称:"> <el-row>
<font>{{detailForm.troubleName}}</font> <el-col :span="10">
</el-form-item> <el-form-item label="事故名称:">
<el-form-item label="事故原因:"> <font>{{detailForm.troubleName}}</font>
<font>{{detailForm.troubleReason}}</font> </el-form-item>
</el-form-item> <el-form-item label="事故原因:">
<el-form-item label="责任单位:"> <font>{{detailForm.troubleReason}}</font>
<font v-if="detailForm.responsibleUnit != '' && detailForm.responsibleUnit != null">{{detailForm.responsibleUnit}}</font> </el-form-item>
<el-form-item label="责任单位:">
<font v-if="detailForm.responsibleUnit != '' && detailForm.responsibleUnit != null">{{detailForm.responsibleUnit}}</font>
<font v-else> - </font>
</el-form-item>
</el-col>
<el-col :span="13">
<el-form-item label="事故类型:">
<font v-if="detailForm.troubleType == '1'">安全生产事故</font>
<font v-if="detailForm.troubleType == '2'">非生产安全事故</font>
</el-form-item>
<el-form-item label="事故地点:">
<font>{{detailForm.troubleLocation}}</font>
</el-form-item>
<el-form-item label="责任人员:">
<font v-if="detailForm.responsiblePeople != '' && detailForm.responsiblePeople != null">{{detailForm.responsiblePeople}}</font>
<font v-else> - </font>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="简要经过:">
<font v-if="detailForm.briefProcess != '' && detailForm.briefProcess != null">{{detailForm.briefProcess}}</font>
<font v-else> - </font> <font v-else> - </font>
</el-form-item> </el-form-item>
</el-col> </el-row>
<el-col :span="12"> <el-row>
<el-form-item label="事故类型:"> <el-col :span="11">
<font v-if="detailForm.troubleType == '1'">安全生产事故</font> <el-form-item label="是否处理:">
<font v-if="detailForm.troubleType == '2'">非生产安全事故</font> <font v-if="detailForm.isDeal == '1'">已处理</font>
</el-form-item> <font v-if="detailForm.isDeal == '2'">未处理</font>
<el-form-item label="事故地点:"> </el-form-item>
<font>{{detailForm.troubleLocation}}</font> </el-col>
</el-form-item> <el-col :span="12">
<el-form-item label="责任人员:"> <el-form-item label="处理完成时间:">
<font v-if="detailForm.responsiblePeople != '' && detailForm.responsiblePeople != null">{{detailForm.responsiblePeople}}</font> <font>{{detailForm.dealDate}}</font>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="备注信息:">
<font v-if="detailForm.remarks != '' && detailForm.remarks != null">{{detailForm.remarks}}</font>
<font v-else> - </font> <font v-else> - </font>
</el-form-item> </el-form-item>
</el-col> </el-row>
</el-row> </el-form>
<el-row> </el-col>
<el-form-item label="简要经过:">
<font v-if="detailForm.briefProcess != '' && detailForm.briefProcess != null">{{detailForm.briefProcess}}</font> <el-col :span="9">
<font v-else> - </font> <div style="width: 100%;height: 390px;margin-top: -25px; border: 1px solid rgb(218, 213, 213);margin-bottom: 10px;">
</el-form-item> <div style="width: 100%;height: 100%" id="troubleContainer"></div>
</el-row> </div>
<el-row> </el-col>
<el-col :span="11"> </el-row>
<el-form-item label="是否处理:">
<font v-if="detailForm.isDeal == '1'">已处理</font>
<font v-if="detailForm.isDeal == '2'">未处理</font>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="处理完成时间:">
<font>{{detailForm.dealDate}}</font>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="备注信息:">
<font v-if="detailForm.remarks != '' && detailForm.remarks != null">{{detailForm.remarks}}</font>
<font v-else> - </font>
</el-form-item>
</el-row>
</el-form>
</el-dialog> </el-dialog>
<GetPos <GetPos
...@@ -313,6 +323,7 @@ ...@@ -313,6 +323,7 @@
<script> <script>
import { listTrouble, getTrouble, delTrouble, addTrouble, updateTrouble, exportTrouble } from "@/api/standingBook/trouble"; import { listTrouble, getTrouble, delTrouble, addTrouble, updateTrouble, exportTrouble } from "@/api/standingBook/trouble";
import GetPos from '@/components/GetPos'; import GetPos from '@/components/GetPos';
import { EditorMap } from "@/utils/mapClass/getPath.js";
export default { export default {
name: "Trouble", name: "Trouble",
...@@ -343,6 +354,7 @@ export default { ...@@ -343,6 +354,7 @@ export default {
// 地图 // 地图
dialogTableVisible: false, dialogTableVisible: false,
devicePos: [], devicePos: [],
map: null,
// 弹出层标题 // 弹出层标题
title1: "", title1: "",
title2: "", title2: "",
...@@ -416,11 +428,11 @@ export default { ...@@ -416,11 +428,11 @@ export default {
cancel1() { cancel1() {
this.open1 = false; this.open1 = false;
this.reset1(); this.reset1();
this.devicePos = [];
}, },
cancel2() { cancel2() {
this.open2 = false; this.open2 = false;
this.reset2(); this.reset2();
this.map.destroy();
}, },
// 表单重置 // 表单重置
reset1() { reset1() {
...@@ -471,6 +483,7 @@ export default { ...@@ -471,6 +483,7 @@ export default {
remarks: null remarks: null
}; };
this.resetForm("detailForm"); this.resetForm("detailForm");
this.devicePos = [];
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
...@@ -505,13 +518,13 @@ export default { ...@@ -505,13 +518,13 @@ export default {
if (this.form.troubleId != null) { if (this.form.troubleId != null) {
updateTrouble(this.form).then(response => { updateTrouble(this.form).then(response => {
this.msgSuccess("修改成功"); this.msgSuccess("修改成功");
this.open = false; this.open1 = false;
this.getList(); this.getList();
}); });
} else { } else {
addTrouble(this.form).then(response => { addTrouble(this.form).then(response => {
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
this.open = false; this.open1 = false;
this.getList(); this.getList();
}); });
} }
...@@ -553,8 +566,17 @@ export default { ...@@ -553,8 +566,17 @@ export default {
this.reset2(); this.reset2();
getTrouble(row.troubleId).then(response => { getTrouble(row.troubleId).then(response => {
this.detailForm = response.data; this.detailForm = response.data;
this.devicePos = [this.detailForm.longitude, this.detailForm.latitude];
console.log("this.devicePos",this.devicePos);
this.open2 = true; this.open2 = true;
this.title2 = "燃气事故台账详情"; this.title2 = "燃气事故台账详情";
this.$nextTick(() => {
this.map = new EditorMap("troubleContainer", {}, this);
this.map.addDevice({ path: this.devicePos });
this.map.nowMouseTarget = null;
this.map.mousetoolClose(false);
});
}); });
}, },
MapdialogFun() { MapdialogFun() {
......
...@@ -104,20 +104,20 @@ ...@@ -104,20 +104,20 @@
<el-table v-loading="loading" :data="eventInfoList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="eventInfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="事件id" align="center" prop="eventId" /> <!--<el-table-column label="事件id" align="center" prop="eventId" />-->
<el-table-column label="事件名称" align="center" prop="eventTitle" /> <el-table-column label="事件名称" align="center" prop="eventTitle" />
<el-table-column label="所属企业" align="center" prop="beyondEnterpriseName" />
<el-table-column label="事件类型" align="center" prop="eventType" :formatter="eventTypeFormat" /> <el-table-column label="事件类型" align="center" prop="eventType" :formatter="eventTypeFormat" />
<el-table-column label="事件等级" align="center" prop="eventLevel" :formatter="eventLevelFormat" /> <el-table-column label="事件等级" align="center" prop="eventLevel" :formatter="eventLevelFormat" />
<el-table-column label="事件地点" align="center" prop="eventLocation" /> <el-table-column label="事件地点" align="center" prop="eventLocation" />
<el-table-column label="报案时间" align="center" prop="reportTime" width="180"> <el-table-column label="报案时间" align="center" prop="reportTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.reportTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.reportTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="报案人" align="center" prop="reportPerson" /> <el-table-column label="报案人" align="center" prop="reportPerson" />
<el-table-column label="事件处置信息" align="center" prop="eventDeal" /> <el-table-column label="事件处置信息" align="center" prop="eventDeal" />
<el-table-column label="事件评估信息" align="center" prop="eventAssessment" /> <el-table-column label="事件评估信息" align="center" prop="eventAssessment" />
<el-table-column label="所属企业" align="center" prop="beyondEnterpriseId" />
<el-table-column label="备注" align="center" prop="remarks" /> <el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -128,6 +128,13 @@ ...@@ -128,6 +128,13 @@
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:eventInfo:edit']" v-hasPermi="['system:eventInfo:edit']"
>修改</el-button> >修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-document-copy"
@click="handleDtail(scope.row)"
>详情</el-button>
<el-button
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
...@@ -148,15 +155,15 @@ ...@@ -148,15 +155,15 @@
/> />
<!-- 添加或修改事件处置对话框 --> <!-- 添加或修改事件处置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<div class="division"> <div class="division">
<div style="width: 50%"> <div style="width: 45%">
<el-form-item label="事件名称" prop="eventTitle"> <el-form-item label="事件名称" prop="eventTitle">
<el-input v-model="form.eventTitle" placeholder="请输入事件名称" /> <el-input v-model="form.eventTitle" placeholder="请输入事件名称" :disabled="readonly"/>
</el-form-item> </el-form-item>
<el-form-item label="事件类型" prop="eventType"> <el-form-item label="事件类型" prop="eventType">
<el-select v-model="form.eventType" placeholder="请选择事件类型"> <el-select v-model="form.eventType" placeholder="请选择事件类型" :disabled="readonly">
<el-option <el-option
v-for="dict in eventTypeOptions" v-for="dict in eventTypeOptions"
:key="dict.dictValue" :key="dict.dictValue"
...@@ -166,7 +173,7 @@ ...@@ -166,7 +173,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="事件等级" prop="eventLevel"> <el-form-item label="事件等级" prop="eventLevel">
<el-select v-model="form.eventLevel" placeholder="请选择事件等级"> <el-select v-model="form.eventLevel" placeholder="请选择事件等级" :disabled="readonly">
<el-option <el-option
v-for="dict in eventLevelOptions" v-for="dict in eventLevelOptions"
:key="dict.dictValue" :key="dict.dictValue"
...@@ -176,27 +183,13 @@ ...@@ -176,27 +183,13 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="事件地点" prop="eventLocation"> <el-form-item label="事件地点" prop="eventLocation">
<el-input v-model="form.eventLocation" placeholder="请输入事件地点" /> <el-input v-model="form.eventLocation" placeholder="请输入事件地点" :disabled="readonly"/>
</el-form-item>
<el-form-item label="图片上传" prop="iconUrl">
<el-upload
:action="uploadImgUrl"
list-type="picture-card"
:on-preview="handlePictureCardPreview"
:on-success ="uploadsuccess"
:on-remove="handleRemove"
:file-list="fileList">
<i class="el-icon-plus"></i>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
<!--<el-input v-model="form.iconUrl" type="textarea" placeholder="请输入内容" />-->
</el-form-item> </el-form-item>
</div> </div>
<div style="width: 50%"> <div style="width: 50%">
<el-form-item label="所属企业" prop="beyondEnterpriseId"> <el-form-item label="所属企业" prop="beyondEnterpriseId">
<el-select v-model="form.beyondEnterpriseId" placeholder="请选择预案等级" @change="qiyechang"> <el-select v-model="form.beyondEnterpriseName" placeholder="请选择预案等级" @change="qiyechang" :disabled="readonly">
<el-option <el-option
v-for = "dict in enterpriseList" v-for = "dict in enterpriseList"
:key = "dict.enterpriseId" :key = "dict.enterpriseId"
...@@ -207,29 +200,49 @@ ...@@ -207,29 +200,49 @@
<!--<el-input v-model="form.beyondEnterpriseId" placeholder="请输入所属企业" />--> <!--<el-input v-model="form.beyondEnterpriseId" placeholder="请输入所属企业" />-->
</el-form-item> </el-form-item>
<el-form-item label="报案人" prop="reportPerson"> <el-form-item label="报案人" prop="reportPerson">
<el-input v-model="form.reportPerson" placeholder="请输入报案人" /> <el-input v-model="form.reportPerson" placeholder="请输入报案人" :disabled="readonly"/>
</el-form-item> </el-form-item>
<el-form-item label="报案时间" prop="reportTime"> <el-form-item label="报案时间" prop="reportTime" >
<el-date-picker clearable size="small" <el-date-picker clearable size="small"
v-model="form.reportTime" v-model="form.reportTime"
type="date" type="datetime"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
:disabled="readonly"
placeholder="选择报案时间"> placeholder="选择报案时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remarks"> <el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" /> <el-input v-model="form.remarks" placeholder="请输入备注" :disabled="readonly"/>
</el-form-item> </el-form-item>
</div> </div>
</div> </div>
<el-form-item label="事件处置信息" prop="eventDeal"> <el-form-item label="事件处置信息" prop="eventDeal" style="width: 60%">
<el-input v-model="form.eventDeal" type="textarea" placeholder="请输入事件处置信息" /> <el-input v-model="form.eventDeal" type="textarea" placeholder="请输入事件处置信息" :disabled="readonly"/>
</el-form-item>
<el-form-item label="事件评估信息" prop="eventAssessment" style="width: 60%">
<el-input v-model="form.eventAssessment" type="textarea" placeholder="请输入事件评估信息" :disabled="readonly"/>
</el-form-item>
<el-form-item label="事件附件" prop="iconUrl" :style="display" >
<FileUpload
listType="picture"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
style="width: 70%"
/>
<el-input v-show="false" disabled v-model="form.iconUrl"></el-input>
<!--<el-input v-model="form.iconUrl" type="textarea" placeholder="请输入内容" />-->
</el-form-item>
<el-form-item label="事件附件" prop="iconUrl" :style="display1">
<span
class="dbtn"
@click="checkFile(form.iconUrl)"
v-if="form.iconUrl != ''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
</el-form-item> </el-form-item>
<el-form-item label="事件评估信息" prop="eventAssessment">
<el-input v-model="form.eventAssessment" type="textarea" placeholder="请输入事件评估信息" />
</el-form-item>
<!--<el-form-item label="所属企业名称" prop="beyondEnterpriseName">--> <!--<el-form-item label="所属企业名称" prop="beyondEnterpriseName">-->
<!--<el-input v-model="form.beyondEnterpriseName" placeholder="请输入所属企业名称" />--> <!--<el-input v-model="form.beyondEnterpriseName" placeholder="请输入所属企业名称" />-->
<!--</el-form-item>--> <!--</el-form-item>-->
...@@ -247,10 +260,12 @@ ...@@ -247,10 +260,12 @@
<script> <script>
import { listEventInfo, getEventInfo, delEventInfo, addEventInfo, updateEventInfo, exportEventInfo ,enterpriseList} from "@/api/system/eventInfo"; import { listEventInfo, getEventInfo, delEventInfo, addEventInfo, updateEventInfo, exportEventInfo ,enterpriseList} from "@/api/system/eventInfo";
import FileUpload from '@/components/FileUpload';
let uploadfile = require("@/assets/uploadfile.png");
export default { export default {
name: "EventInfo", name: "EventInfo",
components: { components: {
FileUpload
}, },
data() { data() {
return { return {
...@@ -267,6 +282,8 @@ export default { ...@@ -267,6 +282,8 @@ export default {
multiple: true, multiple: true,
// 显示搜索条件 // 显示搜索条件
showSearch: true, showSearch: true,
readonly:false,
// 总条数 // 总条数
total: 0, total: 0,
// 事件处置表格数据 // 事件处置表格数据
...@@ -274,10 +291,10 @@ export default { ...@@ -274,10 +291,10 @@ export default {
enterpriseList:[], enterpriseList:[],
// 弹出层标题 // 弹出层标题
title: "", title: "",
display:"",
display1:"display:none",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
dialogImageUrl: '',
dialogVisible: false,
fileList:[], fileList:[],
// 事件类型:1.泄漏 2.火灾 3.爆炸字典 // 事件类型:1.泄漏 2.火灾 3.爆炸字典
eventTypeOptions: [], eventTypeOptions: [],
...@@ -346,20 +363,20 @@ export default { ...@@ -346,20 +363,20 @@ export default {
}); });
}, },
//上传 //上传
handleRemove(file, fileList) { getFileInfo(res){
//console.log(file, fileList); //this.form.dealPlan = res.fileName;
document.getElementsByClassName("el-upload")[0].style.display="" this.form.iconUrl = res.url;
this.fileList.push({
name: res.fileName,
url: uploadfile,
});
}, },
uploadsuccess(response){ listRemove(e) {
this.form.iconUrl=response.url; this.form.dealPlan = "";
console.log(document.getElementsByClassName("el-upload")[0]) this.fileList = [];
this.$nextTick(()=>{
document.getElementsByClassName("el-upload")[0].style.display="none"
})
}, },
handlePictureCardPreview(file) { checkFile(url) {
this.dialogImageUrl = file.url; window.open(url,'_blank');
this.dialogVisible = true;
}, },
qiyechang(value){ qiyechang(value){
let obj = {}; let obj = {};
...@@ -367,6 +384,7 @@ export default { ...@@ -367,6 +384,7 @@ export default {
return item.enterpriseId === value; return item.enterpriseId === value;
}); });
this.form.beyondEnterpriseName = obj.enterpriseName; this.form.beyondEnterpriseName = obj.enterpriseName;
this.form.beyondEnterpriseId = value;
}, },
// 事件类型:1.泄漏 2.火灾 3.爆炸字典翻译 // 事件类型:1.泄漏 2.火灾 3.爆炸字典翻译
eventTypeFormat(row, column) { eventTypeFormat(row, column) {
...@@ -425,15 +443,32 @@ export default { ...@@ -425,15 +443,32 @@ export default {
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.fileList = []; this.fileList = [];
this.readonly = false;
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加事件处置"; this.title = "添加事件处置";
this.$nextTick(()=>{ this.display="";
document.getElementsByClassName("el-upload")[0].style.display="" this.display1="display:none";
}) },
handleDtail(row){
this.fileList = [];
this.readonly = true;
this.reset();
this.open = true;
const eventId = row.eventId || this.ids
getEventInfo(eventId).then(response => {
this.form = response.data;
this.title = "修改事件处置";
if(row.iconUrl!=null){
this.fileList = [{name: '附件', url: uploadfile}];
}
this.display="display:none";
this.display1="";
});
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.readonly = false;
this.fileList = []; this.fileList = [];
this.reset(); this.reset();
const eventId = row.eventId || this.ids const eventId = row.eventId || this.ids
...@@ -442,11 +477,10 @@ export default { ...@@ -442,11 +477,10 @@ export default {
this.open = true; this.open = true;
this.title = "修改事件处置"; this.title = "修改事件处置";
if(row.iconUrl!=null){ if(row.iconUrl!=null){
this.fileList = [{name: 'file', url: row.iconUrl}]; this.fileList = [{name: '附件', url: uploadfile}];
this.$nextTick(()=>{
document.getElementsByClassName("el-upload")[0].style.display="none"
})
} }
this.display="";
this.display1="display:none";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
...@@ -507,4 +541,20 @@ export default { ...@@ -507,4 +541,20 @@ export default {
flex-direction:row; flex-direction:row;
justify-content:flex-start; justify-content:flex-start;
} }
.dbtn {
display: inline-block;
line-height: normal;
padding-left: 2px;
padding-right: 2px;
cursor: pointer;
border-radius: 3px;
border-style: solid;
border-width: 0;
color: rgb(48, 180, 107);
}
</style>
<style lang="scss" scoped>
::v-deep .el-select{
width: 100%;
}
</style> </style>
...@@ -97,14 +97,26 @@ ...@@ -97,14 +97,26 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!--<el-table-column label="预案id" align="center" prop="planId" />--> <!--<el-table-column label="预案id" align="center" prop="planId" />-->
<el-table-column label="预案标题" align="center" prop="planTitle" /> <el-table-column label="预案标题" align="center" prop="planTitle" />
<el-table-column label="所属企业名称" align="center" prop="beyondEnterpriseName" />
<el-table-column label="预案类型" align="center" prop="planType" :formatter="planTypeFormat"/> <el-table-column label="预案类型" align="center" prop="planType" :formatter="planTypeFormat"/>
<el-table-column label="预案等级" align="center" prop="planLevel" :formatter="planLevelFormat"/> <el-table-column label="预案等级" align="center" prop="planLevel" :formatter="planLevelFormat"/>
<el-table-column label="所属企业名称" align="center" prop="beyondEnterpriseName" /> <!--<el-table-column label="应急方案" align="center" prop="planContents" />-->
<el-table-column label="应急方案" align="center" prop="planContents" />
<el-table-column label="应急设备及车辆" align="center" prop="planEquipment" /> <el-table-column label="应急设备及车辆" align="center" prop="planEquipment" />
<el-table-column label="方案附件" align="center" prop="dealPlanUrl" width="150px">
<template slot-scope="scope">
<span
class="dbtn"
@click="checkFile(scope.row.iconUrl)"
v-if="scope.row.iconUrl != ''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" prop="remarks" /> <el-table-column label="备注" align="center" prop="remarks" />
...@@ -117,6 +129,12 @@ ...@@ -117,6 +129,12 @@
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:planInfo:edit']" v-hasPermi="['system:planInfo:edit']"
>修改</el-button> >修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-document-copy"
@click="handleDtail(scope.row)"
>详情</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
...@@ -137,15 +155,16 @@ ...@@ -137,15 +155,16 @@
/> />
<!-- 添加或修改应急预案对话框 --> <!-- 添加或修改应急预案对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<div class="division"> <div class="division">
<div style="width: 50%;"> <div style="width: 40%;">
<el-form-item label="预案标题" prop="planTitle"> <div class="titletitle">预案基本信息</div>
<el-input v-model="form.planTitle" placeholder="请输入预案标题" /> <el-form-item label="预案标题" prop="planTitle" >
<el-input v-model="form.planTitle" placeholder="请输入预案标题" :disabled="readonly"/>
</el-form-item> </el-form-item>
<el-form-item label="预案类型" prop="planType"> <el-form-item label="预案类型" prop="planType">
<el-select v-model="form.planType" placeholder="请选择预案类型"> <el-select v-model="form.planType" placeholder="请选择预案类型" :disabled="readonly">
<el-option <el-option
v-for = "dict in planTypeList" v-for = "dict in planTypeList"
:key = "dict.dictValue" :key = "dict.dictValue"
...@@ -155,7 +174,7 @@ ...@@ -155,7 +174,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="预案等级" prop="planLevel"> <el-form-item label="预案等级" prop="planLevel">
<el-select v-model="form.planLevel" placeholder="请选择预案等级"> <el-select v-model="form.planLevel" placeholder="请选择预案等级" :disabled="readonly">
<el-option <el-option
v-for = "dict in planLevelList" v-for = "dict in planLevelList"
:key = "dict.dictValue" :key = "dict.dictValue"
...@@ -164,38 +183,8 @@ ...@@ -164,38 +183,8 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="预案图片" prop="iconUrl"> <el-form-item label="所属企业" prop="beyondEnterpriseName">
<el-upload <el-select v-model="form.beyondEnterpriseName" placeholder="请选择预案等级" @change="qiyechang" :disabled="readonly">
:action="uploadImgUrl"
list-type="picture-card"
:on-preview="handlePictureCardPreview"
:on-success ="uploadsuccess"
:on-remove="handleRemove"
:file-list="fileList">
<i class="el-icon-plus"></i>
<!--<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>-->
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</el-form-item>
<el-form-item label="应急方案" prop="planContents">
<el-upload
class="upload-demo"
:action="uploadImgUrl"
:on-success="uploadsuccess2"
:on-remove="handleRemove2"
:file-list="fileList2"
list-type="text">
<el-button size="small" id = "uploadfang" type="primary">点击上传</el-button>
<!--<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>-->
</el-upload>
</el-form-item>
</div>
<div style="width: 50%;">
<el-form-item label="所属企业" prop="beyondEnterpriseId">
<el-select v-model="form.beyondEnterpriseId" placeholder="请选择预案等级" @change="qiyechang">
<el-option <el-option
v-for = "dict in enterpriseList" v-for = "dict in enterpriseList"
:key = "dict.enterpriseId" :key = "dict.enterpriseId"
...@@ -204,12 +193,44 @@ ...@@ -204,12 +193,44 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="应急设备车辆" prop="planEquipment"> <el-form-item label="应急设备车辆" prop="planEquipment" >
<el-input v-model="form.planEquipment" placeholder="请输入应急设备及车辆" /> <el-input v-model="form.planEquipment" placeholder="请输入应急设备及车辆" :disabled="readonly"/>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remarks"> <el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" /> <el-input v-model="form.remarks" placeholder="请输入备注" :disabled="readonly" />
</el-form-item>
<el-form-item label="预案附件" id="fujian" prop="iconUrl">
<FileUpload
listType="picture"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
/>
<el-input v-show="false" disabled v-model="form.iconUrl"></el-input>
<!--<el-dialog :visible.sync="dialogVisible">-->
<!--<img width="100%" :src="dialogImageUrl" alt="">-->
<!--</el-dialog>-->
</el-form-item> </el-form-item>
<el-form-item label="预案附件" id="fujianxia" prop="iconUrl" style="display: none">
<span
class="dbtn"
@click="checkFile(form.iconUrl)"
v-if="form.iconUrl != ''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
<!--<el-input v-model="fileurl" placeholder="" />-->
</el-form-item>
</div>
<div style="width: 58%;margin-left: 2%">
<div class="titletitle">方案内容</div>
<!--<el-form-item label="应急方案" prop="planContents">-->
<!--<el-input v-model="form.planContents" placeholder="" />-->
<editor v-model="form.planContents" style="height: 300px;" :readOnly="readonly"/>
<!--<textarea id="editorA" v-model="form.planContents" height="100%"></textarea>-->
<!--</el-form-item>-->
</div> </div>
</div> </div>
...@@ -223,7 +244,7 @@ ...@@ -223,7 +244,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button id="yesbutton" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -232,16 +253,19 @@ ...@@ -232,16 +253,19 @@
<script> <script>
import { listPlanInfo, getPlanInfo, delPlanInfo, addPlanInfo, updatePlanInfo, exportPlanInfo,enterpriseList } from "@/api/system/planInfo"; import { listPlanInfo, getPlanInfo, delPlanInfo, addPlanInfo, updatePlanInfo, exportPlanInfo,enterpriseList } from "@/api/system/planInfo";
import Editor from '@/components/Editor';
import FileUpload from '@/components/FileUpload';
let uploadfile = require("@/assets/uploadfile.png");
export default { export default {
name: "PlanInfo", name: "PlanInfo",
components: { components: {
Editor,FileUpload
}, },
data() { data() {
return { return {
uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
// 遮罩层 // 遮罩层
loading: true, loading: true,
readonly: true,
// 导出遮罩层 // 导出遮罩层
exportLoading: false, exportLoading: false,
// 选中数组 // 选中数组
...@@ -266,7 +290,7 @@ export default { ...@@ -266,7 +290,7 @@ export default {
dialogImageUrl: '', dialogImageUrl: '',
dialogVisible: false, dialogVisible: false,
fileList:[], fileList:[],
fileList2:[], fileurl:'',
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
...@@ -283,7 +307,7 @@ export default { ...@@ -283,7 +307,7 @@ export default {
planTitle: [ planTitle: [
{ required: true, message: "标题不能为空", trigger: "blur" } { required: true, message: "标题不能为空", trigger: "blur" }
], ],
beyondEnterpriseId: [ beyondEnterpriseName: [
{ required: true, message: "所属企业不能为空", trigger: "blur" } { required: true, message: "所属企业不能为空", trigger: "blur" }
], ],
planType: [ planType: [
...@@ -322,40 +346,55 @@ export default { ...@@ -322,40 +346,55 @@ export default {
}); });
}, },
qiyechang(value){ qiyechang(value){
console.log(value)
let obj = {}; let obj = {};
obj = this.enterpriseList.find((item)=>{ obj = this.enterpriseList.find((item)=>{
return item.enterpriseId === value; return item.enterpriseId === value;
}); });
this.form.beyondEnterpriseName = obj.enterpriseName; this.form.beyondEnterpriseName = obj.enterpriseName;
this.form.beyondEnterpriseId = value;
}, },
//上传图片 //上传
uploadsuccess(response){ getFileInfo(res){
this.form.iconUrl=response.url; //this.form.dealPlan = res.fileName;
//console.log(document.getElementsByClassName("el-upload--picture-card")) this.form.iconUrl = res.url;
document.getElementsByClassName("el-upload--picture-card")[0].style.display="none"; this.fileList.push({
}, name: res.fileName,
handleRemove(file, fileList) { url: uploadfile,
document.getElementsByClassName("el-upload--picture-card")[0].style.display=""; });
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
}, },
//上传方案 listRemove(e) {
handleRemove2(file, fileList) { this.form.dealPlan = "";
document.getElementById("uploadfang").style.display=""; this.fileList = [];
}, },
uploadsuccess2(response){ checkFile(url) {
this.form.planContents=response.url; window.open(url,'_blank');
document.getElementById("uploadfang").style.display="none";
}, },
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.fileList = []; this.fileList = [];
this.fileList2 = [];
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
//点击下载
downloadFile() {
var item = this.fileurl;
var title = item.split("/")[item.split("/").length-1];
this.download(item,title);
},
download (src, fileName) {
let x = new XMLHttpRequest();
x.open("GET", src, true);
x.responseType = 'blob';
x.onload = function(e) {
let url = window.URL.createObjectURL(x.response)
let a = document.createElement('a');
a.href = url
a.download = fileName
a.click()
}
x.send();
},
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
...@@ -395,18 +434,39 @@ export default { ...@@ -395,18 +434,39 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.open = true;
this.readonly=false;
this.fileList = []; this.fileList = [];
this.fileList2 = [];
this.reset(); this.reset();
this.open = true;
this.title = "添加应急预案"; this.title = "添加应急预案";
document.getElementById("fujian").style.display=""
document.getElementById("fujianxia").style.display="none"
document.getElementById("yesbutton").style.display="" ;
document.getElementsByClassName("el-upload--picture-card")[0].style.display=""; document.getElementsByClassName("el-upload--picture-card")[0].style.display="";
document.getElementById("uploadfang").style.display="";
},
handleDtail(row){
this.readonly=true;
this.fileList = [];
this.reset();
this.open = true;
const planId = row.planId || this.ids
getPlanInfo(planId).then(response => {
this.form = response.data;
this.title = "应急预案详情";
this.fileList = [{name: 'file', url:uploadfile}];
this.fileurl = row.iconUrl;
document.getElementById("yesbutton").style.display="none" ;
document.getElementById("fujian").style.display="none"
document.getElementById("fujianxia").style.display=""
});
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.readonly=false;
this.fileList = []; this.fileList = [];
this.fileList2 = [];
this.reset(); this.reset();
const planId = row.planId || this.ids const planId = row.planId || this.ids
getPlanInfo(planId).then(response => { getPlanInfo(planId).then(response => {
...@@ -414,17 +474,14 @@ export default { ...@@ -414,17 +474,14 @@ export default {
this.open = true; this.open = true;
this.title = "修改应急预案"; this.title = "修改应急预案";
if(row.iconUrl!=null||row.iconUrl==""){ if(row.iconUrl!=null||row.iconUrl==""){
this.fileList = [{name: 'file', url: row.iconUrl}]; this.fileList = [{name: 'file', url:uploadfile}];
this.$nextTick(()=>{ this.$nextTick(()=>{
document.getElementsByClassName("el-upload--picture-card")[0].style.display="none" document.getElementsByClassName("el-upload--picture-card")[0].style.display="none"
document.getElementById("yesbutton").style.display="" ;
}) })
} }
if(row.planContents!=null||row.planContents==""){ document.getElementById("fujian").style.display=""
this.fileList2 = [{name: 'file2', url: row.planContents}]; document.getElementById("fujianxia").style.display="none"
this.$nextTick(()=>{
document.getElementById("uploadfang").style.display="none"
})
}
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
...@@ -495,4 +552,27 @@ export default { ...@@ -495,4 +552,27 @@ export default {
flex-direction:row; flex-direction:row;
justify-content:flex-start; justify-content:flex-start;
} }
.dbtn {
display: inline-block;
line-height: normal;
padding-left: 2px;
padding-right: 2px;
cursor: pointer;
border-radius: 3px;
border-style: solid;
border-width: 0;
color: rgb(48, 180, 107);
}
.titletitle{
background: #1c84c6;
color: white;height:
20px;line-height:
20px;text-align: center;
margin-bottom: 10px;
}
</style>
<style lang="scss" scoped>
::v-deep .el-select{
width: 100%;
}
</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