main.1ecba82494183b86c6df.js 82 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715
  1. webpackJsonp([4],[
  2. /* 0 */,
  3. /* 1 */,
  4. /* 2 */,
  5. /* 3 */,
  6. /* 4 */
  7. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8. "use strict";
  9. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__network__ = __webpack_require__(22);
  10. var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  11. /* harmony default export */ __webpack_exports__["a"] = (_extends({}, __WEBPACK_IMPORTED_MODULE_0__network__["a" /* default */], {
  12. // api 接口
  13. login: '/job/login',
  14. job: {
  15. savejob: '/job/save',
  16. deljob: '/job/del',
  17. joblist: '/job/list',
  18. killjob: '/job/kill',
  19. loglist: '/job/cronLog',
  20. workerlist: '/job/workerList'
  21. }
  22. }));
  23. /***/ }),
  24. /* 5 */
  25. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  26. "use strict";
  27. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  28. var getURL = function getURL(search, name) {
  29. var reg = new RegExp("[?&]" + name + "=([^&]*)(&|$)", "i");
  30. var r = search.match(reg);
  31. if (r != null) return unescape(r[1]);
  32. return null;
  33. };
  34. function setCookie(c_name, value, expiredays) {
  35. var exdate = new Date();
  36. exdate.setDate(exdate.getDate() + expiredays);
  37. document.cookie = c_name + "=" + escape(value) + (expiredays == null ? "" : ";expires=" + exdate.toGMTString());
  38. }
  39. //取回cookie
  40. function getCookie(c_name) {
  41. if (document.cookie.length > 0) {
  42. var c_start = document.cookie.indexOf(c_name + "=");
  43. var c_end;
  44. if (c_start != -1) {
  45. c_start = c_start + c_name.length + 1;
  46. c_end = document.cookie.indexOf(";", c_start);
  47. if (c_end == -1) c_end = document.cookie.length;
  48. return unescape(document.cookie.substring(c_start, c_end));
  49. }
  50. }
  51. return "";
  52. }
  53. var getStorage = function getStorage(name) {
  54. if (window.localStorage) {
  55. return window.localStorage.getItem(name);
  56. } else {
  57. return getCookie(name);
  58. }
  59. };
  60. function delCookie(key) {
  61. var date = new Date();
  62. date.setTime(date.getTime() - 1);
  63. var delValue = getCookie(key);
  64. if (!!delValue) {
  65. document.cookie = key + '=' + delValue + ';expires=' + date.toGMTString();
  66. }
  67. }
  68. // String.prototype.
  69. var clearEmpty = function clearEmpty(Obj) {
  70. var newObject = {};
  71. for (var key in Obj) {
  72. if (Obj.hasOwnProperty(key)) {
  73. var element = Obj[key];
  74. if (typeof element === 'string') {
  75. if (element) {
  76. newObject[key] = element;
  77. }
  78. continue;
  79. }
  80. if (['boolean', 'number'].indexOf(typeof element === "undefined" ? "undefined" : _typeof(element)) >= 0) {
  81. newObject[key] = element;
  82. continue;
  83. }
  84. if (element instanceof Object) {
  85. if (!isEmptyObject(element)) {
  86. var obj = clearEmpty(element);
  87. if (!isEmptyObject(obj)) {
  88. newObject[key] = clearEmpty(element);
  89. }
  90. continue;
  91. }
  92. }
  93. if (element instanceof Array) {
  94. if (element.length > 0) {
  95. newObject[key] = element;
  96. continue;
  97. }
  98. }
  99. }
  100. }
  101. return newObject;
  102. };
  103. /**
  104. *
  105. * @desc 随机生成颜色
  106. * @return {String}
  107. */
  108. function randomColor() {
  109. return '#' + ('00000' + (Math.random() * 0x1000000 << 0).toString(16)).slice(-6);
  110. }
  111. /**
  112. *
  113. * @desc 生成指定范围随机数
  114. * @param {Number} min
  115. * @param {Number} max
  116. * @return {Number}
  117. */
  118. function randomNum(min, max) {
  119. return Math.floor(min + Math.random() * (max - min));
  120. }
  121. /**
  122. * @desc 格式化${startTime}距现在的已过时间
  123. * @param {Date} startTime
  124. * @return {String}
  125. */
  126. function formatPassTime(startTime) {
  127. var currentTime = Date.parse(new Date()),
  128. time = currentTime - startTime,
  129. day = parseInt(time / (1000 * 60 * 60 * 24)),
  130. hour = parseInt(time / (1000 * 60 * 60)),
  131. min = parseInt(time / (1000 * 60)),
  132. month = parseInt(day / 30),
  133. year = parseInt(month / 12);
  134. if (year) return year + "年前";
  135. if (month) return month + "个月前";
  136. if (day) return day + "天前";
  137. if (hour) return hour + "小时前";
  138. if (min) return min + "分钟前";else return '刚刚';
  139. }
  140. /**
  141. *
  142. * @desc 格式化现在距${endTime}的剩余时间
  143. * @param {Date} endTime
  144. * @return {String}
  145. */
  146. function formatRemainTime(endTime) {
  147. var startDate = new Date(); //开始时间
  148. var endDate = new Date(endTime); //结束时间
  149. var t = endDate.getTime() - startDate.getTime(); //时间差
  150. var d = 0,
  151. h = 0,
  152. m = 0,
  153. s = 0;
  154. if (t >= 0) {
  155. d = Math.floor(t / 1000 / 3600 / 24);
  156. h = Math.floor(t / 1000 / 60 / 60 % 24);
  157. m = Math.floor(t / 1000 / 60 % 60);
  158. s = Math.floor(t / 1000 % 60);
  159. }
  160. return d + "天 " + h + "小时 " + m + "分钟 " + s + "秒";
  161. }
  162. /**
  163. *
  164. * @desc 判断是否NaN
  165. * @param {Any} value
  166. * @return {Boolean}
  167. */
  168. function isNaN(value) {
  169. return value !== value;
  170. };
  171. /**
  172. *
  173. * @desc 判断两个数组是否相等
  174. * @param {Array} arr1
  175. * @param {Array} arr2
  176. * @return {Boolean}
  177. */
  178. function arrayEqual(arr1, arr2) {
  179. if (arr1 === arr2) return true;
  180. if (arr1.length != arr2.length) return false;
  181. for (var i = 0; i < arr1.length; ++i) {
  182. if (arr1[i] !== arr2[i]) return false;
  183. }
  184. return true;
  185. }
  186. /**
  187. *
  188. * @desc 获取浏览器类型和版本
  189. * @return {String}
  190. */
  191. function getExplore() {
  192. var sys = {},
  193. ua = navigator.userAgent.toLowerCase(),
  194. s;
  195. (s = ua.match(/rv:([\d.]+)\) like gecko/)) ? sys.ie = s[1] : (s = ua.match(/msie ([\d\.]+)/)) ? sys.ie = s[1] : (s = ua.match(/edge\/([\d\.]+)/)) ? sys.edge = s[1] : (s = ua.match(/firefox\/([\d\.]+)/)) ? sys.firefox = s[1] : (s = ua.match(/(?:opera|opr).([\d\.]+)/)) ? sys.opera = s[1] : (s = ua.match(/chrome\/([\d\.]+)/)) ? sys.chrome = s[1] : (s = ua.match(/version\/([\d\.]+).*safari/)) ? sys.safari = s[1] : 0;
  196. // 根据关系进行判断
  197. if (sys.ie) return 'IE: ' + sys.ie;
  198. if (sys.edge) return 'EDGE: ' + sys.edge;
  199. if (sys.firefox) return 'Firefox: ' + sys.firefox;
  200. if (sys.chrome) return 'Chrome: ' + sys.chrome;
  201. if (sys.opera) return 'Opera: ' + sys.opera;
  202. if (sys.safari) return 'Safari: ' + sys.safari;
  203. return 'Unkonwn';
  204. }
  205. /**
  206. * @desc 深拷贝,支持常见类型
  207. * @param {Any} values
  208. */
  209. function deepClone(values) {
  210. var copy;
  211. // Handle the 3 simple types, and null or undefined
  212. if (null == values || "object" != (typeof values === "undefined" ? "undefined" : _typeof(values))) return values;
  213. // Handle Date
  214. if (values instanceof Date) {
  215. copy = new Date();
  216. copy.setTime(values.getTime());
  217. return copy;
  218. }
  219. // Handle Array
  220. if (values instanceof Array) {
  221. copy = [];
  222. for (var i = 0, len = values.length; i < len; i++) {
  223. copy[i] = deepClone(values[i]);
  224. }
  225. return copy;
  226. }
  227. // Handle Object
  228. if (values instanceof Object) {
  229. copy = {};
  230. for (var attr in values) {
  231. if (values.hasOwnProperty(attr)) copy[attr] = deepClone(values[attr]);
  232. }
  233. return copy;
  234. }
  235. throw new Error("Unable to copy values! Its type isn't supported.");
  236. }
  237. /**
  238. *
  239. * @desc 判断`obj`是否为空
  240. * @param {Object} obj
  241. * @return {Boolean}
  242. */
  243. function isEmptyObject(obj) {
  244. if (!obj || (typeof obj === "undefined" ? "undefined" : _typeof(obj)) !== 'object' || Array.isArray(obj)) return false;
  245. return !Object.keys(obj).length;
  246. }
  247. function selectObject(src, arr) {
  248. var newObj = {};
  249. arr.forEach(function (item) {
  250. newObj[item] = src[item];
  251. });
  252. return newObj;
  253. }
  254. Date.prototype.Format = function (fmt) {
  255. var o = {
  256. "M+": this.getMonth() + 1, //月份
  257. "d+": this.getDate(), //日
  258. "h+": this.getHours(), //小时
  259. "m+": this.getMinutes(), //分
  260. "s+": this.getSeconds(), //秒
  261. "q+": Math.floor((this.getMonth() + 3) / 3), //季度
  262. "S": this.getMilliseconds() //毫秒
  263. };
  264. if (/(y+)/.test(fmt)) {
  265. fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  266. }
  267. for (var k in o) {
  268. console.log(o[k]);
  269. if (new RegExp("(" + k + ")").test(fmt)) {
  270. fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
  271. }
  272. }
  273. return fmt;
  274. };
  275. function timeFormat(millsecond) {
  276. // 前缀补0: 2018-08-07 08:01:03.345
  277. function paddingNum(num, n) {
  278. var len = num.toString().length;
  279. while (len < n) {
  280. num = '0' + num;
  281. len++;
  282. }
  283. return num;
  284. }
  285. var date = new Date(millsecond);
  286. var year = date.getFullYear();
  287. var month = paddingNum(date.getMonth() + 1, 2);
  288. var day = paddingNum(date.getDate(), 2);
  289. var hour = paddingNum(date.getHours(), 2);
  290. var minute = paddingNum(date.getMinutes(), 2);
  291. var second = paddingNum(date.getSeconds(), 2);
  292. var millsecond = paddingNum(date.getMilliseconds(), 3);
  293. return year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second + "." + millsecond;
  294. }
  295. /* harmony default export */ __webpack_exports__["a"] = ({
  296. getURL: getURL,
  297. setCookie: setCookie,
  298. getCookie: getCookie,
  299. delCookie: delCookie,
  300. getStorage: getStorage,
  301. clearEmpty: clearEmpty,
  302. randomColor: randomColor,
  303. formatPassTime: formatPassTime,
  304. formatRemainTime: formatRemainTime,
  305. isNaN: isNaN,
  306. arrayEqual: arrayEqual,
  307. getExplore: getExplore,
  308. deepClone: deepClone,
  309. isEmptyObject: isEmptyObject,
  310. selectObject: selectObject,
  311. timeFormat: timeFormat
  312. });
  313. /***/ }),
  314. /* 6 */,
  315. /* 7 */
  316. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  317. "use strict";
  318. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__api__ = __webpack_require__(4);
  319. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__(5);
  320. /* harmony default export */ __webpack_exports__["a"] = ({
  321. install: function install(Vue) {
  322. Vue.mixin({
  323. data: function data() {
  324. return {
  325. tableHeight: 300,
  326. mixinSelectItems: []
  327. };
  328. },
  329. mounted: function mounted() {
  330. var _this = this;
  331. // 设置表格高度
  332. this.$nextTick(function () {
  333. // 加入分页得时候再用,控制 table 得高度
  334. if (_this.$refs.table) {
  335. _this.tableHeight = window.innerHeight - _this.$refs.table.$el.offsetTop - 100;
  336. }
  337. });
  338. },
  339. methods: {
  340. handleSelectionChange: function handleSelectionChange(val) {
  341. this.mixinSelectItems = val;
  342. },
  343. getKeys: function getKeys(key) {
  344. return this.mixinSelectItems.length > 0 ? this.mixinSelectItems.map(function (item) {
  345. return item[key];
  346. }) : [];
  347. }
  348. }
  349. });
  350. Vue.prototype.$api = __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */];
  351. Vue.prototype.$tools = __WEBPACK_IMPORTED_MODULE_1__common__["a" /* default */];
  352. }
  353. });
  354. /***/ }),
  355. /* 8 */
  356. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  357. "use strict";
  358. var util = {};
  359. util.title = function (title) {
  360. title = title ? title + ' - Home' : 'iView project';
  361. window.document.title = title;
  362. };
  363. /* harmony default export */ __webpack_exports__["a"] = (util);
  364. /***/ }),
  365. /* 9 */
  366. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  367. "use strict";
  368. var routers = [{
  369. path: '/index',
  370. meta: {
  371. title: ''
  372. },
  373. component: function component(resolve) {
  374. return __webpack_require__.e/* require */(2).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(32)]; (resolve.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}.bind(this)).catch(__webpack_require__.oe);
  375. },
  376. children: [{
  377. path: '/list',
  378. name: '任务列表',
  379. component: function component(resolve) {
  380. return __webpack_require__.e/* require */(0).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(33)]; (resolve.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}.bind(this)).catch(__webpack_require__.oe);
  381. }
  382. }, {
  383. path: '/list2',
  384. name: '列表2',
  385. component: function component(resolve) {
  386. return __webpack_require__.e/* require */(3).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(35)]; (resolve.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}.bind(this)).catch(__webpack_require__.oe);
  387. }
  388. }]
  389. }, {
  390. path: '/login',
  391. meta: {
  392. title: '登录'
  393. },
  394. component: function component(resolve) {
  395. return __webpack_require__.e/* require */(1).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(34)]; (resolve.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}.bind(this)).catch(__webpack_require__.oe);
  396. }
  397. }, {
  398. path: '/',
  399. redirect: 'login'
  400. }];
  401. /* harmony default export */ __webpack_exports__["a"] = (routers);
  402. /***/ }),
  403. /* 10 */
  404. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  405. "use strict";
  406. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(1);
  407. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vuex__ = __webpack_require__(17);
  408. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__libs_api__ = __webpack_require__(4);
  409. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__job__ = __webpack_require__(24);
  410. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__libs_common__ = __webpack_require__(5);
  411. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  412. __WEBPACK_IMPORTED_MODULE_0_vue__["default"].use(__WEBPACK_IMPORTED_MODULE_1_vuex__["a" /* default */]);
  413. var HANDLE_LOGIN = 'HANDLE_LOGIN';
  414. /* harmony default export */ __webpack_exports__["a"] = (new __WEBPACK_IMPORTED_MODULE_1_vuex__["a" /* default */].Store({
  415. state: {},
  416. actions: _defineProperty({}, HANDLE_LOGIN, async function (_ref) {
  417. var commit = _ref.commit;
  418. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  419. var res = await __WEBPACK_IMPORTED_MODULE_2__libs_api__["a" /* default */].post(__WEBPACK_IMPORTED_MODULE_2__libs_api__["a" /* default */].login, params);
  420. commit(HANDLE_LOGIN, res);
  421. return res;
  422. }),
  423. mutations: _defineProperty({}, HANDLE_LOGIN, function (state, _ref2) {
  424. var data = _ref2.data;
  425. __WEBPACK_IMPORTED_MODULE_4__libs_common__["a" /* default */].setCookie('token', data.token, 10);
  426. }),
  427. modules: {
  428. job: __WEBPACK_IMPORTED_MODULE_3__job__["a" /* default */]
  429. }
  430. }));
  431. /***/ }),
  432. /* 11 */,
  433. /* 12 */,
  434. /* 13 */
  435. /***/ (function(module, exports) {
  436. // removed by extract-text-webpack-plugin
  437. /***/ }),
  438. /* 14 */,
  439. /* 15 */
  440. /***/ (function(module, exports, __webpack_require__) {
  441. /* styles */
  442. __webpack_require__(26)
  443. __webpack_require__(27)
  444. var Component = __webpack_require__(16)(
  445. /* script */
  446. __webpack_require__(19),
  447. /* template */
  448. __webpack_require__(30),
  449. /* scopeId */
  450. "data-v-866dc8e0",
  451. /* cssModules */
  452. null
  453. )
  454. Component.options.__file = "D:\\workarea\\normal\\crontab\\src\\app.vue"
  455. if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key !== "__esModule"})) {console.error("named exports are not supported in *.vue files.")}
  456. if (Component.options.functional) {console.error("[vue-loader] app.vue: functional components are not supported with templates, they should use render functions.")}
  457. /* hot reload */
  458. if (false) {(function () {
  459. var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
  460. hotAPI.install(require("vue"), false)
  461. if (!hotAPI.compatible) return
  462. module.hot.accept()
  463. if (!module.hot.data) {
  464. hotAPI.createRecord("data-v-866dc8e0", Component.options)
  465. } else {
  466. hotAPI.reload("data-v-866dc8e0", Component.options)
  467. }
  468. })()}
  469. module.exports = Component.exports
  470. /***/ }),
  471. /* 16 */
  472. /***/ (function(module, exports) {
  473. // this module is a runtime utility for cleaner component module output and will
  474. // be included in the final webpack user bundle
  475. module.exports = function normalizeComponent (
  476. rawScriptExports,
  477. compiledTemplate,
  478. scopeId,
  479. cssModules
  480. ) {
  481. var esModule
  482. var scriptExports = rawScriptExports = rawScriptExports || {}
  483. // ES6 modules interop
  484. var type = typeof rawScriptExports.default
  485. if (type === 'object' || type === 'function') {
  486. esModule = rawScriptExports
  487. scriptExports = rawScriptExports.default
  488. }
  489. // Vue.extend constructor export interop
  490. var options = typeof scriptExports === 'function'
  491. ? scriptExports.options
  492. : scriptExports
  493. // render functions
  494. if (compiledTemplate) {
  495. options.render = compiledTemplate.render
  496. options.staticRenderFns = compiledTemplate.staticRenderFns
  497. }
  498. // scopedId
  499. if (scopeId) {
  500. options._scopeId = scopeId
  501. }
  502. // inject cssModules
  503. if (cssModules) {
  504. var computed = Object.create(options.computed || null)
  505. Object.keys(cssModules).forEach(function (key) {
  506. var module = cssModules[key]
  507. computed[key] = function () { return module }
  508. })
  509. options.computed = computed
  510. }
  511. return {
  512. esModule: esModule,
  513. exports: scriptExports,
  514. options: options
  515. }
  516. }
  517. /***/ }),
  518. /* 17 */
  519. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  520. "use strict";
  521. /* WEBPACK VAR INJECTION */(function(global) {/* unused harmony export Store */
  522. /* unused harmony export install */
  523. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return mapState; });
  524. /* unused harmony export mapMutations */
  525. /* unused harmony export mapGetters */
  526. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return mapActions; });
  527. /* unused harmony export createNamespacedHelpers */
  528. /**
  529. * vuex v3.1.1
  530. * (c) 2019 Evan You
  531. * @license MIT
  532. */
  533. function applyMixin (Vue) {
  534. var version = Number(Vue.version.split('.')[0]);
  535. if (version >= 2) {
  536. Vue.mixin({ beforeCreate: vuexInit });
  537. } else {
  538. // override init and inject vuex init procedure
  539. // for 1.x backwards compatibility.
  540. var _init = Vue.prototype._init;
  541. Vue.prototype._init = function (options) {
  542. if ( options === void 0 ) options = {};
  543. options.init = options.init
  544. ? [vuexInit].concat(options.init)
  545. : vuexInit;
  546. _init.call(this, options);
  547. };
  548. }
  549. /**
  550. * Vuex init hook, injected into each instances init hooks list.
  551. */
  552. function vuexInit () {
  553. var options = this.$options;
  554. // store injection
  555. if (options.store) {
  556. this.$store = typeof options.store === 'function'
  557. ? options.store()
  558. : options.store;
  559. } else if (options.parent && options.parent.$store) {
  560. this.$store = options.parent.$store;
  561. }
  562. }
  563. }
  564. var target = typeof window !== 'undefined'
  565. ? window
  566. : typeof global !== 'undefined'
  567. ? global
  568. : {};
  569. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  570. function devtoolPlugin (store) {
  571. if (!devtoolHook) { return }
  572. store._devtoolHook = devtoolHook;
  573. devtoolHook.emit('vuex:init', store);
  574. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  575. store.replaceState(targetState);
  576. });
  577. store.subscribe(function (mutation, state) {
  578. devtoolHook.emit('vuex:mutation', mutation, state);
  579. });
  580. }
  581. /**
  582. * Get the first item that pass the test
  583. * by second argument function
  584. *
  585. * @param {Array} list
  586. * @param {Function} f
  587. * @return {*}
  588. */
  589. /**
  590. * forEach for object
  591. */
  592. function forEachValue (obj, fn) {
  593. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  594. }
  595. function isObject (obj) {
  596. return obj !== null && typeof obj === 'object'
  597. }
  598. function isPromise (val) {
  599. return val && typeof val.then === 'function'
  600. }
  601. function assert (condition, msg) {
  602. if (!condition) { throw new Error(("[vuex] " + msg)) }
  603. }
  604. function partial (fn, arg) {
  605. return function () {
  606. return fn(arg)
  607. }
  608. }
  609. // Base data struct for store's module, package with some attribute and method
  610. var Module = function Module (rawModule, runtime) {
  611. this.runtime = runtime;
  612. // Store some children item
  613. this._children = Object.create(null);
  614. // Store the origin module object which passed by programmer
  615. this._rawModule = rawModule;
  616. var rawState = rawModule.state;
  617. // Store the origin module's state
  618. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  619. };
  620. var prototypeAccessors = { namespaced: { configurable: true } };
  621. prototypeAccessors.namespaced.get = function () {
  622. return !!this._rawModule.namespaced
  623. };
  624. Module.prototype.addChild = function addChild (key, module) {
  625. this._children[key] = module;
  626. };
  627. Module.prototype.removeChild = function removeChild (key) {
  628. delete this._children[key];
  629. };
  630. Module.prototype.getChild = function getChild (key) {
  631. return this._children[key]
  632. };
  633. Module.prototype.update = function update (rawModule) {
  634. this._rawModule.namespaced = rawModule.namespaced;
  635. if (rawModule.actions) {
  636. this._rawModule.actions = rawModule.actions;
  637. }
  638. if (rawModule.mutations) {
  639. this._rawModule.mutations = rawModule.mutations;
  640. }
  641. if (rawModule.getters) {
  642. this._rawModule.getters = rawModule.getters;
  643. }
  644. };
  645. Module.prototype.forEachChild = function forEachChild (fn) {
  646. forEachValue(this._children, fn);
  647. };
  648. Module.prototype.forEachGetter = function forEachGetter (fn) {
  649. if (this._rawModule.getters) {
  650. forEachValue(this._rawModule.getters, fn);
  651. }
  652. };
  653. Module.prototype.forEachAction = function forEachAction (fn) {
  654. if (this._rawModule.actions) {
  655. forEachValue(this._rawModule.actions, fn);
  656. }
  657. };
  658. Module.prototype.forEachMutation = function forEachMutation (fn) {
  659. if (this._rawModule.mutations) {
  660. forEachValue(this._rawModule.mutations, fn);
  661. }
  662. };
  663. Object.defineProperties( Module.prototype, prototypeAccessors );
  664. var ModuleCollection = function ModuleCollection (rawRootModule) {
  665. // register root module (Vuex.Store options)
  666. this.register([], rawRootModule, false);
  667. };
  668. ModuleCollection.prototype.get = function get (path) {
  669. return path.reduce(function (module, key) {
  670. return module.getChild(key)
  671. }, this.root)
  672. };
  673. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  674. var module = this.root;
  675. return path.reduce(function (namespace, key) {
  676. module = module.getChild(key);
  677. return namespace + (module.namespaced ? key + '/' : '')
  678. }, '')
  679. };
  680. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  681. update([], this.root, rawRootModule);
  682. };
  683. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  684. var this$1 = this;
  685. if ( runtime === void 0 ) runtime = true;
  686. if (false) {
  687. assertRawModule(path, rawModule);
  688. }
  689. var newModule = new Module(rawModule, runtime);
  690. if (path.length === 0) {
  691. this.root = newModule;
  692. } else {
  693. var parent = this.get(path.slice(0, -1));
  694. parent.addChild(path[path.length - 1], newModule);
  695. }
  696. // register nested modules
  697. if (rawModule.modules) {
  698. forEachValue(rawModule.modules, function (rawChildModule, key) {
  699. this$1.register(path.concat(key), rawChildModule, runtime);
  700. });
  701. }
  702. };
  703. ModuleCollection.prototype.unregister = function unregister (path) {
  704. var parent = this.get(path.slice(0, -1));
  705. var key = path[path.length - 1];
  706. if (!parent.getChild(key).runtime) { return }
  707. parent.removeChild(key);
  708. };
  709. function update (path, targetModule, newModule) {
  710. if (false) {
  711. assertRawModule(path, newModule);
  712. }
  713. // update target module
  714. targetModule.update(newModule);
  715. // update nested modules
  716. if (newModule.modules) {
  717. for (var key in newModule.modules) {
  718. if (!targetModule.getChild(key)) {
  719. if (false) {
  720. console.warn(
  721. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  722. 'manual reload is needed'
  723. );
  724. }
  725. return
  726. }
  727. update(
  728. path.concat(key),
  729. targetModule.getChild(key),
  730. newModule.modules[key]
  731. );
  732. }
  733. }
  734. }
  735. var functionAssert = {
  736. assert: function (value) { return typeof value === 'function'; },
  737. expected: 'function'
  738. };
  739. var objectAssert = {
  740. assert: function (value) { return typeof value === 'function' ||
  741. (typeof value === 'object' && typeof value.handler === 'function'); },
  742. expected: 'function or object with "handler" function'
  743. };
  744. var assertTypes = {
  745. getters: functionAssert,
  746. mutations: functionAssert,
  747. actions: objectAssert
  748. };
  749. function assertRawModule (path, rawModule) {
  750. Object.keys(assertTypes).forEach(function (key) {
  751. if (!rawModule[key]) { return }
  752. var assertOptions = assertTypes[key];
  753. forEachValue(rawModule[key], function (value, type) {
  754. assert(
  755. assertOptions.assert(value),
  756. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  757. );
  758. });
  759. });
  760. }
  761. function makeAssertionMessage (path, key, type, value, expected) {
  762. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  763. if (path.length > 0) {
  764. buf += " in module \"" + (path.join('.')) + "\"";
  765. }
  766. buf += " is " + (JSON.stringify(value)) + ".";
  767. return buf
  768. }
  769. var Vue; // bind on install
  770. var Store = function Store (options) {
  771. var this$1 = this;
  772. if ( options === void 0 ) options = {};
  773. // Auto install if it is not done yet and `window` has `Vue`.
  774. // To allow users to avoid auto-installation in some cases,
  775. // this code should be placed here. See #731
  776. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  777. install(window.Vue);
  778. }
  779. if (false) {
  780. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  781. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  782. assert(this instanceof Store, "store must be called with the new operator.");
  783. }
  784. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  785. var strict = options.strict; if ( strict === void 0 ) strict = false;
  786. // store internal state
  787. this._committing = false;
  788. this._actions = Object.create(null);
  789. this._actionSubscribers = [];
  790. this._mutations = Object.create(null);
  791. this._wrappedGetters = Object.create(null);
  792. this._modules = new ModuleCollection(options);
  793. this._modulesNamespaceMap = Object.create(null);
  794. this._subscribers = [];
  795. this._watcherVM = new Vue();
  796. // bind commit and dispatch to self
  797. var store = this;
  798. var ref = this;
  799. var dispatch = ref.dispatch;
  800. var commit = ref.commit;
  801. this.dispatch = function boundDispatch (type, payload) {
  802. return dispatch.call(store, type, payload)
  803. };
  804. this.commit = function boundCommit (type, payload, options) {
  805. return commit.call(store, type, payload, options)
  806. };
  807. // strict mode
  808. this.strict = strict;
  809. var state = this._modules.root.state;
  810. // init root module.
  811. // this also recursively registers all sub-modules
  812. // and collects all module getters inside this._wrappedGetters
  813. installModule(this, state, [], this._modules.root);
  814. // initialize the store vm, which is responsible for the reactivity
  815. // (also registers _wrappedGetters as computed properties)
  816. resetStoreVM(this, state);
  817. // apply plugins
  818. plugins.forEach(function (plugin) { return plugin(this$1); });
  819. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  820. if (useDevtools) {
  821. devtoolPlugin(this);
  822. }
  823. };
  824. var prototypeAccessors$1 = { state: { configurable: true } };
  825. prototypeAccessors$1.state.get = function () {
  826. return this._vm._data.$$state
  827. };
  828. prototypeAccessors$1.state.set = function (v) {
  829. if (false) {
  830. assert(false, "use store.replaceState() to explicit replace store state.");
  831. }
  832. };
  833. Store.prototype.commit = function commit (_type, _payload, _options) {
  834. var this$1 = this;
  835. // check object-style commit
  836. var ref = unifyObjectStyle(_type, _payload, _options);
  837. var type = ref.type;
  838. var payload = ref.payload;
  839. var options = ref.options;
  840. var mutation = { type: type, payload: payload };
  841. var entry = this._mutations[type];
  842. if (!entry) {
  843. if (false) {
  844. console.error(("[vuex] unknown mutation type: " + type));
  845. }
  846. return
  847. }
  848. this._withCommit(function () {
  849. entry.forEach(function commitIterator (handler) {
  850. handler(payload);
  851. });
  852. });
  853. this._subscribers.forEach(function (sub) { return sub(mutation, this$1.state); });
  854. if (
  855. false
  856. ) {
  857. console.warn(
  858. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  859. 'Use the filter functionality in the vue-devtools'
  860. );
  861. }
  862. };
  863. Store.prototype.dispatch = function dispatch (_type, _payload) {
  864. var this$1 = this;
  865. // check object-style dispatch
  866. var ref = unifyObjectStyle(_type, _payload);
  867. var type = ref.type;
  868. var payload = ref.payload;
  869. var action = { type: type, payload: payload };
  870. var entry = this._actions[type];
  871. if (!entry) {
  872. if (false) {
  873. console.error(("[vuex] unknown action type: " + type));
  874. }
  875. return
  876. }
  877. try {
  878. this._actionSubscribers
  879. .filter(function (sub) { return sub.before; })
  880. .forEach(function (sub) { return sub.before(action, this$1.state); });
  881. } catch (e) {
  882. if (false) {
  883. console.warn("[vuex] error in before action subscribers: ");
  884. console.error(e);
  885. }
  886. }
  887. var result = entry.length > 1
  888. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  889. : entry[0](payload);
  890. return result.then(function (res) {
  891. try {
  892. this$1._actionSubscribers
  893. .filter(function (sub) { return sub.after; })
  894. .forEach(function (sub) { return sub.after(action, this$1.state); });
  895. } catch (e) {
  896. if (false) {
  897. console.warn("[vuex] error in after action subscribers: ");
  898. console.error(e);
  899. }
  900. }
  901. return res
  902. })
  903. };
  904. Store.prototype.subscribe = function subscribe (fn) {
  905. return genericSubscribe(fn, this._subscribers)
  906. };
  907. Store.prototype.subscribeAction = function subscribeAction (fn) {
  908. var subs = typeof fn === 'function' ? { before: fn } : fn;
  909. return genericSubscribe(subs, this._actionSubscribers)
  910. };
  911. Store.prototype.watch = function watch (getter, cb, options) {
  912. var this$1 = this;
  913. if (false) {
  914. assert(typeof getter === 'function', "store.watch only accepts a function.");
  915. }
  916. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  917. };
  918. Store.prototype.replaceState = function replaceState (state) {
  919. var this$1 = this;
  920. this._withCommit(function () {
  921. this$1._vm._data.$$state = state;
  922. });
  923. };
  924. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  925. if ( options === void 0 ) options = {};
  926. if (typeof path === 'string') { path = [path]; }
  927. if (false) {
  928. assert(Array.isArray(path), "module path must be a string or an Array.");
  929. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  930. }
  931. this._modules.register(path, rawModule);
  932. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  933. // reset store to update getters...
  934. resetStoreVM(this, this.state);
  935. };
  936. Store.prototype.unregisterModule = function unregisterModule (path) {
  937. var this$1 = this;
  938. if (typeof path === 'string') { path = [path]; }
  939. if (false) {
  940. assert(Array.isArray(path), "module path must be a string or an Array.");
  941. }
  942. this._modules.unregister(path);
  943. this._withCommit(function () {
  944. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  945. Vue.delete(parentState, path[path.length - 1]);
  946. });
  947. resetStore(this);
  948. };
  949. Store.prototype.hotUpdate = function hotUpdate (newOptions) {
  950. this._modules.update(newOptions);
  951. resetStore(this, true);
  952. };
  953. Store.prototype._withCommit = function _withCommit (fn) {
  954. var committing = this._committing;
  955. this._committing = true;
  956. fn();
  957. this._committing = committing;
  958. };
  959. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  960. function genericSubscribe (fn, subs) {
  961. if (subs.indexOf(fn) < 0) {
  962. subs.push(fn);
  963. }
  964. return function () {
  965. var i = subs.indexOf(fn);
  966. if (i > -1) {
  967. subs.splice(i, 1);
  968. }
  969. }
  970. }
  971. function resetStore (store, hot) {
  972. store._actions = Object.create(null);
  973. store._mutations = Object.create(null);
  974. store._wrappedGetters = Object.create(null);
  975. store._modulesNamespaceMap = Object.create(null);
  976. var state = store.state;
  977. // init all modules
  978. installModule(store, state, [], store._modules.root, true);
  979. // reset vm
  980. resetStoreVM(store, state, hot);
  981. }
  982. function resetStoreVM (store, state, hot) {
  983. var oldVm = store._vm;
  984. // bind store public getters
  985. store.getters = {};
  986. var wrappedGetters = store._wrappedGetters;
  987. var computed = {};
  988. forEachValue(wrappedGetters, function (fn, key) {
  989. // use computed to leverage its lazy-caching mechanism
  990. // direct inline function use will lead to closure preserving oldVm.
  991. // using partial to return function with only arguments preserved in closure enviroment.
  992. computed[key] = partial(fn, store);
  993. Object.defineProperty(store.getters, key, {
  994. get: function () { return store._vm[key]; },
  995. enumerable: true // for local getters
  996. });
  997. });
  998. // use a Vue instance to store the state tree
  999. // suppress warnings just in case the user has added
  1000. // some funky global mixins
  1001. var silent = Vue.config.silent;
  1002. Vue.config.silent = true;
  1003. store._vm = new Vue({
  1004. data: {
  1005. $$state: state
  1006. },
  1007. computed: computed
  1008. });
  1009. Vue.config.silent = silent;
  1010. // enable strict mode for new vm
  1011. if (store.strict) {
  1012. enableStrictMode(store);
  1013. }
  1014. if (oldVm) {
  1015. if (hot) {
  1016. // dispatch changes in all subscribed watchers
  1017. // to force getter re-evaluation for hot reloading.
  1018. store._withCommit(function () {
  1019. oldVm._data.$$state = null;
  1020. });
  1021. }
  1022. Vue.nextTick(function () { return oldVm.$destroy(); });
  1023. }
  1024. }
  1025. function installModule (store, rootState, path, module, hot) {
  1026. var isRoot = !path.length;
  1027. var namespace = store._modules.getNamespace(path);
  1028. // register in namespace map
  1029. if (module.namespaced) {
  1030. store._modulesNamespaceMap[namespace] = module;
  1031. }
  1032. // set state
  1033. if (!isRoot && !hot) {
  1034. var parentState = getNestedState(rootState, path.slice(0, -1));
  1035. var moduleName = path[path.length - 1];
  1036. store._withCommit(function () {
  1037. Vue.set(parentState, moduleName, module.state);
  1038. });
  1039. }
  1040. var local = module.context = makeLocalContext(store, namespace, path);
  1041. module.forEachMutation(function (mutation, key) {
  1042. var namespacedType = namespace + key;
  1043. registerMutation(store, namespacedType, mutation, local);
  1044. });
  1045. module.forEachAction(function (action, key) {
  1046. var type = action.root ? key : namespace + key;
  1047. var handler = action.handler || action;
  1048. registerAction(store, type, handler, local);
  1049. });
  1050. module.forEachGetter(function (getter, key) {
  1051. var namespacedType = namespace + key;
  1052. registerGetter(store, namespacedType, getter, local);
  1053. });
  1054. module.forEachChild(function (child, key) {
  1055. installModule(store, rootState, path.concat(key), child, hot);
  1056. });
  1057. }
  1058. /**
  1059. * make localized dispatch, commit, getters and state
  1060. * if there is no namespace, just use root ones
  1061. */
  1062. function makeLocalContext (store, namespace, path) {
  1063. var noNamespace = namespace === '';
  1064. var local = {
  1065. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  1066. var args = unifyObjectStyle(_type, _payload, _options);
  1067. var payload = args.payload;
  1068. var options = args.options;
  1069. var type = args.type;
  1070. if (!options || !options.root) {
  1071. type = namespace + type;
  1072. if (false) {
  1073. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  1074. return
  1075. }
  1076. }
  1077. return store.dispatch(type, payload)
  1078. },
  1079. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  1080. var args = unifyObjectStyle(_type, _payload, _options);
  1081. var payload = args.payload;
  1082. var options = args.options;
  1083. var type = args.type;
  1084. if (!options || !options.root) {
  1085. type = namespace + type;
  1086. if (false) {
  1087. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  1088. return
  1089. }
  1090. }
  1091. store.commit(type, payload, options);
  1092. }
  1093. };
  1094. // getters and state object must be gotten lazily
  1095. // because they will be changed by vm update
  1096. Object.defineProperties(local, {
  1097. getters: {
  1098. get: noNamespace
  1099. ? function () { return store.getters; }
  1100. : function () { return makeLocalGetters(store, namespace); }
  1101. },
  1102. state: {
  1103. get: function () { return getNestedState(store.state, path); }
  1104. }
  1105. });
  1106. return local
  1107. }
  1108. function makeLocalGetters (store, namespace) {
  1109. var gettersProxy = {};
  1110. var splitPos = namespace.length;
  1111. Object.keys(store.getters).forEach(function (type) {
  1112. // skip if the target getter is not match this namespace
  1113. if (type.slice(0, splitPos) !== namespace) { return }
  1114. // extract local getter type
  1115. var localType = type.slice(splitPos);
  1116. // Add a port to the getters proxy.
  1117. // Define as getter property because
  1118. // we do not want to evaluate the getters in this time.
  1119. Object.defineProperty(gettersProxy, localType, {
  1120. get: function () { return store.getters[type]; },
  1121. enumerable: true
  1122. });
  1123. });
  1124. return gettersProxy
  1125. }
  1126. function registerMutation (store, type, handler, local) {
  1127. var entry = store._mutations[type] || (store._mutations[type] = []);
  1128. entry.push(function wrappedMutationHandler (payload) {
  1129. handler.call(store, local.state, payload);
  1130. });
  1131. }
  1132. function registerAction (store, type, handler, local) {
  1133. var entry = store._actions[type] || (store._actions[type] = []);
  1134. entry.push(function wrappedActionHandler (payload, cb) {
  1135. var res = handler.call(store, {
  1136. dispatch: local.dispatch,
  1137. commit: local.commit,
  1138. getters: local.getters,
  1139. state: local.state,
  1140. rootGetters: store.getters,
  1141. rootState: store.state
  1142. }, payload, cb);
  1143. if (!isPromise(res)) {
  1144. res = Promise.resolve(res);
  1145. }
  1146. if (store._devtoolHook) {
  1147. return res.catch(function (err) {
  1148. store._devtoolHook.emit('vuex:error', err);
  1149. throw err
  1150. })
  1151. } else {
  1152. return res
  1153. }
  1154. });
  1155. }
  1156. function registerGetter (store, type, rawGetter, local) {
  1157. if (store._wrappedGetters[type]) {
  1158. if (false) {
  1159. console.error(("[vuex] duplicate getter key: " + type));
  1160. }
  1161. return
  1162. }
  1163. store._wrappedGetters[type] = function wrappedGetter (store) {
  1164. return rawGetter(
  1165. local.state, // local state
  1166. local.getters, // local getters
  1167. store.state, // root state
  1168. store.getters // root getters
  1169. )
  1170. };
  1171. }
  1172. function enableStrictMode (store) {
  1173. store._vm.$watch(function () { return this._data.$$state }, function () {
  1174. if (false) {
  1175. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  1176. }
  1177. }, { deep: true, sync: true });
  1178. }
  1179. function getNestedState (state, path) {
  1180. return path.length
  1181. ? path.reduce(function (state, key) { return state[key]; }, state)
  1182. : state
  1183. }
  1184. function unifyObjectStyle (type, payload, options) {
  1185. if (isObject(type) && type.type) {
  1186. options = payload;
  1187. payload = type;
  1188. type = type.type;
  1189. }
  1190. if (false) {
  1191. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  1192. }
  1193. return { type: type, payload: payload, options: options }
  1194. }
  1195. function install (_Vue) {
  1196. if (Vue && _Vue === Vue) {
  1197. if (false) {
  1198. console.error(
  1199. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  1200. );
  1201. }
  1202. return
  1203. }
  1204. Vue = _Vue;
  1205. applyMixin(Vue);
  1206. }
  1207. /**
  1208. * Reduce the code which written in Vue.js for getting the state.
  1209. * @param {String} [namespace] - Module's namespace
  1210. * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
  1211. * @param {Object}
  1212. */
  1213. var mapState = normalizeNamespace(function (namespace, states) {
  1214. var res = {};
  1215. normalizeMap(states).forEach(function (ref) {
  1216. var key = ref.key;
  1217. var val = ref.val;
  1218. res[key] = function mappedState () {
  1219. var state = this.$store.state;
  1220. var getters = this.$store.getters;
  1221. if (namespace) {
  1222. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  1223. if (!module) {
  1224. return
  1225. }
  1226. state = module.context.state;
  1227. getters = module.context.getters;
  1228. }
  1229. return typeof val === 'function'
  1230. ? val.call(this, state, getters)
  1231. : state[val]
  1232. };
  1233. // mark vuex getter for devtools
  1234. res[key].vuex = true;
  1235. });
  1236. return res
  1237. });
  1238. /**
  1239. * Reduce the code which written in Vue.js for committing the mutation
  1240. * @param {String} [namespace] - Module's namespace
  1241. * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept anthor params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  1242. * @return {Object}
  1243. */
  1244. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  1245. var res = {};
  1246. normalizeMap(mutations).forEach(function (ref) {
  1247. var key = ref.key;
  1248. var val = ref.val;
  1249. res[key] = function mappedMutation () {
  1250. var args = [], len = arguments.length;
  1251. while ( len-- ) args[ len ] = arguments[ len ];
  1252. // Get the commit method from store
  1253. var commit = this.$store.commit;
  1254. if (namespace) {
  1255. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  1256. if (!module) {
  1257. return
  1258. }
  1259. commit = module.context.commit;
  1260. }
  1261. return typeof val === 'function'
  1262. ? val.apply(this, [commit].concat(args))
  1263. : commit.apply(this.$store, [val].concat(args))
  1264. };
  1265. });
  1266. return res
  1267. });
  1268. /**
  1269. * Reduce the code which written in Vue.js for getting the getters
  1270. * @param {String} [namespace] - Module's namespace
  1271. * @param {Object|Array} getters
  1272. * @return {Object}
  1273. */
  1274. var mapGetters = normalizeNamespace(function (namespace, getters) {
  1275. var res = {};
  1276. normalizeMap(getters).forEach(function (ref) {
  1277. var key = ref.key;
  1278. var val = ref.val;
  1279. // The namespace has been mutated by normalizeNamespace
  1280. val = namespace + val;
  1281. res[key] = function mappedGetter () {
  1282. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  1283. return
  1284. }
  1285. if (false) {
  1286. console.error(("[vuex] unknown getter: " + val));
  1287. return
  1288. }
  1289. return this.$store.getters[val]
  1290. };
  1291. // mark vuex getter for devtools
  1292. res[key].vuex = true;
  1293. });
  1294. return res
  1295. });
  1296. /**
  1297. * Reduce the code which written in Vue.js for dispatch the action
  1298. * @param {String} [namespace] - Module's namespace
  1299. * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  1300. * @return {Object}
  1301. */
  1302. var mapActions = normalizeNamespace(function (namespace, actions) {
  1303. var res = {};
  1304. normalizeMap(actions).forEach(function (ref) {
  1305. var key = ref.key;
  1306. var val = ref.val;
  1307. res[key] = function mappedAction () {
  1308. var args = [], len = arguments.length;
  1309. while ( len-- ) args[ len ] = arguments[ len ];
  1310. // get dispatch function from store
  1311. var dispatch = this.$store.dispatch;
  1312. if (namespace) {
  1313. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  1314. if (!module) {
  1315. return
  1316. }
  1317. dispatch = module.context.dispatch;
  1318. }
  1319. return typeof val === 'function'
  1320. ? val.apply(this, [dispatch].concat(args))
  1321. : dispatch.apply(this.$store, [val].concat(args))
  1322. };
  1323. });
  1324. return res
  1325. });
  1326. /**
  1327. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  1328. * @param {String} namespace
  1329. * @return {Object}
  1330. */
  1331. var createNamespacedHelpers = function (namespace) { return ({
  1332. mapState: mapState.bind(null, namespace),
  1333. mapGetters: mapGetters.bind(null, namespace),
  1334. mapMutations: mapMutations.bind(null, namespace),
  1335. mapActions: mapActions.bind(null, namespace)
  1336. }); };
  1337. /**
  1338. * Normalize the map
  1339. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  1340. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  1341. * @param {Array|Object} map
  1342. * @return {Object}
  1343. */
  1344. function normalizeMap (map) {
  1345. return Array.isArray(map)
  1346. ? map.map(function (key) { return ({ key: key, val: key }); })
  1347. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  1348. }
  1349. /**
  1350. * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
  1351. * @param {Function} fn
  1352. * @return {Function}
  1353. */
  1354. function normalizeNamespace (fn) {
  1355. return function (namespace, map) {
  1356. if (typeof namespace !== 'string') {
  1357. map = namespace;
  1358. namespace = '';
  1359. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  1360. namespace += '/';
  1361. }
  1362. return fn(namespace, map)
  1363. }
  1364. }
  1365. /**
  1366. * Search a special module from store by namespace. if module not exist, print error message.
  1367. * @param {Object} store
  1368. * @param {String} helper
  1369. * @param {String} namespace
  1370. * @return {Object}
  1371. */
  1372. function getModuleByNamespace (store, helper, namespace) {
  1373. var module = store._modulesNamespaceMap[namespace];
  1374. if (false) {
  1375. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  1376. }
  1377. return module
  1378. }
  1379. var index_esm = {
  1380. Store: Store,
  1381. install: install,
  1382. version: '3.1.1',
  1383. mapState: mapState,
  1384. mapMutations: mapMutations,
  1385. mapGetters: mapGetters,
  1386. mapActions: mapActions,
  1387. createNamespacedHelpers: createNamespacedHelpers
  1388. };
  1389. /* harmony default export */ __webpack_exports__["a"] = (index_esm);
  1390. /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(0)))
  1391. /***/ }),
  1392. /* 18 */
  1393. /***/ (function(module, exports, __webpack_require__) {
  1394. /* WEBPACK VAR INJECTION */(function(process, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/**
  1395. * [js-md5]{@link https://github.com/emn178/js-md5}
  1396. *
  1397. * @namespace md5
  1398. * @version 0.7.3
  1399. * @author Chen, Yi-Cyuan [emn178@gmail.com]
  1400. * @copyright Chen, Yi-Cyuan 2014-2017
  1401. * @license MIT
  1402. */
  1403. (function () {
  1404. 'use strict';
  1405. var ERROR = 'input is invalid type';
  1406. var WINDOW = typeof window === 'object';
  1407. var root = WINDOW ? window : {};
  1408. if (root.JS_MD5_NO_WINDOW) {
  1409. WINDOW = false;
  1410. }
  1411. var WEB_WORKER = !WINDOW && typeof self === 'object';
  1412. var NODE_JS = !root.JS_MD5_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;
  1413. if (NODE_JS) {
  1414. root = global;
  1415. } else if (WEB_WORKER) {
  1416. root = self;
  1417. }
  1418. var COMMON_JS = !root.JS_MD5_NO_COMMON_JS && typeof module === 'object' && module.exports;
  1419. var AMD = "function" === 'function' && __webpack_require__(31);
  1420. var ARRAY_BUFFER = !root.JS_MD5_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';
  1421. var HEX_CHARS = '0123456789abcdef'.split('');
  1422. var EXTRA = [128, 32768, 8388608, -2147483648];
  1423. var SHIFT = [0, 8, 16, 24];
  1424. var OUTPUT_TYPES = ['hex', 'array', 'digest', 'buffer', 'arrayBuffer', 'base64'];
  1425. var BASE64_ENCODE_CHAR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
  1426. var blocks = [], buffer8;
  1427. if (ARRAY_BUFFER) {
  1428. var buffer = new ArrayBuffer(68);
  1429. buffer8 = new Uint8Array(buffer);
  1430. blocks = new Uint32Array(buffer);
  1431. }
  1432. if (root.JS_MD5_NO_NODE_JS || !Array.isArray) {
  1433. Array.isArray = function (obj) {
  1434. return Object.prototype.toString.call(obj) === '[object Array]';
  1435. };
  1436. }
  1437. if (ARRAY_BUFFER && (root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {
  1438. ArrayBuffer.isView = function (obj) {
  1439. return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;
  1440. };
  1441. }
  1442. /**
  1443. * @method hex
  1444. * @memberof md5
  1445. * @description Output hash as hex string
  1446. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
  1447. * @returns {String} Hex string
  1448. * @example
  1449. * md5.hex('The quick brown fox jumps over the lazy dog');
  1450. * // equal to
  1451. * md5('The quick brown fox jumps over the lazy dog');
  1452. */
  1453. /**
  1454. * @method digest
  1455. * @memberof md5
  1456. * @description Output hash as bytes array
  1457. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
  1458. * @returns {Array} Bytes array
  1459. * @example
  1460. * md5.digest('The quick brown fox jumps over the lazy dog');
  1461. */
  1462. /**
  1463. * @method array
  1464. * @memberof md5
  1465. * @description Output hash as bytes array
  1466. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
  1467. * @returns {Array} Bytes array
  1468. * @example
  1469. * md5.array('The quick brown fox jumps over the lazy dog');
  1470. */
  1471. /**
  1472. * @method arrayBuffer
  1473. * @memberof md5
  1474. * @description Output hash as ArrayBuffer
  1475. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
  1476. * @returns {ArrayBuffer} ArrayBuffer
  1477. * @example
  1478. * md5.arrayBuffer('The quick brown fox jumps over the lazy dog');
  1479. */
  1480. /**
  1481. * @method buffer
  1482. * @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
  1483. * @memberof md5
  1484. * @description Output hash as ArrayBuffer
  1485. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
  1486. * @returns {ArrayBuffer} ArrayBuffer
  1487. * @example
  1488. * md5.buffer('The quick brown fox jumps over the lazy dog');
  1489. */
  1490. /**
  1491. * @method base64
  1492. * @memberof md5
  1493. * @description Output hash as base64 string
  1494. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
  1495. * @returns {String} base64 string
  1496. * @example
  1497. * md5.base64('The quick brown fox jumps over the lazy dog');
  1498. */
  1499. var createOutputMethod = function (outputType) {
  1500. return function (message) {
  1501. return new Md5(true).update(message)[outputType]();
  1502. };
  1503. };
  1504. /**
  1505. * @method create
  1506. * @memberof md5
  1507. * @description Create Md5 object
  1508. * @returns {Md5} Md5 object.
  1509. * @example
  1510. * var hash = md5.create();
  1511. */
  1512. /**
  1513. * @method update
  1514. * @memberof md5
  1515. * @description Create and update Md5 object
  1516. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
  1517. * @returns {Md5} Md5 object.
  1518. * @example
  1519. * var hash = md5.update('The quick brown fox jumps over the lazy dog');
  1520. * // equal to
  1521. * var hash = md5.create();
  1522. * hash.update('The quick brown fox jumps over the lazy dog');
  1523. */
  1524. var createMethod = function () {
  1525. var method = createOutputMethod('hex');
  1526. if (NODE_JS) {
  1527. method = nodeWrap(method);
  1528. }
  1529. method.create = function () {
  1530. return new Md5();
  1531. };
  1532. method.update = function (message) {
  1533. return method.create().update(message);
  1534. };
  1535. for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
  1536. var type = OUTPUT_TYPES[i];
  1537. method[type] = createOutputMethod(type);
  1538. }
  1539. return method;
  1540. };
  1541. var nodeWrap = function (method) {
  1542. var crypto = eval("require('crypto')");
  1543. var Buffer = eval("require('buffer').Buffer");
  1544. var nodeMethod = function (message) {
  1545. if (typeof message === 'string') {
  1546. return crypto.createHash('md5').update(message, 'utf8').digest('hex');
  1547. } else {
  1548. if (message === null || message === undefined) {
  1549. throw ERROR;
  1550. } else if (message.constructor === ArrayBuffer) {
  1551. message = new Uint8Array(message);
  1552. }
  1553. }
  1554. if (Array.isArray(message) || ArrayBuffer.isView(message) ||
  1555. message.constructor === Buffer) {
  1556. return crypto.createHash('md5').update(new Buffer(message)).digest('hex');
  1557. } else {
  1558. return method(message);
  1559. }
  1560. };
  1561. return nodeMethod;
  1562. };
  1563. /**
  1564. * Md5 class
  1565. * @class Md5
  1566. * @description This is internal class.
  1567. * @see {@link md5.create}
  1568. */
  1569. function Md5(sharedMemory) {
  1570. if (sharedMemory) {
  1571. blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] =
  1572. blocks[4] = blocks[5] = blocks[6] = blocks[7] =
  1573. blocks[8] = blocks[9] = blocks[10] = blocks[11] =
  1574. blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
  1575. this.blocks = blocks;
  1576. this.buffer8 = buffer8;
  1577. } else {
  1578. if (ARRAY_BUFFER) {
  1579. var buffer = new ArrayBuffer(68);
  1580. this.buffer8 = new Uint8Array(buffer);
  1581. this.blocks = new Uint32Array(buffer);
  1582. } else {
  1583. this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  1584. }
  1585. }
  1586. this.h0 = this.h1 = this.h2 = this.h3 = this.start = this.bytes = this.hBytes = 0;
  1587. this.finalized = this.hashed = false;
  1588. this.first = true;
  1589. }
  1590. /**
  1591. * @method update
  1592. * @memberof Md5
  1593. * @instance
  1594. * @description Update hash
  1595. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
  1596. * @returns {Md5} Md5 object.
  1597. * @see {@link md5.update}
  1598. */
  1599. Md5.prototype.update = function (message) {
  1600. if (this.finalized) {
  1601. return;
  1602. }
  1603. var notString, type = typeof message;
  1604. if (type !== 'string') {
  1605. if (type === 'object') {
  1606. if (message === null) {
  1607. throw ERROR;
  1608. } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {
  1609. message = new Uint8Array(message);
  1610. } else if (!Array.isArray(message)) {
  1611. if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {
  1612. throw ERROR;
  1613. }
  1614. }
  1615. } else {
  1616. throw ERROR;
  1617. }
  1618. notString = true;
  1619. }
  1620. var code, index = 0, i, length = message.length, blocks = this.blocks;
  1621. var buffer8 = this.buffer8;
  1622. while (index < length) {
  1623. if (this.hashed) {
  1624. this.hashed = false;
  1625. blocks[0] = blocks[16];
  1626. blocks[16] = blocks[1] = blocks[2] = blocks[3] =
  1627. blocks[4] = blocks[5] = blocks[6] = blocks[7] =
  1628. blocks[8] = blocks[9] = blocks[10] = blocks[11] =
  1629. blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
  1630. }
  1631. if (notString) {
  1632. if (ARRAY_BUFFER) {
  1633. for (i = this.start; index < length && i < 64; ++index) {
  1634. buffer8[i++] = message[index];
  1635. }
  1636. } else {
  1637. for (i = this.start; index < length && i < 64; ++index) {
  1638. blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];
  1639. }
  1640. }
  1641. } else {
  1642. if (ARRAY_BUFFER) {
  1643. for (i = this.start; index < length && i < 64; ++index) {
  1644. code = message.charCodeAt(index);
  1645. if (code < 0x80) {
  1646. buffer8[i++] = code;
  1647. } else if (code < 0x800) {
  1648. buffer8[i++] = 0xc0 | (code >> 6);
  1649. buffer8[i++] = 0x80 | (code & 0x3f);
  1650. } else if (code < 0xd800 || code >= 0xe000) {
  1651. buffer8[i++] = 0xe0 | (code >> 12);
  1652. buffer8[i++] = 0x80 | ((code >> 6) & 0x3f);
  1653. buffer8[i++] = 0x80 | (code & 0x3f);
  1654. } else {
  1655. code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
  1656. buffer8[i++] = 0xf0 | (code >> 18);
  1657. buffer8[i++] = 0x80 | ((code >> 12) & 0x3f);
  1658. buffer8[i++] = 0x80 | ((code >> 6) & 0x3f);
  1659. buffer8[i++] = 0x80 | (code & 0x3f);
  1660. }
  1661. }
  1662. } else {
  1663. for (i = this.start; index < length && i < 64; ++index) {
  1664. code = message.charCodeAt(index);
  1665. if (code < 0x80) {
  1666. blocks[i >> 2] |= code << SHIFT[i++ & 3];
  1667. } else if (code < 0x800) {
  1668. blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];
  1669. blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
  1670. } else if (code < 0xd800 || code >= 0xe000) {
  1671. blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];
  1672. blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];
  1673. blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
  1674. } else {
  1675. code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
  1676. blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];
  1677. blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];
  1678. blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];
  1679. blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
  1680. }
  1681. }
  1682. }
  1683. }
  1684. this.lastByteIndex = i;
  1685. this.bytes += i - this.start;
  1686. if (i >= 64) {
  1687. this.start = i - 64;
  1688. this.hash();
  1689. this.hashed = true;
  1690. } else {
  1691. this.start = i;
  1692. }
  1693. }
  1694. if (this.bytes > 4294967295) {
  1695. this.hBytes += this.bytes / 4294967296 << 0;
  1696. this.bytes = this.bytes % 4294967296;
  1697. }
  1698. return this;
  1699. };
  1700. Md5.prototype.finalize = function () {
  1701. if (this.finalized) {
  1702. return;
  1703. }
  1704. this.finalized = true;
  1705. var blocks = this.blocks, i = this.lastByteIndex;
  1706. blocks[i >> 2] |= EXTRA[i & 3];
  1707. if (i >= 56) {
  1708. if (!this.hashed) {
  1709. this.hash();
  1710. }
  1711. blocks[0] = blocks[16];
  1712. blocks[16] = blocks[1] = blocks[2] = blocks[3] =
  1713. blocks[4] = blocks[5] = blocks[6] = blocks[7] =
  1714. blocks[8] = blocks[9] = blocks[10] = blocks[11] =
  1715. blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
  1716. }
  1717. blocks[14] = this.bytes << 3;
  1718. blocks[15] = this.hBytes << 3 | this.bytes >>> 29;
  1719. this.hash();
  1720. };
  1721. Md5.prototype.hash = function () {
  1722. var a, b, c, d, bc, da, blocks = this.blocks;
  1723. if (this.first) {
  1724. a = blocks[0] - 680876937;
  1725. a = (a << 7 | a >>> 25) - 271733879 << 0;
  1726. d = (-1732584194 ^ a & 2004318071) + blocks[1] - 117830708;
  1727. d = (d << 12 | d >>> 20) + a << 0;
  1728. c = (-271733879 ^ (d & (a ^ -271733879))) + blocks[2] - 1126478375;
  1729. c = (c << 17 | c >>> 15) + d << 0;
  1730. b = (a ^ (c & (d ^ a))) + blocks[3] - 1316259209;
  1731. b = (b << 22 | b >>> 10) + c << 0;
  1732. } else {
  1733. a = this.h0;
  1734. b = this.h1;
  1735. c = this.h2;
  1736. d = this.h3;
  1737. a += (d ^ (b & (c ^ d))) + blocks[0] - 680876936;
  1738. a = (a << 7 | a >>> 25) + b << 0;
  1739. d += (c ^ (a & (b ^ c))) + blocks[1] - 389564586;
  1740. d = (d << 12 | d >>> 20) + a << 0;
  1741. c += (b ^ (d & (a ^ b))) + blocks[2] + 606105819;
  1742. c = (c << 17 | c >>> 15) + d << 0;
  1743. b += (a ^ (c & (d ^ a))) + blocks[3] - 1044525330;
  1744. b = (b << 22 | b >>> 10) + c << 0;
  1745. }
  1746. a += (d ^ (b & (c ^ d))) + blocks[4] - 176418897;
  1747. a = (a << 7 | a >>> 25) + b << 0;
  1748. d += (c ^ (a & (b ^ c))) + blocks[5] + 1200080426;
  1749. d = (d << 12 | d >>> 20) + a << 0;
  1750. c += (b ^ (d & (a ^ b))) + blocks[6] - 1473231341;
  1751. c = (c << 17 | c >>> 15) + d << 0;
  1752. b += (a ^ (c & (d ^ a))) + blocks[7] - 45705983;
  1753. b = (b << 22 | b >>> 10) + c << 0;
  1754. a += (d ^ (b & (c ^ d))) + blocks[8] + 1770035416;
  1755. a = (a << 7 | a >>> 25) + b << 0;
  1756. d += (c ^ (a & (b ^ c))) + blocks[9] - 1958414417;
  1757. d = (d << 12 | d >>> 20) + a << 0;
  1758. c += (b ^ (d & (a ^ b))) + blocks[10] - 42063;
  1759. c = (c << 17 | c >>> 15) + d << 0;
  1760. b += (a ^ (c & (d ^ a))) + blocks[11] - 1990404162;
  1761. b = (b << 22 | b >>> 10) + c << 0;
  1762. a += (d ^ (b & (c ^ d))) + blocks[12] + 1804603682;
  1763. a = (a << 7 | a >>> 25) + b << 0;
  1764. d += (c ^ (a & (b ^ c))) + blocks[13] - 40341101;
  1765. d = (d << 12 | d >>> 20) + a << 0;
  1766. c += (b ^ (d & (a ^ b))) + blocks[14] - 1502002290;
  1767. c = (c << 17 | c >>> 15) + d << 0;
  1768. b += (a ^ (c & (d ^ a))) + blocks[15] + 1236535329;
  1769. b = (b << 22 | b >>> 10) + c << 0;
  1770. a += (c ^ (d & (b ^ c))) + blocks[1] - 165796510;
  1771. a = (a << 5 | a >>> 27) + b << 0;
  1772. d += (b ^ (c & (a ^ b))) + blocks[6] - 1069501632;
  1773. d = (d << 9 | d >>> 23) + a << 0;
  1774. c += (a ^ (b & (d ^ a))) + blocks[11] + 643717713;
  1775. c = (c << 14 | c >>> 18) + d << 0;
  1776. b += (d ^ (a & (c ^ d))) + blocks[0] - 373897302;
  1777. b = (b << 20 | b >>> 12) + c << 0;
  1778. a += (c ^ (d & (b ^ c))) + blocks[5] - 701558691;
  1779. a = (a << 5 | a >>> 27) + b << 0;
  1780. d += (b ^ (c & (a ^ b))) + blocks[10] + 38016083;
  1781. d = (d << 9 | d >>> 23) + a << 0;
  1782. c += (a ^ (b & (d ^ a))) + blocks[15] - 660478335;
  1783. c = (c << 14 | c >>> 18) + d << 0;
  1784. b += (d ^ (a & (c ^ d))) + blocks[4] - 405537848;
  1785. b = (b << 20 | b >>> 12) + c << 0;
  1786. a += (c ^ (d & (b ^ c))) + blocks[9] + 568446438;
  1787. a = (a << 5 | a >>> 27) + b << 0;
  1788. d += (b ^ (c & (a ^ b))) + blocks[14] - 1019803690;
  1789. d = (d << 9 | d >>> 23) + a << 0;
  1790. c += (a ^ (b & (d ^ a))) + blocks[3] - 187363961;
  1791. c = (c << 14 | c >>> 18) + d << 0;
  1792. b += (d ^ (a & (c ^ d))) + blocks[8] + 1163531501;
  1793. b = (b << 20 | b >>> 12) + c << 0;
  1794. a += (c ^ (d & (b ^ c))) + blocks[13] - 1444681467;
  1795. a = (a << 5 | a >>> 27) + b << 0;
  1796. d += (b ^ (c & (a ^ b))) + blocks[2] - 51403784;
  1797. d = (d << 9 | d >>> 23) + a << 0;
  1798. c += (a ^ (b & (d ^ a))) + blocks[7] + 1735328473;
  1799. c = (c << 14 | c >>> 18) + d << 0;
  1800. b += (d ^ (a & (c ^ d))) + blocks[12] - 1926607734;
  1801. b = (b << 20 | b >>> 12) + c << 0;
  1802. bc = b ^ c;
  1803. a += (bc ^ d) + blocks[5] - 378558;
  1804. a = (a << 4 | a >>> 28) + b << 0;
  1805. d += (bc ^ a) + blocks[8] - 2022574463;
  1806. d = (d << 11 | d >>> 21) + a << 0;
  1807. da = d ^ a;
  1808. c += (da ^ b) + blocks[11] + 1839030562;
  1809. c = (c << 16 | c >>> 16) + d << 0;
  1810. b += (da ^ c) + blocks[14] - 35309556;
  1811. b = (b << 23 | b >>> 9) + c << 0;
  1812. bc = b ^ c;
  1813. a += (bc ^ d) + blocks[1] - 1530992060;
  1814. a = (a << 4 | a >>> 28) + b << 0;
  1815. d += (bc ^ a) + blocks[4] + 1272893353;
  1816. d = (d << 11 | d >>> 21) + a << 0;
  1817. da = d ^ a;
  1818. c += (da ^ b) + blocks[7] - 155497632;
  1819. c = (c << 16 | c >>> 16) + d << 0;
  1820. b += (da ^ c) + blocks[10] - 1094730640;
  1821. b = (b << 23 | b >>> 9) + c << 0;
  1822. bc = b ^ c;
  1823. a += (bc ^ d) + blocks[13] + 681279174;
  1824. a = (a << 4 | a >>> 28) + b << 0;
  1825. d += (bc ^ a) + blocks[0] - 358537222;
  1826. d = (d << 11 | d >>> 21) + a << 0;
  1827. da = d ^ a;
  1828. c += (da ^ b) + blocks[3] - 722521979;
  1829. c = (c << 16 | c >>> 16) + d << 0;
  1830. b += (da ^ c) + blocks[6] + 76029189;
  1831. b = (b << 23 | b >>> 9) + c << 0;
  1832. bc = b ^ c;
  1833. a += (bc ^ d) + blocks[9] - 640364487;
  1834. a = (a << 4 | a >>> 28) + b << 0;
  1835. d += (bc ^ a) + blocks[12] - 421815835;
  1836. d = (d << 11 | d >>> 21) + a << 0;
  1837. da = d ^ a;
  1838. c += (da ^ b) + blocks[15] + 530742520;
  1839. c = (c << 16 | c >>> 16) + d << 0;
  1840. b += (da ^ c) + blocks[2] - 995338651;
  1841. b = (b << 23 | b >>> 9) + c << 0;
  1842. a += (c ^ (b | ~d)) + blocks[0] - 198630844;
  1843. a = (a << 6 | a >>> 26) + b << 0;
  1844. d += (b ^ (a | ~c)) + blocks[7] + 1126891415;
  1845. d = (d << 10 | d >>> 22) + a << 0;
  1846. c += (a ^ (d | ~b)) + blocks[14] - 1416354905;
  1847. c = (c << 15 | c >>> 17) + d << 0;
  1848. b += (d ^ (c | ~a)) + blocks[5] - 57434055;
  1849. b = (b << 21 | b >>> 11) + c << 0;
  1850. a += (c ^ (b | ~d)) + blocks[12] + 1700485571;
  1851. a = (a << 6 | a >>> 26) + b << 0;
  1852. d += (b ^ (a | ~c)) + blocks[3] - 1894986606;
  1853. d = (d << 10 | d >>> 22) + a << 0;
  1854. c += (a ^ (d | ~b)) + blocks[10] - 1051523;
  1855. c = (c << 15 | c >>> 17) + d << 0;
  1856. b += (d ^ (c | ~a)) + blocks[1] - 2054922799;
  1857. b = (b << 21 | b >>> 11) + c << 0;
  1858. a += (c ^ (b | ~d)) + blocks[8] + 1873313359;
  1859. a = (a << 6 | a >>> 26) + b << 0;
  1860. d += (b ^ (a | ~c)) + blocks[15] - 30611744;
  1861. d = (d << 10 | d >>> 22) + a << 0;
  1862. c += (a ^ (d | ~b)) + blocks[6] - 1560198380;
  1863. c = (c << 15 | c >>> 17) + d << 0;
  1864. b += (d ^ (c | ~a)) + blocks[13] + 1309151649;
  1865. b = (b << 21 | b >>> 11) + c << 0;
  1866. a += (c ^ (b | ~d)) + blocks[4] - 145523070;
  1867. a = (a << 6 | a >>> 26) + b << 0;
  1868. d += (b ^ (a | ~c)) + blocks[11] - 1120210379;
  1869. d = (d << 10 | d >>> 22) + a << 0;
  1870. c += (a ^ (d | ~b)) + blocks[2] + 718787259;
  1871. c = (c << 15 | c >>> 17) + d << 0;
  1872. b += (d ^ (c | ~a)) + blocks[9] - 343485551;
  1873. b = (b << 21 | b >>> 11) + c << 0;
  1874. if (this.first) {
  1875. this.h0 = a + 1732584193 << 0;
  1876. this.h1 = b - 271733879 << 0;
  1877. this.h2 = c - 1732584194 << 0;
  1878. this.h3 = d + 271733878 << 0;
  1879. this.first = false;
  1880. } else {
  1881. this.h0 = this.h0 + a << 0;
  1882. this.h1 = this.h1 + b << 0;
  1883. this.h2 = this.h2 + c << 0;
  1884. this.h3 = this.h3 + d << 0;
  1885. }
  1886. };
  1887. /**
  1888. * @method hex
  1889. * @memberof Md5
  1890. * @instance
  1891. * @description Output hash as hex string
  1892. * @returns {String} Hex string
  1893. * @see {@link md5.hex}
  1894. * @example
  1895. * hash.hex();
  1896. */
  1897. Md5.prototype.hex = function () {
  1898. this.finalize();
  1899. var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3;
  1900. return HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] +
  1901. HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] +
  1902. HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] +
  1903. HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] +
  1904. HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +
  1905. HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] +
  1906. HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] +
  1907. HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] +
  1908. HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +
  1909. HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] +
  1910. HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] +
  1911. HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] +
  1912. HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +
  1913. HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] +
  1914. HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] +
  1915. HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F];
  1916. };
  1917. /**
  1918. * @method toString
  1919. * @memberof Md5
  1920. * @instance
  1921. * @description Output hash as hex string
  1922. * @returns {String} Hex string
  1923. * @see {@link md5.hex}
  1924. * @example
  1925. * hash.toString();
  1926. */
  1927. Md5.prototype.toString = Md5.prototype.hex;
  1928. /**
  1929. * @method digest
  1930. * @memberof Md5
  1931. * @instance
  1932. * @description Output hash as bytes array
  1933. * @returns {Array} Bytes array
  1934. * @see {@link md5.digest}
  1935. * @example
  1936. * hash.digest();
  1937. */
  1938. Md5.prototype.digest = function () {
  1939. this.finalize();
  1940. var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3;
  1941. return [
  1942. h0 & 0xFF, (h0 >> 8) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 24) & 0xFF,
  1943. h1 & 0xFF, (h1 >> 8) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 24) & 0xFF,
  1944. h2 & 0xFF, (h2 >> 8) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 24) & 0xFF,
  1945. h3 & 0xFF, (h3 >> 8) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 24) & 0xFF
  1946. ];
  1947. };
  1948. /**
  1949. * @method array
  1950. * @memberof Md5
  1951. * @instance
  1952. * @description Output hash as bytes array
  1953. * @returns {Array} Bytes array
  1954. * @see {@link md5.array}
  1955. * @example
  1956. * hash.array();
  1957. */
  1958. Md5.prototype.array = Md5.prototype.digest;
  1959. /**
  1960. * @method arrayBuffer
  1961. * @memberof Md5
  1962. * @instance
  1963. * @description Output hash as ArrayBuffer
  1964. * @returns {ArrayBuffer} ArrayBuffer
  1965. * @see {@link md5.arrayBuffer}
  1966. * @example
  1967. * hash.arrayBuffer();
  1968. */
  1969. Md5.prototype.arrayBuffer = function () {
  1970. this.finalize();
  1971. var buffer = new ArrayBuffer(16);
  1972. var blocks = new Uint32Array(buffer);
  1973. blocks[0] = this.h0;
  1974. blocks[1] = this.h1;
  1975. blocks[2] = this.h2;
  1976. blocks[3] = this.h3;
  1977. return buffer;
  1978. };
  1979. /**
  1980. * @method buffer
  1981. * @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
  1982. * @memberof Md5
  1983. * @instance
  1984. * @description Output hash as ArrayBuffer
  1985. * @returns {ArrayBuffer} ArrayBuffer
  1986. * @see {@link md5.buffer}
  1987. * @example
  1988. * hash.buffer();
  1989. */
  1990. Md5.prototype.buffer = Md5.prototype.arrayBuffer;
  1991. /**
  1992. * @method base64
  1993. * @memberof Md5
  1994. * @instance
  1995. * @description Output hash as base64 string
  1996. * @returns {String} base64 string
  1997. * @see {@link md5.base64}
  1998. * @example
  1999. * hash.base64();
  2000. */
  2001. Md5.prototype.base64 = function () {
  2002. var v1, v2, v3, base64Str = '', bytes = this.array();
  2003. for (var i = 0; i < 15;) {
  2004. v1 = bytes[i++];
  2005. v2 = bytes[i++];
  2006. v3 = bytes[i++];
  2007. base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
  2008. BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] +
  2009. BASE64_ENCODE_CHAR[(v2 << 2 | v3 >>> 6) & 63] +
  2010. BASE64_ENCODE_CHAR[v3 & 63];
  2011. }
  2012. v1 = bytes[i];
  2013. base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
  2014. BASE64_ENCODE_CHAR[(v1 << 4) & 63] +
  2015. '==';
  2016. return base64Str;
  2017. };
  2018. var exports = createMethod();
  2019. if (COMMON_JS) {
  2020. module.exports = exports;
  2021. } else {
  2022. /**
  2023. * @method md5
  2024. * @description Md5 hash function, export to global in browsers.
  2025. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
  2026. * @returns {String} md5 hashes
  2027. * @example
  2028. * md5(''); // d41d8cd98f00b204e9800998ecf8427e
  2029. * md5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6
  2030. * md5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0
  2031. *
  2032. * // It also supports UTF-8 encoding
  2033. * md5('中文'); // a7bac2239fcdcb3a067903d8077c4a07
  2034. *
  2035. * // It also supports byte `Array`, `Uint8Array`, `ArrayBuffer`
  2036. * md5([]); // d41d8cd98f00b204e9800998ecf8427e
  2037. * md5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e
  2038. */
  2039. root.md5 = exports;
  2040. if (AMD) {
  2041. !(__WEBPACK_AMD_DEFINE_RESULT__ = function () {
  2042. return exports;
  2043. }.call(exports, __webpack_require__, exports, module),
  2044. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  2045. }
  2046. }
  2047. })();
  2048. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6), __webpack_require__(0)))
  2049. /***/ }),
  2050. /* 19 */
  2051. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2052. "use strict";
  2053. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  2054. //
  2055. //
  2056. //
  2057. //
  2058. //
  2059. //
  2060. //
  2061. //
  2062. //
  2063. //
  2064. //
  2065. //
  2066. //
  2067. //
  2068. //
  2069. //
  2070. //
  2071. //
  2072. //
  2073. //
  2074. //
  2075. //
  2076. //
  2077. /* harmony default export */ __webpack_exports__["default"] = ({
  2078. data: function data() {
  2079. return {};
  2080. },
  2081. mounted: function mounted() {},
  2082. beforeDestroy: function beforeDestroy() {},
  2083. methods: {}
  2084. });
  2085. /***/ }),
  2086. /* 20 */
  2087. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2088. "use strict";
  2089. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__env__ = __webpack_require__(21);
  2090. var BASE_URL = 'http://192.168.11.208:8070';
  2091. var config = {
  2092. env: __WEBPACK_IMPORTED_MODULE_0__env__["a" /* default */],
  2093. baseUrl: BASE_URL,
  2094. timeout: 20000
  2095. };
  2096. /* harmony default export */ __webpack_exports__["a"] = (config);
  2097. /***/ }),
  2098. /* 21 */
  2099. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2100. "use strict";
  2101. /* harmony default export */ __webpack_exports__["a"] = ("production");
  2102. /***/ }),
  2103. /* 22 */
  2104. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2105. "use strict";
  2106. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__config_config_js__ = __webpack_require__(20);
  2107. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__(5);
  2108. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_js_md5__ = __webpack_require__(18);
  2109. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_js_md5___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_js_md5__);
  2110. var baseUrl = __WEBPACK_IMPORTED_MODULE_0__config_config_js__["a" /* default */].baseUrl;
  2111. /* harmony default export */ __webpack_exports__["a"] = ({
  2112. baseUrl: baseUrl,
  2113. getSign: function getSign(data) {
  2114. return __WEBPACK_IMPORTED_MODULE_2_js_md5___default()(data);
  2115. },
  2116. formatParams: function formatParams(object) {
  2117. var ret = [];
  2118. for (var key in object) {
  2119. if (object.hasOwnProperty(key)) {
  2120. var element = object[key];
  2121. if (element !== '' && element !== undefined && element !== null) {
  2122. ret.push(key + '=' + element);
  2123. }
  2124. }
  2125. }
  2126. return ret.join('&');
  2127. },
  2128. ajax: function ajax(_ref) {
  2129. var url = _ref.url,
  2130. data = _ref.data,
  2131. token = _ref.token,
  2132. _ref$method = _ref.method,
  2133. method = _ref$method === undefined ? 'POST' : _ref$method;
  2134. var params = this.formatParams(data);
  2135. var headers = {
  2136. 'Content-Type': 'application/x-www-form-urlencoded'
  2137. };
  2138. if (token) {
  2139. headers.token = token;
  2140. }
  2141. var requstUrl = method == 'POST' ? '' + baseUrl + url : params == '' ? '' + baseUrl + url : '' + baseUrl + url + '?' + params;
  2142. var options = {
  2143. method: method,
  2144. headers: headers,
  2145. body: params
  2146. };
  2147. if (method == 'GET') {
  2148. delete options.body;
  2149. }
  2150. var res = fetch(requstUrl, options).then(function (req) {
  2151. return req.json();
  2152. });
  2153. return res;
  2154. },
  2155. get: function get(url, data) {
  2156. var token = __WEBPACK_IMPORTED_MODULE_1__common__["a" /* default */].getCookie('token') || null;
  2157. var ret = this.ajax({
  2158. url: url,
  2159. data: data,
  2160. token: token,
  2161. method: 'GET'
  2162. });
  2163. ret.then(function (_ref2) {
  2164. var code = _ref2.code,
  2165. msg = _ref2.msg;
  2166. if (code != 1) {
  2167. window.$Message.error({
  2168. content: msg,
  2169. duration: 2,
  2170. onClose: function onClose() {
  2171. switch (code) {
  2172. case -2:
  2173. window.location.href = '/login';
  2174. break;
  2175. default:
  2176. break;
  2177. }
  2178. }
  2179. });
  2180. }
  2181. }).catch(function (res) {});
  2182. return ret;
  2183. },
  2184. post: function post(url, data) {
  2185. var token = __WEBPACK_IMPORTED_MODULE_1__common__["a" /* default */].getCookie('token') || null;
  2186. if (!token && url.indexOf('login') == -1) {
  2187. return new Promise(function (res, rej) {
  2188. window.$Message.error('未登录');
  2189. window.location.href = '/login';
  2190. });
  2191. }
  2192. var ret = this.ajax({
  2193. url: url,
  2194. data: data,
  2195. token: token
  2196. });
  2197. ret.then(function (_ref3) {
  2198. var code = _ref3.code,
  2199. msg = _ref3.msg;
  2200. if (code != 1) {
  2201. console.log('=======================');
  2202. window.$Message.error({
  2203. content: msg,
  2204. duration: 2,
  2205. onClose: function onClose() {
  2206. switch (code) {
  2207. case -2:
  2208. window.location.href = '/login';
  2209. break;
  2210. default:
  2211. break;
  2212. }
  2213. }
  2214. });
  2215. }
  2216. }).catch(function (res) {});
  2217. return ret;
  2218. }
  2219. });
  2220. /***/ }),
  2221. /* 23 */
  2222. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2223. "use strict";
  2224. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  2225. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(1);
  2226. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_iview__ = __webpack_require__(2);
  2227. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_iview___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_iview__);
  2228. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vue_router__ = __webpack_require__(3);
  2229. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__router__ = __webpack_require__(9);
  2230. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__libs_util__ = __webpack_require__(8);
  2231. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__app_vue__ = __webpack_require__(15);
  2232. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__app_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__app_vue__);
  2233. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_iview_dist_styles_iview_css__ = __webpack_require__(13);
  2234. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_iview_dist_styles_iview_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_iview_dist_styles_iview_css__);
  2235. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__libs_mixins__ = __webpack_require__(7);
  2236. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__store_store__ = __webpack_require__(10);
  2237. __WEBPACK_IMPORTED_MODULE_0_vue__["default"].use(__WEBPACK_IMPORTED_MODULE_2_vue_router__["a" /* default */]);
  2238. __WEBPACK_IMPORTED_MODULE_0_vue__["default"].use(__WEBPACK_IMPORTED_MODULE_1_iview___default.a);
  2239. __WEBPACK_IMPORTED_MODULE_0_vue__["default"].use(__WEBPACK_IMPORTED_MODULE_7__libs_mixins__["a" /* default */]);
  2240. // 路由配置
  2241. var RouterConfig = {
  2242. mode: 'history',
  2243. routes: __WEBPACK_IMPORTED_MODULE_3__router__["a" /* default */]
  2244. };
  2245. var router = new __WEBPACK_IMPORTED_MODULE_2_vue_router__["a" /* default */](RouterConfig);
  2246. router.beforeEach(function (to, from, next) {
  2247. __WEBPACK_IMPORTED_MODULE_1_iview___default.a.LoadingBar.start();
  2248. __WEBPACK_IMPORTED_MODULE_4__libs_util__["a" /* default */].title(to.meta.title);
  2249. next();
  2250. });
  2251. router.afterEach(function (to, from, next) {
  2252. __WEBPACK_IMPORTED_MODULE_1_iview___default.a.LoadingBar.finish();
  2253. window.scrollTo(0, 0);
  2254. });
  2255. var app = new __WEBPACK_IMPORTED_MODULE_0_vue__["default"]({
  2256. el: '#app',
  2257. router: router,
  2258. store: __WEBPACK_IMPORTED_MODULE_8__store_store__["a" /* default */],
  2259. render: function render(h) {
  2260. return h(__WEBPACK_IMPORTED_MODULE_5__app_vue___default.a);
  2261. }
  2262. });
  2263. window.$Message = app.$Message;
  2264. /***/ }),
  2265. /* 24 */
  2266. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2267. "use strict";
  2268. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__libs_api__ = __webpack_require__(4);
  2269. var _actions, _mutations;
  2270. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  2271. var JOB_LIST = "JOB_LIST";
  2272. var ADD_JOB = "ADD_JOB";
  2273. var DEL_JOB = "DEL_JOB";
  2274. var KILL_JOB = "KILL_JOB";
  2275. var GET_LOG_LIST = "GET_LOG_LIST";
  2276. var GET_WORKER_LIST = "GET_WORKER_LIST";
  2277. /* harmony default export */ __webpack_exports__["a"] = ({
  2278. namespaced: true,
  2279. state: {
  2280. list: [],
  2281. workerList: []
  2282. },
  2283. actions: (_actions = {}, _defineProperty(_actions, GET_WORKER_LIST, async function (_ref, params) {
  2284. var commit = _ref.commit;
  2285. var res = await __WEBPACK_IMPORTED_MODULE_0__libs_api__["a" /* default */].post(__WEBPACK_IMPORTED_MODULE_0__libs_api__["a" /* default */].job.workerlist, params);
  2286. commit(GET_WORKER_LIST, res);
  2287. }), _defineProperty(_actions, GET_LOG_LIST, async function (_ref2) {
  2288. var commit = _ref2.commit;
  2289. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2290. var res = await __WEBPACK_IMPORTED_MODULE_0__libs_api__["a" /* default */].post(__WEBPACK_IMPORTED_MODULE_0__libs_api__["a" /* default */].job.loglist, params);
  2291. return res;
  2292. }), _defineProperty(_actions, JOB_LIST, async function (_ref3) {
  2293. var commit = _ref3.commit;
  2294. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2295. var res = await __WEBPACK_IMPORTED_MODULE_0__libs_api__["a" /* default */].post(__WEBPACK_IMPORTED_MODULE_0__libs_api__["a" /* default */].job.joblist, params);
  2296. commit(JOB_LIST, res);
  2297. return res;
  2298. }), _defineProperty(_actions, ADD_JOB, async function (_ref4) {
  2299. var commit = _ref4.commit;
  2300. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2301. var type;
  2302. params.isEditJob ? type = 2 : type = 1;
  2303. delete params.isEditJob;
  2304. var job = JSON.stringify(params);
  2305. var res = await __WEBPACK_IMPORTED_MODULE_0__libs_api__["a" /* default */].post(__WEBPACK_IMPORTED_MODULE_0__libs_api__["a" /* default */].job.savejob, { job: job, type: type });
  2306. return res;
  2307. }), _defineProperty(_actions, DEL_JOB, async function (_ref5) {
  2308. var commit = _ref5.commit;
  2309. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2310. var res = await __WEBPACK_IMPORTED_MODULE_0__libs_api__["a" /* default */].post(__WEBPACK_IMPORTED_MODULE_0__libs_api__["a" /* default */].job.deljob, params);
  2311. return res;
  2312. }), _defineProperty(_actions, KILL_JOB, async function (_ref6) {
  2313. var commit = _ref6.commit;
  2314. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2315. var res = await __WEBPACK_IMPORTED_MODULE_0__libs_api__["a" /* default */].post(__WEBPACK_IMPORTED_MODULE_0__libs_api__["a" /* default */].job.killjob, params);
  2316. return res;
  2317. }), _actions),
  2318. mutations: (_mutations = {}, _defineProperty(_mutations, GET_WORKER_LIST, function (state, _ref7) {
  2319. var data = _ref7.data;
  2320. var d = [];
  2321. for (var i = 0; i < data.length; i++) {
  2322. d.push({
  2323. ipNode: data[i]
  2324. });
  2325. }
  2326. state.workerList = d || [];
  2327. }), _defineProperty(_mutations, JOB_LIST, function (state, _ref8) {
  2328. var code = _ref8.code,
  2329. data = _ref8.data,
  2330. msg = _ref8.msg;
  2331. state.list = data || [];
  2332. }), _mutations)
  2333. });
  2334. /***/ }),
  2335. /* 25 */,
  2336. /* 26 */
  2337. /***/ (function(module, exports) {
  2338. // removed by extract-text-webpack-plugin
  2339. /***/ }),
  2340. /* 27 */
  2341. /***/ (function(module, exports) {
  2342. // removed by extract-text-webpack-plugin
  2343. /***/ }),
  2344. /* 28 */,
  2345. /* 29 */,
  2346. /* 30 */
  2347. /***/ (function(module, exports, __webpack_require__) {
  2348. module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
  2349. return _c('div', {
  2350. attrs: {
  2351. "id": "app"
  2352. }
  2353. }, [_c('router-view')], 1)
  2354. },staticRenderFns: []}
  2355. module.exports.render._withStripped = true
  2356. if (false) {
  2357. module.hot.accept()
  2358. if (module.hot.data) {
  2359. require("vue-loader/node_modules/vue-hot-reload-api").rerender("data-v-866dc8e0", module.exports)
  2360. }
  2361. }
  2362. /***/ }),
  2363. /* 31 */
  2364. /***/ (function(module, exports) {
  2365. /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
  2366. module.exports = __webpack_amd_options__;
  2367. /* WEBPACK VAR INJECTION */}.call(exports, {}))
  2368. /***/ })
  2369. ],[23]);