沙世明
2023-03-09 99b667bdfd8d4fd4d56c2952510169d7f7be794c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { LightningElement } from 'lwc';
const columns = [
  {
    label: "操作",
    fieldName: "stepUrl",
    type: "url",
    typeAttributes: {
      label: {
        fieldName: "stepName"
      }
    }
  },
  {
    label: "日期",
    fieldName: "createdDate",
    type: "date",
    typeAttributes: {
      month: "numeric",
      day: "numeric",
      year: "numeric",
      hour: "numeric",
      minute: "numeric"
    }
  },
  { label: "状态", fieldName: "stepStatus" },
  { label: "被分配人", fieldName: "fenpei" },
  { label: "评论", fieldName: "pinglun" },
  { label: "整体状态", fieldName: "allStatus" }
];
const dataTable=[
  {
    url:'11',
    createdDate:'2021-02-02',
    stepStatus:'通过',
    fenpei:'张三',
    pinglun:'111',
    allStatus:'全部通过'
  }
];
export default class Spls extends LightningElement {
  get columns() {
    let tempColumns = columns;
    if(this.showComments){
      tempColumns.push({
        label: "Comments", fieldName: "comments" 
      });
    } 
 
    return tempColumns;
  }
 
    
}