shj
2022-03-31 0e9a24312e48b6c434934953cb74683c93c04aa6
自查
已修改4个文件
84 ■■■■ 文件已修改
src/views/safetyproduction/checklist.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/safetyproduction/gojudging.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/safetyproduction/new.vue 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/safetyproduction/reviewXG.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/safetyproduction/checklist.vue
@@ -267,8 +267,8 @@
    </div>
    <el-dialog :title="titleN" :visible.sync="dialogVisible" :close-on-click-modal="false" width="30%">
      <el-form ref="form" :model="formInline" label-width="80px">
        <el-form-item label="名称">
      <el-form ref="form" :rules="rules" :model="formInline" label-width="80px">
        <el-form-item label="名称" prop="name">
          <el-input v-model="formInline.name"></el-input>
        </el-form-item>
        <el-form-item label="说明">
@@ -280,7 +280,7 @@
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button @click="listCel">取 消</el-button>
        <el-button type="primary" class="btns" @click="listAdd"
          >确 定</el-button
        >
@@ -336,6 +336,10 @@
        children: "children",
        label: "label",
      },
        rules: {
        name: [
          { required: true, message: "名称不能为空", trigger: "change" },
        ],}
    };
  },
  created() {
@@ -435,6 +439,9 @@
      }
    },
    coAdd(val, type) {
       this.$nextTick(() => {
        this.$refs["form"].clearValidate();
      });
      this.titleN = type;
      if (type == "新增") {
        this.dialogVisible = true;
@@ -451,6 +458,8 @@
      }
    },
    listAdd() {
        this.$refs["form"].validate((valid) => {
        if (valid) {
      if (this.titleN == "新增") {
        this.form.deductionList.push(this.formInline);
        this.dialogVisible = false;
@@ -459,6 +468,8 @@
        this.form.deductionList[this.index].space = this.formInline.space;
        this.dialogVisible = false;
      }
         }
      });
    },
    listDel(val) {
      var i = this.form.deductionList.findIndex(
@@ -481,6 +492,9 @@
        }
      });
    },
    listCel(){
      this.dialogVisible = false;
    },
    btnsQX() {
      this.show = true;
    },
src/views/safetyproduction/gojudging.vue
@@ -1,7 +1,7 @@
<template>
  <div>
    <div class="box-right">
      <div v-for="(item, index) in lists" :key="index">
      <div v-for="(item, index) in lists" :key="index" style="padding:0 0 20px 0">
        <div class="title">
          A级要素:<span>{{ item.elementAName }}</span>
        </div>
@@ -40,10 +40,10 @@
                ></el-table-column>
                <el-table-column align="center" label="评审结果">
                  <template slot-scope="scope">
                    <span v-if="(scope.row.safetyInspectionItemResult = 0)"
                    <span v-if="(scope.row.safetyInspectionItemResult== 0)"
                      >是</span
                    >
                    <span v-if="(scope.row.safetyInspectionItemResult = 1)"
                    <span v-if="(scope.row.safetyInspectionItemResult == 1)"
                      >否</span
                    >
                  </template>
src/views/safetyproduction/new.vue
@@ -24,7 +24,7 @@
            >暂存</el-button
          >
        </div>
        <div v-for="(item, i) in lists" :key="i">
        <div v-for="(item, i) in lists" :key="i" style="padding:0 0 20px 0">
          <div class="title">
            A级要素:<span>{{ item.elementAName }}</span>
          </div>
@@ -33,9 +33,9 @@
              <el-col :span="6" :offset="1"
                ><p><span>B级要素:</span>{{ item.elementBName }}</p></el-col
              >
              <el-col :span="6" :offset="4"
              <!-- <el-col :span="6" :offset="4"
                ><p><span>得分:</span>50</p></el-col
              >
              > -->
            </el-row>
            <el-row>
              <el-col :span="22" :offset="1">
@@ -113,11 +113,11 @@
      </div>
    </div>
    <el-dialog title="添加" :visible.sync="dialogVisible" :close-on-click-modal="false" width="30%">
      <el-form ref="form" :model="form" label-width="100px">
        <el-form-item label="自查清单名称">
      <el-form ref="form"  :rules="rules" :model="form" label-width="110px">
        <el-form-item label="自查清单名称" prop="name">
          <el-input v-model="form.inspectionName"></el-input>
        </el-form-item>
        <el-form-item label="检查人名称">
        <el-form-item label="检查人名称" prop="type">
          <el-select
            v-model="form.inspector"
            style="width: 100%"
@@ -132,7 +132,7 @@
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="时间">
        <el-form-item label="时间" prop="time">
          <el-col :span="11">
            <el-date-picker
              type="date"
@@ -199,6 +199,18 @@
        label: "label",
      },
      itemId: "",
       parent: [],
          rules: {
        name: [
          { required: true, message: "要素名称不能为空", trigger: "change" },
        ],
          type: [
          { required: true, message: "级别不能为空", trigger: "change" },
        ],
         time: [
          { required: true, message: "父要素不能为空", trigger: "change" },
        ]
      },
    };
  },
  created() {
@@ -281,6 +293,7 @@
          }
        } else if (this.id == "编辑") {
          this.list = res.data.result;
          if(this.list.length!=0){
          var capA = { elementAName: "", id: [], child: [] };
          var atte = [];
          capA.elementAName = this.list[0].elementAName;
@@ -307,6 +320,7 @@
            );
            this.lists.splice(i, 1);
          }
        }
        }
      });
    },
@@ -362,10 +376,12 @@
      }
    },
    open(type) {
          this.$nextTick(() => {
        this.$refs["form"].clearValidate();
      });
      this.dialogVisible = true;
      this.form.status = type;
      var arr = [];
      console.log("数据", this.lists);
      for (var i = 0; i < this.lists.length; i++) {
        this.lists[i].id;
        for (var j = 0; j < this.lists[i].id.length; j++) {
@@ -380,6 +396,8 @@
      });
    },
    addC() {
       this.$refs["form"].validate((valid) => {
        if (valid) {
      if (this.id == "添加") {
        safetySelfInspectionAdd(this.form).then((res) => {
          if (res.data.code == 200) {
@@ -409,6 +427,8 @@
              path:"/checklistself"
            });
      }
         }
      });
    },
    btnsQX() {
      this.show = true;
src/views/safetyproduction/reviewXG.vue
@@ -151,8 +151,8 @@
    </div>
    <el-dialog title="扣分详情" :visible.sync="dialogVisible" :close-on-click-modal="false" width="30%">
      <el-form ref="form" :model="formInline" label-width="54px">
        <el-form-item label="说明">
      <el-form ref="form" :rules="rules" :model="formInline" label-width="54px">
        <el-form-item label="说明" prop="name">
          <el-input v-model="formInline.name"></el-input>
        </el-form-item>
        <el-form-item label="备注">
@@ -171,7 +171,7 @@
        <el-button type="primary" class="btns" @click="listAdd"
          >确 定</el-button
        >
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button @click="bacQx">取 消</el-button>
      </span>
    </el-dialog>
  </div>
@@ -192,11 +192,14 @@
        name: "",
        remark: "",
      },
        rules: {
        name: [
          { required: true, message: "说明不能为空", trigger: "change" },
        ],}
    };
  },
  created() {
    this.id = this.$route.query.id;
    console.log('tagee',this.$route.query)
    this.safeT(this.id);
  },
  methods: {
@@ -208,6 +211,9 @@
      });
    },
    coAdd(val, type) {
       this.$nextTick(() => {
        this.$refs["form"].clearValidate();
      });
      this.titleN = type;
      if (type == "新增") {
        this.dialogVisible = true;
@@ -224,6 +230,8 @@
      }
    },
    listAdd() {
       this.$refs["form"].validate((valid) => {
        if (valid) {
      if (this.titleN == "新增") {
        this.form.deductionList.push(this.formInline);
        this.dialogVisible = false;
@@ -232,6 +240,8 @@
        this.form.deductionList[this.index].space = this.formInline.space;
        this.dialogVisible = false;
      }
          }
      });
    },
    listDel(val) {
      var i = this.form.deductionList.findIndex(
@@ -265,6 +275,10 @@
              path:"/new"
            })
    },
    bacQx(){
      this.dialogVisible = false;
    this.safeT(this.id);
    },
    handleClick() {
      this.dialogVisible = true;
    },