d0e2fc37d3e586063031eabb1479ab0d3f73337e.svn-base 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <div class="gcsthyxglqk">
  3. <el-container>
  4. <el-main style="padding:0px;">
  5. <el-form :model="addObj" :label-width="formLabelWidth">
  6. <p style="margin-top:10px;margin-bottom: 10px">
  7. <div style="display: flex;align-items: center;margin-bottom: 10px">
  8. <div style="width: 4px;height: 14px;background: rgba(44,158,255,1);border-radius: 1px;margin-right: 10px;"></div>
  9. <span style="width:120px">安全运行总体评价</span>
  10. </div>
  11. </p>
  12. <el-form-item label="安全评价">
  13. <span>{{addObj.safeComment == 1 ? '正常安全运行' : addObj.safeComment == 2 ? '存在一定安全隐患但能正常运行' : addObj.safeComment == 3 ? '存在重大安全隐患不能安全运行' : ''}}</span>
  14. </el-form-item>
  15. </el-form>
  16. </el-main>
  17. </el-container>
  18. </div>
  19. </template>
  20. <script>
  21. import request from "@util/gw_ajax_request.js";
  22. import { getManagelist, getLyjglist } from "@api/duChaTianBao.js";
  23. export default {
  24. components: {
  25. },
  26. props: ['currentObjectId','currentObjectName','currentObjectRgstrId','pType'],
  27. data() {
  28. return {
  29. objtbStatu: {
  30. resRunStat: "",
  31. rgstrId: ""
  32. },
  33. dxdcMainHeight: window.innerHeight - 197,
  34. dialogFormVisible: false,
  35. formLabelWidth: "180px",
  36. loading: true,
  37. addObj: {
  38. safeComment: "",
  39. mngrnId: "",
  40. rgstrId: "",
  41. recPersId: "",
  42. recPers2: "",
  43. recPersTel: "",
  44. status: "",
  45. emerPlanSameExta: "",
  46. fsltdzInfo: ""
  47. //注意有几个字段无法确认,需要掉接口查看
  48. },
  49. operationType1: "",
  50. lyjg: [],
  51. placeholder: "",
  52. rsvrRules: null,
  53. probId: '',
  54. showAddProblemDialog: false
  55. };
  56. },
  57. computed: {
  58. recPersId() {
  59. return localStorage.getItem("userid")
  60. ? localStorage.getItem("userid")
  61. : "1098101939614724096";
  62. }
  63. },
  64. mounted() {
  65. this.getLyjgList();
  66. },
  67. watch: {
  68. currentObjectRgstrId(n, o) {
  69. this.getformList();
  70. }
  71. },
  72. methods: {
  73. getLyjgList() {
  74. var _self = this;
  75. _self.getformList()
  76. },
  77. getformList() {
  78. let _self = this;
  79. getManagelist(_self.currentObjectRgstrId).then(res => {
  80. if (res.success) {
  81. _self.addObj = res.data;
  82. } else {
  83. this.$message.warning(res.message);
  84. }
  85. });
  86. },
  87. //保存
  88. makesure() {
  89. let _self = this;
  90. this.addObj["rgstrId"] = this.currentObjectRgstrId;
  91. this.addObj["recPersId"] = this.recPersId;
  92. this.objtbStatu.rgstrId = this.currentObjectRgstrId;
  93. if (
  94. this.addObj.safeComment
  95. ) {
  96. this.objtbStatu.resRunStat = "2";
  97. }
  98. if (
  99. this.addObj.safeComment == undefined
  100. ) {
  101. this.objtbStatu.resRunStat = "0";
  102. }
  103. this.$confirm("确认保存运行管理情况信息吗?", "提示", {
  104. confirmButtonText: "确定",
  105. cancelButtonText: "取消",
  106. type: "warning"
  107. })
  108. .then(() => {
  109. if (_self.operationType1 == "add") {
  110. request.post("/dc/insp/safeExtManage/insert", _self.addObj).then(res => {
  111. if (res.success) {
  112. _self.$message.success("添加成功");
  113. request
  114. .post("/dc/insp/rsvrRgstr/update", _self.objtbStatu)
  115. .then(res => {
  116. res;
  117. });
  118. _self.$emit("addShuiKuSuccess");
  119. }
  120. });
  121. } else {
  122. request
  123. .post("/dc/insp/safeExtManage/update", _self.addObj)
  124. .then(res => {
  125. if (res.success) {
  126. _self.$message.success("修改成功");
  127. request
  128. .post("/dc/insp/rsvrRgstr/update", _self.objtbStatu)
  129. .then(res => {
  130. res;
  131. });
  132. _self.$emit("addShuiKuSuccess");
  133. }
  134. });
  135. }
  136. })
  137. .catch(() => {});
  138. }
  139. }
  140. };
  141. </script>
  142. <style>
  143. #dcdxHeader {
  144. padding: 15px 20px;
  145. }
  146. #dxdcFooter {
  147. text-align: center;
  148. }
  149. #dxdcAside {
  150. border: 1px solid #d5d5ff;
  151. }
  152. .el-dialog__wrapper .el-treeWhite {
  153. /* max-height: 260px !important; */
  154. }
  155. .add-problem-icon{
  156. font-size: 16px;
  157. }
  158. </style>