Commit bf5a4253 authored by wanghao's avatar wanghao

1 应急处置-应急预案 详情界面优化 替换调之前的 readonly方式

parent 0f0c0156
...@@ -27,8 +27,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -27,8 +27,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> <where>
<if test="fDrillsId != null "> and f_drills_id = #{fDrillsId}</if> <if test="fDrillsId != null "> and f_drills_id = #{fDrillsId}</if>
<if test="fDrillsTime != null and fDrillsTime != ''"> and f_drills_time = #{fDrillsTime}</if> <if test="fDrillsTime != null and fDrillsTime != ''"> and f_drills_time = #{fDrillsTime}</if>
<if test="fEvent != null and fEvent != ''"> and f_event = #{fEvent}</if> <if test="fEvent != null and fEvent != ''"> and f_event like concat('%', #{fEvent}, '%')</if>
<if test="fPlace != null and fPlace != ''"> and f_place = #{fPlace}</if> <if test="fPlace != null and fPlace != ''"> and f_place like concat('%', #{fPlace}, '%')</if>
<if test="fPerDep != null and fPerDep != ''"> and f_per_dep = #{fPerDep}</if> <if test="fPerDep != null and fPerDep != ''"> and f_per_dep = #{fPerDep}</if>
<if test="fDrillsContent != null and fDrillsContent != ''"> and f_drills_content = #{fDrillsContent}</if> <if test="fDrillsContent != null and fDrillsContent != ''"> and f_drills_content = #{fDrillsContent}</if>
<if test="fDrillDepartment != null and fDrillDepartment != ''"> and f_drill_department = #{fDrillDepartment}</if> <if test="fDrillDepartment != null and fDrillDepartment != ''"> and f_drill_department = #{fDrillDepartment}</if>
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="所属企业" prop="beyondEnterpriseId"> <el-form-item label="所属企业" prop="beyondEnterpriseId">
<el-select v-model="queryParams.beyondEnterpriseId" placeholder="请选择预案等级" clearable size="small"> <el-select v-model="queryParams.beyondEnterpriseId" placeholder="请选择企业" clearable size="small">
<el-option <el-option
v-for = "dict in enterpriseList" v-for = "dict in enterpriseList"
:key = "dict.enterpriseId" :key = "dict.enterpriseId"
......
<template>
<el-dialog title="应急预案详情" :visible.sync="detailOpen" @closed="dialogClose" @open="dialogOpen" width="1200px" append-to-body>
<el-form label-width="100px">
<div class="division">
<div style="width: 40%;">
<el-form-item label="预案标题">
<span v-if="detailInfo.planTitle">{{ detailInfo.planTitle }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="预案类型">
<span v-if="detailInfo.planType">{{ $parent.planTypeFormat(detailInfo) }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="预案等级">
<span v-if="detailInfo.planLevel">{{ $parent.planLevelFormat(detailInfo) }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="所属企业">
<span v-if="detailInfo.beyondEnterpriseName">{{ detailInfo.beyondEnterpriseName }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="应急设备车辆">
<span v-if="detailInfo.planEquipment">{{ detailInfo.planEquipment }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="备注">
<span v-if="detailInfo.remarks">{{ detailInfo.remarks }}</span>
<span v-else>-</span>
</el-form-item>
<el-form-item label="预案附件" prop="iconUrl" >
<span
class="dbtn"
@click="checkFile(detailInfo.iconUrl)"
v-if="detailInfo.iconUrl!=null && detailInfo.iconUrl != ''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
</el-form-item>
</div>
<div style="width: 58%;margin-left: 2%">
<div class="titletitle">方案内容</div>
<editor id="editor" v-model="detailInfo.planContents" :min-height="300" :readOnly="true"/>
</div>
</div>
</el-form>
</el-dialog>
</template>
<script>
import Editor from '@/components/Editor';
import { getPlanInfo } from "@/api/system/planInfo";
let uploadfile = require("@/assets/uploadfile.png");
export default {
name: "detail-info",
components: {
Editor
},
data(){
return{
detailInfo: {},
detailOpen: false,
isOpen:false,
fileList:[],
fileurl:'',
}
},
methods:{
dialogClose(){
this.detailOpen=false;
},
dialogOpen(){
this.detailOpen=true;
},
checkFile(url) {
window.open(url,'_blank');
},
getDetailInfo(id){
getPlanInfo(id).then(res =>{
if(res.code == 200 && res.data){
this.detailInfo = res.data;
this.fileList = [{name: '附件', url:uploadfile}];
this.fileurl = this.detailInfo.iconUrl;
this.detailOpen = true;
}
})
}
}
}
</script>
<style scoped lang="scss">
.division{
display:flex;
flex-direction:row;
justify-content:flex-start;
}
</style>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="所属企业" prop="beyondEnterpriseId"> <el-form-item label="所属企业" prop="beyondEnterpriseId">
<el-select v-model="queryParams.beyondEnterpriseId" placeholder="请选择预案等级" clearable size="small"> <el-select v-model="queryParams.beyondEnterpriseId" placeholder="请选择所属企业" clearable size="small">
<el-option <el-option
v-for = "dict in enterpriseList" v-for = "dict in enterpriseList"
:key = "dict.enterpriseId" :key = "dict.enterpriseId"
...@@ -202,9 +202,6 @@ ...@@ -202,9 +202,6 @@
/> />
<el-input v-show="false" disabled v-model="form.iconUrl"></el-input> <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="预案附件" v-if="readonly" prop="iconUrl" > <el-form-item label="预案附件" v-if="readonly" prop="iconUrl" >
<span <span
...@@ -224,19 +221,15 @@ ...@@ -224,19 +221,15 @@
<editor v-if="isOpen" id="editor" v-model="form.planContents" :min-height="300" :readOnly="readonly"/> <editor v-if="isOpen" id="editor" v-model="form.planContents" :min-height="300" :readOnly="readonly"/>
</div> </div>
</div> </div>
<!--<el-form-item label="所属企业名称" prop="beyondEnterpriseName">-->
<!--<el-input v-model="form.beyondEnterpriseName" placeholder="请输入所属企业名称" />-->
<!--</el-form-item>-->
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" v-if="!readonly" @click="submitForm"> </el-button> <el-button type="primary" v-if="!readonly" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 详情 -->
<DetailInfo ref="detail"/>
</div> </div>
</template> </template>
...@@ -244,11 +237,12 @@ ...@@ -244,11 +237,12 @@
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 Editor from '@/components/Editor';
import FileUpload from '@/components/FileUpload'; import FileUpload from '@/components/FileUpload';
import DetailInfo from "./DetailInfo";
let uploadfile = require("@/assets/uploadfile.png"); let uploadfile = require("@/assets/uploadfile.png");
export default { export default {
name: "PlanInfo", name: "PlanInfo",
components: { components: {
Editor,FileUpload Editor,FileUpload,DetailInfo
}, },
data() { data() {
return { return {
...@@ -437,17 +431,19 @@ export default { ...@@ -437,17 +431,19 @@ export default {
this.title = "添加应急预案"; this.title = "添加应急预案";
}, },
handleDtail(row){ handleDtail(row){
this.readonly=true; // this.readonly=true;
this.open = true; // this.open = true;
this.fileList = []; // this.fileList = [];
this.reset(); // this.reset();
const planId = row.planId || this.ids // const planId = row.planId || this.ids
getPlanInfo(planId).then(response => { // getPlanInfo(planId).then(response => {
this.form = response.data; // this.form = response.data;
this.title = "应急预案详情"; // this.title = "应急预案详情";
this.fileList = [{name: '附件', url:uploadfile}]; // this.fileList = [{name: '附件', url:uploadfile}];
this.fileurl = row.iconUrl; // this.fileurl = row.iconUrl;
}); // });
this.$refs.detail.getDetailInfo(row.planId);
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
......
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