
<template>
  <div>
    <basicLayout 
      ref="basicLayout" 
      formPath="projectChange/projectSet" 
      tableName="projectSetTable" 
      idName="sa_projectid" 
      :apiId="{query:20221021145702,del:20221021145602}"
      :options="options"
      @listCreate="list">
      <template v-slot:tbList="scope">
        <div v-if="scope.data.column.columnname == 'itemclass'">
        </div>
        <div v-else>
          {{scope.data.column.data[scope.data.column.columnname] || scope.data.column.columnname == 'operation' ? scope.data.column.data[[scope.data.column.columnname]] : '--'}}
        </div>
      </template>
      <template v-slot:tbOpreation="scope">
        <!-- <delete-btn 
          ref="del" 
          :id="scope.data.data.itemid" 
          @deleteCreate="$refs.del.param.content.deletereason='无'" 
          @deleteSuccess="$refs.basicLayout.listData()" 
          nameId="20221021145602" 
          nameKey="sa_project_itemsids" 
        ></delete-btn> -->
      </template>
    </basicLayout>
  </div>
</template>

<script>
export default {
  data () {
    return {
      options:[],
      productList:''
    }
  },
  provide () {
    return {
      productList:() => this.productList
    }
  },
  components:{},
  methods:{
    list (vm) {  
      vm.content.sa_projectid = this.$route.query.id
    },
    /* 获取可选择商品 */
    async getProductList () {
      let res = await this.$api.requested({
        "id": 20221021171802,
        "content": {
            "sa_projectid": this.$route.query.id,
            "pageNumber": 1,
            "pageSize": 9999999999,
            "where": {
                "condition": ""
            }
        },
      })
      this.productList = res.data
      console.log(this.productList);
      
    }
  },
  created() {
    this.getProductList()
  },
  mounted () {
  }
}

</script>
<style scoped>
/* /deep/.el-table__cell .cell {
  display: flex;
  justify-content: s;
} */
</style>