From 3b95f6ce14511ee837c0be35f2594b58b93b56cb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 09:07:29 +0000 Subject: [PATCH] Deploy to GitHub pages --- 404.html | 20 + assets/css/0.styles.91d50dc1.css | 1 + assets/img/search.83621669.svg | 1 + assets/js/1.d8ef11a0.js | 1 + assets/js/10.b19b98cf.js | 1 + assets/js/11.13afa25d.js | 1 + assets/js/12.77e7c337.js | 1 + assets/js/13.117029d6.js | 1 + assets/js/14.2df17614.js | 1 + assets/js/15.59799ce8.js | 1 + assets/js/16.2c36b38f.js | 1 + assets/js/17.123742be.js | 1 + assets/js/18.4c170722.js | 1 + assets/js/19.11e645e0.js | 1 + assets/js/2.da7f1c5d.js | 1 + assets/js/20.86768f41.js | 1 + assets/js/21.0be6c5c1.js | 1 + assets/js/22.b071fa56.js | 1 + assets/js/23.563af740.js | 1 + assets/js/24.f02297d0.js | 1 + assets/js/25.3aaefce0.js | 1 + assets/js/26.8298df98.js | 1 + assets/js/27.b306e86e.js | 1 + assets/js/28.c308f44a.js | 1 + assets/js/29.c1931b2e.js | 1 + assets/js/3.26ebf5b5.js | 1 + assets/js/30.e9bf2e0b.js | 1 + assets/js/31.1da3108f.js | 1 + assets/js/32.09c85adc.js | 1 + assets/js/33.92d2a17e.js | 1 + assets/js/4.45665f8a.js | 1 + assets/js/5.71edaa10.js | 1 + assets/js/6.3d9dbabc.js | 1 + assets/js/7.3871d312.js | 1 + assets/js/app.64475169.js | 16 + assets/js/vendors~docsearch.5e19b665.js | 3 + head.jpg | Bin 0 -> 88053 bytes img/1640587117162.gif | Bin 0 -> 509249 bytes img/from_dataset.png | Bin 0 -> 36795 bytes img/param_mutil.png | Bin 0 -> 32808 bytes ...45\233\276\347\211\207_20211227111255.png" | Bin 0 -> 60746 bytes ...45\233\276\347\211\207_20211227111308.png" | Bin 0 -> 15078 bytes ...45\233\276\347\211\207_20211227111318.png" | Bin 0 -> 51071 bytes ...45\233\276\347\211\207_20211227111322.png" | Bin 0 -> 15044 bytes ...45\233\276\347\211\207_20211227111325.png" | Bin 0 -> 45578 bytes ...45\233\276\347\211\207_20211227111328.png" | Bin 0 -> 46233 bytes ...45\233\276\347\211\207_20211227111331.png" | Bin 0 -> 33571 bytes ...45\233\276\347\211\207_20211227111334.png" | Bin 0 -> 18901 bytes ...45\233\276\347\211\207_20211227111337.png" | Bin 0 -> 30134 bytes ...45\233\276\347\211\207_20211227111340.png" | Bin 0 -> 30134 bytes ...45\233\276\347\211\207_20211227111343.png" | Bin 0 -> 27946 bytes ...45\233\276\347\211\207_20211227111348.png" | Bin 0 -> 43766 bytes ...45\233\276\347\211\207_20211227111351.png" | Bin 0 -> 28738 bytes ...45\233\276\347\211\207_20211227111354.png" | Bin 0 -> 23198 bytes ...45\233\276\347\211\207_20211227111356.png" | Bin 0 -> 18910 bytes ...45\233\276\347\211\207_20211227111359.png" | Bin 0 -> 57639 bytes ...45\233\276\347\211\207_20211227111402.png" | Bin 0 -> 13947 bytes ...45\233\276\347\211\207_20211227111405.png" | Bin 0 -> 56957 bytes ...45\233\276\347\211\207_20211227111408.png" | Bin 0 -> 70916 bytes ...45\233\276\347\211\207_20211227111411.png" | Bin 0 -> 60895 bytes ...45\233\276\347\211\207_20211227111413.png" | Bin 0 -> 19973 bytes ...45\233\276\347\211\207_20211227111416.png" | Bin 0 -> 26785 bytes ...45\233\276\347\211\207_20211227111420.png" | Bin 0 -> 41250 bytes index.html | 43 ++ left-logo.png | Bin 0 -> 9141 bytes logo.png | Bin 0 -> 1396 bytes zh/conf/base.html | 372 ++++++++++++++++ zh/conf/how-add-function.html | 95 ++++ zh/conf/index.html | 58 +++ zh/guide/cell-prop.html | 47 ++ zh/guide/create-report.html | 58 +++ zh/guide/dataset-param.html | 78 ++++ zh/guide/function.html | 239 +++++++++++ zh/guide/getting-started.html | 62 +++ zh/guide/index.html | 39 ++ zh/guide/lang.html | 406 ++++++++++++++++++ zh/guide/other-dataset.html | 59 +++ 77 files changed, 1628 insertions(+) create mode 100644 404.html create mode 100644 assets/css/0.styles.91d50dc1.css create mode 100644 assets/img/search.83621669.svg create mode 100644 assets/js/1.d8ef11a0.js create mode 100644 assets/js/10.b19b98cf.js create mode 100644 assets/js/11.13afa25d.js create mode 100644 assets/js/12.77e7c337.js create mode 100644 assets/js/13.117029d6.js create mode 100644 assets/js/14.2df17614.js create mode 100644 assets/js/15.59799ce8.js create mode 100644 assets/js/16.2c36b38f.js create mode 100644 assets/js/17.123742be.js create mode 100644 assets/js/18.4c170722.js create mode 100644 assets/js/19.11e645e0.js create mode 100644 assets/js/2.da7f1c5d.js create mode 100644 assets/js/20.86768f41.js create mode 100644 assets/js/21.0be6c5c1.js create mode 100644 assets/js/22.b071fa56.js create mode 100644 assets/js/23.563af740.js create mode 100644 assets/js/24.f02297d0.js create mode 100644 assets/js/25.3aaefce0.js create mode 100644 assets/js/26.8298df98.js create mode 100644 assets/js/27.b306e86e.js create mode 100644 assets/js/28.c308f44a.js create mode 100644 assets/js/29.c1931b2e.js create mode 100644 assets/js/3.26ebf5b5.js create mode 100644 assets/js/30.e9bf2e0b.js create mode 100644 assets/js/31.1da3108f.js create mode 100644 assets/js/32.09c85adc.js create mode 100644 assets/js/33.92d2a17e.js create mode 100644 assets/js/4.45665f8a.js create mode 100644 assets/js/5.71edaa10.js create mode 100644 assets/js/6.3d9dbabc.js create mode 100644 assets/js/7.3871d312.js create mode 100644 assets/js/app.64475169.js create mode 100644 assets/js/vendors~docsearch.5e19b665.js create mode 100644 head.jpg create mode 100644 img/1640587117162.gif create mode 100644 img/from_dataset.png create mode 100644 img/param_mutil.png create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111255.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111308.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111318.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111322.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111325.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111328.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111331.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111334.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111337.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111340.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111343.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111348.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111351.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111354.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111356.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111359.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111402.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111405.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111408.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111411.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111413.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111416.png" create mode 100644 "img/\345\276\256\344\277\241\345\233\276\347\211\207_20211227111420.png" create mode 100644 index.html create mode 100644 left-logo.png create mode 100644 logo.png create mode 100644 zh/conf/base.html create mode 100644 zh/conf/how-add-function.html create mode 100644 zh/conf/index.html create mode 100644 zh/guide/cell-prop.html create mode 100644 zh/guide/create-report.html create mode 100644 zh/guide/dataset-param.html create mode 100644 zh/guide/function.html create mode 100644 zh/guide/getting-started.html create mode 100644 zh/guide/index.html create mode 100644 zh/guide/lang.html create mode 100644 zh/guide/other-dataset.html diff --git a/404.html b/404.html new file mode 100644 index 0000000..5ba0c42 --- /dev/null +++ b/404.html @@ -0,0 +1,20 @@ + + + + + + CellReport + + + + + + + + +

404

There's nothing here.
+ Take me home. +
+ + + diff --git a/assets/css/0.styles.91d50dc1.css b/assets/css/0.styles.91d50dc1.css new file mode 100644 index 0000000..bda55b0 --- /dev/null +++ b/assets/css/0.styles.91d50dc1.css @@ -0,0 +1 @@ +code[class*=language-],pre[class*=language-]{color:#ccc;background:none;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#999}.token.punctuation{color:#ccc}.token.attr-name,.token.deleted,.token.namespace,.token.tag{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.function,.token.number{color:#f08d49}.token.class-name,.token.constant,.token.property,.token.symbol{color:#f8c555}.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{color:#cc99cd}.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{color:#7ec699}.token.entity,.token.operator,.token.url{color:#67cdcc}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}.theme-default-content code{color:#476582;padding:.25rem .5rem;margin:0;font-size:.85em;background-color:rgba(27,31,35,.05);border-radius:3px}.theme-default-content code .token.deleted{color:#ec5975}.theme-default-content code .token.inserted{color:#3eaf7c}.theme-default-content pre,.theme-default-content pre[class*=language-]{line-height:1.4;padding:1.25rem 1.5rem;margin:.85rem 0;background-color:#282c34;border-radius:6px;overflow:auto}.theme-default-content pre[class*=language-] code,.theme-default-content pre code{color:#fff;padding:0;background-color:transparent;border-radius:0}div[class*=language-]{position:relative;background-color:#282c34;border-radius:6px}div[class*=language-] .highlight-lines{-webkit-user-select:none;user-select:none;padding-top:1.3rem;position:absolute;top:0;left:0;width:100%;line-height:1.4}div[class*=language-] .highlight-lines .highlighted{background-color:rgba(0,0,0,.66)}div[class*=language-] pre,div[class*=language-] pre[class*=language-]{background:transparent;position:relative;z-index:1}div[class*=language-]:before{position:absolute;z-index:3;top:.8em;right:1em;font-size:.75rem;color:hsla(0,0%,100%,.4)}div[class*=language-]:not(.line-numbers-mode) .line-numbers-wrapper{display:none}div[class*=language-].line-numbers-mode .highlight-lines .highlighted{position:relative}div[class*=language-].line-numbers-mode .highlight-lines .highlighted:before{content:" ";position:absolute;z-index:3;left:0;top:0;display:block;width:3.5rem;height:100%;background-color:rgba(0,0,0,.66)}div[class*=language-].line-numbers-mode pre{padding-left:4.5rem;vertical-align:middle}div[class*=language-].line-numbers-mode .line-numbers-wrapper{position:absolute;top:0;width:3.5rem;text-align:center;color:hsla(0,0%,100%,.3);padding:1.25rem 0;line-height:1.4}div[class*=language-].line-numbers-mode .line-numbers-wrapper br{-webkit-user-select:none;user-select:none}div[class*=language-].line-numbers-mode .line-numbers-wrapper .line-number{position:relative;z-index:4;-webkit-user-select:none;user-select:none;font-size:.85em}div[class*=language-].line-numbers-mode:after{content:"";position:absolute;z-index:2;top:0;left:0;width:3.5rem;height:100%;border-radius:6px 0 0 6px;border-right:1px solid rgba(0,0,0,.66);background-color:#282c34}div[class~=language-js]:before{content:"js"}div[class~=language-ts]:before{content:"ts"}div[class~=language-html]:before{content:"html"}div[class~=language-md]:before{content:"md"}div[class~=language-vue]:before{content:"vue"}div[class~=language-css]:before{content:"css"}div[class~=language-sass]:before{content:"sass"}div[class~=language-scss]:before{content:"scss"}div[class~=language-less]:before{content:"less"}div[class~=language-stylus]:before{content:"stylus"}div[class~=language-go]:before{content:"go"}div[class~=language-java]:before{content:"java"}div[class~=language-c]:before{content:"c"}div[class~=language-sh]:before{content:"sh"}div[class~=language-yaml]:before{content:"yaml"}div[class~=language-py]:before{content:"py"}div[class~=language-docker]:before{content:"docker"}div[class~=language-dockerfile]:before{content:"dockerfile"}div[class~=language-makefile]:before{content:"makefile"}div[class~=language-javascript]:before{content:"js"}div[class~=language-typescript]:before{content:"ts"}div[class~=language-markup]:before{content:"html"}div[class~=language-markdown]:before{content:"md"}div[class~=language-json]:before{content:"json"}div[class~=language-ruby]:before{content:"rb"}div[class~=language-python]:before{content:"py"}div[class~=language-bash]:before{content:"sh"}div[class~=language-php]:before{content:"php"}.custom-block .custom-block-title{font-weight:600;margin-bottom:-.4rem}.custom-block.danger,.custom-block.tip,.custom-block.warning{padding:.1rem 1.5rem;border-left-width:.5rem;border-left-style:solid;margin:1rem 0}.custom-block.tip{background-color:#f3f5f7;border-color:#42b983}.custom-block.warning{background-color:rgba(255,229,100,.3);border-color:#e7c000;color:#6b5900}.custom-block.warning .custom-block-title{color:#b29400}.custom-block.warning a{color:#2c3e50}.custom-block.danger{background-color:#ffe6e6;border-color:#c00;color:#4d0000}.custom-block.danger .custom-block-title{color:#900}.custom-block.danger a{color:#2c3e50}.custom-block.details{display:block;position:relative;border-radius:2px;margin:1.6em 0;padding:1.6em;background-color:#eee}.custom-block.details h4{margin-top:0}.custom-block.details figure:last-child,.custom-block.details p:last-child{margin-bottom:0;padding-bottom:0}.custom-block.details summary{outline:none;cursor:pointer}.arrow{display:inline-block;width:0;height:0}.arrow.up{border-bottom:6px solid #ccc}.arrow.down,.arrow.up{border-left:4px solid transparent;border-right:4px solid transparent}.arrow.down{border-top:6px solid #ccc}.arrow.right{border-left:6px solid #ccc}.arrow.left,.arrow.right{border-top:4px solid transparent;border-bottom:4px solid transparent}.arrow.left{border-right:6px solid #ccc}.theme-default-content:not(.custom){max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.theme-default-content:not(.custom){padding:2rem}}@media (max-width:419px){.theme-default-content:not(.custom){padding:1.5rem}}.table-of-contents .badge{vertical-align:middle}body,html{padding:0;margin:0;background-color:#fff}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px;color:#2c3e50}.page{padding-left:20rem}.navbar{z-index:20;right:0;height:3.6rem;background-color:#fff;box-sizing:border-box;border-bottom:1px solid #eaecef}.navbar,.sidebar-mask{position:fixed;top:0;left:0}.sidebar-mask{z-index:9;width:100vw;height:100vh;display:none}.sidebar{font-size:16px;background-color:#fff;width:20rem;position:fixed;z-index:10;margin:0;top:3.6rem;left:0;bottom:0;box-sizing:border-box;border-right:1px solid #eaecef;overflow-y:auto}.theme-default-content:not(.custom)>:first-child{margin-top:3.6rem}.theme-default-content:not(.custom) a:hover{text-decoration:underline}.theme-default-content:not(.custom) p.demo{padding:1rem 1.5rem;border:1px solid #ddd;border-radius:4px}.theme-default-content:not(.custom) img{max-width:100%}.theme-default-content.custom{padding:0;margin:0}.theme-default-content.custom img{max-width:100%}a{font-weight:500;text-decoration:none}a,p a code{color:#3eaf7c}p a code{font-weight:400}kbd{background:#eee;border:.15rem solid #ddd;border-bottom:.25rem solid #ddd;border-radius:.15rem;padding:0 .15em}blockquote{font-size:1rem;color:#999;border-left:.2rem solid #dfe2e5;margin:1rem 0;padding:.25rem 0 .25rem 1rem}blockquote>p{margin:0}ol,ul{padding-left:1.2em}strong{font-weight:600}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.25}.theme-default-content:not(.custom)>h1,.theme-default-content:not(.custom)>h2,.theme-default-content:not(.custom)>h3,.theme-default-content:not(.custom)>h4,.theme-default-content:not(.custom)>h5,.theme-default-content:not(.custom)>h6{margin-top:-3.1rem;padding-top:4.6rem;margin-bottom:0}.theme-default-content:not(.custom)>h1:first-child,.theme-default-content:not(.custom)>h2:first-child,.theme-default-content:not(.custom)>h3:first-child,.theme-default-content:not(.custom)>h4:first-child,.theme-default-content:not(.custom)>h5:first-child,.theme-default-content:not(.custom)>h6:first-child{margin-top:-1.5rem;margin-bottom:1rem}.theme-default-content:not(.custom)>h1:first-child+.custom-block,.theme-default-content:not(.custom)>h1:first-child+p,.theme-default-content:not(.custom)>h1:first-child+pre,.theme-default-content:not(.custom)>h2:first-child+.custom-block,.theme-default-content:not(.custom)>h2:first-child+p,.theme-default-content:not(.custom)>h2:first-child+pre,.theme-default-content:not(.custom)>h3:first-child+.custom-block,.theme-default-content:not(.custom)>h3:first-child+p,.theme-default-content:not(.custom)>h3:first-child+pre,.theme-default-content:not(.custom)>h4:first-child+.custom-block,.theme-default-content:not(.custom)>h4:first-child+p,.theme-default-content:not(.custom)>h4:first-child+pre,.theme-default-content:not(.custom)>h5:first-child+.custom-block,.theme-default-content:not(.custom)>h5:first-child+p,.theme-default-content:not(.custom)>h5:first-child+pre,.theme-default-content:not(.custom)>h6:first-child+.custom-block,.theme-default-content:not(.custom)>h6:first-child+p,.theme-default-content:not(.custom)>h6:first-child+pre{margin-top:2rem}h1:focus .header-anchor,h1:hover .header-anchor,h2:focus .header-anchor,h2:hover .header-anchor,h3:focus .header-anchor,h3:hover .header-anchor,h4:focus .header-anchor,h4:hover .header-anchor,h5:focus .header-anchor,h5:hover .header-anchor,h6:focus .header-anchor,h6:hover .header-anchor{opacity:1}h1{font-size:2.2rem}h2{font-size:1.65rem;padding-bottom:.3rem;border-bottom:1px solid #eaecef}h3{font-size:1.35rem}a.header-anchor{font-size:.85em;float:left;margin-left:-.87em;padding-right:.23em;margin-top:.125em;-webkit-user-select:none;user-select:none;opacity:0}a.header-anchor:focus,a.header-anchor:hover{text-decoration:none}.line-number,code,kbd{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}ol,p,ul{line-height:1.7}hr{border:0;border-top:1px solid #eaecef}table{border-collapse:collapse;margin:1rem 0;display:block;overflow-x:auto}tr{border-top:1px solid #dfe2e5}tr:nth-child(2n){background-color:#f6f8fa}td,th{border:1px solid #dfe2e5;padding:.6em 1em}.theme-container.sidebar-open .sidebar-mask{display:block}.theme-container.no-navbar .theme-default-content:not(.custom)>h1,.theme-container.no-navbar h2,.theme-container.no-navbar h3,.theme-container.no-navbar h4,.theme-container.no-navbar h5,.theme-container.no-navbar h6{margin-top:1.5rem;padding-top:0}.theme-container.no-navbar .sidebar{top:0}@media (min-width:720px){.theme-container.no-sidebar .sidebar{display:none}.theme-container.no-sidebar .page{padding-left:0}}@media (max-width:959px){.sidebar{font-size:15px;width:16.4rem}.page{padding-left:16.4rem}}@media (max-width:719px){.sidebar{top:0;padding-top:3.6rem;transform:translateX(-100%);transition:transform .2s ease}.page{padding-left:0}.theme-container.sidebar-open .sidebar{transform:translateX(0)}.theme-container.no-navbar .sidebar{padding-top:0}}@media (max-width:419px){h1{font-size:1.9rem}.theme-default-content div[class*=language-]{margin:.85rem -1.5rem;border-radius:0}}#nprogress{pointer-events:none}#nprogress .bar{background:#3eaf7c;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #3eaf7c,0 0 5px #3eaf7c;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border-color:#3eaf7c transparent transparent #3eaf7c;border-style:solid;border-width:2px;border-radius:50%;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.icon.outbound{color:#aaa;display:inline-block;vertical-align:middle;position:relative;top:-1px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.algolia-search-wrapper>span{vertical-align:middle}.algolia-search-wrapper .algolia-autocomplete{line-height:normal}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu{background-color:#fff;border:1px solid #999;border-radius:4px;font-size:16px;margin:6px 0 0;padding:4px;text-align:left}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu:before{border-color:#999}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu [class*=ds-dataset-]{border:none;padding:0}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu .ds-suggestions{margin-top:0}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu .ds-suggestion{border-bottom:1px solid #eaecef}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion--highlight{color:#2c815b}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion{border-color:#eaecef;padding:0}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--category-header{padding:5px 10px;margin-top:0;background:#3eaf7c;color:#fff;font-weight:600}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--highlight{background:hsla(0,0%,100%,.6)}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--wrapper{padding:0}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--title{font-weight:600;margin-bottom:0;color:#2c3e50}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{vertical-align:top;padding:5px 7px 5px 5px;border-color:#eaecef;background:#f1f3f5}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:after{display:none}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column-text{color:#555}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-footer{border-color:#eaecef}.algolia-search-wrapper .algolia-autocomplete .ds-cursor .algolia-docsearch-suggestion--content{background-color:#e7edf3!important;color:#2c3e50}@media (min-width:719px){.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{float:none;width:150px;min-width:150px;display:table-cell}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content{float:none;display:table-cell;width:100%;vertical-align:top}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .ds-dropdown-menu{min-width:515px!important}}@media (max-width:719px){.algolia-search-wrapper .ds-dropdown-menu{min-width:calc(100vw - 4rem)!important;max-width:calc(100vw - 4rem)!important}.algolia-search-wrapper .algolia-docsearch-suggestion--wrapper{padding:5px 7px 5px 5px!important}.algolia-search-wrapper .algolia-docsearch-suggestion--subcategory-column{padding:0!important;background:#fff!important}.algolia-search-wrapper .algolia-docsearch-suggestion--subcategory-column-text:after{content:" > ";font-size:10px;line-height:14.4px;display:inline-block;width:5px;margin:-3px 3px 0;vertical-align:middle}}.home{padding:3.6rem 2rem 0;max-width:960px;margin:0 auto;display:block}.home .hero{text-align:center}.home .hero img{max-width:100%;max-height:280px;display:block;margin:3rem auto 1.5rem}.home .hero h1{font-size:3rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.8rem auto}.home .hero .description{max-width:35rem;font-size:1.6rem;line-height:1.3;color:#6a8bad}.home .hero .action-button{display:inline-block;font-size:1.2rem;color:#fff;background-color:#3eaf7c;padding:.8rem 1.6rem;border-radius:4px;transition:background-color .1s ease;box-sizing:border-box;border-bottom:1px solid #389d70}.home .hero .action-button:hover{background-color:#4abf8a}.home .features{border-top:1px solid #eaecef;padding:1.2rem 0;margin-top:2.5rem;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:stretch;justify-content:space-between}.home .feature{flex-grow:1;flex-basis:30%;max-width:30%}.home .feature h2{font-size:1.4rem;font-weight:500;border-bottom:none;padding-bottom:0;color:#3a5169}.home .feature p{color:#4e6e8e}.home .footer{padding:2.5rem;border-top:1px solid #eaecef;text-align:center;color:#4e6e8e}@media (max-width:719px){.home .features{flex-direction:column}.home .feature{max-width:100%;padding:0 2.5rem}}@media (max-width:419px){.home{padding-left:1.5rem;padding-right:1.5rem}.home .hero img{max-height:210px;margin:2rem auto 1.2rem}.home .hero h1{font-size:2rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.2rem auto}.home .hero .description{font-size:1.2rem}.home .hero .action-button{font-size:1rem;padding:.6rem 1.2rem}.home .feature h2{font-size:1.25rem}}.search-box{display:inline-block;position:relative;margin-right:1rem}.search-box input{cursor:text;width:10rem;height:2rem;color:#4e6e8e;display:inline-block;border:1px solid #cfd4db;border-radius:2rem;font-size:.9rem;line-height:2rem;padding:0 .5rem 0 2rem;outline:none;transition:all .2s ease;background:#fff url(/CellReport/assets/img/search.83621669.svg) .6rem .5rem no-repeat;background-size:1rem}.search-box input:focus{cursor:auto;border-color:#3eaf7c}.search-box .suggestions{background:#fff;width:20rem;position:absolute;top:2rem;border:1px solid #cfd4db;border-radius:6px;padding:.4rem;list-style-type:none}.search-box .suggestions.align-right{right:0}.search-box .suggestion{line-height:1.4;padding:.4rem .6rem;border-radius:4px;cursor:pointer}.search-box .suggestion a{white-space:normal;color:#5d82a6}.search-box .suggestion a .page-title{font-weight:600}.search-box .suggestion a .header{font-size:.9em;margin-left:.25em}.search-box .suggestion.focused{background-color:#f3f4f5}.search-box .suggestion.focused a{color:#3eaf7c}@media (max-width:959px){.search-box input{cursor:pointer;width:0;border-color:transparent;position:relative}.search-box input:focus{cursor:text;left:0;width:10rem}}@media (-ms-high-contrast:none){.search-box input{height:2rem}}@media (max-width:959px) and (min-width:719px){.search-box .suggestions{left:0}}@media (max-width:719px){.search-box{margin-right:0}.search-box input{left:1rem}.search-box .suggestions{right:0}}@media (max-width:419px){.search-box .suggestions{width:calc(100vw - 4rem)}.search-box input:focus{width:8rem}}.sidebar-button{cursor:pointer;display:none;width:1.25rem;height:1.25rem;position:absolute;padding:.6rem;top:.6rem;left:1rem}.sidebar-button .icon{display:block;width:1.25rem;height:1.25rem}@media (max-width:719px){.sidebar-button{display:block}}.dropdown-enter,.dropdown-leave-to{height:0!important}.badge[data-v-15b7b770]{display:inline-block;font-size:14px;height:18px;line-height:18px;border-radius:3px;padding:0 6px;color:#fff}.badge.green[data-v-15b7b770],.badge.tip[data-v-15b7b770],.badge[data-v-15b7b770]{background-color:#42b983}.badge.error[data-v-15b7b770]{background-color:#da5961}.badge.warn[data-v-15b7b770],.badge.warning[data-v-15b7b770],.badge.yellow[data-v-15b7b770]{background-color:#e7c000}.badge+.badge[data-v-15b7b770]{margin-left:5px}.theme-code-block[data-v-759a7d02]{display:none}.theme-code-block__active[data-v-759a7d02]{display:block}.theme-code-block>pre[data-v-759a7d02]{background-color:orange}.theme-code-group__nav[data-v-deefee04]{margin-bottom:-35px;background-color:#282c34;padding-bottom:22px;border-top-left-radius:6px;border-top-right-radius:6px;padding-left:10px;padding-top:10px}.theme-code-group__ul[data-v-deefee04]{margin:auto 0;padding-left:0;display:inline-flex;list-style:none}.theme-code-group__nav-tab[data-v-deefee04]{border:0;padding:5px;cursor:pointer;background-color:transparent;font-size:.85em;line-height:1.4;color:hsla(0,0%,100%,.9);font-weight:600}.theme-code-group__nav-tab-active[data-v-deefee04]{border-bottom:1px solid #42b983}.pre-blank[data-v-deefee04]{color:#42b983}.searchbox{display:inline-block;position:relative;width:200px;height:32px!important;white-space:nowrap;box-sizing:border-box;visibility:visible!important}.searchbox .algolia-autocomplete{display:block;width:100%;height:100%}.searchbox__wrapper{width:100%;height:100%;z-index:999;position:relative}.searchbox__input{display:inline-block;box-sizing:border-box;transition:box-shadow .4s ease,background .4s ease;border:0;border-radius:16px;box-shadow:inset 0 0 0 1px #ccc;background:#fff!important;padding:0 26px 0 32px;width:100%;height:100%;vertical-align:middle;white-space:normal;font-size:12px;-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbox__input::-webkit-search-cancel-button,.searchbox__input::-webkit-search-decoration,.searchbox__input::-webkit-search-results-button,.searchbox__input::-webkit-search-results-decoration{display:none}.searchbox__input:hover{box-shadow:inset 0 0 0 1px #b3b3b3}.searchbox__input:active,.searchbox__input:focus{outline:0;box-shadow:inset 0 0 0 1px #aaa;background:#fff}.searchbox__input::-moz-placeholder{color:#aaa}.searchbox__input::placeholder{color:#aaa}.searchbox__submit{position:absolute;top:0;margin:0;border:0;border-radius:16px 0 0 16px;background-color:rgba(69,142,225,0);padding:0;width:32px;height:100%;vertical-align:middle;text-align:center;font-size:inherit;-webkit-user-select:none;-moz-user-select:none;user-select:none;right:inherit;left:0}.searchbox__submit:before{display:inline-block;margin-right:-4px;height:100%;vertical-align:middle;content:""}.searchbox__submit:active,.searchbox__submit:hover{cursor:pointer}.searchbox__submit:focus{outline:0}.searchbox__submit svg{width:14px;height:14px;vertical-align:middle;fill:#6d7e96}.searchbox__reset{display:block;position:absolute;top:8px;right:8px;margin:0;border:0;background:none;cursor:pointer;padding:0;font-size:inherit;-webkit-user-select:none;-moz-user-select:none;user-select:none;fill:rgba(0,0,0,.5)}.searchbox__reset.hide{display:none}.searchbox__reset:focus{outline:0}.searchbox__reset svg{display:block;margin:4px;width:8px;height:8px}.searchbox__input:valid~.searchbox__reset{display:block;animation-name:sbx-reset-in;animation-duration:.15s}@keyframes sbx-reset-in{0%{transform:translate3d(-20%,0,0);opacity:0}to{transform:none;opacity:1}}.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu{right:0!important;left:inherit!important}.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu:before{right:48px}.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu{left:0!important;right:inherit!important}.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu:before{left:48px}.algolia-autocomplete .ds-dropdown-menu{top:-6px;border-radius:4px;margin:6px 0 0;padding:0;text-align:left;height:auto;position:relative;background:transparent;border:none;z-index:999;max-width:600px;min-width:500px;box-shadow:0 1px 0 0 rgba(0,0,0,.2),0 2px 3px 0 rgba(0,0,0,.1)}.algolia-autocomplete .ds-dropdown-menu:before{display:block;position:absolute;content:"";width:14px;height:14px;background:#fff;z-index:1000;top:-7px;border-top:1px solid #d9d9d9;border-right:1px solid #d9d9d9;transform:rotate(-45deg);border-radius:2px}.algolia-autocomplete .ds-dropdown-menu .ds-suggestions{position:relative;z-index:1000;margin-top:8px}.algolia-autocomplete .ds-dropdown-menu .ds-suggestions a:hover{text-decoration:none}.algolia-autocomplete .ds-dropdown-menu .ds-suggestion{cursor:pointer}.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion.suggestion-layout-simple,.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion:not(.suggestion-layout-simple) .algolia-docsearch-suggestion--content{background-color:rgba(69,142,225,.05)}.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-]{position:relative;border:1px solid #d9d9d9;background:#fff;border-radius:4px;overflow:auto;padding:0 8px 8px}.algolia-autocomplete .ds-dropdown-menu *{box-sizing:border-box}.algolia-autocomplete .algolia-docsearch-suggestion{display:block;position:relative;padding:0 8px;background:#fff;color:#02060c;overflow:hidden}.algolia-autocomplete .algolia-docsearch-suggestion--highlight{color:#174d8c;background:rgba(143,187,237,.1);padding:.1em .05em}.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl0 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl1 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight{padding:0 0 1px;background:inherit;box-shadow:inset 0 -2px 0 0 rgba(69,142,225,.8);color:inherit}.algolia-autocomplete .algolia-docsearch-suggestion--content{display:block;float:right;width:70%;position:relative;padding:5.33333px 0 5.33333px 10.66667px;cursor:pointer}.algolia-autocomplete .algolia-docsearch-suggestion--content:before{content:"";position:absolute;display:block;top:0;height:100%;width:1px;background:#ddd;left:-1px}.algolia-autocomplete .algolia-docsearch-suggestion--category-header{position:relative;border-bottom:1px solid #ddd;display:none;margin-top:8px;padding:4px 0;font-size:1em;color:#33363d}.algolia-autocomplete .algolia-docsearch-suggestion--wrapper{width:100%;float:left;padding:8px 0 0}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column{float:left;width:30%;text-align:right;position:relative;padding:5.33333px 10.66667px;color:#a4a7ae;font-size:.9em;word-wrap:break-word}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column:before{content:"";position:absolute;display:block;top:0;height:100%;width:1px;background:#ddd;right:0}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-inline{display:none}.algolia-autocomplete .algolia-docsearch-suggestion--title{margin-bottom:4px;color:#02060c;font-size:.9em;font-weight:700}.algolia-autocomplete .algolia-docsearch-suggestion--text{display:block;line-height:1.2em;font-size:.85em;color:#63676d}.algolia-autocomplete .algolia-docsearch-suggestion--no-results{width:100%;padding:8px 0;text-align:center;font-size:1.2em}.algolia-autocomplete .algolia-docsearch-suggestion--no-results:before{display:none}.algolia-autocomplete .algolia-docsearch-suggestion code{padding:1px 5px;font-size:90%;border:none;color:#222;background-color:#ebebeb;border-radius:3px;font-family:Menlo,Monaco,Consolas,Courier New,monospace}.algolia-autocomplete .algolia-docsearch-suggestion code .algolia-docsearch-suggestion--highlight{background:none}.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__main .algolia-docsearch-suggestion--category-header,.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__secondary{display:block}@media (min-width:768px){.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{display:block}}@media (max-width:768px){.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{display:inline-block;width:auto;float:left;padding:0;color:#02060c;font-size:.9em;font-weight:700;text-align:left;opacity:.5}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:before{display:none}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:after{content:"|"}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content{display:inline-block;width:auto;text-align:left;float:left;padding:0}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content:before{display:none}}.algolia-autocomplete .suggestion-layout-simple.algolia-docsearch-suggestion{border-bottom:1px solid #eee;padding:8px;margin:0}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content{width:100%;padding:0}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content:before{display:none}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header{margin:0;padding:0;display:block;width:100%;border:none}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl0,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1{opacity:.6;font-size:.85em}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1:before{background-image:url('data:image/svg+xml;utf8,');content:"";width:10px;height:10px;display:inline-block}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--wrapper{width:100%;float:left;margin:0;padding:0}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--duplicate-content,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--subcategory-inline{display:none!important}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title{margin:0;color:#458ee1;font-size:.9em;font-weight:400}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title:before{content:"#";font-weight:700;color:#458ee1;display:inline-block}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text{margin:4px 0 0;display:block;line-height:1.4em;padding:5.33333px 8px;background:#f8f8f8;font-size:.85em;opacity:.8}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight{color:#3f4145;font-weight:700;box-shadow:none}.algolia-autocomplete .algolia-docsearch-footer{width:134px;height:20px;z-index:2000;margin-top:10.66667px;float:right;font-size:0;line-height:0}.algolia-autocomplete .algolia-docsearch-footer--logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='168' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M78.988.938h16.594a2.968 2.968 0 012.966 2.966V20.5a2.967 2.967 0 01-2.966 2.964H78.988a2.967 2.967 0 01-2.966-2.964V3.897A2.961 2.961 0 0178.988.938zm41.937 17.866c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 00-1.574-.199 5.7 5.7 0 00-.897.069 2.699 2.699 0 00-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 01-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 01-1.471-.636 3.085 3.085 0 01-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 011.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 011.82-.185 8.404 8.404 0 011.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 00-.384-.73 1.784 1.784 0 00-.724-.493 3.164 3.164 0 00-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 00-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 012.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 00-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 00-.814.24 1.46 1.46 0 00-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 01.233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 01-1.471-.635 3.085 3.085 0 01-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 012.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 00-.109-.875 1.873 1.873 0 00-.384-.731 1.784 1.784 0 00-.724-.492 3.165 3.165 0 00-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 00-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 012.073-.177zm-8.034-1.271a1.626 1.626 0 01-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 01-1.128 1.906 4.986 4.986 0 01-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 01-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 01-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 011.15-1.892 5.133 5.133 0 011.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 011.753 1.216 5.644 5.644 0 011.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 00-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 01-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 01-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 012.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17z' fill='%235468FF'/%3E%3Cpath d='M6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 00-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 01-.582-.271 13.67 13.67 0 01-.55-.287 4.275 4.275 0 01-.567-.351 6.92 6.92 0 01-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 01-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 00-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 00-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 00-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 01-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z' fill='%235D6494'/%3E%3Cpath d='M89.632 5.967v-.772a.978.978 0 00-.978-.977h-2.28a.978.978 0 00-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 011.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 00-1.382 0l-.465.465a.973.973 0 000 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 00-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 01-4.49-4.482 4.488 4.488 0 014.49-4.482 4.488 4.488 0 014.489 4.482 4.484 4.484 0 01-4.49 4.482m0-10.85a6.363 6.363 0 100 12.729 6.37 6.37 0 006.372-6.368 6.358 6.358 0 00-6.371-6.36' fill='%23FFF'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;background-position:50%;background-size:100%;overflow:hidden;text-indent:-9000px;padding:0!important;width:100%;height:100%;display:block}.dropdown-wrapper{cursor:pointer}.dropdown-wrapper .dropdown-title,.dropdown-wrapper .mobile-dropdown-title{display:block;font-size:.9rem;font-family:inherit;cursor:inherit;padding:inherit;line-height:1.4rem;background:transparent;border:none;font-weight:500;color:#2c3e50}.dropdown-wrapper .dropdown-title:hover,.dropdown-wrapper .mobile-dropdown-title:hover{border-color:transparent}.dropdown-wrapper .dropdown-title .arrow,.dropdown-wrapper .mobile-dropdown-title .arrow{vertical-align:middle;margin-top:-1px;margin-left:.4rem}.dropdown-wrapper .mobile-dropdown-title{display:none;font-weight:600}.dropdown-wrapper .mobile-dropdown-title font-size inherit:hover{color:#3eaf7c}.dropdown-wrapper .nav-dropdown .dropdown-item{color:inherit;line-height:1.7rem}.dropdown-wrapper .nav-dropdown .dropdown-item h4{margin:.45rem 0 0;border-top:1px solid #eee;padding:1rem 1.5rem .45rem 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper{padding:0;list-style:none}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper .dropdown-subitem{font-size:.9em}.dropdown-wrapper .nav-dropdown .dropdown-item a{display:block;line-height:1.7rem;position:relative;border-bottom:none;font-weight:400;margin-bottom:0;padding:0 1.5rem 0 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active,.dropdown-wrapper .nav-dropdown .dropdown-item a:hover{color:#3eaf7c}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{content:"";width:0;height:0;border-left:5px solid #3eaf7c;border-top:3px solid transparent;border-bottom:3px solid transparent;position:absolute;top:calc(50% - 2px);left:9px}.dropdown-wrapper .nav-dropdown .dropdown-item:first-child h4{margin-top:0;padding-top:0;border-top:0}@media (max-width:719px){.dropdown-wrapper.open .dropdown-title{margin-bottom:.5rem}.dropdown-wrapper .dropdown-title{display:none}.dropdown-wrapper .mobile-dropdown-title{display:block}.dropdown-wrapper .nav-dropdown{transition:height .1s ease-out;overflow:hidden}.dropdown-wrapper .nav-dropdown .dropdown-item h4{border-top:0;margin-top:0;padding-top:0}.dropdown-wrapper .nav-dropdown .dropdown-item>a,.dropdown-wrapper .nav-dropdown .dropdown-item h4{font-size:15px;line-height:2rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem{font-size:14px;padding-left:1rem}}@media (min-width:719px){.dropdown-wrapper{height:1.8rem}.dropdown-wrapper.open .nav-dropdown,.dropdown-wrapper:hover .nav-dropdown{display:block!important}.dropdown-wrapper .nav-dropdown{display:none;height:auto!important;box-sizing:border-box;max-height:calc(100vh - 2.7rem);overflow-y:auto;position:absolute;top:100%;right:0;background-color:#fff;padding:.6rem 0;border:1px solid;border-color:#ddd #ddd #ccc;text-align:left;border-radius:.25rem;white-space:nowrap;margin:0}}.nav-links{display:inline-block}.nav-links a{line-height:1.4rem;color:inherit}.nav-links a.router-link-active,.nav-links a:hover{color:#3eaf7c}.nav-links .nav-item{position:relative;display:inline-block;margin-left:1.5rem;line-height:2rem}.nav-links .nav-item:first-child{margin-left:0}.nav-links .repo-link{margin-left:1.5rem}@media (max-width:719px){.nav-links .nav-item,.nav-links .repo-link{margin-left:0}}@media (min-width:719px){.nav-links a.router-link-active,.nav-links a:hover{color:#2c3e50}.nav-item>a:not(.external).router-link-active,.nav-item>a:not(.external):hover{margin-bottom:-2px;border-bottom:2px solid #46bd87}}.navbar{padding:.7rem 1.5rem;line-height:2.2rem}.navbar a,.navbar img,.navbar span{display:inline-block}.navbar .logo{height:2.2rem;min-width:2.2rem;margin-right:.8rem;vertical-align:top}.navbar .site-name{font-size:1.3rem;font-weight:600;color:#2c3e50;position:relative}.navbar .links{padding-left:1.5rem;box-sizing:border-box;background-color:#fff;white-space:nowrap;font-size:.9rem;position:absolute;right:1.5rem;top:.7rem;display:flex}.navbar .links .search-box{flex:0 0 auto;vertical-align:top}@media (max-width:719px){.navbar{padding-left:4rem}.navbar .can-hide{display:none}.navbar .links{padding-left:1.5rem}.navbar .site-name{width:calc(100vw - 9.4rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}.page-edit{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-edit{padding:2rem}}@media (max-width:419px){.page-edit{padding:1.5rem}}.page-edit{padding-top:1rem;padding-bottom:1rem;overflow:auto}.page-edit .edit-link{display:inline-block}.page-edit .edit-link a{color:#4e6e8e;margin-right:.25rem}.page-edit .last-updated{float:right;font-size:.9em}.page-edit .last-updated .prefix{font-weight:500;color:#4e6e8e}.page-edit .last-updated .time{font-weight:400;color:#767676}@media (max-width:719px){.page-edit .edit-link{margin-bottom:.5rem}.page-edit .last-updated{font-size:.8em;float:none;text-align:left}}.page-nav{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-nav{padding:2rem}}@media (max-width:419px){.page-nav{padding:1.5rem}}.page-nav{padding-top:1rem;padding-bottom:0}.page-nav .inner{min-height:2rem;margin-top:0;border-top:1px solid #eaecef;padding-top:1rem;overflow:auto}.page-nav .next{float:right}.page{padding-bottom:2rem;display:block}.sidebar-group .sidebar-group{padding-left:.5em}.sidebar-group:not(.collapsable) .sidebar-heading:not(.clickable){cursor:auto;color:inherit}.sidebar-group.is-sub-group{padding-left:0}.sidebar-group.is-sub-group>.sidebar-heading{font-size:.95em;line-height:1.4;font-weight:400;padding-left:2rem}.sidebar-group.is-sub-group>.sidebar-heading:not(.clickable){opacity:.5}.sidebar-group.is-sub-group>.sidebar-group-items{padding-left:1rem}.sidebar-group.is-sub-group>.sidebar-group-items>li>.sidebar-link{font-size:.95em;border-left:none}.sidebar-group.depth-2>.sidebar-heading{border-left:none}.sidebar-heading{color:#2c3e50;transition:color .15s ease;cursor:pointer;font-size:1.1em;font-weight:700;padding:.35rem 1.5rem .35rem 1.25rem;width:100%;box-sizing:border-box;margin:0;border-left:.25rem solid transparent}.sidebar-heading.open,.sidebar-heading:hover{color:inherit}.sidebar-heading .arrow{position:relative;top:-.12em;left:.5em}.sidebar-heading.clickable.active{font-weight:600;color:#3eaf7c;border-left-color:#3eaf7c}.sidebar-heading.clickable:hover{color:#3eaf7c}.sidebar-group-items{transition:height .1s ease-out;font-size:.95em;overflow:hidden}.sidebar .sidebar-sub-headers{padding-left:1rem;font-size:.95em}a.sidebar-link{font-size:1em;font-weight:400;display:inline-block;color:#2c3e50;border-left:.25rem solid transparent;padding:.35rem 1rem .35rem 1.25rem;line-height:1.4;width:100%;box-sizing:border-box}a.sidebar-link:hover{color:#3eaf7c}a.sidebar-link.active{font-weight:600;color:#3eaf7c;border-left-color:#3eaf7c}.sidebar-group a.sidebar-link{padding-left:2rem}.sidebar-sub-headers a.sidebar-link{padding-top:.25rem;padding-bottom:.25rem;border-left:none}.sidebar-sub-headers a.sidebar-link.active{font-weight:500}.sidebar ul{padding:0;margin:0;list-style-type:none}.sidebar a{display:inline-block}.sidebar .nav-links{display:none;border-bottom:1px solid #eaecef;padding:.5rem 0 .75rem}.sidebar .nav-links a{font-weight:600}.sidebar .nav-links .nav-item,.sidebar .nav-links .repo-link{display:block;line-height:1.25rem;font-size:1.1em;padding:.5rem 0 .5rem 1.5rem}.sidebar>.sidebar-links{padding:1.5rem 0}.sidebar>.sidebar-links>li>a.sidebar-link{font-size:1.1em;line-height:1.7;font-weight:700}.sidebar>.sidebar-links>li:not(:first-child){margin-top:.75rem}@media (max-width:719px){.sidebar .nav-links{display:block}.sidebar .nav-links .dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{top:calc(1rem - 2px)}.sidebar>.sidebar-links{padding:1rem 0}} \ No newline at end of file diff --git a/assets/img/search.83621669.svg b/assets/img/search.83621669.svg new file mode 100644 index 0000000..03d8391 --- /dev/null +++ b/assets/img/search.83621669.svg @@ -0,0 +1 @@ + diff --git a/assets/js/1.d8ef11a0.js b/assets/js/1.d8ef11a0.js new file mode 100644 index 0000000..39ce33c --- /dev/null +++ b/assets/js/1.d8ef11a0.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[1,12,14,19,20,21],{239:function(t,e,n){"use strict";n.d(e,"d",(function(){return s})),n.d(e,"a",(function(){return r})),n.d(e,"i",(function(){return o})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return h})),n.d(e,"e",(function(){return f})),n.d(e,"k",(function(){return p})),n.d(e,"l",(function(){return d})),n.d(e,"c",(function(){return m})),n.d(e,"j",(function(){return k}));n(90);const s=/#.*$/,i=/\.(md|html)$/,r=/\/$/,o=/^[a-z]+:/i;function a(t){return decodeURI(t).replace(s,"").replace(i,"")}function l(t){return o.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function h(t){if(l(t))return t;const e=t.match(s),n=e?e[0]:"",i=a(t);return r.test(i)?t:i+".html"+n}function f(t,e){const n=decodeURIComponent(t.hash),i=function(t){const e=t.match(s);if(e)return e[0]}(e);if(i&&n!==i)return!1;return a(t.path)===a(e)}function p(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const s=t.charAt(0);if("/"===s)return t;if("?"===s||"#"===s)return e+t;const i=e.split("/");n&&i[i.length-1]||i.pop();const r=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,s,i=1){if("string"==typeof e)return p(n,e,s);if(Array.isArray(e))return Object.assign(p(n,e[0],s),{title:e[1]});{const r=e.children||[];return 0===r.length&&e.path?Object.assign(p(n,e.path,s),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:r.map(e=>t(e,n,s,i+1)),collapsable:!1!==e.collapsable}}}(t,i,n)):[]}return[]}function g(t){const e=m(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function m(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function k(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},240:function(t,e,n){},241:function(t,e,n){"use strict";n.r(e);var s=n(239),i={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(s.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(s.g)(this.link)||Object(s.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(s.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(s.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},r=n(14),o=Object(r.a)(i,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=o.exports},242:function(t,e,n){"use strict";n.r(e);var s={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},i=(n(243),n(14)),r=Object(i.a)(s,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=r.exports},243:function(t,e,n){"use strict";n(240)},244:function(t,e,n){},247:function(t,e,n){},251:function(t,e,n){"use strict";n(244)},254:function(t,e,n){"use strict";n.r(e);var s=n(241),i=n(242),r=n(91),o=n.n(r),a={name:"DropdownLink",components:{NavLink:s.default,DropdownTransition:i.default},props:{item:{required:!0}},data:()=>({open:!1}),computed:{dropdownAriaLabel(){return this.item.ariaLabel||this.item.text}},watch:{$route(){this.open=!1}},methods:{setOpen(t){this.open=t},isLastItemOfArray:(t,e)=>o()(e)===t,handleDropdown(){0===event.detail&&this.setOpen(!this.open)}}},l=(n(251),n(14)),u=Object(l.a)(a,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[e("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow down"})]),t._v(" "),e("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),e("DropdownTransition",[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(n,s){return e("li",{key:n.link||s,staticClass:"dropdown-item"},["links"===n.type?e("h4",[t._v("\n "+t._s(n.text)+"\n ")]):t._e(),t._v(" "),"links"===n.type?e("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(n.items,(function(s){return e("li",{key:s.link,staticClass:"dropdown-subitem"},[e("NavLink",{attrs:{item:s},on:{focusout:function(e){t.isLastItemOfArray(s,n.items)&&t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0):e("NavLink",{attrs:{item:n},on:{focusout:function(e){t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null);e.default=u.exports},257:function(t,e,n){"use strict";n(247)},258:function(t,e,n){},265:function(t,e,n){"use strict";n.r(e);var s=n(254),i=n(239),r={name:"NavLinks",components:{NavLink:n(241).default,DropdownLink:s.default},computed:{userNav(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav(){const{locales:t}=this.$site;if(t&&Object.keys(t).length>1){const e=this.$page.path,n=this.$router.options.routes,s=this.$site.themeConfig.locales||{},i={text:this.$themeLocaleConfig.selectText||"Languages",ariaLabel:this.$themeLocaleConfig.ariaLabel||"Select language",items:Object.keys(t).map(i=>{const r=t[i],o=s[i]&&s[i].label||r.lang;let a;return r.lang===this.$lang?a=e:(a=e.replace(this.$localeConfig.path,i),n.some(t=>t.path===a)||(a=i)),{text:o,link:a}})};return[...this.userNav,i]}return this.userNav},userLinks(){return(this.nav||[]).map(t=>Object.assign(Object(i.j)(t),{items:(t.items||[]).map(i.j)}))},repoLink(){const{repo:t}=this.$site.themeConfig;return t?/^https?:/.test(t)?t:"https://github.com/"+t:null},repoLabel(){if(!this.repoLink)return;if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;const t=this.repoLink.match(/^https?:\/\/[^/]+/)[0],e=["GitHub","GitLab","Bitbucket"];for(let n=0;n{let s=i()(e,"title","");return i()(e,"frontmatter.tags")&&(s+=" "+e.frontmatter.tags.join(" ")),n&&(s+=" "+n),o(t,s)};const o=(t,e)=>{const n=t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),s=new RegExp("[^\0-]"),i=t.split(/\s+/g).map(t=>t.trim()).filter(t=>!!t);if(s.test(t))return i.some(t=>e.toLowerCase().indexOf(t)>-1);{const s=t.endsWith(" ");return new RegExp(i.map((t,e)=>i.length!==e+1||s?`(?=.*\\b${n(t)}\\b)`:`(?=.*\\b${n(t)})`).join("")+".+","gi").test(e)}};var a={name:"SearchBox",data:()=>({query:"",focused:!1,focusIndex:0,placeholder:void 0}),computed:{showSuggestions(){return this.focused&&this.suggestions&&this.suggestions.length},suggestions(){const t=this.query.trim().toLowerCase();if(!t)return;const{pages:e}=this.$site,n=this.$site.themeConfig.searchMaxSuggestions||5,s=this.$localePath,i=[];for(let o=0;o=n);o++){const a=e[o];if(this.getPageLocalePath(a)===s&&this.isSearchable(a))if(r(t,a))i.push(a);else if(a.headers)for(let e=0;e=n);e++){const n=a.headers[e];n.title&&r(t,a,n.title)&&i.push(Object.assign({},a,{path:a.path+"#"+n.slug,header:n}))}}return i},alignRight(){return(this.$site.themeConfig.nav||[]).length+(this.$site.repo?1:0)<=2}},mounted(){this.placeholder=this.$site.themeConfig.searchPlaceholder||"",document.addEventListener("keydown",this.onHotkey)},beforeDestroy(){document.removeEventListener("keydown",this.onHotkey)},methods:{getPageLocalePath(t){for(const e in this.$site.locales||{})if("/"!==e&&0===t.path.indexOf(e))return e;return"/"},isSearchable(t){let e=null;return null===e||(e=Array.isArray(e)?e:new Array(e),e.filter(e=>t.path.match(e)).length>0)},onHotkey(t){t.srcElement===document.body&&["s","/"].includes(t.key)&&(this.$refs.input.focus(),t.preventDefault())},onUp(){this.showSuggestions&&(this.focusIndex>0?this.focusIndex--:this.focusIndex=this.suggestions.length-1)},onDown(){this.showSuggestions&&(this.focusIndex "+t._s(n.header.title))]):t._e()])])})),0):t._e()])}),[],!1,null,null,null).exports,c=n(283),h=n(265);function f(t,e){return t.ownerDocument.defaultView.getComputedStyle(t,null)[e]}var p={name:"Navbar",components:{SidebarButton:c.default,NavLinks:h.default,SearchBox:u,AlgoliaSearchBox:{}},data:()=>({linksWrapMaxWidth:null}),computed:{algolia(){return this.$themeLocaleConfig.algolia||this.$site.themeConfig.algolia||{}},isAlgoliaSearch(){return this.algolia&&this.algolia.apiKey&&this.algolia.indexName}},mounted(){const t=parseInt(f(this.$el,"paddingLeft"))+parseInt(f(this.$el,"paddingRight")),e=()=>{document.documentElement.clientWidth<719?this.linksWrapMaxWidth=null:this.linksWrapMaxWidth=this.$el.offsetWidth-t-(this.$refs.siteName&&this.$refs.siteName.offsetWidth||0)};e(),window.addEventListener("resize",e,!1)}},d=(n(290),Object(l.a)(p,(function(){var t=this,e=t._self._c;return e("header",{staticClass:"navbar"},[e("SidebarButton",{on:{"toggle-sidebar":function(e){return t.$emit("toggle-sidebar")}}}),t._v(" "),e("RouterLink",{staticClass:"home-link",attrs:{to:t.$localePath}},[t.$site.themeConfig.logo?e("img",{staticClass:"logo",attrs:{src:t.$withBase(t.$site.themeConfig.logo),alt:t.$siteTitle}}):t._e(),t._v(" "),t.$siteTitle?e("span",{ref:"siteName",staticClass:"site-name",class:{"can-hide":t.$site.themeConfig.logo}},[t._v(t._s(t.$siteTitle))]):t._e()]),t._v(" "),e("div",{staticClass:"links",style:t.linksWrapMaxWidth?{"max-width":t.linksWrapMaxWidth+"px"}:{}},[t.isAlgoliaSearch?e("AlgoliaSearchBox",{attrs:{options:t.algolia}}):!1!==t.$site.themeConfig.search&&!1!==t.$page.frontmatter.search?e("SearchBox"):t._e(),t._v(" "),e("NavLinks",{staticClass:"can-hide"})],1)],1)}),[],!1,null,null,null));e.default=d.exports}}]); \ No newline at end of file diff --git a/assets/js/10.b19b98cf.js b/assets/js/10.b19b98cf.js new file mode 100644 index 0000000..94381b3 --- /dev/null +++ b/assets/js/10.b19b98cf.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[10,3,12,14,18,19,21],{239:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"i",(function(){return a})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return p})),n.d(e,"e",(function(){return h})),n.d(e,"k",(function(){return d})),n.d(e,"l",(function(){return f})),n.d(e,"c",(function(){return m})),n.d(e,"j",(function(){return g}));n(90);const i=/#.*$/,s=/\.(md|html)$/,r=/\/$/,a=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(i,"").replace(s,"")}function l(t){return a.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function p(t){if(l(t))return t;const e=t.match(i),n=e?e[0]:"",s=o(t);return r.test(s)?t:s+".html"+n}function h(t,e){const n=decodeURIComponent(t.hash),s=function(t){const e=t.match(i);if(e)return e[0]}(e);if(s&&n!==s)return!1;return o(t.path)===o(e)}function d(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;const s=e.split("/");n&&s[s.length-1]||s.pop();const r=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,i,s=1){if("string"==typeof e)return d(n,e,i);if(Array.isArray(e))return Object.assign(d(n,e[0],i),{title:e[1]});{const r=e.children||[];return 0===r.length&&e.path?Object.assign(d(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:r.map(e=>t(e,n,i,s+1)),collapsable:!1!==e.collapsable}}}(t,s,n)):[]}return[]}function b(t){const e=m(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function m(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function g(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},240:function(t,e,n){},241:function(t,e,n){"use strict";n.r(e);var i=n(239),s={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(i.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},r=n(14),a=Object(r.a)(s,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=a.exports},242:function(t,e,n){"use strict";n.r(e);var i={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},s=(n(243),n(14)),r=Object(s.a)(i,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=r.exports},243:function(t,e,n){"use strict";n(240)},244:function(t,e,n){},245:function(t,e,n){},247:function(t,e,n){},250:function(t,e,n){},251:function(t,e,n){"use strict";n(244)},252:function(t,e,n){"use strict";n(245)},253:function(t,e,n){"use strict";n.r(e);var i=n(266),s=n(255),r=n(239);function a(t,e){if("group"===e.type){const n=e.path&&Object(r.e)(t,e.path),i=e.children.some(e=>"group"===e.type?a(t,e):"page"===e.type&&Object(r.e)(t,e.path));return n||i}return!1}var o={name:"SidebarLinks",components:{SidebarGroup:i.default,SidebarLink:s.default},props:["items","depth","sidebarDepth","initialOpenGroupIndex"],data(){return{openGroupIndex:this.initialOpenGroupIndex||0}},watch:{$route(){this.refreshIndex()}},created(){this.refreshIndex()},methods:{refreshIndex(){const t=function(t,e){for(let n=0;n-1&&(this.openGroupIndex=t)},toggleGroup(t){this.openGroupIndex=t===this.openGroupIndex?-1:t},isActive(t){return Object(r.e)(this.$route,t.regularPath)}}},l=n(14),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return t.items.length?e("ul",{staticClass:"sidebar-links"},t._l(t.items,(function(n,i){return e("li",{key:i},["group"===n.type?e("SidebarGroup",{attrs:{item:n,open:i===t.openGroupIndex,collapsable:n.collapsable||n.collapsible,depth:t.depth},on:{toggle:function(e){return t.toggleGroup(i)}}}):e("SidebarLink",{attrs:{"sidebar-depth":t.sidebarDepth,item:n}})],1)})),0):t._e()}),[],!1,null,null,null);e.default=u.exports},254:function(t,e,n){"use strict";n.r(e);var i=n(241),s=n(242),r=n(91),a=n.n(r),o={name:"DropdownLink",components:{NavLink:i.default,DropdownTransition:s.default},props:{item:{required:!0}},data:()=>({open:!1}),computed:{dropdownAriaLabel(){return this.item.ariaLabel||this.item.text}},watch:{$route(){this.open=!1}},methods:{setOpen(t){this.open=t},isLastItemOfArray:(t,e)=>a()(e)===t,handleDropdown(){0===event.detail&&this.setOpen(!this.open)}}},l=(n(251),n(14)),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[e("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow down"})]),t._v(" "),e("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),e("DropdownTransition",[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(n,i){return e("li",{key:n.link||i,staticClass:"dropdown-item"},["links"===n.type?e("h4",[t._v("\n "+t._s(n.text)+"\n ")]):t._e(),t._v(" "),"links"===n.type?e("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(n.items,(function(i){return e("li",{key:i.link,staticClass:"dropdown-subitem"},[e("NavLink",{attrs:{item:i},on:{focusout:function(e){t.isLastItemOfArray(i,n.items)&&t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0):e("NavLink",{attrs:{item:n},on:{focusout:function(e){t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null);e.default=u.exports},255:function(t,e,n){"use strict";n.r(e);var i=n(239);function s(t,e,n,i,s){const r={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:i,"sidebar-link":!0}};return s>2&&(r.style={"padding-left":s+"rem"}),t("RouterLink",r,n)}function r(t,e,n,a,o,l=1){return!e||l>o?null:t("ul",{class:"sidebar-sub-headers"},e.map(e=>{const u=Object(i.e)(a,n+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[s(t,n+"#"+e.slug,e.title,u,e.level-1),r(t,e.children,n,a,o,l+1)])}))}var a={functional:!0,props:["item","sidebarDepth"],render(t,{parent:{$page:e,$site:n,$route:a,$themeConfig:o,$themeLocaleConfig:l},props:{item:u,sidebarDepth:c}}){const p=Object(i.e)(a,u.path),h="auto"===u.type?p||u.children.some(t=>Object(i.e)(a,u.basePath+"#"+t.slug)):p,d="external"===u.type?function(t,e,n){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[n,t("OutboundLink")])}(t,u.path,u.title||u.path):s(t,u.path,u.title||u.path,h),f=[e.frontmatter.sidebarDepth,c,l.sidebarDepth,o.sidebarDepth,1].find(t=>void 0!==t),b=l.displayAllHeaders||o.displayAllHeaders;if("auto"===u.type)return[d,r(t,u.children,u.basePath,a,f)];if((h||b)&&u.headers&&!i.d.test(u.path)){return[d,r(t,Object(i.c)(u.headers),u.path,a,f)]}return d}},o=(n(252),n(14)),l=Object(o.a)(a,void 0,void 0,!1,null,null,null);e.default=l.exports},257:function(t,e,n){"use strict";n(247)},263:function(t,e,n){"use strict";n(250)},264:function(t,e,n){},265:function(t,e,n){"use strict";n.r(e);var i=n(254),s=n(239),r={name:"NavLinks",components:{NavLink:n(241).default,DropdownLink:i.default},computed:{userNav(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav(){const{locales:t}=this.$site;if(t&&Object.keys(t).length>1){const e=this.$page.path,n=this.$router.options.routes,i=this.$site.themeConfig.locales||{},s={text:this.$themeLocaleConfig.selectText||"Languages",ariaLabel:this.$themeLocaleConfig.ariaLabel||"Select language",items:Object.keys(t).map(s=>{const r=t[s],a=i[s]&&i[s].label||r.lang;let o;return r.lang===this.$lang?o=e:(o=e.replace(this.$localeConfig.path,s),n.some(t=>t.path===o)||(o=s)),{text:a,link:o}})};return[...this.userNav,s]}return this.userNav},userLinks(){return(this.nav||[]).map(t=>Object.assign(Object(s.j)(t),{items:(t.items||[]).map(s.j)}))},repoLink(){const{repo:t}=this.$site.themeConfig;return t?/^https?:/.test(t)?t:"https://github.com/"+t:null},repoLabel(){if(!this.repoLink)return;if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;const t=this.repoLink.match(/^https?:\/\/[^/]+/)[0],e=["GitHub","GitLab","Bitbucket"];for(let n=0;nfunction t(e,n,r,i=1){if("string"==typeof e)return d(n,e,r);if(Array.isArray(e))return Object.assign(d(n,e[0],r),{title:e[1]});{const a=e.children||[];return 0===a.length&&e.path?Object.assign(d(n,e.path,r),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map(e=>t(e,n,r,i+1)),collapsable:!1!==e.collapsable}}}(t,i,n)):[]}return[]}function g(t){const e=v(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function v(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},246:function(t,e){t.exports=function(t){return null==t}},248:function(t,e,n){},249:function(t,e,n){},259:function(t,e,n){"use strict";n(248)},260:function(t,e,n){var r=n(11),i=n(4),a=n(10);t.exports=function(t){return"string"==typeof t||!i(t)&&a(t)&&"[object String]"==r(t)}},261:function(t,e,n){"use strict";n(249)},262:function(t,e,n){},267:function(t,e,n){"use strict";n.r(e);var r=n(246),i=n.n(r),a=n(239),s={name:"PageEdit",computed:{lastUpdated(){return this.$page.lastUpdated},lastUpdatedText(){return"string"==typeof this.$themeLocaleConfig.lastUpdated?this.$themeLocaleConfig.lastUpdated:"string"==typeof this.$site.themeConfig.lastUpdated?this.$site.themeConfig.lastUpdated:"Last Updated"},editLink(){const t=i()(this.$page.frontmatter.editLink)?this.$site.themeConfig.editLinks:this.$page.frontmatter.editLink,{repo:e,docsDir:n="",docsBranch:r="master",docsRepo:a=e}=this.$site.themeConfig;return t&&a&&this.$page.relativePath?this.createEditLink(e,a,n,r,this.$page.relativePath):null},editLinkText(){return this.$themeLocaleConfig.editLinkText||this.$site.themeConfig.editLinkText||"Edit this page"}},methods:{createEditLink(t,e,n,r,i){if(/bitbucket.org/.test(e)){return e.replace(a.a,"")+"/src"+`/${r}/`+(n?n.replace(a.a,"")+"/":"")+i+`?mode=edit&spa=0&at=${r}&fileviewer=file-view-default`}if(/gitlab.com/.test(e)){return e.replace(a.a,"")+"/-/edit"+`/${r}/`+(n?n.replace(a.a,"")+"/":"")+i}return(a.i.test(e)?e:"https://github.com/"+e).replace(a.a,"")+"/edit"+`/${r}/`+(n?n.replace(a.a,"")+"/":"")+i}}},o=(n(259),n(14)),u=Object(o.a)(s,(function(){var t=this,e=t._self._c;return e("footer",{staticClass:"page-edit"},[t.editLink?e("div",{staticClass:"edit-link"},[e("a",{attrs:{href:t.editLink,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(t.editLinkText))]),t._v(" "),e("OutboundLink")],1):t._e(),t._v(" "),t.lastUpdated?e("div",{staticClass:"last-updated"},[e("span",{staticClass:"prefix"},[t._v(t._s(t.lastUpdatedText)+":")]),t._v(" "),e("span",{staticClass:"time"},[t._v(t._s(t.lastUpdated))])]):t._e()])}),[],!1,null,null,null);e.default=u.exports},268:function(t,e,n){"use strict";n.r(e);n(90);var r=n(239),i=n(260),a=n.n(i),s=n(246),o=n.n(s),u={name:"PageNav",props:["sidebarItems"],computed:{prev(){return l(c.PREV,this)},next(){return l(c.NEXT,this)}}};const c={NEXT:{resolveLink:function(t,e){return p(t,e,1)},getThemeLinkConfig:({nextLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.next},PREV:{resolveLink:function(t,e){return p(t,e,-1)},getThemeLinkConfig:({prevLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.prev}};function l(t,{$themeConfig:e,$page:n,$route:i,$site:s,sidebarItems:u}){const{resolveLink:c,getThemeLinkConfig:l,getPageLinkConfig:p}=t,f=l(e),d=p(n),h=o()(d)?f:d;return!1===h?void 0:a()(h)?Object(r.k)(s.pages,h,i.path):c(n,u)}function p(t,e,n){const r=[];!function t(e,n){for(let r=0,i=e.length;rfunction t(e,n,i,r=1){if("string"==typeof e)return f(n,e,i);if(Array.isArray(e))return Object.assign(f(n,e[0],i),{title:e[1]});{const s=e.children||[];return 0===s.length&&e.path?Object.assign(f(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:s.map(e=>t(e,n,i,r+1)),collapsable:!1!==e.collapsable}}}(t,r,n)):[]}return[]}function m(t){const e=b(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function b(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function g(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},240:function(t,e,n){},241:function(t,e,n){"use strict";n.r(e);var i=n(239),r={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(i.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},s=n(14),a=Object(s.a)(r,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=a.exports},242:function(t,e,n){"use strict";n.r(e);var i={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},r=(n(243),n(14)),s=Object(r.a)(i,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=s.exports},243:function(t,e,n){"use strict";n(240)},244:function(t,e,n){},247:function(t,e,n){},251:function(t,e,n){"use strict";n(244)},254:function(t,e,n){"use strict";n.r(e);var i=n(241),r=n(242),s=n(91),a=n.n(s),o={name:"DropdownLink",components:{NavLink:i.default,DropdownTransition:r.default},props:{item:{required:!0}},data:()=>({open:!1}),computed:{dropdownAriaLabel(){return this.item.ariaLabel||this.item.text}},watch:{$route(){this.open=!1}},methods:{setOpen(t){this.open=t},isLastItemOfArray:(t,e)=>a()(e)===t,handleDropdown(){0===event.detail&&this.setOpen(!this.open)}}},l=(n(251),n(14)),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[e("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow down"})]),t._v(" "),e("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),e("DropdownTransition",[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(n,i){return e("li",{key:n.link||i,staticClass:"dropdown-item"},["links"===n.type?e("h4",[t._v("\n "+t._s(n.text)+"\n ")]):t._e(),t._v(" "),"links"===n.type?e("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(n.items,(function(i){return e("li",{key:i.link,staticClass:"dropdown-subitem"},[e("NavLink",{attrs:{item:i},on:{focusout:function(e){t.isLastItemOfArray(i,n.items)&&t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0):e("NavLink",{attrs:{item:n},on:{focusout:function(e){t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null);e.default=u.exports},257:function(t,e,n){"use strict";n(247)},265:function(t,e,n){"use strict";n.r(e);var i=n(254),r=n(239),s={name:"NavLinks",components:{NavLink:n(241).default,DropdownLink:i.default},computed:{userNav(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav(){const{locales:t}=this.$site;if(t&&Object.keys(t).length>1){const e=this.$page.path,n=this.$router.options.routes,i=this.$site.themeConfig.locales||{},r={text:this.$themeLocaleConfig.selectText||"Languages",ariaLabel:this.$themeLocaleConfig.ariaLabel||"Select language",items:Object.keys(t).map(r=>{const s=t[r],a=i[r]&&i[r].label||s.lang;let o;return s.lang===this.$lang?o=e:(o=e.replace(this.$localeConfig.path,r),n.some(t=>t.path===o)||(o=r)),{text:a,link:o}})};return[...this.userNav,r]}return this.userNav},userLinks(){return(this.nav||[]).map(t=>Object.assign(Object(r.j)(t),{items:(t.items||[]).map(r.j)}))},repoLink(){const{repo:t}=this.$site.themeConfig;return t?/^https?:/.test(t)?t:"https://github.com/"+t:null},repoLabel(){if(!this.repoLink)return;if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;const t=this.repoLink.match(/^https?:\/\/[^/]+/)[0],e=["GitHub","GitLab","Bitbucket"];for(let n=0;n({placeholder:void 0}),watch:{$lang(e){this.update(this.options,e)},options(e){this.update(e,this.$lang)}},mounted(){this.initialize(this.options,this.$lang),this.placeholder=this.$site.themeConfig.searchPlaceholder||""},methods:{initialize(e,t){Promise.all([Promise.all([a.e(0),a.e(9)]).then(a.t.bind(null,295,7)),Promise.all([a.e(0),a.e(9)]).then(a.t.bind(null,296,7))]).then(([a])=>{a=a.default;const{algoliaOptions:i={}}=e;a(Object.assign({},e,{inputSelector:"#algolia-search-input",algoliaOptions:{...i,facetFilters:["lang:"+t].concat(i.facetFilters||[])},handleSelected:(e,t,a)=>{const{pathname:i,hash:n}=new URL(a.url),r=i.replace(this.$site.base,"/"),s=decodeURIComponent(n);this.$router.push(`${r}${s}`)}}))})},update(e,t){this.$el.innerHTML='',this.initialize(e,t)}}},n=(a(288),a(14)),r=Object(n.a)(i,(function(){var e=this._self._c;return e("form",{staticClass:"algolia-search-wrapper search-box",attrs:{id:"search-form",role:"search"}},[e("input",{staticClass:"search-query",attrs:{id:"algolia-search-input",placeholder:this.placeholder}})])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/14.2df17614.js b/assets/js/14.2df17614.js new file mode 100644 index 0000000..95ae75c --- /dev/null +++ b/assets/js/14.2df17614.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[14,19,21],{239:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return s})),n.d(e,"i",(function(){return o})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return p})),n.d(e,"e",(function(){return f})),n.d(e,"k",(function(){return h})),n.d(e,"l",(function(){return d})),n.d(e,"c",(function(){return b})),n.d(e,"j",(function(){return g}));n(90);const i=/#.*$/,r=/\.(md|html)$/,s=/\/$/,o=/^[a-z]+:/i;function a(t){return decodeURI(t).replace(i,"").replace(r,"")}function l(t){return o.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function p(t){if(l(t))return t;const e=t.match(i),n=e?e[0]:"",r=a(t);return s.test(r)?t:r+".html"+n}function f(t,e){const n=decodeURIComponent(t.hash),r=function(t){const e=t.match(i);if(e)return e[0]}(e);if(r&&n!==r)return!1;return a(t.path)===a(e)}function h(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;const r=e.split("/");n&&r[r.length-1]||r.pop();const s=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,i,r=1){if("string"==typeof e)return h(n,e,i);if(Array.isArray(e))return Object.assign(h(n,e[0],i),{title:e[1]});{const s=e.children||[];return 0===s.length&&e.path?Object.assign(h(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:s.map(e=>t(e,n,i,r+1)),collapsable:!1!==e.collapsable}}}(t,r,n)):[]}return[]}function m(t){const e=b(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function b(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function g(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},240:function(t,e,n){},241:function(t,e,n){"use strict";n.r(e);var i=n(239),r={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(i.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},s=n(14),o=Object(s.a)(r,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=o.exports},242:function(t,e,n){"use strict";n.r(e);var i={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},r=(n(243),n(14)),s=Object(r.a)(i,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=s.exports},243:function(t,e,n){"use strict";n(240)},244:function(t,e,n){},251:function(t,e,n){"use strict";n(244)},254:function(t,e,n){"use strict";n.r(e);var i=n(241),r=n(242),s=n(91),o=n.n(s),a={name:"DropdownLink",components:{NavLink:i.default,DropdownTransition:r.default},props:{item:{required:!0}},data:()=>({open:!1}),computed:{dropdownAriaLabel(){return this.item.ariaLabel||this.item.text}},watch:{$route(){this.open=!1}},methods:{setOpen(t){this.open=t},isLastItemOfArray:(t,e)=>o()(e)===t,handleDropdown(){0===event.detail&&this.setOpen(!this.open)}}},l=(n(251),n(14)),u=Object(l.a)(a,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[e("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow down"})]),t._v(" "),e("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),e("DropdownTransition",[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(n,i){return e("li",{key:n.link||i,staticClass:"dropdown-item"},["links"===n.type?e("h4",[t._v("\n "+t._s(n.text)+"\n ")]):t._e(),t._v(" "),"links"===n.type?e("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(n.items,(function(i){return e("li",{key:i.link,staticClass:"dropdown-subitem"},[e("NavLink",{attrs:{item:i},on:{focusout:function(e){t.isLastItemOfArray(i,n.items)&&t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0):e("NavLink",{attrs:{item:n},on:{focusout:function(e){t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null);e.default=u.exports}}]); \ No newline at end of file diff --git a/assets/js/15.59799ce8.js b/assets/js/15.59799ce8.js new file mode 100644 index 0000000..77d5618 --- /dev/null +++ b/assets/js/15.59799ce8.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{239:function(t,n,e){"use strict";e.d(n,"d",(function(){return r})),e.d(n,"a",(function(){return o})),e.d(n,"i",(function(){return a})),e.d(n,"f",(function(){return u})),e.d(n,"g",(function(){return c})),e.d(n,"h",(function(){return p})),e.d(n,"b",(function(){return l})),e.d(n,"e",(function(){return f})),e.d(n,"k",(function(){return h})),e.d(n,"l",(function(){return d})),e.d(n,"c",(function(){return v})),e.d(n,"j",(function(){return b}));e(90);const r=/#.*$/,i=/\.(md|html)$/,o=/\/$/,a=/^[a-z]+:/i;function s(t){return decodeURI(t).replace(r,"").replace(i,"")}function u(t){return a.test(t)}function c(t){return/^mailto:/.test(t)}function p(t){return/^tel:/.test(t)}function l(t){if(u(t))return t;const n=t.match(r),e=n?n[0]:"",i=s(t);return o.test(i)?t:i+".html"+e}function f(t,n){const e=decodeURIComponent(t.hash),i=function(t){const n=t.match(r);if(n)return n[0]}(n);if(i&&e!==i)return!1;return s(t.path)===s(n)}function h(t,n,e){if(u(n))return{type:"external",path:n};e&&(n=function(t,n,e){const r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return n+t;const i=n.split("/");e&&i[i.length-1]||i.pop();const o=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(n,e,r,i=1){if("string"==typeof n)return h(e,n,r);if(Array.isArray(n))return Object.assign(h(e,n[0],r),{title:n[1]});{const o=n.children||[];return 0===o.length&&n.path?Object.assign(h(e,n.path,r),{title:n.title}):{type:"group",path:n.path,title:n.title,sidebarDepth:n.sidebarDepth,initialOpenGroupIndex:n.initialOpenGroupIndex,children:o.map(n=>t(n,e,r,i+1)),collapsable:!1!==n.collapsable}}}(t,i,e)):[]}return[]}function g(t){const n=v(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:n.map(n=>({type:"auto",title:n.title,basePath:t.path,path:t.path+"#"+n.slug,children:n.children||[]}))}]}function v(t){let n;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?n=t:n&&(n.children||(n.children=[])).push(t)}),t.filter(t=>2===t.level)}function b(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},246:function(t,n){t.exports=function(t){return null==t}},249:function(t,n,e){},260:function(t,n,e){var r=e(11),i=e(4),o=e(10);t.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&"[object String]"==r(t)}},261:function(t,n,e){"use strict";e(249)},268:function(t,n,e){"use strict";e.r(n);e(90);var r=e(239),i=e(260),o=e.n(i),a=e(246),s=e.n(a),u={name:"PageNav",props:["sidebarItems"],computed:{prev(){return p(c.PREV,this)},next(){return p(c.NEXT,this)}}};const c={NEXT:{resolveLink:function(t,n){return l(t,n,1)},getThemeLinkConfig:({nextLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.next},PREV:{resolveLink:function(t,n){return l(t,n,-1)},getThemeLinkConfig:({prevLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.prev}};function p(t,{$themeConfig:n,$page:e,$route:i,$site:a,sidebarItems:u}){const{resolveLink:c,getThemeLinkConfig:p,getPageLinkConfig:l}=t,f=p(n),h=l(e),d=s()(h)?f:h;return!1===d?void 0:o()(d)?Object(r.k)(a.pages,d,i.path):c(e,u)}function l(t,n,e){const r=[];!function t(n,e){for(let r=0,i=n.length;rfunction t(e,n,i,r=1){if("string"==typeof e)return d(n,e,i);if(Array.isArray(e))return Object.assign(d(n,e[0],i),{title:e[1]});{const a=e.children||[];return 0===a.length&&e.path?Object.assign(d(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map(e=>t(e,n,i,r+1)),collapsable:!1!==e.collapsable}}}(t,r,n)):[]}return[]}function m(t){const e=g(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function g(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function b(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},241:function(t,e,n){"use strict";n.r(e);var i=n(239),r={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(i.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},a=n(14),s=Object(a.a)(r,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=s.exports},256:function(t,e,n){},269:function(t,e,n){"use strict";n(256)},280:function(t,e,n){"use strict";n.r(e);var i={name:"Home",components:{NavLink:n(241).default},computed:{data(){return this.$page.frontmatter},actionLink(){return{link:this.data.actionLink,text:this.data.actionText}}}},r=(n(269),n(14)),a=Object(r.a)(i,(function(){var t=this,e=t._self._c;return e("main",{staticClass:"home",attrs:{"aria-labelledby":null!==t.data.heroText?"main-title":null}},[e("header",{staticClass:"hero"},[t.data.heroImage?e("img",{attrs:{src:t.$withBase(t.data.heroImage),alt:t.data.heroAlt||"hero"}}):t._e(),t._v(" "),null!==t.data.heroText?e("h1",{attrs:{id:"main-title"}},[t._v("\n "+t._s(t.data.heroText||t.$title||"Hello")+"\n ")]):t._e(),t._v(" "),null!==t.data.tagline?e("p",{staticClass:"description"},[t._v("\n "+t._s(t.data.tagline||t.$description||"Welcome to your VuePress site")+"\n ")]):t._e(),t._v(" "),t.data.actionText&&t.data.actionLink?e("p",{staticClass:"action"},[e("NavLink",{staticClass:"action-button",attrs:{item:t.actionLink}})],1):t._e()]),t._v(" "),t.data.features&&t.data.features.length?e("div",{staticClass:"features"},t._l(t.data.features,(function(n,i){return e("div",{key:i,staticClass:"feature"},[e("h2",[t._v(t._s(n.title))]),t._v(" "),e("p",[t._v(t._s(n.details))])])})),0):t._e(),t._v(" "),e("Content",{staticClass:"theme-default-content custom"}),t._v(" "),t.data.footer?e("div",{staticClass:"footer"},[t._v("\n "+t._s(t.data.footer)+"\n ")]):e("Content",{staticClass:"footer",attrs:{"slot-key":"footer"}})],1)}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/17.123742be.js b/assets/js/17.123742be.js new file mode 100644 index 0000000..affb29d --- /dev/null +++ b/assets/js/17.123742be.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{239:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return a})),n.d(e,"i",(function(){return s})),n.d(e,"f",(function(){return c})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return l})),n.d(e,"b",(function(){return d})),n.d(e,"e",(function(){return p})),n.d(e,"k",(function(){return f})),n.d(e,"l",(function(){return h})),n.d(e,"c",(function(){return m})),n.d(e,"j",(function(){return b}));n(90);const i=/#.*$/,r=/\.(md|html)$/,a=/\/$/,s=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(i,"").replace(r,"")}function c(t){return s.test(t)}function u(t){return/^mailto:/.test(t)}function l(t){return/^tel:/.test(t)}function d(t){if(c(t))return t;const e=t.match(i),n=e?e[0]:"",r=o(t);return a.test(r)?t:r+".html"+n}function p(t,e){const n=decodeURIComponent(t.hash),r=function(t){const e=t.match(i);if(e)return e[0]}(e);if(r&&n!==r)return!1;return o(t.path)===o(e)}function f(t,e,n){if(c(e))return{type:"external",path:e};n&&(e=function(t,e,n){const i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;const r=e.split("/");n&&r[r.length-1]||r.pop();const a=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,i,r=1){if("string"==typeof e)return f(n,e,i);if(Array.isArray(e))return Object.assign(f(n,e[0],i),{title:e[1]});{const a=e.children||[];return 0===a.length&&e.path?Object.assign(f(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map(e=>t(e,n,i,r+1)),collapsable:!1!==e.collapsable}}}(t,r,n)):[]}return[]}function g(t){const e=m(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function m(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function b(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},246:function(t,e){t.exports=function(t){return null==t}},248:function(t,e,n){},259:function(t,e,n){"use strict";n(248)},267:function(t,e,n){"use strict";n.r(e);var i=n(246),r=n.n(i),a=n(239),s={name:"PageEdit",computed:{lastUpdated(){return this.$page.lastUpdated},lastUpdatedText(){return"string"==typeof this.$themeLocaleConfig.lastUpdated?this.$themeLocaleConfig.lastUpdated:"string"==typeof this.$site.themeConfig.lastUpdated?this.$site.themeConfig.lastUpdated:"Last Updated"},editLink(){const t=r()(this.$page.frontmatter.editLink)?this.$site.themeConfig.editLinks:this.$page.frontmatter.editLink,{repo:e,docsDir:n="",docsBranch:i="master",docsRepo:a=e}=this.$site.themeConfig;return t&&a&&this.$page.relativePath?this.createEditLink(e,a,n,i,this.$page.relativePath):null},editLinkText(){return this.$themeLocaleConfig.editLinkText||this.$site.themeConfig.editLinkText||"Edit this page"}},methods:{createEditLink(t,e,n,i,r){if(/bitbucket.org/.test(e)){return e.replace(a.a,"")+"/src"+`/${i}/`+(n?n.replace(a.a,"")+"/":"")+r+`?mode=edit&spa=0&at=${i}&fileviewer=file-view-default`}if(/gitlab.com/.test(e)){return e.replace(a.a,"")+"/-/edit"+`/${i}/`+(n?n.replace(a.a,"")+"/":"")+r}return(a.i.test(e)?e:"https://github.com/"+e).replace(a.a,"")+"/edit"+`/${i}/`+(n?n.replace(a.a,"")+"/":"")+r}}},o=(n(259),n(14)),c=Object(o.a)(s,(function(){var t=this,e=t._self._c;return e("footer",{staticClass:"page-edit"},[t.editLink?e("div",{staticClass:"edit-link"},[e("a",{attrs:{href:t.editLink,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(t.editLinkText))]),t._v(" "),e("OutboundLink")],1):t._e(),t._v(" "),t.lastUpdated?e("div",{staticClass:"last-updated"},[e("span",{staticClass:"prefix"},[t._v(t._s(t.lastUpdatedText)+":")]),t._v(" "),e("span",{staticClass:"time"},[t._v(t._s(t.lastUpdated))])]):t._e()])}),[],!1,null,null,null);e.default=c.exports}}]); \ No newline at end of file diff --git a/assets/js/18.4c170722.js b/assets/js/18.4c170722.js new file mode 100644 index 0000000..07ed4be --- /dev/null +++ b/assets/js/18.4c170722.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{239:function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"a",(function(){return a})),n.d(e,"i",(function(){return s})),n.d(e,"f",(function(){return o})),n.d(e,"g",(function(){return c})),n.d(e,"h",(function(){return l})),n.d(e,"b",(function(){return p})),n.d(e,"e",(function(){return f})),n.d(e,"k",(function(){return d})),n.d(e,"l",(function(){return h})),n.d(e,"c",(function(){return g})),n.d(e,"j",(function(){return m}));n(90);const r=/#.*$/,i=/\.(md|html)$/,a=/\/$/,s=/^[a-z]+:/i;function u(t){return decodeURI(t).replace(r,"").replace(i,"")}function o(t){return s.test(t)}function c(t){return/^mailto:/.test(t)}function l(t){return/^tel:/.test(t)}function p(t){if(o(t))return t;const e=t.match(r),n=e?e[0]:"",i=u(t);return a.test(i)?t:i+".html"+n}function f(t,e){const n=decodeURIComponent(t.hash),i=function(t){const e=t.match(r);if(e)return e[0]}(e);if(i&&n!==i)return!1;return u(t.path)===u(e)}function d(t,e,n){if(o(e))return{type:"external",path:e};n&&(e=function(t,e,n){const r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return e+t;const i=e.split("/");n&&i[i.length-1]||i.pop();const a=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,r,i=1){if("string"==typeof e)return d(n,e,r);if(Array.isArray(e))return Object.assign(d(n,e[0],r),{title:e[1]});{const a=e.children||[];return 0===a.length&&e.path?Object.assign(d(n,e.path,r),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map(e=>t(e,n,r,i+1)),collapsable:!1!==e.collapsable}}}(t,i,n)):[]}return[]}function b(t){const e=g(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function g(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},245:function(t,e,n){},252:function(t,e,n){"use strict";n(245)},255:function(t,e,n){"use strict";n.r(e);var r=n(239);function i(t,e,n,r,i){const a={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:r,"sidebar-link":!0}};return i>2&&(a.style={"padding-left":i+"rem"}),t("RouterLink",a,n)}function a(t,e,n,s,u,o=1){return!e||o>u?null:t("ul",{class:"sidebar-sub-headers"},e.map(e=>{const c=Object(r.e)(s,n+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[i(t,n+"#"+e.slug,e.title,c,e.level-1),a(t,e.children,n,s,u,o+1)])}))}var s={functional:!0,props:["item","sidebarDepth"],render(t,{parent:{$page:e,$site:n,$route:s,$themeConfig:u,$themeLocaleConfig:o},props:{item:c,sidebarDepth:l}}){const p=Object(r.e)(s,c.path),f="auto"===c.type?p||c.children.some(t=>Object(r.e)(s,c.basePath+"#"+t.slug)):p,d="external"===c.type?function(t,e,n){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[n,t("OutboundLink")])}(t,c.path,c.title||c.path):i(t,c.path,c.title||c.path,f),h=[e.frontmatter.sidebarDepth,l,o.sidebarDepth,u.sidebarDepth,1].find(t=>void 0!==t),b=o.displayAllHeaders||u.displayAllHeaders;if("auto"===c.type)return[d,a(t,c.children,c.basePath,s,h)];if((f||b)&&c.headers&&!r.d.test(c.path)){return[d,a(t,Object(r.c)(c.headers),c.path,s,h)]}return d}},u=(n(252),n(14)),o=Object(u.a)(s,void 0,void 0,!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/19.11e645e0.js b/assets/js/19.11e645e0.js new file mode 100644 index 0000000..ffda412 --- /dev/null +++ b/assets/js/19.11e645e0.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{240:function(t,e,n){},242:function(t,e,n){"use strict";n.r(e);var s={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},i=(n(243),n(14)),o=Object(i.a)(s,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=o.exports},243:function(t,e,n){"use strict";n(240)}}]); \ No newline at end of file diff --git a/assets/js/2.da7f1c5d.js b/assets/js/2.da7f1c5d.js new file mode 100644 index 0000000..519121c --- /dev/null +++ b/assets/js/2.da7f1c5d.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{245:function(t,e,a){},246:function(t,e){t.exports=function(t){return null==t}},248:function(t,e,a){},249:function(t,e,a){},250:function(t,e,a){},252:function(t,e,a){"use strict";a(245)},253:function(t,e,a){"use strict";a.r(e);var n=a(266),s=a(255),i=a(239);function r(t,e){if("group"===e.type){const a=e.path&&Object(i.e)(t,e.path),n=e.children.some(e=>"group"===e.type?r(t,e):"page"===e.type&&Object(i.e)(t,e.path));return a||n}return!1}var o={name:"SidebarLinks",components:{SidebarGroup:n.default,SidebarLink:s.default},props:["items","depth","sidebarDepth","initialOpenGroupIndex"],data(){return{openGroupIndex:this.initialOpenGroupIndex||0}},watch:{$route(){this.refreshIndex()}},created(){this.refreshIndex()},methods:{refreshIndex(){const t=function(t,e){for(let a=0;a-1&&(this.openGroupIndex=t)},toggleGroup(t){this.openGroupIndex=t===this.openGroupIndex?-1:t},isActive(t){return Object(i.e)(this.$route,t.regularPath)}}},l=a(14),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return t.items.length?e("ul",{staticClass:"sidebar-links"},t._l(t.items,(function(a,n){return e("li",{key:n},["group"===a.type?e("SidebarGroup",{attrs:{item:a,open:n===t.openGroupIndex,collapsable:a.collapsable||a.collapsible,depth:t.depth},on:{toggle:function(e){return t.toggleGroup(n)}}}):e("SidebarLink",{attrs:{"sidebar-depth":t.sidebarDepth,item:a}})],1)})),0):t._e()}),[],!1,null,null,null);e.default=u.exports},255:function(t,e,a){"use strict";a.r(e);var n=a(239);function s(t,e,a,n,s){const i={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:n,"sidebar-link":!0}};return s>2&&(i.style={"padding-left":s+"rem"}),t("RouterLink",i,a)}function i(t,e,a,r,o,l=1){return!e||l>o?null:t("ul",{class:"sidebar-sub-headers"},e.map(e=>{const u=Object(n.e)(r,a+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[s(t,a+"#"+e.slug,e.title,u,e.level-1),i(t,e.children,a,r,o,l+1)])}))}var r={functional:!0,props:["item","sidebarDepth"],render(t,{parent:{$page:e,$site:a,$route:r,$themeConfig:o,$themeLocaleConfig:l},props:{item:u,sidebarDepth:c}}){const p=Object(n.e)(r,u.path),d="auto"===u.type?p||u.children.some(t=>Object(n.e)(r,u.basePath+"#"+t.slug)):p,h="external"===u.type?function(t,e,a){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[a,t("OutboundLink")])}(t,u.path,u.title||u.path):s(t,u.path,u.title||u.path,d),f=[e.frontmatter.sidebarDepth,c,l.sidebarDepth,o.sidebarDepth,1].find(t=>void 0!==t),b=l.displayAllHeaders||o.displayAllHeaders;if("auto"===u.type)return[h,i(t,u.children,u.basePath,r,f)];if((d||b)&&u.headers&&!n.d.test(u.path)){return[h,i(t,Object(n.c)(u.headers),u.path,r,f)]}return h}},o=(a(252),a(14)),l=Object(o.a)(r,void 0,void 0,!1,null,null,null);e.default=l.exports},256:function(t,e,a){},259:function(t,e,a){"use strict";a(248)},260:function(t,e,a){var n=a(11),s=a(4),i=a(10);t.exports=function(t){return"string"==typeof t||!s(t)&&i(t)&&"[object String]"==n(t)}},261:function(t,e,a){"use strict";a(249)},262:function(t,e,a){},263:function(t,e,a){"use strict";a(250)},264:function(t,e,a){},266:function(t,e,a){"use strict";a.r(e);var n=a(239),s={name:"SidebarGroup",components:{DropdownTransition:a(242).default},props:["item","open","collapsable","depth"],beforeCreate(){this.$options.components.SidebarLinks=a(253).default},methods:{isActive:n.e}},i=(a(263),a(14)),r=Object(i.a)(s,(function(){var t=this,e=t._self._c;return e("section",{staticClass:"sidebar-group",class:[{collapsable:t.collapsable,"is-sub-group":0!==t.depth},"depth-"+t.depth]},[t.item.path?e("RouterLink",{staticClass:"sidebar-heading clickable",class:{open:t.open,active:t.isActive(t.$route,t.item.path)},attrs:{to:t.item.path},nativeOn:{click:function(e){return t.$emit("toggle")}}},[e("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?e("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]):e("p",{staticClass:"sidebar-heading",class:{open:t.open},on:{click:function(e){return t.$emit("toggle")}}},[e("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?e("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]),t._v(" "),e("DropdownTransition",[t.open||!t.collapsable?e("SidebarLinks",{staticClass:"sidebar-group-items",attrs:{items:t.item.children,"sidebar-depth":t.item.sidebarDepth,"initial-open-group-index":t.item.initialOpenGroupIndex,depth:t.depth+1}}):t._e()],1)],1)}),[],!1,null,null,null);e.default=r.exports},267:function(t,e,a){"use strict";a.r(e);var n=a(246),s=a.n(n),i=a(239),r={name:"PageEdit",computed:{lastUpdated(){return this.$page.lastUpdated},lastUpdatedText(){return"string"==typeof this.$themeLocaleConfig.lastUpdated?this.$themeLocaleConfig.lastUpdated:"string"==typeof this.$site.themeConfig.lastUpdated?this.$site.themeConfig.lastUpdated:"Last Updated"},editLink(){const t=s()(this.$page.frontmatter.editLink)?this.$site.themeConfig.editLinks:this.$page.frontmatter.editLink,{repo:e,docsDir:a="",docsBranch:n="master",docsRepo:i=e}=this.$site.themeConfig;return t&&i&&this.$page.relativePath?this.createEditLink(e,i,a,n,this.$page.relativePath):null},editLinkText(){return this.$themeLocaleConfig.editLinkText||this.$site.themeConfig.editLinkText||"Edit this page"}},methods:{createEditLink(t,e,a,n,s){if(/bitbucket.org/.test(e)){return e.replace(i.a,"")+"/src"+`/${n}/`+(a?a.replace(i.a,"")+"/":"")+s+`?mode=edit&spa=0&at=${n}&fileviewer=file-view-default`}if(/gitlab.com/.test(e)){return e.replace(i.a,"")+"/-/edit"+`/${n}/`+(a?a.replace(i.a,"")+"/":"")+s}return(i.i.test(e)?e:"https://github.com/"+e).replace(i.a,"")+"/edit"+`/${n}/`+(a?a.replace(i.a,"")+"/":"")+s}}},o=(a(259),a(14)),l=Object(o.a)(r,(function(){var t=this,e=t._self._c;return e("footer",{staticClass:"page-edit"},[t.editLink?e("div",{staticClass:"edit-link"},[e("a",{attrs:{href:t.editLink,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(t.editLinkText))]),t._v(" "),e("OutboundLink")],1):t._e(),t._v(" "),t.lastUpdated?e("div",{staticClass:"last-updated"},[e("span",{staticClass:"prefix"},[t._v(t._s(t.lastUpdatedText)+":")]),t._v(" "),e("span",{staticClass:"time"},[t._v(t._s(t.lastUpdated))])]):t._e()])}),[],!1,null,null,null);e.default=l.exports},268:function(t,e,a){"use strict";a.r(e);a(90);var n=a(239),s=a(260),i=a.n(s),r=a(246),o=a.n(r),l={name:"PageNav",props:["sidebarItems"],computed:{prev(){return c(u.PREV,this)},next(){return c(u.NEXT,this)}}};const u={NEXT:{resolveLink:function(t,e){return p(t,e,1)},getThemeLinkConfig:({nextLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.next},PREV:{resolveLink:function(t,e){return p(t,e,-1)},getThemeLinkConfig:({prevLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.prev}};function c(t,{$themeConfig:e,$page:a,$route:s,$site:r,sidebarItems:l}){const{resolveLink:u,getThemeLinkConfig:c,getPageLinkConfig:p}=t,d=c(e),h=p(a),f=o()(h)?d:h;return!1===f?void 0:i()(f)?Object(n.k)(r.pages,f,s.path):u(a,l)}function p(t,e,a){const n=[];!function t(e,a){for(let n=0,s=e.length;n({isSidebarOpen:!1}),computed:{shouldShowNavbar(){const{themeConfig:t}=this.$site,{frontmatter:e}=this.$page;return!1!==e.navbar&&!1!==t.navbar&&(this.$title||t.logo||t.repo||t.nav||this.$themeLocaleConfig.nav)},shouldShowSidebar(){const{frontmatter:t}=this.$page;return!t.home&&!1!==t.sidebar&&this.sidebarItems.length},sidebarItems(){return Object(o.l)(this.$page,this.$page.regularPath,this.$site,this.$localePath)},pageClasses(){const t=this.$page.frontmatter.pageClass;return[{"no-navbar":!this.shouldShowNavbar,"sidebar-open":this.isSidebarOpen,"no-sidebar":!this.shouldShowSidebar},t]}},mounted(){this.$router.afterEach(()=>{this.isSidebarOpen=!1})},methods:{toggleSidebar(t){this.isSidebarOpen="boolean"==typeof t?t:!this.isSidebarOpen,this.$emit("toggle-sidebar",this.isSidebarOpen)},onTouchStart(t){this.touchStart={x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}},onTouchEnd(t){const e=t.changedTouches[0].clientX-this.touchStart.x,a=t.changedTouches[0].clientY-this.touchStart.y;Math.abs(e)>Math.abs(a)&&Math.abs(e)>40&&(e>0&&this.touchStart.x<=80?this.toggleSidebar(!0):this.toggleSidebar(!1))}}},u=a(14),c=Object(u.a)(l,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"theme-container",class:t.pageClasses,on:{touchstart:t.onTouchStart,touchend:t.onTouchEnd}},[t.shouldShowNavbar?e("Navbar",{on:{"toggle-sidebar":t.toggleSidebar}}):t._e(),t._v(" "),e("div",{staticClass:"sidebar-mask",on:{click:function(e){return t.toggleSidebar(!1)}}}),t._v(" "),e("Sidebar",{attrs:{items:t.sidebarItems},on:{"toggle-sidebar":t.toggleSidebar},scopedSlots:t._u([{key:"top",fn:function(){return[t._t("sidebar-top")]},proxy:!0},{key:"bottom",fn:function(){return[t._t("sidebar-bottom")]},proxy:!0}],null,!0)}),t._v(" "),t.$page.frontmatter.home?e("Home"):e("Page",{attrs:{"sidebar-items":t.sidebarItems},scopedSlots:t._u([{key:"top",fn:function(){return[t._t("page-top")]},proxy:!0},{key:"bottom",fn:function(){return[t._t("page-bottom")]},proxy:!0}],null,!0)})],1)}),[],!1,null,null,null);e.default=c.exports}}]); \ No newline at end of file diff --git a/assets/js/20.86768f41.js b/assets/js/20.86768f41.js new file mode 100644 index 0000000..6a6eeea --- /dev/null +++ b/assets/js/20.86768f41.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{258:function(t,c,n){},270:function(t,c,n){"use strict";n(258)},283:function(t,c,n){"use strict";n.r(c);n(270);var i=n(14),s=Object(i.a)({},(function(){var t=this,c=t._self._c;return c("div",{staticClass:"sidebar-button",on:{click:function(c){return t.$emit("toggle-sidebar")}}},[c("svg",{staticClass:"icon",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",viewBox:"0 0 448 512"}},[c("path",{attrs:{fill:"currentColor",d:"M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"}})])])}),[],!1,null,null,null);c.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/21.0be6c5c1.js b/assets/js/21.0be6c5c1.js new file mode 100644 index 0000000..3e9fcf5 --- /dev/null +++ b/assets/js/21.0be6c5c1.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{239:function(t,n,e){"use strict";e.d(n,"d",(function(){return r})),e.d(n,"a",(function(){return s})),e.d(n,"i",(function(){return u})),e.d(n,"f",(function(){return a})),e.d(n,"g",(function(){return l})),e.d(n,"h",(function(){return c})),e.d(n,"b",(function(){return f})),e.d(n,"e",(function(){return h})),e.d(n,"k",(function(){return p})),e.d(n,"l",(function(){return d})),e.d(n,"c",(function(){return b})),e.d(n,"j",(function(){return m}));e(90);const r=/#.*$/,i=/\.(md|html)$/,s=/\/$/,u=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(r,"").replace(i,"")}function a(t){return u.test(t)}function l(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function f(t){if(a(t))return t;const n=t.match(r),e=n?n[0]:"",i=o(t);return s.test(i)?t:i+".html"+e}function h(t,n){const e=decodeURIComponent(t.hash),i=function(t){const n=t.match(r);if(n)return n[0]}(n);if(i&&e!==i)return!1;return o(t.path)===o(n)}function p(t,n,e){if(a(n))return{type:"external",path:n};e&&(n=function(t,n,e){const r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return n+t;const i=n.split("/");e&&i[i.length-1]||i.pop();const s=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(n,e,r,i=1){if("string"==typeof n)return p(e,n,r);if(Array.isArray(n))return Object.assign(p(e,n[0],r),{title:n[1]});{const s=n.children||[];return 0===s.length&&n.path?Object.assign(p(e,n.path,r),{title:n.title}):{type:"group",path:n.path,title:n.title,sidebarDepth:n.sidebarDepth,initialOpenGroupIndex:n.initialOpenGroupIndex,children:s.map(n=>t(n,e,r,i+1)),collapsable:!1!==n.collapsable}}}(t,i,e)):[]}return[]}function g(t){const n=b(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:n.map(n=>({type:"auto",title:n.title,basePath:t.path,path:t.path+"#"+n.slug,children:n.children||[]}))}]}function b(t){let n;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?n=t:n&&(n.children||(n.children=[])).push(t)}),t.filter(t=>2===t.level)}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},241:function(t,n,e){"use strict";e.r(n);var r=e(239),i={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(r.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(r.g)(this.link)||Object(r.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(r.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(r.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},s=e(14),u=Object(s.a)(i,(function(){var t=this,n=t._self._c;return t.isInternal?n("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(n){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):n("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?n("OutboundLink"):t._e()],1)}),[],!1,null,null,null);n.default=u.exports}}]); \ No newline at end of file diff --git a/assets/js/22.b071fa56.js b/assets/js/22.b071fa56.js new file mode 100644 index 0000000..cf6cf11 --- /dev/null +++ b/assets/js/22.b071fa56.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{303:function(t,e,r){"use strict";r.r(e);var a=r(14),s=Object(a.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h2",{attrs:{id:"getting-started"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#getting-started"}},[t._v("#")]),t._v(" Getting Started")]),t._v(" "),e("h3",{attrs:{id:"需要安装的软件"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#需要安装的软件"}},[t._v("#")]),t._v(" 需要安装的软件")]),t._v(" "),e("ul",[e("li",[t._v("下载安装NETCORE6 SDK 或 RUNTIME."),e("a",{attrs:{href:"https://dotnet.microsoft.com/download",target:"_blank",rel:"noopener noreferrer"}},[t._v("Download .NET (Linux, macOS, and Windows)"),e("OutboundLink")],1)]),t._v(" "),e("li",[t._v("下载安装redis(可选)。最好安装 "),e("a",{attrs:{href:"https://github.com/MicrosoftArchive/redis/releases",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://github.com/MicrosoftArchive/redis/releases"),e("OutboundLink")],1)]),t._v(" "),e("li",[e("a",{attrs:{href:"https://gitee.com/NoneDay/CellReport/releases/",target:"_blank",rel:"noopener noreferrer"}},[t._v("github下载release"),e("OutboundLink")],1),t._v(" 。")])]),t._v(" "),e("h3",{attrs:{id:"运行和配置"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#运行和配置"}},[t._v("#")]),t._v(" 运行和配置")]),t._v(" "),e("p",[t._v("假设解压安装到了d:\\cellReport。")]),t._v(" "),e("ul",[e("li",[e("ol",[e("li",[t._v("执行 start.bat")])])]),t._v(" "),e("li",[e("ol",{attrs:{start:"2"}},[e("li",[t._v("浏览器输入地址: http://127.0.0.1:5000")])])]),t._v(" "),e("li",[e("ol",{attrs:{start:"3"}},[e("li",[t._v("缺省用户名密码:admin/database!123 。管理员用户在appsetting.json中存有(最后面可以找到),可以自行修改。")])])])]),t._v(" "),e("h3",{attrs:{id:"报表组管理"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#报表组管理"}},[t._v("#")]),t._v(" 报表组管理")]),t._v(" "),e("ul",[e("li",[t._v("点报表目录,,选example,能看到所有的测试报表,可以学习基本使用方法.")]),t._v(" "),e("li",[t._v("缺省已经有了一个default组和example组。第一次登录,选报表组管理做基本的配置报表存放路径和数据库链接。可以根据不同的应用建立不同的组。报表组可以添加协助管理人员,多个用户中间用英文逗号分割。")])]),t._v(" "),e("p",[t._v("当前预安装的数据库驱动程序有:sqlServer、sqlite、Mysql、Pgsql、odbc。需要其他驱动的自行下载安装。\n"),e("img",{attrs:{src:"https://atts.w3cschool.cn/attachments/image/20211125/1637815124338385.png",alt:""}})]),t._v(" "),e("p",[t._v("配置完毕后,按F5 刷新页面,点报表目录,正常的话,这是应该能看到所有的测试报表了.")])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/23.563af740.js b/assets/js/23.563af740.js new file mode 100644 index 0000000..175246f --- /dev/null +++ b/assets/js/23.563af740.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{304:function(t,s,a){"use strict";a.r(s);var r=a(14),n=Object(r.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"概述"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#概述"}},[t._v("#")]),t._v(" 概述")]),t._v(" "),s("p",[t._v("本节主要讲解与报表制作非直接相关的配置")]),t._v(" "),s("h2",{attrs:{id:"安装数据库驱动"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#安装数据库驱动"}},[t._v("#")]),t._v(" 安装数据库驱动")]),t._v(" "),s("ul",[s("li",[t._v("缺省安装了sqlite 和 sqlServer 驱动。如果需要其他驱动,打开reportWeb目录下的appsetting.json,将合适的驱动加上就可以了.如果没有下面列出的驱动,请自行下载添加即可。")])]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Npgsql"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"dllName"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Npgsql"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"FactoryClass"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Npgsql.NpgsqlFactory"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"InstanceName"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Instance"')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"MySql"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"dllName"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"MySql.Data"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"FactoryClass"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"MySql.Data.MySqlClient.MySqlClientFactory"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"InstanceName"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Instance"')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"odbc"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"dllName"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"System.Data.Odbc"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"FactoryClass"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"System.Data.Odbc.OdbcFactory"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"InstanceName"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Instance"')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/24.f02297d0.js b/assets/js/24.f02297d0.js new file mode 100644 index 0000000..aab08bb --- /dev/null +++ b/assets/js/24.f02297d0.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{305:function(t,s,a){"use strict";a.r(s);var n=a(14),r=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"基本配置"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#基本配置"}},[t._v("#")]),t._v(" 基本配置")]),t._v(" "),s("h2",{attrs:{id:"报表制作平台的用户登录管理"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#报表制作平台的用户登录管理"}},[t._v("#")]),t._v(" 报表制作平台的用户登录管理")]),t._v(" "),s("ul",[s("li",[t._v("admin 用户登录后,在报表组管理中,选登录管理。\n我们通常已经有了成熟的用户管理系统,这时候我们可以直接将已有的用户管理引入到本平台中使用。")])]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("提示")]),t._v(" "),s("p",[t._v("传入用户名的变量分别是userid和口令password,返回为字典结构,必须有errcode,userid,username。errcode为零,表示验证成功。")])]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 以下是脚本先使用内置字典配置了两个用户:")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" userDict"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'test'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'password'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'password'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'username'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'测试用户1'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'test2'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'password'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'password'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'username'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'测试用户2'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("userDict"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("userid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("null")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("password"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),t._v("userDict"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("userid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'password'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n \t"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'errcode'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'message'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'ok'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'userid'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'test'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'username'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("userDict"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("userid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'username'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'old_result'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'ok'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'errcode'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'message'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'error'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'userid'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'test'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'username'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("userDict"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("userid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'username'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'old_result'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'error'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 引入外部已有用户管理系统的校验。这里是假设该url 需要使用 form 的post方式提交参数p_userid和p_password,实现验证")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" result"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("web_request")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'url'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'http://xx.xx.xx.xx/auth/user/login'")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'method'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'post'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'data'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'p_userid'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("userid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'p_password'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("password"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" json"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("eval")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'='")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v("result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\t\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'errcode'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("json"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("errcode"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'message'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("json"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("errmsg"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'userid'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("json"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("userid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'username'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("json"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("username"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'old_result'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n")])])]),s("h2",{attrs:{id:"报表运行前校验"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#报表运行前校验"}},[t._v("#")]),t._v(" 报表运行前校验")]),t._v(" "),s("p",[t._v("在报表组的任何目录都可以在《设置模板》中设置报表运行前的脚本(后端运行前脚本)。")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("提示")]),t._v(" "),s("p",[t._v("报表运行前后调用的钩子函数,在各个目录和报表中都可以配置。执行时遵循的原则是,先检查整个平台目录下的template.xml中的配置,然后从报表所在报表组中的根目录开始,逐个执行配置语句,配置语句中的变量和函数,在报表真正执行的时候都可以引用到。如果有重复变量或函数,距离报表最近的起作用(我们可以将之前的用临时变量保存,然后就不会被覆盖)。")])]),t._v(" "),s("p",[t._v("如果定义了函数before_exec,报表执行前将会先调用他。")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 这是一个能力演示。根据情况裁剪添加")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("before_exec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\t"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" db"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("openDb")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'testdb'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\t"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" result"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("db"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("select")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"select fresh_time,load_time from dual"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\tdb"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("close")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("param"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reportName"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test/test111.cr"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//遇见这个报表不校验")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\t"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v(" __page__"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Path"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/f10"')]),t._v(" or "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("regex_match")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'f10\\\\.cr$'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("param"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reportName"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" \n or param"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reportName "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t1/b33.cr'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t2/a22.cr'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\t\t"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" tips"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("iif")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("is_huizhong"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"当前正在汇总,可能数据不准,请稍后重新查询,"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"使用,"')]),t._v("\n\t\t\t\t"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"本次汇总完成时间"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v("result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("fresh_time"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ToString")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('",最近数据同步时间"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v("result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_time"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ToString")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\t\t"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"continue"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//继续执行标记,可以用来判断是否有权限继续执行")]),t._v("\n\t\t\t\t"),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"cache_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"report5"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//所有缓存的公共标记部分,如果返回null,将不缓存")]),t._v("\n\t\t\t\t"),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"fresh_flag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_time"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ToString")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//如果这个值改变就表示当前报表需要刷新了")]),t._v("\n\t\t\t\t"),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"tips"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("tips"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//额外的提示信息,")]),t._v("\n\t\t\t"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\t"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\t\t"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" tips"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("iif")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("is_huizhong"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"当前正在汇总,可能数据不准,请稍后重新查询,"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"使用,"')]),t._v("\n\t\t\t\t"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"本次汇总完成时间"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v("result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("fresh_time"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ToString")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('",最近数据同步时间"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v("result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_time"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ToString")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\t\t"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"continue"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//继续执行标记,可以用来判断是否有权限继续执行")]),t._v("\n\t\t\t\t"),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"cache_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"report6"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//所有缓存的公共标记部分,如果返回null,将不缓存")]),t._v("\n\t\t\t\t"),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"fresh_flag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("fresh_time"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ToString")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//如果这个值改变就表示当前报表需要刷新了")]),t._v("\n\t\t\t\t"),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v('"tips"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"===="')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v("tips "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//额外的提示信息,")]),t._v("\n\t\t\t"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\t\t\n\t"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("注意")]),t._v(" "),s("p",[s("strong",[t._v("before_exec返回的字典里:")])]),t._v(" "),s("ul",[s("li",[s("strong",[t._v("如果包含continue,并且值为false ,报表将不继续执行,向前台返回错误信息。")])]),t._v(" "),s("li",[s("strong",[t._v("包含cache_id,并且不为空,将会对报表结果缓存到redis 中。如果没有启动redis,将会报错")])]),t._v(" "),s("li",[s("strong",[t._v("如果报表需要缓存,将根据fresh_flag标记报表的基础数据是否改变,从而决定报表是否重新计算")])]),t._v(" "),s("li",[t._v("tips 是可以被前台接收到的额外提示信息。根据喜好设置内容")])])]),t._v(" "),s("h2",{attrs:{id:"如何在后台脚本中取当前请求中的参数"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#如何在后台脚本中取当前请求中的参数"}},[t._v("#")]),t._v(" 如何在后台脚本中取当前请求中的参数")]),t._v(" "),s("p",[t._v("后台脚本中取当前请求中的参数,可以方便报表系统和已有poral 门户 的集成 。\n通过nginx反向代理后,在客户的浏览器中,看到的就是同一个网址了,这时候通过类似下面的取数,就可以去到portal 中存的用户信息")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v(" __page__"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Cookies"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"access_token"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//返回字符串")]),t._v("\n __page__"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"host"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ToString")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v('//Headers中取值,一定要加上ToString转换,因为Headers["host"]存的是一个列表')]),t._v("\n __page__"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Form"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"branch_no"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//返回字符串")]),t._v("\n __page__"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Query"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"reportName"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ToString")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//类似Headers")]),t._v("\n\n__env__"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("logger"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("Info")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v(" __page__"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Cookies"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"access_token"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//- 打印日志")]),t._v("\n")])])]),s("h2",{attrs:{id:"nginx-配置样例"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nginx-配置样例"}},[t._v("#")]),t._v(" nginx 配置样例")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v('\nworker_processes 1;\n\nevents {\n worker_connections 1024;\n}\n\nhttp {\n include mime.types;\n default_type application/octet-stream;\n\n sendfile on;\n\n #gzip on;\n upstream report{\n hash $remote_addr consistent;\n server 127.0.0.1:5300 max_fails=0 weight=1;\n #server 127.0.0.1:8080 max_fails=0 weight=1;\n }\n server {\n listen 80;\n server_name localhost;\n\n location / {\n root html;\n index index.html index.htm;\n }\n\n location /report5/ { \n proxy_pass http://report/;\n client_max_body_size 100m;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection "upgrade";\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n #if ( !-e $request_filename) {\n # proxy_pass http://report/; \n #}\n }\n location /report5/static/ { \n proxy_pass http://report/static/;\n client_max_body_size 100m;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection "upgrade";\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; \n }\n location ~ /report5/(.*\\.)(js|css|png|map|svg|woff|jpg|svg|gif|ico)$ { \n alias \'D:/publish_test3/wwwroot/$2$3\';\n } \n #error_page 404 /404.html;\n\n # redirect server error pages to the static page /50x.html\n #\n error_page 500 502 503 504 /50x.html;\n location = /50x.html {\n root html;\n }\n }\n}\n\n')])])]),s("h2",{attrs:{id:"缺省参数的重置"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#缺省参数的重置"}},[t._v("#")]),t._v(" 缺省参数的重置")]),t._v(" "),s("p",[t._v("报表参数的设置过程:\n报表设计时的缺省参数---\x3eresetDefaultParam-----\x3e用户传过来的参数-----\x3elastSetParam")]),t._v(" "),s("ul",[s("li",[t._v("在《设置模板》中设置报表运行前的脚本(后端运行前脚本)添加代码:")])]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("resetDefaultParam")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("param_name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("param_row")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//param_row 参数可以动态修改参数定义,下面例子是修改下拉可选项")]),t._v("\n __env__"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("logger"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("info")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("param_name"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'---'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v("param_row"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getData")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"value"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("param_name"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"abc"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("你的判断成立"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n param_row"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("setData")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"allowCreate"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 设置为可动态添加")]),t._v("\n param_row"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("setData")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tagValueList"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'A'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'1'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'B'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'2'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 动态添加可选项")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v('// param_row.setData("Inner", true);// 设置为内部参数,前端将看不到hidden ,但后端是可用的')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// param_row.setData(\"default_value\", '1');// 设置为缺省值,或者用下行的方式返回缺省值")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'1'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//返回缺省值")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n \n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"参数的最终重置"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#参数的最终重置"}},[t._v("#")]),t._v(" 参数的最终重置")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("lastSetParam")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("name"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("param_row")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\t"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("name"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'branch_no'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//如果参数名是branch_no ,那么最终参数就是改为 xxxxx,不管用户输入的是什么,都改")]),t._v("\n\t\t"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'xxxxx'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"数据集取数完成后执行的动作"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#数据集取数完成后执行的动作"}},[t._v("#")]),t._v(" 数据集取数完成后执行的动作")]),t._v(" "),s("p",[t._v("可以定义_after_calc_dataset_这个函数,使得在数据集取数完成后,执行特定动作:")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("_after_calc_dataset_")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n _zb_var_"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("my_ds_cnt"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" 部位"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2.")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("count")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 将部位2 数据集的行数存到_zb_var_.my_ds_cnt")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n")])])]),s("h2",{attrs:{id:"前端隔行变色和条件颜色的配置"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#前端隔行变色和条件颜色的配置"}},[t._v("#")]),t._v(" 前端隔行变色和条件颜色的配置")]),t._v(" "),s("p",[t._v("全局缺省配置,在安装目录的template.xml的footer2中。可以视情况修改\n每个目录都可以设置该目录下的所有文件(包含子目录中的)的缺省显示样式。\n如果报表不想使用缺省样式,可以点报表上面的黄色条带,然后将右面的是否使用全局样式取消掉。")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 控制条件格式,如果列名按正则表达式匹配上了,就用条件样式控制当前列的显示。其他样式例子:")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v('////{column_match:".*(累计)" ,val:\'{"type":"dataBar","cellrange":[{"left":283,"width":88,"top":117,"height":25,"left_move":283,"width_move":88,"top_move":117,"height_move":25,"row":[4,4],"column":[3,3],"row_focus":4,"column_focus":3}],"format":["red","#ffffff"]}\' },')]),t._v("\nwindow"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("luckysheet_conditionformat"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n\t\t"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("column_match")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('".*(占比|率)\\$"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("val")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('\'{"type":"colorGradation","cellrange":[{ "row":[0,1],"column":[1,1] }],"format":["rgb(248, 105, 107)", "rgb(255, 235, 132)", "rgb(99, 190, 123)"] }\'')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\t"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//控制表头、隔行变色等。需要修改的是format 中的有关内容,其他不宜修改。")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// head 表头 one 奇数行 two 偶数行 fc 字体颜色 bc 单元格的背景色 foot 表尾")]),t._v("\nwindow"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("luckysheet_alternateformat_save"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('\'{"cellrange":{"row":[0,8],"column":[-1,-1]},"format":{"head":{"fc":"#000","bc":"#dff0d8"},"one":{"fc":"#000","bc":"#ffffff"},"two":{"fc":"#000","bc":"#dff0d8"},"foot":{"fc":"#000","bc":"#cef3bf"}},"hasRowHeader":true,"hasRowFooter":false}\'')]),t._v("\n\n")])])]),s("h2",{attrs:{id:"前端的公共数据"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#前端的公共数据"}},[t._v("#")]),t._v(" 前端的公共数据")]),t._v(" "),s("ul",[s("li",[t._v("前端组件的《编辑内容》中,可以使用以下参数引用后端传过来的数据.可以通过添加《动态模板》,将以下代码片段复制到内容里面做测试,以便找到适合自己使用的代码。")]),t._v(" "),s("li",[t._v("在组件中调用全局数据要使用 _this.context")])]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v(" _this"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("context"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("clickedEle"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'test'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//点击test 元素后选中的数据,这里的元素指的是页面上的可点击单元。")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//结构为:{data:deepClone(cur_data[0]),cell:cell.innerText,column}")]),t._v("\n \n _this"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("context"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("report_result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("dataSet "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//sql 结果数据,只有在设计预览状态,或设置变量_need_dataset_=True时才会有这个数据 ")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 内部为多个array ,每一个代表的都是数据集。如 context.report_result.dataSet['test'][0] 是数组。 里面才是真正的数据,第一行是表头,其他是数据")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 可以简写:")]),t._v("\n\t _this"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("dataset")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'累计'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n \n _this"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("context"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("report_result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'main'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//页面上名字叫main 的报表数据。")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 格式为:{columns:[],tableData:[],colName_lines:[0,2],extend_lines:[4,22]} ,")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tableData 存放的所有单元格的数据。colName_lines 列标题起止范围,extend_lines 明细行起止范围")]),t._v("\n _this"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("context"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("queryForm "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//当前报表参数,可以修改,然后调用下面的submit提交")]),t._v("\n _this"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("context"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rpt_this"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("submit")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//提交查询")]),t._v("\n self 配置\n \n")])])]),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("提示")]),t._v(" "),s("p",[t._v("如果运行时需要数据集的数据,但没有被传给前台,请在后端运行前设置中,加代码:"),s("code",[t._v("var _need_dataset_=true;")])])]),t._v(" "),s("div",{staticClass:"language-tip extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v('水印设置,请在后端运行前设置中,加代码`_zb_var_.watermark="abcdr"; //设置水印,可以动态赋值,方便设置工号姓名之类的动态水印`\n')])])]),s("p",[s("strong",[t._v("缺省水印配置")])]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("_zb_var_"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("watermark"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("watermark_txt")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"text"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("watermark_x")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//水印起始位置x轴坐标")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("watermark_y")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//水印起始位置Y轴坐标")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("watermark_rows")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//水印行数")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("watermark_cols")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//水印列数")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("watermark_x_space")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("100")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//水印x轴间隔")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("watermark_y_space")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//水印y轴间隔")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("watermark_color")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'#aaa'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//水印字体颜色")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("watermark_alpha")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.4")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//水印透明度")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("watermark_fontsize")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'15px'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//水印字体大小")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("watermark_font")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'微软雅黑'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//水印字体")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("watermark_width")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("110")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//水印宽度")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("watermark_height")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("40")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//水印长度")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("watermark_angle")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//水印倾斜度数")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n")])])]),s("h2",{attrs:{id:"前端动态模板数据设置"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#前端动态模板数据设置"}},[t._v("#")]),t._v(" 前端动态模板数据设置")]),t._v(" "),s("h3",{attrs:{id:"动态模板中可能会用到的数据转换"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#动态模板中可能会用到的数据转换"}},[t._v("#")]),t._v(" 动态模板中可能会用到的数据转换")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("表达式")]),t._v(" "),s("th",[t._v("解释")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v("dataset('累计')[0]")])]),t._v(" "),s("td",[t._v("取数据集:累计 的列名")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("dataset('累计').slice(1)")])]),t._v(" "),s("td",[t._v("取数据集的数据")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v("Enumerable.from(dataset('累计')).skip(1).select(x=> {return {'name':x[0],value:x[1]} }).toArray()")])]),t._v(" "),s("td",[t._v("转换数据集累计中的数据为对象:name属性对应第一列,value对应第二列 ,最后转换为数组返回")])])])]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("dv-scroll-board")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":config")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("{\n header: dataset('累计')[0],\n data: dataset('累计').slice(1)\n }"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token special-attr"}},[s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("style")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),s("span",{pre:!0,attrs:{class:"token value css language-css"}},[s("span",{pre:!0,attrs:{class:"token property"}},[t._v("width")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("100%"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),s("span",{pre:!0,attrs:{class:"token property"}},[t._v("height")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("100%"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("/>")])]),t._v("\n\n\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("dv-capsule-chart")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":config")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("{\n data: Enumerable.from(dataset('累计')).skip(1).select(x=> {return {'name':x[0],value:x[1]} }).toArray()\n}"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token special-attr"}},[s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("style")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),s("span",{pre:!0,attrs:{class:"token value css language-css"}},[s("span",{pre:!0,attrs:{class:"token property"}},[t._v("width")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("100%"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),s("span",{pre:!0,attrs:{class:"token property"}},[t._v("height")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("100%")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("/>")])]),t._v(" \n\n"),s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token tag"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("dv-conical-column-chart")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v(":config")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("{\n data: Enumerable.from(dataset('累计')).skip(1).select(x=> {\n return {'name':x[0],'value':x[1]} \n }).toArray()\n}"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token special-attr"}},[s("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("style")]),s("span",{pre:!0,attrs:{class:"token attr-value"}},[s("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),s("span",{pre:!0,attrs:{class:"token value css language-css"}},[s("span",{pre:!0,attrs:{class:"token property"}},[t._v("width")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("100%"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),s("span",{pre:!0,attrs:{class:"token property"}},[t._v("height")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("100%")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("/>")])]),t._v(" \n")])])]),s("h3",{attrs:{id:"charts中可能会用到的数据转换"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#charts中可能会用到的数据转换"}},[t._v("#")]),t._v(" charts中可能会用到的数据转换")]),t._v(" "),s("ul",[s("li",[t._v("内置了已经转换好的数据:valid_data (有效数据,参看chart文档中的dataset)")]),t._v(" "),s("li",[t._v("series_type 自动转换过来的序列类型")])]),t._v(" "),s("h2",{attrs:{id:"前端页面css和js脚本"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#前端页面css和js脚本"}},[t._v("#")]),t._v(" 前端页面css和js脚本")]),t._v(" "),s("p",[t._v("style标签包起来的部分,将会在报表展现前注入当前页面的样式表中")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("\n")])])]),s("ul",[s("li",[t._v("script标签包起来的部分,将会在报表展现前执行,如果script中定义了函数"),s("code",[t._v("after_report_show_hook")]),t._v(",那么这个函数将会在报表显示后执行")]),t._v(" "),s("li",[t._v("可以访问变量_this来动态修改里面的内容。如果不知道结构,我们可以在这个里面加入console.infp(_this),查看控制台就可以了解内部结构。")]),t._v(" "),s("li",[t._v("_this.result 代表的就是报表查询结果。")]),t._v(" "),s("li",[t._v("_this.result.pc_form 如果定义了该变量,那么pc端显示的form将会使用这个定义来显示")]),t._v(" "),s("li",[t._v("_this.result.mobile_form 如果定义了该变量,那么移动端显示的form将会使用这个定义来显示")]),t._v(" "),s("li",[t._v("_this.result.pager_template 如果定义了该变量,报表的分页器将使用模板")]),t._v(" "),s("li")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v(' + + diff --git a/left-logo.png b/left-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..24e7ff51ed5ef3b2c3c96350f8268957dc8e477b GIT binary patch literal 9141 zcmV;mBTC$fP)PyDZ%IT!RCodHT?u>@)ww@s?vjLr9RVQI0V~kZ_ZLqEc-YYw=mzM-r?p zebu&#Ta8aDT9>wNKo;wcO08Ai1A*+2fP%HMh&v)-CnO|PH!2!-$nFe%Rsoq7S+hT?hmO0s?`4hX6I3 z<9pXuPjpeXgD_@8UoxfiRg1;?$3@vwKaI3+#u&{ksLWKXJDvLFzL+s)e~j8^CrmSpF;Bw^zwPy0x>9tx)argDh$ zIJ+M8Z-!=^?p>E!q^s(Rvj5LJUt9|W1Oftq{(^vM0=bYeslBXv3rrOk1_T3w8H}uy z7<=%KGaXyh`qK+5t)2C3rUD^M3A>sxlAxCPp6SP_mt}u{#r0J7EfYBc0fB%(ApQ|B zO(5T0UimXcCVvYZ0=l|>2YcnK?ec#xN^gWf9~CSO*r#u;E6G_BY<*ErARrJB2*eWt zrU>LmKl&)S;ZWme5T;{-9c*ViBL{aAa`0!cU9u#6cSF(CZ^EM> zS_uRM0s?{9AP{v8Syr46!4twq7`LB*Cj2!_61x=AcHF$d;zf`sD; z5C{ka;tK&Os_eMrCy2sm(?LQ$c~2o5-i7gPfq+0j zAYdW_QPYtBtEgr{Yjfw52X`~lal%B7Lm+)ln&rUA)9JfZBF`<(oxVPVrlP7qKp-Fx z=yL=j6398fd~f)Pj+Prh1gq!BMSaeFfDRJ}5_0k776O4x2&JE6iS^$S73&LyGpFtg z&{Px)1Ox&Cfj&ndWPw~zu*J4rX}$uJXE(!Ed?h%JYqP+a7fNL8SsugW0gl#4M0(CP zX86j&Nt2v?j=HA9j5{{qwGo|TQd44kQPGqr`>h!BhSijb%06kLWL0)mJ?k)Wy4IKv zQA)_1H<)GL+VXTvpj-vh;aN~X2Js1Yc#|f>`$)pMgEF=s&;K@s(y9a-t<}3{vkSHi zm^@~3dtsqF?u-Y#({HUz=}fVC{HQ!C7+lO4kkRUora=?KA|7CD>YcSIhLv;*Z38+x zs|p?MI>iCAr_Qf9pUGsV!k7bCk3t{_3!}`Aa|(>6E&%iyG{N=EYF$;gB=g_E-NUh$ zuS7;CRxJ-fgE}>@VlrRC3<5s^2qOY=8)1ck$yUL!v;+(g<^Ub*C zFA~MYJA)|7wRpznqW&2O{8h&!ge@R+^^CEOom^OUfBAl9mFSH1MLGY{ z(%|W|ys}E%Yws`yN zsTOS=EF>$dEy?|ZHZM?`3sL7@^ zl4K>z?wU--jZP;2tlmo=dnNLynyKH#lXpSD`O6Q8M4wBvuvZHmjwUn57>IUyUip)F z$QJ0;!;N?0Ch~BmF+0HHTJY!_VULn+si~(qyUd4qt*WmhocY%A)=u(Tt77IX=pdegofL@q0$Eo|rOhi}rL?!hX^lM6 zSHhSxd)}FY$%HW}1lk^%JuT>!*WKgvf7<&wgYPp&Vth=-XWla%F1r8jb=8O}Ck{OX zGV&{a;8z&)28^6nU%x+JudT?B9D%97SpOaVLR1*3=@Q1|(YoU7YeNynoQv90#|w75 zbS^Z-f4jNr(rzbmVH_rx+|AVRg#h6>eOf`ysbSLhXvVcrJaCy1kZU{&Ot?tTFJGXz z_CXa_mSCX@dlQY5C<(5ShFM zEprI30Ri#pnAB4j`PL3Cr>e+t#71maLs&#SDNAj1dEnk*gN?$0`MkLnDjB~3BJ2m2 zf;spSdBRObqW9E1o3$rglE9ZGC8XSf`*v85hOR({9VsRPIXSU+HFtYQbbr@h{+n-9 zVthd3c*nSgD8)oZ0H5wa|Sxjh3yxrX*_@B>e3j^uxH| zTd6_td|=cR%HE~ZZ>bz_R3}i`W%KHW!DD1nO_8G}P~C9L-F;Bqc4U_ zOKn&F%q0!5JKUpQd!O|MvZTaBAbV)YQ5MK84U8Px9msSc34!eWlz3g&7U!(S3wxzk zw)+xK?iPD0ea>H*$O|0-m?o%mk5UY~?re|NFfm{=I~ihCBBJ)kPq) z1&DOGlpBJgrBkVewqFNc|G~9RohlJ$AE)jA1N_|{Wia7x({m9FwWG0PN56pIkB0}0 zN<&v5W3Vw1$jR`sP>;4K3uI1r*H(OR>nX~Vw%ErEuT=XNXMF?`Ql;x5e4kK1bMd^i zo>jgBE5DCH%jl1lny+VUWc}=_bXG$ zM`X4DCUX^=)iiU(oZIS>AdG*iG7AGy)Yc#KuNsL_Xx_euu0WnSCYyi4M2!jGuKni> zA8hX_IM5Kb&vp+D?*xxJSO2O1mnz=1Yht}n#GBuEz2?sBb)~t#otc_FIKgI_U_VV7 zSXY|!^QynZ)@3kW@d}48`2PPC6YIbC*A~LlaB|3Bn_%*4iyiMk*zXReu3jDPRR9`Q zdgbnX#=f7KSAC9Q9i77Id6lU!BaGa*H0wj1DiLSbH@95{p+B&P5MvX2(oslIi~SV{ zc^^TfE0DWZ({N|%zCF%N?ZsgC{#H{u|7NE`Iy?N57Ul}Su;^#<=cH<><7=T6>ths7 z30&KTVg=Y^I&B-^cC|yNETU|#CF9?V5fMRSEL;kxy~?CBEG@Z%DmP%+;cJodXw)7H zSf*&p8KJ3sWu7)KlC(QsJ7v}0G;{@WSH-?HTi9(9Ngdg{&}a8Sa};#BlaQ~s`+QN! z2`Tpf^9D#<3j|_;fZXYP2pZZc{`!W{{McW9wDN4s61hOOCBVK*{Hs0PjKX^%EITq) z*jyX21QhrY;i0h8J=wK*a!5Qqf=>G@R`;gh^TuWzWZrV8Y$QpXpVbaF3((BmOc z{)Q#f8sVI%_>@i70<^TX(@|DI74iVwr)&e8a0)bc|z!dobqeWQ~W1pDK z8zyb1*DTA9$VQ8wSU@cn@o_>jTez5OF6`3*=|+kV)~_7&M+09i`4Gxgne(e7wkh*@ z7;f&<_G2iJ$DJ+h(^fV+J@NEj`|+21j}tSzEVN^2*w0Agp)R{RvoK*l)`BC_F+l(t z-~`O|TxQfcjBS2}g;ASO%lMpt+v_6KhMM}RgOdIi!m~w_<(p*e`j9kE%C46r+v~oB zqMHL7_yIkN5XzaIuFmagc@-sT1(j#()e9$IS0Hnc#+^?dvn58)WDO(G&>CT58_)HUrKp@5lxTxz!Bkh>8XJJxfjM)sT`xSpqZ$miBe;8H9ukW;} z`Q=lM>ZoN?3o0&w8D!7;qRjnjo>^zSjJ5`#Z6{2bhb`-NBCben#=Nrm(-zeDwfP62 z<58?Dknb+9z6}q?l_`U}G)RwDCR~g^HJO|?3b8`EkM}?B8-aYhiSccwHmLoIvp^uG z2q^4|fc;xozYxfL9Pm~MXkLK%FsR8rMN#I$10;y0*#Qv@Sixqas{&0*szji?rsJz+ zsjJO-08#I%dF+dDS0eVV!ceK>e9zj-DOfzQm}eyqp``Jk`9eAK!rqrlr%NFpe%5!- z9CpIKa^~+oN?!Ze`K=llL{fu*JMJvjOlz`qlPQCSSLtEtjwid%_>){E4Cna{1Y{{w zuhp|V7IUL>CME)MFdJ|h@<%~=aAC6R06sNqC0oK0hHd|b-Wc4&bCIA*rK z`*8$drKebe_~H{YUdPzn?DG1x6$eo^%Bx6oN#`KA{;yYDPjzD@@ZkG<*Op&nOR?Oq zX=qxKugZhwyAsdWbwPIm!!tK$0EWztPWjJ>b-o3$reCI(q~*cJ2=@`lg_|}F>S$?u z4N~9E8A%?@e}le22hC)V6}19+>laO=!-;oJ9~~IonBz@HeuwTJ=%X(CT{n0hGV!_S z7RY$$Y(8-nG$U$hK6(x={Z2e3HKbacY)__I9S<);5#rO&&w*IKJP6B3wTSOj;p|ZE zWJf!G34V^?vy#WborwEqan}Jcq<^S5J05|i@?6T$5x42R7*v|^bf!(tb1?wjuht%3 zDQ)jb$4dfE)Bax9T*yMOy@C6(K#x`2wNv(%Rp8}H*6P*4PAJ)U{{Gdc3y&nSkjj)V z5HSpXug5dSJO%3&rx4cu7=-g0N-ZyqNger?QT!2~o8Qsg4z~{MB+z|u4cY8t#E=AX z&iLL5y|T@R%xy!|gof+kmKF{n z$QCPjzfxiHYkT+X{~{y5{FXU|JKPGdH$4x5eD~VQJUqxA_MBucCv~CrCKulIHJM}J z_Sn@4_pDgANq2%XybgkEmCV{Z76n&T)apwF(tlY#PG-&()GFP)u_WhVcf_o22DrwA z<=a2T^W&qDL$SEvgxplxm%K*Q7xTXm#G59=%%68&%&)nItaH?sI5y$eZD>NmtzB9BC?4}f$UUc5`NiNlt(TdFVgrrRTs@2l7_ z2^$|i=~DqljihAn+~{2=+9h&rHa7!y9cAwyASX-+Dx}gkI^$(@b2OJn8uca0fXtgT`)kFQZzB}rU;LHf2XJlr{Hip6WpS5B>7ZbE8rT_!0y!Y#0Vekt z8Qj#ddzL>k&U*POm`y9V*M`4xv-9}ZA*N3jKx>R%|JYfFx?Jxgc+}6d{JRD66Lob- z@T+?rhW8|Gp_(?+Y{9o_8k}NNyCQGb?CVMQc>?x3#l?d9gzj_RzNH=RU0YGWBx!5i zvgsR*AYfLyQ@31}^L5MOsesbnAA$j2t@bEwrDM=Xw2Q1Xh{$XT^=r0(aT*)424VJy zHq#nv+lX~CtOf6CvLi~mO&JP#ETN8`|~A zp$TNnh(wZ<&^7uC?T*E5?)SvQx>>fn7Fi*iXo=eXXQ+>k-0t1UYqhuTs8z-8Z3k zVnPex@hI$8YeWPy6Tl6DBp%d(Sib*Z-7`7612vO~f{;-<2W6)h7BZqnUuzrP zUO%164>2abm?szJvG87$*i=@g?oA!0SP?mCo~|{%8zfKu@aG3_`5wu-u*Yl3 z-H`7leFkDy@IUQwxT%Azeea+)D|Tr{&T-beUs6kA$AsvaBLL^t$TcIFqShaNe<;W` z#5JmveHsjZE|;xKy9uUp9Mwr+(rX<=`4hf+x@PeG@Fr8YQ$deF=8@eLiTuG&)tF~> z?;!FL78n<_J##7l2#TpUhVxN~fgQuf{B*hue^M+a!>dLX`dK z=MDD}#@=+b*Qdbs?Zx{qCcm0!HgFl)i4pe9*j%I8VmxguHq6^$Xb z^@GoRCME5_D=3hD1cl7WeV_W>QB~ro#~ZfBka5N?wuytn z^-pCUt}D)Y9$rA#4o*6KgoRjUL9RX@FqVggcUTW@wBDYM_2vlhaaVcOVmLA1sVVPG zLN;}meELlb z*$JC6w<~{!^r6NMzX6B%K71XW3YL`z&tDItItf^IhPSl0U5sL%m0~(gM79YC*qHRC z31s7vBwx*iU5?)ebC(!0$Y{S5$b3u?P_M!im1QtKJL~ND5z0#yrSr%59ll{uH!h2~ zuRR#!lYj4GE2vxdHJ|t?%r(D@(Y&4EOq$ zqsHX4r2{m(NAvvO{`KE(fog%~n?1$TjKS^7+?1g`66_Z8{WFKS|Frq7?JjZz<_*4* zZ|ER9843>#t5qTgkG7MWA9#;6w?^)wiHD{g?9BDIY*)*RNSluUlW3Fqy~I%u68Sq6 zBSV4AB-R^+D~?zXhLwRV@$b#F?P-59Ms1I{X58DN6oPv$+#UZ*&F_!rZdbi!n3F1n z8Iu#V_bcn#vn)Qwku+#pXXKSlgO-@6=X-AE_zDWP*!U!HH2dI_l2}>#0F=F}Az%FqIZ8(Qbh;=f ztAbcr8l0d#R@QJ0Ih3Pfv*!fewT@Ks=z{a19rp^&#ug`8{K6-s<%El@!RowwmTV)J z|91_^`{QQvSHTwWdw-{0H7Z1wok!HamWkA|!=usAdG@R$i>v!P{ zHF;_EZt`YDJ*h()S4jyS8O#85;5WH382@v93Xzq-em$Gx5E&K!tzo`shck_z$ad@tU4hI= z{d(fWj)!JsAt734xP+yoazv{Oy2mfNl?r`|e&>{dw{bR@!t(XNJ%Kp>^*cB>XSl z4hZ8#2pn=>yzvzae)tmA6Y{ZwSoAIW^hJO#)5XpckKyBRp?4|rEX{2vrXqipcUd&9 zu{p(pXwWgDVH+#0bM8?NL-6+QOwrwdzlbbJwwSxSVFT7Yuw)L#lse&Q(gP7>QM=tP ztu)k-duk&AP5H%Rhsgcfy#AVojT9>trTIb__uj!1?AQYQIQp%BYwt)-p45!g?0cX| zzU_BJj5++~N0^zBS9vL(15;>gS>s*@u%WKd=Ba7)U&a?&sMj$&Gjff;5SdZohtly{ zI#|2-JpW1$S|IbrZ7n47Wvp5*Vvv@sn5vL0*VL6{7sa6axa`usbFM>+63A974Qgqp+EKin`K07|8B*=WVn?3`x{fz2RDQV6B~g?Ypp{_S zRvht$0N;YjBH3o+N9$p8#QhqFIKekWli&1$@?S&HPl+Z?BU*Ju*&E^7_O(YH#2ltW z6AUN(JnEZ#0X(kE$gjLHn%(f26?plb-9wX-JJn4WLK4VarADxqT|I>QQ6do^%Q(5I2)^_>W8?a?vY-&e>cti;BZSM!Nq>CYx*Lf163!}AwfiJ{B%%4X+ z>6?3n@nDIr&o0s{YyUL0#oV4lqpmQeI6c4eg3wy&*T%}^Kd7ZJpFV*Y7{%&!NCMg2 zh>~q;=t6+c(qmF(1vIT|1Sav10AJxYc4qc0xWn}bO=ww@*6u0q zxej*}+)fH>#hXUUnZu>?pzxvEl2_ao?_R zlcD6r+LD~#X-S4IkQwb)0(m&LExlm66tWMs7NnCcJvF~F_t=TntwI?0uRF_ka7KXi zJ0wZM@>}v5=N_Nbx2NY<+#2pk__IJeUDbFNe7qgPr5Q>)_tNNYB@e>5X>95!-32kB z(2agwHeObon=PuVq*T-HAP6Z^OO3+5MHEAsDhirc(bA$Yai+WYSa% zkpepRX%IO{lL)3g8vA$MglJ-$WJO-bZICDFP*3_{)fQ*J1K;^c+*1gjy!)WNJ(E7K zd^x|z!4Ceid3D3m@++3gin12ZLeIA&1pOgs;e6pnXotbB(}4&t+bn+ud_7K{CR>M$_`kpTJzr>oEC#K&d4In(<%! zHOKu7?cl4qI$7t(p|$G!+T*_`k#Up!3=eKZ56^JK&1ZUAUYUz?r9*HY9f|(O7UnwKD1 zZmKGB9O2iq3$_e6qBOm!mSH3*&>FZ;t=|K*_{&4?F5Jd7M73i2yt2o^(Yf8%iBK1( zt7YD2@LUNWf(|u*NYc1#y2B)@S^e_N@oZqn_>L8Lrr8wOfmcCkT5Y4WLd9Gi7~dYL zwfXSHOu-&?j9dp?hd}u50yghrp~7l9z_y9Io4IK!$KHhm+FVzf`&+fWdWP_S8(7-a z>+bV+(RUl3k#Ds5cwoM%E6JU&&GSz4UBy{D_@E>g0eC9B%eB||Ki}A4 zT$|^crtg8bM$dd&&37^P%p(Nj`x|gc055ZS*_^^1_I>;IXD}vRP84<-#(o}t3VTqe z7@MEIYfYs)+^g?2g!pbEoi6zzh0z}&df#>6aVNfP9tspeGGyIRN>x6m^`rv=BgBQ& z8g5NY;--?bE|SRT2}tyVBY{}*{jwP?_QRlKA2Q7A!6hVtN(CN#hCug}-06*^sH^om z%O<}K-T+F zfJuTnoeF5vPx0ZfE-^8=Q1znlV!`J!jA7snl2`U21ag2kl22czXISuhIX6Qh!$unn zE6y}z(?Jm(2m}NI{RV-MZOHDC#o@#r4}Nq(b^u}AZ*GfVR3IP__%07#*MNbPoR=k$#N@bPNiZT15C{kaLPj7wfgDE~^57Aad~d2mtZ`}44*7nF1_A+r zz_%EIumo~4NqE0SYP&C7+)g{2+$LG*uyEU}?PQsJG5#E~++rg^yUM`p;8V4|I12;> z0s?_}Lcn15%RDykt*)LRJC*gYdW;RX7nn_!UznS9)Af|9E>Yo<672*60s(1YvaPWQmsEy5prrQ)6JoNd* z8Cf?A%{VmFL~Vh9Kp_4Rh>6KU3(H+)RcUZ!Ux&QFJ`xfwS)7wq03jYfE*{#!h_paJ zARrKk0D+ik$STi^bEj{#TBIL9$hy~ytNGq%yg8N$VeE~HxE2Tq1WqOdVlI$5n2U0< zDzMIc4v&K54_pZ2XC9g{{TD(r_J@wh69@LLhT67w2LZ4@z&sM4#dTu0;O2 zc&6i5LKu6XA}$010)dkdfw&RK9NUL;vtEbb&4*y_vJp$<@rQFAzc~qU7ef*V2m}NI z{R06^^!<8aS*1@{y#B$x;8GwU5D*B2hrs^>VZAU8_FMwu00000NkvXXu0mjf7j(p9 literal 0 HcmV?d00001 diff --git a/logo.png b/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..566296b1667114cd3e066f3c9f1596d7cf29e222 GIT binary patch literal 1396 zcmV-)1&jKLP)Px)E=fc|R9FeUS8HrkMHK$#-fg#!U6#_W6t(iICOisa0Hvh``XEtEBvIlINbm=& zqQ)3WND&hoL$nA<2?mV?{9#0rCMcS~kG9laXd9z7f(5ZuN?Tf6D70N$y4&vV9nW0c z+q>PnyInBOk2`bTXU?2CXD%?sQN_7jT3xS{*4FRd*U(^(CRX55a-z|VG-d>%t;z7~ zQ2F6|JZz8z4_XuWp|W-Bh6FC}&4!1$$Ge4tZ3Xy3iAgUu9xePPnodERk^|*6%?>vo zY2)Bdqe8C2-E|q&omT?WI8Xu(NvAXRXO84pSXsH;r{hc(786_;Y6v5HXji)Np?;2A z*E#xcaEITIO<@88!Fl#&)%^yo4w};cMaGQ4dx|pGKc-&sjBxAC4&Y{|3hziXl?EEa zfSh2>Zul&J(0~nDMs=Xr)$DLC7_J@c3oLiv4w0KOFfARYmla!%CnfN2DPO#k1;ZTJ zRK?}LYUsn0#v>#Acz}bH#$w?1>osdps5!hVRhT?b7!bu-Xz&3nASBO#??uOic!cWUGu>8A<5u z8#Q1fFRx$ZP$>|!(T1|z+yTKE;y|i{-H9w7PMQBmDk-C|^-QfWct<(9TPX^RY2goX zV2`3?Wi7zV;btOZo?e^|zhA}0t6DpV%xIu={jLUj+Y{=7C@lh_)2UlM86%(&r7skaHy@#+S}26O!R?)J}L%ESk=PGeYv0q2)gLb zKa-P=iW99Ai7~8Pl#V6Y4m_5b0*kB%5|=1BT^}`vY{UpiURaQ-tA}&9)l$o3`oBOh8dQHQwi#>%6)V#O7JLpT2Iel2{|L%xGvlT|C=r!} z2u}h+f73#V5@WkQELp47`A~{EWO@YVtP|Ms;6VF>UZ3)$$tPJ8M_Q@r9Mvp0000xh8> literal 0 HcmV?d00001 diff --git a/zh/conf/base.html b/zh/conf/base.html new file mode 100644 index 0000000..d9531f7 --- /dev/null +++ b/zh/conf/base.html @@ -0,0 +1,372 @@ + + + + + + 基本配置 | CellReport + + + + + + + + +

# 基本配置

# 报表制作平台的用户登录管理

  • admin 用户登录后,在报表组管理中,选登录管理。 +我们通常已经有了成熟的用户管理系统,这时候我们可以直接将已有的用户管理引入到本平台中使用。

提示

传入用户名的变量分别是userid和口令password,返回为字典结构,必须有errcode,userid,username。errcode为零,表示验证成功。

// 以下是脚本先使用内置字典配置了两个用户:
+var userDict={'test':{'password':'password','username':'测试用户1'},
+              'test2':{'password':'password','username':'测试用户2'}
+             };
+if(userDict[userid]!=null ){
+  if(password==userDict[userid]['password'])
+  	return {'errcode':0,'message':'ok', 'userid':'test','username':userDict[userid]['username'],'old_result':'ok'};
+  else
+    return {'errcode':1,'message':'error', 'userid':'test','username':userDict[userid]['username'],'old_result':'error'};
+}
+// 引入外部已有用户管理系统的校验。这里是假设该url 需要使用 form 的post方式提交参数p_userid和p_password,实现验证
+var result=web_request({'url':'http://xx.xx.xx.xx/auth/user/login'  
+            ,'method':'post','data':{'p_userid':userid,'p_password':password} } );
+var json=eval('='+result);	
+return {'errcode':json.errcode,'message':json.errmsg, 'userid':json.userid,'username':json.username,'old_result':result};
+
+

# 报表运行前校验

在报表组的任何目录都可以在《设置模板》中设置报表运行前的脚本(后端运行前脚本)。

提示

报表运行前后调用的钩子函数,在各个目录和报表中都可以配置。执行时遵循的原则是,先检查整个平台目录下的template.xml中的配置,然后从报表所在报表组中的根目录开始,逐个执行配置语句,配置语句中的变量和函数,在报表真正执行的时候都可以引用到。如果有重复变量或函数,距离报表最近的起作用(我们可以将之前的用临时变量保存,然后就不会被覆盖)。

如果定义了函数before_exec,报表执行前将会先调用他。

// 这是一个能力演示。根据情况裁剪添加
+function before_exec(){
+	var db=openDb('testdb');
+	var result=db.select("select fresh_time,load_time from dual");
+	db.close();
+   if(param.reportName=="test/test111.cr")//遇见这个报表不校验
+     return;
+	if( __page__.Path=="/f10" or regex_match('f10\\.cr$',param.reportName) 
+      or param.reportName in ['t1/b33.cr','t2/a22.cr'])
+   {
+		var tips=iif(result.is_huizhong,"当前正在汇总,可能数据不准,请稍后重新查询,","")+"使用<load_time,10分钟>,"
+				+"本次汇总完成时间"+result.fresh_time.ToString()+",最近数据同步时间"+result.load_time.ToString();
+		return {"continue":true,//继续执行标记,可以用来判断是否有权限继续执行
+				"cache_id":"report5",//所有缓存的公共标记部分,如果返回null,将不缓存
+				"fresh_flag":result.load_time.ToString(),//如果这个值改变就表示当前报表需要刷新了
+				"tips":tips//额外的提示信息,
+			};
+	}else{
+		var tips=iif(result.is_huizhong,"当前正在汇总,可能数据不准,请稍后重新查询,","")+"使用<fresh_time,1小时>,"
+				+"本次汇总完成时间"+result.fresh_time.ToString()+",最近数据同步时间"+result.load_time.ToString();
+		return {"continue":true,//继续执行标记,可以用来判断是否有权限继续执行
+				"cache_id":"report6",//所有缓存的公共标记部分,如果返回null,将不缓存
+				"fresh_flag":result.fresh_time.ToString(),//如果这个值改变就表示当前报表需要刷新了
+				"tips":"===="+tips //额外的提示信息,
+			};		
+	}
+}
+

注意

before_exec返回的字典里:

  • 如果包含continue,并且值为false ,报表将不继续执行,向前台返回错误信息。
  • 包含cache_id,并且不为空,将会对报表结果缓存到redis 中。如果没有启动redis,将会报错
  • 如果报表需要缓存,将根据fresh_flag标记报表的基础数据是否改变,从而决定报表是否重新计算
  • tips 是可以被前台接收到的额外提示信息。根据喜好设置内容

# 如何在后台脚本中取当前请求中的参数

后台脚本中取当前请求中的参数,可以方便报表系统和已有poral 门户 的集成 。 +通过nginx反向代理后,在客户的浏览器中,看到的就是同一个网址了,这时候通过类似下面的取数,就可以去到portal 中存的用户信息

 __page__.Cookies["access_token"]; //返回字符串
+ __page__.Headers["host"].ToString(); //Headers中取值,一定要加上ToString转换,因为Headers["host"]存的是一个列表
+ __page__.Form["branch_no"]; //返回字符串
+ __page__.Query["reportName"].ToString() //类似Headers
+
+__env__.logger.Info( __page__.Cookies["access_token"] );//- 打印日志
+

# nginx 配置样例


+worker_processes  1;
+
+events {
+    worker_connections  1024;
+}
+
+http {
+    include       mime.types;
+    default_type  application/octet-stream;
+
+    sendfile        on;
+
+    #gzip  on;
+    upstream report{
+        hash $remote_addr consistent;
+        server 127.0.0.1:5300 max_fails=0 weight=1;
+        #server 127.0.0.1:8080 max_fails=0 weight=1;
+    }
+    server {
+        listen       80;
+        server_name  localhost;
+
+        location / {
+            root   html;
+            index  index.html index.htm;
+        }
+
+        location  /report5/ {             
+            proxy_pass     http://report/;
+            client_max_body_size    100m;
+            proxy_set_header Upgrade $http_upgrade;
+            proxy_set_header Connection "upgrade";
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+            #if ( !-e $request_filename) {
+            #   proxy_pass     http://report/;        
+            #}
+        }
+        location  /report5/static/ {             
+            proxy_pass     http://report/static/;
+            client_max_body_size    100m;
+            proxy_set_header Upgrade $http_upgrade;
+            proxy_set_header Connection "upgrade";
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;            
+        }
+        location ~ /report5/(.*\.)(js|css|png|map|svg|woff|jpg|svg|gif|ico)$ {    
+            alias 'D:/publish_test3/wwwroot/$2$3';
+        } 
+        #error_page  404              /404.html;
+
+        # redirect server error pages to the static page /50x.html
+        #
+        error_page   500 502 503 504  /50x.html;
+        location = /50x.html {
+            root   html;
+        }
+    }
+}
+
+

# 缺省参数的重置

报表参数的设置过程: +报表设计时的缺省参数--->resetDefaultParam----->用户传过来的参数----->lastSetParam

  • 在《设置模板》中设置报表运行前的脚本(后端运行前脚本)添加代码:
function resetDefaultParam(param_name,param_row){ //param_row 参数可以动态修改参数定义,下面例子是修改下拉可选项
+    __env__.logger.info(param_name+'---'+param_row.getData("value"));
+    if(param_name=="abc"){
+      if(你的判断成立){
+        param_row.setData("allowCreate", true);// 设置为可动态添加
+        param_row.setData("tagValueList", [['A','1'],['B','2']]);// 动态添加可选项
+      }
+      // param_row.setData("Inner", true);// 设置为内部参数,前端将看不到hidden ,但后端是可用的
+      // param_row.setData("default_value", '1');// 设置为缺省值,或者用下行的方式返回缺省值
+      return '1';//返回缺省值
+    }
+     
+  }
+

# 参数的最终重置

function lastSetParam(name,param_row){
+	if(name=='branch_no')//如果参数名是branch_no ,那么最终参数就是改为 xxxxx,不管用户输入的是什么,都改
+		return 'xxxxx';
+}
+

# 数据集取数完成后执行的动作

可以定义_after_calc_dataset_这个函数,使得在数据集取数完成后,执行特定动作:

function _after_calc_dataset_(){
+   _zb_var_.my_ds_cnt= 部位2.count();// 将部位2 数据集的行数存到_zb_var_.my_ds_cnt
+}
+
+

# 前端隔行变色和条件颜色的配置

全局缺省配置,在安装目录的template.xml的footer2中。可以视情况修改 +每个目录都可以设置该目录下的所有文件(包含子目录中的)的缺省显示样式。 +如果报表不想使用缺省样式,可以点报表上面的黄色条带,然后将右面的是否使用全局样式取消掉。

// 控制条件格式,如果列名按正则表达式匹配上了,就用条件样式控制当前列的显示。其他样式例子:
+////{column_match:".*(累计)" ,val:'{"type":"dataBar","cellrange":[{"left":283,"width":88,"top":117,"height":25,"left_move":283,"width_move":88,"top_move":117,"height_move":25,"row":[4,4],"column":[3,3],"row_focus":4,"column_focus":3}],"format":["red","#ffffff"]}' },
+window.luckysheet_conditionformat=[
+		{column_match:".*(占比|率)\$" ,val:'{"type":"colorGradation","cellrange":[{ "row":[0,1],"column":[1,1] }],"format":["rgb(248, 105, 107)", "rgb(255, 235, 132)", "rgb(99, 190, 123)"] }' },
+	]
+
+//控制表头、隔行变色等。需要修改的是format 中的有关内容,其他不宜修改。
+// head 表头 one 奇数行 two 偶数行 fc 字体颜色 bc 单元格的背景色 foot 表尾
+window.luckysheet_alternateformat_save='{"cellrange":{"row":[0,8],"column":[-1,-1]},"format":{"head":{"fc":"#000","bc":"#dff0d8"},"one":{"fc":"#000","bc":"#ffffff"},"two":{"fc":"#000","bc":"#dff0d8"},"foot":{"fc":"#000","bc":"#cef3bf"}},"hasRowHeader":true,"hasRowFooter":false}'
+
+

# 前端的公共数据

  • 前端组件的《编辑内容》中,可以使用以下参数引用后端传过来的数据.可以通过添加《动态模板》,将以下代码片段复制到内容里面做测试,以便找到适合自己使用的代码。
  • 在组件中调用全局数据要使用 _this.context
    _this.context.clickedEle['test'] //点击test 元素后选中的数据,这里的元素指的是页面上的可点击单元。
+    //结构为:{data:deepClone(cur_data[0]),cell:cell.innerText,column}
+    
+    _this.context.report_result.dataSet //sql 结果数据,只有在设计预览状态,或设置变量_need_dataset_=True时才会有这个数据 
+    // 内部为多个array ,每一个代表的都是数据集。如 context.report_result.dataSet['test'][0] 是数组。 里面才是真正的数据,第一行是表头,其他是数据
+    // 可以简写:
+	  _this.dataset('累计')
+    
+    _this.context.report_result.data['main'] //页面上名字叫main 的报表数据。
+    // 格式为:{columns:[],tableData:[],colName_lines:[0,2],extend_lines:[4,22]} ,
+    // tableData 存放的所有单元格的数据。colName_lines 列标题起止范围,extend_lines 明细行起止范围
+    _this.context.queryForm //当前报表参数,可以修改,然后调用下面的submit提交
+    _this.context.rpt_this.submit() //提交查询
+    self 配置
+    
+

提示

如果运行时需要数据集的数据,但没有被传给前台,请在后端运行前设置中,加代码:var _need_dataset_=true;

水印设置,请在后端运行前设置中,加代码`_zb_var_.watermark="abcdr"; //设置水印,可以动态赋值,方便设置工号姓名之类的动态水印`
+

缺省水印配置

_zb_var_.watermark={
+        watermark_txt: "text",
+        watermark_x: 20, //水印起始位置x轴坐标
+        watermark_y: 20, //水印起始位置Y轴坐标
+        watermark_rows: 20, //水印行数
+        watermark_cols: 20, //水印列数
+        watermark_x_space: 100, //水印x轴间隔
+        watermark_y_space: 50, //水印y轴间隔
+        watermark_color: '#aaa', //水印字体颜色
+        watermark_alpha: 0.4, //水印透明度
+        watermark_fontsize: '15px', //水印字体大小
+        watermark_font: '微软雅黑', //水印字体
+        watermark_width: 110, //水印宽度
+        watermark_height: 40, //水印长度
+        watermark_angle: 20 //水印倾斜度数
+    }
+
+

# 前端动态模板数据设置

# 动态模板中可能会用到的数据转换

表达式 解释
dataset('累计')[0] 取数据集:累计 的列名
dataset('累计').slice(1) 取数据集的数据
Enumerable.from(dataset('累计')).skip(1).select(x=> {return {'name':x[0],value:x[1]} }).toArray() 转换数据集累计中的数据为对象:name属性对应第一列,value对应第二列 ,最后转换为数组返回
<dv-scroll-board :config="{
+            header: dataset('累计')[0],
+            data: dataset('累计').slice(1)
+          }" style="width:100%;height:100%;" />
+
+
+<dv-capsule-chart :config="{
+  data: Enumerable.from(dataset('累计')).skip(1).select(x=> {return {'name':x[0],value:x[1]} }).toArray()
+}" style="width:100%;height:100%" /> 
+
+<dv-conical-column-chart :config="{
+  data: Enumerable.from(dataset('累计')).skip(1).select(x=> {
+      return {'name':x[0],'value':x[1]} 
+    }).toArray()
+}" style="width:100%;height:100%" /> 
+

# charts中可能会用到的数据转换

  • 内置了已经转换好的数据:valid_data (有效数据,参看chart文档中的dataset)
  • series_type 自动转换过来的序列类型

# 前端页面css和js脚本

style标签包起来的部分,将会在报表展现前注入当前页面的样式表中

<style>
+  #report_app .vue-grid-item:not(.vue-grid-placeholder) {
+    background: rgb(255, 254, 254);
+    border: 0px solid black;
+}
+#report_app {
+  background-color:#fff ;
+}
+#report_app .data-progress{
+  background-color:#fff ;
+}
+</style>
+
  • script标签包起来的部分,将会在报表展现前执行,如果script中定义了函数after_report_show_hook,那么这个函数将会在报表显示后执行
  • 可以访问变量_this来动态修改里面的内容。如果不知道结构,我们可以在这个里面加入console.infp(_this),查看控制台就可以了解内部结构。
  • _this.result 代表的就是报表查询结果。
  • _this.result.pc_form 如果定义了该变量,那么pc端显示的form将会使用这个定义来显示
  • _this.result.mobile_form 如果定义了该变量,那么移动端显示的form将会使用这个定义来显示
  • _this.result.pager_template 如果定义了该变量,报表的分页器将使用模板
<script> 
+window.after_show_report_hook=function(){ //这个函数会在显示完报表后调用
+  	console.info("function report_after_show exec")
+}
+
+if(_this.crisMobile)
+  window.convert_col_to_button=true //如果是移动端,那么如果只有一个报表,并且 是多行列头的情况下,设置这个参数控制将列转换为标签按钮的形式
+console.info(_this) //d打印_this的内容到控制台。这仅仅是测试,生产期间最好不要执行
+</script>
+

注意

如果在pc_form或mobile_form中也需要script,那么将form内的script改为dyn_script。否则正则匹配script将会匹配不正确从而导致脚本失效。

# 定时刷新

点报表设置,选 前端页面css和js脚本 ,添加内容,:

<script>
+  _this.setTimeout_second=10 //刷新间隔10秒
+  _this.setTimeout_function=function(p_this){
+       //p_this.queryForm._fresh_ds=JSON.stringify(['数据集:累计','表格:main']) //只刷新: 数据集:累计,前面的数据集冒号不能省略
+       p_this.submit({noloading:true})
+      console.info("xxx")
+ }
+</script>
+

# 前端动态模板

  • 在页面上添加的动态模板,内部脚本是经过简化的vue格式。主要区别是:script中定义的data、methods、computed会直接注入当前模板中,其他vue属性暂时不支持。
  • 由于是内置脚本模式,所以不支持import语句,支持data使用函数返回。
  • style 将是scoped的,style的处理是将每个css前动态加上 了id名称,所以对模板外的其他网页部分没有影响。
  • 为避免data、methods中的名字和系统内部定义的名字冲突,最好将data、methods中的名字加上一个固定前缀,如: my_ 。
  • 如果设置依赖数据集名称(this.self.dataSource),this.cur_ds 表示的将是这个数据集对应的二维数组json,第一行是列名,其他行是数据
  • template中可使用<t>text</t> 代替配置中self.option.text中输入的公式(以等号开始的字符串将被认为是公式)。例如self.option.text的内容为:=cur_ds?cur_ds[1][4]:14 ,等号后面的内容将会插入到占位符中。通常这种输入是在可视化配置中配置(暗红色字体通常就是可输入模板公式的属性)。
<template>
+<div class="cr-data-box">
+  <div class="item"  @click="my_sayHi2">
+    <div class="item-icon" style="background-color: rgb(49, 180, 141);">
+        <i class="el-icon-warning"></i>
+    </div> 
+    <div class="item-info">
+        <span class="title" style="color: rgb(49, 180, 141);">12,332</span>
+        <div class="info">{{my_test_computed}}日志{{my_t_data1 }}</div>
+    </div> 
+  </div>
+</div>  
+</template>
+<script>  
+    if( window.AVUE==undefined){ // 载入外部的css和js 
+       tool.load_css_file("cdn/avue/2.8.1/index.css")
+       tool.seriesLoadScripts("cdn/avue/2.8.1/avue.min.js",null,function(){
+           _this.refresh()
+           console.info("success")
+       })
+   }
+   export default {
+     data:{ 
+       my_t_data1:'test_data1',
+       my_t_data2:'test_data2',
+       my_cnt:0,
+     }, 
+     computed:{
+       my_test_computed(){
+        return this.my_t_data1+'_'+this.my_cnt 
+       }
+     },
+     methods:{
+         my_sayHi2() { 
+            this.my_t_data1='test_'+this.my_cnt;
+            this.my_cnt++
+        }
+     }
+   }
+</script>
+<style>
+.cr-data-box{
+  height: 100%;
+}
+</style>
+

# 自定义组件设计

在模块组件管理中,我们可以修改或自定义新的供报表使用的组件。 +在编辑组件总,有两个tab页:组件内容、可视化配置器。组件内容将会在将该组件插入到报表时复制到报表中;可视化配置器是为了辅助内容输入而提供的快捷内容录入组件。管理的选项内容通常配置在option中。《组件内容》使用self.option.xxx来引用属性xxx,《可视化配置器》中使用edit_item.option.xxx来引用属性xxx。 +可视化配置器的格式通常如下:

<template>
+  <div v-if="hasOption">   
+    <el-form-item label="名称颜色">
+      <avue-input-color v-model="edit_item.option.color1">
+      </avue-input-color> 
+    </el-form-item>
+  </div>    
+</template> 
+<script>
+  
+  export default {
+    computed:{
+      hasOption(){
+        if(this.edit_item.option==undefined)
+          this.edit_item.option={}
+        return true
+      }
+    }
+  }
+</script>
+

hasOption 是为了动态初始化option,他总是返回true。 +在这里缺省组件使用的通常都是avue组件构造的录入界面。

为了标记可做公式替换的字段,我们通常使用以下方式构造录入选项:

    <el-form-item label="文字">
+      <template slot="label">
+        <el-tooltip placement="top">
+          <div slot="content"><div v-html="context.templateGuide"/></div>
+          <el-button  style="color: darkred;">文字<span class="guide">
+         <i class="el-icon-warning-outline" title="查看文档"></i>
+        </span></el-button>
+        </el-tooltip>        
+      </template>       
+      <avue-input v-model="edit_item.option.text">
+      </avue-input> 
+    </el-form-item>
+

组件内容通常格式:

<dv-decoration-11 style="width:100%;height:100%;" v-bind="styleArr" >
+  {{ <t>text</t> }}
+</dv-decoration-11>
+

或:

<dv-water-level-pond :config=" {data: [<t>value</t>]}" style="width:100%;height:100%;" />
+
+

注意

1、标签间的模板一定要用 包起来 +2、标签属性中使用模板,一定使用双引号。因为在做模板替换的时候,字符串将会用单引号。

# 前端调用后端的自定义函数

如果已定义后端自定义函数:

  //这类函数只接收一个参数。如果是多个参数,可以打包多个参数到一个对象中传递
+  function test_func(para){
+    __env__.logger.info(" 前端调用后端的测试:"+json_stringify(para));
+    return  {a:2,b:3,para};// 测试将这个数据重新传回给前端
+  }
+

前端任意可以使用js 的地方,都可以通过call_server_func直接调用到后端函数:

  cellreport.call_server_func(`test_func`,{a:1,desc:'前端'},`/run:example?reportName=/`).then(data=>{
+    console.info(data) // 输出 : {a: 2, b: 3, para: {…}}
+  })
+  
+

call_server_func(func_name,func_params,_this,get_post='post') +第一个参数 func_name: 后端已定义的函数名称 +第二个参数 func_params:后端函数需要的参数,必须是一个对象,如:{a:1,b:[1,2,]},后端将以同样的方式取出 +第三个参数 :如果是字符串,就是将当前字符串作为url 传递给后端(通过这种方式手动执行指定报表组中的函数),否则,就从_this 中解析出当前网页的url(组件中调用的话,直接传this就行),传递给后端. +第四个参数 get_post : 提交给后台时使用的http 提交方式

# 前端使用js的一些控制选项

  • window.cellreport.show_tips 是否显示右上角的提示信息,这个信息是后台传过来的。

  • window.cellreport.cr_login_verfiy_code_type='text'; 设计器登陆验证方式: +text,纯前端(已经显示了。重输入一遍就可以)。 +img:${baseUrl}/VerifyCode 后端要编写这个代码 +其他:用其他方式(如手机验证码)验证,需要后端代码配合。也是修改 UserController.cs中的VerifyCode

  • window.cellreport["expand_form"] 手机端是否显示收缩查询输入图标(控制查询输入是否显示)

  • window.cellreport.cr_export_excel_func 导出excel 时调用的监控函数。通常需要传给后端记录

  • window.cellreportcr_click_${gridName} 点击某个组件后调用的函数,p_data 是传递的数据,this表示的是调用函数的组件. +只有报表、echarts 有缺省的点击事件,可以直接调用click事件。如果是其他组件,需要自己写有关的click,如果需要刷新数据集,自己组装_this.context.clickedEle以及调用click_fresh.

  • window.cellreport.hn_old 控制列表头上的链接是否有用

  • window.cellreport.cr_close_fresh_message=true 关闭组件刷新提示

  • window.cellreport.cr_hover_row 鼠标悬停时使用的格式 缺省值:'{background-color:lightgray!important;}'

  • window.cellreport.cr_active_row 鼠标点选后时使用的格式 缺省值:'{background-color: #7cbcfc!important;}'

  • window.cellreport.call_server_func 不要修改。这是调用后端使用的函数入口

  • window.cellreport.map_url 地图地址。格式:${default_map_url}/${code}_full.json 。如果地图存放到了static/GeoJSON下,可以设置为static/GeoJSON

  • window.cellreport.pdf_print pdf预览时,如果为true直接显示打印预览,不设置或false,将显示中间预览,以便调整或另存到本地

  • window.cellreport.form_validate(queryForm) form提交时的表单校验。queryForm的属性就是报表用到的参数,返回true表示校验通过,false或字符串表示校验不通过,返回字符串时将作为错误信息显示到浏览器

  • window.cellreport.convert_col_to_button 手机端是否将多层表头转换为按钮显示

# 查找组件和显示组件对话框

this.findElelment("line_832",{parent_obj:null,dialog_params:{title:'标题'},params:{style:"height:50vh"} }) +this.showDialog("line_832",{parent_obj:null,dialog_params:{title:'标题'},params:{style:"height:50vh"} ) +dialog_params 是el-dialog的参数。params是包裹组件的div 的参数

+ + + diff --git a/zh/conf/how-add-function.html b/zh/conf/how-add-function.html new file mode 100644 index 0000000..ce7a8c3 --- /dev/null +++ b/zh/conf/how-add-function.html @@ -0,0 +1,95 @@ + + + + + + 自定义函数 | CellReport + + + + + + + + +

# 自定义函数

# 内置语言制作自定义函数

如果某函数只在某报表中使用一次,而且相对实现比较简单,我们可以直接在报表中定义。点《记事》->《后端运行的脚本》中,添加,例如,下面是计算某值的一个特殊要求的百分比:

function percent(val,比例){
+    return val-formatNumber( val *  比例 ,'0') + 1;  
+}
+
+

定义好后,我们就可以在单元格中直接使用了。

我们也可以在目录的自定义模板中添加自定义函数。这样该目录下的所有报表就都可以使用该函数了。

# c#语言写的自定义函数

提示

每个自定义普通函数都是一个必须继承CellReport.function.FunctionUnit 的class,该class的名字必须以Func_开头。

例子:

using System;
+using System.Collections;
+namespace CellReport.function
+{
+    public class Func_test : FunctionUnit
+    {
+        public override Object calculate(IList args)
+        {
+            int args_count = args.Count;
+            if (args_count < 3 || args_count % 2 == 0)
+                throw new CellReport.core.ReportRuntimeException("test参数数目不对!应该为2N+1个。");
+            Object obj;
+            object target_expr;
+            for (int i = 0; i < args_count - 1; i += 2)
+            {
+                object case_expr = args[i];
+                obj = calcExpr(case_expr);
+                if (obj is Boolean && (System.Boolean)obj == true)
+                {
+                    target_expr = args[i + 1];
+                    return calcExpr(target_expr);
+                }
+            }
+            target_expr = args[args.Count - 1];
+            return calcExpr(target_expr);
+        }
+    }
+}
+
  • 这个函数是报表中iif函数的实现。 +解释:
  • calculate(List args) 在报表中使用的参数,都是打包到类型为List的 args中。类型为内部的表达式类型,不要对该参数做修改。需要计算某个参数的值时,使用类似这样的函数调用来计算该表达式的值: calcExpr(target_expr)
  • 父类FunctionUnit中定义了很多常用的成员。
成员 解释
exprFaced 计算表达式所使用成员
ds_map 当前单元格所使用的数据集的集合
current_cell 当前单元格
exprTree 当前表达式树
  • 可以使用exprTree 来自己分析解释执行。通常用不到这个功能
if(this.exprTree.Children[1].GetChild(0).Type != ExprLexer.ID)
+	throw new ReportRuntimeException("参数不对!");
+

提示

每个自定义数据集函数都是一个必须继承CellReport.function.IDelegate_ds_func 的class,名字不要和已有数据集函数重复,否则将不会调用。

//ds.sum 函数定义示例:
+   public class sum_delegate : IDelegate_ds_func
+    {
+        BigDecimal ret = new(0);
+        public void init(Group one,BaseExprFaced exprFaced, GroupMap func_ds_map, Object select_expr)
+        {
+            ret = new CellReport.math.BigDecimal(0);
+        }
+        public void midd_proc(Object obj, int cnt)
+        {
+            if (obj is CellReport.core.Variable)
+                obj = ((CellReport.core.Variable)obj).getValue();
+            if (ExprHelper.TryGetDecimal(obj, out var dec))
+                ret = ret.add(dec);
+        }
+        public Object Result()
+        {
+            return ret;
+        }
+    }
+

将自定义函数添加到执行环境 +在startip.cs中的函数public void ConfigureServices(IServiceCollection services)中添加以下代码:

CellReport.core.expr.ExprHelper.AddFunc(typeof(CellReport.function.Func_test));
+

现在我们就可以在报表中使用这个test函数了。

+ + + diff --git a/zh/conf/index.html b/zh/conf/index.html new file mode 100644 index 0000000..f4bd0d0 --- /dev/null +++ b/zh/conf/index.html @@ -0,0 +1,58 @@ + + + + + + 概述 | CellReport + + + + + + + + +

# 概述

本节主要讲解与报表制作非直接相关的配置

# 安装数据库驱动

  • 缺省安装了sqlite 和 sqlServer 驱动。如果需要其他驱动,打开reportWeb目录下的appsetting.json,将合适的驱动加上就可以了.如果没有下面列出的驱动,请自行下载添加即可。

+{
+    "name": "Npgsql",
+    "dllName": "Npgsql",
+    "FactoryClass": "Npgsql.NpgsqlFactory",
+    "InstanceName": "Instance"
+},
+
+{
+    "name": "MySql",
+    "dllName": "MySql.Data",
+    "FactoryClass": "MySql.Data.MySqlClient.MySqlClientFactory",
+    "InstanceName": "Instance"
+},
+{
+    "name": "odbc",
+    "dllName": "System.Data.Odbc",
+    "FactoryClass": "System.Data.Odbc.OdbcFactory",
+    "InstanceName": "Instance"
+}
+
+ + + diff --git a/zh/guide/cell-prop.html b/zh/guide/cell-prop.html new file mode 100644 index 0000000..f0cefab --- /dev/null +++ b/zh/guide/cell-prop.html @@ -0,0 +1,47 @@ + + + + + + 单元格基本属性 | CellReport + + + + + + + + +

# 单元格基本属性

注意

所有的单元格属性中的文本,以等号开始的就是表达式,其他是纯文本

# 值表达式

  • 值表达式 是计算报表每一个具体单元格的实际值用到的公式。它是报表计算的核心表达式。所有的取数表达式都是在值表达式中定义。

  • 如果数据集字段是Blob等字节数组, 为了能通过网页传输,可以使用这个函数将字节数组转换为base64字符串形式。 +如果是图片,我们可以使用类似以下的公式,将图片显示到网页上。

      =iif(ds.img!=null,"<img style='width:60px;height:60px' src='data:image/png;base64,"
+                        +ByteArrToBase64String(ds.img) +"'>"
+          ,'')
+

# 显示值表达式

显示值表达式是为了显示让用户更友好的阅读数据所用到的公式。**缺省公式为=@value。@value表示的意思是当前值表达式的值,*不能在值表达式中使用@value。*在这里可以重新组织该单元格的显示数据。比如格式化数据、显示值单元格中所取代码的代表的实际名称等。

  • 如果单元格的数据是数字类型,可以格式化数字,公式是:=formatNumber(@value)缺省格式为:#######.##,可以在第二个参数指定格式。如:####.0000。
  • 如果单元格是某个group函数取出的code代码,显示值表达式最好是另建一个数据集,比如叫:仓库,sql为:select 名称,id from 仓库表,然后在显示值表达式中写:=仓库.select1(仓库.名称,仓库.id==@value),你的其他sql中都不用取名称,这样做的好处,一方面能有效减少数据量,而且更容易维护;另一个好处,在需要group的数据集上不用关联取名称,一定程度的提高sql的执行效率。
  • 如果该单元格的显示值需要从数据库查询,可以类似这样写:=query(数据库连接变量,”select xxx from table where yyy=’+@value+”’”)。这种方式取数相对于先定义数据集,然后用ds.select1的方式取数,但这样会多次调用数据库查询,效率很低。不推荐这种方式,会让报表生成速度大幅下降。
  • 如果单元格的值为零,显示为空白,公式为:=iif(@value==0,’’,@value)
  • 如果单元格的值为万元为单位,公式为:= @value/10000,和上面的为零显示空白结合,公式为:=iif(@value==0,’’,@value/10000)

注意

不要在值表达式以为的属性中使用 分组、归并等函数。

# 字体颜色和背景颜色

  • 针对字体颜色和背景颜色,我们也可以使用表达式动态计算,具体的颜色选取,参考设计器的下拉框。
  • 类似excel中的条件格式设置。 我们可以选中设计器中要启用条件格式的单元格,选菜单上的条件格式,选取合适的方式,就可以实现类似excel中的条件格式设置。我们也可以设置通用模式,参看 这里

# 报表的钻取、跳转

  • 这个功能主要是通过单元格的链接属性实现的。在设计器上,点击该属性后的图标,进入表达式编辑页面,点:生成url连接串,就可以自动生成缺省的url连接串,缺省会将所有的非内部属性组织到该url里面,其中有reportName=param.ReportName,表示的是当前的报表名,如果要跳转到其他报表,把这里的报表名称换成指定的报表名即可。如果要钻取,通常是报表名不变,参数改变,而且这通常发生在分组单元格上。比

# 排序

  • 如某公司的省市县三级机构,报表开始是显示的省公司的报表,其明细是各地市的数据,可以设置报表由省公司报表向地市公司报表的钻取。

  • 只要是只有一个行扩展(列扩展数不限)的报表,都已经内置了点报表表头排序。多个行扩展的报表,点击表头排序的功能是无意义的。

foo

# 扩展方向、左顶格、上顶格

提示

(这里可以作为提高对报表运行认知的时候查看。初学可以不用理会)

新建的报表由行列整齐的格子组成,这些格子我们称为单元格,通过所有单元格的值和边框排列在一起,组成了报表。

每一个单元格都有扩展方向、左顶格、上顶格。缺省的扩展方向是空(等同于不扩展)。如果扩展方向为向下,那么报表生成时,将会按当前单元格的值(通常是List列表)向下展开。向右扩展,同理。

每个单元格都有左顶格和上顶格。单元格的左顶格属性寻找规则:同一行上,向左找到第一个有向下扩展属性的单元格,就是自己的左顶格,如果手动指定以指定为准。如果没有找打具有向下扩展属性的单元格,缺省就是隐含的rootCell: `0 .

每个可扩展单元格内部都具有属性:拥有的数据子集。 +每个单元格都拥有内部属性:当前属于哪个数据子集。所有单元格的计算,都依赖于此展开。这个属性是根据自己左顶格和上顶格拥有的数据子集的交集计算得到。rootCell拥有的是整个数据集.

+ + + diff --git a/zh/guide/create-report.html b/zh/guide/create-report.html new file mode 100644 index 0000000..606d037 --- /dev/null +++ b/zh/guide/create-report.html @@ -0,0 +1,58 @@ + + + + + + 报表制作解答 | CellReport + + + + + + + + +

# 报表制作解答

报表操作基本方法

# 输入公式

  • 点选某个单元格,看右面的属性,点值单元格,编辑公式。
  • 假如我们要输入函数 =ds.select(ds.xxx),我们输入公式的操作步骤是: +1、选中数据集,选中间的函数分类,选数据集,选函数列表中的select,双击select函数。这时候上面的录入栏中将会自动出现=ds.selcet(),光标定位自动在小括号内 +2、选下面的数据集属性栏,选中你想录入的字段,比如xxx,双击xxx,这时候输入栏自动变为了=ds.selcet(ds.xxxx) +3、ok,点保存。一个公式就录入好了

::: tips +等号开始的将是作为公式计算,其他字符开始的作为普通文字 +:::

# 如何得到一个汇总行

Q : 我的表格中有很多的数据,希望在最后一行的到一个汇总行,如何实现进行配置。 +A :在你紧挨可扩展单元格下面那一行,就是你的汇总的行.单元格中,输入类似公式: =ds.sum(ds.xxx) 。这表示的是对数据集的xxx字段求和。其他统计函数:参考文档 (opens new window)。 +重复这个操作,将你其他的单元格填充完毕,就可以了

# 如何定时刷新报表或数据集

在报表的设置中,前端运行脚本中,录入类似以下内容。如果指定_fresh_ds,那么只刷新指定数据集。不设置这个参数,将刷新整个报表

<script>
+  _this.setTimeout_second=10
+  _this.setTimeout_function=function(p_this){
+       //p_this.queryForm._fresh_ds=JSON.stringify(['数据集:累计','表格:main']) //只刷新: 数据集:累计,前面的数据集冒号不能省略
+       p_this.submit({noloading:true})
+      console.info("xxx")
+ }
+</script>
+

# 如何升级报表程序并使我以前的设置能保留

1、通常升级报表的时候,我们在放到一个全新的目录里面,然后将老程序目录里面的report.db复制到新目录里面的对应位置就可以了 +2、报表的存放路径最好不要设置到报表运行环境的目录,这样便于迁移报表引擎。不需要每次升级都要改这个报表存放路径

+ + + diff --git a/zh/guide/dataset-param.html b/zh/guide/dataset-param.html new file mode 100644 index 0000000..e4aa999 --- /dev/null +++ b/zh/guide/dataset-param.html @@ -0,0 +1,78 @@ + + + + + + sql数据集和参数定义 | CellReport + + + + + + + + +

# sql数据集和参数定义

# sql 数据集

其他数据集类型待补充。

在设计报表的数据集时,sql数据集内部使用参数可以先使用,后定义。参数以两个$包起来,插入到sql语句中。

SELECT [订单明细].[订单ID], [订单明细].[产品ID], [产品].[产品名称], [订单明细].[单价], [订单明细].[数量], [订单明细].[折扣], ([订单明细].[单价]*[数量]*(1-[折扣])/100)*100 AS 总价
+FROM 产品 INNER JOIN 订单明细 ON [产品].[产品ID]=[订单明细].[产品ID]
+where  
+ [订单明细].[订单ID]='$dindan$'
+

提示

使用$$将参数包起来插入sql的方式,实际上是字符串拼接。引擎内部会自动对参数做sql注入的检测,如果检测到有危险,除非是以缺省值或可选列表值的方式提供的危险参数才可以执行,否则将不会执行,报错退出。

如果参数是字符串,要注意外面的引号不要丢失

#如果需要动态构造sql 语句,比如判断用户是否输入了某个参数,输入的话就拼接指定的sql片段
+SELECT [订单明细].[订单ID], [订单明细].[产品ID], [产品].[产品名称], [订单明细].[单价], [订单明细].[数量], [订单明细].[折扣], ([订单明细].[单价]*[数量]*(1-[折扣])/100)*100 AS 总价
+FROM 产品 INNER JOIN 订单明细 ON [产品].[产品ID]=[订单明细].[产品ID]
+where 1=1
+
+$if(false==isEmpty(param.dindan)){$
+ and [订单明细].[订单ID]='$dindan$'
+$}$
+
+$if(false==isEmpty(param.chanping)){$
+and [订单明细].[产品ID]='$chanping$'
+$}$
+
+ORDER BY [订单明细].[订单ID]
+
  • 上面的例子,是将if 语句用$$包起来插入sql语句中,注意 语句块{、 }不要丢失,否则会报错。条件语句块结束用$}$结束
  • 内嵌的模板语句中(上例中的if语句)使用参数时,要用param.参数 的方式。注意区别。
  • 当if条件满足的时候,会将紧跟其后的语句块中字符串拼接到当前的sql 中

提示

因为这种方式是字符串拼接,所以 sql 语句的任意部分都可以插入$参数$

参数绑定到sql 的时候,不管是什么数据类型,都会将参数值转换为字符串类型,然后插入到sql 的对应位置。如果参数是可以下拉选择的多选形式:

  • 参数是数字类型的,如选中的参数是1、2、3,转换为字符串后是 : 1,2,3
  • 参数是字符串类型的,如选中的参数是a、b、c,转换为字符串后是 : 'a','b','c'

# 参数定义

  • 参数有以下几个特征:
  • 1、参数有数据类型
  • 2、参数有缺省值
  • 3、可以定义显示查询界面时使用的可选择数据,比如某个项目代码作为参数,在定义该参数的可选参数时,可以直接指定可选数据,也可以选择从sql语句中选择显示值和实际值。
  • 4、参数可以定义缺省值的公式,可以引用已定义的参数,要避免参数的循环引用。
  • 参数类型:内部。内部参数都是延迟计算的。内部参数是不显示在查询条件中的,一般都是做为中间变量使用的。为程序控制添加了强有力的中间控制环节。

注意

在报表中所有的参数也是作为一个数据集对待,该数据集叫param,每个参数都是作为该数据集的一个字段属性出现。这样在报表单元格中引用的时候,直接使用param.xxx即可。

  • 在参数定义界面,点按钮:载入未定义的参数,将会自动搜索sql语句中用到的参数。参数的数据类型有:数字、字符串、日期等类型。可以选择对最终页面是否隐藏该参数(html网页上form的hide类型),是否是内部(不会提供给最终用户看到和修改的机会,每次取值都是根据公式计算,相当于内部临时变量),多选(如果是可以下拉选择的时候有效)。当参数的数据类型是日期或者是隐藏、内部等方式下,参数自动不允许被多选。

  • 如果参数是内部类型(相当于临时变量),那么他一定是在所依赖参数的后面定义,否则报表运行的时候会报引用了没有定义的参数。通过参数列表定义界面可以拖动参数的相对位置。内部参数通常是根据非内部参数计算出来的新值。

// 假如我们已经定义了一个参数叫:b_date,我们现在需要根据这个日期参数,计算这个日期所在月的最后一天
+// 我们可以新增一个参数,将选项:内部 √ 上,然后设置缺省值为:
+=monthEnd(param.b_date)
+// 这样我们就可以在sql 中直接使用这个参数了。
+// 如果这个参数在sql中仅使用一次,我们也可以直接将这个公式内联到sql中,用以下语法:   
+
 #注意第一个$ 后面有个+
+select * from tbl where m_date>='$b_date$' and m_date<='$+monthEnd(param.b_date)$'
+
  • 每个参数都会有缺省参数,当报表运行的时候,如果没有提供参数值,将会以缺省参数运行。

# 级联参数的设置

假设现在报表需要两个参数,一个是产品类别id,一个是产品id,这两个参数都是可以通过下拉列表选择的。现在需要的是,客户选择的类别改变后,产品列表中的可选产品也要表示成当前类别的参数。 +我们先定义类别参数,名字为leibie。定义从数据库取数的数据集sql,名称为:类别

SELECT 类别.类别ID, 类别.类别名称 FROM 类别
+

在参数定义画面,新建参数leibie。参数设置如下图:

定义参数:chanpin。定义从数据库取数的数据集sql,名称为:产品

SELECT 产品.产品ID, 产品.产品名称 FROM 产品 where 类别ID=$leibie$
+

在参数定义画面,新建参数产品。参数设置如下图: +demo

数据类型为数字或字符串,非隐藏和内部类型时,可选值可以是手动录入或来自数据集。如果这两项任意一个里面有数据,将会自动出现下拉列表。这里我们都选来自于数据集。

现在我们就已经完成了级联参数的设置。我们可以看到参数:chanpin 的可选值是从产品数据集中来的,而产品数据集依赖于参数leibie(看sql语句),所以参数chanpin就依赖于参数leibie。报表引擎会自动判断该依赖关系,从而自动生成参数的级联变动。

# 可多选下拉参数注意事项

多选参数在组装到sql 中时,会自动对字符串类似的选项加单引号和逗号,数字类型只添加逗号。通常sql 中要使用in。 +缺省值不需要使用单引号。如A,B,C做为缺省值

 select * from xxx
+ xxx in ($param_x$)
+

如果param_x当前选中的是A,B,C,那么上面的sql 将 转换 为 :

 select * from xxx
+ xxx in ('A','B','C')
+

::: tips +var _ExecSqlTimeOut_=120; //可以调整sql 执行查询超时时间。在后端脚本里面加上 +:::

+ + + diff --git a/zh/guide/function.html b/zh/guide/function.html new file mode 100644 index 0000000..aff8bf8 --- /dev/null +++ b/zh/guide/function.html @@ -0,0 +1,239 @@ + + + + + + 内置函数 | CellReport + + + + + + + + +

# 内置函数

# 数据集函数

# group 分组

函数说明: +根据分组表达式,从数据集中选出符合过滤条件的一组组集。

    datasetName.group( select_exp,[filter_exp] )
+      参数说明:
+      select_exp:	选出的分组表达式,可以是字段列名。
+      当然也可以是表达式
+      filter_exp: 	数据过滤表达式。
+
+      函数示例:
+      ds1.group( ds1.name )
+      从数据源ds1中选取name字段,并按照name列进行分组,取出每一组第一条记
+      录的name字段的值, 不排序
+
+      ds1.group( ds1.name,ds1.sex=='1').asc()
+      从数据源ds1中选取性别为男性的name字段列的值并升序排列,然后按照name
+      字段进行分组,取出每一组第一条记录的name字段的值
+
+      ds1.group( ds1.name, ds1.sex=='1').desc(ds1.id)
+      从数据源ds1中选取性别为男性的name字段列的值并按id字段降序排列
+
+      返回值:
+      一组数据的集合,该集合供子格计算的时候使用
+

# select 清单

类似sql语句中的select,返回指定数据集的行集。每一行的值是selcet_expr的计算结果.

ds.select(select_expr[,cond_expr])
+
+ds1.select(ds1.first_name + ds1.last_name)
+
+返回值:
+      一组数据的集合,该集合供子格计算的时候使用
+

# 唯一值计数 distinct_count

 distinct_count(select_expr[,cond_expr])
+

# 求和 sum

datasetName.sum( select_exp,[filter_exp] )
+    ds.sum(被累加的表达式,条件)
+    满足条件的数据集中的被累加的表达式的求和
+    
+    根据左顶格和上顶格所拥有的数据集的交集,计算当前单元格的值。下同,不再说明
+

# 最大值 max

ds.max( select_exp,[filter_exp] )
+ds.sum(被计算的表达式,条件)
+满足条件的数据集中的被累加的表达式的求最大
+

# datasetName.min( select_exp,[filter_exp] )

  ds.min(被计算的表达式,条件)
+  满足条件的数据集中的被累加的表达式的求最小
+

# datasetName.avg( select_exp,[filter_exp] )

  ds.avg(被计算的表达式,条件)
+  满足条件的数据集中的被累加的表达式的求平均
+

# datasetName.select1( select_exp,[filter_exp] )

当前分组中符合条件的第一条数据
+

# datasetName.colcount()

函数说明:
+数据集的列数
+语法:
+datasetName.cols()
+

# datasetName.count(filter_exp)

  ds.count(条件)
+  满足条件的数据集中的个数
+

# datasetName.colName(col_pos)

  数据集的第col_pos列的名字
+

# datasetName.valueForColName()

  函数说明:
+  取数据集的列
+  datasetName.valueForColName( stringExp )
+  datasetName.valueForColName( intExp )
+  参数说明:
+  stringExp 	返回数据集列名的表达式
+  intExp		返回数据集列号的表达式
+

# getDataSourceName()

  函数说明:
+  取数据集的的数据源名称
+  语法:
+  datasetName.getDataSourceName( )
+

# 集合函数

提示

计算统计报表的时候,最常用的函数
+数据集的group、select以及下面列出的所有集合函数后可以跟:
+//.where(expr) 条件判断 ,通常用不到这个函数
+//.asc(expr) 升序 不跟参数的时候,就是以当前值做排序
+//.desc(expr) 降序 不跟参数的时候,就是以当前值做排序
+//例如:
+ds.group(ds.key).asc()
+
+union_set(ds.group(ds.key),
+    ds2.group(ds2.key))
+.asc()
+

# 并集 union_set

  使用方法:union_set([ds.group(ds.key)]+ )
+  对各分组集合的ds.key求并集
+
  • 可以对任意多的分组做并集。
  • 该函数应用在多数据集的报表中,能够极大的加快报表的开发速度。在数据集做完归并后,相应的子单元格都可以正确引用到归并后的各个数据集中的数据。
  • 举例:union_set(ds1.group(ds1.id),ds2,group(ds2.id)) +ds1数据集分组后的数据为:
id
1
2

ds2数据集分组后的数据为:

id
2
3

这两个集合的并集为:1,2,3 +在某单元格使用该函数后,报表运算后,从该单元格扩展出3个单元格。

单元格行号 对应的Ds1的数据分组 对应的Ds2的数据分组 子格运算公式 运算结果
=ds1.id+ds2.id
1 1 1
2 2 2 4
3 3 3

# 交集 intersection_set

  使用方法:intersection_set([ds.group(ds.key)]+, (sort)? )
+  对各分组集合的ds.key求交集
+

# 差集 subtract_set

  使用方法:subtract_set([ds.group(ds.key)]+, (sort)? )
+  以第一个分组为主集合,减去其他各集合的元素
+

# 左外连接 leftJoin_set

  leftJoin_set([ds.group(ds.key)]+, (sort)? )
+  以第一个分组为主集合,将后续集合按关键字合并。这个函数将会完全保留主数据集中的所有数据,不管关键字是否重复。
+  其他集合函数
+

提示

除了leftJoin_set,其他集合函数都要保证每个数据集的计算结果是唯一的。只有leftJoin_set 的第一个主数据集的计算结果可以不唯一。其他集合的数据集计算如果使用select,需要自行保证计算结果唯一,否则最终结果在做完集合运算后可能不正确。

# 集合运算后可接函数

# asc()

对已经生成的列表做升序计算。如果没有参数,将按集合元素的value计算顺序,有参数就按参数计算结果计算顺序

=union_set(ds1.group(ds1.key),ds2.group(ds2.key)).asc()
+=ds1.group(ds1.key).asc()
+

# desc()

对已经生成的列表做降序计算

# where()

对已经生成的列表做降序计算

=union_set(ds1.group(ds1.key),ds2.group(ds2.key)).where(ds1.xx==2)
+=ds1.group(ds1.key).where(@value>100)
+

# to_dict()

将当前生成的列表转换为字典,主键为元素的值 +主要使用在自定义函数中,对数据集做进一步计算。如查找

var ds_dict;//定义一个全局变量
+//在所有数据集取数结束,计算报表的单元格前,将会自动调用这个函数
+function _after_calc_dataset_(){
+   ds_dict=ds.group(ds.订单ID).to_dict();  //字典的key是订单ID,value是group,group.rows是所有订单ID相同的行组成的列表
+}
+
+function 订单ID_count(订单ID,rowno){
+  var _yc=ds_dict[订单ID]; 
+  if(_yc==null)
+      return null;
+  //查找`订单ID`对应的group对应有多少条数据
+  return _yc.count();
+  // 也可以加条件,注意条件里面的数据集名称要和 函数前的一样。_yc.count(_yc.rowno<=rowno);
+  //                                                    ^          ^
+
+  //下面是类似sql中的row_number功能的实现。rowno是原始数据中存放的行号,通过判断行号是否相等来判断是否是同一条数据
+  //当然这样的实现很丑陋,但这仅仅是一个功能演示。_yc.count(_yc.rowno<=rowno)也可以实现类似功能
+  var idx=0;
+  for(var t in _yc){
+    idx=idx+1;
+    if(t.rowno==rowno)
+  	  return idx;  
+  }
+}
+

做好预定义后,我们可以在单元格中引用该函数

=订单ID_count(ds.订单ID)//计算某个订单号有几条记录
+

# 单元格函数

# ifEmpty(,)

  函数说明:
+  从前往后,参数如果不为null或空字符串,就返回当前参数值,如果都是为空,就返回""
+  语法:
+  ifEmpty(ValueExp1, ValueExp2,..... )
+

# iif(,,)

  函数说明:
+  根据布尔表达式的不同结果,返回不同的值
+  语法:
+  iif( (条件, 结果,)+,falseValueExp)
+  ***条件结果对*** 可以无限多,找到的第一个条件成立时,返回紧跟其后的结果
+
+例子:iif(param.xxx=='1','x1',param.yyy==2,'x2','x3')
+  解释:当param.xxx==1时,返回 'x1',param.yyy==2时,返回 'x2',否则返回'x3'
+  优先判断前面的条件
+

# sum(expr)

如果参数是集合类型,将对其做累加,其他类型不计算,直接返回
+

# max(expr)

如果参数是集合类型,将对其计算最大值,其他类型不计算,直接返回
+

# min(expr)

如果参数是集合类型,将对其计算最小值,其他类型不计算,直接返回
+

# avg(expr)

如果参数是集合类型,将对其做累加后计算平均值,其他类型不计算,直接返回
+

# desc_rank()

参数必须是单元格名称,现在只对只有一个行扩展的情况有效。
+按降序排名。 数字最大的是第一名。 参数填对应单元格。如:第1名有2个重复,下一个名次是3
+

# asc_rank()

参数必须是单元格名称,现在只对只有一个行扩展的情况有效。
+按升序排名。数字小大的是第一名。参数填对应单元格。如:第1名有2个重复,下一个名次是3 
+

# desc_dense_rank()

参数必须是单元格名称,现在只对只有一个行扩展的情况有效。
+按降序做密集排名。数字最大的是第一名。参数填对应单元格。如:第1名有两个重复,下一个名次是2 
+

# asc_dense_rank()

参数必须是单元格名称,现在只对只有一个行扩展的情况有效。
+按降序做密集排名。数字最小的是第一名。参数填对应单元格。 名次是连续的,如:第1名有两个重复,下一个名次是2  
+

# fromto(,)

fromto(开始值,结束值,步长)
+如:fromto(1,20) 缺省步长为1
+fromto(1,20,2)
+通常我们在计算补齐数据的时候使用它作为数据集来计算连续数据,从而达到补齐效果
+

# row()

函数说明:
+取得当前格所有行的行号
+

# col()

函数说明:
+取得当前单元格所在列的列号
+

# cellColName()

  函数说明:
+  取得当前单元格所在列的列名
+  语法:
+  cellColName()
+

# query(,)

  query(数据库连接名字,sql语句)
+

# range_count(,)

  range_count(单元格列表,值1,是否相等,值2,是否相等)
+  单元格列表中 大于值1 小于 值2的有多少个
+  是否相等:缺省为相等
+

# @vaule

本单元格的实际值
+

# floor()

  取带小数点的数字的地板值
+  floor(3.5)=4
+

# ceiling()

  取带小数点的数字的天板值
+  ceiling(3.5)=3
+

# 日期函数

# date(,,)

  使用方法:date(year,month,day)
+  例如 date(2021,12,1) 结果就是2021年12月1日
+

# .AddDays()

  必须是日期型变量才能使用
+  使用方法:date(2014,1,2).AddDays(-1)
+  结果:2014-1-1
+

# .AddMonths()

  必须是日期型变量才能使用
+  使用方法:date(2014,2,2).AddMonths(-1)
+  结果:2014-1-2
+

# .AddYears()

  必须是日期型变量才能使用
+  使用方法:date(2014,2,2).AddYears(-1)
+  结果:2013-2-2
+

# today()

当天

# prevDay()

昨天
以下函数如果没有参数,就是以当前日期计算,有的话就是按指定日期开始计算

# firstDayOfYear()

指定日期的当年第一天

# prevMonth()

上月同一天

# prevYear()

上年同一天

# quaterEnd()

本季度最后一天

# quaterBegin()

本季度第一天   
+

# monthEnd()

本月最后一天

# monthBegin()

本月第一天

# weekBegin()

本周第一天

# weekEnd()

本周最后一天

# weekNum()

星期几

# year()

# quater()

季度

# month()

# dayOfYear()

本年的几天

# dayOfMonth()

本月的几天

# hour()

24小时制的小时

# minute()

分钟

# second()

# formatDatetime()

格式化日期
+G 年代标志符   y 年   M 月   d 日
+h 时 在上午或下午 (1~12)   H 时 在一天中 (0~23)
+m 分   s 秒   S 毫秒   E 星期   D 一年中的第几天
+F 一月中第几个星期几   w 一年中第几个星期   W 一月中第几个星期
+a 上午 / 下午 标记符   k 时 在一天中 (1~24)
+K 时 在上午或下午 (0~11)
+z 时区
+
+缺省格式为:yyyy-MM-dd
+如果第一个参数不是日期类型,那么将使用缺省格式分析该字符串,将之装换为日期后再格式化
+举例:formatDatetime('2007-01-01','yyyy年MM月dd日HH时mm分ss秒')
+formatDatetime('2007-01-01')
+

# 字符串函数

# replaceStr(,,)

  query(源字符串,被替换字符串,替换字符串)
+

# substring(,,)

  substring(源字符串,开始位置,结束位置)
+

# length()

  length(字符串) 字符串长度
+

# indexof(,,)

  indexof(目标字符串,被查找字符串,(开始查找的位置)?)
+

# isEmpty()

  isEmpty(目标)
+  如果目标为NULL返回true
+  如果不是字符串,做toString()后作为字符串判断
+  如果是字符串,且等于"",返回true
+

# formatNumber()

  格式化数字。
+  缺省格式:###########0.##
+  如: formatNumber(1234.567) 输出为 1234.57
+  如要指定格式,在第二个参数写格式。
+  如:formatNumber(1234,567,"#####.0000")输出为:1234.5670
+

# split()

  分割字符串
+  split(源字符串,分割符)
+  split("123,456,789", ",")输出为:["123" ,"456","479"], 一个数组列表
+

# json_parse

 类似js中的JSON.parse 。将字符串解析为对象
+json_parse('[{"a":1},{"a":2}]') 
+

# json_stringify

  类似js中的JSON.stringify,将对象转换为json字符串
+  json_stringify([{"a":1},{"a":2}])
+ + + diff --git a/zh/guide/getting-started.html b/zh/guide/getting-started.html new file mode 100644 index 0000000..4e803ce --- /dev/null +++ b/zh/guide/getting-started.html @@ -0,0 +1,62 @@ + + + + + + 快速上手 | CellReport + + + + + + + + +

# 快速上手

# 依赖环境

# 安装编译好的版本

这一章节会帮助你从头搭建一个 CellReport 设计和运行网站。

  • 步骤1: 下载 +下载并安装 net6sdk 或 runtime +下载Redis(可选)。如果需要对最终报表结果缓存,请下载 +下载解压本软件的release到一个目录。假设下载解压到了d:\cellReport +运行:
cd cellReport
+//windows下启动 dotnet reportWeb\reportWeb.dll  --urls http://*:5000 --ContentRoot . --WebRoot ..\wwwroot 
+start.bat
+//或 linux 下以这种方式启动
+dotnet reportWeb/reportWeb.dll  --urls http://*:5000 --ContentRoot . --WebRoot ../wwwroot 
+// 指定启动端口为5000 和 静态文件存放路径
+

如果不指定urls参数,将运行在端口5000 ,如果不指定webroot ,缺省就是当前目录的wwwroot

  • 步骤2: 首次运行和测试 +使用chrome (版本81 以后的才可以)或最新的 edge 浏览器,登陆网址:
http://127.0.0.1:5000
+

缺省的管理员用户名口令在appsetting.json中,查找admin_user 和 admin_password

选中《报表组管理》,如果需要新的数据源,请在这里添加。

sql server 连接串
+Data Source=ip地址;Initial Catalog=数据库名字;Persist Security Info=True;User ID=用户;Password=口令;Min Pool Size=1;Max Pool Size=50;Connect Timeout=15000;Application Name=报表连接
+

配置完毕后,按F5 刷新页面,点报表目录,正常的话,这是应该能看到所有的测试报表了。

  • 步骤3: 自己的第一张报表 +参考操作视频()

# 全手工构建

  • 从github 下载压缩包或git clone
  • 前端构建 node>=14
cd front
+npm i
+npm run build   //构建
+mpm run server // 前端启动
+
  • 后端构建 使用vs2022 +在end 目录用 vs2022打开sln文件。执行生成或运行测试
+ + + diff --git a/zh/guide/index.html b/zh/guide/index.html new file mode 100644 index 0000000..ecd0db7 --- /dev/null +++ b/zh/guide/index.html @@ -0,0 +1,39 @@ + + + + + + 介绍 | CellReport + + + + + + + + +

# 介绍

CellReport 是一个为复杂统计报表为核心目标的制作、运行工具。你可以使用数据库、excel文件、api服务、已有报表等为数据源,通过内置的集合函数组织数据,以类excel界面设计最终呈现结果。 +foo

CellReport 诞生的初衷是为了解决日常快速制作统计报表的需要。在总结了市面上各种报表软件的前提下,结合集合运算的思想,使得报表制作人员抛弃使用存储过程加工数据的方式,专注于每一类指标的加工,然后在报表设计界面,通过集合函数组织数据,极大得方便了报表的制作和维护。

源码 文档 发行版
Github (opens new window) Github在线文档 (opens new window) github下载 (opens new window)
Gitee (opens new window) Gitee在线文档 (opens new window) gitee下载 (opens new window)

制作统计报表,往往不是一个sql语句能搞定的:

  • 有些报表需要从多个数据库取数;
  • 有些虽然是从一个数据库取数,但数据是分散在数据库的很多表中,需要多个sql语句组织有关数据,然后按照某些关系归并在一起;
  • 有些报表虽然是一个基础表,但对该表中的数据要经过不同的加工,一句sql语句不能将所有的报表要展现的数据组织完毕。比如统计报表中常见的本期、累计、完成比例。在数据库中,基础数据是按照一天天的发生数存在表中,本期为月初到查询日期的累计发生数数,累计为从年初到查询日期的累计发生数,完成比例为累计除上计划数,计划数肯定要在另一个表中单独存放。本期和累计虽然都是一个表,很明显因为条件的不同,一句sql不可能做到同时取出本期和累计。这样的统计报表最少需要3个sql取数才能将报表上所需要的数据全部取出,然后按照特定的条件(比如按机构)将三个数据集的归并,之后才能展现出正确的报表。
  • 传统的报表工具(如水晶为代表的国外报表工具),都是以单一数据集为基础的报表生成工具,如果你需要用到很多sql才能产生出一张统计报表,那么,你必须建临时表,通过写存储过程等办法,将分散在数据库中的数据组织到一个数据库表中,然后通过报表工具展现出来。这样的做法,也能解决中国式报表的生成问题,但报表的编写和维护量将非常大,而且报表逻辑不直观,一旦客户需要更改报表格式和逻辑,将是一件非常痛苦的事情。对于这样的报表工具而言,做报表就是写程序,报表工具沦落为最普通的展现工具。
  • 现在国内有些报表工具也有很多号称支持多数据集,但在做这样的统计报表时,一般都是通过单元格的上下级关系将各个数据集联系起来,无论是在报表生成效率和直观易用方面,都比较差。

提示

在cellReport中,建设性的加入了关于集合的运算功能,可以对各个数据集按照指定的条件分组归并,从而极大的减低开发统计报表的难度。本报表软件的集合的运算包括:并集、交集、以及集合的减法。最常用的就是求集合的并集。

# 它是如何工作的?

报表运行时,会首先以并行方式将所有数据集的数据取到运行环境,然后根据报表设计中预定义好的公式做数据的合并、运算,最终数据以json方式传给最终展现页面,前端页面根据json结果呈现最终展示。

报表运行环境内置了类js语言环境,所有运算都是以该语言为核心。通常制作报表,我们只需要记住10个左右的函数,以及加减乘除,就足够我们制作复杂的统计报表了。

运行环境提供了很多可以拦截接入自定义控制的地方,如:报表运行前的通用检查、控制数据集的数据是否回传前端等。前端展现可以动态插入自定义css、js 。

前端是以vue为基础,通过template-compiler模板编译器,可自由控制echart、数据展现等组件的显示样式。

后端运行的基础环境是net6。内存效率利用极高,仅需300M左右内存。内部大量异步任务和延迟返回等技术,执行效率基本和原生手写加工数据程序的运行效率相当。

我们可以通过实现FunctionUnit接口实现系统没有预定义的函数,也可以用内置语言实现一些简单的函数扩展。

# 为什么不是 ...?

# 以reporting serivice 、水晶报表为代表的国外软件

如果您工作中的报表量不多,展现不复杂(仅仅是简单的清单、分组、交叉),用这些软件完全是可以的。国外这些报表软件,在最终数据呈现方面,基本都是以一个数据集做最终的数据呈现,如果不能是一个数据集,那么就需要用存储过程、表值函数之类的方法做数据的预加工,在涉及指标类型很少的情况下,还可以不费太多时间,但一旦类型多,我们写这些后期不同类型数据合并到一起的工作,将会是重复、无意义、难于维护的冗长sql 。非常不利于统计报表的制作和维护。

# 国内的收费软件

收费极高。在制作统计类报表方面,比国外的软件要好很多。如果不是主要制作统计报表,这些软件就足够满足需要。但对主要工作就是统计报表的程序员来说,仍显复杂。如有些是通过单元格的父子关系组织多数据集的依赖关系,有些是通过可视化方式设置多数据集的关系,都注定了制作效率上差强人意,运行效率极低。再加上Java本身在这种基础软件上运行效率不高、极耗内存,当然如果不在意这些,也是很不错的。

# 国内的免费软件

。。。

+ + + diff --git a/zh/guide/lang.html b/zh/guide/lang.html new file mode 100644 index 0000000..8eb20b5 --- /dev/null +++ b/zh/guide/lang.html @@ -0,0 +1,406 @@ + + + + + + 内置语言 | CellReport + + + + + + + + +

# 内置语言

  • 内置语言的语法类似js。

# 基础数据类型

  • 数字: 如:1 1.2
  • 日期时间 如: 2021-10-10
  • 字符串 可以用单引号包起来,也可以用双引号包记起来,如:'hello' "hello"
  • 数组/列表 如:[ ] 空数组 [1,2] ["hello","world"] [1,"hello"]
  • 字典 如:{ } 空字典 或:{"k1":"hello","k2":"world"}
1.2 //数字
+date(2012,10,1) //日期
+"hello" //字符串
+'world' //字符串
+["hello","world"] //数组/列表
+{"k1":"hello",k2:"world"} //字典
+

# 基础运算

提示

null 空在和数字做运算时当做0,和字符串做运算时当做空字符串''

// 
+//加法  
+    =1+2 // 3
+    ="hello" + " CellReport" // hello CellReport
+    =123+ null // 123
+    ="hello" + null // hello
+    ="hello" + 123 // hello123
+    =123 + "hello"  // 123hello
+    =[1,2.3,4] +[5,6] //
+    
+// 除法。报表中经常会遇到除零或null,内置计算是直接返回0
+    1/2     // 0.5
+    123/0     // 0
+    123/null // 0
+
+    - * / % 
+
  • 逻辑判断 :
   >   >=   <   <=  ==
+
  • 关系运算:
 && 逻辑与
+ ||  或
+ and  与 // 兼容 sql 的写法
+ or 或 // 兼容 sql 的写法
+ ''|| false|| null|| 'A'  // A
+ '' and false and  null and 'A'  // false
+  'A' and    'B' // B
+  
+ in 在后续列表的值里面 
+ not  in 不在后续列表的值里面
+ var aaa='a2'
+aaa in ['a1','a2'] // true
+aaa in ('a1','a2') // true 兼容 sql 的写法
+aaa not in ['a1','a2'] // false
+aaa not in ('a1','a2') // false 兼容 sql 的写法
+
+

# 扩展运算符(...)

trace("{a:1, ...{b:2} }====>",{a:1, ...{b:2} });  // {"a":1,"b":2}
+{a:1, ...{a:3,b:2} } ; //{"a":3,"b":2}
+[...[1,1+2],4] // [1,3,4]
+

# 语句规范

注意

普通单独语句必须以分号结束,for 、function 等语句块 后不跟分号

# 变量定义

var my_test_1="22";//必须以var 开始
+

# 条件语句 if

if(param.b_date=='2022-01-01')
+    return '2022元旦';
+else    
+    return '不是2022元旦';
+

# 循环for

var lj_sum=0;
+for(var i=0;i<10;i++){
+    lj_sum=lj_sum+i;
+}
+//对数组循环
+foreach(var one in [1,2,3]){
+
+}
+// ds是数据集的名称
+foreach(var one in ds){
+    __env__.logger.Info(ds.xxx);
+}
+

# 函数定义

function hello(p){
+    return "hello "+p;
+}
+// 可以函数嵌套
+function func_parent(p){
+    function hello(p){//内部嵌套的函数,出了func_parent后无效
+        return "hello "+p;
+    }
+    return hello(p);
+}
+

# 后端linq

$ 表示循环变量。通常参数都是lambda 函数。集合运算函数中不支持。 +绝大部分函数都是延迟计算。

# All(判断函数)

确定序列中的所有元素是否都满足条件。 +参数: 用于测试每个元素是否满足条件的函数。

var test_arr=[4,2,3,1,5,7,6,8,10,9,];
+test_arr.all(x=>x<11);//true
+test_arr.all(x=>x<3);//false
+

# Append()

添加一个元素。不影响原有的列表

var test_arr=[1,2,3];
+var sencond=test_arr.Append(4);// [1,2,3,4]
+
+

# Any(判断函数)

确定序列中是否存在元素满足指定条件。 +参数: 用于测试每个元素是否满足条件的函数。

var test_arr=[4,2,3,1,5,7,6,8,10,9,];
+test_arr.any(x=>x<1);//false
+

# Count()

序列计数。 +如果没有参数,然后序列元素的个数 +如果包含参数,这个参数需要是一个 用于测试每个元素是否满足条件的函数,最终返回满足判断函数的元素个数。

var test_arr=[4,2,3,1,5,7,6,8,10,9,];
+test_arr.Count();// 10
+test_arr.Count(x=>x>8);// 2
+

# Concat()

连接多个序列

[1,2,3].Concat([2,3,4]) ;// [1,2,3,2,3,4]
+[1,2,3].Concat([2],[3,4]) ;// [1,2,3,2,3,4]
+

# Contains()

是否保含元素。 +如果只有一个参数,使用缺省判断函数测试是否包含这个参数 +如果两个参数,第二个参数是用于判断是否相等的函数,使用这个判断函数测试是否包含这个第一个参数

var test_arr=[4,2,3,1,5,7,6,8,10,9,];
+test_arr.Contains(2);// true
+var arr2 = [{Name:"A", 'Val':1}, {'Name':"B", 'Val':2}]; 
+var res2 = arr2.contains({'Name':"C", 'Val':2}, (a, b)=>{ return a.Val == b.Val; }) ;  //  true
+

# Distinct()

是否保护元素。 +如果没有参数,通过使用默认的相等比较器对值进行比较,返回序列中的非重复元素。 +如果一个参数,这个参数是用于判断是否相等的函数,使用这个判断函数比较器对值进行比较,返回序列中的非重复元素。

trace('[1,2,1,3].distinct()',[1,2,1,3].distinct()); //[1,2,3]
+[{Name:"A", Val:1}, {Name:"B", Val:1}].distinct((a, b)=>{ return a.Val == b.Val; });//{Name:"A", Val:1}
+

# First()

返回第一个元素。 +如果没有参数,返回第一个元素。 +如果一个参数,第一个参数是用于判断条件是否成立的函数,返回满足条件的第一个元素

var test_arr=[4,2,3,1,5,7,6,8,10,9,];
+test_arr.First(x=>x>8);//10
+test_arr.First();//4
+

# Last()

返回最后一个元素。 +如果没有参数,返回最后一个元素。 +如果一个参数,第一个参数是用于判断条件是否成立的函数,返回满足条件的最后一个元素,如果没有,就返回null +如果有第二个参数,这个参数是用于返回没有last元素时应该返回的值

var test_arr=[4,2,3,1,5,7,6,8,10,9,];
+test_arr.Last(x=>x<4);//1
+test_arr.Last();//9
+test_arr.Last(x=>x>14 , -1); // 由于没有满足条件的元素,所以返回 -1
+

# Where(判断函数)

基于谓词筛选值序列。 +参数: 用于测试每个元素是否满足条件的函数。

var test_arr=[4,2,3,1,5,7,6,8,10,9,];
+test_arr.where(x=>x>8);//[10,9]
+

# max()

如果有第一个参数,这个参数是返回key函数,最终返回最大的key 值。如果没有参数,就按元素本身比较


+var arr1 = [1, 2, 3, 4, 5, 6, 7, 8];
+var max1 = arr.max();  // 8 
+
+var arr2 = [{Name:"A", Val:1}, {Name:"B", Val:2}];
+var max2 = arr2.max(function(t){ return t.Val });   // 2 
+

# min()

如果有第一个参数,这个参数是返回key函数,最终返回最小的key 值。如果没有参数,就按元素本身比较

var arr1 = [1, 2, 3, 4, 5, 6, 7, 8];
+var min1 = arr.min();  // 1 
+
+var arr2 = [{Name:"A", Val:1}, {Name:"B", Val:2}];
+var min2 = arr2.min(function(t){ return t.Val });   // 1 
+

# MaxBy()

第一个参数是返回key函数,最终返回最大的key 值对应的元素

var arr2 = [{Name:"A", 'Val':1}, {'Name':"B", 'Val':2}]; 
+trace('MaxBy(x=>x.Val)',arr2.MaxBy(x=>x.Val));//{'Name':"B", 'Val':2}
+

# MinBy()

第一个参数是返回key函数,最终返回最小的key 值对应的元素

var arr2 = [{Name:"A", 'Val':1}, {'Name':"B", 'Val':2}]; 
+trace('MinBy(x=>x.Val)',arr2.MinBy(x=>x.Val));//{Name:"A", 'Val':1}
+

# Sum()

第一个参数是返回key函数,最终返回最小的key 值对应的元素

var arr1 = [1, 2, 3, 4, 5, 6, 7, 8];
+var sum1 = arr.sum();  // 36 
+
+var arr2 = [{Name:"A", Val:1}, {Name:"B", Val:2}];
+var sum2 = arr2.sum(function(t){ return t.Val });   // 3 
+

# Reduce

第一个参数是计算前面计算结果和当前元素的函数,第二个参数是初始值。很强大的函数

var fruits = [ {  description: 'orange', Amount: 50}, {  description: 'orange', Amount: 50},
+ {  description: 'apple', Amount: 75}, {  description: 'kiwi', Amount: 35}, {  description: 'watermelon', Amount: 25},];
+ 
+trace('reduce(235)', fruits.map(item => item.Amount).reduce((prev, curr) => prev + curr, 0) ); //reduce 函数,
+var sentence = "the quick brown fox jumps over the lazy dog";
+trace('sentence(原始)', sentence   );
+trace('reduce(反转)',  split(sentence," ").reduce((prev, curr) => curr +' ' +prev) );
+
+

# Select

将序列中的每个元素投影到新序列。

  var test_arr=[{'a':1},{'a':2},{'a':3}];
+  test_arr.Where(x=>x.a>1).Select( x=> {return {'b':x.a*2}; } ) ; // [{'b':4},{'v':6}]
+

# SelectMany

Projects each element of a sequence to an array and flattens the resulting sequences into one sequence. +处理序列中的每一个元素,并且熨平结果到一个新的大序列结果中。 +第一个参数:返回每个元素对应的序列 的函数。这个函数的第二个参数是元素所在位置 +第二个参数(可选) : 需要两个参数。第一个参数,原始序列中的元素,第二个参数,中间序列中的元素,返回这两个参数计算后的新元素的序列

var arr = [{Name:"A", Values:[1, 2, 3, 4]}, {Name:"B", Values:[5, 6, 7, 8]}];  
+
+arr.selectMany(t=>{ return t.Values; });// [1, 2, 3, 4,5, 6, 7, 8]
+
+arr.selectMany(t=>{ return t.Values; }, (t, u)=>{ return {Name:t.Name, Val:u};});
+// [{"Name":"A","Val":1},{"Name":"A","Val":2},{"Name":"A","Val":3},{"Name":"A","Val":4},{"Name":"B","Val":5},{"Name":"B","Val":6},{"Name":"B","Val":7},{"Name":"B","Val":8}]
+

# ForEach

对序列中的每个元素都调用一次函数参数

var arr = [1, 2, 3, 4, 5];
+arr.forEach(t=>{ if(t % 2 ==0) trace(t); });   
+

# groupBy

第一个参数:key选择器 +第二个参数可选:如果没有,就是将同组的元素放到一个List序列中。如果有,对同组的元素都调用这个处理函数,返回新元素组成新的List序列 +第三个参数:对结果进一步出来,处理函数接收两个参数(Key,中间List序列),作为最终结果返回。如果没有这个参数,就将(Key,中间List序列) 作为最终结果返回

var arr = [{Name:"A", Val:1}, {Name:"A", Val:2}, {Name:"C", Val:3}, {Name:"C", Val:4}]; 
+var res = arr.groupBy( function(t){ return t.Name; } ); 
+res.forEach(function(t){ 
+    trace("Key: " + t.Key, "OBJ: ", t); //有Key属性
+});
+// Key: A OBJ: [{"Name":"A","Val":1},{"Name":"A","Val":2}]
+// Key: C OBJ: [{"Name":"C","Val":3},{"Name":"C","Val":4}]
+var res = arr.groupBy( t=>{ return t.Name; } ,$.Val); 
+res.forEach(function(t){ 
+    trace("Key: " + t.Key, "OBJ: ", t); //有Key属性
+}); 
+// Key: A OBJ:  [1,2]
+// Key: C OBJ:  [3,4]
+var res = arr.groupBy( x=>x.Name  ,v=>v,  (k,v)=>{ return {k,cnt:v.Count(),min:v.min($.Val),sum:v.sum(x=>x.Val) }; } ); 
+res.forEach(function(t){ 
+    trace("Key: " + t.Key, "OBJ: ", t);  //无Key属性
+}); 
+// Key:  OBJ:  {"k":"A","cnt":2,"min":1,"sum":3}
+// Key:  OBJ:  {"k":"C","cnt":2,"min":3,"sum":7}
+

# ToDictionary

转换为Dictionary。实例化。 +第一个参数:key选择器 +第二个参数可选

var arr = [{Name:"A", Val:1}, {Name:"A", Val:2}, {Name:"C", Val:3}, {Name:"C", Val:4}]; 
+var res = arr.groupBy( $.Name ).ToDictionary($.Key,$); 
+trace(res);
+// {"A":[{"Name":"A","Val":1},{"Name":"A","Val":2}],"C":[{"Name":"C","Val":3},{"Name":"C","Val":4}]}
+
+

# Slice

和js 中slice 类似。参数:起始位置 结束位置,如果为负数,就是从结尾倒数

var test_arr=fromto(1,10);  
+trace('slice()',test_arr.slice());  //不输入参数就是全部
+trace('slice(2)',test_arr.slice(2)); // 跳过两个
+trace('slice(1,3)',test_arr.slice(1,3)); //取第1 个(含) 到 第3 个(不含)。前含后不含
+trace('slice(-3,-1)',test_arr.slice(-3,-1));// 倒数第三个到倒数第三个
+trace('slice(-3)',test_arr.slice(-3));// 从倒数第三个开始
+

# Take

从头开始返回指定数目的元素

trace('take(2)=',test_arr.Take(2));// 返回两个
+

# Skip

从头开始跳过指定数目的元素后,其他全部返回

trace('Skip(2)=',test_arr.Skip(2));// 跳过两个
+

# TakeWhile

只要条件满足就返回到新序列里面,直到遇到不满足的第一个条件开始,剩余的全部忽略

trace('TakeWhile(x=>x<5)',test_arr.TakeWhile(x=>x<5));
+

# SkipWhile

只要条件满足就跳过,直到遇到不满足的第一个条件开始,剩下的全部返回到新序列里面

trace('skipWhile(x=>x<5)',test_arr.skipWhile(x=>x<5)); 
+

# orderBy thenBy ThenByDescending orderByDescending

升序。稳定排序 +参数:根据键对序列的元素进行排序。有orderby的后面才可以跟thenby .

var arr = [ {Name:"C", Val:3}, {Name:"C", Val:4},{Name:"A", Val:11}, {Name:"A", Val:2},]; 
+trace( arr.orderby(x=>x.Name).ThenBy(x=>-x.Val));
+//  [{"Name":"A","Val":11},{"Name":"A","Val":2},{"Name":"C","Val":4},{"Name":"C","Val":3}]
+trace( arr.orderby(x=>x.Name).ThenByDescending(x=>-x.Val));
+// [{"Name":"A","Val":2},{"Name":"A","Val":11},{"Name":"C","Val":3},{"Name":"C","Val":4}]
+

# zip

打包

var numbers = [ 1, 2, 3, 4, ];
+var words = [ "one", "two", "three" ];
+numbers.Zip(words ).forEach(item=>trace(item) );
+//[1,"one"]
+//[2,"two"]
+//[3,"three"]
+numbers.Zip(words, (first, second) => first + "===" + second).forEach(item=>trace(item) );
+//1===one
+//2===two
+//3===three
+

# Except

生成两个序列的差集。

trace({a:1,b:2}.Except({a:1}).ToDictionary($.Key,$.Value)); // [{"Key":"b","Value":2}]
+trace([ 1, 2, 3, 4, ].Except([ 1, 2,  ])); // [3,4]
+trace("1ab11dc".Except("abc")); // ['1','d']
+trace([ 1, 2, 3, 4, ].Except([ "abc"  ])); // 异常,不能执行
+
+

# ExceptBy

根据指定的键选择器函数生成两个序列的集差异。

var arr1 = [{Name:"A", Val:1}, {Name:"B", Val:2}, {Name:"C", Val:3}];
+var arr2 = [{a:"A"}]; 
+var res1 = arr1.ExceptBy(arr2, 
+    t=> t.Name  ,  // arr1 关键字选择器
+    (x,y)=>x.a==y  // 比较运算器 x是arr2里的记录  y 是上面的关键字选择器的结果。如果关键字选择器 的结果类型和arr2 一样,这个参数可以省略
+    ) ;        
+ trace(res1); //   [{"Name":"B","Val":2},{"Name":"C","Val":3}]
+var arr1 = [{Name:"A", Val:1}, {Name:"B", Val:2}, {Name:"C", Val:3}];
+var arr2 = ["A"]; 
+var res1 = arr1.ExceptBy(arr2, 
+    t=> t.Name   // arr1 关键字选择器    
+    ) ;        
+ trace(res1); //   [{"Name":"B","Val":2},{"Name":"C","Val":3}]
+

# Intersect

生成两个序列的交集。

trace({a:1,b:2}.Intersect({a:1})); // [{"Key":"a","Value":1}]
+trace([ 1, 2, 3, 4, ].Intersect([ 1, 2,  ])); // [1,2]
+

# IntersectBy

根据指定的键选择器函数生成两个序列的交集。

var arr1 = [{Name:"A", Val:1}, {Name:"B", Val:2}, {Name:"C", Val:3}];
+var arr2 = [{a:"A"}]; 
+var res1 = arr1.IntersectBy(arr2, 
+    t=> t.Name  ,  // arr1 关键字选择器
+    (x,y)=>x.a==y  // 比较运算器 x是arr2里的记录  y 是上面的关键字选择器的结果。如果关键字选择器 的结果类型和arr2 一样,这个参数可以省略
+    ) ;        
+ trace(res1); //   [{"Name":"A","Val":1}]
+var arr1 = [{Name:"A", Val:1}, {Name:"B", Val:2}, {Name:"C", Val:3}];
+var arr2 = ["B"]; 
+var res1 = arr1.IntersectBy(arr2, 
+    t=> t.Name   // arr1 关键字选择器    
+    ) ;        
+ trace(res1); //   [{"Name":"B","Val":2}]
+

# union

生成两个序列的集联合。

var arr1 = [1, 2, 3, 4, 5]; 
+var arr2 = [5, 6, 7, 8, 9];
+var res = arr1.union(arr2);  // [1, 2, 3, 4, 5, 6, 7, 8, 9]      
+ trace(res); //   []
+

# unionBy

根据指定的键选择器函数生成两个序列的集联合。

var arr1 = [{Name:"A", Val:1}, {Name:"B", Val:2}, {Name:"C", Val:3}];
+var arr2 = [{Name:"A"}]; 
+var res1 = arr1.unionBy(arr2, 
+    t=> t.Name  ,  // arr1 关键字选择器
+    (x,y)=>x.a==y  // 比较运算器 x是arr2里的记录  y 是上面的关键字选择器的结果。如果关键字选择器 的结果类型和arr2 一样,这个参数可以省略
+    ) ;        
+ trace(res1); // 
+

# groupJoin

基于键值等同性将两个序列的元素进行关联,并对结果进行分组。

var arr1 = [{Name:"A", Val:1}, {Name:"B", Val:2}, {Name:"C", Val:3}];
+var arr2 = [{Code:"A"}, {Code:"A"}, {Code:"B"}, {Code:"B"}, {Code:"C"}]; 
+var res1 = arr1.groupJoin(arr2, 
+    t=> t.Name,                     // arr1 selector
+    u=>u.Code,                     // arr2 selector
+    (t, u)=>{ return {Item:t, Group:u} ;}) ;         // result selector    
+trace(res1);
+// [
+// {"Item":{"Name":"A","Val":1},"Group":[{"Code":"A"},{"Code":"A"}]},
+// {"Item":{"Name":"B","Val":2},"Group":[{"Code":"B"},{"Code":"B"}]},
+// {"Item":{"Name":"C","Val":3},"Group":[{"Code":"C"}]}]
+

# join

基于匹配键对两个序列的元素进行关联。

var test_join=
+        [{a:1,b:2},{a:2,b:2}].join([{a:1,b:'b11'},{a:11,b:'b222'}],
+          left=>left.a ,
+          right=>right.a,
+          (left,right)=>{key:left.a,left_prop:left.b,right:right.b } 
+);
+// [{"key":1,"left_prop":2,"right":"b11"}]
+
+trace(test_join);
+

# JoinAsString

将列表中的每一项取ToString(),然后用参数指定的字符串连接起来,如果没提供,就用逗号链接

[ "one", "two", "three" ].joinAsString();//one,two,three
+[ "one", "two", "three" ].joinAsString('_');//one_two_three
+

# ToList

以上所有返回的是序列的函数,内部都是一个枚举对象,使用这个函数,将枚举对象转换为真正的序列列表

test_arr.skipWhile(x=>x<5).ToList(); 
+

# 大量的例子

function test_parse_json(){
+  var test_arr=[1,2,3];
+  __env__.logger.error( test_arr.Where(x=>x>2).Select( x=> x*2 )  );
+  for(var one in test_arr.Where(x=>x>2).Select( x=> x*2 )){
+    __env__.logger.error("one:"+ one.ToString() );
+  }
+  var test_arr=[{'a':1},{'a':2},{'a':3}];
+  test_arr.Where(x=>x.a>2).Select( x=> {return {'b':x.a*2}; } ) ;
+  
+  var txt='{"a":1,"b":[1,2,3]}'; 
+  return json_parse(txt);
+}
+var lambds_func= function(x){ return 1+33 ;};
+function test_lambda_func(func){
+	trace('test_lambda_func');
+    trace(func());
+}
+test_lambda_func(x=>1+2);
+
+trace('lambds_func(1)='+lambds_func(1));
+var test_arr=fromto(1,10);  
+trace('slice()',test_arr.slice());  //和js 中slice 类似,不输入参数就是全部
+trace('slice(2)',test_arr.slice(2)); // 跳过两个
+trace('slice(1,3)',test_arr.slice(1,3)); //取第1 个(含) 到 第3 个(不含)。前含后不含
+trace('slice(-3,-1)',test_arr.slice(-3,-1));// 倒数第三个到倒数第三个
+trace('slice(-3)',test_arr.slice(-3));// 从倒数第三个开始
+var fruits = [ {  description: 'orange', Amount: 50}, {  description: 'orange', Amount: 50},
+ {  description: 'apple', Amount: 75}, {  description: 'kiwi', Amount: 35}, {  description: 'watermelon', Amount: 25},];
+ 
+trace('reduce(235)', fruits.map(item => item.Amount).reduce((prev, curr) => prev + curr, 0) ); //reduce 函数,第一个参数是计算前面计算结果和当前元素的函数,第二个参数是初始值
+var sentence = "the quick brown fox jumps over the lazy dog";
+trace('sentence(原始)', sentence   );
+trace('reduce(反转)',  split(sentence," ").reduce((prev, curr) => curr +' ' +prev) );
+trace('---------------------------');
+trace('[1,2,1,3].distinct()',[1,2,1,3].distinct());// 如果没有参数,就是对每个元素做distinct ,如果有参数,这个参数需要是用来做比较的函数
+trace('[{Name:"A", Val:1},{Name:"B", Val:1}].distinct(function(a, b){ return a.Val == b.Val })',[{Name:"A", Val:1}, {Name:"B", Val:1}].distinct((a, b)=>{ return a.Val == b.Val; }));
+
+var test_arr=[4,2,3,1,5,7,6,8,10,9,];
+trace('test_arr=',test_arr);
+
+trace('all(x=>x<10)',test_arr.all(x=>x<11));//全部为true
+trace('any(x=>x<2)',test_arr.any(x=>x<2));// 有为true
+trace('skipWhile(x=>x<5)',test_arr.skipWhile(x=>x<5)); //只要条件满足就跳过,直到遇到不满足的第一个条件开始,剩下的全部返回到新序列里面
+trace('TakeWhile(x=>x<5)',test_arr.TakeWhile(x=>x<5));//只要条件满足就返回到新序列里面,直到遇到不满足的第一个条件开始,全部忽略
+trace('Min()',test_arr.Min());
+trace('Max()',test_arr.Max());
+trace('Sum()',test_arr.Sum());
+
+
+trace('take(2)=',test_arr.Take(2));// 返回两个
+trace('Skip(2)=',test_arr.Skip(2));// 跳过两个
+trace('First()=',test_arr.First()); //第一个
+trace('First(x=>x>4)=',test_arr.First(x=>x>4)); //满足条件的第一个,如果没有就返回空
+trace('First(x=>x>14  ,-1 )  ',test_arr.First(x=>x>14 , -1)); //满足条件的第一个,如果没有就返缺省值(第二个参数)
+trace('---------------------------');
+trace('Last()',test_arr.Last());//和first类似
+trace('Last(x=>x>4)',test_arr.Last(x=>x>4)); 
+trace('Last(x=>x>14  ,-1 )  ',test_arr.Last(x=>x>14 , -1));
+trace('ForEach(x=>x>4)\n',test_arr.ForEach(x=> trace('foreach:',x)));//ForEach 对每个元素用函数处理一下
+trace('---------------------------');
+trace('Contains(3) ',test_arr.contains(3));
+
+var arr2 = [{Name:"A", 'Val':1}, {'Name':"B", 'Val':2}]; 
+trace(arr2);
+var res2 = arr2.contains({'Name':"C", 'Val':2}, (a, b)=>{ return a.Val == b.Val; }) ;  //  true
+trace('MinBy(x=>x.Val)',arr2.MinBy(x=>x.Val)); //以函数计算后,满足最小条件的元素
+trace('MaxBy(x=>x.Val)',arr2.MaxBy(x=>x.Val));//以函数计算后,满足最大条件的元素
+trace('Sum(x=>x.Val)',arr2.Sum(x=>x.Val)); //以函数计算后的结果求和
+
+trace("arr2.contains({'Name':\"C\", 'Val':2}, (a, b)=>{ return a.Val == b.Val; }) ",res2);
+trace('---------------------------');
+  var test_arr=fromto(1,10);
+  trace("text !!!");
+  trace( json_stringify( test_arr.Where(x=>x>2).Select( x=> x*2 ).ToList() )  );//可以级联。ToList转换为列表(类似js里面的数组和c#里面的List)
+
+  for(var one in test_arr.Where(x=>x>2).Select( x=> x*2 )){
+    trace("one:"+ one.ToString() );
+  }
+  var test_arr=[{'a':1},{'a':2},{'a':3}];
+  trace( test_arr.Where(x=>x.a>1).Select( x=> {return {'b':x.a*2}; } ).ToList());
+
+var lambds_func= (x)=>{ return 1+1 ;};
+trace('lambds_func(1)='+lambds_func(1));
+

# 修改数据集数据

如果需要取完数据后,对数据集内的数据进行修改,我们必须要使用ds.Rows取出对应的行集。循环这个行集逐个修改。不能对数据集新增列,如果需要新增,我们要在sql 中提前准备好这个列,供我们修改使用。

function _after_calc_dataset_(){
+  trace(" begin _after_calc_dataset_");
+  trace(ds.Rows.select(x=>[x.排名, x.链接Id] ));// 打印修改前的数据
+  ds.Rows.ForEach(x=>{x.setData('排名',1111);} );//修改数据
+  trace(ds.Rows.select(x=>[x.排名, x.链接Id] ));// 打印修改后的数据
+  trace(" end _after_calc_dataset_");
+}
+
+ + + diff --git a/zh/guide/other-dataset.html b/zh/guide/other-dataset.html new file mode 100644 index 0000000..bef96dd --- /dev/null +++ b/zh/guide/other-dataset.html @@ -0,0 +1,59 @@ + + + + + + 更多的数据集类型 | CellReport + + + + + + + + +

# 更多的数据集类型

来自于数据库中的数据,一个sql 可以返回多个数据集(某些数据库引擎不支持),例如以下语句:

SELECT 产品.产品ID, 产品.产品名称
+FROM 产品
+where 类别ID='$leibie$';
+
+SELECT 类别.类别ID, 类别.类别名称
+FROM 类别;
+

当前数据集使用的是第一个数据集中的数据。如果我们想使用第二个数据集中的数据,这时候就需要我们新建下面这个类型的数据集

# 来自其他数据集

这里所有有多个数据集返回的数据集名称都会显示,挑选出我们打算引出的数据集,选中正确的序号,就可以像正常数据集一样使用了。 +demo

# 来自于excel文件

一些计划数等数据,通常不会长久保存到数据库中,这时候我们可以直接将excel文件中的数据引入到当前报表中。引入后,我们可以在上面的sql输入框中输入sql(不输入sql 的话,就是原始excel中的数据),对取过来的数据,做进一步的加工或筛选。语法为sqlite的语法。

# 来自API调用

我们可以使用内置函数直接调用API服务(或类似API服务的web服务)。通常我们使用的是函数web_request +如果需要token等与登录有关的信息,请使用该函数模拟登录。返回的json 数据将会被转换为内部可用的数据集。数据正确取过来后,与sql数据集一样正常使用,没有区别。

web_request({
+'url':"API网址"  //用你的地址替换这里
+,'method':'post'  //可用方法: get ,post
+,'data':{'branch_no':'410000','aaa':param.aaa}  //使用form提交,不需要的话,用null替换冒号后的内容,param.aaa 是你定义的参数。这样不能用 $aaa$
+,'json':null      //使用json提交,json 和data 不能同时有值,至少有一个是null
+,'headers':null   
+});// 语句必须以逗号结束
+

# 来自组件报表

我们的报表很多后,有些指标会在多个报表中出现,这时候如果我们每次制作报表都将这些指标的加工重做一遍,将会造成:

  • 多个报表间同一指标的数据可能不一致
  • 维护复杂,工作量大 +这时候我们可以使用该模式,将已有指标的报表直接引入到当前报表中使用

# 内存数据(sqlite)

在将所有数据都取到报表引擎后,我们有时候还要再做一些进一步的加工改造,这时候我们可以使用这个类型的数据集,将所有其他数据集当成表,来做进一步的查询。如:已有数据集: ds1、ds2。 我们新建的数据集ds3可以这样写sql:

selct * from ds1 join ds2 on ds1.xxx=ds2.xxx
+

注意

不要在这个数据集中引用自己,否则循环引用,会报错。

这种类似的数据集,总是在其他所有数据集取数完毕后计算。不用关注计算顺序。

# 来自html的table

很少用到,未实现

+ + +