祖安之光
2025-10-14 e1034e8661e811215809a2a375767d50ccd32541
src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/qualityOrganize/components/editDialog.vue
@@ -3,7 +3,7 @@
    <el-dialog
        v-model="dialogVisible"
        :title="title"
        width="50%"
        width="950px"
        :before-close="handleClose"
        :close-on-press-escape="false"
        :close-on-click-modal="false"
@@ -171,7 +171,7 @@
import {getDept, getObject, getObjectPage} from "@/api/qualityObjectives/object";
import {addTable, editTable, getTargetById} from "@/api/qualityObjectives/table";
import {addNeedDiscren, editNeedDiscren} from "@/api/need/need";
import {addQualityTemplate, editQualityTemplate} from "@/api/standardSys/standardSys";
import {addQualityTemplate, editQualityTemplate, getQualityTemplateById} from "@/api/standardSys/standardSys";
const dialogVisible = ref(false);
const title = ref("");
@@ -241,6 +241,7 @@
  state.isAdmin = userInfo.userType === 0;
  state.form.companyName = userInfo.companyName
  state.form.companyId = userInfo.companyId
  state.form.year = new Date().getFullYear().toString()
  if(state.isAdmin){
    state.form.companyId = value.companyId
    state.form.companyName = value.companyName
@@ -248,11 +249,17 @@
  }
  title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' ;
  if(type === 'edit' || type === 'review') {
    state.form = JSON.parse(JSON.stringify(value));
    const res = await getQualityTemplateById({planId: value.id})
    if(res.code === 200){
      state.form = res.data
    }else{
      ElMessage.warning(res.message)
    }
    if(state.isAdmin){
      state.form.companyId = value.companyId
      state.form.companyName = value.companyName
      state.form.companyId = res.data.companyId
      state.form.companyName = res.data.companyName
    }
  }
  await getPeopleList()