zhouwx
2025-10-13 5b5c6374749159db03a14ee645760327930bbb28
src/views/work/qualityManage/continuousImprovement/components/editDialog.vue
@@ -191,7 +191,8 @@
import {addTable, editTable, getTargetById} from "@/api/qualityObjectives/table";
import {addNeedDiscren, editNeedDiscren} from "@/api/need/need";
import {addCustomerNeed, editCustomerNeed} from "@/api/customerNeed";
import {addInside, editInside} from "@/api/continuousImprovement";
import {addInside, editInside, getInsideById} from "@/api/continuousImprovement";
import {getQualityTemplateById} from "@/api/standardSys/standardSys";
const dialogVisible = ref(false);
const title = ref("");
@@ -267,11 +268,23 @@
  }
  title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' ;
  if(type === 'edit' || type === 'review') {
    state.form = JSON.parse(JSON.stringify(value));
    if(state.isAdmin){
      state.form.companyId = value.companyId
      state.form.companyName = value.companyName
    const res = await getInsideById({improveId: value.id})
    if(res.code === 200){
      state.form = res.data
    }else{
      ElMessage.warning(res.message)
    }
    if(state.isAdmin){
      state.form.companyId = res.data.companyId
      state.form.companyName = res.data.companyName
    }
    // state.form = JSON.parse(JSON.stringify(value));
    // if(state.isAdmin){
    //   state.form.companyId = value.companyId
    //   state.form.companyName = value.companyName
    // }
    console.log('xx',state.form)