813dc2ceee853ff50c947f2ae8d46d4d2c2c79fd.svn-base 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <template>
  2. <div class="zdlsqk" style="width: 100%;margin: auto">
  3. <el-container style="height:520px;">
  4. <el-main style="border:1px solid #d5d5ff;margin-left:5px;padding:0px;">
  5. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">信息填报</p>
  6. <el-form :model="addObj" :label-width="formLabelWidth">
  7. <p style="margin-top:10px;margin-bottom: 10px">
  8. <i class="el-icon-caret-right"></i>
  9. <span style="width:120px;padding-left: 10px">安全管理(防汛)应急预案</span>
  10. <span class="hrs"></span>
  11. </p>
  12. <el-form-item label="是否编制" required="true">
  13. <el-radio v-model="addObj.emerPlanSameExta" label="1">是</el-radio>
  14. <el-radio v-model="addObj.emerPlanSameExta" label="2">否</el-radio>
  15. </el-form-item>
  16. <el-form-item label="是否批复或备案" required="true">
  17. <el-radio v-model="addObj.emerPlanSameAppr" label="1">是</el-radio>
  18. <el-radio v-model="addObj.emerPlanSameAppr" label="2">否</el-radio>
  19. </el-form-item>
  20. <el-form-item label="是否进行演练" required="true">
  21. <!-- schPlanSameEme -->
  22. <el-radio v-model="addObj.schPlanSameEme" label="1">是</el-radio>
  23. <el-radio v-model="addObj.schPlanSameEme" label="2">否</el-radio>
  24. </el-form-item>
  25. <el-form-item label="是否具备操作性" required="true">
  26. <el-radio v-model="addObj.emerPlanSameSpeed" label="1">是</el-radio>
  27. <el-radio v-model="addObj.emerPlanSameSpeed" label="2">否</el-radio>
  28. </el-form-item>
  29. <p style="margin-top:10px;margin-bottom: 10px">
  30. <i class="el-icon-caret-right"></i>
  31. <span style="width:120px;padding-left: 10px">水库调度运用方案</span>
  32. <span class="hrs"></span>
  33. </p>
  34. <el-form-item label="是否编制" required="true">
  35. <el-radio v-model="addObj.schPlanSameExta" label="1">是</el-radio>
  36. <el-radio v-model="addObj.schPlanSameExta" label="2">否</el-radio>
  37. </el-form-item>
  38. <el-form-item label="是否批复" required="true">
  39. <el-radio v-model="addObj.schPlanSameAppr" label="1">是</el-radio>
  40. <el-radio v-model="addObj.schPlanSameAppr" label="2">否</el-radio>
  41. </el-form-item>
  42. <el-form-item label="是否具备操作性" required="true">
  43. <el-radio v-model="addObj.schPlanSameSpeed" label="1">是</el-radio>
  44. <el-radio v-model="addObj.schPlanSameSpeed" label="2">否</el-radio>
  45. </el-form-item>
  46. <p style="margin-top:10px;margin-bottom: 10px">
  47. <i class="el-icon-caret-right"></i>
  48. <span style="width:120px;padding-left: 10px">水雨情预测预报</span>
  49. <span class="hrs"></span>
  50. </p>
  51. <el-form-item label="是否具有能力开展" required="true">
  52. <el-radio v-model="addObj.rainForc" label="1">是</el-radio>
  53. <el-radio v-model="addObj.rainForc" label="2">否</el-radio>
  54. </el-form-item>
  55. <el-form-item label="">
  56. <!-- <el-button @click="cancelHandler">取 消</el-button> -->
  57. <el-button type="primary" @click="addMember">保 存</el-button>
  58. </el-form-item>
  59. </el-form>
  60. </el-main>
  61. </el-container>
  62. <!-- <span slot="footer" class="dialog-footer" style="justify-content: flex-end;display: flex;">
  63. <el-button @click="cancelHandler">取 消</el-button>
  64. <el-button type="primary" @click="addMember">确 定</el-button>
  65. </span> -->
  66. </div>
  67. </template>
  68. <script>
  69. import request from "../../utils/gw_ajax_request.js";
  70. import { getBaseExt } from "../../api/duChaTianBao.js";
  71. import problemDialog from "../duChaWenTi/problemDialog.vue";
  72. export default {
  73. props: ["currentObjectRgstrId", "currentObjectName", "currentObjectId"],
  74. components: {
  75. problemDialog: problemDialog
  76. },
  77. data() {
  78. return {
  79. objtbStatu:{
  80. baseStat:"",
  81. rgstrId:"",
  82. },
  83. addObj: {
  84. thrqId:"",
  85. emerPlanSameExta: "",
  86. emerPlanSameAppr: "",
  87. emerPlanSameEme: "",
  88. emerPlanSameSpeed: "",
  89. schPlanSameExta: "",
  90. schPlanSameAppr: "",
  91. schPlanSameSpeed: "",
  92. rainForc: ""
  93. },
  94. curOperate: "",
  95. formLabelWidth: "250px",
  96. loading: true,
  97. operationType1: "",
  98. dialogShow: false
  99. };
  100. },
  101. computed: {
  102. recPersId() {
  103. return localStorage.getItem("userid")
  104. ? localStorage.getItem("userid")
  105. : "1098101939614724096";
  106. }
  107. },
  108. mounted() {
  109. this.getRgstridObj();
  110. },
  111. watch: {
  112. currentObjectRgstrId(n, o) {
  113. this.getRgstridObj();
  114. }
  115. },
  116. methods: {
  117. appearDialog(type) {
  118. this.dialogShow = true;
  119. this.problemSmallType = type;
  120. },
  121. closeDialog() {
  122. this.dialogShow = false;
  123. },
  124. getRgstridObj() {
  125. getBaseExt(this.currentObjectRgstrId).then(res => {
  126. if (res.data) {
  127. this.addObj = res.data;
  128. this.operationType1 = "update";
  129. console.log(this.addObj);
  130. } else {
  131. this.addObj = {};
  132. this.operationType1 = "add";
  133. }
  134. });
  135. },
  136. addMember() {
  137. var _self = this;
  138. this.addObj["rgstrId"] = this.currentObjectRgstrId;
  139. this.objtbStatu.rgstrId= this.currentObjectRgstrId;
  140. this.addObj["recPersId"] = this.recPersId;
  141. let gllsObj = {
  142. rgstrId: this.currentObjectRgstrId,
  143. recPersId: this.recPersId,
  144. emerPlanSameExta: this.addObj.emerPlanSameExta,
  145. emerPlanSameAppr: this.addObj.emerPlanSameAppr,
  146. schPlanSameEme: this.addObj.schPlanSameEme,
  147. emerPlanSameSpeed: this.addObj.emerPlanSameSpeed,
  148. schPlanSameExta: this.addObj.schPlanSameExta,
  149. schPlanSameAppr: this.addObj.schPlanSameAppr,
  150. schPlanSameSpeed: this.addObj.schPlanSameSpeed,
  151. rainForc: this.addObj.rainForc,
  152. thrqId: this.addObj.thrqId
  153. };
  154. let addObj = {};
  155. Object.assign(addObj, gllsObj);
  156. // if(!addObj.emerPlanSameExta || !addObj.emerPlanSameAppr || !addObj.schPlanSameEme || !addObj.emerPlanSameSpeed || undefined){
  157. // this.$message.info('请填写安全管理(防汛)应急预案信息')
  158. // return
  159. // }
  160. // if(!addObj.schPlanSameExta || !addObj.schPlanSameAppr || !addObj.schPlanSameSpeed){
  161. // this.$message.info('请填写水库调度运行方案信息')
  162. // return
  163. // }
  164. // if(!addObj.rainForc){
  165. // this.$message.info('请填写水雨情预测预报信息')
  166. // return
  167. // }
  168. if(addObj.emerPlanSameExta &&
  169. addObj.emerPlanSameAppr &&
  170. addObj.schPlanSameEme &&
  171. addObj.emerPlanSameSpeed &&
  172. addObj.schPlanSameExta &&
  173. addObj.schPlanSameAppr &&
  174. addObj.schPlanSameSpeed &&
  175. addObj.rainForc){
  176. this.objtbStatu.baseStat = "2"
  177. }else{
  178. this.objtbStatu.baseStat = "1"
  179. }
  180. // if(addObj.emerPlanSameExta ||
  181. // addObj.emerPlanSameAppr ||
  182. // addObj.schPlanSameEme ||
  183. // addObj.emerPlanSameSpeed ||
  184. // addObj.schPlanSameExta ||
  185. // addObj.schPlanSameAppr ||
  186. // addObj.schPlanSameSpeed ||
  187. // addObj.rainForc){
  188. // this.objtbStatu.baseStat = "1"
  189. // }
  190. if(addObj.emerPlanSameExta ==undefined &&
  191. addObj.emerPlanSameAppr ==undefined &&
  192. addObj.schPlanSameEme ==undefined &&
  193. addObj.emerPlanSameSpeed ==undefined &&
  194. addObj.schPlanSameExta ==undefined &&
  195. addObj.schPlanSameAppr ==undefined &&
  196. addObj.schPlanSameSpeed ==undefined &&
  197. addObj.rainForc ==undefined){
  198. this.objtbStatu.baseStat = "0"
  199. }
  200. console.log(this.presStat);
  201. this.$confirm('确认保存重点环节落实情况信息?', '提示', {
  202. confirmButtonText: '确定',
  203. cancelButtonText: '取消',
  204. type: 'warning'
  205. }).then(() => {
  206. if (this.operationType1 == "add") {
  207. request
  208. .post("/dc/insp/baseExt", addObj)
  209. .then(res => {
  210. if (res.success) {
  211. request.post("/dc/insp/rsvrRgstr/update",_self.objtbStatu).then((res)=>{
  212. res;
  213. })
  214. this.$message({
  215. type: "success",
  216. message: "添加成功!"
  217. });
  218. this.$emit("addShuiKuSuccess");
  219. } else {
  220. this.$message.error(res.message);
  221. }
  222. })
  223. .catch(err => {
  224. this.$message.error(res.message);
  225. });
  226. } else {
  227. request
  228. .post("/dc/insp/baseExt/update", addObj)
  229. .then(res => {
  230. if (res.success) {
  231. request.post("/dc/insp/rsvrRgstr/update",_self.objtbStatu).then((res)=>{
  232. res;
  233. })
  234. this.$message({
  235. type: "success",
  236. message: "修改成功!"
  237. });
  238. this.$emit("addShuiKuSuccess");
  239. } else {
  240. this.$message.error(res.message);
  241. }
  242. })
  243. .catch(err => {
  244. this.$message.error(res.message);
  245. });
  246. }
  247. })
  248. .catch(() => {
  249. });
  250. },
  251. cancelHandler() {
  252. this.$emit("cancelHandler");
  253. }
  254. // deleteMember(row){
  255. // this.$confirm('确定删除吗?', '提示', {
  256. // confirmButtonText: '确定',
  257. // cancelButtonText: '取消',
  258. // type: 'warning'
  259. // }).then(() => {
  260. // request.post(`/dc/insp/baseExt/delete/${row.thrqId}`).then((res)=>{
  261. // console.log(res);
  262. // if(res.success){
  263. // this.$message({
  264. // type: 'success',
  265. // message: '删除成功!'
  266. // });
  267. // this.dialogFormVisible = false;
  268. // }else{
  269. // this.$message.error(res.message);
  270. // }
  271. // })
  272. // }).catch(() => {
  273. // this.$message({
  274. // type: 'info',
  275. // message: '已取消删除'
  276. // });
  277. // });
  278. // },
  279. }
  280. };
  281. </script>
  282. <style>
  283. .zdlsqk label.el-form-item__label {
  284. width: 280px;
  285. }
  286. </style>