Commit 369a4dde authored by zhangjianqian's avatar zhangjianqian

应急处置功能

parent 23719c45
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
/> />
<!-- 添加或修改应急预案对话框 --> <!-- 添加或修改应急预案对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body> <el-dialog :title="title" :visible.sync="open" @closed="dialogClose" @open="dialogOpen" 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: 40%;"> <div style="width: 40%;">
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
<el-form-item label="备注" prop="remarks"> <el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" :disabled="readonly" /> <el-input v-model="form.remarks" placeholder="请输入备注" :disabled="readonly" />
</el-form-item> </el-form-item>
<el-form-item label="预案附件" id="fujian" prop="iconUrl"> <el-form-item label="预案附件" v-if="!readonly" prop="iconUrl">
<FileUpload <FileUpload
listType="picture" listType="picture"
@resFun="getFileInfo" @resFun="getFileInfo"
...@@ -212,7 +212,7 @@ ...@@ -212,7 +212,7 @@
<!--<img width="100%" :src="dialogImageUrl" alt="">--> <!--<img width="100%" :src="dialogImageUrl" alt="">-->
<!--</el-dialog>--> <!--</el-dialog>-->
</el-form-item> </el-form-item>
<el-form-item label="预案附件" id="fujianxia" prop="iconUrl" style="display: none"> <el-form-item label="预案附件" v-if="readonly" prop="iconUrl" >
<span <span
class="dbtn" class="dbtn"
@click="checkFile(form.iconUrl)" @click="checkFile(form.iconUrl)"
...@@ -226,15 +226,10 @@ ...@@ -226,15 +226,10 @@
</div> </div>
<div style="width: 58%;margin-left: 2%"> <div style="width: 58%;margin-left: 2%">
<div class="titletitle">方案内容</div> <div class="titletitle">方案内容</div>
<!--<el-form-item label="应急方案" prop="planContents">--> <!--<editor v-model="form.planContents" style="height: 300px;" readonly="false"/>-->
<!--<el-input v-model="form.planContents" placeholder="" />--> <editor v-if="isOpen" id="editor" v-model="form.planContents" :min-height="300" :readOnly="readonly"/>
<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>
<!--<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>-->
...@@ -244,7 +239,7 @@ ...@@ -244,7 +239,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button id="yesbutton" type="primary" @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>
...@@ -265,7 +260,7 @@ export default { ...@@ -265,7 +260,7 @@ export default {
return { return {
// 遮罩层 // 遮罩层
loading: true, loading: true,
readonly: true, readonly: false,
// 导出遮罩层 // 导出遮罩层
exportLoading: false, exportLoading: false,
// 选中数组 // 选中数组
...@@ -287,6 +282,7 @@ export default { ...@@ -287,6 +282,7 @@ export default {
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
isOpen:false,
dialogImageUrl: '', dialogImageUrl: '',
dialogVisible: false, dialogVisible: false,
fileList:[], fileList:[],
...@@ -301,7 +297,8 @@ export default { ...@@ -301,7 +297,8 @@ export default {
beyondEnterpriseId: null, beyondEnterpriseId: null,
}, },
// 表单参数 // 表单参数
form: {}, form: {
},
// 表单校验 // 表单校验
rules: { rules: {
planTitle: [ planTitle: [
...@@ -345,6 +342,12 @@ export default { ...@@ -345,6 +342,12 @@ export default {
this.enterpriseList = response.data; this.enterpriseList = response.data;
}); });
}, },
dialogClose(){
this.isOpen=false;
},
dialogOpen(){
this.isOpen=true;
},
qiyechang(value){ qiyechang(value){
let obj = {}; let obj = {};
obj = this.enterpriseList.find((item)=>{ obj = this.enterpriseList.find((item)=>{
...@@ -433,33 +436,23 @@ export default { ...@@ -433,33 +436,23 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.open = true;
this.readonly=false; this.readonly=false;
this.open = true;
this.fileList = []; this.fileList = [];
this.reset(); this.reset();
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="";
}, },
handleDtail(row){ handleDtail(row){
this.readonly=true; this.readonly=true;
this.open = true;
this.fileList = []; this.fileList = [];
this.reset(); this.reset();
this.open = true;
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;
document.getElementById("yesbutton").style.display="none" ;
document.getElementById("fujian").style.display="none"
document.getElementById("fujianxia").style.display=""
}); });
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
...@@ -475,9 +468,6 @@ export default { ...@@ -475,9 +468,6 @@ export default {
if(this.form.iconUrl!=null||this.form.iconUrl==""){ if(this.form.iconUrl!=null||this.form.iconUrl==""){
this.fileList = [{name: 'file', url:uploadfile}]; this.fileList = [{name: 'file', url:uploadfile}];
} }
document.getElementById("yesbutton").style.display="" ;
document.getElementById("fujian").style.display=""
document.getElementById("fujianxia").style.display="none"
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
......
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