zhouwx
2025-10-14 a219bc2526137283ea2da50ebec18864c8052e8b
src/views/build/conpanyFunctionConsult/environment/environmentalFactors/components/editDialog.vue
@@ -3,7 +3,7 @@
    <el-dialog
        v-model="dialogVisible"
        :title="title"
        width="900px"
        width="950px"
        :before-close="handleClose"
        :close-on-press-escape="false"
        :close-on-click-modal="false"
@@ -70,7 +70,7 @@
              <div style="display: flex;width: 100%;margin-top: 5px">
                <el-table :data="state.form.outEnvironment" :border="true">
                  <el-table-column type="index" label="序号"  align="center"></el-table-column>
                  <el-table-column label="环境因素" prop="factorName" align="center" width="140">
                  <el-table-column label="环境因素" prop="factorName" align="center" min-width="130">
                    <template  #default="{row,$index}">
                      <el-form-item :prop="'outEnvironment.' + '[' + $index + ']' + '.factorName'" :rules="state.rules.factorName">
                        <el-select
@@ -78,6 +78,11 @@
                            v-model="row.factorName"
                            placeholder="请选择环境因素"
                            style="width: 240px"
                            filterable
                            allow-create
                            default-first-option
                            :reserve-keyword="false"
                            clearable
                        >
                          <el-option
                              v-for="item in state.outReasonList"
@@ -89,14 +94,14 @@
                      </el-form-item>
                    </template>
                  </el-table-column>
                  <el-table-column label="主要内容" prop="factorMess" align="center" width="220">
                  <el-table-column label="主要内容" prop="factorMess" align="center" width="360">
                    <template  #default="{row,$index}">
                      <el-form-item :prop="'outEnvironment.' + '[' + $index + ']' + '.factorMess'" :rules="state.rules.factorMess">
                        <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" :rows="4" v-model="row.factorMess" placeholder="请输入"></el-input>
                      </el-form-item>
                    </template>
                  </el-table-column>
                  <el-table-column label="备注" prop="remark" align="center" >
                  <el-table-column label="备注" prop="remark" align="center" max-width="140">
                    <template  #default="{row,$index}">
                      <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" v-model="row.remark" placeholder="请输入"></el-input>
                    </template>
@@ -123,7 +128,7 @@
              <div style="display: flex;width: 100%;">
                <el-table :data="state.form.inEnvironment" :border="true" >
                  <el-table-column type="index" label="序号"  align="center"></el-table-column>
                  <el-table-column label="环境因素" prop="factorName" align="center" width="140">
                  <el-table-column label="环境因素" prop="factorName" align="center" min-width="130">
                    <template  #default="{row,$index}">
                      <el-form-item :prop="'inEnvironment.' + '[' + $index + ']' + '.factorName'" :rules="state.rules.factorName">
                        <el-select
@@ -131,6 +136,11 @@
                            v-model="row.factorName"
                            placeholder="请选择环境因素"
                            style="width: 240px"
                            filterable
                            allow-create
                            default-first-option
                            :reserve-keyword="false"
                            clearable
                        >
                          <el-option
                              v-for="item in state.inReasonList"
@@ -142,14 +152,14 @@
                      </el-form-item>
                    </template>
                  </el-table-column>
                  <el-table-column label="主要内容" prop="factorMess" align="center" width="220">
                  <el-table-column label="主要内容" prop="factorMess" align="center" width="360">
                    <template  #default="{row,$index}">
                      <el-form-item :prop="'inEnvironment.' + '[' + $index + ']' + '.factorMess'" :rules="state.rules.factorMess">
                        <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" :rows="4" v-model="row.factorMess" placeholder="请输入"></el-input>
                      </el-form-item>
                    </template>
                  </el-table-column>
                  <el-table-column label="备注" prop="remark" align="center" >
                  <el-table-column label="备注" prop="remark" align="center" max-width="140">
                    <template  #default="{row,$index}">
                      <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" v-model="row.remark" placeholder="请输入"></el-input>
                    </template>
@@ -254,7 +264,7 @@
    id: '',
    companyId: null,
    deptId: null,
    year: '',
    year: '2025',
    fictionId: null,
    checkId: null,
    ratifyId: null,
@@ -355,6 +365,7 @@
    state.form.companyName = value.companyName
    state.companyList = companyList
  }
  state.form.year = new Date().getFullYear().toString()
  title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' ;
  if(type === 'edit' || type === 'review') {
    state.form = JSON.parse(JSON.stringify(value));
@@ -457,7 +468,7 @@
    id: '',
    companyId: null,
    deptId: null,
    year: '',
    year: '2025',
    fictionId: null,
    checkId: null,
    ratifyId: null,