<script setup lang="ts">
import {ref} from 'vue'
import {post} from '@/utils/request'

const props=defineProps({
  dataList: {
    type: Array,
    default: []
  },
  search: {
    type: String,
    default: ''
  }
})
const emit = defineEmits(['selected'])
const handleSelectionChange = (val: any) => {
  emit('selected', val)
}
</script>

<template>
  <el-table :data="props.dataList" style="width: 100%">
    <el-table-column prop="itemSocialCode" label="医保码编码" width="200"
                     :show-overflow-tooltip="true"></el-table-column>
    <el-table-column prop="name" label="项目名称"></el-table-column>
    <el-table-column prop="unit" label="单位"></el-table-column>
    <el-table-column prop="purchaseUnitPrice" label="原价"></el-table-column>
    <el-table-column prop="unitPrice" label="售价"></el-table-column>
    <el-table-column label="操作" >
      <template #default="scope">
        <el-button type="danger" @click="handleSelectionChange(scope.row)">删除</el-button>
      </template>
    </el-table-column>
  </el-table>
</template>

<style scoped lang="scss">

</style>