xiongchao %!s(int64=3) %!d(string=hai) anos
pai
achega
1f14669612

+ 125 - 0
public/tui-calendar/checkJobCalendar.html

@@ -0,0 +1,125 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8">
+    <title>TOAST UI Calendar App DEMO</title>
+    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
+    <link rel="stylesheet" type="text/css" href="https://uicdn.toast.com/tui.time-picker/latest/tui-time-picker.css">
+    <link rel="stylesheet" type="text/css" href="https://uicdn.toast.com/tui.date-picker/latest/tui-date-picker.css">
+    <link rel="stylesheet" type="text/css" href="./dist/tui-calendar.css">
+    <link rel="stylesheet" type="text/css" href="./css/default.css">
+    <link rel="stylesheet" type="text/css" href="./css/icons.css">
+</head>
+<body>
+    <div id="top">
+        <a href="https://github.com/nhn/tui.calendar">
+            <img src="./images/img-bi.png" srcset="./images/img-bi@2x.png 2x,./images/img-bi@3x.png 3x">
+        </a>
+    </div>
+    <div id="lnb">
+        <div class="lnb-new-schedule">
+            <button id="btn-new-schedule" type="button" class="btn btn-default btn-block lnb-new-schedule-btn" data-toggle="modal">
+                任务状态</button>
+        </div>
+        <div id="lnb-calendars" class="lnb-calendars">
+            <div>
+                <div class="lnb-calendars-item">
+                    <label>
+                        <input class="tui-full-calendar-checkbox-square" type="checkbox" value="all" checked>
+                        <span></span>
+                        <strong>全部状态</strong>
+                    </label>
+                </div>
+            </div>
+            <div id="calendarList" class="lnb-calendars-d1">
+            </div>
+        </div>
+        <div class="lnb-footer">
+            © HITACHI.
+        </div>
+    </div>
+    <div id="right">
+        <div id="menu">
+            <span class="dropdown">
+                <button id="dropdownMenu-calendarType" class="btn btn-default btn-sm dropdown-toggle" type="button" data-toggle="dropdown"
+                    aria-haspopup="true" aria-expanded="true">
+                    <i id="calendarTypeIcon" class="calendar-icon ic_view_month" style="margin-right: 4px;"></i>
+                    <span id="calendarTypeName">Dropdown</span>&nbsp;
+                    <i class="calendar-icon tui-full-calendar-dropdown-arrow"></i>
+                </button>
+                <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu-calendarType">
+                    <li role="presentation">
+                        <a class="dropdown-menu-title" role="menuitem" data-action="toggle-daily">
+                            <i class="calendar-icon ic_view_day"></i>Daily
+                        </a>
+                    </li>
+                    <li role="presentation">
+                        <a class="dropdown-menu-title" role="menuitem" data-action="toggle-weekly">
+                            <i class="calendar-icon ic_view_week"></i>Weekly
+                        </a>
+                    </li>
+                    <li role="presentation">
+                        <a class="dropdown-menu-title" role="menuitem" data-action="toggle-monthly">
+                            <i class="calendar-icon ic_view_month"></i>Month
+                        </a>
+                    </li>
+                    <li role="presentation">
+                        <a class="dropdown-menu-title" role="menuitem" data-action="toggle-weeks2">
+                            <i class="calendar-icon ic_view_week"></i>2 weeks
+                        </a>
+                    </li>
+                    <li role="presentation">
+                        <a class="dropdown-menu-title" role="menuitem" data-action="toggle-weeks3">
+                            <i class="calendar-icon ic_view_week"></i>3 weeks
+                        </a>
+                    </li>
+                    <li role="presentation" class="dropdown-divider"></li>
+                    <li role="presentation">
+                        <a role="menuitem" data-action="toggle-workweek">
+                            <input type="checkbox" class="tui-full-calendar-checkbox-square" value="toggle-workweek" checked>
+                            <span class="checkbox-title"></span>Show weekends
+                        </a>
+                    </li>
+                    <li role="presentation">
+                        <a role="menuitem" data-action="toggle-start-day-1">
+                            <input type="checkbox" class="tui-full-calendar-checkbox-square" value="toggle-start-day-1">
+                            <span class="checkbox-title"></span>Start Week on Monday
+                        </a>
+                    </li>
+                    <li role="presentation">
+                        <a role="menuitem" data-action="toggle-narrow-weekend">
+                            <input type="checkbox" class="tui-full-calendar-checkbox-square" value="toggle-narrow-weekend">
+                            <span class="checkbox-title"></span>Narrower than weekdays
+                        </a>
+                    </li>
+                </ul>
+            </span>
+            <span id="menu-navi">
+                <button type="button" class="btn btn-default btn-sm move-today" data-action="move-today">Today</button>
+                <button type="button" class="btn btn-default btn-sm move-day" data-action="move-prev">
+                    <i class="calendar-icon ic-arrow-line-left" data-action="move-prev"></i>
+                </button>
+                <button type="button" class="btn btn-default btn-sm move-day" data-action="move-next">
+                    <i class="calendar-icon ic-arrow-line-right" data-action="move-next"></i>
+                </button>
+            </span>
+            <span id="renderRange" class="render-range"></span>
+        </div>
+        <div id="calendar"></div>
+    </div>
+
+    <script src="./js/jquery-3.1.1.min.js"></script>
+    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
+    <script src="https://uicdn.toast.com/tui.code-snippet/v1.5.2/tui-code-snippet.min.js"></script>
+    <script src="https://uicdn.toast.com/tui.time-picker/v2.0.3/tui-time-picker.min.js"></script>
+    <script src="https://uicdn.toast.com/tui.date-picker/v4.0.3/tui-date-picker.min.js"></script>
+    <script src='js/moment-2.20.1.min.js'></script>
+    <script src='js/chance-1.0.13.min.js'></script>
+    <script src="../base.js"></script>
+    <script src="./dist/tui-calendar.js"></script>
+    <script src="./js/data/calendars.js"></script>
+    <script src="./js/data/schedules.js"></script>
+    <script src="./js/theme/dooray.js"></script>
+    <script src="./js/app.js"></script>
+</body>
+</html>

+ 125 - 0
public/tui-calendar/checkJobCalendar2.html

@@ -0,0 +1,125 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8">
+    <title>TOAST UI Calendar App DEMO</title>
+    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
+    <link rel="stylesheet" type="text/css" href="https://uicdn.toast.com/tui.time-picker/latest/tui-time-picker.css">
+    <link rel="stylesheet" type="text/css" href="https://uicdn.toast.com/tui.date-picker/latest/tui-date-picker.css">
+    <link rel="stylesheet" type="text/css" href="./dist/tui-calendar.css">
+    <link rel="stylesheet" type="text/css" href="./css/default.css">
+    <link rel="stylesheet" type="text/css" href="./css/icons.css">
+</head>
+<body>
+    <div id="top">
+        <a href="https://github.com/nhn/tui.calendar">
+            <img src="./images/img-bi.png" srcset="./images/img-bi@2x.png 2x,./images/img-bi@3x.png 3x">
+        </a>
+    </div>
+    <div id="lnb">
+        <div class="lnb-new-schedule">
+            <button id="btn-new-schedule" type="button" class="btn btn-default btn-block lnb-new-schedule-btn" data-toggle="modal">
+                任务状态</button>
+        </div>
+        <div id="lnb-calendars" class="lnb-calendars">
+            <div>
+                <div class="lnb-calendars-item">
+                    <label>
+                        <input class="tui-full-calendar-checkbox-square" type="checkbox" value="all" checked>
+                        <span></span>
+                        <strong>全部状态</strong>
+                    </label>
+                </div>
+            </div>
+            <div id="calendarList" class="lnb-calendars-d1">
+            </div>
+        </div>
+        <div class="lnb-footer">
+            © HITACHI.
+        </div>
+    </div>
+    <div id="right">
+        <div id="menu">
+            <span class="dropdown">
+                <button id="dropdownMenu-calendarType" class="btn btn-default btn-sm dropdown-toggle" type="button" data-toggle="dropdown"
+                    aria-haspopup="true" aria-expanded="true">
+                    <i id="calendarTypeIcon" class="calendar-icon ic_view_month" style="margin-right: 4px;"></i>
+                    <span id="calendarTypeName">Dropdown</span>&nbsp;
+                    <i class="calendar-icon tui-full-calendar-dropdown-arrow"></i>
+                </button>
+                <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu-calendarType">
+                    <li role="presentation">
+                        <a class="dropdown-menu-title" role="menuitem" data-action="toggle-daily">
+                            <i class="calendar-icon ic_view_day"></i>Daily
+                        </a>
+                    </li>
+                    <li role="presentation">
+                        <a class="dropdown-menu-title" role="menuitem" data-action="toggle-weekly">
+                            <i class="calendar-icon ic_view_week"></i>Weekly
+                        </a>
+                    </li>
+                    <li role="presentation">
+                        <a class="dropdown-menu-title" role="menuitem" data-action="toggle-monthly">
+                            <i class="calendar-icon ic_view_month"></i>Month
+                        </a>
+                    </li>
+                    <li role="presentation">
+                        <a class="dropdown-menu-title" role="menuitem" data-action="toggle-weeks2">
+                            <i class="calendar-icon ic_view_week"></i>2 weeks
+                        </a>
+                    </li>
+                    <li role="presentation">
+                        <a class="dropdown-menu-title" role="menuitem" data-action="toggle-weeks3">
+                            <i class="calendar-icon ic_view_week"></i>3 weeks
+                        </a>
+                    </li>
+                    <li role="presentation" class="dropdown-divider"></li>
+                    <li role="presentation">
+                        <a role="menuitem" data-action="toggle-workweek">
+                            <input type="checkbox" class="tui-full-calendar-checkbox-square" value="toggle-workweek" checked>
+                            <span class="checkbox-title"></span>Show weekends
+                        </a>
+                    </li>
+                    <li role="presentation">
+                        <a role="menuitem" data-action="toggle-start-day-1">
+                            <input type="checkbox" class="tui-full-calendar-checkbox-square" value="toggle-start-day-1">
+                            <span class="checkbox-title"></span>Start Week on Monday
+                        </a>
+                    </li>
+                    <li role="presentation">
+                        <a role="menuitem" data-action="toggle-narrow-weekend">
+                            <input type="checkbox" class="tui-full-calendar-checkbox-square" value="toggle-narrow-weekend">
+                            <span class="checkbox-title"></span>Narrower than weekdays
+                        </a>
+                    </li>
+                </ul>
+            </span>
+            <span id="menu-navi">
+                <button type="button" class="btn btn-default btn-sm move-today" data-action="move-today">Today</button>
+                <button type="button" class="btn btn-default btn-sm move-day" data-action="move-prev">
+                    <i class="calendar-icon ic-arrow-line-left" data-action="move-prev"></i>
+                </button>
+                <button type="button" class="btn btn-default btn-sm move-day" data-action="move-next">
+                    <i class="calendar-icon ic-arrow-line-right" data-action="move-next"></i>
+                </button>
+            </span>
+            <span id="renderRange" class="render-range"></span>
+        </div>
+        <div id="calendar"></div>
+    </div>
+
+    <script src="./js/jquery-3.1.1.min.js"></script>
+    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
+    <script src="https://uicdn.toast.com/tui.code-snippet/v1.5.2/tui-code-snippet.min.js"></script>
+    <script src="https://uicdn.toast.com/tui.time-picker/v2.0.3/tui-time-picker.min.js"></script>
+    <script src="https://uicdn.toast.com/tui.date-picker/v4.0.3/tui-date-picker.min.js"></script>
+    <script src='js/moment-2.20.1.min.js'></script>
+    <script src='js/chance-1.0.13.min.js'></script>
+    <script src="../base.js"></script>
+    <script src="./dist/tui-calendar.js"></script>
+    <script src="./js/data/calendars2.js"></script>
+    <script src="./js/data/schedules2.js"></script>
+    <script src="./js/theme/dooray.js"></script>
+    <script src="./js/app.js"></script>
+</body>
+</html>

+ 0 - 82
public/tui-calendar/js/data/calendars.js

@@ -55,87 +55,5 @@ function hexToRGBA (hex) {
       calendar.borderColor = cList[i].borderColor
       addCalendar(calendar)
     }
-    /* var calendar
-    var id = 0
-
-    calendar = new CalendarInfo()
-    id += 1
-    calendar.id = String(id)
-    calendar.name = 'My Calendar'
-    calendar.color = '#ffffff'
-    calendar.bgColor = '#9e5fff'
-    calendar.dragBgColor = '#9e5fff'
-    calendar.borderColor = '#9e5fff'
-    addCalendar(calendar)
-
-    calendar = new CalendarInfo()
-    id += 1
-    calendar.id = String(id)
-    calendar.name = 'Company'
-    calendar.color = '#ffffff'
-    calendar.bgColor = '#00a9ff'
-    calendar.dragBgColor = '#00a9ff'
-    calendar.borderColor = '#00a9ff'
-    addCalendar(calendar)
-
-    calendar = new CalendarInfo()
-    id += 1
-    calendar.id = String(id)
-    calendar.name = 'Family'
-    calendar.color = '#ffffff'
-    calendar.bgColor = '#ff5583'
-    calendar.dragBgColor = '#ff5583'
-    calendar.borderColor = '#ff5583'
-    addCalendar(calendar)
-
-    calendar = new CalendarInfo()
-    id += 1
-    calendar.id = String(id)
-    calendar.name = 'Friend'
-    calendar.color = '#ffffff'
-    calendar.bgColor = '#03bd9e'
-    calendar.dragBgColor = '#03bd9e'
-    calendar.borderColor = '#03bd9e'
-    addCalendar(calendar)
-
-    calendar = new CalendarInfo()
-    id += 1
-    calendar.id = String(id)
-    calendar.name = 'Travel'
-    calendar.color = '#ffffff'
-    calendar.bgColor = '#bbdc00'
-    calendar.dragBgColor = '#bbdc00'
-    calendar.borderColor = '#bbdc00'
-    addCalendar(calendar)
-
-    calendar = new CalendarInfo()
-    id += 1
-    calendar.id = String(id)
-    calendar.name = 'etc'
-    calendar.color = '#ffffff'
-    calendar.bgColor = '#9d9d9d'
-    calendar.dragBgColor = '#9d9d9d'
-    calendar.borderColor = '#9d9d9d'
-    addCalendar(calendar)
-
-    calendar = new CalendarInfo()
-    id += 1
-    calendar.id = String(id)
-    calendar.name = 'Birthdays'
-    calendar.color = '#ffffff'
-    calendar.bgColor = '#ffbb3b'
-    calendar.dragBgColor = '#ffbb3b'
-    calendar.borderColor = '#ffbb3b'
-    addCalendar(calendar)
-
-    calendar = new CalendarInfo()
-    id += 1
-    calendar.id = String(id)
-    calendar.name = 'National Holidays'
-    calendar.color = '#ffffff'
-    calendar.bgColor = '#ff4040'
-    calendar.dragBgColor = '#ff4040'
-    calendar.borderColor = '#ff4040'
-    addCalendar(calendar) */
   }
 })()

+ 59 - 0
public/tui-calendar/js/data/calendars2.js

@@ -0,0 +1,59 @@
+'use strict'
+
+/* eslint-disable require-jsdoc, no-unused-vars */
+
+var CalendarList = []
+
+function CalendarInfo () {
+  this.id = null
+  this.name = null
+  this.checked = true
+  this.color = null
+  this.bgColor = null
+  this.borderColor = null
+  this.dragBgColor = null
+}
+
+function addCalendar (calendar) {
+  CalendarList.push(calendar)
+}
+
+function findCalendar (id) {
+  var found
+
+  CalendarList.forEach(function (calendar) {
+    if (calendar.id === id) {
+      found = calendar
+    }
+  })
+
+  return found || CalendarList[0]
+}
+
+function hexToRGBA (hex) {
+  var radix = 16
+  var r = parseInt(hex.slice(1, 3), radix)
+  var g = parseInt(hex.slice(3, 5), radix)
+  var b = parseInt(hex.slice(5, 7), radix)
+  var a = parseInt(hex.slice(7, 9), radix) / 255 || 1
+  var rgba = 'rgba(' + r + ', ' + g + ', ' + b + ', ' + a + ')'
+
+  return rgba
+}
+
+(function () {
+  if (CalendarList.length === 0) {
+    var cList = JSON.parse(localStorage.getItem('calendarList2'))
+    for (var i = 0; i < cList.length; i++) {
+      console.log(cList[i].id)
+      var calendar = new CalendarInfo()
+      calendar.id = cList[i].id
+      calendar.name = cList[i].name
+      calendar.color = cList[i].color
+      calendar.bgColor = cList[i].bgColor
+      calendar.dragBgColor = cList[i].dragBgColor
+      calendar.borderColor = cList[i].borderColor
+      addCalendar(calendar)
+    }
+  }
+})()

+ 201 - 0
public/tui-calendar/js/data/schedules2.js

@@ -0,0 +1,201 @@
+'use strict'
+
+/*eslint-disable*/
+
+var ScheduleList = [];
+
+var SCHEDULE_CATEGORY = [
+    'milestone',
+    'task'
+];
+
+function ScheduleInfo() {
+    this.id = null;
+    this.calendarId = null;
+
+    this.title = null;
+    this.body = null;
+    this.isAllday = false;
+    this.start = null;
+    this.end = null;
+    this.category = '';
+    this.dueDateClass = '';
+
+    this.color = null;
+    this.bgColor = null;
+    this.dragBgColor = null;
+    this.borderColor = null;
+    this.customStyle = '';
+
+    this.isFocused = false;
+    this.isPending = false;
+    this.isVisible = true;
+    this.isReadOnly = false;
+    this.goingDuration = 0;
+    this.comingDuration = 0;
+    this.recurrenceRule = '';
+    this.state = '';
+
+    this.raw = {
+        memo: '',
+        hasToOrCc: false,
+        hasRecurrenceRule: false,
+        location: null,
+        class: 'public', // or 'private'
+        creator: {
+            name: '',
+            avatar: '',
+            company: '',
+            email: '',
+            phone: ''
+        }
+    };
+}
+
+function generateTime(schedule, renderStart, renderEnd) {
+    var startDate = moment(renderStart.getTime())
+    var endDate = moment(renderEnd.getTime());
+    var diffDate = endDate.diff(startDate, 'days');
+
+    schedule.isAllday = chance.bool({likelihood: 30});
+    if (schedule.isAllday) {
+        schedule.category = 'allday';
+    } else if (chance.bool({likelihood: 30})) {
+        schedule.category = SCHEDULE_CATEGORY[chance.integer({min: 0, max: 1})];
+        if (schedule.category === SCHEDULE_CATEGORY[1]) {
+            schedule.dueDateClass = 'morning';
+        }
+    } else {
+        schedule.category = 'time';
+    }
+
+    startDate.add(chance.integer({min: 0, max: diffDate}), 'days');
+    startDate.hours(chance.integer({min: 0, max: 23}))
+    startDate.minutes(chance.bool() ? 0 : 30);
+    schedule.start = startDate.toDate();
+
+    endDate = moment(startDate);
+    if (schedule.isAllday) {
+        endDate.add(chance.integer({min: 0, max: 3}), 'days');
+    }
+
+    schedule.end = endDate
+        .add(chance.integer({min: 1, max: 4}), 'hour')
+        .toDate();
+
+    if (!schedule.isAllday && chance.bool({likelihood: 20})) {
+        schedule.goingDuration = chance.integer({min: 30, max: 120});
+        schedule.comingDuration = chance.integer({min: 30, max: 120});;
+
+        if (chance.bool({likelihood: 50})) {
+            schedule.end = schedule.start;
+        }
+    }
+}
+
+function generateNames() {
+    var names = [];
+    var i = 0;
+    var length = chance.integer({min: 1, max: 10});
+
+    for (; i < length; i += 1) {
+        names.push(chance.name());
+    }
+
+    return names;
+}
+
+function generateRandomSchedule(calendar, renderStart, renderEnd) {
+    var schedule = new ScheduleInfo();
+
+    schedule.id = chance.guid();
+    schedule.calendarId = calendar.id;
+
+    schedule.title = chance.sentence({words: 3});
+    schedule.body = chance.bool({likelihood: 20}) ? chance.sentence({words: 10}) : '';
+    schedule.isReadOnly = chance.bool({likelihood: 20});
+    generateTime(schedule, renderStart, renderEnd);
+
+    schedule.isPrivate = chance.bool({likelihood: 10});
+    schedule.location = chance.address();
+    schedule.attendees = chance.bool({likelihood: 70}) ? generateNames() : [];
+    schedule.recurrenceRule = chance.bool({likelihood: 20}) ? 'repeated events' : '';
+    schedule.state = chance.bool({likelihood: 20}) ? 'Free' : 'Busy';
+    schedule.color = calendar.color;
+    schedule.bgColor = calendar.bgColor;
+    schedule.dragBgColor = calendar.dragBgColor;
+    schedule.borderColor = calendar.borderColor;
+
+    if (schedule.category === 'milestone') {
+        schedule.color = schedule.bgColor;
+        schedule.bgColor = 'transparent';
+        schedule.dragBgColor = 'transparent';
+        schedule.borderColor = 'transparent';
+    }
+
+    schedule.raw.memo = chance.sentence();
+    schedule.raw.creator.name = chance.name();
+    schedule.raw.creator.avatar = chance.avatar();
+    schedule.raw.creator.company = chance.name();
+    schedule.raw.creator.email = chance.email();
+    schedule.raw.creator.phone = chance.phone();
+
+    if (chance.bool({ likelihood: 20 })) {
+        var travelTime = chance.minute();
+        schedule.goingDuration = travelTime;
+        schedule.comingDuration = travelTime;
+    }
+
+    ScheduleList.push(schedule);
+}
+
+function generateSchedule(viewName, renderStart, renderEnd) {
+    ScheduleList = [];
+    generateScheduleFromLocal()
+    /*CalendarList.forEach(function(calendar) {
+        var i = 0, length = 10;
+        if (viewName === 'month') {
+            length = 3;
+        } else if (viewName === 'day') {
+            length = 4;
+        }
+        for (; i < length; i += 1) {
+            generateRandomSchedule(calendar, renderStart, renderEnd);
+        }
+    });*/
+}
+
+function generateScheduleFromLocal() {
+  var sList = JSON.parse(localStorage.getItem('scheduleList2'))
+
+  for (var i = 0; i < sList.length; i++) {
+    var schedule = new ScheduleInfo();
+    console.log(sList[i].id)
+    schedule.id = sList[i].id;
+    schedule.calendarId = sList[i].calendarId;
+
+    schedule.title = sList[i].title;
+    schedule.body = sList[i].body;
+    schedule.isReadOnly = sList[i].isReadOnly;
+    schedule.isAllday = sList[i].isAllday;
+    schedule.dueDateClass = sList[i].dueDateClass;
+    schedule.category = sList[i].category;
+    schedule.isPrivate = sList[i].isPrivate;
+    schedule.location = sList[i].location;
+    schedule.attendees = sList[i].attendees;
+    schedule.recurrenceRule = sList[i].recurrenceRule;
+    schedule.state = sList[i].state;
+    schedule.color = sList[i].color;
+    schedule.bgColor = sList[i].bgColor;
+    schedule.dragBgColor = sList[i].dragBgColor;
+    schedule.borderColor = sList[i].borderColor;
+    console.log(sList[i].raw)
+    schedule.raw.memo = sList[i].raw.memo;
+    schedule.raw.creator.name = sList[i].raw.creator.name;
+    schedule.raw.creator.avatar = sList[i].raw.creator.avatar;
+    schedule.raw.creator.company = sList[i].raw.creator.company;
+    schedule.raw.creator.email = sList[i].raw.creator.email;
+    schedule.raw.creator.phone = sList[i].raw.creator.phone;
+    ScheduleList.push(schedule);
+  }
+}

+ 14 - 3
src/views/check/checkjob/CheckJob.vue

@@ -114,8 +114,9 @@
       <div class="table-operator">
         <a-button v-if="$auth('check-polling-jobs-add')" type="primary" icon="plus" @click="$refs.baseModal.base()">新增</a-button>
         <a-button style="margin-left: 8px" v-if="($auth('check-spot-jobs-export') || $auth('check-polling-jobs-export'))" type="primary" icon="download" @click="doExport">导出</a-button>
-        <a-button style="margin-left: 8px" v-if="($auth('check-spot-jobs-export') || $auth('check-polling-jobs-export'))" type="success" @click="handleSeven">本周</a-button>
-        <a-button style="margin-left: 8px" v-if="($auth('check-spot-jobs-export') || $auth('check-polling-jobs-export'))" type="success" @click="handleMonth">本月</a-button>
+        <a-button style="margin-left: 8px" type="success" @click="handleSeven">本周</a-button>
+        <a-button style="margin-left: 8px" type="success" @click="handleMonth">本月</a-button>
+        <a-button style="margin-left: 8px" type="success" @click="handleTuiCalendar">日历图</a-button>
         <a-button style="margin-left: 8px" type="primary" @click="handleExecuteBatch" v-if="selectedRowKeys.length > 0">
           <a-icon style="margin-left: 8px" type="plus"/>
           批量接收
@@ -188,7 +189,7 @@
 import { STable, Ellipsis } from '@/components'
 import BaseForm from './modules/BaseForm'
 import Detail from './modules/Detail'
-import { getCheckJobPage, deleteCheckJobs, fetchCheckJob, exportCheckJob, executeJob, executeJobBatch, finishJobBatch } from '@/api/check/checkjob'
+import { getCheckJobPage, deleteCheckJobs, fetchCheckJob, exportCheckJob, executeJob, executeJobBatch, finishJobBatch, queryTuiCalendarIgnores } from '@/api/check/checkjob'
 import { fetchSbTypeTree } from '@/api/sb/type'
 import DictCache from '@/utils/dict'
 
@@ -580,6 +581,16 @@ export default {
         this.handleOk()
       })
     },
+    handleTuiCalendar () {
+      queryTuiCalendarIgnores({ type: 2 }).then(res => {
+        const a = document.createElement('a')
+        a.target = '_blank'
+        a.href = '/tui-calendar/checkJobCalendar.html?'
+        localStorage.setItem('calendarList', JSON.stringify(res.data.calendarList))
+        localStorage.setItem('scheduleList', JSON.stringify(res.data.scheduleList))
+        a.click()
+      })
+    },
     doExport () {
       const parameter = {
         ...this.queryParam,

+ 2 - 2
src/views/dashboard/CheckJobReportWeek.vue

@@ -56,7 +56,7 @@
 </template>
 
 <script>
-import { getWeekReport, exportMonthReport } from '@/api/report/check-job'
+import { getWeekReport, exportWeekReport } from '@/api/report/check-job'
 import { Chart } from '@antv/g2'
 import PrintInCheckJobReportWeek from '@/views/dashboard/modules/PrintInCheckJobReportWeek'
 
@@ -159,7 +159,7 @@ export default {
       const parameter = {
         ...this.queryParam
       }
-      exportMonthReport(parameter).then(file => {
+      exportWeekReport(parameter).then(file => {
         this.BaseTool.UPLOAD.downLoadExportExcel(file)
       })
     },

+ 13 - 6
src/views/sb/info/modules/Detail.vue

@@ -20,7 +20,8 @@
               <a-button style="margin-left: 8px" type="default" @click="handleViewCheckJob()">保养任务</a-button>
             </a-badge>
             <a-button v-show="model.useType==4" style="margin-left: 8px" type="default" @click="handleMeasure()">检定记录</a-button>
-            <a-button style="margin-left: 8px" type="error" @click="handleTuiCalendar()">保养日历图</a-button>
+            <a-button v-if="$auth('check-polling-jobs-tui-calendar-first')" style="margin-left: 8px" type="error" @click="handleTuiCalendar(1)">一级保养日历</a-button>
+            <a-button v-if="$auth('check-polling-jobs-tui-calendar-second')" style="margin-left: 8px" type="error" @click="handleTuiCalendar(2)">二级保养日历</a-button>
             <a-button style="margin-left: 8px" type="primary" @click="handleCancel()">返回</a-button>
           </span>
         </a-col>
@@ -452,13 +453,19 @@ export default {
       const modal = this.$refs.checkJobTableWaitDo
       modal.base({ sbId: this.model.id }, { sbId: this.model.id, status: 1 })
     },
-    handleTuiCalendar () {
-      queryTuiCalendarIgnores({ sbId: this.model.id, type: 2 }).then(res => {
+    handleTuiCalendar (level) {
+      queryTuiCalendarIgnores({ sbId: this.model.id, type: 2, standardLevel: level }).then(res => {
         const a = document.createElement('a')
-        a.href = '/tui-calendar/example00-basic.html?'
-        localStorage.setItem('calendarList', JSON.stringify(res.data.calendarList))
-        localStorage.setItem('scheduleList', JSON.stringify(res.data.scheduleList))
         a.target = '_blank'
+        if (level === 1) {
+          a.href = '/tui-calendar/checkJobCalendar.html?'
+          localStorage.setItem('calendarList', JSON.stringify(res.data.calendarList))
+          localStorage.setItem('scheduleList', JSON.stringify(res.data.scheduleList))
+        } else {
+          a.href = '/tui-calendar/checkJobCalendar2.html?'
+          localStorage.setItem('calendarList2', JSON.stringify(res.data.calendarList))
+          localStorage.setItem('scheduleList2', JSON.stringify(res.data.scheduleList))
+        }
         a.click()
       })
     }