祖安之光
2025-11-18 e558f0ca4c9de7271861601076b2d8e48c513c59
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"
@@ -11,7 +11,7 @@
      <el-form :model="state.form" size="default" ref="busRef" :rules="state.rules"  label-position="right" label-width="130">
        <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"
@@ -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>
@@ -203,7 +203,7 @@
    id: '',
    companyId: null,
    deptId: null,
    year: '',
    year: '2025',
    fictionId: null,
    checkId: null,
    ratifyId: null,
@@ -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));
@@ -344,7 +345,7 @@
    id: '',
    companyId: null,
    deptId: null,
    year: '',
    year: '2025',
    fictionId: null,
    checkId: null,
    ratifyId: null,