祖安之光
2025-10-14 e1034e8661e811215809a2a375767d50ccd32541
src/views/build/conpanyFunctionConsult/need/needIdentify/components/editDialog.vue
@@ -3,7 +3,7 @@
    <el-dialog
        v-model="dialogVisible"
        :title="title"
        width="50%"
        width="900px"
        :before-close="handleClose"
        :close-on-press-escape="false"
        :close-on-click-modal="false"
@@ -70,32 +70,32 @@
              <div style="display: flex;width: 100%;">
                <el-table :data="state.form.expectContents" :border="true" >
                  <el-table-column type="index" label="序号"  align="center"></el-table-column>
                  <el-table-column label="相关方" prop="stakeholder" align="center" >
                  <el-table-column label="相关方" prop="stakeholder" align="center" width="150">
                    <template  #default="{row,$index}">
                      <el-form-item :prop="'expectContents.' + '[' + $index + ']' + '.stakeholder'" :rules="state.rules.stakeholder">
                        <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" v-model="row.stakeholder" placeholder="请输入"></el-input>
                        <el-input style="margin-top: 10px" :disabled="title === '查看'" :rows="4" type="textarea" v-model="row.stakeholder" placeholder="请输入"></el-input>
                      </el-form-item>
                    </template>
                  </el-table-column>
                  <el-table-column label="期望或要求" prop="expectation" align="center" >
                  <el-table-column label="期望或要求" prop="expectation" align="center" width="150">
                    <template #default="{row,$index}">
                      <div v-for="(i,index) in row.expectContentMesses" :key="index">
                        <el-form-item :prop="'expectContents.' + '[' + $index + '].' +'expectContentMesses.' + '[' + index + ']' + '.expectation'" :rules="state.rules.expectation">
                          <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" v-model="i.expectation" placeholder="请输入"></el-input>
                          <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" :rows="4" v-model="i.expectation" placeholder="请输入"></el-input>
                        </el-form-item>
                      </div>
                    </template>
                  </el-table-column>
                  <el-table-column label="应对措施" prop="solutions" align="center" >
                  <el-table-column label="应对措施" prop="solutions" align="center" width="150">
                    <template #default="{row,$index}">
                      <div v-for="(i,index) in row.expectContentMesses" :key="index">
                        <el-form-item :prop="'expectContents.' + '[' + $index + '].' +'expectContentMesses.' + '[' + index + ']' + '.solutions'" :rules="state.rules.solutions">
                          <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" v-model="i.solutions" placeholder="请输入"></el-input>
                          <el-input style="margin-top: 10px" :disabled="title === '查看'" type="textarea" :rows="4" v-model="i.solutions" placeholder="请输入"></el-input>
                        </el-form-item>
                      </div>
                    </template>
                  </el-table-column>
                  <el-table-column label="操作" align="center" width="120" v-if="title !== '查看'" >
                  <el-table-column label="操作" align="center"  v-if="title !== '查看'" >
                    <template #default="scope">
                      <el-button link type="primary"  @click="addObject(scope.row,scope.$index)" >添加</el-button>
                      <el-button link type="danger"  @click="delObject(scope.row,scope.$index)" >删除</el-button>
@@ -267,6 +267,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));