tangning 4 mēneši atpakaļ
vecāks
revīzija
73dd2b4dfb
1 mainītis faili ar 19 papildinājumiem un 1 dzēšanām
  1. 19 1
      src/views/productOperation/data.ts

+ 19 - 1
src/views/productOperation/data.ts

@@ -335,8 +335,12 @@ export const getviewColumns = () => {
   ];
 };
 export const getColumns = (val) => {
-  const isobj = val == 6 || val == 57;
+  const isobj = val == 6 || val == 8 || val == 57;
+  // 判断val的值,用于确定某些列是否显示
+  const isobj = val == 6 || val == 8 || val == 57;
+
   return [
+    // 场景标题列
     {
       title: '场景标题',
       ellipsis: true,
@@ -344,18 +348,21 @@ export const getColumns = (val) => {
       slots: { customRender: 'href' },
       width: 150,
     },
+    // 场景码列
     {
       title: '场景码',
       dataIndex: 'num',
       ellipsis: true,
       width: 180,
     },
+    // 拍摄时间列
     {
       title: '拍摄时间',
       dataIndex: 'createTime',
       sorter: true,
       width: 180,
       customRender: ({ record }) => {
+        // 自定义渲染拍摄时间
         return (
           record.createTime &&
           h(Time, {
@@ -365,11 +372,13 @@ export const getColumns = (val) => {
         );
       },
     },
+    // 计算完成时间列
     {
       title: '计算完成时间',
       dataIndex: 'amount',
       width: 180,
       customRender: ({ record }) => {
+        // 自定义渲染计算完成时间
         return (
           (record.algorithmTime &&
             h(Time, {
@@ -380,29 +389,35 @@ export const getColumns = (val) => {
         );
       },
     },
+    // 计算时长列
     {
       title: '计算时长(分钟)',
       dataIndex: 'computeTime',
       width: 120,
       customRender: ({ record }) => {
+        // 自定义渲染计算时长
         return (record.computeTime && Math.round(record.computeTime / 60)) || '-';
       },
     },
+    // 场景类型列
     {
       title: '场景类型',
       dataIndex: 'location',
       ifShow: isobj,
       width: 120,
       customRender: ({ record }) => {
+        // 自定义渲染场景类型
         return record.location == 5 || record.location == 6 ? 'Slam' : '架站式';
       },
     },
+    // SN码列
     {
       title: 'SN码',
       dataIndex: 'snCode',
       ifShow: val != 57 && val != 58,
       width: 180,
     },
+    // obj生成状态列
     {
       title: 'obj生成状态',
       dataIndex: 'isObj',
@@ -410,14 +425,17 @@ export const getColumns = (val) => {
       ifShow: isobj || val == 2,
       width: 180,
       customRender: ({ record }) => {
+        // 自定义渲染obj生成状态
         return record.isObj == 0 ? '未生成' : record.isObj == 1 ? '已生成' : '计算中';
       },
     },
+    // 点位数量列
     {
       title: '点位数量',
       dataIndex: 'shootCount',
       width: 80,
     },
+    // 场景大小列
     {
       title: '场景大小',
       dataIndex: 'sceneSize',