Blame view

web/WebMvc/wwwroot/productjs/configure/ProjectOverview.js 27.7 KB
赖素文 authored
1
 let action = null;
2
3
4
layui.config({
    base: "/js/",
    version: 1
5
}).use(['system', "vue"], function () {
6
7
8
9
10
11
12
13
14
15
16
    var form = layui.form,
        $ = layui.jquery,
        element = layui.element,
        table = layui.table,
        system = layui.system,
        sysU = new system.u(),
        sendDataWhere = null,
        sendDataDescWhere = null,
        areaName = "configure",
        controllerName = "BaseProject",
        projectKeys = null,
17
        projectName = "",
赖素文 authored
18
19
        projectCode = "",
        sysEqAllSumObj = null,
20
        intervalTime = null,
21
        vueApp = null,
22
23
24
25
26
27
28
29
        app = null;

    action = {

    }

    app = {
        data: {
30
31
32
33
34
35
            cols: [[
                { field: "zizeng", width: 80, title: "序号", fixed: "left", type: "numbers" },
                {
                    field: "equipmentName", width: 220, title: "设备"
                },
                {
赖素文 authored
36
                    field: "Status", width: 150, title: "ip地址(5min无数据)", templet: function (d) {
37
                        //if (d.Status == "" || d.Status == null) return "";
38
39
                        var bg = "layui-badge-dot layui-bg-green",
                            statusText = "在线";
40
                        if (d.Status == "Failure" || d.Status == "Error") {
41
42
43
                            statusText = "故障";
                            bg = "layui-badge-dot layui-bg-red";
                        }
44
                        if (d.seconds > 300 || d.seconds == -1) {
45
46
47
48
49
50
51
                            statusText = "离线";
                            bg = "layui-badge-dot layui-bg-gray";
                        }
                        return `<span class="${bg}" style=" left: 7px;"></span> <span style="padding-left: 8px;">${statusText}</span`;
                    }
                }
            ]],
赖素文 authored
52
53
54
55
56
57

            colsFailure: [[
                { field: "zizeng", width: 80, title: "序号", fixed: "left", type: "numbers" },
                { field: "equipmentName", width: 220, title: "设备" },
                { field: "alarmMessage", width: 300, title: "报警信息" },
                { field: "createTime", width: 150, title: "开始时间" },
58
59
60
61
                { field: "updateTime", width: 150, title: "结束时间" },
                {
                    field: "errorduration", width: 200, title: "故障时间(分)", templet: function (d) {
                        var minutes = Math.floor(d.errorduration / 60); // 获取整数分钟
62
                        var remainingSeconds = Math.floor(d.errorduration % 60); // 获取剩余的秒数
63
64
65
                        return minutes + "分钟" + remainingSeconds + "秒";
                    }
                },
66
赖素文 authored
67
            ]],
赖素文 authored
68
            colsProper: [[
69
70
71
72
73
74
75
76
77
                { field: "index", width: 70, title: "序号", fixed: "left" },
                { field: "EquipmentName", width: 180, title: "设备名称" }
                //{
                //    field: "remark", width: 200, title: "故障时间-总时间(分)",
                //    templet: function (d) {

                //        return `${d.ErrorDuration}--${d.SumDuration}`; // 返回原始字符串
                //    }
                //}
赖素文 authored
78
79
80
81
            ]],
            colsOee: [[
                { field: "zizeng", width: 80, title: "序号", fixed: "left", type: "numbers" },
                { field: "EquipmentCode", width: 220, title: "设备编码" },
82
                { field: "EquipmentName", width: 180, title: "设备名称" },
赖素文 authored
83
                { field: "Date", width: 120, title: "时间" },
84
85
86
87
88
89
90
91
92
93
94
95
96
                { field: "Oee", width: 150, title: "Oee" },
                {
                    field: "remark", width: 200, title: "运行-空闲-故障时间(分钟)",
                    templet: function (d) {
                        var run = d.RunningDuration;
                        if (run == 0) run = 0;
                        var free = d.FreeDuration;
                        if (free == 0) free = 0;
                        var error = d.ErrorDuration;
                        if (error == 0) error = 0;
                        return `${run}--${free}--${error}`; 
                    }
                }
赖素文 authored
97
98
99
100
            ]],
            colsMttr: [[
                { field: "zizeng", width: 80, title: "序号", fixed: "left", type: "numbers" },
                { field: "EquipmentCode", width: 220, title: "设备编码" },
101
                { field: "EquipmentName", width: 180, title: "设备名称" },
赖素文 authored
102
                { field: "Date", width: 120, title: "时间" },
103
104
105
106
107
108
109
110
111
                { field: "Mttr", width: 150, title: "Mttr(单位H)" },
                {
                    field: "remark", width: 200, title: "故障时间(H)-故障次数",
                    templet: function (d) {
                        var temp = (d.ErrorDuration / 60).toFixed(2);
                        if (temp == 0) temp = 0;
                        return `${temp}--${d.ErrorCount}`; 
                    }
                }
赖素文 authored
112
113
114
115
116
            ]],

            colsMtbf: [[
                { field: "zizeng", width: 80, title: "序号", fixed: "left", type: "numbers" },
                { field: "EquipmentCode", width: 220, title: "设备编码" },
117
                { field: "EquipmentName", width: 180, title: "设备名称" },
赖素文 authored
118
                { field: "Date", width: 120, title: "时间" },
119
120
121
122
123
124
125
126
127
128
129
                { field: "Mtbf", width: 150, title: "Mtbf(单位H)" },
                {
                    field: "remark", width: 200, title: "运行(H)-空闲时间(H)-故障次数",
                    templet: function (d) {
                        var run = (d.RunningDuration / 60).toFixed(2);
                        if (run == 0) run = 0;
                        var free = (d.FreeDuration / 60).toFixed(2);
                        if (free == 0) free = 0;
                        return `${run}--${free}--${d.ErrorCount}`; 
                    }
                }
赖素文 authored
130
131
            ]],
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
            colsAlarm: [[
                { field: "zizeng", width: 80, title: "序号", fixed: "left", type: "numbers" },
                { field: "equipmentCode", width: 200, title: "设备编号", hide: true, },
                { field: "equipmentName", width: 150, title: "设备名称" },
                {
                    field: "alarmMessage", width: 400, title: "报警信息" ,templet: function (d) {
                        return d.alarmMessage + " " + d.remark;
                    }
                },

                {
                    field: "errorduration", width: 150, title: "报警持续时间", templet: function (d) {
                        return app.methods.convertSecondsToTime(d.errorduration)
                    }
                },
                { field: "createTime", width: 150, title: "创建时间" }
            ]],
149
150
            tableIns: null,
            tableElem: "mainList",
151
            refreshDataTimeEle: document.getElementById('refreshDataTime'),
152
153
154
            echartOpt: {
                eqTuoShanRateEle: document.getElementById("eqTuoShanRate"),
                eqAlarmsNumberEle: document.getElementById("eqAlarmsNumber"),
155
                eqPowerOnTimeEle: document.getElementById("eqPowerOnTime"),
156
                tuoShanRatelegendData: "".GetTimeRange("","",6)
157
            }
158
159
        },
        methods: {
160
            //设备在线状况 表格
161
162
            initTable: function (opt) {
                var config = { projectKeys: projectKeys }
王硕 authored
163
164
165
166
                if (opt != undefined) $.extend(config, opt);
                let options = {
                    elem: "#" + app.data.tableElem,
167
                    url: `/configure/BaseProject/GetEqInfoByProjectKeys`,
168
169
170
171
172
173
174
175
                    cols: app.data.cols,
                    height: 'full-400', // 最大高度减去其他容器已占有的高度差
                    where: config,
                    page: false
                }
                app.data.tableIns = sysU.initTable(options);
            },
176
            //每台设备妥善率 曲线图
王硕 authored
177
            initEchartsTuoShanRate: function (failureTime) {
赖素文 authored
178
                let legendDataTemp = failureTime.uniqueFunc("EquipmentName")
王硕 authored
179
                let legendData = []
180
王硕 authored
181
182
                window.eqTuoShanRateOpt.xAxis[0].data = app.data.echartOpt.tuoShanRatelegendData
                window.eqTuoShanRateOpt.series = [];
王硕 authored
183
                for (let i = 0; i < legendDataTemp.length; i++) {
赖素文 authored
184
                    legendData.push(legendDataTemp[i].EquipmentName)
王硕 authored
185
王硕 authored
186
                    var seriesItem = {
赖素文 authored
187
                        name: legendDataTemp[i].EquipmentName,
王硕 authored
188
189
190
191
192
                        type: 'line',
                        data: []
                    };
                    for (let j = 0; j < app.data.echartOpt.tuoShanRatelegendData.length; j++) {
                        const timeVal = app.data.echartOpt.tuoShanRatelegendData[j];
193
                        const result = failureTime.GetArrValueRows({ key: 'Date', val: timeVal }, {
赖素文 authored
194
                            key: 'EquipmentName', val: seriesItem.name
195
                        });
196
王硕 authored
197
                        let data = 0;
198
                        if (result.length == 1) {
赖素文 authored
199
                            data = result[0].Proper.replace("%", "")
200
201
                        } else {
                            //console.log(`ProjectOverview 文件 GetArrValueRows 读取到:${result.length}条数据`)
王硕 authored
202
                        }
赖素文 authored
203
                        seriesItem.data.push(data);
王硕 authored
204
205
206
                    }
                    window.eqTuoShanRateOpt.series.push(seriesItem)
                }
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
                //新增默认 目标值
                legendData.push("目标值")
                window.eqTuoShanRateOpt.series.push({
                    name: "目标值",
                    symbolSize: 10, //小圆点的大小
                    color: 'red',
                    type: 'line',
                    data: ["99", "99", "99", "99", "99", "99", "99", "99"],
                    lineStyle: {
                        normal: {
                            width: 3,
                            type: 'dashed',
                        },
                    },
                    itemStyle: {
                        normal: {
                            lineStyle: {
                                width: 4, //线条宽度
                            },
                        },
                    },
                });
王硕 authored
229
                window.eqTuoShanRateOpt.legend.data = legendData
王硕 authored
230
                let myChart = echarts.init(app.data.echartOpt.eqTuoShanRateEle)
231
232
233
234
235
                myChart.clear()
                myChart.setOption(window.eqTuoShanRateOpt)
            },
236
            //设备开机时间
赖素文 authored
237
238
            //设备开机时间
            initEchartsPowerOnTime: function (PowerOnTimeData) {
239
                var opt = "".copyObj2(window.eqPowerOnTimeOpt)
赖素文 authored
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
                opt.legend.data = []
                opt.series = [];
                const legendData = [...new Set(PowerOnTimeData.map(x => x.EquipmentName))];
                opt.legend.data = legendData
                const deviceData = PowerOnTimeData.reduce((acc, curr) => {
                    const { EquipmentName, PowerOnTime } = curr;
                    if (!acc[EquipmentName]) {
                        acc[EquipmentName] = {
                            name: EquipmentName,
                            type: 'line',
                            data: []
                        };
                    }
                    acc[EquipmentName].data.push(PowerOnTime);
                    return acc;
                }, {});

                for (const key in deviceData) {
                    opt.series.push(deviceData[key]);
                }
                opt.xAxis[0].data = app.data.echartOpt.tuoShanRatelegendData
262
263
264
265
266
267
268
                let myChart = echarts.init(app.data.echartOpt.eqPowerOnTimeEle)

                myChart.clear()
                myChart.setOption(opt)
            },

            //故障次数 柱状图
269
            initEchartsAlarmsNumber: function (failureCount) {             
王硕 authored
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
                var xaxisdata = [];
                var faultFrequency = []
                let totalCount = 0;

                // 计算所有 x.count 的总和 
                failureCount.forEach(x => {
                    totalCount += x.count;
                });
                const relativeCount = []
                failureCount.forEach(x => {
                    let totalCountNum = (x.count / totalCount) * 100
                    relativeCount.push(totalCountNum.toFixed(2))
                    xaxisdata.push(x.equipmentName)
                    faultFrequency.push(x.count)
                })
                if (failureCount.length <= 15) {
                    window.eqAlarmsNumber.dataZoom[0].end = 99
                } else {
                    window.eqAlarmsNumber.dataZoom[0].end = 20
                }
                window.eqAlarmsNumber.xAxis[0].data =[]
                window.eqAlarmsNumber.xAxis[0].data = xaxisdata;
                window.eqAlarmsNumber.series[0].data = faultFrequency;
                window.eqAlarmsNumber.series[1].data = relativeCount;
295
296
297
                let myChart = echarts.init(app.data.echartOpt.eqAlarmsNumberEle)
                myChart.clear()
                myChart.setOption(window.eqAlarmsNumber)
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
                myChart.off('click');
                myChart.on("click", params => {
                    var equipmentCode = failureCount[params.dataIndex].equipmentCode;
                    var createTime = app.data.echartOpt.tuoShanRatelegendData[0] + " 00:00:01";
                    var updateTime = app.data.echartOpt.tuoShanRatelegendData[app.data.echartOpt.tuoShanRatelegendData.length - 1] + " 23:59:59";
                    var ajaxConfig = {
                        data: {
                            equipmentCode: equipmentCode,
                            createTime: createTime,
                            updateTime: updateTime,
                        },
                        url: `/equipment/DaqEquipmentAlarmRecord/LoadDesc`,
                        type: "post",
                        success: function (result) {
                            if (sysU.successBefore(result)) return false;

                            sysU.openPage({
                                title: `故障详情【${result.Count}条】`,
                                area: ["1100px", "590px"],
                                type: 1,
                                btn: ['关闭'],
                                content: $('#eleAlarm'),
                                successCallBackFn: function () {
                                    let options = {
                                        elem: "#tableAlarm",
                                        cols: app.data.colsAlarm,
                                        height: 'full-110', 
                                        data: result.Result,
                                        page: false,
                                        limit: Number.MAX_VALUE,
                                    }
                                    sysU.initTable(options);
                                }
                            });
                        }
                    };
                    sysU.ajax(ajaxConfig);
                });
336
            },
337
338
            //设备故障超40分钟
赖素文 authored
339
340
341
342
343
344
345
346
347
348
349
            initTableFailure40: function (failureOverFourty) {
                let options = {
                    elem: "#mainAlarms" ,
                    cols: app.data.colsFailure,
                    data: failureOverFourty,
                    height: 'full-400', // 最大高度减去其他容器已占有的高度差
                    page: false
                }
                app.data.tableIns = sysU.initTable(options);
            },
350
            refreshDataMethod: function () {
351
352
                let currenttime = parseInt(app.data.refreshDataTimeEle.innerHTML);
                if (currenttime === 0) {
353
                    currenttime = vueApp.refreshDataTime;
354
355
356
357
358
359
360
361
                    app.methods.getEquipmentDataList();
                    app.methods.getEqEchartsDataList();
                } else {
                    currenttime--;
                }
                app.data.refreshDataTimeEle.innerHTML = currenttime;
            },
赖素文 authored
362
363
364
365
366
367
368
            /**
              * 初始化vue
              */
            initVue: function () {
                vueApp = new Vue({
                    el: '.vueApp',
                    data: {
赖素文 authored
369
                        refreshDataTime: 40,
赖素文 authored
370
371
                        head: {
                            projectName: 0
372
373
374
                        },
                        body: {
                            eqCount: 0,
375
                            eqRunCount: 0,
376
                            eqStandBy: 0,
HuXiYu authored
377
                            eqOffline: 0,
赖素文 authored
378
                            eqError: 0,
379
赖素文 authored
380
                            eqOnlineRate: 0,
381
                        },
赖素文 authored
382
383
384
385
386
387
                        eqSumObj: {
                            oee: 0,
                            mttr: 0,
                            mtbf: 0,
                            proper:0
                        }
赖素文 authored
388
389
390
391
                    },
                    methods: {

                    },
392
                    ready: function () {
HuXiYu authored
393
                        this.head.projectName = `${projectName}`;
394
                    }
赖素文 authored
395
396
397
                });
            },
            /**
398
              * vue 集合赋值 result.Result.eqCount
赖素文 authored
399
              */
400
            initVueDataValue: function (result) {
401
402
                var res = result.Result;
                vueApp.body.eqCount = res.eqSumCount;
403
                vueApp.body.eqRunCount = res.eqRunCount;
HuXiYu authored
404
                vueApp.body.eqStandBy = res.eqStandByCount;
405
406
407
                vueApp.body.eqError = res.eqErrorCount;
                vueApp.body.eqOffline = res.eqOffLineCount;
HuXiYu authored
408
                vueApp.body.eqOnlineRate = res.runningRate;
409
410
411
            },

            getUrlParam: function () {
412
413
                projectKeys = localStorage.getItem("projectMapKeys");
                projectName = localStorage.getItem("projectMapName");
414
                projectCode = localStorage.getItem("projectCode");
415
            },
416
417
418
419
420
421
422
423
424
425
426
427

            getEquipmentDataList() {
                var ajaxConfig = {
                    data: { pageRequest: null, entity: { flag: "projectMapList", keys: projectKeys } },
                    url: `/configure/BaseProject/LoadProjectOverview`,
                    success: function (result) {
                        if (sysU.successBefore(result)) return false;
                        app.methods.initVueDataValue(result);
                    }
                };
                sysU.ajax(ajaxConfig);
            },
王硕 authored
428
            //妥善率/故障次数/设备故 障统一数据请求接口
王硕 authored
429
430
431
432
433
434
            getEqEchartsDataList() {
                var ajaxConfig = {
                    data: { projectKeys: projectKeys },
                    url: `/configure/BaseProject/GetFailureList`,
                    success: function (result) {
                        if (sysU.successBefore(result)) return false;
王硕 authored
435
                        app.methods.initEchartsAlarmsNumber(result.Result.failureCount);
赖素文 authored
436
                        app.methods.initTableFailure40(result.Result.failureOverFourty);                  
王硕 authored
437
438
439
440
                    }
                };
                sysU.ajax(ajaxConfig);
            },
赖素文 authored
441
442

            //OEE、MTTR、MTBF、妥善率 请求数据接口
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
            getEquipmentsExtendIndexData() {
                var endDay = new Date();
                var startDay = new Date(endDay.getTime() - (6 * 24 * 60 * 60 * 1000)); // 6天前
                var ajaxConfig = {
                    data: {
                        projectName: projectName,
                        argument: projectCode,
                        tag: 2,
                        startDay: startDay.format("yyyy-MM-dd"),
                        endDay: endDay.format("yyyy-MM-dd"),
                    },
                    url: `/api/BusEquipmentData/GetEquipmentsExtendIndexData`,
                    type: "get",
                    success: function (result) {
                        if (sysU.successBefore(result)) return false;
                        vueApp.eqSumObj.oee = result.Result.sumDt.Oee;
                        vueApp.eqSumObj.mttr = result.Result.sumDt.Mttr;
                        vueApp.eqSumObj.mtbf = result.Result.sumDt.Mtbf;
                        vueApp.eqSumObj.proper = result.Result.sumDt.Proper;

                        sysEqAllSumObj = result.Result.detailDt;
                    }
                };
                sysU.ajax(ajaxConfig);
            },
赖素文 authored
469
470
            //设备开机时间接口
            getEqEchartsPowerOnTimeDataList() {
赖素文 authored
471
                var ajaxConfig = {
赖素文 authored
472
473
                    data: { projectKeys: projectKeys },
                    url: `/configure/BaseProject/GetEqPowerOnTime`,
赖素文 authored
474
475
                    success: function (result) {
                        if (sysU.successBefore(result)) return false;
赖素文 authored
476
477
                        //设备开机时间
                        app.methods.initEchartsPowerOnTime(result.Result);
赖素文 authored
478
479
480
481
                    }
                };
                sysU.ajax(ajaxConfig);
            },
482
483
484
485
486

            convertSecondsToTime: function (seconds) {
                if (typeof seconds !== 'number') return seconds;
                var hours = Math.floor(seconds / 3600);
                var minutes = Math.floor((seconds % 3600) / 60);
487
                var remainingSeconds = Math.floor(seconds % 60);
488
489
490
491
492
493
494
495
496
497
498
499

                var result = '';
                if (hours > 0) {
                    result += hours + '小时';
                }
                if (minutes > 0) {
                    result += minutes + '分';
                }
                result += remainingSeconds + '秒';
                return result;
            },
500
501
502
            init: function () {
                var tempElem = $(".sys-a-det");
                tempElem.attr("href", tempElem.data("scr") + `?projectKeys=${projectKeys}`)
503
504

                app.methods.getEquipmentDataList();
王硕 authored
505
                app.methods.getEqEchartsDataList();
赖素文 authored
506
                app.methods.getEquipmentsExtendIndexData(); 
赖素文 authored
507
                app.methods.getEqEchartsPowerOnTimeDataList();
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
                intervalTime = setInterval(app.methods.refreshDataMethod, 1000);

                //
                for (var i = 0; i < app.data.echartOpt.tuoShanRatelegendData.length; i++) {
                    app.data.colsProper[0].push({ field: "date" + i, width: 100, title: app.data.echartOpt.tuoShanRatelegendData[i] });
                }
            },

            //dataSources 数据源,dateList:日期列表,comparisonKeys 返回的列表的key
            oeeAndMttrAndMTBFDataHandle: function (dataSources, dateList, comparisonKeys) {
                var resultData = []
                const uniqueEqName = dataSources.uniqueFunc('EquipmentName');
                let index = 0
                var nowVal = "";
                for (let i = 0; i < uniqueEqName.length; i++) {
                    nowVal = "";
                    index = 0
                    var defaultCol = { index: i + 1, EquipmentName: uniqueEqName[i].EquipmentName }
                    dateList.forEach((item) => {
                        for (let xp = 0; xp < dataSources.length; xp++) {
                            if (uniqueEqName[i].EquipmentName == dataSources[xp].EquipmentName && dataSources[xp].Date == item) {
                                nowVal = dataSources[xp][comparisonKeys];
                                break
                            }
                        }
                        defaultCol['date' + index++] = nowVal;           
                    })
                    resultData.push(defaultCol)
                }
                return resultData;
538
            }
539
540
        },
        registerEvent: function () {
541
542
543
            $(".sys-a-det").click(function () {
                if (intervalTime != null) clearInterval(intervalTime)
            })
赖素文 authored
544
王硕 authored
545
546
            $('#clickToClickSuccessRate').click(function () {
                sysU.openPage({
赖素文 authored
547
                    title: "妥善率(近7天)总时间:堆垛机默认工作24小时,其他设备字典配置PowerOnTime",
548
                    area: ["1100px", "590px"],
赖素文 authored
549
                    type: 1,
王硕 authored
550
                    btn: ['关闭'],
赖素文 authored
551
552
553
                    content: $('#tuoshanlv'),
                    successCallBackFn: function () {
                        app.methods.initEchartsTuoShanRate(sysEqAllSumObj);
554
555
                        debugger
                        var data = app.methods.oeeAndMttrAndMTBFDataHandle(sysEqAllSumObj, app.data.echartOpt.tuoShanRatelegendData, "Proper");
赖素文 authored
556
557
558
                        let options = {
                            elem: "#tableProper",
                            cols: app.data.colsProper,
559
                            data: data,
560
                            height: 'full-410', // 最大高度减去其他容器已占有的高度差
赖素文 authored
561
562
563
564
                            page: false
                        }
                        sysU.initTable(options);
                    }
王硕 authored
565
566
                });
            });
赖素文 authored
567
王硕 authored
568
569
570
            $('#clickToClickMTTR').click(function () {
                sysU.openPage({
                    title: "MTTR",
571
                    area: ["1100px", "590px"],
王硕 authored
572
573
                    type: 1,
                    btn: ['关闭'],
赖素文 authored
574
575
                    content: $('#eleMTTR'),
                    successCallBackFn: function () {
576
                        var data = app.methods.oeeAndMttrAndMTBFDataHandle(sysEqAllSumObj, app.data.echartOpt.tuoShanRatelegendData, "Mttr");
赖素文 authored
577
578
                        let options = {
                            elem: "#tableMTTR",
579
580
                            cols: app.data.colsProper,
                            data: data,
581
                            height: 'full-110', // 最大高度减去其他容器已占有的高度差
赖素文 authored
582
583
584
585
                            page: false
                        }
                        sysU.initTable(options);
                    }
王硕 authored
586
587
                });
            });
赖素文 authored
588
王硕 authored
589
590
591
            $('#clickToClickMTBF').click(function () {
                sysU.openPage({
                    title: "MTBF",
592
                    area: ["1100px", "590px"],
赖素文 authored
593
594
595
596
                    type: 1,
                    btn: ['关闭'],
                    content: $('#eleMTBF'),
                    successCallBackFn: function () {
597
                        var data = app.methods.oeeAndMttrAndMTBFDataHandle(sysEqAllSumObj, app.data.echartOpt.tuoShanRatelegendData, "Mtbf");
赖素文 authored
598
599
                        let options = {
                            elem: "#tableMTBF",
600
601
                            cols: app.data.colsProper,
                            data: data,
602
                            height: 'full-110', // 最大高度减去其他容器已占有的高度差
赖素文 authored
603
604
605
606
607
608
609
610
611
612
                            page: false
                        }
                        sysU.initTable(options);
                    }
                });
            });

            $('#clickToClickOEE').click(function () {
                sysU.openPage({
                    title: "OEE",
613
                    area: ["1100px", "590px"],
赖素文 authored
614
                    type: 1,
王硕 authored
615
                    btn: ['关闭'],
赖素文 authored
616
617
                    content: $('#eleOee'),
                    successCallBackFn: function () {
618
                        var data = app.methods.oeeAndMttrAndMTBFDataHandle(sysEqAllSumObj, app.data.echartOpt.tuoShanRatelegendData, "Oee");
赖素文 authored
619
620
                        let options = {
                            elem: "#tableOee",
621
622
                            cols: app.data.colsProper,
                            data: data,
623
                            height: 'full-110', // 最大高度减去其他容器已占有的高度差
赖素文 authored
624
625
626
627
                            page: false
                        }
                        sysU.initTable(options);
                    }
王硕 authored
628
629
630
                });
            });  
        },
631
632
        init: function () {
            app.methods.getUrlParam();
赖素文 authored
633
            app.registerEvent();  
赖素文 authored
634
            app.methods.initVue();
635
            app.methods.initTable();
王硕 authored
636
            app.methods.init();  
637
638
639
640
        }
    };
    app.init();
});