<!-- 点检判定 -->
<template>
  <div class="mainContentBox">
    <avue-crud
      ref="crudRef2"
      :data="tableData"
      :option="option"
    />
  </div>
</template>
<script setup>
import { useDictionaryStore} from "@/store";
import {processBrazePage} from '@/api/braze'
const tableData = ref([])
const { dicts } = useDictionaryStore();
const option =  {
  addBtn: false,
  selection: false,
  viewBtn: false,
  editBtn: false,
  delBtn: false,
  menu: false,
  column: [
  {
      label: "工序名称",
      prop: "operationName",
    },
    {
      label: "钎焊编码",
      prop: "brazeCode",
    },
    {
      label: "钎焊名称",
      prop: "brazeName",
    },
    {
      label: "起始端",
      prop: "lineStart",
    },
    {
      label: "结束端",
      prop: "lineEnd",
    },
    {
      label: "线径",
      prop: "wireDiameter",
      hide: true,
    },
    {
      label: "长度",
      prop: "length",
      hide: true,
    },
    {
      label: "操作人",
      prop: "updator",
      type: "select",
      dicData: dicts.user_name_list,
      props: {"label": "dictLabel","value":"dictValue"},
    },
    {
      label: "操作时间",
      prop: "updated",
    }
  ],
};
const refreshTra = (row) => {
  const data = {
    seqNo: row.seqNo,
    workOrderCode: row.workOrderCode,
  }
  dataList(data)
};
defineExpose({ refreshTra });

const dataList = (data) => {
  processBrazePage(data).then(res => {
    tableData.value = res.data.records
  })
}
</script>
