| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297 |
- <template>
- <div class="zdlsqk" style="width: 100%;margin: auto">
- <el-container style="height:520px;">
- <el-main style="border:1px solid #d5d5ff;margin-left:5px;padding:0px;">
- <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">信息填报</p>
- <el-form :model="addObj" :label-width="formLabelWidth">
- <p style="margin-top:10px;margin-bottom: 10px">
- <i class="el-icon-caret-right"></i>
- <span style="width:120px;padding-left: 10px">安全管理(防汛)应急预案</span>
- <span class="hrs"></span>
- </p>
- <el-form-item label="是否编制" required="true">
- <el-radio v-model="addObj.emerPlanSameExta" label="1">是</el-radio>
- <el-radio v-model="addObj.emerPlanSameExta" label="2">否</el-radio>
- </el-form-item>
- <el-form-item label="是否批复或备案" required="true">
- <el-radio v-model="addObj.emerPlanSameAppr" label="1">是</el-radio>
- <el-radio v-model="addObj.emerPlanSameAppr" label="2">否</el-radio>
- </el-form-item>
- <el-form-item label="是否进行演练" required="true">
- <!-- schPlanSameEme -->
- <el-radio v-model="addObj.schPlanSameEme" label="1">是</el-radio>
- <el-radio v-model="addObj.schPlanSameEme" label="2">否</el-radio>
- </el-form-item>
- <el-form-item label="是否具备操作性" required="true">
- <el-radio v-model="addObj.emerPlanSameSpeed" label="1">是</el-radio>
- <el-radio v-model="addObj.emerPlanSameSpeed" label="2">否</el-radio>
- </el-form-item>
- <p style="margin-top:10px;margin-bottom: 10px">
- <i class="el-icon-caret-right"></i>
- <span style="width:120px;padding-left: 10px">水库调度运用方案</span>
- <span class="hrs"></span>
- </p>
- <el-form-item label="是否编制" required="true">
- <el-radio v-model="addObj.schPlanSameExta" label="1">是</el-radio>
- <el-radio v-model="addObj.schPlanSameExta" label="2">否</el-radio>
- </el-form-item>
- <el-form-item label="是否批复" required="true">
- <el-radio v-model="addObj.schPlanSameAppr" label="1">是</el-radio>
- <el-radio v-model="addObj.schPlanSameAppr" label="2">否</el-radio>
- </el-form-item>
- <el-form-item label="是否具备操作性" required="true">
- <el-radio v-model="addObj.schPlanSameSpeed" label="1">是</el-radio>
- <el-radio v-model="addObj.schPlanSameSpeed" label="2">否</el-radio>
- </el-form-item>
- <p style="margin-top:10px;margin-bottom: 10px">
- <i class="el-icon-caret-right"></i>
- <span style="width:120px;padding-left: 10px">水雨情预测预报</span>
- <span class="hrs"></span>
- </p>
- <el-form-item label="是否具有能力开展" required="true">
- <el-radio v-model="addObj.rainForc" label="1">是</el-radio>
- <el-radio v-model="addObj.rainForc" label="2">否</el-radio>
- </el-form-item>
- <el-form-item label="">
- <!-- <el-button @click="cancelHandler">取 消</el-button> -->
- <el-button type="primary" @click="addMember">保 存</el-button>
- </el-form-item>
- </el-form>
- </el-main>
- </el-container>
- <!-- <span slot="footer" class="dialog-footer" style="justify-content: flex-end;display: flex;">
- <el-button @click="cancelHandler">取 消</el-button>
- <el-button type="primary" @click="addMember">确 定</el-button>
- </span> -->
- </div>
- </template>
- <script>
- import request from "../../utils/gw_ajax_request.js";
- import { getBaseExt } from "../../api/duChaTianBao.js";
- import problemDialog from "../duChaWenTi/problemDialog.vue";
- export default {
- props: ["currentObjectRgstrId", "currentObjectName", "currentObjectId"],
- components: {
- problemDialog: problemDialog
- },
- data() {
- return {
- objtbStatu:{
- baseStat:"",
- rgstrId:"",
- },
- addObj: {
- thrqId:"",
- emerPlanSameExta: "",
- emerPlanSameAppr: "",
- emerPlanSameEme: "",
- emerPlanSameSpeed: "",
- schPlanSameExta: "",
- schPlanSameAppr: "",
- schPlanSameSpeed: "",
- rainForc: ""
- },
- curOperate: "",
- formLabelWidth: "250px",
- loading: true,
- operationType1: "",
- dialogShow: false
- };
- },
- computed: {
- recPersId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- }
- },
- mounted() {
- this.getRgstridObj();
- },
- watch: {
- currentObjectRgstrId(n, o) {
- this.getRgstridObj();
- }
- },
- methods: {
- appearDialog(type) {
- this.dialogShow = true;
- this.problemSmallType = type;
- },
- closeDialog() {
- this.dialogShow = false;
- },
- getRgstridObj() {
- getBaseExt(this.currentObjectRgstrId).then(res => {
- if (res.data) {
- this.addObj = res.data;
- this.operationType1 = "update";
- console.log(this.addObj);
- } else {
- this.addObj = {};
- this.operationType1 = "add";
- }
- });
- },
- addMember() {
- var _self = this;
- this.addObj["rgstrId"] = this.currentObjectRgstrId;
- this.objtbStatu.rgstrId= this.currentObjectRgstrId;
- this.addObj["recPersId"] = this.recPersId;
- let gllsObj = {
- rgstrId: this.currentObjectRgstrId,
- recPersId: this.recPersId,
- emerPlanSameExta: this.addObj.emerPlanSameExta,
- emerPlanSameAppr: this.addObj.emerPlanSameAppr,
- schPlanSameEme: this.addObj.schPlanSameEme,
- emerPlanSameSpeed: this.addObj.emerPlanSameSpeed,
- schPlanSameExta: this.addObj.schPlanSameExta,
- schPlanSameAppr: this.addObj.schPlanSameAppr,
- schPlanSameSpeed: this.addObj.schPlanSameSpeed,
- rainForc: this.addObj.rainForc,
- thrqId: this.addObj.thrqId
- };
- let addObj = {};
- Object.assign(addObj, gllsObj);
- // if(!addObj.emerPlanSameExta || !addObj.emerPlanSameAppr || !addObj.schPlanSameEme || !addObj.emerPlanSameSpeed || undefined){
- // this.$message.info('请填写安全管理(防汛)应急预案信息')
- // return
- // }
- // if(!addObj.schPlanSameExta || !addObj.schPlanSameAppr || !addObj.schPlanSameSpeed){
- // this.$message.info('请填写水库调度运行方案信息')
- // return
- // }
- // if(!addObj.rainForc){
- // this.$message.info('请填写水雨情预测预报信息')
- // return
- // }
- if(addObj.emerPlanSameExta &&
- addObj.emerPlanSameAppr &&
- addObj.schPlanSameEme &&
- addObj.emerPlanSameSpeed &&
- addObj.schPlanSameExta &&
- addObj.schPlanSameAppr &&
- addObj.schPlanSameSpeed &&
- addObj.rainForc){
- this.objtbStatu.baseStat = "2"
- }else{
- this.objtbStatu.baseStat = "1"
- }
- // if(addObj.emerPlanSameExta ||
- // addObj.emerPlanSameAppr ||
- // addObj.schPlanSameEme ||
- // addObj.emerPlanSameSpeed ||
- // addObj.schPlanSameExta ||
- // addObj.schPlanSameAppr ||
- // addObj.schPlanSameSpeed ||
- // addObj.rainForc){
- // this.objtbStatu.baseStat = "1"
- // }
- if(addObj.emerPlanSameExta ==undefined &&
- addObj.emerPlanSameAppr ==undefined &&
- addObj.schPlanSameEme ==undefined &&
- addObj.emerPlanSameSpeed ==undefined &&
- addObj.schPlanSameExta ==undefined &&
- addObj.schPlanSameAppr ==undefined &&
- addObj.schPlanSameSpeed ==undefined &&
- addObj.rainForc ==undefined){
- this.objtbStatu.baseStat = "0"
- }
-
- console.log(this.presStat);
- this.$confirm('确认保存重点环节落实情况信息?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- if (this.operationType1 == "add") {
- request
- .post("/dc/insp/baseExt", addObj)
- .then(res => {
- if (res.success) {
- request.post("/dc/insp/rsvrRgstr/update",_self.objtbStatu).then((res)=>{
- res;
- })
- this.$message({
- type: "success",
- message: "添加成功!"
- });
-
- this.$emit("addShuiKuSuccess");
- } else {
- this.$message.error(res.message);
- }
- })
- .catch(err => {
- this.$message.error(res.message);
- });
- } else {
- request
- .post("/dc/insp/baseExt/update", addObj)
- .then(res => {
- if (res.success) {
- request.post("/dc/insp/rsvrRgstr/update",_self.objtbStatu).then((res)=>{
- res;
- })
- this.$message({
-
- type: "success",
- message: "修改成功!"
- });
-
- this.$emit("addShuiKuSuccess");
- } else {
- this.$message.error(res.message);
- }
- })
- .catch(err => {
- this.$message.error(res.message);
- });
- }
- })
-
- .catch(() => {
-
- });
-
- },
- cancelHandler() {
- this.$emit("cancelHandler");
- }
- // deleteMember(row){
- // this.$confirm('确定删除吗?', '提示', {
- // confirmButtonText: '确定',
- // cancelButtonText: '取消',
- // type: 'warning'
- // }).then(() => {
- // request.post(`/dc/insp/baseExt/delete/${row.thrqId}`).then((res)=>{
- // console.log(res);
- // if(res.success){
- // this.$message({
- // type: 'success',
- // message: '删除成功!'
- // });
- // this.dialogFormVisible = false;
- // }else{
- // this.$message.error(res.message);
- // }
- // })
- // }).catch(() => {
- // this.$message({
- // type: 'info',
- // message: '已取消删除'
- // });
- // });
- // },
- }
- };
- </script>
- <style>
- .zdlsqk label.el-form-item__label {
- width: 280px;
- }
- </style>
|