| | |
| | | :page-size="pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="recordTotal" |
| | | style="text-align: right;margin-top: 20px;" |
| | | > |
| | | </el-pagination> |
| | | <el-dialog :title="title" :visible.sync="dialogVisible" width="40%"> |
| | | <el-dialog :title="title" :visible.sync="dialogVisible":close-on-click-modal="false" width="40%"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="预案名称" prop="name"> |
| | | <el-input v-model="form.name"></el-input> |
| | |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" class="btns" @click="addemergencyPlan()">确 定</el-button> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button @click="cancel()">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | name: [ |
| | | { required: true, message: "预案名称不能为空", trigger: "change" }, |
| | | ], |
| | | remark: [ |
| | | { required: true, message: "责任人不能为空", trigger: "blur" }, |
| | | ], |
| | | // remark: [ |
| | | // { required: true, message: "备注不能为空", trigger: "blur" }, |
| | | // ], |
| | | }, |
| | | }; |
| | | }, |
| | |
| | | uploadImgSuccess(res){ |
| | | let file = { |
| | | fileUrl : res.fileUrl, |
| | | fileName : res.fileName |
| | | fileName : res.fileName, |
| | | url:res.url |
| | | } |
| | | this.fileList.push(file) |
| | | }, |
| | |
| | | message: "新增成功", |
| | | title: "成功", |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: res.data.message, |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | |
| | | message: "编辑成功", |
| | | title: "成功", |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: res.data.message, |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | |
| | | }); |
| | | }, |
| | | deleteById(val) { |
| | | emergencyPlanDel({ id: val }).then(() => { |
| | | this.emergencyPlan(); |
| | | this.$notify({ |
| | | title: "成功", |
| | | message: "删除成功", |
| | | type: "success", |
| | | duration: 2000, |
| | | }); |
| | | }); |
| | | this.$confirm('确认删除吗','提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(()=>{ |
| | | emergencyPlanDel({ id: val }).then(() => { |
| | | this.emergencyPlan(); |
| | | this.$notify({ |
| | | title: "成功", |
| | | message: "删除成功", |
| | | type: "success", |
| | | duration: 2000, |
| | | }); |
| | | }); |
| | | }) |
| | | .catch(error =>{ |
| | | }); |
| | | }, |
| | | cancel(){ |
| | | this.emergencyPlan(); |
| | | this.dialogVisible = false; |
| | | }, |
| | | find() { |
| | | this.emergencyPlan(); |
| | | }, |