jinlin
2023-12-08 02b942d804cfa1ea094256b914a08083288695ed
web/src/views/modules/configItemChange/ConfigItemChange-AddOrUpdate.vue
@@ -38,7 +38,7 @@
          <div class="el-border-left" style="width: calc(100% - 120px)">
            <div class="table-container">
              <el-table ref="tableConfigItemList" class="el-software el-margin-top-bot"
                        style="width: 99%;margin-left: 5px" border :data="dataForm.configItemList"
                        style="width: 99%;margin-left: 5px" border :data="dataForm.configChangeList"
                        stripe>
                <el-table-column prop="no" align="center" width="60" label="序号">
                  <template slot-scope="scope">
@@ -51,7 +51,7 @@
                    <span v-else>{{row.itemName}}</span>
                  </template>
                </el-table-column>
                <el-table-column prop="itemDentify" align="center" min-width="290" label="配置项标识">
                <el-table-column prop="itemIdentify" align="center" min-width="290" label="配置项标识">
                  <template v-slot="{ row }">
                    <el-input  v-if="showAddAndEdit" v-model="row.itemIdentify" placeholder="配置项标识"></el-input>
                    <span v-else>{{row.itemIdentify}}</span>
@@ -93,7 +93,7 @@
                  </template>
                </el-table-column>
              </el-table>
              <div v-if="showAddAndEdit" class="icon-container" @click="handleCommand">
              <div v-if="showAddAndEdit && !dataForm.disabled"  class="icon-container" @click="handleCommand">
                <!-- 放置固定的图标 -->
                 <i class="el-icon-plus"></i>
              </div>
@@ -284,12 +284,14 @@
        </div>
      </div>
      <add-or-update-check ref="addOrUpdate" @recall="setCheckId"/>
      <ConfigItemList ref="configItemList" @getChangeItemList="getChangeItemList"></ConfigItemList>
    </el-form>
  </zt-dialog>
</template>
<script>
  import AddOrUpdateCheck from '../testCheckOrder/TestCheckOrder-AddOrUpdate'
  import ConfigItemList from './configItemList.vue'
  export default {
    data() {
@@ -359,7 +361,8 @@
    },
    computed: {},
    components: {
      AddOrUpdateCheck
      AddOrUpdateCheck,
      ConfigItemList
    },
    methods: {
      indexFormat(index) {
@@ -395,11 +398,24 @@
      //   })
      // },
      handleCommand() {
        this.dataForm.configItemList.push({})
        this.$nextTick(() => {
          const tableBody = this.$refs.tableConfigItemList.$el.querySelector('.el-table__body-wrapper')
          tableBody.scrollTop = tableBody.scrollHeight;
        this.$nextTick(()=>{
          console.log(this.dataForm.projectId,'this.dataForm.projectId')
          let ids = '1733024946927554561,1733024946600398850'
          this.$refs.configItemList.$refs.dialog.init(this.dataForm.projectId,ids)
        })
        // this.dataForm.configItemList.push({})
        // this.$nextTick(() => {
        //   const tableBody = this.$refs.tableConfigItemList.$el.querySelector('.el-table__body-wrapper')
        //   tableBody.scrollTop = tableBody.scrollHeight;
        // })
      },
      getChangeItemList(data){
        console.log(data.configChangeList,'getChangeItemList(data)')
        if(data.configChangeList){
          this.dataForm.configChangeList=this.dataForm.configChangeList.concat(data.configChangeList)
        }
        console.log(this.dataForm.configChangeList,'this.dataForm.configChangeList')
      },
      openCheckOrderWin(row) {
        console.log(row, "openCheckOrderWin(row)")