祖安之光
10 天以前 1b7d920815f9dd79338996c4c9df0cdc2e797bc1
src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/qualityOrganize/components/editDialog.vue
@@ -11,7 +11,7 @@
      <el-form :model="state.form" size="default" ref="busRef" :rules="state.rules"  >
        <el-row :gutter="24">
          <el-col :span="24">
            <el-form-item label="企业名称:" prop="companyId" v-if="state.isAdmin">
            <el-form-item label="单位名称:" prop="companyId" v-if="state.isAdmin">
              <el-select v-model="state.form.companyId" placeholder="请选择" filterable clearable style="width: 100%" :disabled="title == '查看' || title == '编辑' || !state.isAdmin" @change="selectValueCom">
                <el-option
                    v-for="item in state.companyList"
@@ -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("");
@@ -184,7 +184,7 @@
  form: {
    id: '',
    companyId: null,
    year: '',
    year: '2025',
    writeId: null,
    checkId: null,
    ratifyId: null,
@@ -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()
@@ -316,7 +323,7 @@
  state.form = {
    id: '',
    companyId: null,
    year: '',
    year: '2025',
    writeId: null,
    checkId: null,
    ratifyId: null,