深海科学与工程研究所安全巡检系统
祖安之光
4 days ago 70d6b00181e291c342df11c9e3d95451768f455d
src/views/saftyCheckMng/dailyCheck/index.vue
@@ -182,7 +182,6 @@
    haveMainHazard: null,
    checkBeginDate: "",
    checkEndDate: "",
    scratchpad: 2
  },
  originDeptList: [],
  dataList: [],
@@ -312,14 +311,14 @@
        rules: [{ required: true, message: "请选择复查时间", trigger: "blur" }],
      },
      {
        label: '检查图片',
        prop: 'checkPics',
        type: 'upload',
        uploadType: 'img',
        label: "检查图片",
        prop: "checkPics",
        type: "upload",
        uploadType: "img",
        limit: 3,
        maxSize: 5,
        accept: 'image/*',
        tip: '支持上传图片格式,尺寸小于5M,最多可上传3份'
        accept: "image/*",
        tip: "支持上传图片格式,尺寸小于5M,最多可上传3份",
      },
      {
        label: "备注",
@@ -410,27 +409,7 @@
};
const openDialog = async(type, value) => {
  let initalData = {}
  if(type == 'add'){
    const res = await getDailySafetyInspectList({
    pageNum: 1,
    pageSize: 10,
    researchGroup: null,
    checkUser: "",
    checkType: null,
    haveMainHazard: null,
    checkBeginDate: "",
    checkEndDate: "",
    scratchpad: 1
  })
    if (res.code == 200) {
      initalData =  JSON.parse(JSON.stringify(res.rows[0])) || {}
    } else {
      ElMessage.warning(res.msg);
    }
  }else{
    initalData = JSON.parse(JSON.stringify(value));
  }
  const initalData = JSON.parse(JSON.stringify(value));
  if (
    initalData.dailySafetyInspectionDepts &&
    Array.isArray(initalData.dailySafetyInspectionDepts)
@@ -509,6 +488,10 @@
const handleSave = async (data) => {
  const params = JSON.parse(JSON.stringify(data));
  if (
    params.dailySafetyInspectionDepts &&
    Array.isArray(params.dailySafetyInspectionDepts)
  ) {
  params.dailySafetyInspectionDepts = params.dailySafetyInspectionDepts.map(
    (i) => {
      return {
@@ -518,6 +501,8 @@
      };
    },
  );
  }
  const res = await saveTemDailySafetyInspect(params);
  if (res.code == 200) {
    ElMessage.success(res.msg);