gaoshp
2024-10-27 2151a84932d1ceb9723f45923b223d147d3bb512
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
export default {
    methods: {
        addOptions(cols) {
            if (cols.filter(v => v.prop === 'paramChartType').length === 0) {
                cols.unshift(
                    {
                        label: "过程参数展示方式",
                        prop: "paramChartType",
                        isRequired: true,
                        isRequiredFn: row => {
                            return row.isProcessParam
                        },
                        type: 'option',
                        options: [{
                            label: '曲线图',
                            value: 'line'
                        }, {
                            label: '分布图',
                            value: 'distribute'
                        }],
                        disabledFn: row => {
                            console.log(row, '>>>>>>>')
                            if (row.dpCategory !== "Other") {
                                return true
                            } else {
                                return false
                            }
                        }
                    }
                )
            }
            if (cols.filter(v => v.prop === 'isProcessParam').length === 0) {
                cols.unshift(
                    {
                        label: "过程参数",
                        prop: "isProcessParam",
                        isRequired: true,
                        type: 'boolean',
                    }
                )
            }
            if (cols.filter(v => v.prop === 'dpLabel').length === 0) {
                cols.unshift(
                    {
                        label: "显示名称",
                        prop: "dpLabel",
                        isRequired: true,
                    }
                )
            }
            if (cols.filter(v => v.prop === 'dpCategory').length === 0) {
                cols.unshift(
                    {
                        label: "点位分类",
                        prop: "dpCategory",
                        isRequired: true,
                        type: 'option',
                        options: [{
                            label: '程序名',
                            value: 'ProgName'
                        }, {
                            label: '程序内容',
                            value: 'ProgContent'
                        }, {
                            label: '刀具号',
                            value: 'ToolNo'
                        }, {
                            label: '状态',
                            value: 'DeviceStatus'
                        }, {
                            label: '产量',
                            value: 'Output'
                        }, {
                            label: '告警',
                            value: 'Alarm'
                        }, {
                            label: '其他',
                            value: 'Other'
                        }]
                    }
                )
            }
        },
    }
}