text
stringlengths
2
1.05M
/* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'toolbarswitch', 'th', { toolbarswitch: 'Switch toolbar' });
export default (a, b) => { var mismatch = 0 for (var i = 0; i < a.length || i < b.length; ++i) { mismatch |= (a.charCodeAt(i) ^ b.charCodeAt(i)) if (mismatch > 0) { return false } } return true }
(function(){ var controller = function($timeout, $log, $scope, $route, socketService, uploadService, productService, messageService) { var vm = this; $scope.products = []; vm.activate = function() { messageService.subscribe('event', 'clientController', function(channel, message){ var eventMessage = JSON.parse(message); $timeout((function(_event){ return function() { if(_event.eventType == 'progress'){ toastr.info(_event.state.name); loadProducts(); } else if(_event.eventType == 'start') { toastr.info(_event.state); } else if(_event.eventType == 'end') { toastr.info(_event.state); loadProducts(); } }; })(eventMessage), 100); }); socketService.connect(function(state, message){ messageService.route(state, message); }); }; $scope.token = 'mocked-token'; function loadProducts() { productService.getProducts(function(products){ $scope.products = products; }); } $scope.uploadProductExcel = function() { var hasProductExcel = uploadService.hasProductExcel(); if(hasProductExcel) { uploadService.uploadProductExcel($scope.token, function(result) { if(result.success) { toastr.info('Your Excel has been uploaded.' + result.id, 'Excel Uploaded'); $timeout(function(){ loadProducts(); }, 1000); } else { toastr.error(reason, 'Upload Error'); } }); } else { toastr.error('Please select your image to upload First!', 'Invalid Upload'); } }; $scope.uploadProductCsv = function() { var hasProductCsv = uploadService.hasProductCsv(); if(hasProductCsv) { uploadService.uploadProductCsv($scope.token, function(result) { if(result.success) { toastr.info('Your Csv has been uploaded.' + result.id, 'Csv Uploaded'); $timeout(function(){ loadProducts(); }, 1000); } else { toastr.error(reason, 'Upload Error'); } }); } else { toastr.error('Please select your image to upload First!', 'Invalid Upload'); } }; vm.activate(); }; var app = angular.module('client'); app.controller("clientController", ['$timeout', '$log', '$scope', '$route', 'socketService', 'uploadService', 'productService', 'messageService', controller]); })();
import Avro from '@avro/types'; import { encode, decode, Encoder, Decoder, isNativeAccelerationEnabled } from 'cbor-x'; import { Buffer } from 'buffer'; if (!isNativeAccelerationEnabled) console.warn('cbor-x native acceleration not enabled, verify that install finished properly'); // Config // const TIMES_TO_RUN = 100000; function testLoops(label, data, schema, schemaInfer, encoder, decoder) { const dataStr = JSON.stringify(data); // avsc let serialized = schema.toBuffer(data); let deserialized = schema.fromBuffer(serialized); if (dataStr !== JSON.stringify(deserialized)) console.log('****** Serialization error with avsc schema'); console.time(label + ' / avsc schema'); for (let step = 0; step < TIMES_TO_RUN; step++) { serialized = schema.toBuffer(data); deserialized = schema.fromBuffer(serialized); } console.timeEnd(label + ' / avsc schema'); // avsc infer serialized = schemaInfer.toBuffer(data); deserialized = schemaInfer.fromBuffer(serialized); if (dataStr !== JSON.stringify(deserialized)) console.log('****** Serialization error with avsc infer'); console.time(label + ' / avsc infer'); for (let step = 0; step < TIMES_TO_RUN; step++) { serialized = schemaInfer.toBuffer(data); deserialized = schemaInfer.fromBuffer(serialized); } console.timeEnd(label + ' / avsc infer'); // cbor-x encode/decode serialized = encode(data); deserialized = decode(serialized); if (dataStr !== JSON.stringify(deserialized)) console.log('****** Serialization error with cbor-x encode/decode'); console.time(label + ' / cbor-x encode/decode'); for (let step = 0; step < TIMES_TO_RUN; step++) { serialized = encode(data); deserialized = decode(serialized); } console.timeEnd(label + ' / cbor-x encode/decode'); // cbor-x encoder/decoder serialized = encoder.encode(data); deserialized = decoder.decode(serialized); if (dataStr !== JSON.stringify(deserialized)) console.log('****** Serialization error with cbor-x encoder/decoder'); console.time(label + ' / cbor-x encoder/decoder'); for (let step = 0; step < TIMES_TO_RUN; step++) { serialized = encoder.encode(data); deserialized = decoder.decode(serialized); } console.timeEnd(label + ' / cbor-x encoder/decoder'); } let encoderSimple = new Encoder({ structures: [["key", "value", "value2"]] }); let decoderSimple = new Decoder({ structures: [["key", "value", "value2"]] }); let encoder = new Encoder({ structures: [ ["key", "name", "bool", "littleInt", "bigInt", "decimal", "bigDecimal", "negativeInt", "nullValue", "stringer"] ] }); let decoder = new Decoder({ structures: [ ["key", "name", "bool", "littleInt", "bigInt", "decimal", "bigDecimal", "negativeInt", "nullValue", "stringer"] ] }); const schemaSimple = Avro.Type.forSchema({ name: 'data', type: 'record', fields: [ { name: 'key', type: 'int' }, { name: 'value', type: 'string' }, { name: 'value2', type: 'int' }, ] }); const schema = Avro.Type.forSchema({ name: 'data', type: 'record', fields: [ { name: 'key', type: 'string' }, { name: 'name', type: 'string' }, { name: 'bool', type: 'boolean' }, { name: 'littleInt', type: 'int' }, { name: 'bigInt', type: 'long' }, { name: 'decimal', type: 'double' }, { name: 'bigDecimal', type: 'double' }, { name: 'negativeInt', type: 'int' }, { name: 'nullValue', type: 'null' }, { name: 'stringer', type: 'string' } ] }); const dataSimple = { key: 1, value: "benchmark", value2: 12 }; const data = { "key": "test", "name": "Hello, World!", "bool": true, "littleInt": 3, "bigInt": 32254435, "decimal":1.332232, "bigDecimal": 3.5522E35, "negativeInt": -54, "nullValue": null, "stringer": "another string" }; const avscTypeSimple = Avro.Type.forValue(dataSimple); const avscType = Avro.Type.forValue(data); testLoops('round1-simple', dataSimple, schemaSimple, avscTypeSimple, encoderSimple, decoderSimple); testLoops('round2-simple', dataSimple, schemaSimple, avscTypeSimple, encoderSimple, decoderSimple); testLoops('round1', data, schema, avscType, encoder, decoder); testLoops('round2', data, schema, avscType, encoder, decoder);
import { ItemSheetFFG } from "./item-sheet-ffg.js"; export class ItemSheetFFGV2 extends ItemSheetFFG { constructor(...args) { super(...args); } /** @override */ static get defaultOptions() { return mergeObject(super.defaultOptions, { classes: ["starwarsffg", "sheet", "item", "v2"], tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }], scrollY: [".sheet-body", ".tab"], }); } /** @override */ get template() { const path = "systems/starwarsffg/templates/items"; return `${path}/ffg-${this.item.data.type}-sheet.html`; } getData() { const data = super.getData(); return data; } /** @override */ activateListeners(html) { super.activateListeners(html); } }
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/center/center"],{ /***/ 24: /*!*************************************************************************************************!*\ !*** /Users/gmy/Documents/HBuilderProjects/First_H5/main.js?{"page":"pages%2Fcenter%2Fcenter"} ***! \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(/*! uni-pages */ 1); var _mpvuePageFactory = _interopRequireDefault(__webpack_require__(/*! mpvue-page-factory */ 16)); var _center = _interopRequireDefault(__webpack_require__(/*! ./pages/center/center.vue */ 25));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} Page((0, _mpvuePageFactory.default)(_center.default)); /***/ }), /***/ 25: /*!******************************************************************************!*\ !*** /Users/gmy/Documents/HBuilderProjects/First_H5/pages/center/center.vue ***! \******************************************************************************/ /*! no static exports found */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _center_vue_vue_type_template_id_68e70cfb___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./center.vue?vue&type=template&id=68e70cfb& */ 26); /* harmony import */ var _center_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./center.vue?vue&type=script&lang=js& */ 28); /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _center_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _center_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__)); /* harmony import */ var _center_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./center.vue?vue&type=style&index=0&lang=css& */ 30); /* harmony import */ var _Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/vue-loader/lib/runtime/componentNormalizer.js */ 9); /* normalize component */ var component = Object(_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])( _center_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"], _center_vue_vue_type_template_id_68e70cfb___WEBPACK_IMPORTED_MODULE_0__["render"], _center_vue_vue_type_template_id_68e70cfb___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"], false, null, null, null ) /* hot reload */ if (false) { var api; } component.options.__file = "Users/gmy/Documents/HBuilderProjects/First_H5/pages/center/center.vue" /* harmony default export */ __webpack_exports__["default"] = (component.exports); /***/ }), /***/ 26: /*!*************************************************************************************************************!*\ !*** /Users/gmy/Documents/HBuilderProjects/First_H5/pages/center/center.vue?vue&type=template&id=68e70cfb& ***! \*************************************************************************************************************/ /*! exports provided: render, staticRenderFns */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_center_vue_vue_type_template_id_68e70cfb___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--17-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/vue-loader/lib??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./center.vue?vue&type=template&id=68e70cfb& */ 27); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_center_vue_vue_type_template_id_68e70cfb___WEBPACK_IMPORTED_MODULE_0__["render"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_center_vue_vue_type_template_id_68e70cfb___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; }); /***/ }), /***/ 27: /*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--17-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!/Users/gmy/Documents/HBuilderProjects/First_H5/pages/center/center.vue?vue&type=template&id=68e70cfb& ***! \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! exports provided: render, staticRenderFns */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; }); var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c("view", { staticClass: "center" }, [ _c( "view", { staticClass: "logo", attrs: { "hover-class": !_vm.login ? "logo-hover" : "", eventid: "2cf3bc9d-0" }, on: { click: _vm.goLogin } }, [ _c("image", { staticClass: "logo-img", attrs: { src: _vm.userInfo.avatar ? _vm.userInfo.avatar : _vm.avatar } }), _c("view", { staticClass: "logo-title" }, [ _c("text", { staticClass: "uer-name" }, [ _vm._v("Hi," + _vm._s(_vm.login ? _vm.userInfo.name : "您未登录")) ]), !_vm.login ? _c("text", { staticClass: "go-login navigat-arrow" }, [ _vm._v("") ]) : _vm._e() ]) ] ), _c("view", { staticClass: "center-list" }, [ _vm._m(0), _c( "view", { staticClass: "center-list-item", attrs: { eventid: "2cf3bc9d-1" }, on: { click: function($event) { _vm.goMoments() } } }, [ _c("text", { staticClass: "list-icon" }, [_vm._v("")]), _c("text", { staticClass: "list-text" }, [_vm._v("关注")]), _c("text", { staticClass: "navigat-arrow" }, [_vm._v("")]) ] ) ]), _vm._m(1), _c("view", { staticClass: "center-list" }, [ _c( "view", { staticClass: "center-list-item border-bottom", attrs: { eventid: "2cf3bc9d-2" }, on: { click: function($event) { _vm.goAbout() } } }, [ _c("text", { staticClass: "list-icon" }, [_vm._v("")]), _c("text", { staticClass: "list-text" }, [_vm._v("关于")]), _c("text", { staticClass: "navigat-arrow" }, [_vm._v("")]) ] ), _c( "view", { staticClass: "center-list-item", attrs: { eventid: "2cf3bc9d-3" }, on: { click: function($event) { _vm.goAccount() } } }, [ _c("text", { staticClass: "list-icon" }, [_vm._v("")]), _c("text", { staticClass: "list-text" }, [_vm._v("帐号管理")]), _c("text", { staticClass: "navigat-arrow" }, [_vm._v("")]) ] ) ]) ]) } var staticRenderFns = [ function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c("view", { staticClass: "center-list-item border-bottom" }, [ _c("text", { staticClass: "list-icon" }, [_vm._v("")]), _c("text", { staticClass: "list-text" }, [_vm._v("收藏")]), _c("text", { staticClass: "navigat-arrow" }, [_vm._v("")]) ]) }, function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c("view", { staticClass: "center-list" }, [ _c("view", { staticClass: "center-list-item border-bottom" }, [ _c("text", { staticClass: "list-icon" }, [_vm._v("")]), _c("text", { staticClass: "list-text" }, [_vm._v("管理")]), _c("text", { staticClass: "navigat-arrow" }, [_vm._v("")]) ]), _c("view", { staticClass: "center-list-item" }, [ _c("text", { staticClass: "list-icon" }, [_vm._v("")]), _c("text", { staticClass: "list-text" }, [_vm._v("上传作品")]), _c("text", { staticClass: "navigat-arrow" }, [_vm._v("")]) ]) ]) } ] render._withStripped = true /***/ }), /***/ 28: /*!*******************************************************************************************************!*\ !*** /Users/gmy/Documents/HBuilderProjects/First_H5/pages/center/center.vue?vue&type=script&lang=js& ***! \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_18_0_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_center_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--18-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/vue-loader/lib??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./center.vue?vue&type=script&lang=js& */ 29); /* harmony import */ var _Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_18_0_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_center_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_18_0_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_center_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__); /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_18_0_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_center_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_18_0_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_center_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__)); /* harmony default export */ __webpack_exports__["default"] = (_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_18_0_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_center_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ 29: /*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--18-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!/Users/gmy/Documents/HBuilderProjects/First_H5/pages/center/center.vue?vue&type=script&lang=js& ***! \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = { data: function data() { return { login: false, avatar: "../../static/logo.png", userInfo: {} }; }, //页面加载完成时发送的请求 onLoad: function onLoad() { this.getUserInfo(); }, methods: { //获取用户信息 getUserInfo: function getUserInfo() {var _this = this; uni.request({ url: this.$apiUrl + '/api/v0/user/info', success: function success(ret) { if (ret.statusCode !== 200) { console.log("Fail UserInfo"); } else { _this.userInfo = ret.data.data; _this.login = _this.userInfo.id; //是否登陆的标志 } }, fail: function fail(ret) { uni.onNetworkStatusChange(function (res) { console.log(res.isConnected); console.log(res.networkType); }); }, complete: function complete(ret) { _this.loading = false; } }); }, goLogin: function goLogin() { if (!this.login) { uni.navigateTo({ url: "../login/login" }); } }, goAccount: function goAccount() { if (this.login) { uni.navigateTo({ url: "../account/account" }); } }, goMoments: function goMoments() { uni.navigateTo({ url: "../moments/moments" }); }, goAbout: function goAbout() { } } };exports.default = _default; /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 12)["default"])) /***/ }), /***/ 30: /*!***************************************************************************************************************!*\ !*** /Users/gmy/Documents/HBuilderProjects/First_H5/pages/center/center.vue?vue&type=style&index=0&lang=css& ***! \***************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_1_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_index_js_ref_6_oneOf_1_2_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_loaders_stylePostLoader_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_center_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader??ref--6-oneOf-1-2!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src??ref--6-oneOf-1-3!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/vue-loader/lib??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./center.vue?vue&type=style&index=0&lang=css& */ 31); /* harmony import */ var _Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_1_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_index_js_ref_6_oneOf_1_2_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_loaders_stylePostLoader_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_center_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_1_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_index_js_ref_6_oneOf_1_2_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_loaders_stylePostLoader_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_center_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__); /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_1_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_index_js_ref_6_oneOf_1_2_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_loaders_stylePostLoader_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_center_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_1_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_index_js_ref_6_oneOf_1_2_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_loaders_stylePostLoader_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_center_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__)); /* harmony default export */ __webpack_exports__["default"] = (_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_1_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_index_js_ref_6_oneOf_1_2_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_loaders_stylePostLoader_js_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_center_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ 31: /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-1!./node_modules/css-loader??ref--6-oneOf-1-2!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-oneOf-1-3!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!/Users/gmy/Documents/HBuilderProjects/First_H5/pages/center/center.vue?vue&type=style&index=0&lang=css& ***! \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }) },[[24,"common/runtime","common/vendor"]]]); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/center/center.js.map
import { routerRedux } from 'dva/router'; import moment from 'moment'; import { reqWaitList, selectList, pushList,reqSearch } from '../services/dealAccountList'; import { message, notification, } from 'antd'; import Item from 'antd/lib/list/Item'; export default { namespace: 'dealAccountList', state: { startDate:moment().add(-30, 'days').format('YYYY-MM-DD'), endDate: moment().format('YYYY-MM-DD'), expectPayTimeStart: '', expectPayTimeEnd: '', purchaseTimeStart: '', purchaseTimeEnd: '', awaitPayTotalMoney: '', purchaseGoodsList: [], orderIds: '', isShowList: false, inputNum: '', isEidet: false, purchaseTotalSure: 0, inputRealPriceTotal: '', isShowSureExpire: false, isShowSureService: false, accountRemark: '', goodsList: [], noChangeShouldPayTotal: '', pageSize: 100, currentPage: 1, total: '', orderSn: '', goodsKeywords: '', consignee: '', purchaseType: '', supplierId: '', supplierName: '', selectedRowIds: [], selectedRows: [], payCreditTypeMap: {}, purchaseTypeMap: '', payMethod: "", financeRemark: '', choseAllRealShouldPay: 0, actionList: [], activeKey:'1', agencyAwaitPayTotalMoney:'', agencyActionList:[], agencyPurchaseGoodsList: [], agencyTotal: 0, agencySupplierName: '', agencyPageSize:100, agencyOrderSn:'', agencyGoodsKeywords:'', agencyCurrentPage:1, agencyConsignee:'', agencyPurchaseType:'', agencyExpectPayTimeStart:'', agencyExpectPayTimeEnd:'', agencyPurchaseTimeStart:'', agencyPurchaseTimeEnd:'', agencySupplierId:'', agencyPayType:"", editRow:{}, balanceBillTotalAmount:0, isDeduction:false, balanceBillAmount:0, balanceBillOutInvAmount:0, isOutInv:true, bankType:'', bankInfoId:'', selectTotalAmount:0, notApplyAmount:0, appliedNotPayMoney:0, agencyNotApplyAmount:0, agencyAppliedAmount:0 }, effects: { *getList({ payload },{ put, select, call }) { yield put({ type: 'getListResolved', payload:{ ...payload, } }); const { activeKey } = yield select(state=>state.dealAccountList); if(activeKey == 1) { yield put({ type:'getDirectList', }) }else{ yield put({ type:'getAgencyList', }) } }, *getDirectList({ payload }, { put, select, call }) { yield put({ type: 'getListResolved', payload:{ ...payload, isTableLoadingOrd:true, } }); const { pageSize, orderSn, goodsKeywords, currentPage, consignee, purchaseType, expectPayTimeStart, expectPayTimeEnd, purchaseTimeStart, purchaseTimeEnd, supplierId, payMethod, } = yield select(state => state.dealAccountList); try { const waitList = yield call(reqWaitList, { pageSize, orderSn, goodsKeywords, consignee, currentPage, purchaseType, expectPayTimeStart, expectPayTimeEnd, purchaseTimeStart, purchaseTimeEnd, supplierId, payMethod, payType:2, }); // waitList.data.purchaseGoodsList.map((item) => { // item.editNum = item.realNum; // item.realPayNow = item.realAmount; // }); yield put({ type: 'getListResolved', payload: { awaitPayTotalMoney: waitList.data.awaitPayTotalMoney, actionList:waitList.data.actionList, purchaseGoodsList: waitList.data.purchaseGoodsList, total: waitList.data.total, supplierName: waitList.data.supplierName, balanceBillTotalAmount:waitList.data.balanceBillTotalAmount, notApplyAmount:waitList.data.notApplyAmount, appliedNotPayMoney:waitList.data.appliedNotPayMoney, }, }); yield put({ type: 'getListResolved', payload:{ isTableLoadingOrd:false, } }); } catch (error) { console.log(error); } }, *getAgencyList({ payload },{ put, select, call }) { yield put({ type: 'getListResolved', payload:{ ...payload, // isTableLoadingOrd:true, } }); const { agencyPageSize, agencyOrderSn, agencyGoodsKeywords, agencyCurrentPage, agencyConsignee, agencyPurchaseType, agencyExpectPayTimeStart, agencyExpectPayTimeEnd, agencyPurchaseTimeStart, agencyPurchaseTimeEnd, agencyPayCreditType, agencyPayType, supplierId } = yield select(state => state.dealAccountList); try { const waitList = yield call(reqWaitList, { pageSize:agencyPageSize, orderSn:agencyOrderSn, goodsKeywords:agencyGoodsKeywords, consignee:agencyConsignee, currentPage:agencyCurrentPage, purchaseType:agencyPurchaseType, expectPayTimeStart:agencyExpectPayTimeStart, expectPayTimeEnd:agencyExpectPayTimeEnd, purchaseTimeStart:agencyPurchaseTimeStart, purchaseTimeEnd:agencyPurchaseTimeEnd, supplierId, payCreditType:agencyPayCreditType, payMethod:agencyPayType, payType:4, }); // waitList.data.purchaseGoodsList.map((item) => { // item.editNum = item.realNum; // item.realPayNow = item.realAmount; // }); yield put({ type: 'getListResolved', payload: { agencyAwaitPayTotalMoney: waitList.data.awaitPayTotalMoney, agencyActionList:waitList.data.actionList, agencyPurchaseGoodsList: waitList.data.purchaseGoodsList, agencyTotal: waitList.data.total, agencySupplierName: waitList.data.supplierName, agencyNotApplyAmount:waitList.data.notApplyAmount, agencyAppliedAmount:waitList.data.appliedNotPayMoney, }, }); yield put({ type: 'getListResolved', // payload:{ // isTableLoadingOrd:false, // } }); } catch (error) { console.log(error); } }, *getSelectList({ payload }, { put, call }) { try { const selectData = yield call(selectList, { }); yield put({ type: 'getListResolved', payload: { payCreditTypeMap: selectData.data.payCreditTypeMap, purchaseTypeMap: selectData.data.purchaseTypeMap, ...payload, }, }); } catch (error) { } }, *searchList({ payload }, { put }) { yield put({ type: 'getListResolved', payload: { ...payload, }, }); yield put({ type: 'getList', payload: { ...payload, }, }); }, *unmount(_, { put }) { yield put({ type: 'unmountReducer', }); }, // 对账单弹窗 *checkAccountList({ payload }, { put }) { yield put({ type: 'getListResolved', payload: { ...payload, }, }); }, // 点击生成对账单的时候发请求 *searchSelectedRows({ payload },{ put, call, select }) { yield put({ type:'getListResolved', payload:{ ...payload, } }) const { selectedRows, startDate, endDate } = yield select(state=>state.dealAccountList); let selectedGoods = []; selectedRows.map(item=>{ selectedGoods.push({id:item.goodsId}) item.editNum = item.realNum; item.realAmount = (item.editNum * item.purchasePrice).toFixed(2); }) let purchaseTotalSure = selectedRows.reduce((pre,next)=>{ return pre + (+next.realAmount) },0) try{ const res = yield call(reqSearch,{ startDate,endDate, goodsList: selectedGoods }); const searchedGoodsList = JSON.parse(JSON.stringify(res.data.goodsList)); searchedGoodsList.map(item=>{ item.goodsId = item.id; delete item.id }) selectedRows.map(item=>{ searchedGoodsList.map(goodsItem=>{ if(item.goodsId == goodsItem.goodsId) { item = Object.assign(item,goodsItem); } }) }) yield put({ type:'getListResolved', payload:{ backList:res.data.goodsList, selectedRows, purchaseTotalSure, } }) }catch(err){ console.log(err) } }, // 提交对账单 *changeConfirmAccount({ payload }, { put, select, call }) { yield put({ type: 'getListResolved', payload: { ...payload, }, }); const { accountRemark, goodsList, supplierId, financeRemark, activeKey, startDate, endDate, isDeduction, balanceBillAmount, isOutInv, balanceBillOutInvAmount, bankType, bankInfoId } = yield select(state => state.dealAccountList); const isSubmit = goodsList.some((item) => { return item.applyNumber == undefined; }); try { if (isSubmit != true) { const res = yield call(pushList, { accountRemark, supplierId, goodsList, financeRemark, payType:activeKey==1?2:4, salePeriodDateStart:startDate, salePeriodDateEnd:endDate, balanceBillAmount:isDeduction?balanceBillAmount:'', isOutInv:isDeduction?isOutInv:false, balanceBillOutInvAmount:isOutInv?balanceBillOutInvAmount:'', bankType, bankInfoId }); if (res.code === 0) { notification.success({ message: '成功提示', description: '生成对账单成功!', }); yield put( routerRedux.push('/purchase/purchase-order-management/purchase-apply-for-payment-list')) } } else { message.warn('数量不能为空,请输入数量'); } } catch (error) { console.log(error); } }, // 取消对账单 *changeCancelAccount({ payload }, { put }) { yield put({ type: 'getListResolved', payload: { ...payload, }, }); }, }, reducers: { getListResolved(state, { payload }) { return { ...state, ...payload, }; }, getListPending(state) { return { ...state, isTableLoadingOrd: true, }; }, unmountReducer() { return { expectPayTimeStart: '', expectPayTimeEnd: '', purchaseTimeStart: '', purchaseTimeEnd: '', awaitPayTotalMoney: '', purchaseGoodsList: [], orderIds: '', isShowList: false, inputNum: '', isEidet: false, inputRealPriceTotal: '', isShowSureExpire: false, isShowSureService: false, accountRemark: '', goodsList: [], noChangeShouldPayTotal: '', pageSize: 100, currentPage: 1, total: '', orderSn: '', goodsKeywords: '', consignee: '', purchaseType: '', supplierId: '', supplierName: '', // orderIdLists: [], selectedRowIds: [], selectedRows: [], payCreditTypeMap: {}, purchaseTypeMap: '', payMethod: "", financeRemark: '', choseAllRealShouldPay: 0, actionList: [], activeKey:'1', agencyAwaitPayTotalMoney:'', agencyActionList:[], agencyPurchaseGoodsList: [], agencyTotal: 0, agencySupplierName: '', agencyPageSize:100, agencyOrderSn:'', agencyGoodsKeywords:'', agencyCurrentPage:1, agencyConsignee:'', agencyPurchaseType:'', agencyExpectPayTimeStart:'', agencyExpectPayTimeEnd:'', agencyPurchaseTimeStart:'', agencyPurchaseTimeEnd:'', agencySupplierId:'', agencyPayCreditType:'', agencyPayType:"", startDate:moment().add(-30, 'days').format('YYYY-MM-DD'), endDate: moment().format('YYYY-MM-DD'), editRow:{}, balanceBillTotalAmount:0, isDeduction:false, balanceBillAmount:0, balanceBillOutInvAmount:0, isOutInv:true, bankType:'', bankInfoId:'', purchaseTotalSure:0, selectTotalAmount:0, notApplyAmount:0, agencyNotApplyAmount:0, agencyAppliedAmount:0 }; }, getListOver(state) { return { ...state, isTableLoadingOrd: false, }; }, }, };
module.exports = function (app, gestorBD, logger) { // ---- PETICIONES GET ---- /* Busca todas las ofertas disponibles (ofertas en las que el usuario logueado no es el propietario). Si hay algún error al recuperar las ofertas -> Error del servidor 500 (Se ha producido un error al recuperar las ofertas disponibles) Si no hubo errores -> Respuesta satisfactoria 200 y se devuelven las ofertas encontradas. */ app.get("/api/offer/availableOffers", function (req, res) { // Obtenemos todas las ofertas (excepto en las que el propitario es el usuario que está logueado actualmente) let criterio = {owner: {$ne: res.usuario}}; gestorBD.obtenerOfertas(criterio, {}, function (ofertas) { if (ofertas == null) { logger.error(res.usuario + " tuvo algún problema al recuperar las ofertas " + "disponibles de la base de datos"); res.status(500); res.json({ error: "Se ha producido un error al recuperar las ofertas disponibles" }) } else { logger.info(res.usuario + " ha accedido a la lista de ofertas disponibles"); res.status(200); res.send(JSON.stringify(ofertas)); } }); }); /* Busca todos los mensajes enviados por el usuario logueado y recibidos por el propitario de la oferta indicada (mediante su id 'offerId'). Si hay algún error al recuperar la oferta -> Error del servidor 500 (Se ha producido un error al recuperar los mensajes). Si no hubo errores -> Respuesta satisfactoria 200 y se devuelven los mensajes encontradas ordenados por fecha de forma ascendente. */ app.get("/api/message/list/:offerId", function (req, res) { // Buscamos los mensajes para la oferta indicada donde el remitente o el receptor es el usuario // que está actualmente logueado let criterio = { $and: [{offerId: gestorBD.mongo.ObjectID(req.params.offerId)}, {$or: [{sender: res.usuario}, {receiver: res.usuario}]}] }; let sort = {creationDate: 1}; gestorBD.obtenerMensajes(criterio, sort, function (mensajes) { if (mensajes == null) { logger.error(res.usuario + " tuvo algún problema al recuperar los mensajes " + "disponibles de la base de datos"); res.status(500); res.json({ error: "Se ha producido un error al recuperar los mensajes" }) } else { logger.info(res.usuario + " ha accedido a la lista de mensajes para la oferta " + req.params.offerId); res.status(200); res.send(JSON.stringify(mensajes)); } }); }); // ---- PETICIONES POST ---- /* Añade un mensaje a una conversación. Solo el interesado puede iniciar una conversación, es decir, crear el primer mensaje. Se debe recibir en formato JSON un mensaje (que no puede ser vacío) y el id de la oferta (que debe ser un id válido). Si se recibe un mensaje vacío o un id de oferta inválido -> Error del cliente 400 (Array con todos los errores encontrados). Si hay algún error al recuperar la oferta -> Error del servidor 500 (Error al recuperar la oferta). Si el usuario logueado es el propitario de la oferta -> Error del cliente 403 (Es el dueño de esta oferta). Si la oferta esta comprada -> Error del cliente 403 (No se puede mandar un mensaje a una oferta comprada). Si hay algún error al insertar el mensaje -> Error del servidor 500 (Error al crear el mensaje). Si no hubo errroes -> Respuesta satisfactoria 201, se devuelve un mensaje informativo y el id del mensaje insertado en la base de datos. */ app.post("/api/message/add", function (req, res) { // Variable que contendrá los errores encontrados en las entradas del usuario let errores = []; if (!req.body.message) { // ¿ Mensaje vacío / válido ? errores.push("Debe incluir un mensaje que no sea vacío"); } if (!gestorBD.mongo.ObjectID.isValid(req.body.offerId)) { // ¿ Id de oferta válido ? errores.push("Debe incluir un id de oferta válido"); } if (errores.length == 0) { // Se obtiene la oferta que tiene el id especificado let criterio = {_id: gestorBD.mongo.ObjectID(req.body.offerId)}; gestorBD.obtenerOfertas(criterio, {}, function (ofertas) { if (ofertas == null || ofertas.length == 0) { logger.error(res.usuario + " tuvo algún problema al recuperar las ofertas " + "disponibles de la base de datos"); res.status(500); res.json({ error: "Error al recuperar la oferta" }); } else { if (ofertas[0].owner != res.usuario) { // ¿ El usuario logueado es el propitario ? if (!ofertas[0].buyer) { // ¿ La oferta esta comprada ? let mensaje = { sender: res.usuario, receiver: ofertas[0].owner, offerId: gestorBD.mongo.ObjectID(req.body.offerId), message: req.body.message, creationDate: new Date(), read: false } // Se inserta el mensaje gestorBD.insertarMensaje(mensaje, function (id) { if (id == null) { logger.error(res.usuario + " tuvo algún problema al insertar el mensaje " + "en la base de datos"); res.status(500); res.json({ error: "Error al crear el mensaje" }); } else { logger.info(res.usuario + " ha mandado un mensaje correctamente a la oferta " + req.body.offerId); res.status(201); res.json({ mensaje: "mensaje insertado", _id: id }); } }); } else { logger.error(res.usuario + " ha intenta mandar un mensaje utilizando " + "una oferta comprada"); res.status(403); res.json({ error: "No se puede mandar un mensaje a una oferta comprada" }); } } else { logger.error(res.usuario + " ha intentado mandar un mensaje utilizando " + "una oferta de su propiedad"); res.status(403); res.json({ error: "Es el dueño de esta oferta" }); } } }); } else { logger.error(res.usuario + " ha pasado un mensaje vacío o un id de oferta inválido"); res.status(400); res.json({ errores: errores }); } }); /* Loguea al usuario en la aplicación (generando un Token único para este). Si hay algún error al recuperar al usuario de la base de datos -> Error del cliente 401 (valor booleano de autenticado a false indicando que el usuario no se ha podido autenticar correctamente). Si no hubo errroes -> Respuesta satisfactoria 200 y se devuelve el token creado (junto con un booleano a true indicando que no hubo errores). */ app.post("/api/login", function (req, res) { // ¿ Credenciales correctas ? let seguro = app.get("crypto").createHmac('sha256', app.get('clave')) .update(req.body.password).digest('hex'); let criterio = { email: req.body.email, password: seguro } // Se recupera al usuario gestorBD.obtenerUsuarios(criterio, {}, function (usuarios) { if (usuarios == null || usuarios.length == 0) { logger.error("No se ha encontrado al usuario con las credenciales introducidas " + "en el formulario de inicio de sesión"); res.status(401); res.json({ autenticado: false }); } else { let token = app.get('jwt').sign( {usuario: criterio.email, tiempo: Date.now() / 1000}, "secreto"); logger.info(criterio.email + " ha iniciado sesión correctamente"); res.status(200); res.json({ autenticado: true, token: token }); } }); }); };
// Test copyDatabase command with various combinations of authed/unauthed source and dest. ports = allocatePorts( 2 ); var baseName = "jstests_clone_copyauth"; // test copyDatabase from an auth enabled source, with an unauthed dest. var source = startMongod( "--auth", "--port", ports[ 0 ], "--dbpath", "/data/db/" + baseName + "_source", "--nohttpinterface", "--bind_ip", "127.0.0.1", "--smallfiles" ); var target = startMongod( "--port", ports[ 1 ], "--dbpath", "/data/db/" + baseName + "_target", "--nohttpinterface", "--bind_ip", "127.0.0.1", "--smallfiles" ); source.getDB( baseName )[ baseName ].save( {i:1} ); source.getDB( baseName ).addUser( "foo", "bar" ); source.getDB( "admin" ).addUser( "super", "super" ); assert.throws( function() { source.getDB( baseName )[ baseName ].findOne(); } ); assert.commandWorked(target.getDB(baseName).copyDatabase(baseName, baseName, source.host, "foo", "bar")); assert.eq( 1, target.getDB( baseName )[ baseName ].count() ); assert.eq( 1, target.getDB( baseName )[ baseName ].findOne().i ); // Test with auth-enabled source and dest stopMongod( ports[ 1 ] ); var target = startMongod( "--auth", "--port", ports[ 1 ], "--dbpath", "/data/db/" + baseName + "_target", "--nohttpinterface", "--bind_ip", "127.0.0.1", "--smallfiles" ); target.getDB( "admin" ).addUser( "super1", "super1" ); assert.throws( function() { source.getDB( baseName )[ baseName ].findOne(); } ); target.getDB( "admin" ).auth( "super1", "super1" ); target.getDB(baseName).dropDatabase(); assert.eq(0, target.getDB(baseName)[baseName].count()); assert.commandWorked(target.getDB(baseName).copyDatabase(baseName, baseName, source.host, "foo", "bar")); assert.eq( 1, target.getDB( baseName )[ baseName ].count() ); assert.eq( 1, target.getDB( baseName )[ baseName ].findOne().i ); // Test with auth-enabled dest, but un-authed source stopMongod(ports[0]); var source = startMongod( "--port", ports[ 0 ], "--dbpath", "/data/db/" + baseName + "_source", "--nohttpinterface", "--bind_ip", "127.0.0.1", "--smallfiles" ); // Need to re-insert doc as data will be cleared by the restart source.getDB(baseName)[baseName].save({i:1}); assert.eq(1, source.getDB(baseName)[baseName].count()); assert.eq(1, source.getDB(baseName)[baseName].findOne().i); target.getDB(baseName).dropDatabase(); assert.eq(0, target.getDB(baseName)[baseName].count()); assert.commandWorked(target.getDB(baseName).copyDatabase(baseName, baseName, source.host)); assert.eq(1, target.getDB(baseName)[baseName].count()); assert.eq(1, target.getDB(baseName)[baseName].findOne().i);
class RequestError extends Error { constructor(response) { super(response.message); this.name = 'RequestError'; this.success = false; this.message = response.message; this.code = response.code; this.errorObj = response.errorObj; this.debug = response.debug; Error.captureStackTrace(this, RequestError); } } export default RequestError;
(function(root) { root.AV = root.AV || {}; var AV = root.AV; var _ = AV._; /** * @class * * <p>A AV.User object is a local representation of a user persisted to the * AV cloud. This class is a subclass of a AV.Object, and retains the * same functionality of a AV.Object, but also extends it with various * user specific methods, like authentication, signing up, and validation of * uniqueness.</p> */ AV.User = AV.Object.extend("_User", /** @lends AV.User.prototype */ { // Instance Variables _isCurrentUser: false, // Instance Methods /** * Internal method to handle special fields in a _User response. */ _mergeMagicFields: function(attrs) { if (attrs.sessionToken) { this._sessionToken = attrs.sessionToken; delete attrs.sessionToken; } AV.User.__super__._mergeMagicFields.call(this, attrs); }, /** * Removes null values from authData (which exist temporarily for * unlinking) */ _cleanupAuthData: function() { if (!this.isCurrent()) { return; } var authData = this.get('authData'); if (!authData) { return; } AV._objectEach(this.get('authData'), function(value, key) { if (!authData[key]) { delete authData[key]; } }); }, /** * Synchronizes authData for all providers. */ _synchronizeAllAuthData: function() { var authData = this.get('authData'); if (!authData) { return; } var self = this; AV._objectEach(this.get('authData'), function(value, key) { self._synchronizeAuthData(key); }); }, /** * Synchronizes auth data for a provider (e.g. puts the access token in the * right place to be used by the Facebook SDK). */ _synchronizeAuthData: function(provider) { if (!this.isCurrent()) { return; } var authType; if (_.isString(provider)) { authType = provider; provider = AV.User._authProviders[authType]; } else { authType = provider.getAuthType(); } var authData = this.get('authData'); if (!authData || !provider) { return; } var success = provider.restoreAuthentication(authData[authType]); if (!success) { this._unlinkFrom(provider); } }, _handleSaveResult: function(makeCurrent) { // Clean up and synchronize the authData object, removing any unset values if (makeCurrent) { this._isCurrentUser = true; } this._cleanupAuthData(); this._synchronizeAllAuthData(); // Don't keep the password around. delete this._serverData.password; this._rebuildEstimatedDataForKey("password"); this._refreshCache(); if (makeCurrent || this.isCurrent()) { AV.User._saveCurrentUser(this); } }, /** * Unlike in the Android/iOS SDKs, logInWith is unnecessary, since you can * call linkWith on the user (even if it doesn't exist yet on the server). */ _linkWith: function(provider, options) { var authType; if (_.isString(provider)) { authType = provider; provider = AV.User._authProviders[provider]; } else { authType = provider.getAuthType(); } if (_.has(options, 'authData')) { var authData = this.get('authData') || {}; authData[authType] = options.authData; this.set('authData', authData); // Overridden so that the user can be made the current user. var newOptions = _.clone(options) || {}; newOptions.success = function(model) { model._handleSaveResult(true); if (options.success) { options.success.apply(this, arguments); } }; return this.save({'authData': authData}, newOptions); } else { var self = this; var promise = new AV.Promise(); provider.authenticate({ success: function(provider, result) { self._linkWith(provider, { authData: result, success: options.success, error: options.error }).then(function() { promise.resolve(self); }); }, error: function(provider, error) { if (options.error) { options.error(self, error); } promise.reject(error); } }); return promise; } }, /** * Unlinks a user from a service. */ _unlinkFrom: function(provider, options) { var authType; if (_.isString(provider)) { authType = provider; provider = AV.User._authProviders[provider]; } else { authType = provider.getAuthType(); } var newOptions = _.clone(options); var self = this; newOptions.authData = null; newOptions.success = function(model) { self._synchronizeAuthData(provider); if (options.success) { options.success.apply(this, arguments); } }; return this._linkWith(provider, newOptions); }, /** * Checks whether a user is linked to a service. */ _isLinked: function(provider) { var authType; if (_.isString(provider)) { authType = provider; } else { authType = provider.getAuthType(); } var authData = this.get('authData') || {}; return !!authData[authType]; }, /** * Deauthenticates all providers. */ _logOutWithAll: function() { var authData = this.get('authData'); if (!authData) { return; } var self = this; AV._objectEach(this.get('authData'), function(value, key) { self._logOutWith(key); }); }, /** * Deauthenticates a single provider (e.g. removing access tokens from the * Facebook SDK). */ _logOutWith: function(provider) { if (!this.isCurrent()) { return; } if (_.isString(provider)) { provider = AV.User._authProviders[provider]; } if (provider && provider.deauthenticate) { provider.deauthenticate(); } }, /** * Signs up a new user. You should call this instead of save for * new AV.Users. This will create a new AV.User on the server, and * also persist the session on disk so that you can access the user using * <code>current</code>. * * <p>A username and password must be set before calling signUp.</p> * * <p>Calls options.success or options.error on completion.</p> * * @param {Object} attrs Extra fields to set on the new user, or null. * @param {Object} options A Backbone-style options object. * @return {AV.Promise} A promise that is fulfilled when the signup * finishes. * @see AV.User.signUp */ signUp: function(attrs, options) { var error; options = options || {}; var username = (attrs && attrs.username) || this.get("username"); if (!username || (username === "")) { error = new AV.Error( AV.Error.OTHER_CAUSE, "Cannot sign up user with an empty name."); if (options && options.error) { options.error(this, error); } return AV.Promise.error(error); } var password = (attrs && attrs.password) || this.get("password"); if (!password || (password === "")) { error = new AV.Error( AV.Error.OTHER_CAUSE, "Cannot sign up user with an empty password."); if (options && options.error) { options.error(this, error); } return AV.Promise.error(error); } // Overridden so that the user can be made the current user. var newOptions = _.clone(options); newOptions.success = function(model) { model._handleSaveResult(true); if (options.success) { options.success.apply(this, arguments); } }; return this.save(attrs, newOptions); }, /** * Signs up a new user with mobile phone and sms code. * You should call this instead of save for * new AV.Users. This will create a new AV.User on the server, and * also persist the session on disk so that you can access the user using * <code>current</code>. * * <p>A username and password must be set before calling signUp.</p> * * <p>Calls options.success or options.error on completion.</p> * * @param {Object} attrs Extra fields to set on the new user, or null. * @param {Object} options A Backbone-style options object. * @return {AV.Promise} A promise that is fulfilled when the signup * finishes. * @see AV.User.signUpOrlogInWithMobilePhone * @see AV.Cloud.requestSmsCode */ signUpOrlogInWithMobilePhone: function(attrs, options) { var error; options = options || {}; var mobilePhoneNumber = (attrs && attrs.mobilePhoneNumber) || this.get("mobilePhoneNumber"); if (!mobilePhoneNumber || (mobilePhoneNumber === "")) { error = new AV.Error( AV.Error.OTHER_CAUSE, "Cannot sign up or login user by mobilePhoneNumber " + "with an empty mobilePhoneNumber."); if (options && options.error) { options.error(this, error); } return AV.Promise.error(error); } var smsCode = (attrs && attrs.smsCode) || this.get("smsCode"); if (!smsCode || (smsCode === "")) { error = new AV.Error( AV.Error.OTHER_CAUSE, "Cannot sign up or login user by mobilePhoneNumber " + "with an empty smsCode."); if (options && options.error) { options.error(this, error); } return AV.Promise.error(error); } // Overridden so that the user can be made the current user. var newOptions = _.clone(options); newOptions._makeRequest = function(route, className, id, method, json) { return AV._request('usersByMobilePhone', null, null, "POST", json); }; newOptions.success = function(model) { model._handleSaveResult(true); delete model.attributes.smsCode; delete model._serverData.smsCode; if (options.success) { options.success.apply(this, arguments); } }; return this.save(attrs, newOptions); }, /** * Logs in a AV.User. On success, this saves the session to localStorage, * so you can retrieve the currently logged in user using * <code>current</code>. * * <p>A username and password must be set before calling logIn.</p> * * <p>Calls options.success or options.error on completion.</p> * * @param {Object} options A Backbone-style options object. * @see AV.User.logIn * @return {AV.Promise} A promise that is fulfilled with the user when * the login is complete. */ logIn: function(options) { var model = this; var request = AV._request("login", null, null, "GET", this.toJSON()); return request.then(function(resp, status, xhr) { var serverAttrs = model.parse(resp, status, xhr); model._finishFetch(serverAttrs); model._handleSaveResult(true); if(!serverAttrs.smsCode) delete model.attributes['smsCode']; return model; })._thenRunCallbacks(options, this); }, /** * @see AV.Object#save */ save: function(arg1, arg2, arg3) { var i, attrs, current, options, saved; if (_.isObject(arg1) || _.isNull(arg1) || _.isUndefined(arg1)) { attrs = arg1; options = arg2; } else { attrs = {}; attrs[arg1] = arg2; options = arg3; } options = options || {}; var newOptions = _.clone(options); newOptions.success = function(model) { model._handleSaveResult(false); if (options.success) { options.success.apply(this, arguments); } }; return AV.Object.prototype.save.call(this, attrs, newOptions); }, /** * Follow a user * @since 0.3.0 * @param {} target The target user or user's objectId to follow. * @param {Object} options An optional Backbone-like options object with * success and error callbacks that will be invoked once the iteration * has finished. */ follow: function(target, options){ if(!this.id){ throw "Please signin."; } if(!target){ throw "Invalid target user."; } var userObjectId = _.isString(target) ? target: target.id; if(!userObjectId){ throw "Invalid target user."; } var route = 'users/' + this.id + '/friendship/' + userObjectId; var request = AV._request(route, null, null, 'POST', null); return request._thenRunCallbacks(options); }, /** * Unfollow a user. * @since 0.3.0 * @param {} target The target user or user's objectId to unfollow. * @param options {Object} An optional Backbone-like options object with * success and error callbacks that will be invoked once the iteration * has finished. */ unfollow: function(target, options){ if(!this.id){ throw "Please signin."; } if(!target){ throw "Invalid target user."; } var userObjectId = _.isString(target) ? target: target.id; if(!userObjectId){ throw "Invalid target user."; } var route = 'users/' + this.id + '/friendship/' + userObjectId; var request = AV._request(route, null, null, 'DELETE', null); return request._thenRunCallbacks(options); }, /** *Create a follower query to query the user's followers. * @since 0.3.0 * @see AV.User#followerQuery */ followerQuery: function() { return AV.User.followerQuery(this.id); }, /** *Create a followee query to query the user's followees. * @since 0.3.0 * @see AV.User#followeeQuery */ followeeQuery: function() { return AV.User.followeeQuery(this.id); }, /** * @see AV.Object#fetch */ fetch: function(options) { var newOptions = options ? _.clone(options) : {}; newOptions.success = function(model) { model._handleSaveResult(false); if (options && options.success) { options.success.apply(this, arguments); } }; return AV.Object.prototype.fetch.call(this, newOptions); }, /** * Update user's new password safely based on old password. * @param {String} oldPassword, the old password. * @param {String} newPassword, the new password. * @param {Object} An optional Backbone-like options object with * success and error callbacks that will be invoked once the iteration * has finished. */ updatePassword: function(oldPassword, newPassword, options) { var route = 'users/' + this.id + '/updatePassword'; var params = { old_password: oldPassword, new_password: newPassword }; var request = AV._request(route, null, null, 'PUT', params); return request._thenRunCallbacks(options, this); }, /** * Returns true if <code>current</code> would return this user. * @see AV.User#current */ isCurrent: function() { return this._isCurrentUser; }, /** * Returns get("username"). * @return {String} * @see AV.Object#get */ getUsername: function() { return this.get("username"); }, /** * Returns get("mobilePhoneNumber"). * @return {String} * @see AV.Object#get */ getMobilePhoneNumber: function(){ return this.get("mobilePhoneNumber"); }, /** * Calls set("mobilePhoneNumber", phoneNumber, options) and returns the result. * @param {String} mobilePhoneNumber * @param {Object} options A Backbone-style options object. * @return {Boolean} * @see AV.Object.set */ setMobilePhoneNumber: function(phone, options) { return this.set("mobilePhoneNumber", phone, options); }, /** * Calls set("username", username, options) and returns the result. * @param {String} username * @param {Object} options A Backbone-style options object. * @return {Boolean} * @see AV.Object.set */ setUsername: function(username, options) { return this.set("username", username, options); }, /** * Calls set("password", password, options) and returns the result. * @param {String} password * @param {Object} options A Backbone-style options object. * @return {Boolean} * @see AV.Object.set */ setPassword: function(password, options) { return this.set("password", password, options); }, /** * Returns get("email"). * @return {String} * @see AV.Object#get */ getEmail: function() { return this.get("email"); }, /** * Calls set("email", email, options) and returns the result. * @param {String} email * @param {Object} options A Backbone-style options object. * @return {Boolean} * @see AV.Object.set */ setEmail: function(email, options) { return this.set("email", email, options); }, /** * Checks whether this user is the current user and has been authenticated. * @return (Boolean) whether this user is the current user and is logged in. */ authenticated: function() { return !!this._sessionToken && (AV.User.current() && AV.User.current().id === this.id); } }, /** @lends AV.User */ { // Class Variables // The currently logged-in user. _currentUser: null, // Whether currentUser is known to match the serialized version on disk. // This is useful for saving a localstorage check if you try to load // _currentUser frequently while there is none stored. _currentUserMatchesDisk: false, // The localStorage key suffix that the current user is stored under. _CURRENT_USER_KEY: "currentUser", // The mapping of auth provider names to actual providers _authProviders: {}, // Class Methods /** * Signs up a new user with a username (or email) and password. * This will create a new AV.User on the server, and also persist the * session in localStorage so that you can access the user using * {@link #current}. * * <p>Calls options.success or options.error on completion.</p> * * @param {String} username The username (or email) to sign up with. * @param {String} password The password to sign up with. * @param {Object} attrs Extra fields to set on the new user. * @param {Object} options A Backbone-style options object. * @return {AV.Promise} A promise that is fulfilled with the user when * the signup completes. * @see AV.User#signUp */ signUp: function(username, password, attrs, options) { attrs = attrs || {}; attrs.username = username; attrs.password = password; var user = AV.Object._create("_User"); return user.signUp(attrs, options); }, /** * Logs in a user with a username (or email) and password. On success, this * saves the session to disk, so you can retrieve the currently logged in * user using <code>current</code>. * * <p>Calls options.success or options.error on completion.</p> * * @param {String} username The username (or email) to log in with. * @param {String} password The password to log in with. * @param {Object} options A Backbone-style options object. * @return {AV.Promise} A promise that is fulfilled with the user when * the login completes. * @see AV.User#logIn */ logIn: function(username, password, options) { var user = AV.Object._create("_User"); user._finishFetch({ username: username, password: password }); return user.logIn(options); }, /** * Logs in a user with a session token. On success, this saves the session * to disk, so you can retrieve the currently logged in user using * <code>current</code>. * * <p>Calls options.success or options.error on completion.</p> * * @param {String} sessionToken The sessionToken to log in with. * @param {Object} options A Backbone-style options object. * @return {AV.Promise} A promise that is fulfilled with the user when * the login completes. */ become: function(sessionToken, options) { options = options || {}; var user = AV.Object._create("_User"); return AV._request( "users", "me", null, "GET", { useMasterKey: options.useMasterKey, session_token: sessionToken } ).then(function(resp, status, xhr) { var serverAttrs = user.parse(resp, status, xhr); user._finishFetch(serverAttrs); user._handleSaveResult(true); return user; })._thenRunCallbacks(options, user); }, /** * Logs in a user with a mobile phone number and sms code sent by * AV.User.requestLoginSmsCode.On success, this * saves the session to disk, so you can retrieve the currently logged in * user using <code>current</code>. * * <p>Calls options.success or options.error on completion.</p> * * @param {String} mobilePhone The user's mobilePhoneNumber * @param {String} smsCode The sms code sent by AV.User.requestLoginSmsCode * @param {Object} options A Backbone-style options object. * @return {AV.Promise} A promise that is fulfilled with the user when * the login completes. * @see AV.User#logIn */ logInWithMobilePhoneSmsCode: function(mobilePhone, smsCode, options){ var user = AV.Object._create("_User"); user._finishFetch({ mobilePhoneNumber: mobilePhone, smsCode: smsCode }); return user.logIn(options); }, /** * Sign up or logs in a user with a mobilePhoneNumber and smsCode. * On success, this saves the session to disk, so you can retrieve the currently * logged in user using <code>current</code>. * * <p>Calls options.success or options.error on completion.</p> * * @param {String} mobilePhoneNumber The user's mobilePhoneNumber. * @param {String} smsCode The sms code sent by AV.Cloud.requestSmsCode * @param {Object} attributes The user's other attributes such as username etc. * @param {Object} options A Backbone-style options object. * @return {AV.Promise} A promise that is fulfilled with the user when * the login completes. * @see AV.User#signUpOrlogInWithMobilePhone * @see AV.Cloud.requestSmsCode */ signUpOrlogInWithMobilePhone: function(mobilePhoneNumber, smsCode, attrs, options) { attrs = attrs || {}; attrs.mobilePhoneNumber = mobilePhoneNumber; attrs.smsCode = smsCode; var user = AV.Object._create("_User"); return user.signUpOrlogInWithMobilePhone(attrs, options); }, /** * Logs in a user with a mobile phone number and password. On success, this * saves the session to disk, so you can retrieve the currently logged in * user using <code>current</code>. * * <p>Calls options.success or options.error on completion.</p> * * @param {String} mobilePhone The user's mobilePhoneNumber * @param {String} password The password to log in with. * @param {Object} options A Backbone-style options object. * @return {AV.Promise} A promise that is fulfilled with the user when * the login completes. * @see AV.User#logIn */ logInWithMobilePhone: function(mobilePhone, password, options){ var user = AV.Object._create("_User"); user._finishFetch({ mobilePhoneNumber: mobilePhone, password: password }); return user.logIn(options); }, /** * Logs out the currently logged in user session. This will remove the * session from disk, log out of linked services, and future calls to * <code>current</code> will return <code>null</code>. */ logOut: function() { if (AV.User._currentUser !== null) { AV.User._currentUser._logOutWithAll(); AV.User._currentUser._isCurrentUser = false; } AV.User._currentUserMatchesDisk = true; AV.User._currentUser = null; AV.localStorage.removeItem( AV._getAVPath(AV.User._CURRENT_USER_KEY)); }, /** *Create a follower query for special user to query the user's followers. * @param userObjectId {String} The user object id. * @since 0.3.0 */ followerQuery: function(userObjectId) { if(!userObjectId || !_.isString(userObjectId)) { throw "Invalid user object id."; } var query = new AV.FriendShipQuery('_Follower'); query._friendshipTag ='follower'; query.equalTo('user', AV.Object.createWithoutData('_User', userObjectId)); return query; }, /** *Create a followee query for special user to query the user's followees. * @param userObjectId {String} The user object id. * @since 0.3.0 */ followeeQuery: function(userObjectId) { if(!userObjectId || !_.isString(userObjectId)) { throw "Invalid user object id."; } var query = new AV.FriendShipQuery('_Followee'); query._friendshipTag ='followee'; query.equalTo('user', AV.Object.createWithoutData('_User', userObjectId)); return query; }, /** * Requests a password reset email to be sent to the specified email address * associated with the user account. This email allows the user to securely * reset their password on the AV site. * * <p>Calls options.success or options.error on completion.</p> * * @param {String} email The email address associated with the user that * forgot their password. * @param {Object} options A Backbone-style options object. */ requestPasswordReset: function(email, options) { var json = { email: email }; var request = AV._request("requestPasswordReset", null, null, "POST", json); return request._thenRunCallbacks(options); }, /** * Requests a verify email to be sent to the specified email address * associated with the user account. This email allows the user to securely * verify their email address on the AV site. * * <p>Calls options.success or options.error on completion.</p> * * @param {String} email The email address associated with the user that * doesn't verify their email address. * @param {Object} options A Backbone-style options object. */ requestEmailVerify: function(email, options) { var json = { email: email }; var request = AV._request("requestEmailVerify", null, null, "POST", json); return request._thenRunCallbacks(options); }, /** * @Deprecated typo error, please use requestEmailVerify */ requestEmailVerfiy: function(email, options) { var json = { email: email }; var request = AV._request("requestEmailVerify", null, null, "POST", json); return request._thenRunCallbacks(options); }, /** * Requests a verify sms code to be sent to the specified mobile phone * number associated with the user account. This sms code allows the user to * verify their mobile phone number by calling AV.User.verifyMobilePhone * * <p>Calls options.success or options.error on completion.</p> * * @param {String} mobilePhone The mobile phone number associated with the * user that doesn't verify their mobile phone number. * @param {Object} options A Backbone-style options object. */ requestMobilePhoneVerify: function(mobilePhone, options){ var json = { mobilePhoneNumber: mobilePhone }; var request = AV._request("requestMobilePhoneVerify", null, null, "POST", json); return request._thenRunCallbacks(options); }, /** * Requests a reset password sms code to be sent to the specified mobile phone * number associated with the user account. This sms code allows the user to * reset their account's password by calling AV.User.resetPasswordBySmsCode * * <p>Calls options.success or options.error on completion.</p> * * @param {String} mobilePhone The mobile phone number associated with the * user that doesn't verify their mobile phone number. * @param {Object} options A Backbone-style options object. */ requestPasswordResetBySmsCode: function(mobilePhone, options){ var json = { mobilePhoneNumber: mobilePhone }; var request = AV._request("requestPasswordResetBySmsCode", null, null, "POST", json); return request._thenRunCallbacks(options); }, /** * Makes a call to reset user's account password by sms code and new password. * The sms code is sent by AV.User.requestPasswordResetBySmsCode. * @param {String} code The sms code sent by AV.User.Cloud.requestSmsCode * @param {String} password The new password. * @param {Object} options A Backbone-style options object * @return {AV.Promise} A promise that will be resolved with the result * of the function. */ resetPasswordBySmsCode: function(code, password, options){ var json = { password: password}; var request = AV._request("resetPasswordBySmsCode", null, code, "PUT", json); return request._thenRunCallbacks(options); }, /** * Makes a call to verify sms code that sent by AV.User.Cloud.requestSmsCode * If verify successfully,the user mobilePhoneVerified attribute will be true. * @param {String} code The sms code sent by AV.User.Cloud.requestSmsCode * @param {Object} options A Backbone-style options object * @return {AV.Promise} A promise that will be resolved with the result * of the function. */ verifyMobilePhone: function(code, options){ var request = AV._request("verifyMobilePhone", null, code, "POST", null); return request._thenRunCallbacks(options); }, /** * Requests a logIn sms code to be sent to the specified mobile phone * number associated with the user account. This sms code allows the user to * login by AV.User.logInWithMobilePhoneSmsCode function. * * <p>Calls options.success or options.error on completion.</p> * * @param {String} mobilePhone The mobile phone number associated with the * user that want to login by AV.User.logInWithMobilePhoneSmsCode * @param {Object} options A Backbone-style options object. */ requestLoginSmsCode: function(mobilePhone, options){ var json = { mobilePhoneNumber: mobilePhone }; var request = AV._request("requestLoginSmsCode", null, null, "POST", json); return request._thenRunCallbacks(options); }, /** * Retrieves the currently logged in AVUser with a valid session, * either from memory or localStorage, if necessary. * @return {AV.Object} The currently logged in AV.User. */ current: function() { if (AV.User._currentUser) { return AV.User._currentUser; } if (AV.User._currentUserMatchesDisk) { return AV.User._currentUser; } // Load the user from local storage. AV.User._currentUserMatchesDisk = true; var userData = AV.localStorage.getItem(AV._getAVPath( AV.User._CURRENT_USER_KEY)); if (!userData) { return null; } AV.User._currentUser = AV.Object._create("_User"); AV.User._currentUser._isCurrentUser = true; var json = JSON.parse(userData); AV.User._currentUser.id = json._id; delete json._id; AV.User._currentUser._sessionToken = json._sessionToken; delete json._sessionToken; AV.User._currentUser._finishFetch(json); //AV.User._currentUser.set(json); AV.User._currentUser._synchronizeAllAuthData(); AV.User._currentUser._refreshCache(); AV.User._currentUser._opSetQueue = [{}]; return AV.User._currentUser; }, /** * Persists a user as currentUser to localStorage, and into the singleton. */ _saveCurrentUser: function(user) { if (AV.User._currentUser !== user) { AV.User.logOut(); } user._isCurrentUser = true; AV.User._currentUser = user; AV.User._currentUserMatchesDisk = true; var json = user.toJSON(); json._id = user.id; json._sessionToken = user._sessionToken; AV.localStorage.setItem( AV._getAVPath(AV.User._CURRENT_USER_KEY), JSON.stringify(json)); }, _registerAuthenticationProvider: function(provider) { AV.User._authProviders[provider.getAuthType()] = provider; // Synchronize the current user with the auth provider. if (AV.User.current()) { AV.User.current()._synchronizeAuthData(provider.getAuthType()); } }, _logInWith: function(provider, options) { var user = AV.Object._create("_User"); return user._linkWith(provider, options); } }); }(this));
/** * * @since 6.5.0 */ Ext.define('Ext.data.virtual.Range', { extend: 'Ext.data.Range', isVirtualRange: true, /** * @cfg {String/Function} callback * The callback to call when new records in this range become available. */ callback: null, /** * @cfg {Number} leadingBufferZone * The number of records to fetch beyond the active range in the direction of movement. * If the range is advancing forward, the additional records are beyond `end`. If * advancing backwards, they are before `begin`. */ /** * @cfg {Boolean} prefetch * Specify `true` to enable prefetching for this range. */ prefetch: false, /** * @cfg {Object} scope * The object that implements the supplied `callback` method. */ scope: null, /** * @cfg {Number} trailingBufferZone * The number of records to fetch beyond the active trailing the direction of movement. * If the range is advancing forward, the additional records are before `begin`. If * advancing backwards, they are beyond `end`. */ /** * @property {Number} direction * This property is set to `1` if the range was last moved forward and `-1` if it * was last moved backwards. This value is used to determine the "leading" and * "trailing" buffer zones. * @private */ direction: 1, constructor: function (config) { this.adjustingPages = []; this.callParent([config]); }, reset: function () { var me = this; me.records = {}; me.activePages = me.prefetchPages = null; }, privates: { adjustPageLocks: function (kind, adjustment) { var me = this, pages = me.adjustingPages, n = pages.length, i; // Consider: // // --> // --+----------+==========+--------------------------+---- // ... | trailing | active | leading | ... // --+----------+==========+--------------------------+---- // // :------: :------: :++++++: :++++++: // // ---------+----------+==========+--------------------------+---- // ... | trailing | active | leading | ... // ---------+----------+==========+--------------------------+---- // // The newly released pages (esp the prefetch pages) should be released // such that the closest ones are MRU vs the farthest ones. Releasing // them in forward order will do that. // // New consider: // // <-- // ---------+--------------------------+==========+----------+---- // ... | leading | active | trailing | ... // ---------+--------------------------+==========+----------+---- // // :++++++: :++++++: :------: :------: // // --+--------------------------+==========+----------+--------- // ... | leading | active | trailing | ... // --+--------------------------+==========+----------+--------- // // When going backwards, we want to release the pages backwards (we'll // just sort them that way). That way the page with least index will be // released last and be MRU than the others. if (n > 1) { // Since pages are in objects keyed by page number, there is no // order during our set operations... so we sort the array now by // page number (ordered by our current direction). pages.sort(me.direction < 0 ? me.pageSortBackFn : me.pageSortFwdFn); } for (i = 0; i < n; ++i) { pages[i].adjustLock(kind, adjustment); } pages.length = 0; }, doGoto: function() { var me = this, begin = me.begin, end = me.end, prefetch = me.prefetch, records = me.records, store = me.store, pageMap = store.pageMap, limit = store.totalCount, beginWas = me.lastBegin, endWas = me.lastEnd, activePagesWas = me.activePages, prefetchPagesWas = me.prefetchPages, beginBufferZone = me.trailingBufferZone, endBufferZone = me.leadingBufferZone, adjustingPages = me.adjustingPages, activePages, page, pg, direction, prefetchBegin, prefetchEnd, prefetchPages; adjustingPages.length = 0; // Forwards // // Most likely case: // // beginWas endWas // |=================| // :---: :+++: // |=================| // begin end // // Big step forwards: // // beginWas endWas // |=================| // :-----------------: :+++++++++++++++++: // |=================| // begin end // // Interesting case: // // beginWas endWas // |=================| // :---: :---: // |=========| // begin end // Backwards // // Most likely case: // // beginWas endWas // |=================| // :++: :--: // |=================| // begin end // // Big step back: // beginWas endWas // |=================| // :+++++++++++++++++: :-----------------: // |=================| // begin end // // Interesting case: // // beginWas endWas // |=================| // :++: :++: // |=======================| // begin end // Retain the direction if narrowing or widening the range if ((begin > beginWas && end < endWas) || (begin < beginWas && end > endWas)) { direction = me.direction; } else { direction = (begin < beginWas) ? -1 : ((begin > beginWas) ? 1 : me.direction); } if (direction < 0) { // if (backwards) pg = beginBufferZone; beginBufferZone = endBufferZone; endBufferZone = pg; } me.direction = direction; me.activePages = activePages = pageMap.getPages(begin, end); if (prefetch) { me.prefetchBegin = prefetchBegin = Math.max(0, begin - beginBufferZone); // If we don't know the size of the store yet, don't try and limit the pages if (limit === null) { limit = Number.MAX_VALUE; } me.prefetchEnd = prefetchEnd = Math.min(limit, end + endBufferZone); me.prefetchPages = prefetchPages = pageMap.getPages(prefetchBegin, prefetchEnd); } // In set terms we want to do this: // // A = activePages // Aw = activePagesWas // P = prefetchPages // Pw = prefetchPagesWas // // P -= A; (activePages start out also in prefetchPages) // // foreach page p in (A - Aw), p.lock('active') and p.fill(records) // // foreach page p in (P - Pw), p.lock('prefetch') // // foreach page p in (Aw - A), p.release('active') and p.clear(records) // // foreach page p in (Pw - P), p.release('prefetch') // for (pg in activePages) { page = activePages[pg]; // Any pages that we will be actively locking, we don't want to mark as // prefetch: if (prefetchPages) { delete prefetchPages[pg]; } if (activePagesWas && pg in activePagesWas) { // We will unlock any activePages we no longer need so remove // those we will be keeping: delete activePagesWas[pg]; } else { // For pages that weren't previously active, lock them now. page.adjustLock('active', 1); page.fillRecords(records); } } if (prefetchPages) { for (pg in prefetchPages) { if (prefetchPagesWas && pg in prefetchPagesWas) { // If page was previously locked for prefetch, we don't want to // release it... delete prefetchPagesWas[pg]; } else { prefetchPages[pg].adjustLock('prefetch', 1); } } } // What's left in our "was" maps are those active or prefetch pages that we // previously had need of but no longer need them in that same way. Release // our previously prefetched pages first in case this is their final lock (we // want them to be retained but at a lower priority then previously active // pages). if (prefetchPagesWas) { for (pg in prefetchPagesWas) { adjustingPages.push(prefetchPagesWas[pg]); } if (adjustingPages.length) { me.adjustPageLocks('prefetch', -1); } } if (activePagesWas) { for (pg in activePagesWas) { adjustingPages.push(page = activePagesWas[pg]); page.clearRecords(records); } if (adjustingPages.length) { me.adjustPageLocks('active', -1); } } if (prefetchPages) { pageMap.prioritizePrefetch(direction, pageMap.getPageIndex(begin), pageMap.getPageIndex(end - 1)); } me.lastBegin = begin; me.lastEnd = end; }, onPageLoad: function (page) { var me = this, callback = me.callback, first, last; if (me.activePages[page.number]) { page.fillRecords(me.records); if (callback) { // Clip the range to our actually active range for the sake of // the user: first = Math.max(me.begin, page.begin); last = Math.min(me.end, page.end); Ext.callback(callback, me.scope, [me, first, last]); } } }, pageSortBackFn: function (page1, page2) { return page2.number - page1.number; }, pageSortFwdFn: function (page1, page2) { return page1.number - page2.number; }, refresh: function () { // ... we don't want to reset this.records this.records = this.records || {}; }, reload: function() { var me = this, begin = me.begin, end = me.end; me.begin = me.end = 0; me.direction = 1; me.prefetchPages = me.activePages = null; me.goto(begin, end); } } });
export { default, initialize } from 'tsygan/initializers/tsygan';
import axios from 'axios'; export function postRequest(url, body) { return new Promise((resolve, reject) => { axios({ url, method: 'POST', data: body, timeout: 20000, }) .then((result) => { resolve(result); }) .catch((error) => { reject(error); }); }); } export function getRequest(url, queryParams) { return new Promise((resolve, reject) => { axios({ url, method: 'GET', params: queryParams, }) .then((result) => { resolve(result); }) .catch((errors) => { reject(errors); }); }); }
import * as actions from './my-insights-actions'; export default { [actions.fetchInsightsInit]: state => ({ ...state, loading: true }), [actions.fetchInsightsReady]: (state, { payload }) => ({ ...state, loading: false, loaded: true, data: payload }), [actions.fetchInsightsFail]: state => ({ ...state, loading: false, error: true }) };
import React, { PureComponent as Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Icon, Input, AutoComplete, Tooltip } from 'antd'; import _ from 'underscore'; import './Search.scss'; import { withRouter } from 'react-router'; import axios from 'axios'; import { setCurrGroup, fetchGroupMsg } from '../../../reducer/modules/group'; import { changeMenuItem } from '../../../reducer/modules/menu'; import { fetchInterfaceListMenu } from '../../../reducer/modules/interface'; const Option = AutoComplete.Option; @connect( state => ({ groupList: state.group.groupList, projectList: state.project.projectList }), { setCurrGroup, changeMenuItem, fetchGroupMsg, fetchInterfaceListMenu } ) @withRouter export default class Srch extends Component { constructor(props) { super(props); this.state = { dataSource: [] }; this.handleSearch = _.debounce(this.handleSearch, 500); } static propTypes = { groupList: PropTypes.array, projectList: PropTypes.array, router: PropTypes.object, history: PropTypes.object, location: PropTypes.object, setCurrGroup: PropTypes.func, changeMenuItem: PropTypes.func, fetchInterfaceListMenu: PropTypes.func, fetchGroupMsg: PropTypes.func }; onSelect = async (value, option) => { // console.log("option.props.type:"+option.props.type); if (option.props.type === '分组') { this.props.changeMenuItem('/group'); this.props.history.push('/group/' + option.props['id']); this.props.setCurrGroup({ group_name: value, _id: option.props['id'] - 0 }); } else if (option.props.type === '项目') { await this.props.fetchGroupMsg(option.props['groupId']); this.props.history.push('/project/' + option.props['id']); } else if (option.props.type === '接口') { await this.props.fetchInterfaceListMenu(option.props['projectId']); this.props.history.push( '/project/' + option.props['projectId'] + '/interface/api/' + option.props['id'] ); } else if (option.props.type === '路径') { await this.props.fetchInterfaceListMenu(option.props['projectId']); this.props.history.push('/project/' + option.props['projectId'] + '/interface/api/' + option.props['id']); } }; handleSearch = value => { axios .get('/api/project/search?q=' + value) .then(res => { if (res.data && res.data.errcode === 0) { const dataSource = []; for (let title in res.data.data) { res.data.data[title].map(item => { switch (title) { case 'group': dataSource.push( <Option key={`分组${item._id}`} type="分组" id={`${item._id}`} text={`分组: ${item.groupName}`} > <Tooltip placement="left" title={`分组: ${item.groupName}`}> {`分组: ${item.groupName}`} </Tooltip> </Option> ); break; case 'project': dataSource.push( <Option key={`项目${item._id}`} type="项目" id={`${item._id}`} groupId={`${item.groupId}`} text={`项目: ${item.name}`} > <Tooltip placement="left" title={`项目: ${item.name}`}> {`项目: ${item.name}`} </Tooltip> </Option> ); break; case 'interface': dataSource.push( <Option key={`接口${item._id}`} type="接口" id={`${item._id}`} projectId={`${item.projectId}`} text={`接口: ${item.title}`} > <Tooltip placement="left" title={`接口: ${item.title}`}> {`接口: ${item.title}`} </Tooltip> </Option> ); break; case 'interface2': dataSource.push( <Option key={`路径${item._id}`} type="路径" id={`${item._id}`} projectId={`${item.projectId}`} text={`路径: ${item.path}`} > <Tooltip placement="left" title={`路径: ${item.path}`}> {`路径: ${item.path}`} </Tooltip> </Option> ); break; default: break; } }); } this.setState({ dataSource: dataSource }); } else { console.log('查询项目或分组失败'); } }) .catch(err => { console.log(err); }); }; // getDataSource(groupList){ // const groupArr =[]; // groupList.forEach(item =>{ // groupArr.push("group: "+ item["group_name"]); // }) // return groupArr; // } render() { const { dataSource } = this.state; return ( <div className="search-wrapper"> <AutoComplete className="search-dropdown" dataSource={dataSource} style={{ width: '100%' }} defaultActiveFirstOption={false} onSelect={this.onSelect} onSearch={this.handleSearch} optionLabelProp="text" filterOption={(inputValue, option) => { if (typeof option.props.children !== 'string' ) { return option.props.children.props.title.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1; } return option.props.children.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1 } } > <Input prefix={<Icon type="search" className="srch-icon" />} placeholder="搜索分组/项目/接口/路径" className="search-input" /> </AutoComplete> </div> ); } }
const expect = require('chai').expect; describe('mock test 1', () => { it('unit test 1', () => { expect(true).to.be.true; }); }); describe('mock test 2', () => { it('unit test 2', () => { expect(true).to.be.true; }); }); describe('mock test 3', () => { it('unit test 3', () => { expect(true).to.be.true; }); }); describe('mock test 4', () => { it('unit test 4', () => { expect(true).to.be.true; }); }); describe('mock test 5', () => { it('unit test 5', () => { expect(true).to.be.true; }); });
define(["require","exports","tslib","react","classnames","spectrum/file_icon","spectrum/icon_content","spectrum/popover","modules/clean/em_string","modules/clean/react/breadcrumb/constants","modules/clean/react/breadcrumb/utils","modules/clean/react/css","modules/clean/react/flag","modules/clean/react/sprite","modules/core/i18n"],(function(e,t,r,n,a,o,l,s,i,u,c,m,p,f,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n=r.__importDefault(n),a=r.__importDefault(a);var b=(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onSegmentClicked=function(e,r){t.onCrumbClicked(e,r)},t.onMenuClicked=function(e,r,n){t.onCrumbClicked(e,r)},t}return r.__extends(t,e),Object.defineProperty(t.prototype,"crumbs",{get:function(){return r.__spreadArrays(this.props.overflowCrumbs,this.props.inlineCrumbs)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastCrumb",{get:function(){return this.props.inlineCrumbs[this.props.inlineCrumbs.length-1]},enumerable:!0,configurable:!0}),t.prototype.onCrumbClicked=function(e,t){this.props.onChange&&this.props.onChange(e,t,this.crumbs.indexOf(t))},t.prototype.render=function(){var e=this;return n.default.createElement("span",null,n.default.createElement("h1",{className:"ax-visually-hidden"},this.lastCrumb.label),n.default.createElement("nav",{className:"breadcrumb-trail u-l-fl","aria-label":d.intl.formatMessage({id:"j2wHLa",defaultMessage:"Folder Hierarchy"}),role:"navigation"},this.props.overflowCrumbs.length?n.default.createElement(v,{crumbs:this.props.overflowCrumbs,onChange:this.onMenuClicked,overflowAttachDirection:this.props.overflowAttachDirection,overflowAttachPosition:this.props.overflowAttachPosition}):null,this.props.inlineCrumbs.map((function(t,r){return n.default.createElement(_,{key:r,crumb:t,isLastCrumb:t===e.lastCrumb,onClick:e.onSegmentClicked,maxWidth:c.getMaxInlineTrailWidth(!!e.props.overflowCrumbs.length)})}))))},t.defaultProps={overflowCrumbs:[]},t})(n.default.Component),h=m.requireCssWithComponent(b,["/static/css/breadcrumbs-vflfL28sW.css"]);t.BreadcrumbTrail=h,t.SmartBreadcrumbTrail=function(e){var t=c.splitCrumbs(e.crumbs,c.getMaxInlineTrailWidth(!0)),r=t.overflowCrumbs,a=t.inlineCrumbs;return n.default.createElement(h,{overflowCrumbs:r,inlineCrumbs:a,onChange:e.onChange,overflowAttachDirection:e.overflowAttachDirection,overflowAttachPosition:e.overflowAttachPosition})};var C=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){return n.default.createElement(f.Sprite,{group:"web",name:"chevron",className:"breadcrumb-separator",alt:""})},t})(n.default.Component),v=(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onClick=function(e,r){t.props.onChange&&t.props.onChange(e,r,t.props.crumbs.indexOf(r))},t}return r.__extends(t,e),t.prototype.render=function(){var e=this,t=r.__spreadArrays(this.props.crumbs);return t.reverse(),n.default.createElement("span",{className:"breadcrumb-menu-container"},n.default.createElement(s.Popover,null,n.default.createElement(s.PopoverTrigger,{className:"breadcrumb-trigger","aria-label":d.intl.formatMessage({id:"HcOP1H",defaultMessage:"Breadcrumb target"})},n.default.createElement("span",{className:"u-unbutton breadcrumb-overflow-button u-l-fl","aria-label":d.intl.formatMessage({id:"ku7o1P",defaultMessage:"Breadcrumb overflow"})},n.default.createElement(l.IconContent,{name:"folder_dropdown-small"}))),n.default.createElement(s.PopoverContent,{attachment:this.props.overflowAttachDirection,position:this.props.overflowAttachPosition},t.map((function(t){return n.default.createElement(g,{key:t.label,crumb:t,onClick:e.onClick})})))),n.default.createElement(C,null))},t})(n.default.Component),g=(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onClick=function(e){t.props.onClick&&t.props.onClick(e,t.props.crumb)},t}return r.__extends(t,e),t.prototype.render=function(){var e=this.props.crumb,t=i.Emstring.em_snippet(e.label,u.MAX_MENU_ITEM_WIDTH_IN_EMS);return n.default.createElement(s.PopoverContentItem,{className:"breadcrumb-menu-item",href:e.href,onClick:this.onClick},n.default.createElement(p.Flag,{leftAttachment:e.isFile?n.default.createElement(o.FileIcon,{path:e.label}):n.default.createElement(l.IconContent,{name:"folder-small"})},n.default.createElement("div",{className:"breadcrumb-menu-item__text u-pad-left-xs"},t)))},t})(n.default.Component),_=(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onClick=function(e){t.props.onClick&&t.props.onClick(e,t.props.crumb)},t}return r.__extends(t,e),t.prototype.getLabel=function(){return i.Emstring.em_snippet(this.props.crumb.label,this.props.maxWidth)},t.prototype.render=function(){var e=this.getLabel();return this.props.isLastCrumb?n.default.createElement("span",{className:"breadcrumb-segment"},e):n.default.createElement("span",null,n.default.createElement("a",{className:a.default("breadcrumb-segment","ancestor-breadcrumb-segment"),href:this.props.crumb.href,onClick:this.onClick},e),n.default.createElement(C,null))},t})(n.default.Component)})); //# sourceMappingURL=trail.min.js-vflJMCkOz.map
import React, { useEffect, useRef } from "react"; import * as echarts from "echarts"; import PropTypes from "prop-types"; import "./Chart.less"; export const Chart = (propArgs) => { const { className, color, data, grid, barBack, ...props } = propArgs; let instance = null; const chartRef = useRef(); let barSeries; let lineSeries = []; let lineData = []; //折线图数据 let yAxisMax0, yAxisMax1; // 两侧坐标轴最大值-左右 data?.yData.length > 0 && data.yData.map((item, index) => { if (item.type === "bar") { yAxisMax0 = Math.max(...item.data) * 1.2; barSeries = { type: "bar", name: item.name, barWidth: props.barWidth, itemStyle: { color: color[index], borderRadius: props.barBorderRadius, }, data: item.data, yAxisIndex: 0, }; } else if (item.type === "line") { lineSeries.push({ type: "line", name: item.name, color: color[index], data: item.data, yAxisIndex: 1, }); lineData.push(...item.data); yAxisMax1 = Math.max(...lineData) * 1.2; } }); //柱状图背景 let barBackGround = { type: "bar", data: new Array(data?.yData[0].data.length).fill(0), barWidth: barBack.barWidth, showBackground: props.barBackShow, barGap: barBack.barGap, //"-125%", backgroundStyle: { color: barBack.backgroundColor, //"rgba(255,255,255, 1)", borderRadius: barBack.backgroundBorderRadius, //[30, 30, 0, 0], borderWidth: barBack.backgroundBorderWidth, //1.5, borderColor: barBack.backgroundBorderColor, //"rgb(146,204,237)", borderType: "solid", }, }; const series = props.barBackShow ? [barSeries, barBackGround, ...lineSeries] : [barSeries, ...lineSeries]; //组件位置,防止输入长度小于4报错 let arrZero = new Array(4 - grid.length).fill(0); let grids = grid.length < 4 ? [...grid, ...arrZero] : grid; // 渲染组件 const renderChart = () => { const chart = echarts.getInstanceByDom(chartRef.current); if (chart) { instance = chart; } else { instance = echarts.init(chartRef.current); } const option = { grid: { top: grids[0], right: grids[1], bottom: grids[2], left: grids[3], }, legend: { show: props.legend, fontSize: props.legendFontSize, top: props.legendGridTop, right: props.legendGridRight, }, tooltip: { show: props.tooltip, trigger: "axis", textStyle: { fontSize: props.tooltipFontSize, }, formatter: (params) => { let relVal = params[0].name; params.length > 0 && params.forEach((item, index) => { relVal += "<br/>" + item.marker + item.seriesName + ":" + item.value + (index === 0 ? data.yName : "%"); }); return relVal; }, }, xAxis: { type: "category", axisLabel: { show: true, fontSize: props.xAxisFontSize, // 14, color: props.axisLabelColor, //"#666666", }, axisLine: { show: true, lineStyle: { color: props.axisLineColor, //"rgba(0,0,0, 0.1)", }, }, xName: data?.xName, data: data?.xData, }, yAxis: [ { type: "value", max: yAxisMax0, position: "left", name: data?.yName, nameTextStyle: { color: props.axisLabelColor, }, axisLine: { show: true, lineStyle: { color: props.axisLineColor, }, }, axisLabel: { fontSize: props.xAxisFontSize, color: props.axisLabelColor, }, }, { type: "value", max: yAxisMax1, position: "right", name: data?.legend && data.legend.length > 0 ? "(%)" : null, nameTextStyle: { fontSize: 13, color: "#666666", }, axisLine: { show: true, lineStyle: { color: "rgba(0,0,0, 0.1)", }, }, axisLabel: { fontSize: 13, color: "#666666", }, splitLine: { show: false, }, }, ], series: series, dataZoom: { show: props.dataZoom, endValue: props.dataZoomEndValue ? props.dataZoomEndValue : data?.xData.length, height: props.dataZoomHeight, }, }; instance.setOption(option,true); window.addEventListener("resize", () => { instance.resize(); }); }; useEffect(renderChart, []); useEffect(renderChart, [props]); return <div ref={chartRef} className={[className, "chartStyle"].join(" ")} />; }; Chart.propTypes = { /** * 类名 */ className: PropTypes.string, /** * 颜色 */ color: PropTypes.array, /** * 图表位置 */ grid: PropTypes.array, /** * legend */ legend: PropTypes.bool, legendFontSize: PropTypes.number, legendGridTop: PropTypes.string, legendGridLeft: PropTypes.string, /** * dataZoom */ dataZoom: PropTypes.bool, /** * dataZoom 高度 */ dataZoomHeight: PropTypes.number | PropTypes.string, /** * dataZoomEndValue */ dataZoomEndValue: PropTypes.number, /** * bar宽度,可配置为百分比 */ barWidth: PropTypes.number | PropTypes.string, /** * bar Border Radius */ barBorderRadius: PropTypes.array, /** * tooltip */ tooltip: PropTypes.bool, /** * tooltip字体大小 */ tooltipFontSize: PropTypes.number, /** * 柱状图是否有背景? */ barBackShow: PropTypes.bool, /** * 柱状图背景 barGap: "-125%", barWidth: 30, backgroundBorderRadius: [20, 20, 0, 0], backgroundBorderWidth: 1.5, backgroundBorderColor: "white", backgroundColor: "rgba(240,177,154, 1)", */ barBack: PropTypes.object, /** * x/y轴字体大小、字体颜色、轴线颜色 */ xAxisFontSize: PropTypes.number, axisLabelColor: PropTypes.string, axisLineColor: PropTypes.string, /** * 图表数据 */ data: PropTypes.object, }; Chart.defaultProps = { dataZoom: true, dataZoomHeight: "3%", dataZoomEndValue: null, barWidth: 13, grid: ["18%", "8%", "20%", "8%"], barBorderRadius: [20, 20, 0, 0], color: ["rgba(240,177,154, 1)", "rgb(146,204,237)", "rgb(255,131,131)"], tooltip: true, tooltipFontSize: 14, xAxisFontSize: 14, axisLabelColor: "#666666", axisLineColor: "rgba(0,0,0,0.1)", legend: true, legendFontSize: 14, legendGridTop: 0, legendGridRight: "2%", barBackShow: true, barBack: { barGap: "-125%", barWidth: 20, backgroundBorderRadius: [20, 20, 0, 0], backgroundBorderWidth: 1.5, backgroundBorderColor: "rgba(240,177,154, 1)", backgroundColor: "white", }, data: { xData: ["Mon", "Tue", "Wed", "全国", "Fri", "Sat", "Sun"], yData: [ { id: "sum", type: "bar", name: "总数1", data: [120, 100, 170, 80, 70, 110, 130], }, { id: "sum1", type: "line", name: "总数2", data: [0.2, 0.3, 0.4, 0.8, 0.27, 0.1, 0.23], }, { id: "sum2", type: "line", name: "总数3", data: [0.24, 0.5, 0.4, 0.7, 0.7, 0.9, 0.3], }, ], legend: ["1", "2", "总数3"], xName: "", yName: "(万户)", }, };
/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ 'use strict'; /** * Object model for updating an intent classifier. * */ class ModelUpdateObject { /** * Create a ModelUpdateObject. * @property {string} [name] The entity's new name. */ constructor() { } /** * Defines the metadata of ModelUpdateObject * * @returns {object} metadata of ModelUpdateObject * */ mapper() { return { required: false, serializedName: 'ModelUpdateObject', type: { name: 'Composite', className: 'ModelUpdateObject', modelProperties: { name: { required: false, serializedName: 'name', type: { name: 'String' } } } } }; } } module.exports = ModelUpdateObject;
/** * Get service name from URL * * @param {string} string URL, i.e. https://twitter.com/alienlebarge/status/1414847250283601921 * @returns {string} Service name, i.e. Twitter */ module.exports = string => { if (string) { string = String(string); const {hostname} = new URL(string); hostname.replace(/(?:www\.)?/g, ''); switch (hostname) { case ('web.archive.org'): return 'Internet Archive'; case ('twitter.com'): return 'Twitter'; default: return hostname; } } };
module.exports = { localize: 'by Alexander Dadukin', uniq: 'lab', hello: 'world' };
var ghpages = require('gh-pages') var path = require('path') ghpages.publish(path.join(__dirname, 'dist'))
/* Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/license */ CKEDITOR.lang['et']={"editor":"Rikkalik tekstiredaktor","editorPanel":"Rikkaliku tekstiredaktori paneel","common":{"editorHelp":"Abi saamiseks vajuta ALT 0","browseServer":"Serveri sirvimine","url":"URL","protocol":"Protokoll","upload":"Laadi üles","uploadSubmit":"Saada serverisse","image":"Pilt","flash":"Flash","form":"Vorm","checkbox":"Märkeruut","radio":"Raadionupp","textField":"Tekstilahter","textarea":"Tekstiala","hiddenField":"Varjatud lahter","button":"Nupp","select":"Valiklahter","imageButton":"Piltnupp","notSet":"<määramata>","id":"ID","name":"Nimi","langDir":"Keele suund","langDirLtr":"Vasakult paremale (LTR)","langDirRtl":"Paremalt vasakule (RTL)","langCode":"Keele kood","longDescr":"Pikk kirjeldus URL","cssClass":"Stiilistiku klassid","advisoryTitle":"Soovituslik pealkiri","cssStyle":"Laad","ok":"Olgu","cancel":"Loobu","close":"Sulge","preview":"Eelvaade","resize":"Suuruse muutmiseks lohista","generalTab":"Üldine","advancedTab":"Täpsemalt","validateNumberFailed":"See väärtus pole number.","confirmNewPage":"Kõik salvestamata muudatused lähevad kaotsi. Kas oled kindel, et tahad laadida uue lehe?","confirmCancel":"Mõned valikud on muudetud. Kas oled kindel, et tahad dialoogi sulgeda?","options":"Valikud","target":"Sihtkoht","targetNew":"Uus aken (_blank)","targetTop":"Kõige ülemine aken (_top)","targetSelf":"Sama aken (_self)","targetParent":"Vanemaken (_parent)","langDirLTR":"Vasakult paremale (LTR)","langDirRTL":"Paremalt vasakule (RTL)","styles":"Stiili","cssClasses":"Stiililehe klassid","width":"Laius","height":"Kõrgus","align":"Joondus","left":"Vasak","right":"Paremale","center":"Kesk","justify":"Rööpjoondus","alignLeft":"Vasakjoondus","alignRight":"Paremjoondus","alignCenter":"Keskjoondus","alignTop":"Üles","alignMiddle":"Keskele","alignBottom":"Alla","alignNone":"Pole","invalidValue":"Vigane väärtus.","invalidHeight":"Kõrgus peab olema number.","invalidWidth":"Laius peab olema number.","invalidLength":"Välja \"%1\" väärtus peab olema positiivne arv korrektse ühikuga (%2) või ilma.","invalidCssLength":"\"%1\" välja jaoks määratud väärtus peab olema positiivne täisarv CSS ühikuga (px, %, in, cm, mm, em, ex, pt või pc) või ilma.","invalidHtmlLength":"\"%1\" välja jaoks määratud väärtus peab olema positiivne täisarv HTML ühikuga (px või %) või ilma.","invalidInlineStyle":"Reasisese stiili määrangud peavad koosnema paarisväärtustest (tuples), mis on semikoolonitega eraldatult järgnevas vormingus: \"nimi : väärtus\".","cssLengthTooltip":"Sisesta väärtus pikslites või number koos sobiva CSS-i ühikuga (px, %, in, cm, mm, em, ex, pt või pc).","unavailable":"%1<span class=\"cke_accessibility\">, pole saadaval</span>","keyboard":{"8":"Backspace","13":"Enter","16":"Shift","17":"Ctrl","18":"Alt","32":"Tühik","35":"End","36":"Home","46":"Kustuta","112":"F1","113":"F2","114":"F3","115":"F4","116":"F5","117":"F6","118":"F7","119":"F8","120":"F9","121":"F10","122":"F11","123":"F12","124":"F13","125":"F14","126":"F15","127":"F16","128":"F17","129":"F18","130":"F19","131":"F20","132":"F21","133":"F22","134":"F23","135":"F24","224":"Command"},"keyboardShortcut":"Kiirklahv","optionDefault":"Vaikeväärtus"},"about":{"copy":"Copyright &copy; $1. Kõik õigused kaitstud.","dlgTitle":"CKEditor 4st lähemalt","moreInfo":"Litsentsi andmed leiab meie veebilehelt:"},"basicstyles":{"bold":"Paks","italic":"Kursiiv","strike":"Läbijoonitud","subscript":"Allindeks","superscript":"Ülaindeks","underline":"Allajoonitud"},"blockquote":{"toolbar":"Blokktsitaat"},"notification":{"closed":"Teavitused on suletud."},"toolbar":{"toolbarCollapse":"Tööriistariba peitmine","toolbarExpand":"Tööriistariba näitamine","toolbarGroups":{"document":"Dokument","clipboard":"Lõikelaud/tagasivõtmine","editing":"Muutmine","forms":"Vormid","basicstyles":"Põhistiilid","paragraph":"Lõik","links":"Lingid","insert":"Sisesta","styles":"Stiilid","colors":"Värvid","tools":"Tööriistad"},"toolbars":"Redaktori tööriistaribad"},"clipboard":{"copy":"Kopeeri","copyError":"Sinu veebisirvija turvaseaded ei luba redaktoril automaatselt kopeerida. Palun kasutage selleks klaviatuuri klahvikombinatsiooni (Ctrl/Cmd+C).","cut":"Lõika","cutError":"Sinu veebisirvija turvaseaded ei luba redaktoril automaatselt lõigata. Palun kasutage selleks klaviatuuri klahvikombinatsiooni (Ctrl/Cmd+X).","paste":"Aseta","pasteNotification":"Asetamiseks vajuta %1. Sinu brauser ei toeta asetamist tööriistariba nupu või kontekstimenüü valikuga.","pasteArea":"Asetamise ala","pasteMsg":"Aseta sisu alumisse kasti ja vajuta OK nupule."},"contextmenu":{"options":"Kontekstimenüü valikud"},"elementspath":{"eleLabel":"Elementide asukoht","eleTitle":"%1 element"},"filetools":{"loadError":"Faili lugemisel esines viga.","networkError":"Faili üleslaadimisel esines võrgu viga.","httpError404":"Faili üleslaadimisel esines HTTP viga (404: faili ei leitud).","httpError403":"Faili üleslaadimisel esines HTTP viga (403: keelatud).","httpError":"Faili üleslaadimisel esines HTTP viga (veakood: %1).","noUrlError":"Üleslaadimise URL ei ole määratud.","responseError":"Vigane serveri vastus."},"format":{"label":"Vorming","panelTitle":"Vorming","tag_address":"Aadress","tag_div":"Tavaline (DIV)","tag_h1":"Pealkiri 1","tag_h2":"Pealkiri 2","tag_h3":"Pealkiri 3","tag_h4":"Pealkiri 4","tag_h5":"Pealkiri 5","tag_h6":"Pealkiri 6","tag_p":"Tavaline","tag_pre":"Vormindatud"},"horizontalrule":{"toolbar":"Horisontaaljoone sisestamine"},"image":{"alt":"Alternatiivne tekst","border":"Joon","btnUpload":"Saada serverisse","button2Img":"Kas tahad teisendada valitud pildiga nupu tavaliseks pildiks?","hSpace":"H. vaheruum","img2Button":"Kas tahad teisendada valitud tavalise pildi pildiga nupuks?","infoTab":"Pildi info","linkTab":"Link","lockRatio":"Lukusta kuvasuhe","menu":"Pildi omadused","resetSize":"Lähtesta suurus","title":"Pildi omadused","titleButton":"Piltnupu omadused","upload":"Lae üles","urlMissing":"Pildi lähte-URL on puudu.","vSpace":"V. vaheruum","validateBorder":"Äärise laius peab olema täisarv.","validateHSpace":"Horisontaalne vaheruum peab olema täisarv.","validateVSpace":"Vertikaalne vaheruum peab olema täisarv."},"indent":{"indent":"Taande suurendamine","outdent":"Taande vähendamine"},"fakeobjects":{"anchor":"Ankur","flash":"Flashi animatsioon","hiddenfield":"Varjatud väli","iframe":"IFrame","unknown":"Tundmatu objekt"},"link":{"acccessKey":"Juurdepääsu võti","advanced":"Täpsemalt","advisoryContentType":"Juhendava sisu tüüp","advisoryTitle":"Juhendav tiitel","anchor":{"toolbar":"Ankru sisestamine/muutmine","menu":"Ankru omadused","title":"Ankru omadused","name":"Ankru nimi","errorName":"Palun sisesta ankru nimi","remove":"Eemalda ankur"},"anchorId":"Elemendi id järgi","anchorName":"Ankru nime järgi","charset":"Lingitud ressursi märgistik","cssClasses":"Stiilistiku klassid","download":"Sunni allalaadimine","displayText":"Näidatav tekst","emailAddress":"E-posti aadress","emailBody":"Sõnumi tekst","emailSubject":"Sõnumi teema","id":"ID","info":"Lingi info","langCode":"Keele suund","langDir":"Keele suund","langDirLTR":"Vasakult paremale (LTR)","langDirRTL":"Paremalt vasakule (RTL)","menu":"Muuda linki","name":"Nimi","noAnchors":"(Selles dokumendis pole ankruid)","noEmail":"Palun kirjuta e-posti aadress","noUrl":"Palun kirjuta lingi URL","noTel":"Palun sisesta telefoninumber","other":"<muu>","phoneNumber":"Telefoninumber","popupDependent":"Sõltuv (Netscape)","popupFeatures":"Hüpikakna omadused","popupFullScreen":"Täisekraan (IE)","popupLeft":"Vasak asukoht","popupLocationBar":"Aadressiriba","popupMenuBar":"Menüüriba","popupResizable":"Suurust saab muuta","popupScrollBars":"Kerimisribad","popupStatusBar":"Olekuriba","popupToolbar":"Tööriistariba","popupTop":"Ülemine asukoht","rel":"Suhe","selectAnchor":"Vali ankur","styles":"Laad","tabIndex":"Tab indeks","target":"Sihtkoht","targetFrame":"<raam>","targetFrameName":"Sihtmärk raami nimi","targetPopup":"<hüpikaken>","targetPopupName":"Hüpikakna nimi","title":"Link","toAnchor":"Ankur sellel lehel","toEmail":"E-post","toUrl":"URL","toPhone":"Telefon","toolbar":"Lingi lisamine/muutmine","type":"Lingi liik","unlink":"Lingi eemaldamine","upload":"Lae üles"},"list":{"bulletedlist":"Punktloend","numberedlist":"Numberloend"},"magicline":{"title":"Sisesta siia lõigu tekst"},"maximize":{"maximize":"Maksimeerimine","minimize":"Minimeerimine"},"pastefromword":{"confirmCleanup":"Tekst, mida tahad asetada näib pärinevat Wordist. Kas tahad selle enne asetamist puhastada?","error":"Asetatud andmete puhastamine ei olnud sisemise vea tõttu võimalik","title":"Asetamine Wordist","toolbar":"Asetamine Wordist"},"pastetext":{"button":"Asetamine tavalise tekstina","pasteNotification":"Asetamiseks vajuta %1. Sinu brauser ei toeta asetamist tööriistariba nupu või kontekstimenüü valikuga.","title":"Asetamine tavalise tekstina"},"removeformat":{"toolbar":"Vormingu eemaldamine"},"scayt":{"btn_about":"SCAYT-ist lähemalt","btn_dictionaries":"Sõnaraamatud","btn_disable":"SCAYT keelatud","btn_enable":"SCAYT lubatud","btn_langs":"Keeled","btn_options":"Valikud","text_title":"Õigekirjakontroll kirjutamise ajal"},"sourcearea":{"toolbar":"Lähtekood"},"specialchar":{"options":"Erimärkide valikud","title":"Erimärgi valimine","toolbar":"Erimärgi sisestamine"},"stylescombo":{"label":"Stiil","panelTitle":"Vormindusstiilid","panelTitle1":"Blokkstiilid","panelTitle2":"Reasisesed stiilid","panelTitle3":"Objektistiilid"},"table":{"border":"Joone suurus","caption":"Tabeli tiitel","cell":{"menu":"Lahter","insertBefore":"Sisesta lahter enne","insertAfter":"Sisesta lahter peale","deleteCell":"Eemalda lahtrid","merge":"Ühenda lahtrid","mergeRight":"Ühenda paremale","mergeDown":"Ühenda alla","splitHorizontal":"Poolita lahter horisontaalselt","splitVertical":"Poolita lahter vertikaalselt","title":"Lahtri omadused","cellType":"Lahtri liik","rowSpan":"Ridade vahe","colSpan":"Tulpade vahe","wordWrap":"Sõnade murdmine","hAlign":"Horisontaalne joondus","vAlign":"Vertikaalne joondus","alignBaseline":"Baasjoon","bgColor":"Tausta värv","borderColor":"Äärise värv","data":"Andmed","header":"Päis","yes":"Jah","no":"Ei","invalidWidth":"Lahtri laius peab olema number.","invalidHeight":"Lahtri kõrgus peab olema number.","invalidRowSpan":"Ridade vahe peab olema täisarv.","invalidColSpan":"Tulpade vahe peab olema täisarv.","chooseColor":"Vali"},"cellPad":"Lahtri täidis","cellSpace":"Lahtri vahe","column":{"menu":"Veerg","insertBefore":"Sisesta veerg enne","insertAfter":"Sisesta veerg peale","deleteColumn":"Eemalda veerud"},"columns":"Veerud","deleteTable":"Kustuta tabel","headers":"Päised","headersBoth":"Mõlemad","headersColumn":"Esimene tulp","headersNone":"Puudub","headersRow":"Esimene rida","heightUnit":"kõrgusühik","invalidBorder":"Äärise suurus peab olema number.","invalidCellPadding":"Lahtrite polsterdus (padding) peab olema positiivne arv.","invalidCellSpacing":"Lahtrite vahe peab olema positiivne arv.","invalidCols":"Tulpade arv peab olema nullist suurem.","invalidHeight":"Tabeli kõrgus peab olema number.","invalidRows":"Ridade arv peab olema nullist suurem.","invalidWidth":"Tabeli laius peab olema number.","menu":"Tabeli omadused","row":{"menu":"Rida","insertBefore":"Sisesta rida enne","insertAfter":"Sisesta rida peale","deleteRow":"Eemalda read"},"rows":"Read","summary":"Kokkuvõte","title":"Tabeli omadused","toolbar":"Tabel","widthPc":"protsenti","widthPx":"pikslit","widthUnit":"laiuse ühik"},"undo":{"redo":"Toimingu kordamine","undo":"Tagasivõtmine"},"widget":{"move":"Liigutamiseks klõpsa ja lohista","label":"%1 vidin"},"uploadwidget":{"abort":"Kasutaja katkestas üleslaadimise.","doneOne":"Fail on üles laaditud.","doneMany":"%1 faili laaditi edukalt üles.","uploadOne":"Faili üleslaadimine ({percentage}%)...","uploadMany":"Failide üleslaadimine, {current} fail {max}-st üles laaditud ({percentage}%)..."}};
exports.definition = { config: { columns: { IDProducto: 'TEXT PRIMARY KEY', IDCateg: 'TEXT', nombre: 'TEXT', descripcion: 'TEXT', img: 'TEXT', precio: 'TEXT', urlDetalle: 'TEXT' }, defaults: { }, adapter: { type: 'sql', collection_name: 'tienda_productos', idAttribute: 'IDProducto', db_name: 'kanka' }, debug: 0 }, extendModel: function(Model) { _.extend(Model.prototype, { }); return Model; }, extendCollection: function(Collection) { _.extend(Collection.prototype, { }); return Collection; } };
/** * Sample React Native App * https://github.com/facebook/react-native */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; class testReact extends Component { render() { return ( <View style={styles.container}> <Text style={styles.welcome}> Welcome to React Native! </Text> <Text style={styles.instructions}> To get started, edit index.android.js </Text> <Text style={styles.instructions}> Shake or press menu button for dev menu </Text> </View> ); } } const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF', }, welcome: { fontSize: 20, textAlign: 'center', margin: 10, }, instructions: { textAlign: 'center', color: '#333333', marginBottom: 5, }, }); AppRegistry.registerComponent('testReact', () => testReact);
const yaml = require("js-yaml"); const { DateTime } = require("luxon"); const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight"); const htmlmin = require("html-minifier"); module.exports = function (eleventyConfig) { // Disable automatic use of your .gitignore eleventyConfig.setUseGitIgnore(false); // Merge data instead of overriding eleventyConfig.setDataDeepMerge(true); // human readable date eleventyConfig.addFilter("readableDate", (dateObj) => { return DateTime.fromJSDate(dateObj, { zone: "utc" }).toFormat( "dd LLL yyyy" ); }); eleventyConfig.addFilter("filterTagList", (tags) => { // should match the list in tags.njk return (tags || []).filter( (tag) => ["all", "nav", "post", "posts"].indexOf(tag) === -1 ); }); eleventyConfig.addCollection("tagList", function (collection) { let tagSet = new Set(); collection.getAll().forEach(function (item) { if ("tags" in item.data) { let tags = item.data.tags; tags = tags.filter(function (item) { switch (item) { // this list should match the `filter` list in tags.njk case "all": case "nav": case "post": case "posts": return false; } return true; }); for (const tag of tags) { tagSet.add(tag); } } }); // returning an array in addCollection works in Eleventy 0.5.3 return [...tagSet]; }); // Syntax Highlighting for Code blocks eleventyConfig.addPlugin(syntaxHighlight); // To Support .yaml Extension in _data // You may remove this if you can use JSON eleventyConfig.addDataExtension("yaml", (contents) => yaml.safeLoad(contents) ); // Copy Static Files to /_Site eleventyConfig.addPassthroughCopy({ "./src/admin/config.yml": "./admin/config.yml", // "./node_modules/alpinejs/dist/alpine.js": "./static/js/alpine.js", "./node_modules/prismjs/themes/prism-tomorrow.css": "./static/css/prism-tomorrow.css", }); // Copy Image Folder to /_site eleventyConfig.addPassthroughCopy("./src/static/img"); // Copy favicon to route of /_site eleventyConfig.addPassthroughCopy("./src/favicon.ico"); // Minify HTML eleventyConfig.addTransform("htmlmin", function (content, outputPath) { // Eleventy 1.0+: use this.inputPath and this.outputPath instead if (outputPath.endsWith(".html")) { let minified = htmlmin.minify(content, { useShortDoctype: true, removeComments: true, collapseWhitespace: true, }); return minified; } return content; }); // Let Eleventy transform HTML files as nunjucks // So that we can use .html instead of .njk return { dir: { input: "src", }, htmlTemplateEngine: "njk", }; };
(function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(factory); } else { // Browser globals. root.VanillaMasker = factory(); } }(this, function() { var DIGIT = "9", ALPHA = "A"; var VanillaMasker = function(opts) { opts = opts || {}; this.opts = { precision: opts.hasOwnProperty("precision") ? opts.precision : 2, separator: opts.separator || ",", delimiter: opts.delimiter || ".", unit: opts.unit && (opts.unit + " ") || "", zeroCents: opts.zeroCents }; this.lastOutput = ""; this.moneyPrecision = opts.zeroCents ? 0 : this.opts.precision; }; VanillaMasker.prototype.bindElementToMask = function(el, maskFunction, params) { try { var that = this, elements = el.length ? el : [el], onType = function(e) { if (e.target) { e.target.value = that[maskFunction](e.target.value, params); } else { e.srcElement.value = that[maskFunction](e.srcElement.value, params); } } ; for (var i = 0, len = elements.length; i < len; i++) { if (elements[i].addEventListener) { elements[i].addEventListener("keyup", onType); elements[i].addEventListener("keydown", onType); } else { elements[i].attachEvent("onkeyup", onType); elements[i].attachEvent("onkeydown", onType); } } } catch(e) { console.log("There is no element to bind."); } }; VanillaMasker.prototype.maskMoney = function(el) { this.bindElementToMask(el, "toMoney"); }; VanillaMasker.prototype.toMoney = function(value) { if (this.opts.zeroCents) { var zeroMatcher = ("("+ this.opts.separator +"[0]{0,"+ this.opts.precision +"})"), zeroRegExp = new RegExp(zeroMatcher, "g"), initialInputLength = value.length || 0 ; value = value.toString().replace(zeroRegExp, ""); if (initialInputLength < this.lastOutput.length) { value = value.slice(0, value.length - 1); } } var number = value.toString().replace(/[\D]/g, ""), clearDelimiter = new RegExp("^(0|\\"+ this.opts.delimiter +")"), clearSeparator = new RegExp("(\\"+ this.opts.separator +")$"), money = number.substr(0, number.length - this.moneyPrecision), masked = money.substr(0, money.length % 3), cents = new Array(this.opts.precision + 1).join("0") ; money = money.substr(money.length % 3, money.length); for (var i = 0, len = money.length; i < len; i++) { if (i % 3 === 0) { masked += this.opts.delimiter; } masked += money[i]; } masked = masked.replace(clearDelimiter, ""); masked = masked.length ? masked : "0"; if (!this.opts.zeroCents) { var beginCents = number.length - this.opts.precision, centsValue = number.substr(beginCents, this.opts.precision), centsLength = centsValue.length, centsSliced = (this.opts.precision > centsLength) ? this.opts.precision : centsLength ; cents = (cents + centsValue).slice(-centsSliced); } var output = (this.opts.unit + masked + this.opts.separator + cents); this.lastOutput = output = output.replace(clearSeparator, ""); return output; }; VanillaMasker.prototype.maskNumber = function(el) { this.bindElementToMask(el, "toNumber"); }; VanillaMasker.prototype.toNumber = function(value) { return value.toString().replace(/(?!^-)[^0-9]/g, ""); }; VanillaMasker.prototype.maskPattern = function(el, pattern) { this.bindElementToMask(el, "toPattern", pattern); }; VanillaMasker.prototype.toPattern = function(value, pattern) { var output = pattern.split(""), values = value.toString().replace(/[^0-9a-zA-Z]/g, ""), index = 0, i ; for (i = 0; i < output.length; i++) { if (index >= values.length) { break; } if ((output[i] === DIGIT && values[index].match(/[0-9]/)) || (output[i] === ALPHA && values[index].match(/[a-zA-Z]/))) { output[i] = values[index++]; } else if (output[i] === DIGIT || output[i] === ALPHA) { output = output.slice(0, i); } } return output.join("").substr(0, i); }; // Return a value to define the module export. return VanillaMasker; }));
var app = require('express'); var server = require('http').Server(app); var io = require('socket.io')(server); var redis = require('redis'); const axios = require('axios'); var defaultRoom = null; var users = []; var connectedUsers = { }; async function userDisconnected(userId){ try { const res = await axios.post( "http://localhost:8000/api/updateStatus", { id: userId, additionalData: 'wNuhD8NwkeXYqBr4CWo2' }); } catch (error) { console.log(error) } } var mySocketId = null; server.listen(7740); var redisClient = redis.createClient(); redisClient.subscribe('revertData'); redisClient.on('message', function(channel, message){ if(channel === 'revertData'){ console.log('reverdata', JSON.parse( message)) } }); redisClient.subscribe('message'); redisClient.on('message', function(channel, message){ if(message.trim() && channel === 'message'){ io.emit('evaluation', message); } console.log(message) }); redisClient.on('disconnect', function(){ redisClient.quit(); }); redisClient.subscribe('userconnected'); redisClient.on('message', function(channel, message){ if(channel === 'userconnected'){ var data = {'id' : message, 'socketid' : mySocketId}; var message2 = '2' if(connectedUsers[message]){ if(Object.keys(connectedUsers[message]).length >=20){ connectedUsers[message] = {}; } console.log(Object.keys(connectedUsers[message]).length, 'length') var found = null for (const innerKey in connectedUsers[message]) { if ( connectedUsers[message][innerKey].socketid === data.socketid) { found = data.socketid } } if(found !== data.socketid){ connectedUsers[message][Object.keys(connectedUsers[message]).length] = {'id': data.id, 'socketid': data.socketid} } } else{ connectedUsers[message] = {}; connectedUsers[message][0] = {'id': data.id, 'socketid': data.socketid} } console.log(connectedUsers) } }); redisClient.on('disconnect', function(){ redisClient.quit(); }); redisClient.subscribe('ClassSchedule'); redisClient.on('message', function(channel, message){ if(channel === 'ClassSchedule'){ io.emit('schedule', JSON.parse( message)) console.log('message',JSON.parse( message)) } }); redisClient.on('disconnect', function(){ redisClient.quit(); }); io.on('connection', function(socket){ console.log('Client connected'); mySocketId = socket.id socket.room = mySocketId socket.on('typingStatus', function(latestmessage){ for (const parentKey in connectedUsers) { for (const innerKey in connectedUsers[parentKey]) { if ( connectedUsers[parentKey][innerKey].id === latestmessage.secondUser.toString()) { io.to(connectedUsers[parentKey][innerKey].socketid).emit('myTypingStatus', {friend: latestmessage.friend, bonusdata: latestmessage.bonusdata, currentUser: latestmessage.currentUserName, messageType:latestmessage.messageType, isTyping:latestmessage.isTyping, currentUserAvatar: latestmessage.currentUserAvatar}) } } } }) socket.on('latestMessage', function(latestmessage){ io.sockets.emit('chat', {name: latestmessage.currentUserName, message: latestmessage.message, idx: latestmessage.friend['idx']}) const parentId = null const innerId = null // suppose you want to find the parent+inner ids for the object that has the 'kmleHjGhwNy3SkwxAAAG' generatedid for (const parentKey in connectedUsers) { for (const innerKey in connectedUsers[parentKey]) { if ( connectedUsers[parentKey][innerKey].id === latestmessage.secondUser.toString()) { io.to(connectedUsers[parentKey][innerKey].socketid).emit('sendMessage', {message: latestmessage.message, friend: latestmessage.friend, messagedata: latestmessage.messagedata, bonusdata: latestmessage.bonusdata, currentUser: latestmessage.currentUserName, messageType:latestmessage.messageType, currentUserAvatar:latestmessage.currentUserAvatar, settings: 'message', senderId: latestmessage.myId, currentUserSocket: connectedUsers[parentKey][innerKey].socketid}) io.to(connectedUsers[parentKey][innerKey].socketid).emit('messageNotification', {bonusdata: latestmessage.myId, myunread: latestmessage}) } if ( connectedUsers[parentKey][innerKey].id === latestmessage.myId.toString()) { socket.broadcast.to(connectedUsers[parentKey][innerKey].socketid).emit('sendMessage', {message: latestmessage.message, friend: latestmessage.friend, messagedata: latestmessage.messagedata, bonusdata: latestmessage.bonusdata, currentUser: latestmessage.currentUserName, messageType:latestmessage.messageType, currentUserAvatar:latestmessage.currentUserAvatar, settings: 'message', senderId: latestmessage.myId, currentUserSocket: connectedUsers[parentKey][innerKey].socketid}) io.to(connectedUsers[parentKey][innerKey].socketid).emit('messageNotification', {bonusdata: latestmessage.myId, myunread: latestmessage}) } } } }); socket.on('write', function(data){ }) socket.on('friendOnline', function(data){ io.sockets.emit('yourFriend', data) }) socket.on('roomdata', function(data){ if(socket.room){ socket.leaveAll() const newRoom = socket.join() } socket.leave(defaultRoom) if(data.currentRole == 'tutor'){ if(defaultRoom){ socket.leave(defaultRoom) io.in(data.firstUser + data.secondUser).clients(function (error, clients) { if (error) { throw error; } if(clients.length <2){ socket.join(data.firstUser + data.secondUser); defaultRoom = data.firstUser + data.secondUser; socket.room = defaultRoom } }); } else{ socket.leave(defaultRoom) socket.join(data.firstUser + data.secondUser); defaultRoom = data.firstUser + data.secondUser; socket.room = defaultRoom } } else{ if(defaultRoom){ io.in(data.secondUser + data.firstUser).clients(function (error, clients) { if (error) { throw error; } if(clients.length <3){ socket.join(data.secondUser + data.firstUser); defaultRoom = data.secondUser + data.firstUser; socket.room = defaultRoom } }); } else{ socket.join(data.secondUser + data.firstUser); defaultRoom = data.secondUser + data.firstUser; socket.room = defaultRoom } } }) socket.on('ImOn', function(data){ io.sockets.emit('Now', data) }) socket.on('forceDisconnect', function(data){ io.sockets.connected[data].disconnect(); }) socket.on('disconnect', function(){ console.log('disconnected', socket.id) io.sockets.emit('userDisconnected', socket.id) console.log('latestUsers', connectedUsers) }); });
import _define_property from "@swc/helpers/src/_define_property.mjs"; // @target: es6 function f() { var t; var u; var _obj; var v = (_obj = {}, _define_property(_obj, t, 0), _define_property(_obj, u, 1), _obj); }
//index.js //获取应用实例 var util = require('../../../utils/util.js'); const app = getApp(); Page({ data: { src: ["http://b321.photo.store.qq.com/psb?/V12aMNdl3T0WQr/xx0cFBUS2DhEua6rPR9oznnxEVcT4KUXJejpcLiwKkc!/c/dEEBAAAAAAAA&bo=OAQ4BDgEOAQRADc!&rf=mood_app&t=5"], srcBig: ["https://wx1.sinaimg.cn/large/005HOofigy1fj6r6v3fyej32c02c0kjl.jpg"], days: 1314, H: 5, M: 2, S: 0, imageItem: ["http://a1.qpic.cn/psc?/V12aMNdl3T0WQr/0PrhSz*Kk2tvG8E8u*h5wlWGZlPPOqEH6i88qPor2OmeWfKtE3Nco7HzbKVFSBIwjOvmh4teN3vDnckAcakkhw!!/c&ek=1&kp=1&pt=0&bo=9QEMAvUBDAIRADc!&tl=3&vuin=1370344136&tm=1584694800&sce=60-2-2&rf=0-0"], year: 2015, num: 154, run: [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], ping: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], setInter: '', }, money: function(e) { wx.previewImage({ current: this.data.imageItem, urls: this.data.imageItem, }) }, src: function(e) { wx.previewImage({ current: this.data.src, urls: this.data.srcBig, }) }, onShow: function() { var that = this; that.data.setInter = setInterval(function() { //获取当前时间戳 var timestamp = Date.parse(new Date()); timestamp = timestamp / 1000; //获取当前时间 var n = timestamp * 1000; var date = new Date(n); //年 var Y = date.getFullYear(); //月 var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1); //日 var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); D = Number(D); //时 var h = date.getHours(); //分 var m = date.getMinutes(); //秒 var s = date.getSeconds(); var days = that.data.num; var year = that.data.year; while (year < Y) { if ((Y % 400) == 0 || (Y % 4 == 0) && (Y % 100) != 0) { days += 366; } else { days += 365; }; year++; }; if ((Y % 400) == 0 || (Y % 4 == 0) && (Y % 100) != 0) { for (var i = 0; i < M - 1; i++) { days += that.data.run[i]; }; days += D; } else { for (var i = 0; i < M - 1; i++) { days += that.data.ping[i]; }; days += D; }; that.setData({ days: days, H: h, M: m, S: s, }); }, 1000); }, //事件处理函数 onLoad: function() { }, endSetInter: function() { var that = this; clearInterval(that.data.setInter) }, onHide: function() { var that = this; clearInterval(that.data.setInter); }, onUnload: function() { var that = this; clearInterval(that.data.setInter); }, onShareAppMessage: function() { return { title: '快来跟我一起嗑糖&(昕羊太甜了)', path: '/pages/index/index' } }, })
// Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmine'), require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-coverage-istanbul-reporter'), require('@angular-devkit/build-angular/plugins/karma') ], client: { clearContext: false // leave Jasmine Spec Runner output visible in browser }, coverageIstanbulReporter: { dir: require('path').join(__dirname, './coverage/Scenius'), reports: ['html', 'lcovonly', 'text-summary'], fixWebpackSourcePaths: true }, reporters: ['progress', 'kjhtml'], port: 9876, colors: true, logLevel: config.LOG_INFO, autoWatch: true, browsers: ['Chrome'], singleRun: false, restartOnFileChange: true }); };
/** * Coinsecure Api Documentation * To generate an API key, please visit <a href='https://coinsecure.in/api' target='_new' class='homeapi'>https://coinsecure.in/api</a>.<br>Guidelines for use can be accessed at <a href='https://api.coinsecure.in/v1/guidelines'>https://api.coinsecure.in/v1/guidelines</a>.<br>Programming Language Libraries for use can be accessed at <a href='https://api.coinsecure.in/v1/code-libraries'>https://api.coinsecure.in/v1/code-libraries</a>. * * OpenAPI spec version: beta * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['ApiClient', 'model/ValidAddressSearchData'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./ValidAddressSearchData')); } else { // Browser globals (root is window) if (!root.CoinsecureApiDocumentation) { root.CoinsecureApiDocumentation = {}; } root.CoinsecureApiDocumentation.ValidAddressSearchDataResponse = factory(root.CoinsecureApiDocumentation.ApiClient, root.CoinsecureApiDocumentation.ValidAddressSearchData); } }(this, function(ApiClient, ValidAddressSearchData) { 'use strict'; /** * The ValidAddressSearchDataResponse model module. * @module model/ValidAddressSearchDataResponse * @version beta */ /** * Constructs a new <code>ValidAddressSearchDataResponse</code>. * @alias module:model/ValidAddressSearchDataResponse * @class * @param success {Boolean} true * @param message {module:model/ValidAddressSearchData} * @param method {String} * @param title {String} * @param time {Date} */ var exports = function(success, message, method, title, time) { var _this = this; _this['success'] = success; _this['message'] = message; _this['method'] = method; _this['title'] = title; _this['time'] = time; }; /** * Constructs a <code>ValidAddressSearchDataResponse</code> from a plain JavaScript object, optionally creating a new instance. * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. * @param {Object} data The plain JavaScript object bearing properties of interest. * @param {module:model/ValidAddressSearchDataResponse} obj Optional instance to populate. * @return {module:model/ValidAddressSearchDataResponse} The populated <code>ValidAddressSearchDataResponse</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('success')) { obj['success'] = ApiClient.convertToType(data['success'], 'Boolean'); } if (data.hasOwnProperty('message')) { obj['message'] = ValidAddressSearchData.constructFromObject(data['message']); } if (data.hasOwnProperty('method')) { obj['method'] = ApiClient.convertToType(data['method'], 'String'); } if (data.hasOwnProperty('title')) { obj['title'] = ApiClient.convertToType(data['title'], 'String'); } if (data.hasOwnProperty('time')) { obj['time'] = ApiClient.convertToType(data['time'], 'Date'); } } return obj; } /** * true * @member {Boolean} success * @default false */ exports.prototype['success'] = false; /** * @member {module:model/ValidAddressSearchData} message */ exports.prototype['message'] = undefined; /** * @member {String} method */ exports.prototype['method'] = undefined; /** * @member {String} title */ exports.prototype['title'] = undefined; /** * @member {Date} time */ exports.prototype['time'] = undefined; return exports; }));
import TagItemMini from './TagItemMini' /** * 标签组 * @param tags * @param currentTag * @returns {JSX.Element} * @constructor */ const TagGroups = ({ tags, currentTag }) => { if (!tags) return <></> return ( <div id='tags-group' className='dark:border-gray-600 space-y-2'> <div className='font-light text-xs ml-2 mb-2'><i className='mr-1 fas fa-tag' />标签</div> <div className='px-4'> { tags.map(tag => { const selected = tag.name === currentTag return <TagItemMini key={tag.name} tag={tag} selected={selected} /> }) } </div> </div> ) } export default TagGroups
import template from './app.html'; let appComponent = () => { return { template, restrict: 'E' }; }; export default appComponent;
import { shell } from 'electron'; import React, { useRef, useState } from 'react'; import uuid from 'uuid/v4'; import styled from 'styled-components'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import R from 'ramda'; import { Tooltip } from 'components'; import { colors } from 'theme'; import { Logger } from 'renderer/utils/logging'; const Wrapper = styled.div` display: flex; align-items: center; background: ${p => p.styles.backgroundColor}; padding: ${p => p.styles.padding}; `; const Text = styled.textarea` overflow: hidden; background: transparent; color: ${colors.text}; border: 0; outline: none; box-shadow: 0; resize: none; font-size: 14px; min-width: 26.5rem; height: ${p => p.styles.height}; line-height: ${p => p.styles.lineHeight}; text-decoration: ${p => p.styles.textDecoration}; width: 100%; min-width: ${p => p.styles.textMinWidth}; padding-top: ${p => p.styles.textPaddingTop}; &:hover { text-decoration: ${p => p.styles.textDecoration}; } `; const Icon = styled(FontAwesomeIcon)` cursor: pointer; margin-top: 2px; `; const defaultStyling = () => { return { backgroundColor: colors.background, padding: '0.5rem', height: '3rem', lineHeight: '1.2rem', textDecoration: 'underline', icon2MarginLeft: '2rem', textMinWidth: '20vw', textPaddingTop: '1.5rem', }; }; const ClipboardShareLinks = ({ icon, iconExtLink, children, url, styles: customStyles }) => { const id = uuid(); const [message, setMessage] = useState('Copy address'); const textRef = useRef(null); const styles = R.merge(defaultStyling(), customStyles); function copyToClipboard(e) { textRef.current.select(); document.execCommand('copy'); setMessage('Copied!'); } function openExternalLink(e) { Logger.debug(`openExternalLink: ${textRef.current.value}`); shell.openExternal(url + '/' + textRef.current.value); } return ( <Wrapper {...{ styles }}> <Text ref={textRef} value={children} onChange={() => {}} {...{ styles }} /> <Icon {...icon} onClick={copyToClipboard} onMouseEnter={() => setMessage('Copy address')} data-for={id} data-tip /> <Icon {...iconExtLink} onClick={openExternalLink} onMouseEnter={() => setMessage('Check on UNcover')} data-for={id} data-tip style={{ marginLeft: styles.icon2MarginLeft }} /> <Tooltip id={id}>{message}</Tooltip> </Wrapper> ); }; ClipboardShareLinks.defaultProps = { icon: { color: colors.text, icon: 'copy', size: 'sm', }, iconExtLink: { color: colors.text, icon: 'external-link-alt', size: 'sm', }, }; export default ClipboardShareLinks;
var _editor = div(); var template = ` <div class=input></div> <textarea class=insert></textarea> <div class=flager tabindex=0><div></div></div> `; /** * 加粗 */ function bold() { } /** * 斜体 */ function italic() { } /** * 居中 */ var browserClass = /(QQ|Safari|CriOS|Chrome)/i.exec(navigator.userAgent); if (browserClass) { browserClass = browserClass[1].toLowerCase() + " " + String(navigator.platform).replace(/[^\w]/g, a => "-" + a.charCodeAt(0).toString(36)); } else { browserClass = ""; } var isIOS = /iPhone|iPad|iOS|iPod/.test(browserClass); var isSafari = isIOS && /safari/i.test(browserClass); var getScrollTops = function (element) { var result = []; while (element) { result.push(element.scrollTop); element = element.offsetParent; } return result; } function editor() { var edit = createElement(_editor); browserClass && addClass(edit, browserClass); var focusClass = "focus"; edit.innerHTML = template; var [input, insert, flager] = edit.children; var inner_flager = flager.children[0]; onfocus(flager, function () { insert.focus(); }); var timer = 0; var reshaper = function () { if (!isSafari || document.activeElement !== insert) return; timer = setTimeout(reshaper, 500); once("scroll")(window, function () { alert('reshape' + [flager.scrollTop, window.innerHeight]); flager.scrollTop = 0; }); flager.scrollTop = 0; // inner_flager.scrollIntoView(); ; }; onfocus(insert, function () { clearTimeout(timer); isSafari && inner_flager.scrollIntoView(); timer = setTimeout(function () { !isSafari && inner_flager.scrollIntoView(); timer = setTimeout(function () { addClass(edit, focusClass); reshaper(); }, 10); }, 0); }); var build = lazy(function () { input.innerText = insert.value; }); on("input")(insert, build); on("keypress")(insert, build); onblur(insert, function () { clearTimeout(timer); removeClass(edit, focusClass); flager.scrollIntoView(false); }); edit.bold = bold; edit.italic = italic; return edit; }
/// Copyright (c) 2009 Microsoft Corporation /// /// Redistribution and use in source and binary forms, with or without modification, are permitted provided /// that the following conditions are met: /// * Redistributions of source code must retain the above copyright notice, this list of conditions and /// the following disclaimer. /// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and /// the following disclaimer in the documentation and/or other materials provided with the distribution. /// * Neither the name of Microsoft nor the names of its contributors may be used to /// endorse or promote products derived from this software without specific prior written permission. /// /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR /// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS /// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE /// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT /// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, /// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF /// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ES5Harness.registerTest({ id: "15.4.4.21-9-c-ii-23", path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-23.js", description: "Array.prototype.reduce - number primitive can be used as accumulator", test: function testcase() { var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; return prevVal === 12; } var obj = { 0: 11, length: 1 }; return Array.prototype.reduce.call(obj, callbackfn, 12) === true && accessed; }, precondition: function prereq() { return fnExists(Array.prototype.reduce); } });
module.exports = { contact: "rgb(160, 148, 237)", workOrder: "rgb(80, 227, 194)", post: "rgb(101, 202, 228)", carousel: "rgb(107, 189, 110)", resourceSkill: "rgb(69, 193, 115)", goals: "rgb(86, 170, 223)", investmentAccount: "rgb(75, 192, 118)", default: "rgb(129, 153, 175)", caseMilestone: "rgb(242, 207, 91)", today: "rgb(239, 126, 173)", leadList: "rgb(248, 137, 98)", productItemTransaction: "rgb(248, 137, 98)", answerPrivate: "rgb(242, 207, 91)", retailBankingConsole: "rgb(0, 175, 160)", channelProgramMembers: "rgb(14, 181, 138)", appsAdmin: "rgb(152, 149, 238)", datadotcom: "rgb(21, 137, 238)", productItem: "rgb(118, 158, 217)", metrics: "rgb(86, 170, 223)", topic2: "rgb(86, 170, 208)", partnerFundAllocation: "rgb(14, 181, 138)", approval: "rgb(80, 204, 122)", iotOrchestrations: "rgb(42, 115, 158)", personAccount: "rgb(127, 141, 225)", entity: "rgb(248, 137, 98)", serviceTerritoryLocation: "rgb(126, 139, 228)", readReceipts: "rgb(75, 192, 118)", maintenanceAsset: "rgb(42, 115, 158)", marketingActions: "rgb(107, 189, 110)", caseTranscript: "rgb(242, 207, 91)", timesheetEntry: "rgb(125, 195, 125)", task: "rgb(75, 192, 118)", answerBest: "rgb(242, 207, 91)", orders: "rgb(118, 158, 217)", pastChat: "rgb(248, 137, 96)", feedback: "rgb(109, 161, 234)", actionListComponent: "rgb(88, 118, 163)", opportunitySplits: "rgb(252, 185, 91)", messagingUser: "rgb(52, 190, 205)", entitlements: "rgb(183, 129, 211)", caseLogACall: "rgb(242, 207, 91)", thanksLoading: "rgb(184, 195, 206)", channelProgramLevels: "rgb(14, 181, 138)", emailChatter: "rgb(242, 207, 91)", announcement: "rgb(98, 183, 237)", bot: "rgb(84, 105, 143)", macros: "rgb(71, 207, 210)", assetRelationship: "rgb(250, 151, 92)", coaching: "rgb(246, 117, 148)", search: "rgb(98, 183, 237)", connectedApps: "rgb(152, 149, 238)", workType: "rgb(84, 105, 141)", environmentHub: "rgb(84, 105, 141)", cms: "rgb(136, 198, 81)", thanks: "rgb(233, 105, 110)", serviceTerritoryMember: "rgb(126, 139, 228)", campaignMembers: "rgb(244, 151, 86)", retailBanking: "rgb(0, 210, 190)", calibration: "rgb(71, 207, 210)", answerPublic: "rgb(242, 207, 91)", unmatched: "rgb(98, 183, 237)", partners: "rgb(14, 181, 138)", emailIq: "rgb(160, 148, 237)", serviceCrew: "rgb(250, 151, 92)", resourceCapacity: "rgb(69, 193, 115)", channelPrograms: "rgb(14, 181, 138)", quip: "rgb(37, 180, 233)", quipSheet: "rgb(48, 200, 90)", timeslot: "rgb(250, 178, 76)", liveChat: "rgb(248, 137, 96)", user: "rgb(52, 190, 205)", client: "rgb(0, 210, 190)", portal: "rgb(174, 199, 112)", partnerFundRequest: "rgb(14, 181, 138)", resourcePreference: "rgb(69, 193, 115)", resourceAbsence: "rgb(69, 193, 115)", entitlementTemplate: "rgb(126, 139, 228)", entitlement: "rgb(126, 139, 228)", empty: "rgb(129, 153, 175)", caseEmail: "rgb(242, 207, 91)", account: "rgb(127, 141, 225)", wealthManagementConsole: "rgb(0, 175, 160)", task2: "rgb(75, 192, 118)", social: "rgb(234, 116, 162)", endorsement: "rgb(139, 154, 227)", folder: "rgb(139, 154, 227)", serviceCrewMember: "rgb(126, 139, 228)", flow: "rgb(0, 121, 188)", omniSupervisor: "rgb(138, 118, 240)", product: "rgb(183, 129, 211)", topic: "rgb(86, 170, 223)", productRequired: "rgb(239, 110, 100)", process: "rgb(0, 121, 188)", people: "rgb(52, 190, 205)", reward: "rgb(233, 105, 110)", performance: "rgb(248, 177, 86)", caseComment: "rgb(242, 207, 91)", campaign: "rgb(244, 151, 86)", businessHours: "rgb(125, 195, 125)", evernote: "rgb(134, 200, 111)", serviceTerritory: "rgb(126, 139, 228)", case: "rgb(242, 207, 91)", record: "rgb(125, 195, 125)", contractLineItem: "rgb(110, 192, 110)", skillEntity: "rgb(139, 154, 227)", skill: "rgb(250, 151, 92)", operatingHours: "rgb(107, 158, 226)", custom: "rgb(129, 153, 175)", relatedList: "rgb(89, 188, 171)", caseChangeStatus: "rgb(242, 207, 91)", insuranceConsole: "rgb(0, 175, 160)", contract: "rgb(110, 192, 110)", photo: "rgb(215, 209, 209)", apps: "rgb(60, 151, 221)", timesheet: "rgb(126, 139, 228)", drafts: "rgb(108, 161, 233)", workOrderItem: "rgb(51, 168, 220)", pricebook: "rgb(183, 129, 211)", scanCard: "rgb(243, 158, 88)", note: "rgb(230, 212, 120)", opportunity: "rgb(252, 185, 91)", news: "rgb(127, 141, 225)", callHistory: "rgb(242, 207, 91)", report: "rgb(46, 203, 190)", groups: "rgb(119, 158, 242)", dashboard: "rgb(239, 110, 100)", genericLoading: "rgb(184, 195, 206)", address: "rgb(75, 192, 118)", entityMilestone: "rgb(244, 151, 86)", wealthManagement: "rgb(0, 210, 190)", customers: "rgb(14, 181, 138)", serviceAppointment: "rgb(126, 139, 228)", maintenancePlan: "rgb(42, 115, 158)", dataIntegrationHub: "rgb(42, 115, 158)", hierarchy: "rgb(52, 190, 205)", partnerMarketingBudget: "rgb(14, 181, 138)", skillRequirement: "rgb(250, 151, 92)", location: "rgb(75, 192, 118)", avatarLoading: "rgb(184, 195, 206)", article: "rgb(242, 207, 91)", logACall: "rgb(72, 195, 204)", quotes: "rgb(136, 198, 81)", questionFeed: "rgb(242, 207, 91)", merge: "rgb(242, 207, 91)", productConsumed: "rgb(85, 188, 156)", canvas: "rgb(129, 153, 175)", forecasts: "rgb(107, 189, 110)", relationship: "rgb(60, 151, 221)", serviceResource: "rgb(126, 139, 228)", salesPath: "rgb(42, 115, 158)", rtcPresence: "rgb(71, 207, 210)", avatar: "rgb(98, 183, 237)", solution: "rgb(143, 201, 114)", partnerFundClaim: "rgb(14, 181, 138)", individual: "rgb(60, 151, 221)", customNotification: "rgb(107, 183, 228)", template: "rgb(60, 151, 221)", shipment: "rgb(126, 139, 228)", event: "rgb(235, 112, 146)", insurance: "rgb(0, 210, 190)", liveChatVisitor: "rgb(246, 137, 96)", survey: "rgb(49, 159, 214)", link: "rgb(122, 154, 230)", messagingSession: "rgb(52, 190, 205)", listEmail: "rgb(139, 174, 181)", document: "rgb(186, 172, 147)", productTransfer: "rgb(248, 137, 98)", recent: "rgb(108, 161, 233)", insights: "rgb(236, 148, 237)", dropbox: "rgb(82, 174, 249)", file: "rgb(186, 172, 147)", teamMember: "rgb(242, 207, 91)", groupLoading: "rgb(184, 195, 206)", lead: "rgb(248, 137, 98)", email: "rgb(149, 174, 197)", serviceContract: "rgb(138, 118, 240)", entitlementProcess: "rgb(126, 139, 228)", contactList: "rgb(160, 148, 237)", channelProgramHistory: "rgb(14, 181, 138)", questionBest: "rgb(242, 207, 91)", knowledge: "rgb(236, 148, 237)", leadInsights: "rgb(34, 176, 230)", concur: "rgb(76, 195, 199)", feed: "rgb(98, 183, 237)", messagingConversation: "rgb(52, 190, 205)", serviceReport: "rgb(126, 139, 228)", call: "rgb(242, 207, 91)", stage: "rgb(255, 154, 60)", productRequestLineItem: "rgb(136, 198, 81)", returnOrderLineItem: "rgb(0, 150, 136)", quickText: "rgb(98, 183, 229)", home: "rgb(239, 126, 173)", sossession: "rgb(84, 105, 141)", stageCollection: "rgb(255, 154, 60)", productRequest: "rgb(136, 198, 81)", logging: "rgb(0, 161, 223)", assignedResource: "rgb(69, 193, 115)", returnOrder: "rgb(0, 150, 136)", poll: "rgb(105, 155, 225)", household: "rgb(0, 175, 160)", };
var searchData= [ ['setobjectcountfrommultisetenv',['setObjectCountFromMultisetEnv',['../lulu_8c.html#a234d7f1fb9ab0d414fd3031cea69066b',1,'setObjectCountFromMultisetEnv(multiset_env_t *multiset, uint8_t obj, uint8_t newCount):&#160;lulu.c'],['../lulu_8h.html#a234d7f1fb9ab0d414fd3031cea69066b',1,'setObjectCountFromMultisetEnv(multiset_env_t *multiset, uint8_t obj, uint8_t newCount):&#160;lulu.c']]], ['setobjectcountfrommultisetobj',['setObjectCountFromMultisetObj',['../lulu_8c.html#a33d3c30194afc6c74ab74d79fc7d7051',1,'setObjectCountFromMultisetObj(multiset_obj_t *multiset, uint8_t obj, uint8_t newCount):&#160;lulu.c'],['../lulu_8h.html#a33d3c30194afc6c74ab74d79fc7d7051',1,'setObjectCountFromMultisetObj(multiset_obj_t *multiset, uint8_t obj, uint8_t newCount):&#160;lulu.c']]] ];
import React, { Component } from 'react'; import { createUser, createCurrentUser, createMessage, createTransaction, createListing, createTxTransition, createReview, } from '../../util/test-data'; import { TRANSITION_ACCEPT, TRANSITION_COMPLETE, TRANSITION_DECLINE, TRANSITION_EXPIRE_REVIEW_PERIOD, TRANSITION_REQUEST_PAYMENT, TRANSITION_CONFIRM_PAYMENT, TRANSITION_REVIEW_1_BY_CUSTOMER, TRANSITION_REVIEW_1_BY_PROVIDER, TRANSITION_REVIEW_2_BY_CUSTOMER, TRANSITION_REVIEW_2_BY_PROVIDER, TX_TRANSITION_ACTOR_CUSTOMER, TX_TRANSITION_ACTOR_PROVIDER, } from '../../util/transaction'; import ActivityFeed from './ActivityFeed'; const noop = () => null; export const Empty = { component: ActivityFeed, props: { messages: [], hasOlderMessages: false, onOpenReviewModal: noop, onShowOlderMessages: noop, fetchMessagesInProgress: false, }, group: 'messages', }; export const WithoutCurrentUser = { component: ActivityFeed, props: { messages: [ createMessage('msg1', {}, { sender: createUser('user1') }), createMessage('msg2', {}, { sender: createUser('user2') }), ], hasOlderMessages: false, onOpenReviewModal: noop, onShowOlderMessages: noop, fetchMessagesInProgress: false, }, group: 'messages', }; export const WithCurrentUser = { component: ActivityFeed, props: { currentUser: createCurrentUser('user2'), messages: [ createMessage('msg1', {}, { sender: createUser('user1') }), createMessage('msg2', {}, { sender: createUser('user2') }), createMessage('msg3', { content: 'ok' }, { sender: createUser('user2') }), createMessage('msg4', { content: 'ok' }, { sender: createUser('user1') }), createMessage('msg5', {}, { sender: createUser('user1') }), ], hasOlderMessages: false, onOpenReviewModal: noop, onShowOlderMessages: noop, fetchMessagesInProgress: false, }, group: 'messages', }; export const WithTransitions = { component: ActivityFeed, props: { currentUser: createCurrentUser('user2'), transaction: createTransaction({ customer: createUser('user1'), provider: createUser('user2'), listing: createListing('Listing'), transitions: [ // this should not be visible in the feed createTxTransition({ createdAt: new Date(Date.UTC(2017, 10, 9, 8, 10)), by: TX_TRANSITION_ACTOR_CUSTOMER, transition: TRANSITION_REQUEST_PAYMENT, }), createTxTransition({ createdAt: new Date(Date.UTC(2017, 10, 9, 8, 10)), by: TX_TRANSITION_ACTOR_CUSTOMER, transition: TRANSITION_CONFIRM_PAYMENT, }), createTxTransition({ createdAt: new Date(Date.UTC(2017, 10, 9, 8, 12)), by: TX_TRANSITION_ACTOR_PROVIDER, transition: TRANSITION_ACCEPT, }), // this should not be visible in the feed createTxTransition({ createdAt: new Date(Date.UTC(2017, 10, 16, 8, 12)), by: TX_TRANSITION_ACTOR_PROVIDER, transition: TRANSITION_EXPIRE_REVIEW_PERIOD, }), ], }), messages: [], hasOlderMessages: false, onOpenReviewModal: noop, onShowOlderMessages: noop, fetchMessagesInProgress: false, }, group: 'messages', }; export const WithMessagesTransitionsAndReviews = { component: ActivityFeed, props: { currentUser: createCurrentUser('user2'), transaction: createTransaction({ customer: createUser('user1'), provider: createUser('user2'), listing: createListing('Listing'), lastTransition: TRANSITION_REVIEW_2_BY_CUSTOMER, transitions: [ createTxTransition({ createdAt: new Date(Date.UTC(2017, 10, 9, 8, 10)), by: TX_TRANSITION_ACTOR_CUSTOMER, transition: TRANSITION_REQUEST_PAYMENT, }), createTxTransition({ createdAt: new Date(Date.UTC(2017, 10, 9, 8, 10)), by: TX_TRANSITION_ACTOR_CUSTOMER, transition: TRANSITION_CONFIRM_PAYMENT, }), createTxTransition({ createdAt: new Date(Date.UTC(2017, 10, 9, 8, 12)), by: TX_TRANSITION_ACTOR_PROVIDER, transition: TRANSITION_ACCEPT, }), createTxTransition({ createdAt: new Date(Date.UTC(2017, 10, 9, 10, 33)), by: TX_TRANSITION_ACTOR_PROVIDER, transition: TRANSITION_DECLINE, }), createTxTransition({ createdAt: new Date(Date.UTC(2017, 10, 9, 10, 34)), by: TX_TRANSITION_ACTOR_PROVIDER, transition: TRANSITION_COMPLETE, }), createTxTransition({ createdAt: new Date(Date.UTC(2017, 10, 9, 11, 34)), by: TX_TRANSITION_ACTOR_PROVIDER, transition: TRANSITION_REVIEW_1_BY_PROVIDER, }), createTxTransition({ createdAt: new Date(Date.UTC(2017, 10, 9, 12, 34)), by: TX_TRANSITION_ACTOR_CUSTOMER, transition: TRANSITION_REVIEW_2_BY_CUSTOMER, }), ], reviews: [ createReview( 'review1', { createdAt: new Date(Date.UTC(2017, 10, 9, 11, 34)), rating: 3, type: 'ofCustomer' }, { author: createUser('user2'), subject: createUser('user1') } ), createReview( 'review2', { createdAt: new Date(Date.UTC(2017, 10, 9, 12, 34)), rating: 5, type: 'ofProvider' }, { author: createUser('user1'), subject: createUser('user2') } ), ], }), messages: [ createMessage( 'msg1', { createdAt: new Date(Date.UTC(2017, 10, 9, 8, 11)) }, { sender: createUser('user1') } ), createMessage( 'msg2', { createdAt: new Date(Date.UTC(2017, 10, 9, 8, 14)) }, { sender: createUser('user1') } ), createMessage( 'msg3', { createdAt: new Date(Date.UTC(2017, 10, 9, 8, 17)) }, { sender: createUser('user2') } ), createMessage( 'msg4', { createdAt: new Date(Date.UTC(2017, 10, 12, 13, 20)) }, { sender: createUser('user2') } ), ], hasOlderMessages: false, onOpenReviewModal: noop, onShowOlderMessages: noop, fetchMessagesInProgress: false, }, group: 'messages', }; export const WithAReviewFromBothUsers = { component: ActivityFeed, props: { currentUser: createCurrentUser('user1'), transaction: createTransaction({ customer: createUser('user1'), provider: createUser('user2'), listing: createListing('Listing'), reviews: [ createReview( 'review1', { createdAt: new Date(Date.UTC(2017, 10, 9, 8, 10)), rating: 3, type: 'ofProvider' }, { author: createUser('user1'), subject: createUser('user2') } ), createReview( 'review2', { createdAt: new Date(Date.UTC(2017, 10, 10, 8, 10)), rating: 5, type: 'ofCustomer' }, { author: createUser('user2'), subject: createUser('user1') } ), ], lastTransition: TRANSITION_REVIEW_2_BY_PROVIDER, transitions: [ createTxTransition({ createdAt: new Date(Date.UTC(2017, 10, 9, 8, 10)), by: TX_TRANSITION_ACTOR_CUSTOMER, transition: TRANSITION_REVIEW_1_BY_CUSTOMER, }), createTxTransition({ createdAt: new Date(Date.UTC(2017, 10, 10, 8, 10)), by: TX_TRANSITION_ACTOR_PROVIDER, transition: TRANSITION_REVIEW_2_BY_PROVIDER, }), ], }), messages: [], hasOlderMessages: false, onOpenReviewModal: noop, onShowOlderMessages: noop, fetchMessagesInProgress: false, }, group: 'messages', }; class PagedFeed extends Component { constructor(props) { super(props); this.state = { showAllMessages: false }; } render() { const dates = [ new Date(Date.UTC(2017, 10, 20, 12)), new Date(Date.UTC(2017, 10, 21, 12)), new Date(Date.UTC(2017, 10, 22, 12)), new Date(Date.UTC(2017, 10, 23, 12)), new Date(Date.UTC(2017, 10, 24, 12)), new Date(Date.UTC(2017, 10, 25, 12)), new Date(Date.UTC(2017, 10, 26, 12)), ]; const currentUser = createCurrentUser('customer'); const customer = createUser('customer'); const provider = createUser('provider'); const trans1 = createTxTransition({ createdAt: dates[0], by: TX_TRANSITION_ACTOR_CUSTOMER, transition: TRANSITION_REQUEST_PAYMENT, }); const trans2 = createTxTransition({ createdAt: dates[0], by: TX_TRANSITION_ACTOR_CUSTOMER, transition: TRANSITION_CONFIRM_PAYMENT, }); const trans3 = createTxTransition({ createdAt: dates[2], by: TX_TRANSITION_ACTOR_PROVIDER, transition: TRANSITION_ACCEPT, }); // Last transition timestamp is interleaved between the last two // messages. const trans4 = createTxTransition({ createdAt: dates[5], by: TX_TRANSITION_ACTOR_CUSTOMER, transition: TRANSITION_COMPLETE, }); // First message timestamp is interleaved between the first two // transitions. const msg1 = createMessage('msg1', { createdAt: dates[1] }, { sender: customer }); const msg2 = createMessage('msg2', { createdAt: dates[3] }, { sender: provider }); const msg3 = createMessage('msg3', { createdAt: dates[4] }, { sender: customer }); const msg4 = createMessage('msg4', { createdAt: dates[6] }, { sender: customer }); const transaction = createTransaction({ id: 'tx1', lastTransition: TRANSITION_COMPLETE, lastTransitionedAt: dates[5], transitions: [trans1, trans2, trans3, trans4], listing: createListing('listing'), customer, provider, }); const messages = this.state.showAllMessages ? [msg1, msg2, msg3, msg4] : [msg2, msg3, msg4]; const handleShowOlder = () => { console.log('show older messages'); this.setState({ showAllMessages: true }); }; const feedProps = { currentUser, transaction, messages, hasOlderMessages: !this.state.showAllMessages, onOpenReviewModal: noop, onShowOlderMessages: handleShowOlder, fetchMessagesInProgress: false, }; return <ActivityFeed {...feedProps} />; } } export const WithMessagePaging = { component: PagedFeed, props: {}, group: 'messages', };
const axios = require('axios').default const moment = require('moment') module.exports = function (workingDays, apiKey, locale) { this.workingDays = workingDays this.API_KEY = apiKey this.locale = locale this.workingDaysIn = async function (startMoment, endMoment) { var festiveDays = await this.festiveDaysIn(startMoment, endMoment) return toDaysRange(startMoment, endMoment) .filter(day => isWeekDay(day, this.workingDays) && isNotFestive(day, festiveDays)) } this.weekendDaysIn = async function (startMoment, endMoment) { return toDaysRange(startMoment, endMoment) .filter(day => !isWeekDay(day, this.workingDays)) } this.festiveDaysIn = async function (startMoment, endMoment) { return axios.get('https://www.googleapis.com/calendar/v3/calendars/en.' + this.locale + '%23holiday%40group.v.calendar.google.com/events?key=' + this.API_KEY) .then(response => { return response.data.items .reduce(removeDuplicateFestivities, []) .map(toDaysRangeExcludingLast) .flat() .filter(day => day >= startMoment && day <= endMoment) }).catch(_ => { console.log('WARNING: Error while retreiving festive days. They wont be skipped.') return [] }) } function toDaysRangeExcludingLast (it) { const startDay = moment(it.start.date) const endDay = moment(it.end.date).add(-1, 'day') return toDaysRange(startDay, endDay) } function toDaysRange (startMoment, endMoment) { var currentDay = moment(startMoment).startOf('day') const endDay = moment(endMoment).startOf('day') const daysList = [] while (currentDay <= endDay) { daysList.push(moment(currentDay)) currentDay = currentDay.add(1, 'day') } return daysList } function removeDuplicateFestivities (acc, curr) { if (acc.filter(it => it.start.date === curr.start.date).length === 0) { acc.push(curr) } return acc } function isWeekDay (day, workingDays) { return workingDays.some(working => working === day.format('dddd')) } function isNotFestive (day, festiveDays) { return !festiveDays.some(festive => festive.diff(day) === 0) } } Array.prototype.flat = function () { return [].concat(...this) }
const mysql = require('mysql'); const dbConfig = require('../db/db'); var async = require("async"); const pool = mysql.createPool({ host: dbConfig.mysql.host, user: dbConfig.mysql.user, password: dbConfig.mysql.password, database: dbConfig.mysql.database, port: dbConfig.mysql.port, dateStrings: true, //强制日期类型(TIMESTAMP, DATETIME, DATE)以字符串返回,而不是一javascript Date对象返回 multipleStatements: true // 多语句查询 }); function getNowFormatDate() { var date = new Date(); let sep = "-"; var year = date.getFullYear(); //年 var month = date.getMonth()+1; //月 var strDate = date.getDate(); //日 if (month >= 1 && month <= 9) { month = "0" + month; } if (strDate >= 0 && strDate <= 9) { strDate = "0" + strDate; } var currentdate = year + sep + month + sep + strDate; return currentdate; } function _getNewSqlParamEntity(sql, params, callback) { if (callback) { return callback(null, { sql: sql, params: params }); } return { sql: sql, params: params }; }; function execTrans(sqlparamsEntities, callback) { pool.getConnection(function (err, connection) { if (err) { return callback(err, null); } connection.beginTransaction(function (err) { if (err) { return callback(err, null); } console.log("开始执行transaction,共执行" + sqlparamsEntities.length + "条数据"); var funcAry = []; sqlparamsEntities.forEach(function (sql_param) { var temp = function (cb) { var sql = sql_param.sql; var param = sql_param.params; connection.query(sql, param, function (tErr, rows, fields) { if (tErr) { connection.rollback(function () { console.log("事务失败," + sql_param + ",ERROR:" + tErr); throw tErr; }); } else { return cb(null, 'ok'); } }) }; funcAry.push(temp); }); async.series(funcAry, function (err, result) { console.log("transaction error: " + err); if (err) { connection.rollback(function (err) { console.log("transaction error: " + err); connection.release(); return callback(err, null); }); } else { connection.commit(function (err, info) { console.log("transaction info: " + JSON.stringify(info)); if (err) { console.log("执行事务失败," + err); connection.rollback(function (err) { console.log("transaction error: " + err); connection.release(); return callback(err, null); }); } else { connection.release(); return callback(null, info); } }) } }) }); }); }; module.exports = { processUserMonthlyFee(){ pool.getConnection((err, connection) => { if(err) console.log(err); var sql = "SELECT storage_number FROM littleAnt_user WHERE role = 'premium'"; var updateUserBalance = 'UPDATE littleAnt_user SET balance = balance + ? WHERE storage_number = ?'; var insertUserInvoice = 'INSERT INTO littleAnt_user_invoice(invoice_type,total,user_sotrageNm,tracking_number,memo,created_at) VALUES(?,?,?,?,?,?)'; connection.query(sql, [], (err, result) => { if(err) console.log(err); var dataString = JSON.stringify(result); var data = JSON.parse(dataString); //console.log(data); //声明要用到的变量 var total = -8; var invoice_type = '自动续费', tracking_nm = ''; var memo = '每个月第一天', created_at = getNowFormatDate(); for(let eachUser of data){ //console.log(eachUser.storage_number); var sqlParamsEntity = []; console.log('process user storage number ' + eachUser.storage_number); console.log('charge monthly fee $8 and generate invoice'); sqlParamsEntity.push(_getNewSqlParamEntity(updateUserBalance, [total,eachUser.storage_number])); sqlParamsEntity.push(_getNewSqlParamEntity(insertUserInvoice, [invoice_type,total,eachUser.storage_number,tracking_nm,memo,created_at])); execTrans(sqlParamsEntity, function(err, info){ if(err){ console.error("事务执行失败"); }else{ console.log("done."); } }) } connection.release(); }) }) } }
module.exports = (ctx) => { const { storage } = ctx; /* eslint-disable prefer-arrow-callback */ ctx.body = { list: storage.getFileList().map((item) => { return { name: item.name, value: item.data }; }), }; };
import React from 'react' import { useStaticQuery, graphql } from 'gatsby'; import { documentToReactComponents } from "@contentful/rich-text-react-renderer"; import Nav from '../components/nav/nav'; import Footer from '../components/footer'; import Section from '../components/section'; import SEO from '../components/seo'; import '../style/normalize.scss'; import '../style/style.scss'; const PrivacyPolicy = () => { const data = useStaticQuery(graphql` query { allContentfulPrivacyPolicy { edges { node { body { json } } } } } `) const body = data.allContentfulPrivacyPolicy.edges[0].node.body.json; return ( <main className="privacypolicy"> <SEO /> <Nav /> <header> <h1>Privacy Policy</h1> </header> <Section className="privacypolicy__content"> {documentToReactComponents(body)} </Section> <Footer /> </main> ) } export default PrivacyPolicy
project_id = $('.project_id').attr('data-project-id'); formURL = apiUrl+"campaigns/"+project_id+"/weeklyphasing" var colors = masterColors; var fontOptions = styleOptions.phasing.fontSchema.smaller; var chartWidth = 660; var chartHeight = 440; var spacingRight = 44; var legendLineSpacing = 7; var highchartsOptions = { chart: { alignTicks: false, spacingRight: spacingRight, backgroundColor: 'rgba(255,255,255,0)' }, title: { text: null }, colors: [colors.color2, colors.color4, colors.color6, colors.color1, colors.color3, colors.color5, colors.color7, colors.color8, colors.color9, colors.color10, colors.color11, colors.color12], xAxis: { lineWidth: 0, gridLineWidth: 1, tickWidth: 1, startOnTick: true, tickInterval: 5, labels: { align: fontOptions.xAxisLabels.align, style: { fontFamily: fontOptions.xAxisLabels.fontFamily, fontSize: fontOptions.xAxisLabels.fontSize, color: fontOptions.xAxisLabels.color }, x: fontOptions.xAxisLabels.x }, showLastLabel: true }, yAxis: [ { // Pressure (Equivalent GRP); axis[0] title: { text: fontOptions.yAxisLabels1.titleText }, gridLineWidth: 0, reversedStacks: false, labels: { style: { fontFamily: fontOptions.yAxisLabels1.fontFamily, fontSize: fontOptions.yAxisLabels1.fontSize, color: fontOptions.yAxisLabels1.color } }, }, { // Reach 1+; axis[1] title: { text: fontOptions.yAxisLabels2.titleText }, min: 0, maxTickInterval: 5, opposite: true, gridLineWidth: 0, labels: { style: { fontFamily: fontOptions.yAxisLabels2.fontFamily, fontSize: fontOptions.yAxisLabels2.fontSize, color: fontOptions.yAxisLabels2.color } }, }], plotOptions: { column: { stacking: 'normal' }, line: { marker: { enabled: false }, dashStyle: 'ShortDot' }, series: { borderWidth: 1 } }, legend: { reversed: false, itemDistance: fontOptions.legend.itemHorizontalDistance, itemMarginBottom: fontOptions.legend.itemMarginBottom, symbolWidth: fontOptions.legend.symbolPixels, symbolHeight: fontOptions.legend.symbolPixels, itemStyle: { color: fontOptions.legend.color, fontFamily: fontOptions.legend.fontFamily, fontSize: fontOptions.legend.fontSize, fontWeight: fontOptions.legend.fontWeight }, }, // tooltip: 'shared' }; function renderChart(data, appendTarget ){ // FAKING THE START DATE data.startDate = new Date(2015, 0, 5).getTime(); // var parsedSeriesData = buildSeriesDataFromJSON(data); highchartsOptions.series = parsedSeriesData; highchartsOptions.xAxis.categories = buildXAxisDates(data.startDate, data.WeeklyPhasing.Total.AllocationByPeriod.length); $(appendTarget).highcharts( highchartsOptions, function(chart){ addLegendSeparatorLine(chart); }); } function buildXAxisDates(startDateTimestamp, numCategories) { var xAxisSeries = []; var oneWeek = 1000 * 60 * 60 * 24 * 7; for (var i = 0; i < numCategories; i++) { var timestamp = startDateTimestamp + (oneWeek * i); var calculatedDate = new Date(timestamp); var formattedDateStrings = calculatedDate.toLocaleString('en-US', {month: '2-digit', day: '2-digit', year: '2-digit'}).split('/'); xAxisSeries.push( [ formattedDateStrings[1], formattedDateStrings[0], formattedDateStrings[2] ].join('/') ); } return xAxisSeries // return addDummyColumns(xAxisSeries, 'padding'); } function addDummyColumns(array, dummyDataValue) { var arrayCopy = array; var totalLength = array.length; var columnsToAdd = Math.floor(array.length / 4); for (var i = columnsToAdd; i > 0; i--){ var targetIndex = (i * 4); arrayCopy.splice(targetIndex, 0, dummyDataValue); } return arrayCopy; } function addDummyReachColumns(array) { var arrayCopy = addDummyColumns(array, 'dummy'); for (var i = 0; i < arrayCopy.length; i++) { var currentValue = arrayCopy[i]; if (currentValue === 'dummy') { arrayCopy[i] = ( (arrayCopy[i - 1] + arrayCopy[i + 1]) / 2 ); } } return arrayCopy; } function buildSeriesDataFromJSON(data) { var returnData = []; // Handle 'Pressure (Equivalent GRP)' column data var allocatedTouchpoints = data.WeeklyPhasing.AllocatedTouchpoints; for (var i = 0; i < allocatedTouchpoints.length; i++) { var dataArray = parseAllocationPeriods(allocatedTouchpoints[i].AllocationByPeriod); returnData.push({ name: allocatedTouchpoints[i].TouchpointName, // data: addDummyColumns(dataArray, 0), data: dataArray, type: 'column' }); } // Handle "Reach 1+" line data var totalAllocationByPeriodArray = data.WeeklyPhasing.Total.AllocationByPeriod; var reachDataPoints = []; for (var i = 0; i < totalAllocationByPeriodArray.length; i++) { reachDataPoints.push( totalAllocationByPeriodArray[i].Result.Reach * 100 ); } // data: addDummyReachColumns(reachDataPoints), returnData.push({ name: 'Reach 1+', data: reachDataPoints, type: 'line', color: colors.gray1, yAxis: 1 }) return returnData; } function parseAllocationPeriods(allocationByPeriodArray) { var returnArray = []; for (var i = 0; i < allocationByPeriodArray.length; i++) { returnArray.push(allocationByPeriodArray[i].GRP) } return returnArray; } function addLegendSeparatorLine(chart){ var series = $('.highcharts-series')[0]; var seriesX = getElementCoordinates(series)[0]; var legend = $('.highcharts-legend')[0]; var legendY = getElementCoordinates(legend)[1]; var pathData = ['M', seriesX, (legendY - legendLineSpacing), 'L', (chartWidth - spacingRight), (legendY - legendLineSpacing)] chart.renderer.path( pathData ) .attr({ strokeWidth: fontOptions.legendSeparatorLine.strokeWidth, stroke: fontOptions.legendSeparatorLine.stroke }).add(); } function getElementCoordinates(element){ var transformText = element.attributes.transform.value; var regex = /translate(\(.+\))/; var matchData = transformText.match(regex)[1].replace('(', '').replace(')', '').split(','); var xCoordinates = parseInt(matchData[0]); var yCoordinates = parseInt(matchData[1]); return [xCoordinates, yCoordinates]; } $(function(){ api = getCookie("api"); $.ajax({ dataType: "json", url : formURL, type: "GET", headers: { 'x-wsse': 'ApiKey="'+api+'"' }, success:function(data, textStatus, jqXHR) { console.dir(data); renderChart(data, '#chart-container'); }, error: function(jqXHR, textStatus, errorThrown) { console.log(jqXHR); console.log(textStatus); console.log(errorThrown); } }); });
/* * Copyright 2013 Samsung Information Systems America, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Author: Koushik Sen var aux = require('./array_length_aux'); var a = aux.foo(); var i; for (i=0; i < a.length; i++) { console.log(a[i]); }
/* Autogenerated with Kurento Idl */ /* * (C) Copyright 2013-2015 Kurento (http://kurento.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ var inherits = require('inherits'); var kurentoClient = require('kurento-client'); var disguise = kurentoClient.disguise; var checkType = kurentoClient.checkType; var ChecktypeError = checkType.ChecktypeError; var Transaction = kurentoClient.TransactionsManager.Transaction; var MediaObjectCreator = kurentoClient.MediaObjectCreator; var TransactionsManager = kurentoClient.TransactionsManager; var transactionOperation = TransactionsManager.transactionOperation; var MediaObject = require('./abstracts/MediaObject'); function noop(error, result) { if (error) console.trace(error); return result }; /** * Create a {@link module:core.MediaPipeline MediaPipeline} * * @classdesc * A pipeline is a container for a collection of {@link * module:core/abstracts.MediaElement MediaElements} and * :rom:cls:`MediaMixers<MediaMixer>`. It offers the methods needed to control * the creation and connection of elements inside a certain pipeline. * * @extends module:core/abstracts.MediaObject * * @constructor module:core.MediaPipeline */ function MediaPipeline(strict){ MediaPipeline.super_.call(this); var self = this; // Transactional API var transactionsManager = new TransactionsManager(this, encodeTransaction); this.beginTransaction = transactionsManager.beginTransaction.bind(transactionsManager); this.endTransaction = transactionsManager.endTransaction.bind(transactionsManager); this.transaction = transactionsManager.transaction.bind(transactionsManager); // Encode commands function encodeCreate(transaction, params, callback) { if(transaction) return transactionOperation.call(transaction, 'create', params, callback); if(transactionsManager.length) return transactionOperation.call(transactionsManager, 'create', params, callback); self.emit('_create', undefined, params, callback) } function encodeRpc(transaction, method, params, callback) { if(transaction) return transactionOperation.call(transaction, method, params, callback); if(transactionsManager.length) return transactionOperation.call(transactionsManager, method, params, callback); self.emit('_rpc', undefined, method, params, callback) } function encodeTransaction(operations, callback) { var params = { // object: self, operations: operations }; if(transactionsManager.length) return transactionOperation.call(transactionsManager, 'transaction', params, callback); self.emit('_transaction', params, callback); } var describe = this.emit.bind(this, '_describe'); // Creation of objects var mediaObjectCreator = new MediaObjectCreator(this, encodeCreate, encodeRpc, encodeTransaction, describe, strict); /** * Create a new instance of a {module:core/abstract.MediaObject} attached to * this {module:core.MediaPipeline} * * @param {external:String} type - Type of the * {module:core/abstract.MediaObject} * @param {external:String[]} [params] * @param {module:core.MediaPipeline~createCallback} callback * * @return {external:Promise} */ this.create = mediaObjectCreator.create.bind(mediaObjectCreator); /** * @callback core.MediaPipeline~createCallback * @param {external:Error} error * @param {module:core/abstract~MediaElement} result * The created MediaElement */ }; inherits(MediaPipeline, MediaObject); // // Public properties // /** * If statistics about pipeline latency are enabled for all mediaElements * * @alias module:core.MediaPipeline#getLatencyStats * * @param {module:core.MediaPipeline~getLatencyStatsCallback} [callback] * * @return {external:Promise} */ MediaPipeline.prototype.getLatencyStats = function(callback){ var transaction = (arguments[0] instanceof Transaction) ? Array.prototype.shift.apply(arguments) : undefined; var usePromise = false; if (callback == undefined) { usePromise = true; } if(!arguments.length) callback = undefined; callback = (callback || noop).bind(this) return disguise(this._invoke(transaction, 'getLatencyStats', callback), this) }; /** * @callback module:core.MediaPipeline~getLatencyStatsCallback * @param {external:Error} error * @param {external:Boolean} result */ /** * If statistics about pipeline latency are enabled for all mediaElements * * @alias module:core.MediaPipeline#setLatencyStats * * @param {external:Boolean} latencyStats * @param {module:core.MediaPipeline~setLatencyStatsCallback} [callback] * * @return {external:Promise} */ MediaPipeline.prototype.setLatencyStats = function(latencyStats, callback){ var transaction = (arguments[0] instanceof Transaction) ? Array.prototype.shift.apply(arguments) : undefined; checkType('boolean', 'latencyStats', latencyStats, {required: true}); var params = { latencyStats: latencyStats }; callback = (callback || noop).bind(this) return disguise(this._invoke(transaction, 'setLatencyStats', params, callback), this) }; /** * @callback module:core.MediaPipeline~setLatencyStatsCallback * @param {external:Error} error */ // // Public methods // /** * Returns a string in dot (graphviz) format that represents the gstreamer * elements inside the pipeline * * @alias module:core.MediaPipeline.getGstreamerDot * * @param {module:core/complexTypes.GstreamerDotDetails} [details] * Details of graph * * @param {module:core.MediaPipeline~getGstreamerDotCallback} [callback] * * @return {external:Promise} */ MediaPipeline.prototype.getGstreamerDot = function(details, callback){ var transaction = (arguments[0] instanceof Transaction) ? Array.prototype.shift.apply(arguments) : undefined; callback = arguments[arguments.length-1] instanceof Function ? Array.prototype.pop.call(arguments) : undefined; switch(arguments.length){ case 0: details = undefined; break; case 1: break; default: var error = new RangeError('Number of params ('+arguments.length+') not in range [0-1]'); error.length = arguments.length; error.min = 0; error.max = 1; throw error; } checkType('GstreamerDotDetails', 'details', details); var params = { details: details }; callback = (callback || noop).bind(this) return disguise(this._invoke(transaction, 'getGstreamerDot', params, callback), this) }; /** * @callback module:core.MediaPipeline~getGstreamerDotCallback * @param {external:Error} error * @param {external:String} result * The dot graph */ /** * Connect the source of a media to the sink of the next one * * @param {...module:core/abstract~MediaObject} media - A media to be connected * @callback {module:MediaPipeline~connectCallback} [callback] * * @return {external:Promise} * * @throws {SyntaxError} */ MediaPipeline.prototype.connect = function(media, callback){ // Fix lenght-variable arguments if(!(media instanceof Array)) { media = Array.prototype.slice.call(arguments, 0); callback = (typeof media[media.length - 1] === 'function') ? media.pop() : undefined; } callback = (callback || noop).bind(this) // Check if we have enought media components if(media.length < 2) throw new SyntaxError('Need at least two media elements to connect'); return media[0].connect(media.slice(1), callback) }; /** * @callback MediaPipeline~connectCallback * @param {external:Error} error */ /** * @alias module:core.MediaPipeline.constructorParams */ MediaPipeline.constructorParams = { }; /** * @alias module:core.MediaPipeline.events * * @extends module:core/abstracts.MediaObject.events */ MediaPipeline.events = MediaObject.events; /** * Checker for {@link module:core.MediaPipeline} * * @memberof module:core * * @param {external:String} key * @param {module:core.MediaPipeline} value */ function checkMediaPipeline(key, value) { if(!(value instanceof MediaPipeline)) throw ChecktypeError(key, MediaPipeline, value); }; module.exports = MediaPipeline; MediaPipeline.check = checkMediaPipeline;
const MongoClient = require('mongodb').MongoClient module.exports = async ({ database = '', connectionString = '', collection = '', filter = null, update = null, upsert = false }) => { if (!database) return { err: new Error('Missing `database` parameter.') } if (!connectionString) { return { err: new Error('Missing `connectionString` parameter.') } } if (!collection) return { err: new Error('Missing `collection` parameter.') } if (!filter) return { err: new Error('Missing `filter` parameter.') } if (!update) return { err: new Error('Missing `update` parameter.') } let client = null try { const MC = new MongoClient(connectionString, { useUnifiedTopology: true }) client = await MC.connect() const db = client.db(database) const { databaseName } = db if (!databaseName) { const msg = [ 'No database name was returned from MongDB when', 'attempting to update a document.' ].join(' ') return { err: new Error(msg) } } const data = await db.collection(collection).updateOne( filter, update, { upsert } ) if (client) { client.close() } return { data } } catch (err) { return { err } } }
angular.module("addressBookApp") .directive("contactTile", function() { 'use strict'; return { restrict: "E", replace: true, templateUrl: "templates/directives/contactTile.html", scope: { contact: "=" } }; });
TEST('MIXIN', (check) => { let Movable = CLASS({ init : (inner, self, name) => { //REQUIRED: name let move = self.move = (meters) => { console.log(name + ' moved ' + meters + 'm.'); }; } }); let Talkable = CLASS({ init : (inner, self, name) => { //REQUIRED: name let talk = self.talk = (meters) => { console.log(name + ': Hi!'); }; } }); let Human = CLASS({ init : (inner, self, name) => { //REQUIRED: name Movable.innerInit(inner, self, name); Talkable.innerInit(inner, self, name); } }); let jake = Human('Jake'); jake.move(3); jake.talk(); });
/** * Definition for a binary tree node. * function TreeNode(val, left, right) { * this.val = (val===undefined ? 0 : val) * this.left = (left===undefined ? null : left) * this.right = (right===undefined ? null : right) * } */ /** * @description https://leetcode.com/problems/insert-into-a-binary-search-tree/ * @type self * @param {TreeNode} root * @param {number} val * @return {TreeNode} */ var insertIntoBST = function(root, val) { var nodeToInsert = new TreeNode(val); if (!root) { return nodeToInsert; } var node = new TreeNode(root.val);; if (val < node.val) { node.right = root.right; node.left = insertIntoBST(root.left, val); } else { node.left = root.left; node.right = insertIntoBST(root.right, val); } return node; };
import React from 'react' export default function Footer() { return ( <footer className="footer py-3"> <div className="container"> <div className="row"> <div className="col-10 mx-auto col-md-6 text-yellow text-center text-capitalize"> <h3>all rights reserved &copy;{new Date().getFullYear().toString()}</h3> </div> </div> </div> </footer> ) }
const path = require('path'); const routes = (handler) => [ { method: 'POST', path: '/upload/pictures', handler: handler.postUploadImageHandler, options: { payload: { allow: 'multipart/form-data', multipart: true, output: 'stream', maxBytes: 500000, // 500KB, defaultnya 1048576 Bytes atau 1MB dari Hapi }, }, }, { method: 'GET', path: '/upload/{param*}', handler: { directory: { path: path.resolve(__dirname, 'file'), }, }, }, ]; module.exports = routes;
webpackHotUpdate(0,{ /***/ 252: /***/ function(module, exports, __webpack_require__) { eval("/* WEBPACK VAR INJECTION */(function(module) {/* REACT HOT LOADER */ if (true) { (function () { var ReactHotAPI = __webpack_require__(78), RootInstanceProvider = __webpack_require__(86), ReactMount = __webpack_require__(88), React = __webpack_require__(140); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } try { (function () {\n\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(140);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar App = function (_Component) {\n _inherits(App, _Component);\n\n function App() {\n _classCallCheck(this, App);\n\n return _possibleConstructorReturn(this, (App.__proto__ || Object.getPrototypeOf(App)).apply(this, arguments));\n }\n\n _createClass(App, [{\n key: 'render',\n value: function render() {\n var style = {\n textAlign: 'center',\n fontSize: 26,\n margin: 10\n };\n return _react2.default.createElement(\n 'div',\n { className: 'comment-block' },\n _react2.default.createElement('div', { className: 'comment-block__title' })\n );\n }\n }]);\n\n return App;\n}(_react.Component);\n\nexports.default = App;\n\n/* REACT HOT LOADER */ }).call(this); } finally { if (true) { (function () { var foundReactClasses = module.hot.data && module.hot.data.foundReactClasses || false; if (module.exports && module.makeHot) { var makeExportsHot = __webpack_require__(248); if (makeExportsHot(module, __webpack_require__(140))) { foundReactClasses = true; } var shouldAcceptModule = true && foundReactClasses; if (shouldAcceptModule) { module.hot.accept(function (err) { if (err) { console.error(\"Cannot not apply hot update to \" + \"Comment.js\" + \": \" + err.message); } }); } } module.hot.dispose(function (data) { data.makeHot = module.makeHot; data.foundReactClasses = foundReactClasses; }); })(); } }\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)(module)))\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/Comment.js\n ** module id = 252\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/Comment.js?"); /***/ } })
// Problem 1: // Put the start of your program in a main function. // Ask the user to enter a number from 1 through 4. // Print the corresponding Month that matches each number. // (Hint: 1 is January). // let month_number = prompt("Enter month number 1 - 4"); // switch (month_number) // { // case "1": // alert("Jan"); // break; // case "2": // alert("Feb"); // break; // case "3": // alert("Mar"); // break; // case "4": // alert("Apl"); // break; // default: // alert("No Match!"); // } // Problem 2: // Put the start of your program in a main function. // Ask the user to enter a day of the week. // Print the corresponding Spanish word. //If they do not input a day of the week say //"That is not a day of the week in English." // lunes. Monday. // martes. Tuesday. // miércoles. Wednesday. // jueves. Thursday. // viernes. Friday. // sábado. Saturday. // domingo. Sunday. // let day_of_week = prompt("Enter a Day of the Week"); // while (day_of_week !== "x") // { // switch (day_of_week) // { // case "monday": // alert("lunes"); // break; // case "tuesday": // alert("martes"); // break; // case "wednesday": // alert("miercoles"); // break; // case "thursday": // alert("jueves"); // break; // case "friday": // alert("viernes"); // break; // case "saturday": // alert("sabado"); // break; // case "sunday": // alert("domingo"); // break; // default: // alert("That is not a day of the week"); // } // } // Challenge: // write a class called Person with a first name and last name properties // prompt the user over and over to select 1) add person 2) print persons // and 3) Exits program (use switch case. Alert to invalid entry. class Person { constructor(fname, lname) { this.fname = fname; this.lname = lname; } } let userInput = prompt("Press 1 to add person. Press 2 to print person Press 3 to quit"); let persons = []; function addPerson(){ let fname = prompt("Enter first name:"); let lname = prompt("Enter last name"); let newPerson = new Person(fname,lname); } while (user_input !== 3) { console.log("Enter an option below:\n" + "1. Add Person\n"+ "2. Print Persons\n"+ "3. Ouit program\n"+ "Pick an option from menu:"); userInput = prompt("Pick an option from menu"); switch (userInput) { case"3": console.log("Goodbye!"); break; } }
import { insert, id } from "../methods/dom.js" export class button { constructor(title, id) { this.title = title; this.id = id; this.btnid = id + "-btn" } static add(title, $id) { let $new = new button(title, $id); insert($new.element, id("btn-container")); id($new.btnid).addEventListener("click", () => { /* var container = document.getElementById($new.id); if(container.style.display === "none"){ container.style.display = "inline-block"; } else { container.style.display = "none"; } */ var container = document.getElementById($new.id); var els = document.getElementsByClassName("group-category"); Array.prototype.forEach.call(els, function(el) { if(el.id===$new.id){ el.classList.toggle("hidden"); }else{ el.classList.add("hidden"); } }); }); } get element() { return ` <button class="button-release" id="${this.btnid}">${this.title}</button> `; } }
import React from "react"; import { storiesOf } from "@storybook/react"; import { action } from "@storybook/addon-actions"; import { boolean, number } from "@storybook/addon-knobs/react"; import { withInfo } from "@storybook/addon-info"; import TextLink from "@hig/text-link"; import { Notifications } from "hig-react"; import { Notification } from "../index"; import sampleNotifications from "./notificationFixtures"; import NotificationsFlyoutInteraction from "./NotificationsFlyoutInteraction"; import infoOptions from "./infoOptions"; function featuredNotification() { return ( <Notification id={2} onDismiss={action("Featured Notification Dismissed")}> <div> <p> <b>New enhancements to subscription management lorum ipsom gas</b> </p> <p> Lorum reduce seats on your subscriptions and upcoming payments in your account </p> <p> <TextLink>Primary link</TextLink> {" or "} <TextLink>Secondary link</TextLink> </p> </div> </Notification> ); } storiesOf("Notifications|Flyout", module) .add( "V1", withInfo({ ...infoOptions, inline: false })(() => ( <div style={{ fontFamily: "ArtifaktElement" }}> {/* @TODO: Remove wrapper when Notifications is ported */} <Notifications title="Notifications" onClick={action("Notifications on click")} onClickOutside={action("Notifications onClickOutside")} onScroll={action("Notifications onScroll")} unreadCount={number("Unread count", 3)} featuredNotification={featuredNotification()} loading={boolean("Loading Indicator", false)} open > {sampleNotifications.map(notification => ( <Notification unread={notification.unread} key={notification.id} onLinkClick={action("Notification Link Clicked")} id={notification.id} title={notification.title} type={notification.type} timestamp={notification.timestamp} > {notification.children} </Notification> ))} </Notifications> </div> )) ) .add( "interactive V1", withInfo(infoOptions)(() => ( <div style={{ fontFamily: "ArtifaktElement" }}> {/* @TODO: Remove wrapper when Notifications is ported */} <NotificationsFlyoutInteraction /> </div> )) );
var express = require('express'); var router = express.Router(); var address_controller = require('../controllers/address') router.get('/listall', address_controller.listall) router.post('/listByUser', address_controller.listByUser) router.post('/addAddress', address_controller.addAddress) router.delete('/deleteOne', address_controller.deleteOne) module.exports = router
// fading in portfolio section on scroll $(document).ready(function(){ var $fadein = $(".fadein"); $fadein.waypoint(function(direction){ if (direction == 'down'){ $fadein.addClass('fadein-waypoint'); } else { $fadein.removeClass('fadein-waypoint'); } }, {offset: '50%'}); }); // jumping skill icons $(document).ready(function(){ var $move = $(".movement"); $move.waypoint(function(direction){ if (direction == 'down'){ $move.addClass('movement-waypoint'); } else { $move.removeClass('movement-waypoint'); } }, {offset: '60%'}); }); //sliding in the tech skills diagram $(document).ready(function(){ var $slideInLeft = $(".slidein-left"); $slideInLeft.waypoint(function(direction){ if (direction == 'down'){ $slideInLeft.addClass('diagram-animate-left'); } else { $slideInLeft.removeClass('diagram-animate-left'); } }, {offset: '50%'}); // sliding in the languages diagram var $slideInRight = $(".slidein-right"); $slideInRight.waypoint(function(direction){ if (direction == 'down'){ $slideInRight.addClass('diagram-animate-right'); } else { $slideInRight.removeClass('diagram-animate-right'); } }, {offset: '50%'}); });
import React from 'react'; import TextInputCSSModules from 'rrc/TextInputCSSModules'; /** Required TextBox with error */ export default class ExampleError extends React.Component { render() { return ( <TextInputCSSModules htmlId="example-optional" label="First Name" name="firstname" onChange={() => {}} required error="First name is required." /> ) } }
import ViewerLayout from './ViewerLayout'; /* - Define layout for the viewer in mode configuration. - Pass in the viewport types that can populate the viewer. - Init layout based on the displaySets and the objects. */ export default function ({ servicesManager, extensionManager, commandsManager, hotkeysManager }) { function ViewerLayoutWithServices(props) { return ViewerLayout({ servicesManager, extensionManager, commandsManager, hotkeysManager, ...props, }); } return [ // Layout Template Definition // TODO: this is weird naming { name: 'viewerLayout', id: 'viewerLayout', component: ViewerLayoutWithServices, }, ]; }
/** * Hero component */ import React from "react" import PropTypes from "prop-types" import Image from "../components/image" import { css } from '@emotion/core'; import { colors, weights, pxToRem, mediaQueries, visuallyHidden, btn, rgba } from '../styles'; function PortPiece({ projectName, projectBlurb, projectUrl, projectImg, projectImgAlt }) { return ( <section css={css` margin-top: ${pxToRem(30)}; padding-top: ${pxToRem(40)}; border-top: solid ${pxToRem(2)} ${rgba(colors.gray, 25)}; ${mediaQueries.md} { display: flex; justify-content: space-between; margin-top: ${pxToRem(60)}; padding-top: ${pxToRem(60)}; &:nth-of-type(even) { flex-direction: row-reverse; } } `} > <div css={css` margin-bottom: ${pxToRem(30)}; ${mediaQueries.md} { width: 50%; margin-bottom: 0; } `} > <Image fileName={projectImg} altText={projectImgAlt} /> </div> <div css={css` ${mediaQueries.md} { width: 45%; } `} > <h3 css={css` margin-bottom: ${pxToRem(10)}; font-size: ${pxToRem(20)}; text-transform: uppercase; font-weight: ${weights.bold}; letter-spacing: ${pxToRem(0.6)}; color: ${colors.white}; ${mediaQueries.md} { font-size: ${pxToRem(24)}; letter-spacing: ${pxToRem(1)}; } `} > {projectName} </h3> {projectBlurb} <a href={projectUrl} css={btn} target="_blank" rel="noreferrer">Check it out<span css={visuallyHidden}> ({projectName})</span></a> </div> </section> ) } PortPiece.propTypes = { projectName: PropTypes.string.isRequired, projectBlurb: PropTypes.node.isRequired, projectUrl: PropTypes.string.isRequired, projectImg: PropTypes.string.isRequired, projectImgAlt: PropTypes.string.isRequired, } export default PortPiece;
export const SERVER_URL = "https://shscse545group3.herokuapp.com";
import Vue from 'vue' import Router from 'vue-router' Vue.use(Router) /* Layout */ import Layout from '@/layout' /* Router Modules */ import componentsRouter from './modules/components' import chartsRouter from './modules/charts' import tableRouter from './modules/table' import nestedRouter from './modules/nested' /** * Note: sub-menu only appear when route children.length >= 1 * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html * * hidden: true if set true, item will not show in the sidebar(default is false) * alwaysShow: true if set true, will always show the root menu * if not set alwaysShow, when item has more than one children route, * it will becomes nested mode, otherwise not show the root menu * redirect: noRedirect if set noRedirect will no redirect in the breadcrumb * name:'router-name' the name is used by <keep-alive> (must set!!!) * meta : { roles: ['admin','editor'] control the page roles (you can set multiple roles) title: 'title' the name show in sidebar and breadcrumb (recommend set) icon: 'svg-name'/'el-icon-x' the icon show in the sidebar noCache: true if set true, the page will no be cached(default is false) affix: true if set true, the tag will affix in the tags-view breadcrumb: false if set false, the item will hidden in breadcrumb(default is true) activeMenu: '/example/list' if set path, the sidebar will highlight the path you set } */ /** * constantRoutes * a base page that does not have permission requirements * all roles can be accessed */ export const constantRoutes = [ { path: '/redirect', component: Layout, hidden: true, children: [ { path: '/redirect/:path(.*)', component: () => import('@/views/redirect/index') } ] }, { path: '/login', component: () => import('@/views/login/index'), hidden: true }, { path: '/auth-redirect', component: () => import('@/views/login/auth-redirect'), hidden: true }, { path: '/404', component: () => import('@/views/error-page/404'), hidden: true }, { path: '/401', component: () => import('@/views/error-page/401'), hidden: true }, { path: '/', component: Layout, redirect: '/dashboard', children: [ { path: 'dashboard', component: () => import('@/views/dashboard/index'), name: 'Dashboard', meta: { title: '概览', icon: 'dashboard', affix: true } } ] }, // { // path: '/guide', // component: Layout, // redirect: '/guide/index', // children: [ // { // path: 'index', // component: () => import('@/views/guide/index'), // name: 'Guide', // meta: { title: 'Guide', icon: 'guide', noCache: true } // } // ] // }, { path: '/profile', component: Layout, redirect: '/profile/index', hidden: true, children: [ { path: 'index', component: () => import('@/views/profile/index'), name: 'Profile', meta: { title: 'Profile', icon: 'user', noCache: true } } ] } ] /** * asyncRoutes * the routes that need to be dynamically loaded based on user roles */ export const asyncRoutes = [ { path: '/permission', component: Layout, redirect: '/permission/page', alwaysShow: true, // will always show the root menu name: 'Permission', meta: { title: 'Permission', icon: 'lock', roles: ['admin', 'editor'] // you can set roles in root nav }, }, // { // path: '/permission', // component: Layout, // redirect: '/permission/page', // alwaysShow: true, // will always show the root menu // name: 'Permission', // meta: { // title: 'Permission', // icon: 'lock', // roles: ['admin', 'editor'] // you can set roles in root nav // }, // children: [ // { // path: 'page', // component: () => import('@/views/permission/page'), // name: 'PagePermission', // meta: { // title: 'Page Permission', // roles: ['admin'] // or you can only set roles in sub nav // } // }, // { // path: 'directive', // component: () => import('@/views/permission/directive'), // name: 'DirectivePermission', // meta: { // title: 'Directive Permission' // // if do not set roles, means: this page does not require permission // } // }, // { // path: 'role', // component: () => import('@/views/permission/role'), // name: 'RolePermission', // meta: { // title: 'Role Permission', // roles: ['admin'] // } // } // ] // }, // { // path: '/icon', // component: Layout, // children: [ // { // path: 'index', // component: () => import('@/views/icons/index'), // name: 'Icons', // meta: { title: 'Icons', icon: 'icon', noCache: true } // } // ] // }, // /** when your routing map is too long, you can split it into small modules **/ // componentsRouter, // chartsRouter, // nestedRouter, // tableRouter, // { // path: '/example', // component: Layout, // redirect: '/example/list', // name: 'Example', // meta: { // title: 'Example', // icon: 'el-icon-s-help' // }, // children: [ // { // path: 'create', // component: () => import('@/views/example/create'), // name: 'CreateArticle', // meta: { title: 'Create Article', icon: 'edit' } // }, // { // path: 'edit/:id(\\d+)', // component: () => import('@/views/example/edit'), // name: 'EditArticle', // meta: { title: 'Edit Article', noCache: true, activeMenu: '/example/list' }, // hidden: true // }, // { // path: 'list', // component: () => import('@/views/example/list'), // name: 'ArticleList', // meta: { title: 'Article List', icon: 'list' } // } // ] // }, // { // path: '/tab', // component: Layout, // children: [ // { // path: 'index', // component: () => import('@/views/tab/index'), // name: 'Tab', // meta: { title: 'Tab', icon: 'tab' } // } // ] // }, // { // path: '/error', // component: Layout, // redirect: 'noRedirect', // name: 'ErrorPages', // meta: { // title: 'Error Pages', // icon: '404' // }, // children: [ // { // path: '401', // component: () => import('@/views/error-page/401'), // name: 'Page401', // meta: { title: '401', noCache: true } // }, // { // path: '404', // component: () => import('@/views/error-page/404'), // name: 'Page404', // meta: { title: '404', noCache: true } // } // ] // }, // { // path: '/error-log', // component: Layout, // children: [ // { // path: 'log', // component: () => import('@/views/error-log/index'), // name: 'ErrorLog', // meta: { title: 'Error Log', icon: 'bug' } // } // ] // }, // { // path: '/excel', // component: Layout, // redirect: '/excel/export-excel', // name: 'Excel', // meta: { // title: 'Excel', // icon: 'excel' // }, // children: [ // { // path: 'export-excel', // component: () => import('@/views/excel/export-excel'), // name: 'ExportExcel', // meta: { title: 'Export Excel' } // }, // { // path: 'export-selected-excel', // component: () => import('@/views/excel/select-excel'), // name: 'SelectExcel', // meta: { title: 'Export Selected' } // }, // { // path: 'export-merge-header', // component: () => import('@/views/excel/merge-header'), // name: 'MergeHeader', // meta: { title: 'Merge Header' } // }, // { // path: 'upload-excel', // component: () => import('@/views/excel/upload-excel'), // name: 'UploadExcel', // meta: { title: 'Upload Excel' } // } // ] // }, // { // path: '/zip', // component: Layout, // redirect: '/zip/download', // alwaysShow: true, // name: 'Zip', // meta: { title: 'Zip', icon: 'zip' }, // children: [ // { // path: 'download', // component: () => import('@/views/zip/index'), // name: 'ExportZip', // meta: { title: 'Export Zip' } // } // ] // }, // { // path: '/pdf', // component: Layout, // redirect: '/pdf/index', // children: [ // { // path: 'index', // component: () => import('@/views/pdf/index'), // name: 'PDF', // meta: { title: 'PDF', icon: 'pdf' } // } // ] // }, // { // path: '/pdf/download', // component: () => import('@/views/pdf/download'), // hidden: true // }, // { // path: '/theme', // component: Layout, // children: [ // { // path: 'index', // component: () => import('@/views/theme/index'), // name: 'Theme', // meta: { title: 'Theme', icon: 'theme' } // } // ] // }, // { // path: '/clipboard', // component: Layout, // children: [ // { // path: 'index', // component: () => import('@/views/clipboard/index'), // name: 'ClipboardDemo', // meta: { title: 'Clipboard', icon: 'clipboard' } // } // ] // }, // { // path: 'external-link', // component: Layout, // children: [ // { // path: 'https://github.com/PanJiaChen/vue-element-admin', // meta: { title: 'External Link', icon: 'link' } // } // ] // }, // 404 page must be placed at the end !!! { path: '*', redirect: '/404', hidden: true } ] const createRouter = () => new Router({ // mode: 'history', // require service support scrollBehavior: () => ({ y: 0 }), routes: constantRoutes }) const router = createRouter() // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465 export function resetRouter() { const newRouter = createRouter() router.matcher = newRouter.matcher // reset router } export default router
// Direct asset picker var rich = rich || {}; rich.AssetPicker = function(){ }; rich.AssetPicker.prototype = { showFinder: function(dom_id, options){ // open a popup var params = {}; params.CKEditor = 'picker'; // this is not CKEditor params.default_style = options.default_style; params.allowed_styles = options.allowed_styles; params.insert_many = options.insert_many; params.type = options.type || "image"; params.viewMode = options.view_mode || "grid"; params.scoped = options.scoped || false; if(params.scoped == true) { params.scope_type = options.scope_type params.scope_id = options.scope_id; } params.dom_id = dom_id; var url = addQueryString(options.richBrowserUrl, params ); window.open(url, 'filebrowser', 'resizable=yes,scrollbars=yes,width=860,height=500') }, setAsset: function(dom_id, asset, id, type, name){ var split_field_name = $(dom_id).attr('id').split('_') if (split_field_name[split_field_name.length - 1] == "id") { $(dom_id).val(id); } else { $(dom_id).val(asset); } if(type=='image') { $(dom_id).siblings('img.rich-image-preview').first().attr({src: asset}); $(dom_id).siblings('.rich-image-preview-details').find('.rich-image-preview-filename').text(name); $(dom_id).siblings('.rich-image-preview-details').show(); } } }; // Rich Asset input var assetPicker = new rich.AssetPicker();
import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import { unstable_composeClasses as composeClasses } from '@mui/base'; import { chainPropTypes, integerPropType, elementTypeAcceptingRef, refType, HTMLElementType, } from '@mui/utils'; import styled from '../styles/styled'; import useThemeProps from '../styles/useThemeProps'; import debounce from '../utils/debounce'; import ownerDocument from '../utils/ownerDocument'; import ownerWindow from '../utils/ownerWindow'; import useForkRef from '../utils/useForkRef'; import Grow from '../Grow'; import Modal from '../Modal'; import Paper from '../Paper'; import { getPopoverUtilityClass } from './popoverClasses'; export function getOffsetTop(rect, vertical) { let offset = 0; if (typeof vertical === 'number') { offset = vertical; } else if (vertical === 'center') { offset = rect.height / 2; } else if (vertical === 'bottom') { offset = rect.height; } return offset; } export function getOffsetLeft(rect, horizontal) { let offset = 0; if (typeof horizontal === 'number') { offset = horizontal; } else if (horizontal === 'center') { offset = rect.width / 2; } else if (horizontal === 'right') { offset = rect.width; } return offset; } function getTransformOriginValue(transformOrigin) { return [transformOrigin.horizontal, transformOrigin.vertical] .map((n) => (typeof n === 'number' ? `${n}px` : n)) .join(' '); } function resolveAnchorEl(anchorEl) { return typeof anchorEl === 'function' ? anchorEl() : anchorEl; } const useUtilityClasses = (ownerState) => { const { classes } = ownerState; const slots = { root: ['root'], paper: ['paper'], }; return composeClasses(slots, getPopoverUtilityClass, classes); }; const PopoverRoot = styled(Modal, { name: 'MuiPopover', slot: 'Root', overridesResolver: (props, styles) => styles.root, })({}); const PopoverPaper = styled(Paper, { name: 'MuiPopover', slot: 'Paper', overridesResolver: (props, styles) => styles.paper, })({ position: 'absolute', overflowY: 'auto', overflowX: 'hidden', // So we see the popover when it's empty. // It's most likely on issue on userland. minWidth: 16, minHeight: 16, maxWidth: 'calc(100% - 32px)', maxHeight: 'calc(100% - 32px)', // We disable the focus ring for mouse, touch and keyboard users. outline: 0, }); const Popover = React.forwardRef(function Popover(inProps, ref) { const props = useThemeProps({ props: inProps, name: 'MuiPopover' }); const { action, anchorEl, anchorOrigin = { vertical: 'top', horizontal: 'left', }, anchorPosition, anchorReference = 'anchorEl', children, className, container: containerProp, elevation = 8, marginThreshold = 16, open, PaperProps = {}, transformOrigin = { vertical: 'top', horizontal: 'left', }, TransitionComponent = Grow, transitionDuration: transitionDurationProp = 'auto', TransitionProps: { onEntering, ...TransitionProps } = {}, ...other } = props; const paperRef = React.useRef(); const handlePaperRef = useForkRef(paperRef, PaperProps.ref); const ownerState = { ...props, anchorOrigin, anchorReference, elevation, marginThreshold, PaperProps, transformOrigin, TransitionComponent, transitionDuration: transitionDurationProp, TransitionProps, }; const classes = useUtilityClasses(ownerState); // Returns the top/left offset of the position // to attach to on the anchor element (or body if none is provided) const getAnchorOffset = React.useCallback(() => { if (anchorReference === 'anchorPosition') { if (process.env.NODE_ENV !== 'production') { if (!anchorPosition) { console.error( 'MUI: You need to provide a `anchorPosition` prop when using ' + '<Popover anchorReference="anchorPosition" />.', ); } } return anchorPosition; } const resolvedAnchorEl = resolveAnchorEl(anchorEl); // If an anchor element wasn't provided, just use the parent body element of this Popover const anchorElement = resolvedAnchorEl && resolvedAnchorEl.nodeType === 1 ? resolvedAnchorEl : ownerDocument(paperRef.current).body; const anchorRect = anchorElement.getBoundingClientRect(); if (process.env.NODE_ENV !== 'production') { const box = anchorElement.getBoundingClientRect(); if ( process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0 ) { console.warn( [ 'MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', "Make sure the element is present in the document or that it's not display none.", ].join('\n'), ); } } return { top: anchorRect.top + getOffsetTop(anchorRect, anchorOrigin.vertical), left: anchorRect.left + getOffsetLeft(anchorRect, anchorOrigin.horizontal), }; }, [anchorEl, anchorOrigin.horizontal, anchorOrigin.vertical, anchorPosition, anchorReference]); // Returns the base transform origin using the element const getTransformOrigin = React.useCallback( (elemRect) => { return { vertical: getOffsetTop(elemRect, transformOrigin.vertical), horizontal: getOffsetLeft(elemRect, transformOrigin.horizontal), }; }, [transformOrigin.horizontal, transformOrigin.vertical], ); const getPositioningStyle = React.useCallback( (element) => { const elemRect = { width: element.offsetWidth, height: element.offsetHeight, }; // Get the transform origin point on the element itself const elemTransformOrigin = getTransformOrigin(elemRect); if (anchorReference === 'none') { return { top: null, left: null, transformOrigin: getTransformOriginValue(elemTransformOrigin), }; } // Get the offset of the anchoring element const anchorOffset = getAnchorOffset(); // Calculate element positioning let top = anchorOffset.top - elemTransformOrigin.vertical; let left = anchorOffset.left - elemTransformOrigin.horizontal; const bottom = top + elemRect.height; const right = left + elemRect.width; // Use the parent window of the anchorEl if provided const containerWindow = ownerWindow(resolveAnchorEl(anchorEl)); // Window thresholds taking required margin into account const heightThreshold = containerWindow.innerHeight - marginThreshold; const widthThreshold = containerWindow.innerWidth - marginThreshold; // Check if the vertical axis needs shifting if (top < marginThreshold) { const diff = top - marginThreshold; top -= diff; elemTransformOrigin.vertical += diff; } else if (bottom > heightThreshold) { const diff = bottom - heightThreshold; top -= diff; elemTransformOrigin.vertical += diff; } if (process.env.NODE_ENV !== 'production') { if (elemRect.height > heightThreshold && elemRect.height && heightThreshold) { console.error( [ 'MUI: The popover component is too tall.', `Some part of it can not be seen on the screen (${ elemRect.height - heightThreshold }px).`, 'Please consider adding a `max-height` to improve the user-experience.', ].join('\n'), ); } } // Check if the horizontal axis needs shifting if (left < marginThreshold) { const diff = left - marginThreshold; left -= diff; elemTransformOrigin.horizontal += diff; } else if (right > widthThreshold) { const diff = right - widthThreshold; left -= diff; elemTransformOrigin.horizontal += diff; } return { top: `${Math.round(top)}px`, left: `${Math.round(left)}px`, transformOrigin: getTransformOriginValue(elemTransformOrigin), }; }, [anchorEl, anchorReference, getAnchorOffset, getTransformOrigin, marginThreshold], ); const setPositioningStyles = React.useCallback(() => { const element = paperRef.current; if (!element) { return; } const positioning = getPositioningStyle(element); if (positioning.top !== null) { element.style.top = positioning.top; } if (positioning.left !== null) { element.style.left = positioning.left; } element.style.transformOrigin = positioning.transformOrigin; }, [getPositioningStyle]); const handleEntering = (element, isAppearing) => { if (onEntering) { onEntering(element, isAppearing); } setPositioningStyles(); }; React.useEffect(() => { if (open) { setPositioningStyles(); } }); React.useImperativeHandle( action, () => open ? { updatePosition: () => { setPositioningStyles(); }, } : null, [open, setPositioningStyles], ); React.useEffect(() => { if (!open) { return undefined; } const handleResize = debounce(() => { setPositioningStyles(); }); const containerWindow = ownerWindow(anchorEl); containerWindow.addEventListener('resize', handleResize); return () => { handleResize.clear(); containerWindow.removeEventListener('resize', handleResize); }; }, [anchorEl, open, setPositioningStyles]); let transitionDuration = transitionDurationProp; if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) { transitionDuration = undefined; } // If the container prop is provided, use that // If the anchorEl prop is provided, use its parent body element as the container // If neither are provided let the Modal take care of choosing the container const container = containerProp || (anchorEl ? ownerDocument(resolveAnchorEl(anchorEl)).body : undefined); return ( <PopoverRoot BackdropProps={{ invisible: true }} className={clsx(classes.root, className)} container={container} open={open} ref={ref} ownerState={ownerState} {...other} > <TransitionComponent appear in={open} onEntering={handleEntering} timeout={transitionDuration} {...TransitionProps} > <PopoverPaper elevation={elevation} {...PaperProps} ref={handlePaperRef} className={clsx(classes.paper, PaperProps.className)} > {children} </PopoverPaper> </TransitionComponent> </PopoverRoot> ); }); Popover.propTypes /* remove-proptypes */ = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | // | To update them edit the d.ts file and run "yarn proptypes" | // ---------------------------------------------------------------------- /** * A ref for imperative actions. * It currently only supports updatePosition() action. */ action: refType, /** * An HTML element, or a function that returns one. * It's used to set the position of the popover. */ anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.func]), (props) => { if (props.open && (!props.anchorReference || props.anchorReference === 'anchorEl')) { const resolvedAnchorEl = resolveAnchorEl(props.anchorEl); if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) { const box = resolvedAnchorEl.getBoundingClientRect(); if ( process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0 ) { return new Error( [ 'MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', "Make sure the element is present in the document or that it's not display none.", ].join('\n'), ); } } else { return new Error( [ 'MUI: The `anchorEl` prop provided to the component is invalid.', `It should be an Element instance but it's \`${resolvedAnchorEl}\` instead.`, ].join('\n'), ); } } return null; }), /** * This is the point on the anchor where the popover's * `anchorEl` will attach to. This is not used when the * anchorReference is 'anchorPosition'. * * Options: * vertical: [top, center, bottom]; * horizontal: [left, center, right]. * @default { * vertical: 'top', * horizontal: 'left', * } */ anchorOrigin: PropTypes.shape({ horizontal: PropTypes.oneOfType([ PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number, ]).isRequired, vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]) .isRequired, }), /** * This is the position that may be used to set the position of the popover. * The coordinates are relative to the application's client area. */ anchorPosition: PropTypes.shape({ left: PropTypes.number.isRequired, top: PropTypes.number.isRequired, }), /** * This determines which anchor prop to refer to when setting * the position of the popover. * @default 'anchorEl' */ anchorReference: PropTypes.oneOf(['anchorEl', 'anchorPosition', 'none']), /** * The content of the component. */ children: PropTypes.node, /** * Override or extend the styles applied to the component. */ classes: PropTypes.object, /** * @ignore */ className: PropTypes.string, /** * An HTML element, component instance, or function that returns either. * The `container` will passed to the Modal component. * * By default, it uses the body of the anchorEl's top-level document object, * so it's simply `document.body` most of the time. */ container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([ HTMLElementType, PropTypes.func, ]), /** * The elevation of the popover. * @default 8 */ elevation: integerPropType, /** * Specifies how close to the edge of the window the popover can appear. * @default 16 */ marginThreshold: PropTypes.number, /** * Callback fired when the component requests to be closed. * The `reason` parameter can optionally be used to control the response to `onClose`. */ onClose: PropTypes.func, /** * If `true`, the component is shown. */ open: PropTypes.bool.isRequired, /** * Props applied to the [`Paper`](/api/paper/) element. * @default {} */ PaperProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({ component: elementTypeAcceptingRef, }), /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx: PropTypes.oneOfType([ PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object, ]), /** * This is the point on the popover which * will attach to the anchor's origin. * * Options: * vertical: [top, center, bottom, x(px)]; * horizontal: [left, center, right, x(px)]. * @default { * vertical: 'top', * horizontal: 'left', * } */ transformOrigin: PropTypes.shape({ horizontal: PropTypes.oneOfType([ PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number, ]).isRequired, vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]) .isRequired, }), /** * The component used for the transition. * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. * @default Grow */ TransitionComponent: PropTypes.elementType, /** * Set to 'auto' to automatically calculate transition time based on height. * @default 'auto' */ transitionDuration: PropTypes.oneOfType([ PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({ appear: PropTypes.number, enter: PropTypes.number, exit: PropTypes.number, }), ]), /** * Props applied to the transition element. * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition) component. * @default {} */ TransitionProps: PropTypes.object, }; export default Popover;
export const theme = { baseSpacingUnit: 24, maxWidth: 1000, colors: { primary: '#5c1f46', grey: '#616161' }, breakpoints: { sm: 400, m: 600, l: 1024, xl: 1280, }, };
export default { namespaced: true, state: { personal: [], }, getters: { getPersonal: state => { return state.personal }, }, mutations: { SET_PERSONAL(state, personal) { state.personal = personal }, }, actions: { fetchPersonal: async function({ commit }) { await axios .post('fetchPersonal') .then(response => { commit('SET_PERSONAL', response.data.personal) }) .catch(error => console.log(error)) }, savePersonal: async function({ commit }, personal) { await axios .post('personal', personal) .then(response => { console.log('Ok') }) .catch(error => console.log(error)) }, updatePersonal: async function({ commit }, personal) { await axios .put('personal/' + personal.id_personal, personal) .then(response => { console.log('Ok') }) .catch(error => console.log(error)) }, }, }
import {Correction, correctionTypes, registerWordRule, createMaskRule, normalizeCase} from "../imports.js"; registerWordRule(createMaskRule({ matches: ["л(а)мберт*"], replacement: "е", type: correctionTypes.UNCERTAIN, // Can be French as well as English description: 'Відповідно до § 134 правопису, англійське «Lambert» слід передавати як «Лемберт».' })); registerWordRule((token) => { const replacement = token.replace(/^п[ае]лл?-м[ае]лл?/i, (match) => normalizeCase('пелл-мелл', match)); return replacement.toLowerCase() === token.toLowerCase() ? null : new Correction(correctionTypes.MISTAKE, replacement, 'Відповідно до § 134 правопису, назву вулиці в Лондоні слід писати як «Пелл-Мелл».'); });
import React from "react" import styled from "styled-components" import { Link } from "gatsby" const ButtonWrapper = styled(props => <Link {...props} />)` border-radius: 20px; background-color: #10a472; border: 0 none; color: #fff; font-weight: 600; padding: 8px 16px; letter-spacing: 0.1em; font-size: 12px; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background-color 0.2s ease-in-out; outline: 0 none; &:hover { background-color: #0a8a5f; } &.outline { border: 2px solid #555; background-color: transparent; color: #555; &:hover { background-color: rgba(0, 0, 0, 0.05); } } } ` const Button = ({ className, children, href, target }) => ( <ButtonWrapper className={className} to={href} target={target} activeClassName="active" > {children} </ButtonWrapper> ) export default Button
var React = require('react'); var rB = require('react-bootstrap'); var cE = React.createElement; var AppStore = require('../stores/AppStore'); var AppActions = require('../actions/AppActions'); var Authorization = require('./Authorization'); var Send = require('./Send'); var Receive = require('./Receive'); var DeviceInfo = require('./DeviceInfo'); var AppStatus = require('./AppStatus'); var DisplayError = require('./DisplayError'); var MyApp = { getInitialState: function() { return AppStore.getState(); }, componentDidMount: function() { AppStore.addChangeListener(this._onChange); }, componentWillUnmount: function() { AppStore.removeChangeListener(this._onChange); }, _onChange : function(ev) { this.setState(AppStore.getState()); }, render: function() { var pubKey = (this.state.clientInfo ? this.state.clientInfo.key.slice(0, 8) + '...' : ""); return cE("div", {className: "container-fluid"}, cE(DisplayError, { error: this.state.error }), cE(rB.Panel, { header: cE(rB.Grid, {fluid: true}, cE(rB.Row, null, cE(rB.Col, {sm:1, xs:1}, cE(AppStatus, { isClosed: this.state.isClosed }) ), cE(rB.Col, { sm: 5, xs:10, className: 'text-right' }, "Diffie Example"), cE(rB.Col, { sm: 5, xs:11, className: 'text-right' }, this.state.fullName) ) ) }, cE(rB.Panel, {header: "Authorization for public key " + pubKey}, cE(Authorization, { principalId: this.state.principalId, isManager: this.state.isManager, autho: this.state.autho })), cE(Send, { msg : this.state.msg, isManager: this.state.isManager, msgEnc : this.state.msgEnc, toId : this.state.toId }), cE(Receive, { msgRecv: this.state.msgRecv, isManager: this.state.isManager, msgEncRecv: this.state.msgEncRecv, msgFromRecv: this.state.msgFromRecv }), cE(DeviceInfo, { isManager: this.state.isManager, deviceInfo: this.state.deviceInfo || {} })) ); } }; module.exports = React.createClass(MyApp);
/** * Copyright 2019, SumUp Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { useCallback, useState, useEffect } from 'react'; import throttle from 'lodash/fp/throttle'; function getSize(el) { if (!el) { return { width: 0, height: 0, }; } return { width: el.offsetWidth, height: el.offsetHeight, }; } export function useComponentSize(ref = {}) { const [componentSize, setComponentSize] = useState(getSize(ref.current)); const handleResize = useCallback( throttle(500)(() => { if (ref.current) { setComponentSize(getSize(ref.current)); } }), [ref], ); useEffect(() => { const node = ref.current; if (!node) { return; } handleResize(); if (typeof ResizeObserver === 'function') { let resizeObserver = new ResizeObserver(handleResize); resizeObserver.observe(node); // eslint-disable-next-line consistent-return return function cleanup() { resizeObserver.disconnect(node); resizeObserver = null; }; } window.addEventListener('resize', handleResize); // eslint-disable-next-line consistent-return return function cleanup() { window.removeEventListener('resize', handleResize); }; // eslint-disable-next-line react-hooks/exhaustive-deps }, []); return componentSize; }
webpackJsonp([9,137],{"Gm/a":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("mvHQ"),a=n.n(i),l=n("rN1C"),o=n("fksm"),r=n("l8D1"),s=n("MdFA"),c=n("Q5rI"),d=[{label:"创建时间顺序",value:"project.createTime",type:"ASC"},{label:"创建时间倒序",value:"project.createTime",type:"DESC"},{label:"单价顺序",value:"project.unitPrice",type:"ASC"},{label:"单价倒序",value:"project.unitPrice",type:"DESC"},{label:"销量倒序",value:"sales",type:"DESC"}],A={components:{},props:{},data:function(){return{btnFlag:0,checked:"",more_condition:!1,click_more_condition:!1,select_conditions_list:{},list:[],cur_list:[],type_list:[],check_biz_ids:[],total:0,listQuery:{page:0,pageSize:20,orderField:"sales",orderType:"DESC",orderNum:4},order_list:d,province_list:[],city_list:[],district_list:[],town_list:[],tableVisiable:!1,enterpriseTotal:null,enterpriseList:[],listEnterpriseQuery:{page:1,limit:10,sort:"+id"},conditionVisiable:!1,conditionTotal:null,conditionList:[],listConditionQuery:{page:1,limit:10},createVisible:!1,createForm:{},ent_list:[],enterprise_list:[],user_list:[],sign_company_list:[],level:3,parentId:"0",levelList:[{label:"国家级",value:1},{label:"省级",value:2},{label:"市级",value:3},{label:"区县级",value:4},{label:"镇街级",value:5}],orderTypeList:[{label:"项目型订单",value:0},{label:"知产型订单",value:1},{label:"财务型订单",value:2},{label:"项目审计型订单",value:4}],oftenProjectList:[{label:"不是",value:0},{label:"是",value:1}],createRule:{crmCompanyIdList:[{required:!0,message:"请选择企业",trigger:"blur"}],signUserId:[{required:!0,message:"请选择签订人",trigger:"blur"}],signDate:[{required:!0,message:"请选择签订日期",trigger:"blur"}],signCompanyId:[{required:!0,message:"请选择签订公司",trigger:"blur"}]},companyPage:0,companyPageSize:20,companyTotal:"",loading:!1,selectCompany:[],flowList:[],flowPage:1,flowPageSize:100,allowGetProjectContract:this.authorityControl("SYSTEM:POLICY:MANAGE","SYSTEM:PROJECTLIBRARY:MANAGE","SYSTEM:PROJECTLIBRARY:PROJECT:CONTRACT"),allowAdd:this.authorityControl("SYSTEM:POLICY:MANAGE","SYSTEM:PROJECTLIBRARY:MANAGE","SYSTEM:PROJECTLIBRARY:INSERT"),allowUpdate:this.authorityControl("SYSTEM:POLICY:MANAGE","SYSTEM:PROJECTLIBRARY:MANAGE","SYSTEM:PROJECTLIBRARY:UPDATE"),allowGetList:this.authorityControl("SYSTEM:POLICY:MANAGE","SYSTEM:PROJECTLIBRARY:MANAGE","SYSTEM:PROJECTLIBRARY:LIST"),allowDeleteSon:this.authorityControl("SYSTEM:POLICY:MANAGE","SYSTEM:PROJECTLIBRARY:MANAGE","SYSTEM:PROJECTLIBRARY:DELETE:CHILD"),allowDelete:this.authorityControl("SYSTEM:POLICY:MANAGE","SYSTEM:PROJECTLIBRARY:MANAGE","SYSTEM:PROJECTLIBRARY:DELETE"),allowAddOrder:this.authorityControl("SYSTEM:POLICY:MANAGE","SYSTEM:PROJECTLIBRARY:MANAGE","SYSTEM:PROJECTLIBRARY:FREEORDER:ADD")}},activated:function(){""==localStorage.getItem("searchName")&&this.$set(this.listQuery,"projectName",""),this.getCommonData(),0!=this.$store.getters.projectPage?(this.listQuery.page=0,this.listQuery.pageSize=this.$store.getters.projectPage+20,this.getList()):(this.listQuery.page=this.$store.getters.projectPage,this.listQuery.pageSize=20,this.getList()),window.addEventListener("scroll",this.scrollToTop),this.$nextTick(function(){var e=this.$store.getters.projectScroll;document.documentElement.scrollTop=document.body.scrollTop=e})},deactivated:function(){localStorage.removeItem("searchName")},destroyed:function(){clearInterval(this.timer),window.removeEventListener("scroll",this.scrollToTop)},directives:{loadMore:{bind:function(e,t){e.querySelector(".el-select-dropdown .el-select-dropdown__wrap").addEventListener("scroll",function(){this.scrollHeight-this.scrollTop<=this.clientHeight&&t.value()})}}},beforeRouteLeave:function(e,t,n){var i=document.documentElement.scrollTop;this.$store.commit("SET_PROJECT_SCROLL",i),this.$store.commit("SET_PROJECT_PAGE",this.listQuery.page),n()},methods:{matchingCompany:function(e){var t=this;Object(l.c)({projectId:e}).then(function(n){200===n.code&&t.$router.push({path:"/policy/project/matchingCompany",query:{id:e,queryType:"project"}})})},loadMore:function(){var e=this;this.companyPage=this.companyPage+20;var t={page:this.companyPage,pageSize:this.companyPageSize,queryExistSalesman:1};Object(r.w)(t).then(function(t){200==t.code&&(e.enterprise_list=e.enterprise_list.concat(t.data.data))})},companyRemoteMethod:function(e){var t=this;""!==e?(this.loading=!0,setTimeout(function(){t.loading=!1,t.getCompanyData(e)},200)):(this.loading=!0,setTimeout(function(){t.loading=!1,t.getCompanyData()},200))},getCompanyData:function(e){var t=this;this.companyPage=0,this.companyPageSize=20;var n={page:this.companyPage,pageSize:this.companyPageSize,queryExistSalesman:1,companyName:e};Object(r.w)(n).then(function(e){200==e.code&&(t.enterprise_list=e.data.data,t.companyTotal=e.data.total)})},getSignerData:function(){var e=this,t=new FormData;t.append("roleName","业务员"),Object(c.s)(t).then(function(t){200==t.code&&(e.user_list=t.data.data)})},getCompanyList:function(){var e=this;Object(r.o)().then(function(t){200==t.code?e.sign_company_list=t.data:e.$message.warning(t.message)})},createClose:function(){this.enterprise_list=[],this.createForm={},this.createVisible=!1},handleDel:function(e){var t=this;this.check_biz_ids.length<1?this.$message.error("请选择想要删除的项目"):this.$confirm("您确定删除吗?").then(function(e){Object(l.h)({projectId:t.check_biz_ids}).then(function(e){200==e.code&&(t.$message({message:"删除成功",type:"success"}),t.list=[],t.check_biz_ids=[],t.listQuery.page=0,t.listQuery.pageSize=20,t.getList())})})},backTop:function(){var e=this,t=setInterval(function(){var n=Math.floor(-e.scrollTop/5);document.documentElement.scrollTop=document.body.scrollTop=e.scrollTop+n,0===e.scrollTop&&clearInterval(t)},16)},scrollToTop:function(){var e=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;this.scrollTop=e,this.scrollTop>0?this.btnFlag=!0:this.btnFlag=!1},goSearch:function(){this.listQuery.page=0,this.listQuery.pageSize=20,this.list=[],this.getList()},toProject:function(e){this.$router.push({path:"/policy/project/detail",query:{id:e,check:!0}})},handleUpdate:function(e){this.$router.push({path:"/policy/project/edit",query:{id:e}})},toCreate:function(){this.$router.push({path:"/policy/project/create"})},handleCollect:function(e){this.$router.push({path:"/policy/project/collect"})},checkAllOrNo:function(){if(this.isCheckAll)this.check_biz_ids=[],this.isCheckAll=!1;else{var e=this;this.list.forEach(function(t,n){-1===e.check_biz_ids.indexOf(t.projectId)&&e.check_biz_ids.push(t.projectId),e.isCheckAll=!0})}},handleOrder:function(e){var t=this;this.listQuery.page=0,this.listQuery.pageSize=20,this.order_list.forEach(function(n,i){i==e&&(t.listQuery.orderField=n.value,t.listQuery.orderType=n.type)}),this.getList()},deleteOneClick:function(e){this.list=[],this.$delete(this.select_conditions_list,e),this.$delete(this.listQuery,e),this.listQuery.page=0,this.listQuery.pageSize=20,this.getList()},deleteAllClick:function(){this.list=[],this.select_conditions_list={},this.listQuery={},this.listQuery.page=0,this.listQuery.pageSize=20,this.getList()},getMoreCondition:function(){this.more_condition=!this.more_condition,this.click_more_condition||(this.click_more_condition=!0,this.getCommonData(),this.getRegionList(),this.getFlowList())},handleFilterProjectType:function(e){var t=this,n=[];0!=e.length?e.forEach(function(e){t.type_list.forEach(function(t){e==t.dictId&&n.push(t.dictName)});var i=n.join(",");t.$set(t.select_conditions_list,"projectTypes","项目分类 - "+i)}):this.$delete(this.select_conditions_list,"projectTypes"),this.list=[],this.listQuery.page=0,this.listQuery.pageSize=20,this.getList()},handleFilterProjectLevel:function(e){var t=this,n=[];0!=e.length?e.forEach(function(e){t.levelList.forEach(function(t){e==t.value&&n.push(t.label)});var i=n.join(",");t.$set(t.select_conditions_list,"areaLevel","项目级别 - "+i)}):this.$delete(this.select_conditions_list,"areaLevel"),this.list=[],this.listQuery.page=0,this.listQuery.pageSize=20,this.getList()},handleFilterOrderType:function(e){0!==e&&""==e?this.$delete(this.select_conditions_list,"orderClass"):this.$set(this.select_conditions_list,"orderClass","订单类型 - "+this.orderTypeList.find(function(t){return t.value===e}).label),this.list=[],this.listQuery.page=0,this.listQuery.pageSize=20,this.getList()},handleOftenProject:function(e){0!==e&&""==e?this.$delete(this.select_conditions_list,"isOftenProject"):this.$set(this.select_conditions_list,"isOftenProject","是否常规可报项目 - "+this.oftenProjectList.find(function(t){return t.value===e}).label),this.list=[],this.listQuery.page=0,this.listQuery.pageSize=20,this.getList()},handleFilterFlow:function(e){0!==e&&""==e?this.$delete(this.select_conditions_list,"flowId"):this.$set(this.select_conditions_list,"flowId","订单流程 - "+this.flowList.find(function(t){return t.flowId===e}).flowName),this.list=[],this.listQuery.page=0,this.listQuery.pageSize=20,this.getList()},changeProvince:function(e){e?this.$set(this.select_conditions_list,"provinceId","省份 - "+this.province_list.find(function(t){return t.dictId===e}).dictName):this.$delete(this.select_conditions_list,"provinceId"),this.list=[],this.listQuery.page=0,this.listQuery.pageSize=20,this.$delete(this.select_conditions_list,"cityId"),this.$delete(this.select_conditions_list,"districtId"),this.$delete(this.select_conditions_list,"townId"),this.parentId=e,this.level=2,this.getRegionList(),this.getList()},changeCity:function(e){e?this.$set(this.select_conditions_list,"cityId","城市 - "+this.city_list.find(function(t){return t.dictId===e}).dictName):this.$delete(this.select_conditions_list,"cityId"),this.list=[],this.$delete(this.select_conditions_list,"districtId"),this.$delete(this.select_conditions_list,"townId"),this.listQuery.page=0,this.listQuery.pageSize=20,this.parentId=e,this.level=1,this.getRegionList(),this.getList()},changeDistrict:function(e){e?(this.$set(this.select_conditions_list,"districtId","区县 - "+this.district_list.find(function(t){return t.dictId===e}).dictName),this.$delete(this.select_conditions_list,"townId")):(this.$delete(this.select_conditions_list,"districtId"),this.$delete(this.select_conditions_list,"townId")),this.list=[],this.listQuery.page=0,this.listQuery.pageSize=20,this.parentId=e,this.level=0,this.getRegionList(),this.getList()},getTownsId:function(e){e?this.$set(this.select_conditions_list,"townId","镇街 - "+this.town_list.find(function(t){return t.dictId===e}).dictName):this.$delete(this.select_conditions_list,"townId"),this.list=[],this.listQuery.page=0,this.listQuery.pageSize=20,this.getList()},getList:function(){var e=this;this.allowGetList.twoAllow?Object(l.e)(this.listQuery).then(function(t){e.listQuery.page>0?e.list=e.list.concat(t.data.data):(e.list=t.data.data,e.check_biz_ids=[],0!=e.$store.getters.projectPage&&(e.listQuery.page=e.$store.getters.projectPage,e.listQuery.pageSize=20)),e.total=t.data.total,e.list.forEach(function(t){t.marketCommissio<=1?(t.marketCommissio=parseFloat((100*t.marketCommissio).toPrecision(12)),t.marketCommissioWay=1):t.marketCommissioWay=0,t.projectCommissioMoneyBill<=1?(t.projectCommissioMoneyBill=parseFloat((100*t.projectCommissioMoneyBill).toPrecision(12)),t.projectCommissioWay=1):t.projectCommissioWay=0,t.salesMinimum<=1?(t.salesMinimum=parseFloat((100*t.salesMinimum).toPrecision(12)),t.salesMinimumWay=1):t.salesMinimumWay=0,t.policyNoticeInfoVos.length>0&&t.policyNoticeInfoVos.forEach(function(e){if(e.validDateEnd){var t=new Date;t.setTime(t.getTime());var n=t.getFullYear()+"-"+(t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"-"+(t.getDate()<10?"0"+t.getDate():t.getDate());e.validDateEnd.replace(/\-/g,"")<n.replace(/\-/g,"")&&(e.isOverdue=!0)}}),e.type_list.forEach(function(e){t.projectType==e.dictId&&(t.projectTypeName=e.dictName)})});var n={};e.list=e.list.reduce(function(e,t){return!n[t.projectId]&&(n[t.projectId]=e.push(t)),e},[])}):this.$message.warning("抱歉,您没有权限获取列表")},handleExport:function(){var e=this;this.listQuery.pageSize=this.total,this.listQuery.page=0,this.listQuery.projectIds=this.check_biz_ids;var t=this.$loading({lock:!0,text:"导出中,请稍等..."});Object(l.a)(this.listQuery).then(function(n){if(200==n.code){var i={fileName:n.message,delete:!0};Object(c.h)(i).then(function(n){e.listQuery.projectIds=[];var i=window.URL.createObjectURL(n),a=document.createElement("a");document.body.appendChild(a);var l=(new Date).getFullYear()+""+((new Date).getMonth()+1)+(new Date).getDate()+(new Date).getHours()+(new Date).getMinutes()+"-项目列表.xlsx";a.href=i,a.download=l,a.click(),window.URL.revokeObjectURL(i),t.close()})}else e.$message.warning(n.message)})},pageDown:function(){this.listQuery.page=this.listQuery.page+20,this.listQuery.pageSize=20,this.getList()},enterpriseSizeChange:function(e){this.listEnterpriseQuery.limit=e,this.getEnterpriseList()},enterpriseCurrentChange:function(e){this.listEnterpriseQuery.page=e,this.getEnterpriseList()},getEnterpriseInfo:function(e){this.listEnterpriseQuery.id=e,this.getEnterpriseList()},getEnterpriseList:function(){this.tableVisiable=!0},conditionSizeChange:function(e){this.listConditionQuery.limit=e,this.getConditionList()},conditionCurrentChange:function(e){this.listConditionQuery.page=e,this.getConditionList()},handleCondition:function(e){this.listConditionQuery.id=e,this.getConditionList()},getConditionList:function(){this.conditionVisiable=!0},createFreeOrder:function(e){this.$router.push({path:"/policy/project/addFreeOrder",query:{projectBox:a()(e),projectId:e.projectId,projectName:e.projectName}})},saveCreateOrder:function(e){var t=this;this.$refs[e].validate(function(e){if(!e)return!1;Object(o.u)(t.createForm).then(function(e){200==e.code&&(t.createVisible=!1,t.createForm={},t.$message.success("操作成功"))})})},getCommonData:function(){var e=this;Object(c.d)({keyList:"DICT:PROJECT_TYPE"}).then(function(t){200==t.code?e.type_list=t.data["DICT:PROJECT_TYPE"]:e.$message({type:"error",message:t.message})})},getRegionList:function(){var e=this;void 0!=this.parentId&&""!=this.parentId||(this.level=3,this.parentId=0);var t={level:this.level,parentId:this.parentId};Object(c.f)(t).then(function(t){200==t.code?(3==e.level&&(e.province_list=t.data),2==e.level&&(e.city_list=t.data),1==e.level&&(e.district_list=t.data),0==e.level&&(e.town_list=t.data)):e.$message({type:"error",message:t.message})})},handleCheck:function(e){e.noticeType,this.$router.push({path:"/policy/detailPolicy",query:{noticeId:e.noticeId,is_check:!0}})},getFlowList:function(){var e=this,t={page:this.flowPage,pageSize:this.flowPageSize};Object(s.g)(t).then(function(t){200==t.code&&(e.flowList=t.data.data)})}}},p={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"dashboard-container",staticStyle:{overflow:"auto","overflow-x":"hidden",height:"100%"}},[i("el-row",{staticClass:"row-width-auto-margin-0-96",staticStyle:{"margin-bottom":"20px","font-size":"14px"}},[i("el-card",{staticClass:"top-margin-10 center-items search-bar"},[i("el-input",{staticClass:"search",staticStyle:{width:"500px"},attrs:{placeholder:"项目名称",size:"large"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.goSearch(t)}},model:{value:e.listQuery.projectName,callback:function(t){e.$set(e.listQuery,"projectName",t)},expression:"listQuery.projectName"}},[i("el-button",{staticClass:"search-btn",attrs:{slot:"append",size:"large",icon:"el-icon-search"},on:{click:e.goSearch},slot:"append"},[e._v("搜一下\n ")])],1),e._v(" "),e.allowAdd.twoAllow?i("el-button",{staticClass:"filter-item search-btn add-btn",attrs:{size:"large"},on:{click:e.toCreate}},[e._v("新增\n ")]):e._e()],1),e._v(" "),i("el-card",{staticClass:"top-margin-10 padding-0"},[i("div",{staticClass:"screen-bar"},[i("div",{staticClass:"left"},[i("div",{staticClass:"screen-title"},[i("span",{staticClass:"tag"}),e._v(" "),i("span",[e._v("已选条件:")])]),e._v(" "),i("div",{staticClass:"screen-list"},[e._l(e.select_conditions_list,function(t,a){return i("div",{staticClass:"padding-vertical-5 right-margin-10 item"},[e._v("\n "+e._s(t)),i("img",{staticClass:"hover_cursor",staticStyle:{"vertical-align":"middle","margin-left":"3px"},attrs:{src:n("cFCn")},on:{click:function(t){return e.deleteOneClick(a)}}})])}),e._v(" "),Object.keys(e.select_conditions_list).length>1?i("div",{staticClass:"padding-vertical-5 right-margin-10 screen-clear",on:{click:e.deleteAllClick}},[e._v("\n 清空所有\n ")]):e._e()],2)]),e._v(" "),i("div",{staticClass:"right hover_cursor",on:{click:e.getMoreCondition}},[e.more_condition?i("img",{attrs:{src:n("8DMi")}}):i("img",{attrs:{src:n("RU3k")}}),e._v(" "),i("span",{staticClass:"right-margin-10",staticStyle:{color:"#33B3EE","white-space":"nowrap"}},[e._v("选择筛选条件")])])]),e._v(" "),e.more_condition?i("div",[i("div",{staticStyle:{height:"3px","background-color":"#EDF4FF",width:"100%","margin-top":"10px"}}),e._v(" "),i("div",{staticClass:"left-margin-10"},[i("div",{staticClass:"top-margin-10"},[i("el-form",{attrs:{inline:!0}},[i("el-form-item",{staticStyle:{"margin-bottom":"10px",display:"flex"},attrs:{label:"筛选:"}},[i("el-select",{staticClass:"inline-block float-left",attrs:{multiple:"",clearable:"",size:"mini",placeholder:"项目分类"},on:{change:e.handleFilterProjectType},model:{value:e.listQuery.projectTypes,callback:function(t){e.$set(e.listQuery,"projectTypes",t)},expression:"listQuery.projectTypes"}},e._l(e.type_list,function(e){return i("el-option",{key:e.dictId,attrs:{value:e.dictId,label:e.dictName}})}),1),e._v(" "),i("el-select",{staticClass:"inline-block float-left",staticStyle:{"margin-left":"20px"},attrs:{multiple:"",clearable:"",size:"mini",placeholder:"项目级别"},on:{change:e.handleFilterProjectLevel},model:{value:e.listQuery.areaLevel,callback:function(t){e.$set(e.listQuery,"areaLevel",t)},expression:"listQuery.areaLevel"}},e._l(e.levelList,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1),e._v(" "),i("el-select",{staticClass:"inline-block float-left",staticStyle:{"margin-left":"20px"},attrs:{clearable:"",size:"mini",placeholder:"订单类型"},on:{change:e.handleFilterOrderType},model:{value:e.listQuery.orderClass,callback:function(t){e.$set(e.listQuery,"orderClass",t)},expression:"listQuery.orderClass"}},e._l(e.orderTypeList,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1),e._v(" "),i("el-select",{staticClass:"inline-block float-left",staticStyle:{"margin-left":"20px"},attrs:{clearable:"",size:"mini",filterable:"",placeholder:"订单流程"},on:{change:e.handleFilterFlow},model:{value:e.listQuery.flowId,callback:function(t){e.$set(e.listQuery,"flowId",t)},expression:"listQuery.flowId"}},e._l(e.flowList,function(e){return i("el-option",{key:e.flowId,attrs:{label:e.flowName,value:e.flowId}})}),1),e._v(" "),i("el-select",{staticClass:"inline-block float-left",staticStyle:{"margin-left":"20px"},attrs:{clearable:"",size:"mini",filterable:"",placeholder:"是否常规可报项目"},on:{change:e.handleOftenProject},model:{value:e.listQuery.isOftenProject,callback:function(t){e.$set(e.listQuery,"isOftenProject",t)},expression:"listQuery.isOftenProject"}},e._l(e.oftenProjectList,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1)],1)],1),e._v(" "),i("div",[i("el-form",{attrs:{inline:!0}},[i("el-form-item",{attrs:{label:"地区:"}},[i("el-select",{staticClass:"inline-block input-150 float-left",attrs:{clearable:"",size:"mini",placeholder:"省份"},on:{change:e.changeProvince},model:{value:e.listQuery.provinceId,callback:function(t){e.$set(e.listQuery,"provinceId",t)},expression:"listQuery.provinceId"}},e._l(e.province_list,function(e){return i("el-option",{key:e.dictId,attrs:{label:e.dictName,value:e.dictId}})}),1),e._v(" "),i("el-select",{staticClass:"inline-block input-150 float-left",staticStyle:{"margin-left":"20px"},attrs:{clearable:"",size:"mini",placeholder:"城市"},on:{change:e.changeCity},model:{value:e.listQuery.cityId,callback:function(t){e.$set(e.listQuery,"cityId",t)},expression:"listQuery.cityId"}},e._l(e.city_list,function(e){return i("el-option",{key:e.dictId,attrs:{label:e.dictName,value:e.dictId}})}),1),e._v(" "),i("el-select",{staticClass:"inline-block input-150 float-left",staticStyle:{"margin-left":"20px"},attrs:{clearable:"",size:"mini",placeholder:"县区"},on:{change:e.changeDistrict},model:{value:e.listQuery.districtId,callback:function(t){e.$set(e.listQuery,"districtId",t)},expression:"listQuery.districtId"}},e._l(e.district_list,function(e){return i("el-option",{key:e.dictId,attrs:{label:e.dictName,value:e.dictId}})}),1),e._v(" "),i("el-select",{staticClass:"inline-block input-150 float-left",staticStyle:{"margin-left":"20px"},attrs:{clearable:"",size:"mini",placeholder:"镇街"},on:{change:e.getTownsId},model:{value:e.listQuery.townId,callback:function(t){e.$set(e.listQuery,"townId",t)},expression:"listQuery.townId"}},e._l(e.town_list,function(e){return i("el-option",{key:e.dictId,attrs:{label:e.dictName,value:e.dictId}})}),1)],1)],1)],1)])]):e._e()]),e._v(" "),i("el-card",{staticClass:"top-margin-10 padding-0"},[i("div",{staticClass:"get-search-bar"},[i("span",{staticStyle:{color:"rgba(68,68,68,0.75)"}},[i("span",{staticClass:"tag"}),e._v("搜索到"),i("span",{staticStyle:{color:"#F56C6C"}},[e._v(" "+e._s(e.total)+" ")]),e._v("条记录\n "),e.check_biz_ids.length>0?i("span",[e._v("已选中"),i("span",{staticStyle:{color:"#F56C6C"}},[e._v(" "+e._s(e.check_biz_ids.length)+" ")]),e._v("条记录")]):e._e()]),e._v(" "),i("el-button",{staticClass:"filter-item btn-item",staticStyle:{"margin-left":"10px"},attrs:{size:"mini"},on:{click:e.checkAllOrNo}},[e._v("全选\n ")]),e._v(" "),i("el-button",{staticClass:"filter-item btn-item left-margin-10",attrs:{size:"mini"},on:{click:e.handleExport}},[e._v("导出")]),e._v(" "),e.allowDelete.twoAllow?i("el-button",{staticClass:"filter-item btn-item left-margin-10",attrs:{size:"mini"},on:{click:e.handleDel}},[e._v("删除\n ")]):e._e(),e._v(" "),i("span",{staticClass:"float-right",staticStyle:{"vertical-align":"middle"}},[i("el-select",{staticClass:"select-item",attrs:{size:"mini",clearable:"",placeholder:"默认排序"},on:{change:e.handleOrder},model:{value:e.listQuery.orderNum,callback:function(t){e.$set(e.listQuery,"orderNum",t)},expression:"listQuery.orderNum"}},e._l(e.order_list,function(e,t){return i("el-option",{key:e.value,attrs:{label:e.label,value:t}})}),1)],1)],1),e._v(" "),i("div",{staticClass:"top-margin-10",staticStyle:{height:"3px","background-color":"#EDF4FF",width:"100%"}}),e._v(" "),e._l(e.list,function(t,a){return i("div",{staticClass:"list-bar top-margin-10 overflow-x"},[i("div",{staticClass:"left float-left overflow-x"},[i("div",{staticClass:"float-left center-items"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.check_biz_ids,expression:"check_biz_ids"}],staticClass:"check",attrs:{type:"checkbox",name:"check_biz_ids"},domProps:{value:t.projectId,checked:Array.isArray(e.check_biz_ids)?e._i(e.check_biz_ids,t.projectId)>-1:e.check_biz_ids},on:{change:function(n){var i=e.check_biz_ids,a=n.target,l=!!a.checked;if(Array.isArray(i)){var o=t.projectId,r=e._i(i,o);a.checked?r<0&&(e.check_biz_ids=i.concat([o])):r>-1&&(e.check_biz_ids=i.slice(0,r).concat(i.slice(r+1)))}else e.check_biz_ids=l}}})]),e._v(" "),a%5==0?i("div",{staticClass:"bg_pale_blue ent_shorthand padding-10 float-left text-align-center hover_cursor"},[e._v(e._s(t.projectTitle?t.projectTitle:"项目简称")+"\n ")]):e._e(),e._v(" "),a%5==1?i("div",{staticClass:"bg_pale_pink ent_shorthand padding-10 float-left text-align-center hover_cursor"},[e._v(e._s(t.projectTitle?t.projectTitle:"项目简称")+"\n ")]):e._e(),e._v(" "),a%5==2?i("div",{staticClass:"bg_pale_yellow ent_shorthand padding-10 float-left text-align-center hover_cursor"},[e._v(e._s(t.projectTitle?t.projectTitle:"项目简称")+"\n ")]):e._e(),e._v(" "),a%5==3?i("div",{staticClass:"bg_pale_green ent_shorthand padding-10 float-left text-align-center hover_cursor"},[e._v(e._s(t.projectTitle?t.projectTitle:"项目简称")+"\n ")]):e._e(),e._v(" "),a%5==4?i("div",{staticClass:"bg_pale_violet ent_shorthand padding-10 float-left text-align-center hover_cursor"},[e._v(e._s(t.projectTitle?t.projectTitle:"项目简称")+"\n ")]):e._e()]),e._v(" "),i("div",{staticClass:"float-left overflow-x",staticStyle:{width:"70%"}},[i("div",[i("span",{staticClass:"hover_cursor",staticStyle:{"font-size":"16px","font-weight":"bolder"},on:{click:function(n){return e.toProject(t.projectId)}}},[e._v(e._s(t.projectName))]),e._v(" "),1==t.isOftenProject?i("span",{staticClass:"left-margin-10",staticStyle:{height:"20px","line-height":"20px"}},[i("img",{staticStyle:{"vertical-align":"middle","margin-left":"3px"},attrs:{src:n("dbek")}})]):e._e(),e._v(" "),t.isOftenApply?i("span",{staticStyle:{"font-size":"14px","margin-left":"20px","background-color":"#14DCDC",padding:"3px 5px",color:"#ffffff"}},[e._v("常年可报")]):e._e()]),e._v(" "),i("div",{staticClass:"top-margin-10 overflow-x overflow-y"},[i("div",{staticClass:"float-left inline-block",staticStyle:{width:"100%",display:"flex","justify-content":"space-between"}},[i("span",{staticClass:"inline-block",staticStyle:{flex:"1"}},[e._v("项目分类:"),i("span",{staticClass:"color-05"},[e._v(e._s(t.projectTypeName))])]),e._v(" "),i("span",{staticClass:"inline-block",staticStyle:{flex:"1"}},[e._v("订单类型:"),i("span",{staticClass:"color-05"},[e._v(e._s(0==t.orderType?"项目型订单":1==t.orderType?"知产型订单":2==t.orderType?"财务型订单":4==t.orderType?"项目审计型订单":""))])]),e._v(" "),i("span",{staticClass:"inline-block",staticStyle:{flex:"1"}},[e._v("单价:"+e._s(t.unitPrice)+" 元")]),e._v(" "),0==t.salesMinimumWay?i("span",{staticClass:"inline-block",staticStyle:{flex:"1"}},[e._v("销售保底价:"+e._s(t.salesMinimum+"元")+" ")]):i("span",{staticClass:"inline-block",staticStyle:{flex:"1"}},[e._v("销售保底价:"+e._s(t.salesMinimum+"%")+" ")]),e._v(" "),1==t.marketCommissioWay?i("span",{staticClass:"inline-block",staticStyle:{flex:"1"}},[e._v("市场提成:"+e._s(t.marketCommissio)+" %")]):i("span",{staticClass:"inline-block",staticStyle:{flex:"1"}},[e._v("市场提成:"+e._s(t.marketCommissio)+" 元")]),e._v(" "),1==t.projectCommissioWay?i("span",{staticClass:"inline-block",staticStyle:{flex:"1"}},[e._v("项目提成:"+e._s(t.projectCommissioMoneyBill)+" %")]):i("span",{staticClass:"inline-block",staticStyle:{flex:"1"}},[e._v("项目提成:"+e._s(t.projectCommissioMoneyBill)+" 元")])])]),e._v(" "),i("div",{staticClass:"top-margin-10 overflow-x overflow-y"},[i("div",{staticClass:"float-left inline-block",staticStyle:{width:"100%",display:"flex"}},[i("span",{staticClass:"inline-block"},[e._v("订单流程:\n "),i("span",[e._v("\n "+e._s(t.flowName)+"\n ")])]),e._v(" "),i("span",{staticClass:"inline-block",staticStyle:{flex:"1"}}),e._v(" "),i("span",{staticClass:"inline-block",staticStyle:{flex:"1"}}),e._v(" "),i("span",{staticClass:"inline-block",staticStyle:{flex:"1"}})])]),e._v(" "),e._l(t.policyNoticeInfoVos,function(t,n){return i("div",{staticClass:"top-margin-10 overflow-x overflow-y",staticStyle:{"background-color":"#EFFAFF"}},[i("div",{staticStyle:{width:"100%",color:"#444444",display:"flex","align-items":"flex-start"}},[i("div",{staticClass:"right-margin-10 text-align-center list-num left-margin-10 top-margin-10",staticStyle:{"min-width":"20px",width:"20px",height:"20px",display:"flex","align-items":"center","justify-content":"center",background:"#FFCBA6","border-radius":"50% / 50%",color:"#ffffff"}},[e._v("\n "+e._s(n+1)+"\n ")]),e._v(" "),i("div",[i("div",{class:t.isOverdue?"top-margin-10 inline-list is-overdue":"top-margin-10 inline-list"},[i("div",{staticClass:"policy",on:{click:function(n){return e.handleCheck(t)}}},[e._v("\n "+e._s(1==t.noticeType?"政策":"通知")+":"+e._s(t.noticeName)+"\n ")]),e._v(" "),i("div",{staticClass:"list"},[i("div",{staticClass:"item"},[i("span",[e._v("发布单位:"+e._s(t.publishOrgan?t.publishOrgan:"-"))])]),e._v(" "),i("div",{staticClass:"item"},[i("span",[e._v("发布日期:"+e._s(t.publishDate?t.publishDate:"-"))])]),e._v(" "),i("div",{staticClass:"item"},[i("span",[e._v("有效期:"+e._s(t.validDateBegin?t.validDateBegin:"-")+" 至 "+e._s(t.validDateEnd?t.validDateEnd:"-"))])]),e._v(" "),i("div",{staticClass:"item"},[i("span",[e._v("地区:"+e._s(t.provinceName)+"\n "+e._s(t.cityName?"/"+t.cityName:"")+"\n "+e._s(t.districtName?"/"+t.districtName:"")+"\n "+e._s(t.townName?"/"+t.townName:"")+"\n ")])]),e._v(" "),i("div",{staticClass:"item"},[i("span",[e._v("\n 补助金额:\n "),i("b",{staticStyle:{color:"red"}},[e._v(e._s(t.subsidyPriceMin&&""!==t.subsidyPriceMin?t.subsidyPriceMin/1e4:0)+"\n -\n "+e._s(t.subsidyPriceMax&&""!==t.subsidyPriceMax?t.subsidyPriceMax/1e4:0)+"\n 万元")])])])])])])])])})],2),e._v(" "),i("div",{staticClass:"right float-right text-align-center overflow-x",staticStyle:{width:"17%","min-height":"100px"}},[i("div",{staticClass:"float-left"},[e.allowUpdate.twoAllow?i("el-button",{staticClass:"filter-item border-blue",attrs:{icon:"el-icon-edit",size:"mini"},on:{click:function(n){return e.handleUpdate(t.projectId)}}},[e._v("编辑\n ")]):e._e(),e._v(" "),i("el-button",{staticClass:"filter-item border-blue",staticStyle:{"margin-bottom":"10px"},attrs:{icon:"el-icon-search",size:"mini"},on:{click:function(n){return e.matchingCompany(t.projectId)}}},[e._v("匹配企业\n ")]),e._v(" "),e.allowAddOrder.twoAllow?i("el-button",{staticClass:"filter-item border-blue",staticStyle:{padding:"8px 3px","margin-bottom":"10px"},attrs:{size:"mini"},on:{click:function(n){return e.createFreeOrder(t)}}},[e._v("+创建免费订单\n ")]):e._e()],1)])])}),e._v(" "),i("div",{staticClass:"padding-0",staticStyle:{"margin-top":"20px"}},[e.total-e.list.length>0?i("div",{staticClass:"text-align-center",staticStyle:{height:"40px","line-height":"30px",cursor:"pointer"},on:{click:e.pageDown}},[e._v("点击加载更多\n ")]):i("div",{staticClass:"text-align-center",staticStyle:{height:"40px","line-height":"30px"}},[e._v("没有更多数据了")])])],2),e._v(" "),i("div",{staticStyle:{height:"60px",position:"fixed",bottom:"100px",right:"0",width:"80px"}},[e.btnFlag?i("a",{attrs:{href:"javascript:",target:"_self"},on:{click:e.backTop}},[i("img",{attrs:{src:n("1XGe"),alt:""}})]):e._e()])],1),e._v(" "),i("el-dialog",{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],attrs:{title:"相关企业",visible:e.tableVisiable,width:"800px"},on:{"update:visible":function(t){e.tableVisiable=t}}},[i("div",{staticStyle:{"margin-bottom":"20px"}},[i("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"输入企业名称搜索"},model:{value:e.listEnterpriseQuery.enterpriseName,callback:function(t){e.$set(e.listEnterpriseQuery,"enterpriseName",t)},expression:"listEnterpriseQuery.enterpriseName"}},[i("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(t){return e.getEnterpriseList()}},slot:"append"})],1)],1),e._v(" "),i("el-table",{staticStyle:{width:"100%"},attrs:{data:e.enterpriseList,border:""}},[i("el-table-column",{attrs:{label:"企业名称",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.enterprise__enterprise_name))])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"项目名称",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.project_library__project_name))])]}}])})],1),e._v(" "),i("div",{staticClass:"pagination-container"},[i("el-pagination",{attrs:{background:"","current-page":e.listEnterpriseQuery.page,"page-sizes":[10,20,30,50],"page-size":e.listEnterpriseQuery.limit,layout:"total, sizes, prev, pager, next, jumper",total:e.enterpriseTotal},on:{"size-change":e.enterpriseSizeChange,"current-change":e.enterpriseCurrentChange}})],1),e._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.tableVisiable=!1}}},[e._v("取 消")])],1)],1),e._v(" "),i("el-dialog",{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],attrs:{title:"申报条件",visible:e.conditionVisiable,width:"800px"},on:{"update:visible":function(t){e.conditionVisiable=t}}},[i("el-table",{staticStyle:{width:"100%"},attrs:{data:e.conditionList,border:""}},[i("el-table-column",{attrs:{label:"分类",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.app_label_name))])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"数据表",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.model_name))])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"字段",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.field_zh_name))])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"对比符",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.judge_condition))])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"条件值",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.condition_value))])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"是否统计",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.is_count?"是":"否"))])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"是否必选",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.is_must?"是":"否"))])]}}])})],1),e._v(" "),i("div",{staticClass:"pagination-container"},[i("el-pagination",{attrs:{background:"","current-page":e.listConditionQuery.page,"page-sizes":[10,20,30,50],"page-size":e.listConditionQuery.limit,layout:"total, sizes, prev, pager, next, jumper",total:e.conditionTotal},on:{"size-change":e.conditionSizeChange,"current-change":e.conditionCurrentChange}})],1),e._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.conditionVisiable=!1}}},[e._v("取 消")])],1)],1),e._v(" "),i("el-dialog",{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],attrs:{title:"创建免费订单",visible:e.createVisible,width:"800px","before-close":e.createClose},on:{"update:visible":function(t){e.createVisible=t}}},[i("el-form",{ref:"createForm",attrs:{model:e.createForm,rules:e.createRule}},[i("el-row",[i("el-col",{attrs:{span:20}},[i("el-form-item",{attrs:{label:"项目名称","label-width":"120px"}},[i("span",[e._v(e._s(e.createForm.projectName))])])],1)],1),e._v(" "),i("el-row",[i("el-col",{attrs:{span:20}},[i("el-form-item",{attrs:{label:"选择企业","label-width":"120px",prop:"crmCompanyIdList"}},[i("el-select",{directives:[{name:"loadMore",rawName:"v-loadMore",value:e.loadMore,expression:"loadMore"}],attrs:{multiple:"",remote:"","remote-method":e.companyRemoteMethod,loading:e.loading,filterable:"",placeholder:"请选择企业",size:"small",clearable:""},model:{value:e.createForm.crmCompanyIdList,callback:function(t){e.$set(e.createForm,"crmCompanyIdList",t)},expression:"createForm.crmCompanyIdList"}},e._l(e.enterprise_list,function(e){return i("el-option",{key:e.crmCompanyId,attrs:{label:e.companyName,value:e.crmCompanyId}})}),1)],1)],1)],1),e._v(" "),i("el-row",[i("el-col",{attrs:{span:20}},[i("el-form-item",{attrs:{label:"签订人","label-width":"120px",prop:"signUserId"}},[i("el-select",{attrs:{filterable:"",placeholder:"请选择签订人",size:"small",clearable:""},model:{value:e.createForm.signUserId,callback:function(t){e.$set(e.createForm,"signUserId",t)},expression:"createForm.signUserId"}},e._l(e.user_list,function(e){return i("el-option",{key:e.userId,attrs:{label:e.userName,value:e.userId}})}),1)],1)],1)],1),e._v(" "),i("el-row",[i("el-col",{attrs:{span:20}},[i("el-form-item",{attrs:{label:"签订日期","label-width":"120px",prop:"signDate"}},[i("el-date-picker",{attrs:{size:"small",type:"date","value-format":"yyyy-MM-dd",clearable:"",placeholder:"签订日期"},model:{value:e.createForm.signDate,callback:function(t){e.$set(e.createForm,"signDate",t)},expression:"createForm.signDate"}})],1)],1)],1),e._v(" "),i("el-row",[i("el-col",{attrs:{span:20}},[i("el-form-item",{attrs:{label:"签订公司","label-width":"120px",prop:"signCompanyId"}},[i("el-select",{attrs:{size:"small",placeholder:"我方签约公司",clearable:""},model:{value:e.createForm.signCompanyId,callback:function(t){e.$set(e.createForm,"signCompanyId",t)},expression:"createForm.signCompanyId"}},e._l(e.sign_company_list,function(e){return i("el-option",{key:e.companyId,attrs:{label:e.companyName,value:e.companyId}})}),1)],1)],1)],1)],1),e._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:e.createClose}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.saveCreateOrder("createForm")}}},[e._v("确 定")])],1)],1)],1)},staticRenderFns:[]};var g=n("VU/8")(A,p,!1,function(e){n("dua9")},"data-v-21e74600",null);t.default=g.exports},dbek:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAUCAYAAAATMxqtAAAEBElEQVRYR+2ZT0hUURTGv1tBA4WOUGSQoNFCHKGZKNAUKje6qjQMgoLKVtWmWkaoRMukRe2yghZBglaLyo0a+ScInAkdc1EoJGR/II0ChezGd/WMd968eY7OCNF0QXy+d++57/zud88596mQpPVF9SEAQa2xHxpBpeBP1jcb7muNKShElEIPgEhFQD1281s5b/ZFdRAadwkzG0Cl4WMECqcqAipi24gD2hfVjdBoSmOS7Buq0FQRUM3ieAxo35BugkJj9hFJ32MNXKgsVTdoyQBd2Obh9E1nsQWFELf/PNBhTZhJY+bN+6/x6cvPGC3f+nU4e3w38nJ96B+cwLOed6irLkYokO9JtKX1lXl+saEM3QPj5vpAeaG57hoYR8PREAq35cZssD/7st1pi2Dsw1SC/asX9yfcC49Mov35qOu77Arko7a6GOMT02h96K2hS2fK4M/xpaqSSEWpCqn+EX1Y/0aH16grLUxs8e1UfRDh6CQiI5OxB7y3vSCxGPBy0Gm3rqYYoZL5hXEC5aLZDvK9CNQJ214Y24Y9F4GGox8NXLdGm875liKr1qBWpRI73YAeO1iKB0+G4+agci+fq3RVzPiHqaQvLwM6OkdRWOAH+w5GFxeqaGGR6CAXUZQtQPn31PcZtHeO4nR90Fxfvz2/G5xNVLcaQKHRTKA9UNi3EoVOLzghY4Ml+ThSk7jiVCghsdmg7DkJLS/HZ4B6KTRVoALXnoNqJXCqfBW2PKDxQvUO6W9LFe3Xbr3EzOxcHHPGNsbQp93vMBCeSCmGUoGhwNa4OEmjdK5rYMw46wRgx1BRqD/XZ6B7KVSAMj5LfyfQTG95Fv9UKE8Ai5nARaofP//A6PuvsSdbNm9EyY5N4P2Z2V/mh9udK0/IyRqBeilUgLolICpYgBYV5JlF+duAQmM6pS3vptDlxFA3wHaWT7YAbkmJymO2ZzJKF2iGs/z8ll9pUpJyxwnDrYxhHy91ig2qUFRqxzhJJJJ4+FtCgYy1ExFLo2/fZ4wtO1uv9pY3SWmlZdNKgNrx06lQO0vLAkiCohIJleqsKi9Ce+dbA1TGsD9Va5dcvGeXa86acjWyvCmbOHHvsGaFvzPZ1nMrmzIFlIcBKXHsolugyTtRaUXb/OYgIKHAuQj2+8uOkB1DH8S+JMJMbnkNvKksVcGUjp6JJ6W1OF0fwp22cFz237J5A86f2ONVgcWeecVQwqMS5dREOEx4hOkMH05VSqioKi+M9ZdJOScXQU5KGc3y9tGTE6YSS1MilYWdEj6OCIP/UJevBhsmR7t+YNYa97xi6vKn/fdGMGYqhZOeH5htt032nzNfoPg5J7hU8f/vIXN4pDHNf30A6FFrEdlboh65+fwHEWqx8RKCagkAAAAASUVORK5CYII="},dua9:function(e,t,n){var i=n("kRp2");"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);n("rjj0")("121baf29",i,!0)},kRp2:function(e,t,n){(e.exports=n("FZ+f")(!0)).push([e.i,'\n.body[data-v-21e74600] {\n width: 100%;\n height: 100px;\n overflow-y: hidden;\n font-size: 12px;\n}\n.overflow-x[data-v-21e74600] {\n overflow-x: hidden;\n}\n.overflow-y[data-v-21e74600] {\n overflow-y: hidden;\n}\n.width-0-15[data-v-21e74600] {\n width: 15%;\n height: 18px;\n line-height: 18px;\n overflow-y: hidden;\n overflow-x: hidden;\n}\n.zy[data-v-21e74600] {\n width: 65%;\n height: 18px;\n line-height: 18px;\n}\n.bg_zy[data-v-21e74600] {\n padding: 2px 10px;\n background-color: #DEE6FF;\n color: #88A0E9;\n}\n.color-05[data-v-21e74600] {\n color: #05AAFF;\n}\n.color-F5[data-v-21e74600] {\n color: #F56C6C;\n}\n.line-height-20[data-v-21e74600] {\n height: 20px;\n line-height: 20px;\n}\n.inline-block[data-v-21e74600] {\n display: inline-block;\n}\n.text-align-center[data-v-21e74600] {\n text-align: center;\n}\n.hover_cursor[data-v-21e74600] {\n cursor: pointer;\n}\n.top-margin-10[data-v-21e74600] {\n margin-top: 10px;\n}\n.top-bottom-10[data-v-21e74600] {\n margin-bottom: 10px;\n}\n.left-margin-10[data-v-21e74600] {\n margin-left: 10px;\n}\n.right-margin-10[data-v-21e74600] {\n margin-right: 10px;\n}\n.padding-0[data-v-21e74600] {\n padding: 0;\n}\n.padding-10[data-v-21e74600] {\n padding: 10px;\n}\n.hot-search[data-v-21e74600] {\n width: 48px;\n height: 17px;\n font-family: PingFang SC;\n font-weight: 400;\n line-height: 17px;\n color: #042b40;\n opacity: 1;\n}\n.hot-search-kw[data-v-21e74600] {\n margin: auto 10px;\n width: 24px;\n height: 16px;\n font-size: 12px;\n font-family: Microsoft YaHei;\n font-weight: 400;\n line-height: 16px;\n color: #979797;\n opacity: 1;\n}\n.center-items[data-v-21e74600] {\n text-align: center;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.row-width-auto-margin-0-96[data-v-21e74600] {\n width: auto;\n margin: auto 2%;\n min-width: 1000px;\n}\n.search-background[data-v-21e74600] {\n background-color: #3ABBFD;\n border: none;\n color: white;\n}\n.float-right[data-v-21e74600] {\n float: right;\n}\n.float-left[data-v-21e74600] {\n float: left;\n}\n.padding-vertical-5[data-v-21e74600] {\n padding: 5px 0;\n}\n.padding-vertical-10[data-v-21e74600] {\n padding: 10px 0;\n}\n.padding-level-10[data-v-21e74600] {\n padding: 0 10px;\n}\n.bg_orange[data-v-21e74600] {\n background: #FD903C;\n color: #fff;\n}\n.bg_orange[data-v-21e74600]:hover {\n background: #FD903C;\n opacity: 0.5;\n}\n.bg_gray[data-v-21e74600] {\n background: #b4b4b4;\n color: #ffffff;\n}\n.bg_gray[data-v-21e74600]:hover {\n background: rgba(180, 180, 180, 0.5);\n}\n.bg_blue[data-v-21e74600] {\n background: #05AAFF;\n color: #fff;\n}\n.bg_blue[data-v-21e74600]:hover {\n background: #05AAFF;\n opacity: 0.5;\n}\n.bg_pale_blue[data-v-21e74600] {\n background: #69ccff;\n color: #ffffff;\n}\n.bg_pale_blue[data-v-21e74600]:hover {\n background: rgba(105, 204, 255, 0.5);\n}\n.bg_pale_green[data-v-21e74600] {\n background: #91e5a1;\n color: #ffffff;\n}\n.bg_pale_green[data-v-21e74600]:hover {\n background: rgba(145, 229, 161, 0.5);\n}\n.bg_pale_yellow[data-v-21e74600] {\n background: #ffcba6;\n color: #ffffff;\n}\n.bg_pale_yellow[data-v-21e74600]:hover {\n background: rgba(255, 203, 166, 0.5);\n}\n.bg_pale_pink[data-v-21e74600] {\n background: #fe95b2;\n color: #ffffff;\n}\n.bg_pale_pink[data-v-21e74600]:hover {\n background: rgba(254, 149, 178, 0.5);\n}\n.bg_pale_violet[data-v-21e74600] {\n background: #9bb5ff;\n color: #ffffff;\n}\n.bg_pale_violet[data-v-21e74600]:hover {\n background: rgba(155, 181, 255, 0.5);\n}\n.bg_pale_orange[data-v-21e74600] {\n background: #ffba88;\n color: #ffffff;\n}\n.bg_pale_orange[data-v-21e74600]:hover {\n background: rgba(255, 186, 136, 0.5);\n}\n.bg_pale_violet[data-v-21e74600] {\n background: #799cff;\n color: #ffffff;\n}\n.bg_pale_violet[data-v-21e74600]:hover {\n background: rgba(121, 156, 255, 0.5);\n}\n.ent_shorthand[data-v-21e74600] {\n width: 60px;\n min-width: 60px;\n height: 60px;\n font-size: 16px;\n color: #f0f7ff;\n margin-left: 15px;\n margin-right: 11px;\n border-radius: 4px;\n word-break: break-all;\n overflow: hidden;\n}\n[data-v-21e74600] .el-dialog__header {\n background: #05AAFF;\n padding: 20px;\n margin-bottom: 20px;\n}\n[data-v-21e74600] .el-dialog__header /deep/ .el-dialog__title {\n color: #fff;\n font-size: 16px;\n}\n[data-v-21e74600] .el-dialog__header /deep/ .el-dialog__headerbtn {\n border-radius: 50%;\n background: #fff;\n padding: 4px;\n font-size: 12px;\n font-weight: 400;\n}\n[data-v-21e74600] .el-dialog__header /deep/ .el-dialog__headerbtn /deep/ .el-dialog__close {\n color: #05AAFF;\n}\n[data-v-21e74600] .el-dialog__footer {\n text-align: center;\n}\n[data-v-21e74600] .el-dialog__footer /deep/ .el-button {\n border-radius: 2px;\n height: 36px;\n line-height: 36px;\n padding: 0 20px;\n}\ninput[type="checkbox"][data-v-21e74600] {\n width: 15px;\n height: 15px;\n display: inline-block;\n text-align: center;\n vertical-align: middle;\n line-height: 15px;\n position: relative;\n}\ninput[type="checkbox"][data-v-21e74600]::before {\n content: "";\n position: absolute;\n top: 0;\n left: 0;\n background: #fff;\n width: 100%;\n height: 100%;\n border: 1px solid #d9d9d9;\n}\ninput[type="checkbox"][data-v-21e74600]:checked::before {\n content: "\\2713";\n background-color: #05AAFF;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n border: 1px solid #05AAFF;\n color: #ffffff;\n font-size: 15px;\n font-weight: bold;\n}\n/*--------------------------------*/\n.search-bar .search[data-v-21e74600] .el-input__inner {\n border: 1px solid #05AAFF;\n border-radius: 0;\n height: 38px;\n border-right: 0;\n}\n.search-bar .search-btn[data-v-21e74600] {\n border-radius: 0;\n background: -webkit-gradient(linear, left top, left bottom, from(#69ccff), to(#05aaff));\n background: linear-gradient(180deg, #69ccff 0%, #05aaff 100%);\n color: #fff;\n}\n.search-bar .search-btn.search-btn[data-v-21e74600]:hover {\n background: -webkit-gradient(linear, left top, left bottom, from(rgba(105, 204, 255, 0.5)), to(rgba(5, 170, 255, 0.5)));\n background: linear-gradient(180deg, rgba(105, 204, 255, 0.5) 0%, rgba(5, 170, 255, 0.5) 100%);\n}\n.search-bar .add-btn[data-v-21e74600] {\n border: 0;\n border-radius: 2px;\n height: 38px;\n}\n.screen-bar[data-v-21e74600] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.screen-bar .left[data-v-21e74600] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.screen-bar .left .screen-title[data-v-21e74600] {\n white-space: nowrap;\n margin-top: 3px;\n}\n.screen-bar .left .screen-title .tag[data-v-21e74600] {\n display: inline-block;\n width: 3px;\n height: 14px;\n background: #03ADF4;\n vertical-align: middle;\n margin-top: -2px;\n}\n.screen-bar .left .screen-list[data-v-21e74600] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.screen-bar .left .screen-list .item[data-v-21e74600] {\n border: 1px solid #33B3EE;\n font-size: 12px;\n color: #33B3EE;\n padding-left: 5px;\n padding-right: 2px;\n margin-bottom: 10px;\n}\n.screen-bar .left .screen-list .screen-clear[data-v-21e74600] {\n cursor: pointer;\n border: 1px solid #ff0000;\n font-size: 12px;\n color: #ff0000;\n padding-left: 5px;\n padding-right: 2px;\n margin-bottom: 10px;\n}\n.screen-bar .right[data-v-21e74600] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.screen-bar .right img[data-v-21e74600] {\n margin-right: 4px;\n}\n.get-search-bar .tag[data-v-21e74600] {\n display: inline-block;\n width: 3px;\n height: 14px;\n background: #FFA96A;\n margin-right: 5px;\n vertical-align: middle;\n margin-top: -2px;\n}\n.get-search-bar .btn-item[data-v-21e74600] {\n border: 1px solid #05AAFF;\n color: #05AAFF;\n}\n.get-search-bar .select-item[data-v-21e74600] .el-input__inner {\n border: 0;\n color: #05AAFF;\n text-align: right;\n font-size: 14px;\n}\n.list-bar[data-v-21e74600] {\n width: 100%;\n min-width: 1000px;\n padding-bottom: 20px;\n border-bottom: 2px solid #F1F0F2;\n padding-left: 8px;\n}\n.list-bar .left[data-v-21e74600] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.list-bar .left .check[data-v-21e74600] {\n cursor: pointer;\n margin-top: 24%;\n}\n.list-bar .right[data-v-21e74600] {\n width: 10%;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n.list-bar .right .border-blue[data-v-21e74600] {\n border: 1px solid #05AAFF;\n color: #05AAFF;\n}\n.list-bar .right .border-blue[data-v-21e74600]:hover {\n background: none;\n}\n.list-bar .right .border_pink[data-v-21e74600] {\n border: 1px solid #fe95b2;\n color: #fe95b2;\n}\n.list-bar .right .border_pink[data-v-21e74600]:hover {\n background: none;\n}\n.list-bar .right .border_yellow[data-v-21e74600] {\n border: 1px solid #ffcba6;\n color: #ffcba6;\n}\n.list-bar .right .border_yellow[data-v-21e74600]:hover {\n background: none;\n}\n.list-bar .right .border_violet[data-v-21e74600] {\n border: 1px solid #9bb5ff;\n color: #9bb5ff;\n}\n.list-bar .right .border_violet[data-v-21e74600]:hover {\n background: none;\n}\n.inline-list .list-num[data-v-21e74600] {\n min-width: 20px;\n height: 20px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n margin-top: -2px;\n}\n.inline-list .policy[data-v-21e74600] {\n font-size: 15px;\n color: #05AAFF;\n margin-bottom: 8px;\n cursor: pointer;\n}\n.inline-list .list[data-v-21e74600] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.inline-list .list .item[data-v-21e74600] {\n margin-right: 40px;\n margin-bottom: 10px;\n}\n.is-overdue[data-v-21e74600] {\n color: #ccc !important;\n}\n.is-overdue .policy[data-v-21e74600] {\n color: #ccc !important;\n}\n',"",{version:3,sources:["H:/java/chengguoyun-web/src/views/policy/projectManage/index.vue"],names:[],mappings:";AACA;EACE,YAAY;EACZ,cAAc;EACd,mBAAmB;EACnB,gBAAgB;CACjB;AACD;EACE,mBAAmB;CACpB;AACD;EACE,mBAAmB;CACpB;AACD;EACE,WAAW;EACX,aAAa;EACb,kBAAkB;EAClB,mBAAmB;EACnB,mBAAmB;CACpB;AACD;EACE,WAAW;EACX,aAAa;EACb,kBAAkB;CACnB;AACD;EACE,kBAAkB;EAClB,0BAA0B;EAC1B,eAAe;CAChB;AACD;EACE,eAAe;CAChB;AACD;EACE,eAAe;CAChB;AACD;EACE,aAAa;EACb,kBAAkB;CACnB;AACD;EACE,sBAAsB;CACvB;AACD;EACE,mBAAmB;CACpB;AACD;EACE,gBAAgB;CACjB;AACD;EACE,iBAAiB;CAClB;AACD;EACE,oBAAoB;CACrB;AACD;EACE,kBAAkB;CACnB;AACD;EACE,mBAAmB;CACpB;AACD;EACE,WAAW;CACZ;AACD;EACE,cAAc;CACf;AACD;EACE,YAAY;EACZ,aAAa;EACb,yBAAyB;EACzB,iBAAiB;EACjB,kBAAkB;EAClB,eAAe;EACf,WAAW;CACZ;AACD;EACE,kBAAkB;EAClB,YAAY;EACZ,aAAa;EACb,gBAAgB;EAChB,6BAA6B;EAC7B,iBAAiB;EACjB,kBAAkB;EAClB,eAAe;EACf,WAAW;CACZ;AACD;EACE,mBAAmB;EACnB,qBAAqB;EACrB,qBAAqB;EACrB,cAAc;EACd,yBAAyB;MACrB,sBAAsB;UAClB,wBAAwB;EAChC,0BAA0B;MACtB,uBAAuB;UACnB,oBAAoB;CAC7B;AACD;EACE,YAAY;EACZ,gBAAgB;EAChB,kBAAkB;CACnB;AACD;EACE,0BAA0B;EAC1B,aAAa;EACb,aAAa;CACd;AACD;EACE,aAAa;CACd;AACD;EACE,YAAY;CACb;AACD;EACE,eAAe;CAChB;AACD;EACE,gBAAgB;CACjB;AACD;EACE,gBAAgB;CACjB;AACD;EACE,oBAAoB;EACpB,YAAY;CACb;AACD;EACE,oBAAoB;EACpB,aAAa;CACd;AACD;EACE,oBAAoB;EACpB,eAAe;CAChB;AACD;EACE,qCAAqC;CACtC;AACD;EACE,oBAAoB;EACpB,YAAY;CACb;AACD;EACE,oBAAoB;EACpB,aAAa;CACd;AACD;EACE,oBAAoB;EACpB,eAAe;CAChB;AACD;EACE,qCAAqC;CACtC;AACD;EACE,oBAAoB;EACpB,eAAe;CAChB;AACD;EACE,qCAAqC;CACtC;AACD;EACE,oBAAoB;EACpB,eAAe;CAChB;AACD;EACE,qCAAqC;CACtC;AACD;EACE,oBAAoB;EACpB,eAAe;CAChB;AACD;EACE,qCAAqC;CACtC;AACD;EACE,oBAAoB;EACpB,eAAe;CAChB;AACD;EACE,qCAAqC;CACtC;AACD;EACE,oBAAoB;EACpB,eAAe;CAChB;AACD;EACE,qCAAqC;CACtC;AACD;EACE,oBAAoB;EACpB,eAAe;CAChB;AACD;EACE,qCAAqC;CACtC;AACD;EACE,YAAY;EACZ,gBAAgB;EAChB,aAAa;EACb,gBAAgB;EAChB,eAAe;EACf,kBAAkB;EAClB,mBAAmB;EACnB,mBAAmB;EACnB,sBAAsB;EACtB,iBAAiB;CAClB;AACD;EACE,oBAAoB;EACpB,cAAc;EACd,oBAAoB;CACrB;AACD;EACE,YAAY;EACZ,gBAAgB;CACjB;AACD;EACE,mBAAmB;EACnB,iBAAiB;EACjB,aAAa;EACb,gBAAgB;EAChB,iBAAiB;CAClB;AACD;EACE,eAAe;CAChB;AACD;EACE,mBAAmB;CACpB;AACD;EACE,mBAAmB;EACnB,aAAa;EACb,kBAAkB;EAClB,gBAAgB;CACjB;AACD;EACE,YAAY;EACZ,aAAa;EACb,sBAAsB;EACtB,mBAAmB;EACnB,uBAAuB;EACvB,kBAAkB;EAClB,mBAAmB;CACpB;AACD;EACE,YAAY;EACZ,mBAAmB;EACnB,OAAO;EACP,QAAQ;EACR,iBAAiB;EACjB,YAAY;EACZ,aAAa;EACb,0BAA0B;CAC3B;AACD;EACE,iBAAiB;EACjB,0BAA0B;EAC1B,mBAAmB;EACnB,OAAO;EACP,QAAQ;EACR,YAAY;EACZ,0BAA0B;EAC1B,eAAe;EACf,gBAAgB;EAChB,kBAAkB;CACnB;AACD,oCAAoC;AACpC;EACE,0BAA0B;EAC1B,iBAAiB;EACjB,aAAa;EACb,gBAAgB;CACjB;AACD;EACE,iBAAiB;EACjB,wFAAwF;EACxF,8DAA8D;EAC9D,YAAY;CACb;AACD;EACE,wHAAwH;EACxH,8FAA8F;CAC/F;AACD;EACE,UAAU;EACV,mBAAmB;EACnB,aAAa;CACd;AACD;EACE,qBAAqB;EACrB,qBAAqB;EACrB,cAAc;EACd,0BAA0B;MACtB,uBAAuB;UACnB,+BAA+B;EACvC,yBAAyB;MACrB,sBAAsB;UAClB,wBAAwB;CACjC;AACD;EACE,qBAAqB;EACrB,qBAAqB;EACrB,cAAc;CACf;AACD;EACE,oBAAoB;EACpB,gBAAgB;CACjB;AACD;EACE,sBAAsB;EACtB,WAAW;EACX,aAAa;EACb,oBAAoB;EACpB,uBAAuB;EACvB,iBAAiB;CAClB;AACD;EACE,qBAAqB;EACrB,qBAAqB;EACrB,cAAc;EACd,oBAAoB;MAChB,gBAAgB;CACrB;AACD;EACE,0BAA0B;EAC1B,gBAAgB;EAChB,eAAe;EACf,kBAAkB;EAClB,mBAAmB;EACnB,oBAAoB;CACrB;AACD;EACE,gBAAgB;EAChB,0BAA0B;EAC1B,gBAAgB;EAChB,eAAe;EACf,kBAAkB;EAClB,mBAAmB;EACnB,oBAAoB;CACrB;AACD;EACE,qBAAqB;EACrB,qBAAqB;EACrB,cAAc;EACd,0BAA0B;MACtB,uBAAuB;UACnB,oBAAoB;CAC7B;AACD;EACE,kBAAkB;CACnB;AACD;EACE,sBAAsB;EACtB,WAAW;EACX,aAAa;EACb,oBAAoB;EACpB,kBAAkB;EAClB,uBAAuB;EACvB,iBAAiB;CAClB;AACD;EACE,0BAA0B;EAC1B,eAAe;CAChB;AACD;EACE,UAAU;EACV,eAAe;EACf,kBAAkB;EAClB,gBAAgB;CACjB;AACD;EACE,YAAY;EACZ,kBAAkB;EAClB,qBAAqB;EACrB,iCAAiC;EACjC,kBAAkB;CACnB;AACD;EACE,qBAAqB;EACrB,qBAAqB;EACrB,cAAc;EACd,0BAA0B;MACtB,uBAAuB;UACnB,oBAAoB;CAC7B;AACD;EACE,gBAAgB;EAChB,gBAAgB;CACjB;AACD;EACE,WAAW;EACX,qBAAqB;EACrB,qBAAqB;EACrB,cAAc;EACd,sBAAsB;MAClB,mBAAmB;UACf,0BAA0B;CACnC;AACD;EACE,0BAA0B;EAC1B,eAAe;CAChB;AACD;EACE,iBAAiB;CAClB;AACD;EACE,0BAA0B;EAC1B,eAAe;CAChB;AACD;EACE,iBAAiB;CAClB;AACD;EACE,0BAA0B;EAC1B,eAAe;CAChB;AACD;EACE,iBAAiB;CAClB;AACD;EACE,0BAA0B;EAC1B,eAAe;CAChB;AACD;EACE,iBAAiB;CAClB;AACD;EACE,gBAAgB;EAChB,aAAa;EACb,qBAAqB;EACrB,qBAAqB;EACrB,cAAc;EACd,0BAA0B;MACtB,uBAAuB;UACnB,oBAAoB;EAC5B,yBAAyB;MACrB,sBAAsB;UAClB,wBAAwB;EAChC,iBAAiB;CAClB;AACD;EACE,gBAAgB;EAChB,eAAe;EACf,mBAAmB;EACnB,gBAAgB;CACjB;AACD;EACE,qBAAqB;EACrB,qBAAqB;EACrB,cAAc;EACd,oBAAoB;MAChB,gBAAgB;CACrB;AACD;EACE,mBAAmB;EACnB,oBAAoB;CACrB;AACD;EACE,uBAAuB;CACxB;AACD;EACE,uBAAuB;CACxB",file:"index.vue",sourcesContent:['\n.body[data-v-21e74600] {\n width: 100%;\n height: 100px;\n overflow-y: hidden;\n font-size: 12px;\n}\n.overflow-x[data-v-21e74600] {\n overflow-x: hidden;\n}\n.overflow-y[data-v-21e74600] {\n overflow-y: hidden;\n}\n.width-0-15[data-v-21e74600] {\n width: 15%;\n height: 18px;\n line-height: 18px;\n overflow-y: hidden;\n overflow-x: hidden;\n}\n.zy[data-v-21e74600] {\n width: 65%;\n height: 18px;\n line-height: 18px;\n}\n.bg_zy[data-v-21e74600] {\n padding: 2px 10px;\n background-color: #DEE6FF;\n color: #88A0E9;\n}\n.color-05[data-v-21e74600] {\n color: #05AAFF;\n}\n.color-F5[data-v-21e74600] {\n color: #F56C6C;\n}\n.line-height-20[data-v-21e74600] {\n height: 20px;\n line-height: 20px;\n}\n.inline-block[data-v-21e74600] {\n display: inline-block;\n}\n.text-align-center[data-v-21e74600] {\n text-align: center;\n}\n.hover_cursor[data-v-21e74600] {\n cursor: pointer;\n}\n.top-margin-10[data-v-21e74600] {\n margin-top: 10px;\n}\n.top-bottom-10[data-v-21e74600] {\n margin-bottom: 10px;\n}\n.left-margin-10[data-v-21e74600] {\n margin-left: 10px;\n}\n.right-margin-10[data-v-21e74600] {\n margin-right: 10px;\n}\n.padding-0[data-v-21e74600] {\n padding: 0;\n}\n.padding-10[data-v-21e74600] {\n padding: 10px;\n}\n.hot-search[data-v-21e74600] {\n width: 48px;\n height: 17px;\n font-family: PingFang SC;\n font-weight: 400;\n line-height: 17px;\n color: #042b40;\n opacity: 1;\n}\n.hot-search-kw[data-v-21e74600] {\n margin: auto 10px;\n width: 24px;\n height: 16px;\n font-size: 12px;\n font-family: Microsoft YaHei;\n font-weight: 400;\n line-height: 16px;\n color: #979797;\n opacity: 1;\n}\n.center-items[data-v-21e74600] {\n text-align: center;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.row-width-auto-margin-0-96[data-v-21e74600] {\n width: auto;\n margin: auto 2%;\n min-width: 1000px;\n}\n.search-background[data-v-21e74600] {\n background-color: #3ABBFD;\n border: none;\n color: white;\n}\n.float-right[data-v-21e74600] {\n float: right;\n}\n.float-left[data-v-21e74600] {\n float: left;\n}\n.padding-vertical-5[data-v-21e74600] {\n padding: 5px 0;\n}\n.padding-vertical-10[data-v-21e74600] {\n padding: 10px 0;\n}\n.padding-level-10[data-v-21e74600] {\n padding: 0 10px;\n}\n.bg_orange[data-v-21e74600] {\n background: #FD903C;\n color: #fff;\n}\n.bg_orange[data-v-21e74600]:hover {\n background: #FD903C;\n opacity: 0.5;\n}\n.bg_gray[data-v-21e74600] {\n background: #b4b4b4;\n color: #ffffff;\n}\n.bg_gray[data-v-21e74600]:hover {\n background: rgba(180, 180, 180, 0.5);\n}\n.bg_blue[data-v-21e74600] {\n background: #05AAFF;\n color: #fff;\n}\n.bg_blue[data-v-21e74600]:hover {\n background: #05AAFF;\n opacity: 0.5;\n}\n.bg_pale_blue[data-v-21e74600] {\n background: #69ccff;\n color: #ffffff;\n}\n.bg_pale_blue[data-v-21e74600]:hover {\n background: rgba(105, 204, 255, 0.5);\n}\n.bg_pale_green[data-v-21e74600] {\n background: #91e5a1;\n color: #ffffff;\n}\n.bg_pale_green[data-v-21e74600]:hover {\n background: rgba(145, 229, 161, 0.5);\n}\n.bg_pale_yellow[data-v-21e74600] {\n background: #ffcba6;\n color: #ffffff;\n}\n.bg_pale_yellow[data-v-21e74600]:hover {\n background: rgba(255, 203, 166, 0.5);\n}\n.bg_pale_pink[data-v-21e74600] {\n background: #fe95b2;\n color: #ffffff;\n}\n.bg_pale_pink[data-v-21e74600]:hover {\n background: rgba(254, 149, 178, 0.5);\n}\n.bg_pale_violet[data-v-21e74600] {\n background: #9bb5ff;\n color: #ffffff;\n}\n.bg_pale_violet[data-v-21e74600]:hover {\n background: rgba(155, 181, 255, 0.5);\n}\n.bg_pale_orange[data-v-21e74600] {\n background: #ffba88;\n color: #ffffff;\n}\n.bg_pale_orange[data-v-21e74600]:hover {\n background: rgba(255, 186, 136, 0.5);\n}\n.bg_pale_violet[data-v-21e74600] {\n background: #799cff;\n color: #ffffff;\n}\n.bg_pale_violet[data-v-21e74600]:hover {\n background: rgba(121, 156, 255, 0.5);\n}\n.ent_shorthand[data-v-21e74600] {\n width: 60px;\n min-width: 60px;\n height: 60px;\n font-size: 16px;\n color: #f0f7ff;\n margin-left: 15px;\n margin-right: 11px;\n border-radius: 4px;\n word-break: break-all;\n overflow: hidden;\n}\n[data-v-21e74600] .el-dialog__header {\n background: #05AAFF;\n padding: 20px;\n margin-bottom: 20px;\n}\n[data-v-21e74600] .el-dialog__header /deep/ .el-dialog__title {\n color: #fff;\n font-size: 16px;\n}\n[data-v-21e74600] .el-dialog__header /deep/ .el-dialog__headerbtn {\n border-radius: 50%;\n background: #fff;\n padding: 4px;\n font-size: 12px;\n font-weight: 400;\n}\n[data-v-21e74600] .el-dialog__header /deep/ .el-dialog__headerbtn /deep/ .el-dialog__close {\n color: #05AAFF;\n}\n[data-v-21e74600] .el-dialog__footer {\n text-align: center;\n}\n[data-v-21e74600] .el-dialog__footer /deep/ .el-button {\n border-radius: 2px;\n height: 36px;\n line-height: 36px;\n padding: 0 20px;\n}\ninput[type="checkbox"][data-v-21e74600] {\n width: 15px;\n height: 15px;\n display: inline-block;\n text-align: center;\n vertical-align: middle;\n line-height: 15px;\n position: relative;\n}\ninput[type="checkbox"][data-v-21e74600]::before {\n content: "";\n position: absolute;\n top: 0;\n left: 0;\n background: #fff;\n width: 100%;\n height: 100%;\n border: 1px solid #d9d9d9;\n}\ninput[type="checkbox"][data-v-21e74600]:checked::before {\n content: "\\2713";\n background-color: #05AAFF;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n border: 1px solid #05AAFF;\n color: #ffffff;\n font-size: 15px;\n font-weight: bold;\n}\n/*--------------------------------*/\n.search-bar .search[data-v-21e74600] .el-input__inner {\n border: 1px solid #05AAFF;\n border-radius: 0;\n height: 38px;\n border-right: 0;\n}\n.search-bar .search-btn[data-v-21e74600] {\n border-radius: 0;\n background: -webkit-gradient(linear, left top, left bottom, from(#69ccff), to(#05aaff));\n background: linear-gradient(180deg, #69ccff 0%, #05aaff 100%);\n color: #fff;\n}\n.search-bar .search-btn.search-btn[data-v-21e74600]:hover {\n background: -webkit-gradient(linear, left top, left bottom, from(rgba(105, 204, 255, 0.5)), to(rgba(5, 170, 255, 0.5)));\n background: linear-gradient(180deg, rgba(105, 204, 255, 0.5) 0%, rgba(5, 170, 255, 0.5) 100%);\n}\n.search-bar .add-btn[data-v-21e74600] {\n border: 0;\n border-radius: 2px;\n height: 38px;\n}\n.screen-bar[data-v-21e74600] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.screen-bar .left[data-v-21e74600] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.screen-bar .left .screen-title[data-v-21e74600] {\n white-space: nowrap;\n margin-top: 3px;\n}\n.screen-bar .left .screen-title .tag[data-v-21e74600] {\n display: inline-block;\n width: 3px;\n height: 14px;\n background: #03ADF4;\n vertical-align: middle;\n margin-top: -2px;\n}\n.screen-bar .left .screen-list[data-v-21e74600] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.screen-bar .left .screen-list .item[data-v-21e74600] {\n border: 1px solid #33B3EE;\n font-size: 12px;\n color: #33B3EE;\n padding-left: 5px;\n padding-right: 2px;\n margin-bottom: 10px;\n}\n.screen-bar .left .screen-list .screen-clear[data-v-21e74600] {\n cursor: pointer;\n border: 1px solid #ff0000;\n font-size: 12px;\n color: #ff0000;\n padding-left: 5px;\n padding-right: 2px;\n margin-bottom: 10px;\n}\n.screen-bar .right[data-v-21e74600] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.screen-bar .right img[data-v-21e74600] {\n margin-right: 4px;\n}\n.get-search-bar .tag[data-v-21e74600] {\n display: inline-block;\n width: 3px;\n height: 14px;\n background: #FFA96A;\n margin-right: 5px;\n vertical-align: middle;\n margin-top: -2px;\n}\n.get-search-bar .btn-item[data-v-21e74600] {\n border: 1px solid #05AAFF;\n color: #05AAFF;\n}\n.get-search-bar .select-item[data-v-21e74600] .el-input__inner {\n border: 0;\n color: #05AAFF;\n text-align: right;\n font-size: 14px;\n}\n.list-bar[data-v-21e74600] {\n width: 100%;\n min-width: 1000px;\n padding-bottom: 20px;\n border-bottom: 2px solid #F1F0F2;\n padding-left: 8px;\n}\n.list-bar .left[data-v-21e74600] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.list-bar .left .check[data-v-21e74600] {\n cursor: pointer;\n margin-top: 24%;\n}\n.list-bar .right[data-v-21e74600] {\n width: 10%;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n.list-bar .right .border-blue[data-v-21e74600] {\n border: 1px solid #05AAFF;\n color: #05AAFF;\n}\n.list-bar .right .border-blue[data-v-21e74600]:hover {\n background: none;\n}\n.list-bar .right .border_pink[data-v-21e74600] {\n border: 1px solid #fe95b2;\n color: #fe95b2;\n}\n.list-bar .right .border_pink[data-v-21e74600]:hover {\n background: none;\n}\n.list-bar .right .border_yellow[data-v-21e74600] {\n border: 1px solid #ffcba6;\n color: #ffcba6;\n}\n.list-bar .right .border_yellow[data-v-21e74600]:hover {\n background: none;\n}\n.list-bar .right .border_violet[data-v-21e74600] {\n border: 1px solid #9bb5ff;\n color: #9bb5ff;\n}\n.list-bar .right .border_violet[data-v-21e74600]:hover {\n background: none;\n}\n.inline-list .list-num[data-v-21e74600] {\n min-width: 20px;\n height: 20px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n margin-top: -2px;\n}\n.inline-list .policy[data-v-21e74600] {\n font-size: 15px;\n color: #05AAFF;\n margin-bottom: 8px;\n cursor: pointer;\n}\n.inline-list .list[data-v-21e74600] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.inline-list .list .item[data-v-21e74600] {\n margin-right: 40px;\n margin-bottom: 10px;\n}\n.is-overdue[data-v-21e74600] {\n color: #ccc !important;\n}\n.is-overdue .policy[data-v-21e74600] {\n color: #ccc !important;\n}\n'],sourceRoot:""}])}}); //# sourceMappingURL=9.f4574a7f4ff400e49462.js.map
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ var AbstractPlugin = require("../AbstractPlugin"); var RequireIncludeDependency = require("./RequireIncludeDependency"); module.exports = AbstractPlugin.create({ "call require.include": function(expr) { if(expr.arguments.length !== 1) return; var param = this.evaluateExpression(expr.arguments[0]); if(!param.isString()) return; var dep = new RequireIncludeDependency(param.string, expr.range); dep.loc = expr.loc; this.state.current.addDependency(dep); return true; } });
/** * baserCMS : Based Website Development Project <http://basercms.net> * Copyright (c) baserCMS Users Community <http://basercms.net/community/> * * @copyright Copyright (c) baserCMS Users Community * @link http://basercms.net baserCMS Project * @since baserCMS v 2.0.0 * @license http://basercms.net/license/index.html */ /** * baserAjaxDataList 設定 */ $.extend($.baserAjaxDataList.config, { methods : { /** * 削除 */ del: { button: '.btn-delete', confirm: bcI18n.commonConfirmHardDeleteMessage, result: function(row, result) { var config = $.baserAjaxDataList.config; if(result) { $.baserAjaxDataList.load(document.location.href); } else { $(config.alertBox).html(bcI18n.commonDeleteFailedMessage); $(config.alertBox).fadeIn(500); } } }, /** * コピー */ copy: { button: '.btn-copy', confirm: '', result: function(row, result) { var config = $.baserAjaxDataList.config; if(result) { $(config.pageTotalNum).html(Number($(config.pageTotalNum).html()) + 1); $(config.pageEndNum).html(Number($(config.pageEndNum).html()) + 1); row.after(result); $.baserAjaxDataList.initList(); // row.next().hide().fadeIn(300, function(){ // $(config.dataList+" tbody tr").removeClass('even odd'); // $.yuga.stripe(); // }); } else { $(config.alertBox).html(bcI18n.commonCopyFailedMessage); $(config.alertBox).fadeIn(500); } } }, /** * 公開処理 */ publish: { button: '.btn-publish', confirm: '', result: function(row, result) { var config = $.baserAjaxDataList.config; if(result) { row.removeClass('disablerow'); row.removeClass('unpublish'); row.addClass('publish'); row.find('.status').html('○'); $.baserAjaxDataList.config.methods.unpublish.initList(); $.baserAjaxDataList.config.methods.publish.initList(); } else { $(config.alertBox).html(bcI18n.commonPublishFailedMessage); $(config.alertBox).fadeIn(500); } }, initList: function() { var config = $.baserAjaxDataList.config; $(config.dataList+" tbody tr .btn-publish").hide(); $(config.dataList+" tbody tr.unpublish .btn-publish").show(); } }, /** * 非公開処理 */ unpublish: { button: '.btn-unpublish', confirm: '', result: function(row, result) { var config = $.baserAjaxDataList.config; if(result) { row.removeClass('publish'); row.addClass('disablerow'); row.addClass('unpublish'); row.find('.status').html('―'); $.baserAjaxDataList.config.methods.unpublish.initList(); $.baserAjaxDataList.config.methods.publish.initList(); } else { $(config.alertBox).html(bcI18n.commonUnpublishFailedMessage); $(config.alertBox).fadeIn(500); } }, initList: function() { var config = $.baserAjaxDataList.config; $(config.dataList+" tbody tr .btn-unpublish").hide(); $(config.dataList+" tbody tr.publish .btn-unpublish").show(); } } } });
(function(){ var currentScript = document.currentScript; if (!currentScript || !currentScript.parentNode) { var scripts = document.getElementsByTagName("script"); for (var i = 0, n = scripts.length; i < n; i++) { var s = scripts[i]; if (!s.processed && -1 != s.src.indexOf('meteo_widget.js')) { s.processed = true; currentScript = s; break; } } } if (!currentScript || !currentScript.parentNode) { return; } var id = currentScript.src.split('?')[1].split('=')[1]; if (!id) return; var widget = document.createElement("div"); widget.innerHTML = "Loading..."; currentScript.parentNode.insertBefore(widget, currentScript); var baseUrl = currentScript.src.split('meteo_widget.js')[0]; var url = baseUrl + 'meteo_widget/' + id var xmlhttp = createRequest(); xmlhttp.open("GET", url, true); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4) { widget.innerHTML = xmlhttp.responseText; } }; xmlhttp.send(null); function createRequest() { var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) // JScript gives us Conditional compilation, we can cope with old IE versions. // and security blocked creation of the objects. try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @end @*/ if (!xmlhttp && typeof XMLHttpRequest!='undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp=false; } } if (!xmlhttp && window.createRequest) { try { xmlhttp = window.createRequest(); } catch (e) { xmlhttp=false; } } return xmlhttp; } })();
import React, { useMemo } from "react" import PropTypes from "prop-types" import { Form } from "react-bootstrap" import { accountDerivationPath, Purpose } from "@swan-bitcoin/xpub-lib" const AddressDerivationInput = ({ maxAccounts = 22, accountNumber, network, purpose, onPurposeChange: purposeChangeHandler, onAccountNumberChange: accountNumberChangeHandler, }) => { const accountList = useMemo( // eslint-disable-next-line react/no-array-index-key () => [...Array(maxAccounts)].map((_, i) => <option key={i}>{i}</option>), [maxAccounts] ) return ( <Form inline> <Form.Group> <Form.Label className="my-1 mr-2">BIP</Form.Label> <Form.Control as="select" size="sm" name="purpose" className="my-1 mr-sm-2" value={purpose} onChange={purposeChangeHandler} > {Object.values(Purpose).map(type => ( <option key={type}>{type}</option> ))} </Form.Control> <Form.Label className="my-1 mr-2">Account Nr.</Form.Label> <Form.Control as="select" size="sm" name="accountNumber" className="my-1 mr-sm-2" value={accountNumber} onChange={accountNumberChangeHandler} > {accountList} </Form.Control> <Form.Text muted> Derivation path:{" "} {accountDerivationPath({ purpose, accountNumber, network })} /i </Form.Text> </Form.Group> </Form> ) } AddressDerivationInput.propTypes = { purpose: PropTypes.oneOf(Object.values(Purpose)).isRequired, accountNumber: PropTypes.number.isRequired, onPurposeChange: PropTypes.func.isRequired, onAccountNumberChange: PropTypes.func.isRequired, } export { AddressDerivationInput }
const leaderboard = [ ...document.querySelectorAll("#currentLeaderboard table tbody td a") ].map(a => a.href.split("/").pop()); if (leaderboard.length > 0) { appendDownloadLink(leaderboard, { element: document.querySelector("#currentLeaderboard h1"), filename: "leaderboard.csv" }); } const myList = [...document.querySelectorAll("#yourList ol li a")].map(a => a.href.split("/").pop() ); if (myList.length > 0) { appendDownloadLink(myList, { element: document.querySelector("#yourList h1"), filename: "mylist.csv" }); } function appendDownloadLink( ids, { text = "\u21E9 SAVE LETTERBOXD CSV", filename = "tmdb_ids.csv", element = document.body } ) { const link = document.createElement("a"); link.style = "display: block; padding: 3px 10px; font-size: 50%;"; link.textContent = text; link.download = filename; link.href = "data:text/csv,tmdbID\n" + ids.join("\n"); element.appendChild(link); }
import{av as e,a$ as r,aP as a}from"./index.10276049.js";var o,d;(d=o||(o={})).GetJobGrades="/flow/org/jobGrade/getJobGrades",d.GetJobGradeTree="/flow/org/jobGrade/getJobGradeTree",d.SaveOrUpdate="/flow/org/jobGrade/saveOrUpdate",d.BatchSaveJobGradeTypeAndJobGrade="/flow/org/jobGrade/batchSaveJobGradeTypeAndJobGrade",d.Delete="/flow/org/jobGrade/delete",d.CheckEntityExist="/flow/org/jobGrade/checkEntityExist";const t=d=>{const t=e.post({url:o.GetJobGradeTree,params:d});return Promise.resolve(t).then((e=>{const o=r(e,{id:"id",children:"children",pid:"pid"});return a(o,(e=>{e.showName=`${e.name} (${e.code})`,"1"===e.sourceType&&(e.selectable=!1,e.disabled=!0),0===e.children.length&&delete e.children}),{id:"id",children:"children",pid:"pid"}),o}))},s=r=>e.post({url:o.GetJobGrades,params:r}),l=r=>e.post({url:o.SaveOrUpdate,params:r}),i=r=>e.post({url:o.CheckEntityExist,params:r}),p=r=>e.post({url:o.Delete,params:r});export{t as a,i as c,p as d,s as g,l as s};
/** * Implement Gatsby's Node APIs in this file. * * See: https://www.gatsbyjs.org/docs/node-apis/ */ const path = require('path') const { createFilePath } = require('gatsby-source-filesystem') exports.onCreateNode = ({ node, getNode, boundActionCreators: { createNodeField }, }) => { if (node.internal.type === 'MarkdownRemark') { const slug = path.join('/blog/', createFilePath({ node, getNode })) createNodeField({ node, name: 'slug', value: slug, }) } } exports.createPages = ({ graphql, boundActionCreators: { createPage } }) => ( new Promise((resolve, reject) => { graphql(` { allMarkdownRemark { edges { node { fields { slug } } } } } `).then(result => { result.data.allMarkdownRemark.edges.forEach(({ node }) => { createPage({ path: node.fields.slug, component: path.resolve('./src/templates/blogPost.js'), context: { slug: node.fields.slug, }, }) }) resolve() }) }) )
/** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { MzBadgeModule } from './badge/badge.module'; import { MzButtonModule } from './button/button.module'; import { MzCardModule } from './card/card.module'; import { MzCheckboxModule } from './checkbox/checkbox.module'; import { MzChipModule } from './chip/chip.module'; import { MzCollapsibleModule } from './collapsible/collapsible.module'; import { MzCollectionModule } from './collection/collection.module'; import { MzDatepickerModule } from './datepicker/datepicker.module'; import { MzDropdownModule } from './dropdown/dropdown.module'; import { MzFeatureDiscoveryModule } from './feature-discovery/feature-discovery.module'; import { MzIconMdiModule } from './icon-mdi/icon-mdi.module'; import { MzIconModule } from './icon/icon.module'; import { MzInputModule } from './input/input.module'; import { MzMediaModule } from './media/media.module'; import { MzModalModule } from './modal/modal.module'; import { MzNavbarModule } from './navbar/navbar.module'; import { MzPaginationModule } from './pagination/pagination.module'; import { MzParallaxModule } from './parallax/parallax.module'; import { MzProgressModule } from './progress/progress.module'; import { MzRadioButtonModule } from './radio-button/radio-button.module'; import { MzSelectModule } from './select/select.module'; import { MzInjectionModule } from './shared/injection/injection.module'; import { MzSidenavModule } from './sidenav/sidenav.module'; import { MzSpinnerModule } from './spinner/spinner.module'; import { MzSwitchModule } from './switch/switch.module'; import { MzTabModule } from './tab/tab.module'; import { MzTextareaModule } from './textarea/textarea.module'; import { MzTimepickerModule } from './timepicker/timepicker.module'; import { MzToastModule } from './toast/toast.module'; import { MzTooltipModule } from './tooltip/tooltip.module'; import { MzValidationModule } from './validation/validation.module'; const /** @type {?} */ MZ_MODULES = [ CommonModule, FormsModule, MzBadgeModule, MzButtonModule, MzCardModule, MzCheckboxModule, MzChipModule, MzCollapsibleModule, MzCollectionModule, MzDatepickerModule, MzDropdownModule, MzFeatureDiscoveryModule, MzIconModule, MzIconMdiModule, MzInjectionModule, MzInputModule, MzMediaModule, MzModalModule, MzNavbarModule, MzPaginationModule, MzParallaxModule, MzProgressModule, MzRadioButtonModule, MzSelectModule, MzSidenavModule, MzSpinnerModule, MzSwitchModule, MzTabModule, MzTextareaModule, MzTimepickerModule, MzToastModule, MzTooltipModule, MzValidationModule, ]; /** * @deprecated * Import specific component modules instead (MzBadgeModule, MzCardModule, etc) * https://github.com/sherweb/ng2-materialize#materializemodule-deprecated */ export class MaterializeModule { /** * @return {?} */ static forRoot() { return { ngModule: MaterializeModule, }; } } MaterializeModule.decorators = [ { type: NgModule, args: [{ imports: MZ_MODULES, exports: MZ_MODULES, },] }, ]; function MaterializeModule_tsickle_Closure_declarations() { /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */ MaterializeModule.decorators; /** * @nocollapse * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>} */ MaterializeModule.ctorParameters; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWF0ZXJpYWxpemUubW9kdWxlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LW1hdGVyaWFsaXplLyIsInNvdXJjZXMiOlsic3JjL21hdGVyaWFsaXplLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFBdUIsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzlELE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUU3QyxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDckQsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ3hELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUNsRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUM5RCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDbEQsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sa0NBQWtDLENBQUM7QUFDdkUsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDcEUsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDcEUsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFDOUQsT0FBTyxFQUFFLHdCQUF3QixFQUFFLE1BQU0sOENBQThDLENBQUM7QUFDeEYsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBQzdELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUNsRCxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDckQsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ3JELE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUNyRCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFDeEQsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDcEUsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFDOUQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFDOUQsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sb0NBQW9DLENBQUM7QUFDekUsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ3hELE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHFDQUFxQyxDQUFDO0FBQ3hFLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUMzRCxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFDM0QsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ3hELE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUMvQyxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUM5RCxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUNwRSxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDckQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQzNELE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBRXBFLHVCQUFNLFVBQVUsR0FBRztJQUNqQixZQUFZO0lBQ1osV0FBVztJQUNYLGFBQWE7SUFDYixjQUFjO0lBQ2QsWUFBWTtJQUNaLGdCQUFnQjtJQUNoQixZQUFZO0lBQ1osbUJBQW1CO0lBQ25CLGtCQUFrQjtJQUNsQixrQkFBa0I7SUFDbEIsZ0JBQWdCO0lBQ2hCLHdCQUF3QjtJQUN4QixZQUFZO0lBQ1osZUFBZTtJQUNmLGlCQUFpQjtJQUNqQixhQUFhO0lBQ2IsYUFBYTtJQUNiLGFBQWE7SUFDYixjQUFjO0lBQ2Qsa0JBQWtCO0lBQ2xCLGdCQUFnQjtJQUNoQixnQkFBZ0I7SUFDaEIsbUJBQW1CO0lBQ25CLGNBQWM7SUFDZCxlQUFlO0lBQ2YsZUFBZTtJQUNmLGNBQWM7SUFDZCxXQUFXO0lBQ1gsZ0JBQWdCO0lBQ2hCLGtCQUFrQjtJQUNsQixhQUFhO0lBQ2IsZUFBZTtJQUNmLGtCQUFrQjtDQUNuQixDQUFDOzs7Ozs7QUFXRixNQUFNOzs7O0lBQ0osTUFBTSxDQUFDLE9BQU87UUFDWixNQUFNLENBQUM7WUFDTCxRQUFRLEVBQUUsaUJBQWlCO1NBQzVCLENBQUM7S0FDSDs7O1lBVEYsUUFBUSxTQUFDO2dCQUNSLE9BQU8sRUFBRSxVQUFVO2dCQUNuQixPQUFPLEVBQUUsVUFBVTthQUNwQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbW1vbk1vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvbW1vbic7XHJcbmltcG9ydCB7IE1vZHVsZVdpdGhQcm92aWRlcnMsIE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcbmltcG9ydCB7IEZvcm1zTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvZm9ybXMnO1xyXG5cclxuaW1wb3J0IHsgTXpCYWRnZU1vZHVsZSB9IGZyb20gJy4vYmFkZ2UvYmFkZ2UubW9kdWxlJztcclxuaW1wb3J0IHsgTXpCdXR0b25Nb2R1bGUgfSBmcm9tICcuL2J1dHRvbi9idXR0b24ubW9kdWxlJztcclxuaW1wb3J0IHsgTXpDYXJkTW9kdWxlIH0gZnJvbSAnLi9jYXJkL2NhcmQubW9kdWxlJztcclxuaW1wb3J0IHsgTXpDaGVja2JveE1vZHVsZSB9IGZyb20gJy4vY2hlY2tib3gvY2hlY2tib3gubW9kdWxlJztcclxuaW1wb3J0IHsgTXpDaGlwTW9kdWxlIH0gZnJvbSAnLi9jaGlwL2NoaXAubW9kdWxlJztcclxuaW1wb3J0IHsgTXpDb2xsYXBzaWJsZU1vZHVsZSB9IGZyb20gJy4vY29sbGFwc2libGUvY29sbGFwc2libGUubW9kdWxlJztcclxuaW1wb3J0IHsgTXpDb2xsZWN0aW9uTW9kdWxlIH0gZnJvbSAnLi9jb2xsZWN0aW9uL2NvbGxlY3Rpb24ubW9kdWxlJztcclxuaW1wb3J0IHsgTXpEYXRlcGlja2VyTW9kdWxlIH0gZnJvbSAnLi9kYXRlcGlja2VyL2RhdGVwaWNrZXIubW9kdWxlJztcclxuaW1wb3J0IHsgTXpEcm9wZG93bk1vZHVsZSB9IGZyb20gJy4vZHJvcGRvd24vZHJvcGRvd24ubW9kdWxlJztcclxuaW1wb3J0IHsgTXpGZWF0dXJlRGlzY292ZXJ5TW9kdWxlIH0gZnJvbSAnLi9mZWF0dXJlLWRpc2NvdmVyeS9mZWF0dXJlLWRpc2NvdmVyeS5tb2R1bGUnO1xyXG5pbXBvcnQgeyBNekljb25NZGlNb2R1bGUgfSBmcm9tICcuL2ljb24tbWRpL2ljb24tbWRpLm1vZHVsZSc7XHJcbmltcG9ydCB7IE16SWNvbk1vZHVsZSB9IGZyb20gJy4vaWNvbi9pY29uLm1vZHVsZSc7XHJcbmltcG9ydCB7IE16SW5wdXRNb2R1bGUgfSBmcm9tICcuL2lucHV0L2lucHV0Lm1vZHVsZSc7XHJcbmltcG9ydCB7IE16TWVkaWFNb2R1bGUgfSBmcm9tICcuL21lZGlhL21lZGlhLm1vZHVsZSc7XHJcbmltcG9ydCB7IE16TW9kYWxNb2R1bGUgfSBmcm9tICcuL21vZGFsL21vZGFsLm1vZHVsZSc7XHJcbmltcG9ydCB7IE16TmF2YmFyTW9kdWxlIH0gZnJvbSAnLi9uYXZiYXIvbmF2YmFyLm1vZHVsZSc7XHJcbmltcG9ydCB7IE16UGFnaW5hdGlvbk1vZHVsZSB9IGZyb20gJy4vcGFnaW5hdGlvbi9wYWdpbmF0aW9uLm1vZHVsZSc7XHJcbmltcG9ydCB7IE16UGFyYWxsYXhNb2R1bGUgfSBmcm9tICcuL3BhcmFsbGF4L3BhcmFsbGF4Lm1vZHVsZSc7XHJcbmltcG9ydCB7IE16UHJvZ3Jlc3NNb2R1bGUgfSBmcm9tICcuL3Byb2dyZXNzL3Byb2dyZXNzLm1vZHVsZSc7XHJcbmltcG9ydCB7IE16UmFkaW9CdXR0b25Nb2R1bGUgfSBmcm9tICcuL3JhZGlvLWJ1dHRvbi9yYWRpby1idXR0b24ubW9kdWxlJztcclxuaW1wb3J0IHsgTXpTZWxlY3RNb2R1bGUgfSBmcm9tICcuL3NlbGVjdC9zZWxlY3QubW9kdWxlJztcclxuaW1wb3J0IHsgTXpJbmplY3Rpb25Nb2R1bGUgfSBmcm9tICcuL3NoYXJlZC9pbmplY3Rpb24vaW5qZWN0aW9uLm1vZHVsZSc7XHJcbmltcG9ydCB7IE16U2lkZW5hdk1vZHVsZSB9IGZyb20gJy4vc2lkZW5hdi9zaWRlbmF2Lm1vZHVsZSc7XHJcbmltcG9ydCB7IE16U3Bpbm5lck1vZHVsZSB9IGZyb20gJy4vc3Bpbm5lci9zcGlubmVyLm1vZHVsZSc7XHJcbmltcG9ydCB7IE16U3dpdGNoTW9kdWxlIH0gZnJvbSAnLi9zd2l0Y2gvc3dpdGNoLm1vZHVsZSc7XHJcbmltcG9ydCB7IE16VGFiTW9kdWxlIH0gZnJvbSAnLi90YWIvdGFiLm1vZHVsZSc7XHJcbmltcG9ydCB7IE16VGV4dGFyZWFNb2R1bGUgfSBmcm9tICcuL3RleHRhcmVhL3RleHRhcmVhLm1vZHVsZSc7XHJcbmltcG9ydCB7IE16VGltZXBpY2tlck1vZHVsZSB9IGZyb20gJy4vdGltZXBpY2tlci90aW1lcGlja2VyLm1vZHVsZSc7XHJcbmltcG9ydCB7IE16VG9hc3RNb2R1bGUgfSBmcm9tICcuL3RvYXN0L3RvYXN0Lm1vZHVsZSc7XHJcbmltcG9ydCB7IE16VG9vbHRpcE1vZHVsZSB9IGZyb20gJy4vdG9vbHRpcC90b29sdGlwLm1vZHVsZSc7XHJcbmltcG9ydCB7IE16VmFsaWRhdGlvbk1vZHVsZSB9IGZyb20gJy4vdmFsaWRhdGlvbi92YWxpZGF0aW9uLm1vZHVsZSc7XHJcblxyXG5jb25zdCBNWl9NT0RVTEVTID0gW1xyXG4gIENvbW1vbk1vZHVsZSxcclxuICBGb3Jtc01vZHVsZSxcclxuICBNekJhZGdlTW9kdWxlLFxyXG4gIE16QnV0dG9uTW9kdWxlLFxyXG4gIE16Q2FyZE1vZHVsZSxcclxuICBNekNoZWNrYm94TW9kdWxlLFxyXG4gIE16Q2hpcE1vZHVsZSxcclxuICBNekNvbGxhcHNpYmxlTW9kdWxlLFxyXG4gIE16Q29sbGVjdGlvbk1vZHVsZSxcclxuICBNekRhdGVwaWNrZXJNb2R1bGUsXHJcbiAgTXpEcm9wZG93bk1vZHVsZSxcclxuICBNekZlYXR1cmVEaXNjb3ZlcnlNb2R1bGUsXHJcbiAgTXpJY29uTW9kdWxlLFxyXG4gIE16SWNvbk1kaU1vZHVsZSxcclxuICBNekluamVjdGlvbk1vZHVsZSxcclxuICBNeklucHV0TW9kdWxlLFxyXG4gIE16TWVkaWFNb2R1bGUsXHJcbiAgTXpNb2RhbE1vZHVsZSxcclxuICBNek5hdmJhck1vZHVsZSxcclxuICBNelBhZ2luYXRpb25Nb2R1bGUsXHJcbiAgTXpQYXJhbGxheE1vZHVsZSxcclxuICBNelByb2dyZXNzTW9kdWxlLFxyXG4gIE16UmFkaW9CdXR0b25Nb2R1bGUsXHJcbiAgTXpTZWxlY3RNb2R1bGUsXHJcbiAgTXpTaWRlbmF2TW9kdWxlLFxyXG4gIE16U3Bpbm5lck1vZHVsZSxcclxuICBNelN3aXRjaE1vZHVsZSxcclxuICBNelRhYk1vZHVsZSxcclxuICBNelRleHRhcmVhTW9kdWxlLFxyXG4gIE16VGltZXBpY2tlck1vZHVsZSxcclxuICBNelRvYXN0TW9kdWxlLFxyXG4gIE16VG9vbHRpcE1vZHVsZSxcclxuICBNelZhbGlkYXRpb25Nb2R1bGUsXHJcbl07XHJcblxyXG4vKipcclxuICogQGRlcHJlY2F0ZWRcclxuICogSW1wb3J0IHNwZWNpZmljIGNvbXBvbmVudCBtb2R1bGVzIGluc3RlYWQgKE16QmFkZ2VNb2R1bGUsIE16Q2FyZE1vZHVsZSwgZXRjKVxyXG4gKiBodHRwczovL2dpdGh1Yi5jb20vc2hlcndlYi9uZzItbWF0ZXJpYWxpemUjbWF0ZXJpYWxpemVtb2R1bGUtZGVwcmVjYXRlZFxyXG4gKi9cclxuQE5nTW9kdWxlKHtcclxuICBpbXBvcnRzOiBNWl9NT0RVTEVTLFxyXG4gIGV4cG9ydHM6IE1aX01PRFVMRVMsXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBNYXRlcmlhbGl6ZU1vZHVsZSB7XHJcbiAgc3RhdGljIGZvclJvb3QoKTogTW9kdWxlV2l0aFByb3ZpZGVycyB7XHJcbiAgICByZXR1cm4ge1xyXG4gICAgICBuZ01vZHVsZTogTWF0ZXJpYWxpemVNb2R1bGUsXHJcbiAgICB9O1xyXG4gIH1cclxufVxyXG4iXX0=
/** * A global namespace for 'transitionDuration' string. * @type {string} */ const transitionDuration = 'webkitTransition' in document.head.style ? 'webkitTransitionDuration' : 'transitionDuration'; export default transitionDuration;
const _ = require("lodash"); const toml = require("toml"); const yaml = require("js-yaml"); const {use_plugins} = require("../util"); const { markdown_code_escape, markdown_code_metadata, markdown_frontmatter, source_export } = require("../plugins"); /** * Returns the standardized settings for configuring `remark-parse` / `remark-stringify` and remark-based plugins * @param {*} settings */ function get_remark_settings(settings = {}) { return _.merge( { plugins: [], stringify: {}, frontmatter: [ { type: "json", fence: {open: "{", close: "}"}, parser: (s) => JSON.parse("{" + s + "}") }, {type: "toml", marker: "+", parser: (s) => toml.parse(s)}, {type: "yaml", marker: "-", parser: (s) => yaml.safeLoad(s)} ], parse: { // `.blocks` controls which HTML tags are treated are block-level elements // rather than paragraph wrapped texts, we're making it any tag below blocks: ["[\\w\\-]+"] } }, settings ); } /** * Configures a `unified.Processor` with the `svelte-markc` remark plugins * @param {*} processor * @param {*} settings * @param {*} validate_settings */ function use_remark_plugins(processor, settings, validate_settings = true) { if (validate_settings) settings = get_remark_settings(settings); const _source_export = source_export.bind(processor, "MARKDOWN"); processor .use(markdown_frontmatter, settings.frontmatter) .use(markdown_code_escape) .use(markdown_code_metadata) .use(_source_export); return use_plugins(processor, settings.plugins); } module.exports = { get_remark_settings, use_remark_plugins };
window.onload = function() { var hw = document.getElementById('hw'); hw.addEventListener('click', function(){ alert('Hello world'); }) }
require('./bootstrap'); window.Vue = require('vue'); import BootstrapVue from 'bootstrap-vue/dist/bootstrap-vue.esm'; import 'bootstrap/dist/css/bootstrap.css'; import 'bootstrap-vue/dist/bootstrap-vue.css'; Vue.use(BootstrapVue); import 'bootstrap' import 'bootstrap/dist/css/bootstrap.min.css' import Vue from 'vue' import VueRouter from 'vue-router'; import { routes } from './routes'; Vue.use(VueRouter); // Vue.component('header-component',require('./components/common/HeaderComponent.vue').default); Vue.component('header-component',require('./components/HeaderComponent.vue').default); // Vue.component('footer-component',require('./components/common/FooterComponent.vue').default); Vue.component('footer-component',require('./components/FooterComponent.vue').default); Vue.component('contact-component',require('./components/ContactComponent.vue').default); Vue.component('ngodetail-component',require('./components/NgoDetailComponent.vue').default); Vue.component('login-component',require('./components/LoginComponent.vue').default); Vue.component('signup-component',require('./components/SignUpComponent.vue').default); Vue.component('bgimage-component',require('./components/BackgroundImageComponent.vue').default); Vue.component('ngosubdetail-component',require('./components/NgoSubDetailComponent.vue').default); Vue.component('astrology-component',require('./components/AstrologyComponent.vue').default); Vue.component('donor-component',require('./components/DonorComponent.vue').default); Vue.component('promoters-component',require('./components/PromotersComponent.vue').default); Vue.component('payment-component',require('./components/PaymentComponent.vue').default); Vue.component('donorform-component',require('./components/DonorFormComponent.vue').default); Vue.component('beneficiaryform-component',require('./components/BeneficiaryFormComponent.vue').default); Vue.component('astrologerform-component',require('./components/AstrologerFormComponent.vue').default); Vue.component('userform-component',require('./components/UserFormComponent.vue').default); Vue.component('aboutus-component',require('./components/AboutUsComponent.vue').default); Vue.component('ourteam-component',require('./components/OurTeamComponent.vue').default); Vue.component('test-component',require('./components/TestComponent.vue').default); Vue.component('preheader-component',require('./components/PreHeaderComponent.vue').default); Vue.component('postheader-component',require('./components/PostHeaderComponent.vue').default); Vue.component('ngodetails-component',require('./components/NgoDetailsComponent.vue').default); Vue.component('education-component',require('./components/EducationComponent.vue').default); Vue.component('health-component',require('./components/HealthComponent.vue').default); Vue.component('village-component',require('./components/VillageComponent.vue').default); Vue.component('water-component',require('./components/WaterComponent.vue').default); Vue.component('agriculture-component',require('./components/AgricultureComponent.vue').default); Vue.component('skilldevelopement-component',require('./components/SkillDevelopementComponent.vue').default); Vue.component('differentlyabled-component',require('./components/DifferentlyAbledComponent.vue').default); Vue.component('womenempowerment-component',require('./components/WomenEmpowermentComponent.vue').default); Vue.component('humanrights-component',require('./components/HumanRightsComponent.vue').default); const router = new VueRouter({ routes, // mode: 'history' // history: true, }); const app = new Vue({ el:'#app', router, });
import { MongoClient } from "mongodb"; import { MONGODB_URL, ACTIVITIES_COLLECTION, REPORTS_COLLECTION } from "../config"; let dbInstance; export async function getMongoClient() { if (!dbInstance) { dbInstance = await MongoClient.connect(MONGODB_URL); } return dbInstance; } export async function retrieveActivities(query = {}) { const db = await getMongoClient(); return await db.collection(ACTIVITIES_COLLECTION).find(query).toArray(); } export async function retrieveMatchingReport(activity, year, month) { const db = await getMongoClient(); const report = await db.collection(REPORTS_COLLECTION).findOne({ _id: `${activity.athlete.id}${activity.club.id}${year}${month}`, }); return ( report || { _id: `${activity.athlete.id}${activity.club.id}${year}${month}`, year, month: parseInt(month), activities: [], distances: [], } ); } export async function upsertReport(report) { const db = await getMongoClient(); await db.collection(REPORTS_COLLECTION).updateOne({ _id: report._id }, { $set: report }, { upsert: true }); } export async function moveActivities(activities = []) { if (activities.length > 0) { const db = await getMongoClient(); const ids = activities.map((x) => x._id); await db.collection(ACTIVITIES_COLLECTION).remove({ _id: { $in: ids, }, }); } }
module.exports = function(hljs) { var KEYWORDS = // Normal keywords. 'abstract as base bool break byte case catch char checked const continue decimal dynamic ' + 'default delegate do double else enum event explicit extern false finally fixed float ' + 'for foreach goto if implicit in int interface internal is lock long null when ' + 'object operator out override params private protected public readonly ref sbyte ' + 'sealed short sizeof stackalloc static string struct switch this true try typeof ' + 'uint ulong unchecked unsafe ushort using virtual volatile void while async ' + 'protected public private internal ' + // Contextual keywords. 'ascending descending from get group into join let orderby partial select set value var ' + 'where yield'; var GENERIC_IDENT_RE = hljs.IDENT_RE + '(<' + hljs.IDENT_RE + '>)?'; return { aliases: ['csharp'], keywords: KEYWORDS, illegal: /::/, contains: [ hljs.COMMENT( '///', '$', { returnBegin: true, contains: [ { className: 'xmlDocTag', variants: [ { begin: '///', relevance: 0 }, { begin: '<!--|-->' }, { begin: '</?', end: '>' } ] } ] } ), hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, { className: 'preprocessor', begin: '#', end: '$', keywords: 'if else elif endif define undef warning error line region endregion pragma checksum' }, { className: 'string', begin: '@"', end: '"', contains: [{begin: '""'}] }, hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, hljs.C_NUMBER_MODE, { beginKeywords: 'class namespace interface', end: /[{;=]/, illegal: /[^\s:]/, contains: [ hljs.TITLE_MODE, hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE ] }, { // Expression keywords prevent 'keyword Name(...)' from being // recognized as a function definition beginKeywords: 'new return throw await', relevance: 0 }, { className: 'function', begin: '(' + GENERIC_IDENT_RE + '\\s+)+' + hljs.IDENT_RE + '\\s*\\(', returnBegin: true, end: /[{;=]/, excludeEnd: true, keywords: KEYWORDS, contains: [ { begin: hljs.IDENT_RE + '\\s*\\(', returnBegin: true, contains: [hljs.TITLE_MODE], relevance: 0 }, { className: 'params', begin: /\(/, end: /\)/, keywords: KEYWORDS, relevance: 0, contains: [ hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, hljs.C_NUMBER_MODE, hljs.C_BLOCK_COMMENT_MODE ] }, hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE ] } ] }; };
const Promise = require('bluebird') const SIGNALE = require('signale') const chalk = require('chalk') const getKnex = require(`${global.SERVER_ROOT}/services/knex`) module.exports = () => { return new Promise(async (resolve, reject) => { try { let knex = await getKnex() await knex.raw(`CREATE SCHEMA IF NOT EXISTS "${global.POSTGRES_SCHEMA}";`) SIGNALE.success(`${chalk.cyan(global.POSTGRES_SCHEMA)} schema loaded successfully`) resolve() } catch (error) { throw error } }) }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------- *--------------------------------------------------------------------------------------------- *--------------------------------------------------------------------------------------------- *--------------------------------------------------------------------------------------------- *--------------------------------------------------------------------------------------------- * Please make sure to make edits in the .ts file at https://github.com/microsoft/vscode-loader/ *--------------------------------------------------------------------------------------------- *--------------------------------------------------------------------------------------------- *--------------------------------------------------------------------------------------------- *--------------------------------------------------------------------------------------------- *--------------------------------------------------------------------------------------------*/ 'use strict'; var __spreadArrays = (this && this.__spreadArrays) || function () { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; }; var NLSLoaderPlugin; (function (NLSLoaderPlugin) { var Environment = /** @class */ (function () { function Environment() { this._detected = false; this._isPseudo = false; } Object.defineProperty(Environment.prototype, "isPseudo", { get: function () { this._detect(); return this._isPseudo; }, enumerable: false, configurable: true }); Environment.prototype._detect = function () { if (this._detected) { return; } this._detected = true; this._isPseudo = (typeof document !== 'undefined' && document.location && document.location.hash.indexOf('pseudo=true') >= 0); }; return Environment; }()); function _format(message, args, env) { var result; if (args.length === 0) { result = message; } else { result = message.replace(/\{(\d+)\}/g, function (match, rest) { var index = rest[0]; var arg = args[index]; var result = match; if (typeof arg === 'string') { result = arg; } else if (typeof arg === 'number' || typeof arg === 'boolean' || arg === void 0 || arg === null) { result = String(arg); } return result; }); } if (env.isPseudo) { // FF3B and FF3D is the Unicode zenkaku representation for [ and ] result = '\uFF3B' + result.replace(/[aouei]/g, '$&$&') + '\uFF3D'; } return result; } function findLanguageForModule(config, name) { var result = config[name]; if (result) return result; result = config['*']; if (result) return result; return null; } function localize(env, data, message) { var args = []; for (var _i = 3; _i < arguments.length; _i++) { args[_i - 3] = arguments[_i]; } return _format(message, args, env); } function createScopedLocalize(scope, env) { return function (idx, defaultValue) { var restArgs = Array.prototype.slice.call(arguments, 2); return _format(scope[idx], restArgs, env); }; } var NLSPlugin = /** @class */ (function () { function NLSPlugin(env) { var _this = this; this._env = env; this.localize = function (data, message) { var args = []; for (var _i = 2; _i < arguments.length; _i++) { args[_i - 2] = arguments[_i]; } return localize.apply(void 0, __spreadArrays([_this._env, data, message], args)); }; } NLSPlugin.prototype.setPseudoTranslation = function (value) { this._env._isPseudo = value; }; NLSPlugin.prototype.create = function (key, data) { return { localize: createScopedLocalize(data[key], this._env) }; }; NLSPlugin.prototype.load = function (name, req, load, config) { var _this = this; var _a; config = config || {}; if (!name || name.length === 0) { load({ localize: this.localize }); } else { var pluginConfig = config['vs/nls'] || {}; var language = pluginConfig.availableLanguages ? findLanguageForModule(pluginConfig.availableLanguages, name) : null; var suffix = '.nls'; if (language !== null && language !== NLSPlugin.DEFAULT_TAG) { suffix = suffix + '.' + language; } var messagesLoaded_1 = function (messages) { if (Array.isArray(messages)) { messages.localize = createScopedLocalize(messages, _this._env); } else { messages.localize = createScopedLocalize(messages[name], _this._env); } load(messages); }; if (typeof pluginConfig.loadBundle === 'function') { pluginConfig.loadBundle(name, language, function (err, messages) { // We have an error. Load the English default strings to not fail if (err) { req([name + '.nls'], messagesLoaded_1); } else { messagesLoaded_1(messages); } }); } else { var base = (_a = pluginConfig.baseUrl) !== null && _a !== void 0 ? _a : ''; req([base + name + suffix], messagesLoaded_1, function (err) { var _a; // We have an error. Load the English default strings instead. console.warn("Falling back to default strings. Unable to load translations because of: " + ((_a = err.message) !== null && _a !== void 0 ? _a : err)); req([name + '.nls'], messagesLoaded_1); }); } } }; NLSPlugin.DEFAULT_TAG = 'i-default'; return NLSPlugin; }()); NLSLoaderPlugin.NLSPlugin = NLSPlugin; define('vs/nls', new NLSPlugin(new Environment())); })(NLSLoaderPlugin || (NLSLoaderPlugin = {}));
const express = require('express'); const expressSession = require('express-session')({ secret: 'tonks', resave: true, saveUninitialized: true }); const parser = require('body-parser'); const parserEncoded = require('body-parser').urlencoded({ extended: true }); const cookieParser = require('cookie-parser')(); const morgan = require('morgan')('combined'); const apiRouter = require('./server/router/apiRouter.js'); const authRouter = require('./server/router/authRouter.js'); const configRouter = require('./server/router/configRouter.js'); const path = require('path'); const passport = require('passport'); const GoogleStrategy = require('passport-google-oauth20').Strategy; const { googleClientId, googleClientSecret, googleCallbackUrl } = require('./server/config.js'); const User = require('./db/models/userModel.js'); // Google oauth setup passport.use(new GoogleStrategy({ clientID: googleClientId, clientSecret: googleClientSecret, callbackURL: googleCallbackUrl }, (accessToken, refreshToken, profile, cb) => { User.findOrCreate(profile) .then(result => cb(null, result)) .catch(error => cb(error, null)); } )); passport.serializeUser((user, cb) => { cb(null, user); }); passport.deserializeUser((obj, cb) => { cb(null, obj); }); // End of google oauth setup const app = express(); // MIDDLEWARE app.use(morgan); app.use(cookieParser); app.use(parserEncoded); app.use(parser.json()); app.use(expressSession); app.use(passport.initialize()); app.use(passport.session()); app.use((req, res, next) => { if (req.session.passport) { console.log(req.session.passport.user); console.log('User is Logged In'); } next(); }); // ROUTING app.use(express.static(path.resolve(__dirname, './public'))); app.use('/api', apiRouter); app.use('/auth', authRouter); app.use('/config', configRouter); // INIT app.set('port', process.env.PORT || 1337); app.listen(app.get('port'), (err) => { if (err) { return console.log('Error starting server: ', err); } return console.log('\x1b[36m', 'AWAY: Listening on port: ', app.get('port')); }); module.exports.app = app;
import React, { useState, useEffect } from 'react' export default function useOnScreen(ref) { const [isIntersecting, setIntersecting] = useState(false) let observer useEffect(() => { observer = new IntersectionObserver( ([entry]) => setIntersecting(entry.isIntersecting) ) observer.observe(ref.current) // Remove the observer as soon as the component is unmounted return () => { observer.disconnect() } }, []) return isIntersecting }
import { flexBlockquote } from './flexBlockquote'; import { flexHero } from './flexHero'; import { flexWysiwygContent } from './flexWysiwygContent'; import pageOptions from './fragmentPageOptions'; import seo from './fragmentSeo'; export function queryContent(preview) { const query = /* GraphQL */ ` query GetContent($slug: ID!, $preview: Boolean) { contentNode(id: $slug, idType: URI, asPreview: $preview) { __typename id databaseId isPreview link slug uri date template { ... on Template_Flex { acfFlex { fieldGroupName flexContent { ${flexBlockquote()} ${flexHero()} ${flexWysiwygContent()} } } } } ... on NodeWithTitle { title } ... on NodeWithFeaturedImage { featuredImage { node { caption sourceUrl mediaDetails { height width } } } } ... on NodeWithTemplate { template { __typename templateName } } ... on NodeWithAuthor { authorId author { node { id name nicename lastName } } } ... on NodeWithExcerpt { excerpt } ... on Page { isFrontPage content ${preview ? '' : seo} ${pageOptions} } ... on Post { content ${preview ? '' : seo} ${pageOptions} } } } `; return query; }
const AWS = require('aws-sdk'); const debug = require('debug')('elasticsearch'); const pump = require('pump'); const { Connection } = require('@elastic/elasticsearch'); const INVALID_PATH_REGEX = /[^\u0021-\u00ff]/ const { ConnectionError, RequestAbortedError, TimeoutError } = require('@elastic/elasticsearch/lib/errors'); function isStream(obj) { return typeof obj.pipe === 'function'; } function createConnector(opts = {}) { let { region, getCreds } = opts; region = region || process.env.AWS_REGION; if (!getCreds) getCreds = cb => AWS.config.getCredentials(cb); class AwsEs extends Connection { request(params, callback) { this._openRequests++ let cleanedListeners = false let aborted; let request = { abort: () => { aborted = true } }; const requestParams = this.buildRequestObject(params) // https://github.com/nodejs/node/commit/b961d9fd83 if (INVALID_PATH_REGEX.test(requestParams.path) === true) { callback(new TypeError(`ERR_UNESCAPED_CHARACTERS: ${requestParams.path}`), null) /* istanbul ignore next */ return request; } debug('Starting a new request', params) getCreds((err, credentials) => { if (err) { this._openRequests--; return callback(new ConnectionError(err.message), null); } if (aborted) { this._openRequests--; return; } const domain = requestParams.hostname; const body = requestParams.body; const endpoint = new AWS.Endpoint(domain); request = new AWS.HttpRequest(endpoint, region); request.method = requestParams.method; request.path = requestParams.path; if (body && !isStream(body)) { request.body = body; request.headers['Content-Length'] = Buffer.byteLength(request.body); } const contentType = requestParams.headers['content-type']; if (contentType) { request.headers['Content-Type'] = contentType; } request.headers['host'] = domain; const signer = new AWS.Signers.V4(request, 'es'); signer.addAuthorization(credentials, new Date()); const client = new AWS.HttpClient(); const response = () => {}; const error = () => {}; const opts = { timeout: requestParams.timeout, agent: requestParams.agent } request = client.handleRequest(request, opts, response, error) const onResponse = response => { cleanListeners() this._openRequests-- callback(null, response) } const onTimeout = () => { cleanListeners() this._openRequests-- request.once('error', () => {}) // we need to catch the request aborted error request.abort() callback(new TimeoutError('Request timed out', params), null) } const onError = err => { cleanListeners() this._openRequests-- callback(new ConnectionError(err.message), null) } const onAbort = () => { cleanListeners() request.once('error', () => {}) // we need to catch the request aborted error debug('Request aborted', params) this._openRequests-- callback(new RequestAbortedError(), null) } request.on('response', onResponse) request.on('timeout', onTimeout) request.on('error', onError) request.on('abort', onAbort) // Disables the Nagle algorithm request.setNoDelay(true) function cleanListeners () { request.removeListener('response', onResponse) request.removeListener('timeout', onTimeout) request.removeListener('error', onError) request.removeListener('abort', onAbort) cleanedListeners = true } }); return { abort: () => { request.abort(); } } } } return AwsEs; } exports.createConnector = createConnector;
const path = require('path'); const fs = require('./utils/fs'); const objectHash = require('./utils/objectHash'); const md5 = require('./utils/md5'); const isURL = require('./utils/is-url'); const sanitizeFilename = require('sanitize-filename'); let ASSET_ID = 1; /** * An Asset represents a file in the dependency tree. Assets can have multiple * parents that depend on it, and can be added to multiple output bundles. * The base Asset class doesn't do much by itself, but sets up an interface * for subclasses to implement. */ class Asset { constructor(name, pkg, options) { this.id = ASSET_ID++; this.name = name; this.basename = path.basename(this.name); this.package = pkg || {}; this.options = options; this.encoding = 'utf8'; this.type = path.extname(this.name).slice(1); this.processed = false; this.contents = null; this.ast = null; this.generated = null; this.hash = null; this.parentDeps = new Set(); this.dependencies = new Map(); this.depAssets = new Map(); this.parentBundle = null; this.bundles = new Set(); } async loadIfNeeded() { if (this.contents == null) { this.contents = await this.load(); } } async parseIfNeeded() { await this.loadIfNeeded(); if (!this.ast) { this.ast = await this.parse(this.contents); } } async getDependencies() { await this.loadIfNeeded(); if (this.mightHaveDependencies()) { await this.parseIfNeeded(); this.collectDependencies(); } } addDependency(name, opts) { this.dependencies.set(name, Object.assign({name}, opts)); } addURLDependency(url, from = this.name, opts) { if (!url || isURL(url)) { return url; } if (typeof from === 'object') { opts = from; from = this.name; } let resolved = path.resolve(path.dirname(from), url).replace(/[?#].*$/, ''); this.addDependency( './' + path.relative(path.dirname(this.name), resolved), Object.assign({dynamic: true}, opts) ); return this.options.parser .getAsset(resolved, this.package, this.options) .generateBundleName(); } mightHaveDependencies() { return true; } async load() { return await fs.readFile(this.name, this.encoding); } parse() { // do nothing by default } collectDependencies() { // do nothing by default } async pretransform() {} async transform() { // do nothing by default } generate() { return { [this.type]: this.contents }; } async process() { if (!this.generated) { await this.loadIfNeeded(); await this.pretransform(); await this.getDependencies(); await this.transform(); this.generated = this.generate(); this.hash = this.generateHash(); } return this.generated; } generateHash() { return objectHash(this.generated); } invalidate() { this.processed = false; this.contents = null; this.ast = null; this.generated = null; this.hash = null; this.dependencies.clear(); this.depAssets.clear(); } invalidateBundle() { this.parentBundle = null; this.bundles.clear(); this.parentDeps.clear(); } generateBundleName() { // Resolve the main file of the package.json let main = this.package && this.package.main ? path.resolve(path.dirname(this.package.pkgfile), this.package.main) : null; let ext = '.' + this.type; // If this asset is main file of the package, use the sanitized package name if (this.name === main) { const packageName = sanitizeFilename(this.package.name, { replacement: '-' }); return packageName + ext; } // If this is the entry point of the root bundle, use the original filename if (this.name === this.options.mainFile) { return path.basename(this.name, path.extname(this.name)) + ext; } // Otherwise generate a unique name return md5(this.name) + ext; } generateErrorMessage(err) { return err; } } module.exports = Asset;
const { ObjectId } = require('mongodb'); const chance = require('chance')(); const MongoHelper = require('../helpers/mongo-helper'); const UpdateCustomerRepository = require('./update-customer-repository'); const MissingParamError = require('../../utils/errors/missing-param-error'); let customerModel; const newId = ObjectId; const body = { name: chance.name(), email: chance.email(), telephone: chance.phone(), cpf: chance.integer({ min: 0, max: 11 }), }; const makeSut = () => new UpdateCustomerRepository(); describe('UpdateCustomer Repository', () => { beforeAll(async () => { await MongoHelper.connect(process.env.MONGO_URL); customerModel = await MongoHelper.getCollection('customers'); }); beforeEach(async () => { await customerModel.deleteMany(); }); afterAll(async () => { await MongoHelper.disconnect(); }); test('Should register a new customer and return', async () => { const customer = await customerModel.updateOne( { _id: newId }, { $set: body, } ); expect(customer.result.ok).toEqual(1); }); test('Should throw if no parameter id is provided', () => { const sut = makeSut(); const promise = sut.update(); expect(promise).rejects.toThrow(new MissingParamError('id')); }); test('Should throw if no parameter data is provided', () => { const sut = makeSut(); const promise = sut.update(newId); expect(promise).rejects.toThrow(new MissingParamError('data')); }); });
const ReturnEditRoutePage = { template: ` <el-container> <el-page-header @back="handleGoBack" content="编辑退货"> </el-page-header> <el-header> <el-menu :default-active="activeIndex" mode="horizontal" @select="handleSelect"> <el-menu-item v-for="menuItem in menuItems" :key="menuItem.id" :index="menuItem.index"> {{menuItem.name}} </el-menu-item> </el-menu> </el-header> <el-main> <router-view></router-view> </el-main> </el-container> `, data() { return { activeIndex: '', menuItems: [ { name: '退货详情', index: 'show' }, { name: '退货历史', index: 'history' } ] } }, mounted() { console.log('view mounted'); var paths = this.$route.path.split('/'); this.activeIndex = paths[paths.length - 1]; }, methods: { handleGoBack() { console.log('go back click'); this.$router.back(); }, handleSelect(val) { console.log('menu click', val); this.$router.replace(val); } } }
import { gql } from '@apollo/client' export const GET_ME = gql` { me { _id username email bookCount savedBooks { bookId authors description title image link } } } `
var countBits = function(n) { return parseInt(n, 10).toString(2).split('').sort((a, b) => b - a).lastIndexOf('1') + 1; };
'use strict'; angular.module('ssa') .factory('Facebook', function ($resource) { return $resource('/api/connect/facebook', {}, { 'fetchProfile': { url: 'api/connect/facebook/profile', method: 'GET'}, 'getFriends': { url: 'api/connect/facebook/friends', method: 'GET', isArray: true}, 'getAlbums': { url: 'api/connect/facebook/albums', method: 'GET', isArray: true}, 'fetchPhotosInAlbum': { url: 'api/connect/facebook/album/:id', method: 'GET', isArray: true}, }); });