You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
1.8 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <t-table rowKey="id" :data="data" :columns="columns" bordered />
  3. </template>
  4. <script setup lang="jsx">
  5. import { computed, ref } from 'vue'
  6. import { useImageStore } from '@/store'
  7. import moment from 'moment'
  8. const imageStore = useImageStore()
  9. const data = computed(() => {
  10. const res = { ...imageStore.coreInfo }
  11. res.nuclearCoreName = imageStore.nuclearCoreName
  12. res.operatorName = imageStore.operatorName
  13. res.nuclearStationName = imageStore.nuclearStationName
  14. return [res]
  15. })
  16. const columns = ref([
  17. {
  18. colKey: 'operatorName',
  19. title: '操作员',
  20. width: 120,
  21. },
  22. {
  23. colKey: 'serialNumber',
  24. width: 120,
  25. title: '核查坐标',
  26. cell: (h, { row }) => (row.serialNumber ? row.serialNumber : '---'),
  27. },
  28. {
  29. colKey: 'firstSign',
  30. title: '坐标信息',
  31. width: 120,
  32. cell: (h, { row }) =>
  33. row.firstSign && row.secondSign ? (
  34. <div>
  35. <p>{row.firstSign?.substr(-4)}</p>
  36. <p>{row.secondSign?.substr(-4)}</p>
  37. </div>
  38. ) : (
  39. '---'
  40. ),
  41. },
  42. {
  43. colKey: 'result',
  44. title: '核对结果',
  45. cell: (h, { row }) => {
  46. if (row.result == 1) {
  47. return (
  48. <div>
  49. <p>{row.resultSerial}</p>
  50. <p>正确</p>
  51. </div>
  52. )
  53. } else if (row.result == 2) {
  54. return (
  55. <div>
  56. <p>{row.resultSerial}</p>
  57. <p>错误</p>
  58. </div>
  59. )
  60. } else {
  61. return '---'
  62. }
  63. },
  64. },
  65. {
  66. colKey: 'checkTime',
  67. title: '核对时间',
  68. cell: (h, { row }) =>
  69. row.checkTime ? moment(checkTime).format('YYYY-MM-DD HH:mm') : '---',
  70. },
  71. {
  72. colKey: 'nuclearStationName',
  73. title: '核电站名称',
  74. },
  75. {
  76. colKey: 'nuclearCoreName',
  77. title: '核反应堆名称',
  78. },
  79. ])
  80. </script>
  81. <style></style>