import moment from 'moment';
export var weekDays = ['一', '二', '三', '四', '五', '六', '日'];
export var macroData = [{
  label: "无",
  value: null
}, {
  label: '当前时间-1 [1997-01-01 12:30]',
  value: 'getTimeFull'
}, {
  label: '当前时间-2 [12:30]',
  value: 'getTime'
}, {
  label: '当前日期-1 [1997-01-01]',
  value: 'getDate'
}, {
  label: '当前日期-2 [1997年01月01日]',
  value: 'getDateByChinese'
}, {
  label: '当前日期-3 [1月1日]',
  value: 'getMonthAndDayByChinese'
}, {
  label: '当前月份 [1997年01月]',
  value: 'getYearAndMonthByChinese'
}, {
  label: '当前年份-1 [1997年]',
  value: 'getYearByChinese'
}, {
  label: '当前年份-2 [1997]',
  value: 'getYear'
}, {
  label: '当前星期 [星期一]',
  value: 'getWeek'
}];
export var macroDataFuns = {
  getTimeFull: function getTimeFull() {
    return moment().format("YYYY-MM-DD HH:mm:ss");
  },
  getTime: function getTime() {
    return moment().format("HH:mm");
  },
  getDate: function getDate() {
    return moment().format("YYYY-MM-DD");
  },
  getDateByChinese: function getDateByChinese() {
    return moment().format("YYYY年MM月DD日");
  },
  getMonthAndDayByChinese: function getMonthAndDayByChinese() {
    return moment().format("MM月DD日");
  },
  getYearAndMonthByChinese: function getYearAndMonthByChinese() {
    return moment().format("YYYY年MM月");
  },
  getYearByChinese: function getYearByChinese() {
    return moment().format("YYYY年");
  },
  getYear: function getYear() {
    return moment().format("YYYY");
  },
  getWeek: function getWeek() {
    return "\u661F\u671F".concat(weekDays[moment().weekday()]);
  } // '$session': {
  //   staff: {},
  //   user: {},
  //   org: {},
  //   area: {},
  //   job: {}
  // },
  // '$currentOrder': {
  //   parentOrder: {}
  // },
  // '$currentWorkOrder': {}

};
export var concatMacro = function concatMacro() {
  macroData.forEach(function (item) {
    if (macroDataFuns[item.value]) {
      item['function'] = macroDataFuns[item.value];
    }
  });
  return macroData;
};
//# sourceMappingURL=macro.js.map