Commit 369a4dde authored by zhangjianqian's avatar zhangjianqian

应急处置功能

parent 23719c45
......@@ -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">
<div class="division">
<div style="width: 40%;">
......@@ -199,7 +199,7 @@
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" :disabled="readonly" />
</el-form-item>
<el-form-item label="预案附件" id="fujian" prop="iconUrl">
<el-form-item label="预案附件" v-if="!readonly" prop="iconUrl">
<FileUpload
listType="picture"
@resFun="getFileInfo"
......@@ -212,7 +212,7 @@
<!--<img width="100%" :src="dialogImageUrl" alt="">-->
<!--</el-dialog>-->
</el-form-item>
<el-form-item label="预案附件" id="fujianxia" prop="iconUrl" style="display: none">
<el-form-item label="预案附件" v-if="readonly" prop="iconUrl" >
<span
class="dbtn"
@click="checkFile(form.iconUrl)"
......@@ -226,15 +226,10 @@
</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>-->
<!--<editor v-model="form.planContents" style="height: 300px;" readonly="false"/>-->
<editor v-if="isOpen" id="editor" v-model="form.planContents" :min-height="300" :readOnly="readonly"/>
</div>
</div>
<!--<el-form-item label="所属企业名称" prop="beyondEnterpriseName">-->
<!--<el-input v-model="form.beyondEnterpriseName" placeholder="请输入所属企业名称" />-->
<!--</el-form-item>-->
......@@ -244,7 +239,7 @@
</el-form>
<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>
</div>
</el-dialog>
......@@ -265,7 +260,7 @@ export default {
return {
// 遮罩层
loading: true,
readonly: true,
readonly: false,
// 导出遮罩层
exportLoading: false,
// 选中数组
......@@ -287,6 +282,7 @@ export default {
title: "",
// 是否显示弹出层
open: false,
isOpen:false,
dialogImageUrl: '',
dialogVisible: false,
fileList:[],
......@@ -301,7 +297,8 @@ export default {
beyondEnterpriseId: null,
},
// 表单参数
form: {},
form: {
},
// 表单校验
rules: {
planTitle: [
......@@ -345,6 +342,12 @@ export default {
this.enterpriseList = response.data;
});
},
dialogClose(){
this.isOpen=false;
},
dialogOpen(){
this.isOpen=true;
},
qiyechang(value){
let obj = {};
obj = this.enterpriseList.find((item)=>{
......@@ -433,33 +436,23 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.open = true;
this.readonly=false;
this.open = true;
this.fileList = [];
this.reset();
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){
this.readonly=true;
this.open = 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: '附件', url:uploadfile}];
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 {
if(this.form.iconUrl!=null||this.form.iconUrl==""){
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