| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- <template>
- <div class="gcsthyxglqk">
- <el-container>
- <el-main style="padding:0px;">
- <el-form :model="addObj" :label-width="formLabelWidth">
- <p style="margin-top:10px;margin-bottom: 10px">
- <div style="display: flex;align-items: center;margin-bottom: 10px">
- <div style="width: 4px;height: 14px;background: rgba(44,158,255,1);border-radius: 1px;margin-right: 10px;"></div>
- <span style="width:120px">安全运行总体评价</span>
- </div>
- </p>
- <el-form-item label="安全评价">
- <span>{{addObj.safeComment == 1 ? '正常安全运行' : addObj.safeComment == 2 ? '存在一定安全隐患但能正常运行' : addObj.safeComment == 3 ? '存在重大安全隐患不能安全运行' : ''}}</span>
- </el-form-item>
- </el-form>
- </el-main>
- </el-container>
- </div>
- </template>
- <script>
- import request from "@util/gw_ajax_request.js";
- import { getManagelist, getLyjglist } from "@api/duChaTianBao.js";
- export default {
- components: {
- },
- props: ['currentObjectId','currentObjectName','currentObjectRgstrId','pType'],
- data() {
- return {
- objtbStatu: {
- resRunStat: "",
- rgstrId: ""
- },
- dxdcMainHeight: window.innerHeight - 197,
- dialogFormVisible: false,
- formLabelWidth: "180px",
- loading: true,
- addObj: {
- safeComment: "",
- mngrnId: "",
- rgstrId: "",
- recPersId: "",
- recPers2: "",
- recPersTel: "",
- status: "",
- emerPlanSameExta: "",
- fsltdzInfo: ""
- //注意有几个字段无法确认,需要掉接口查看
- },
- operationType1: "",
- lyjg: [],
- placeholder: "",
- rsvrRules: null,
- probId: '',
- showAddProblemDialog: false
- };
- },
- computed: {
- recPersId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- }
- },
- mounted() {
- this.getLyjgList();
- },
- watch: {
- currentObjectRgstrId(n, o) {
- this.getformList();
- }
- },
- methods: {
- getLyjgList() {
- var _self = this;
- _self.getformList()
- },
- getformList() {
- let _self = this;
- getManagelist(_self.currentObjectRgstrId).then(res => {
- if (res.success) {
- _self.addObj = res.data;
- } else {
- this.$message.warning(res.message);
- }
- });
- },
- //保存
- makesure() {
- let _self = this;
- this.addObj["rgstrId"] = this.currentObjectRgstrId;
- this.addObj["recPersId"] = this.recPersId;
- this.objtbStatu.rgstrId = this.currentObjectRgstrId;
- if (
- this.addObj.safeComment
- ) {
- this.objtbStatu.resRunStat = "2";
- }
- if (
- this.addObj.safeComment == undefined
- ) {
- this.objtbStatu.resRunStat = "0";
- }
- this.$confirm("确认保存运行管理情况信息吗?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- if (_self.operationType1 == "add") {
- request.post("/dc/insp/safeExtManage/insert", _self.addObj).then(res => {
- if (res.success) {
- _self.$message.success("添加成功");
- request
- .post("/dc/insp/rsvrRgstr/update", _self.objtbStatu)
- .then(res => {
- res;
- });
- _self.$emit("addShuiKuSuccess");
- }
- });
- } else {
- request
- .post("/dc/insp/safeExtManage/update", _self.addObj)
- .then(res => {
- if (res.success) {
- _self.$message.success("修改成功");
- request
- .post("/dc/insp/rsvrRgstr/update", _self.objtbStatu)
- .then(res => {
- res;
- });
- _self.$emit("addShuiKuSuccess");
- }
- });
- }
- })
- .catch(() => {});
- }
- }
- };
- </script>
- <style>
- #dcdxHeader {
- padding: 15px 20px;
- }
- #dxdcFooter {
- text-align: center;
- }
- #dxdcAside {
- border: 1px solid #d5d5ff;
- }
- .el-dialog__wrapper .el-treeWhite {
- /* max-height: 260px !important; */
- }
- .add-problem-icon{
- font-size: 16px;
- }
- </style>
|