jinlin
2023-12-13 ecb9ece90cb766214e682f33d4c670b2d09b8ca3
web/src/views/modules/configItemChange/configItemList.vue
@@ -2,9 +2,11 @@
  <zt-dialog ref="dialog" column="2" title="选择配置项" :hasConfirm="true" @confirm="formSubmit" :append-to-body="true">
    <el-card shadow="never" class="aui-card--fill">
      <div class="mod-project-project}">
        <zt-table-wraper ref="tableObj" v-slot="{ table }">
        <zt-table-wraper :dataForm="dataForm" ref="tableObj" v-slot="{ table }" query-url="/configItemChange/ConfigItemChange/getItemList"
        @dataLoaded="dataLoaded"
        >
          <el-table
                    :data="dataList"
                    :data="table.dataList"
                    height="100px"
                    @selection-change="changeRow"
                    v-adaptive="{bottomOffset:150}"
@@ -17,7 +19,7 @@
            </el-table-column>
            <el-table-column prop="itemName" width="200" label="配置项名称">
            </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="配置项标识">
            </el-table-column>
            <el-table-column prop="version" align="center" width="120" label="版本">
            </el-table-column>
@@ -42,15 +44,18 @@
  data() {
    return {
      pageCode:'',
      dataList:[],
      dataForm: {
        checkBoxList:[],
        ids:null,
        projectId:'',
        configChangeList:[],
      }
    }
  },
  methods: {
    init(list) {
      this.dataList= list
    init(projectId,ids) {
      this.dataForm.projectId = projectId
       this.dataForm.ids = ids
      console.log(this.dataForm,'this.dataForm.id')
      this.$nextTick(()=>{
        this.$refs.tableObj.query()
      })
@@ -58,12 +63,16 @@
    indexFormat(index) {
      return index += 1
    },
    dataLoaded(data){
      console.log(data,'data dataLoaded')
    },
    changeRow(selection){
      this.dataForm.checkBoxList = selection
      console.log(this.dataForm.checkBoxList,'this.dataForm.checkList 选中的列表数据')
      this.dataForm.configChangeList = selection
      console.log(this.dataForm.configChangeList,'this.dataForm.checkList 选中的列表数据')
    },
    async formSubmit(){
      let res = await this.$http.post('/configItemWarehouse/ConfigItemWarehouse/', this.dataForm)
      console.log(this.dataForm,'this.dataForm')
      this.$emit('getChangeItemList',this.dataForm)
      await this.$tip.success()
      this.$refs.dialog.close()
    }