347617796@qq.com 3 yıl önce
işleme
d88ca00dc0
100 değiştirilmiş dosya ile 9606 ekleme ve 0 silme
  1. 18 0
      .gitignore
  2. 60 0
      .mini-ide/compileMode.json
  3. 0 0
      .mini-ide/settings.json
  4. 207 0
      Component/aParse/aDiscode.js
  5. 202 0
      Component/aParse/aParse.acss
  6. 841 0
      Component/aParse/aParse.axml
  7. 149 0
      Component/aParse/aParse.js
  8. 1 0
      Component/aParse/aParse.json
  9. 293 0
      Component/aParse/html2json.js
  10. 180 0
      Component/aParse/htmlparser.js
  11. 2518 0
      Component/aParse/showdown.js
  12. 15 0
      Component/img-box/index.acss
  13. 8 0
      Component/img-box/index.axml
  14. 46 0
      Component/img-box/index.js
  15. 3 0
      Component/img-box/index.json
  16. 12 0
      Component/noData/noData.acss
  17. 6 0
      Component/noData/noData.axml
  18. 11 0
      Component/noData/noData.js
  19. 3 0
      Component/noData/noData.json
  20. 33 0
      Component/process/process.acss
  21. 27 0
      Component/process/process.axml
  22. 11 0
      Component/process/process.js
  23. 6 0
      Component/process/process.json
  24. 62 0
      Component/selectDate/selectDate.acss
  25. 26 0
      Component/selectDate/selectDate.axml
  26. 112 0
      Component/selectDate/selectDate.js
  27. 3 0
      Component/selectDate/selectDate.json
  28. 64 0
      Component/selectDate_two/selectDate_two.acss
  29. 64 0
      Component/selectDate_two/selectDate_two.axml
  30. 196 0
      Component/selectDate_two/selectDate_two.js
  31. 3 0
      Component/selectDate_two/selectDate_two.json
  32. 196 0
      Component/selectEnevt/selectEnevt.acss
  33. 40 0
      Component/selectEnevt/selectEnevt.axml
  34. 90 0
      Component/selectEnevt/selectEnevt.js
  35. 7 0
      Component/selectEnevt/selectEnevt.json
  36. 89 0
      Component/selectRule/selectRule.acss
  37. 71 0
      Component/selectRule/selectRule.axml
  38. 152 0
      Component/selectRule/selectRule.js
  39. 3 0
      Component/selectRule/selectRule.json
  40. 106 0
      Component/selectRule_two/selectRule_two.acss
  41. 39 0
      Component/selectRule_two/selectRule_two.axml
  42. 93 0
      Component/selectRule_two/selectRule_two.js
  43. 3 0
      Component/selectRule_two/selectRule_two.json
  44. 109 0
      Component/selectSection/selectSection.acss
  45. 28 0
      Component/selectSection/selectSection.axml
  46. 103 0
      Component/selectSection/selectSection.js
  47. 3 0
      Component/selectSection/selectSection.json
  48. 66 0
      Component/selectSectionBottom/selectSectionBottom.acss
  49. 36 0
      Component/selectSectionBottom/selectSectionBottom.axml
  50. 148 0
      Component/selectSectionBottom/selectSectionBottom.js
  51. 7 0
      Component/selectSectionBottom/selectSectionBottom.json
  52. 155 0
      Component/selectSectionStaff/selectSectionStaff.acss
  53. 74 0
      Component/selectSectionStaff/selectSectionStaff.axml
  54. 295 0
      Component/selectSectionStaff/selectSectionStaff.js
  55. 6 0
      Component/selectSectionStaff/selectSectionStaff.json
  56. 169 0
      Component/selectSectionStaff_tow/selectSectionStaff_tow.acss
  57. 54 0
      Component/selectSectionStaff_tow/selectSectionStaff_tow.axml
  58. 225 0
      Component/selectSectionStaff_tow/selectSectionStaff_tow.js
  59. 6 0
      Component/selectSectionStaff_tow/selectSectionStaff_tow.json
  60. 104 0
      Component/selectStaff/selectStaff.acss
  61. 35 0
      Component/selectStaff/selectStaff.axml
  62. 119 0
      Component/selectStaff/selectStaff.js
  63. 6 0
      Component/selectStaff/selectStaff.json
  64. 70 0
      Component/selectSx/selectSx.acss
  65. 21 0
      Component/selectSx/selectSx.axml
  66. 118 0
      Component/selectSx/selectSx.js
  67. 3 0
      Component/selectSx/selectSx.json
  68. 70 0
      Component/selectSxZp/selectSxZp.acss
  69. 32 0
      Component/selectSxZp/selectSxZp.axml
  70. 139 0
      Component/selectSxZp/selectSxZp.js
  71. 3 0
      Component/selectSxZp/selectSxZp.json
  72. 71 0
      Component/selectType/selectType.acss
  73. 33 0
      Component/selectType/selectType.axml
  74. 123 0
      Component/selectType/selectType.js
  75. 3 0
      Component/selectType/selectType.json
  76. 74 0
      Component/selectUser/selectUser.acss
  77. 28 0
      Component/selectUser/selectUser.axml
  78. 63 0
      Component/selectUser/selectUser.js
  79. 6 0
      Component/selectUser/selectUser.json
  80. 483 0
      app.acss
  81. 342 0
      app.js
  82. 107 0
      app.json
  83. BIN
      image/1.png
  84. BIN
      image/2.png
  85. BIN
      image/3.png
  86. BIN
      image/BM.png
  87. BIN
      image/Bf.png
  88. BIN
      image/Bj.png
  89. BIN
      image/a7.png
  90. BIN
      image/a_apply.png
  91. BIN
      image/a_entry.png
  92. BIN
      image/activeHome.png
  93. BIN
      image/activeTj.png
  94. BIN
      image/addImg.png
  95. BIN
      image/add_ticket.png
  96. BIN
      image/all.png
  97. BIN
      image/all2.png
  98. BIN
      image/apply_list.png
  99. 0 0
      image/approval_process.svg
  100. BIN
      image/att_sign.png

+ 18 - 0
.gitignore

@@ -0,0 +1,18 @@
+/node_modules
+/public/hot
+/public/storage
+/storage/*.key
+# /vendor
+.env
+.env.production
+.env.backup
+c.log
+.phpunit.result.cache
+Homestead.json
+Homestead.yaml
+npm-debug.log
+yarn-error.log
+.idea
+.kaitian
+.tea
+debug.log

+ 60 - 0
.mini-ide/compileMode.json

@@ -0,0 +1,60 @@
+{
+  "modes": [
+    {
+      "title": "日志分",
+      "page": "pages/statistics/log_rank/log_rank"
+    },
+    {
+      "title": "兑换",
+      "page": "pages/exchange/exchange/exchange"
+    },
+    {
+      "title": "功勋点明显",
+      "page": "pages/exchange/gxdDetail/gxdDetail"
+    },
+    {
+      "title": "兑换记录",
+      "page": "pages/exchange/exchangeRecord/exchangeRecord"
+    },
+    {
+      "title": "奖品详情",
+      "page": "pages/exchange/prizeDetail/prizeDetail"
+    },
+    {
+      "title": "商品详情",
+      "page": "pages/exchange/commodityDetail/commodityDetail"
+    },
+    {
+      "title": "公告内容",
+      "page": "pages/workbench/noticeDetail/noticeDetail",
+      "pageQuery": "id=20"
+    },
+    {
+      "title": "阶段排名",
+      "page": "pages/statistics/sectionRanking/sectionRanking"
+    },
+    {
+      "title": "悬赏任务详情",
+      "page": "pages/statistics/taskDetail/taskDetail",
+      "pageQuery": "id=2538"
+    },
+    {
+      "title": "审批详情",
+      "page": "pages/workbench/approveDetail/approveDetail",
+      "pageQuery": "id=7567"
+    },
+    {
+      "title": "我的任务",
+      "page": "pages/statistics/my_task/my_task"
+    },
+    {
+      "title": "本周任务",
+      "page": "pages/newspaperTask/newspaperTask"
+    },
+    {
+      "title": "周报",
+      "page": "pages/reportBox/report/report",
+      "pageQuery": "employee_id=181"
+    }
+  ]
+}

+ 0 - 0
.mini-ide/settings.json


+ 207 - 0
Component/aParse/aDiscode.js

@@ -0,0 +1,207 @@
+// HTML 支持的数学符号
+function strNumDiscode(str) {
+  str = str.replace(/∀/g, '∀');
+  str = str.replace(/∂/g, '∂');
+  str = str.replace(/&exists;/g, '∃');
+  str = str.replace(/∅/g, '∅');
+  str = str.replace(/∇/g, '∇');
+  str = str.replace(/∈/g, '∈');
+  str = str.replace(/∉/g, '∉');
+  str = str.replace(/∋/g, '∋');
+  str = str.replace(/∏/g, '∏');
+  str = str.replace(/∑/g, '∑');
+  str = str.replace(/−/g, '−');
+  str = str.replace(/∗/g, '∗');
+  str = str.replace(/√/g, '√');
+  str = str.replace(/∝/g, '∝');
+  str = str.replace(/∞/g, '∞');
+  str = str.replace(/∠/g, '∠');
+  str = str.replace(/∧/g, '∧');
+  str = str.replace(/∨/g, '∨');
+  str = str.replace(/∩/g, '∩');
+  str = str.replace(/∩/g, '∪');
+  str = str.replace(/∫/g, '∫');
+  str = str.replace(/∴/g, '∴');
+  str = str.replace(/∼/g, '∼');
+  str = str.replace(/≅/g, '≅');
+  str = str.replace(/≈/g, '≈');
+  str = str.replace(/≠/g, '≠');
+  str = str.replace(/≤/g, '≤');
+  str = str.replace(/≥/g, '≥');
+  str = str.replace(/⊂/g, '⊂');
+  str = str.replace(/⊃/g, '⊃');
+  str = str.replace(/⊄/g, '⊄');
+  str = str.replace(/⊆/g, '⊆');
+  str = str.replace(/⊇/g, '⊇');
+  str = str.replace(/⊕/g, '⊕');
+  str = str.replace(/⊗/g, '⊗');
+  str = str.replace(/⊥/g, '⊥');
+  str = str.replace(/⋅/g, '⋅');
+  return str;
+}
+
+//HTML 支持的希腊字母
+function strGreeceDiscode(str) {
+  str = str.replace(/Α/g, 'Α');
+  str = str.replace(/Β/g, 'Β');
+  str = str.replace(/Γ/g, 'Γ');
+  str = str.replace(/Δ/g, 'Δ');
+  str = str.replace(/Ε/g, 'Ε');
+  str = str.replace(/Ζ/g, 'Ζ');
+  str = str.replace(/Η/g, 'Η');
+  str = str.replace(/Θ/g, 'Θ');
+  str = str.replace(/Ι/g, 'Ι');
+  str = str.replace(/Κ/g, 'Κ');
+  str = str.replace(/Λ/g, 'Λ');
+  str = str.replace(/Μ/g, 'Μ');
+  str = str.replace(/Ν/g, 'Ν');
+  str = str.replace(/Ξ/g, 'Ν');
+  str = str.replace(/Ο/g, 'Ο');
+  str = str.replace(/Π/g, 'Π');
+  str = str.replace(/Ρ/g, 'Ρ');
+  str = str.replace(/Σ/g, 'Σ');
+  str = str.replace(/Τ/g, 'Τ');
+  str = str.replace(/Υ/g, 'Υ');
+  str = str.replace(/Φ/g, 'Φ');
+  str = str.replace(/Χ/g, 'Χ');
+  str = str.replace(/Ψ/g, 'Ψ');
+  str = str.replace(/Ω/g, 'Ω');
+
+  str = str.replace(/α/g, 'α');
+  str = str.replace(/β/g, 'β');
+  str = str.replace(/γ/g, 'γ');
+  str = str.replace(/δ/g, 'δ');
+  str = str.replace(/ε/g, 'ε');
+  str = str.replace(/ζ/g, 'ζ');
+  str = str.replace(/η/g, 'η');
+  str = str.replace(/θ/g, 'θ');
+  str = str.replace(/ι/g, 'ι');
+  str = str.replace(/κ/g, 'κ');
+  str = str.replace(/λ/g, 'λ');
+  str = str.replace(/μ/g, 'μ');
+  str = str.replace(/ν/g, 'ν');
+  str = str.replace(/ξ/g, 'ξ');
+  str = str.replace(/ο/g, 'ο');
+  str = str.replace(/π/g, 'π');
+  str = str.replace(/ρ/g, 'ρ');
+  str = str.replace(/ς/g, 'ς');
+  str = str.replace(/σ/g, 'σ');
+  str = str.replace(/τ/g, 'τ');
+  str = str.replace(/υ/g, 'υ');
+  str = str.replace(/φ/g, 'φ');
+  str = str.replace(/χ/g, 'χ');
+  str = str.replace(/ψ/g, 'ψ');
+  str = str.replace(/ω/g, 'ω');
+  str = str.replace(/ϑ/g, 'ϑ');
+  str = str.replace(/ϒ/g, 'ϒ');
+  str = str.replace(/ϖ/g, 'ϖ');
+  str = str.replace(/·/g, '·');
+  return str;
+}
+
+// 
+
+function strcharacterDiscode(str) {
+  // 加入常用解析
+  str = str.replace(/ /g, ' ');
+  str = str.replace(/"/g, "'");
+  str = str.replace(/&/g, '&');
+  // str = str.replace(/</g, '‹');
+  // str = str.replace(/>/g, '›');
+
+  str = str.replace(/&lt;/g, '<');
+  str = str.replace(/&gt;/g, '>');
+  str = str.replace(/&#8226;/g, '•');
+
+  return str;
+}
+
+// HTML 支持的其他实体
+function strOtherDiscode(str) {
+  str = str.replace(/&OElig;/g, 'Œ');
+  str = str.replace(/&oelig;/g, 'œ');
+  str = str.replace(/&Scaron;/g, 'Š');
+  str = str.replace(/&scaron;/g, 'š');
+  str = str.replace(/&Yuml;/g, 'Ÿ');
+  str = str.replace(/&fnof;/g, 'ƒ');
+  str = str.replace(/&circ;/g, 'ˆ');
+  str = str.replace(/&tilde;/g, '˜');
+  str = str.replace(/&ensp;/g, '');
+  str = str.replace(/&emsp;/g, '');
+  str = str.replace(/&thinsp;/g, '');
+  str = str.replace(/&zwnj;/g, '');
+  str = str.replace(/&zwj;/g, '');
+  str = str.replace(/&lrm;/g, '');
+  str = str.replace(/&rlm;/g, '');
+  str = str.replace(/&ndash;/g, '–');
+  str = str.replace(/&mdash;/g, '—');
+  str = str.replace(/&lsquo;/g, '‘');
+  str = str.replace(/&rsquo;/g, '’');
+  str = str.replace(/&sbquo;/g, '‚');
+  str = str.replace(/&ldquo;/g, '“');
+  str = str.replace(/&rdquo;/g, '”');
+  str = str.replace(/&bdquo;/g, '„');
+  str = str.replace(/&dagger;/g, '†');
+  str = str.replace(/&Dagger;/g, '‡');
+  str = str.replace(/&bull;/g, '•');
+  str = str.replace(/&hellip;/g, '…');
+  str = str.replace(/&permil;/g, '‰');
+  str = str.replace(/&prime;/g, '′');
+  str = str.replace(/&Prime;/g, '″');
+  str = str.replace(/&lsaquo;/g, '‹');
+  str = str.replace(/&rsaquo;/g, '›');
+  str = str.replace(/&oline;/g, '‾');
+  str = str.replace(/&euro;/g, '€');
+  str = str.replace(/&trade;/g, '™');
+
+  str = str.replace(/&larr;/g, '←');
+  str = str.replace(/&uarr;/g, '↑');
+  str = str.replace(/&rarr;/g, '→');
+  str = str.replace(/&darr;/g, '↓');
+  str = str.replace(/&harr;/g, '↔');
+  str = str.replace(/&crarr;/g, '↵');
+  str = str.replace(/&lceil;/g, '⌈');
+  str = str.replace(/&rceil;/g, '⌉');
+
+  str = str.replace(/&lfloor;/g, '⌊');
+  str = str.replace(/&rfloor;/g, '⌋');
+  str = str.replace(/&loz;/g, '◊');
+  str = str.replace(/&spades;/g, '♠');
+  str = str.replace(/&clubs;/g, '♣');
+  str = str.replace(/&hearts;/g, '♥');
+
+  str = str.replace(/&diams;/g, '♦');
+  str = str.replace(/&#39;/g, '\'');
+  return str;
+}
+
+function strMoreDiscode(str) {
+  str = str.replace(/\r\n/g, "");
+  str = str.replace(/\n/g, "");
+
+  str = str.replace(/code/g, "wxxxcode-style");
+  return str;
+}
+
+function strDiscode(str) {
+  str = strNumDiscode(str);
+  str = strGreeceDiscode(str);
+  str = strcharacterDiscode(str);
+  str = strOtherDiscode(str);
+  str = strMoreDiscode(str);
+  return str;
+}
+function urlToHttpUrl(url, rep) {
+
+  var patt1 = new RegExp("^//");
+  var result = patt1.test(url);
+  if (result) {
+    url = rep + ":" + url;
+  }
+  return url;
+}
+
+module.exports = {
+  strDiscode: strDiscode,
+  urlToHttpUrl: urlToHttpUrl
+}

+ 202 - 0
Component/aParse/aParse.acss

@@ -0,0 +1,202 @@
+.aParse{
+    margin: 0 5px;
+    font-family: Helvetica,sans-serif;
+    font-size: 28rpx;
+    color: #666;
+    line-height: 1.8;
+}
+view{
+    word-break:break-all;
+}
+.aParse-inline{
+    display: inline;
+    margin: 0;
+    padding: 0;
+}
+/*//标题 */
+.aParse-div{margin: 0;padding: 0;}
+.aParse-h1{ font-size:2em; margin: .67em 0 }
+.aParse-h2{ font-size:1.5em; margin: .75em 0 }
+.aParse-h3{ font-size:1.17em; margin: .83em 0 }
+.aParse-h4{ margin: 1.12em 0}
+.aParse-h5 { font-size:.83em; margin: 1.5em 0 }
+.aParse-h6{ font-size:.75em; margin: 1.67em 0 }
+
+.aParse-h1 {
+  font-size: 18px;
+  font-weight: 400;
+  margin-bottom: .9em;
+}
+.aParse-h2 {
+  font-size: 16px;
+  font-weight: 400;
+  margin-bottom: .34em;
+}
+.aParse-h3 {
+  font-weight: 400;
+  font-size: 15px;
+  margin-bottom: .34em;
+}
+.aParse-h4 {
+  font-weight: 400;
+  font-size: 14px;
+  margin-bottom: .24em;
+}
+.aParse-h5 {
+  font-weight: 400;
+  font-size: 13px;
+  margin-bottom: .14em;
+}
+.aParse-h6 {
+  font-weight: 400;
+  font-size: 12px;
+  margin-bottom: .04em;
+}
+
+.aParse-h1, .aParse-h2, .aParse-h3, .aParse-h4, .aParse-h5, .aParse-h6, .aParse-b, .aParse-strong  { font-weight: bolder }
+
+.aParse-i,.aParse-cite,.aParse-em,.aParse-var,.aParse-address{font-style:italic}
+.aParse-pre,.aParse-tt,.aParse-code,.aParse-kbd,.aParse-samp{font-family:monospace}
+.aParse-pre{white-space:pre}
+.aParse-big{font-size:1.17em}
+.aParse-small,.aParse-sub,.aParse-sup{font-size:.83em}
+.aParse-sub{vertical-align:sub}
+.aParse-sup{vertical-align:super}
+.aParse-s,.aParse-strike,.aParse-del{text-decoration:line-through}
+/*aparse-自定义个性化的css样式*/
+/*增加video的css样式*/
+.aParse-strong,.aParse-s{display: inline}
+.aParse-a{
+    color: deepskyblue;
+    word-break:break-all;
+    overflow:auto;
+}
+
+.aParse-video{
+    text-align: center;
+    margin: 10px 0;
+}
+
+.aParse-video-video{
+    width:100%;
+}
+
+.aParse-img{
+    /*background-color: #efefef;*/
+    overflow: hidden;
+    background-position:top !important;
+}
+
+.aParse-blockquote {
+    margin: 0;
+    padding:10px 0 10px 5px;
+    font-family:Courier, Calibri,"宋体";
+    background:#f5f5f5;
+    border-left: 3px solid #dbdbdb;
+}
+
+.aParse-code,.aParse-axxcode-style{
+    display: inline;
+    background:#f5f5f5;
+}
+.aParse-ul{
+    margin: 20rpx 10rpx;
+}
+.aParse-li{
+    width: 100%
+}
+.aParse-li,.aParse-li-inner{
+    display: flex;
+    align-items: baseline;
+    margin: 10rpx 0;
+     width: 100%
+}
+.aParse-li-text{
+    
+    align-items: center;
+    line-height: 20px;
+}
+
+.aParse-li-circle{
+    display: inline-flex;
+    width: 5px;
+    height: 5px;
+    background-color: #333;
+    margin-right: 5px;
+}
+
+.aParse-li-square{
+    display: inline-flex;
+    width: 10rpx;
+    height: 10rpx;
+    background-color: #333;
+    margin-right: 5px;
+}
+.aParse-li-ring{
+    display: inline-flex;
+    width: 10rpx;
+    height: 10rpx;
+    border: 2rpx solid #333;
+    border-radius: 50%;
+    background-color: #fff;
+    margin-right: 5px;
+}
+
+/*.aParse-table{
+    width: 100%;
+    height: 400px;
+}
+.aParse-thead,.aParse-tfoot,.aParse-tr{
+    display: flex;
+    flex-direction: row;
+}
+.aParse-th,.aParse-td{
+    display: flex;
+    width: 580px;
+    overflow: auto;
+}*/
+
+.aParse-u {
+  text-decoration: underline;
+}
+.aParse-hide{
+    display: none;
+}
+.AEmojiView{
+    align-items: center;
+}
+.aEmoji{
+    width: 16px;
+    height:16px;
+}
+.aParse-tr{
+	display: flex;
+	border-right:1px solid #e0e0e0;
+	border-bottom:1px solid #e0e0e0;
+	border-top:1px solid #e0e0e0;
+}
+.aParse-th,
+.aParse-td{
+	flex:1;
+	padding:5px;
+	font-size:28rpx;
+	border-left:1px solid #e0e0e0;
+	word-break: break-all;
+}
+.aParse-td:last{
+	border-top:1px solid #e0e0e0;
+}
+.aParse-th{
+	background:#f0f0f0;
+	border-top:1px solid #e0e0e0;
+}
+.aParse-del{
+    display: inline;
+}
+.aParse-figure {
+  overflow: hidden;
+}
+.aParse-p{
+    color: #666;
+    font-size: 0.28rem
+}

+ 841 - 0
Component/aParse/aParse.axml

@@ -0,0 +1,841 @@
+
+<!--基础元素-->
+<template name="aParseVideo">
+  <!--增加video标签支持,并循环添加-->
+  <view class="{{item.classStr}} aParse-{{item.tag}}" style="{{item.styleStr}}">
+    <video class="{{item.classStr}} aParse-{{item.tag}}-video" src="{{item.attr.src}}"></video>
+  </view>
+</template>
+<template name="aParseImg">
+  <image class="{{item.classStr}} aParse-{{item.tag}}" data-from="{{item.from}}" data-src="{{item.attr.src}}" data-idx="{{item.imgIndex}}" src="{{item.attr.src}}" mode="aspectFit" bindload="aParseImgLoad" catchTap="aParseImgTap" mode="widthFix" style="width:{{item.width}}px;" />
+</template>
+<template name="AEmojiView">
+  <view class="AEmojiView aParse-inline" style="{{item.styleStr}}">
+    <block a:for="{{item.textArray}}" a:key="">
+      <block class="{{item.text == '\\n' ? 'aParse-hide':''}}" a:if="{{item.node == 'text'}}">{{item.text}}</block>
+      <block a:elif="{{item.node == 'element'}}">
+        <image class="aEmoji" src="{{item.baseSrc}}{{item.text}}" />
+      </block>
+    </block>
+  </view>
+</template>
+<template name="AParseBr">
+  <text>\n</text>
+</template>
+<!--入口模版-->
+<template name="aParse">
+  <block a:for="{{aParseData}}" a:key="">
+    <template is="aParse0" data="{{item}}" />
+  </block>
+</template>
+<!--循环模版-->
+<template name="aParse0">
+  <!--<template is="aParse1" data="{{item}}" />-->
+  <!--判断是否是标签节点-->
+  <block a:if="{{item.node == 'element'}}">
+    <block a:if="{{item.tag == 'button'}}">
+      <button type="default" size="mini">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse1" data="{{item}}" />
+        </block>
+      </button>
+    </block>
+    <!--li类型-->
+    <block a:elif="{{item.tag == 'li'}}">
+      <view class="{{item.classStr}} aParse-li" style="{{item.styleStr}}">
+        <view class="{{item.classStr}} aParse-li-inner">
+          <view class="{{item.classStr}} aParse-li-text">
+            <view class="{{item.classStr}} aParse-li-circle"></view>
+          </view>
+          <view class="{{item.classStr}} aParse-li-text">
+            <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+              <template is="aParse1" data="{{item}}" />
+            </block>
+          </view>
+        </view>
+      </view>
+    </block>
+    <!--video类型-->
+    <block a:elif="{{item.tag == 'video'}}">
+      <template is="aParseVideo" data="{{item}}" />
+    </block>
+    <!--img类型-->
+    <block a:elif="{{item.tag == 'img'}}">
+      <template is="aParseImg" data="{{item}}" />
+    </block>
+    <!--a类型-->
+    <block a:elif="{{item.tag == 'a'}}">
+      <view bindtap="aParseTagATap" class="aParse-inline {{item.classStr}} aParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse1" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <block a:elif="{{item.tag == 'table'}}">
+      <view class="{{item.classStr}} aParse-{{item.tag}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse1" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <block a:elif="{{item.tag == 'br'}}">
+      <template is="AParseBr"></template>
+    </block>
+    <!--其他块级标签-->
+    <block a:elif="{{item.tagType == 'block'}}">
+      <view class="{{item.classStr}} aParse-{{item.tag}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse1" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <!--内联标签-->
+    <view a:else class="{{item.classStr}} aParse-{{item.tag}} aParse-{{item.tagType}}" style="{{item.styleStr}}">
+      <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+        <template is="aParse1" data="{{item}}" />
+      </block>
+    </view>
+  </block>
+  <!--判断是否是文本节点-->
+  <block a:elif="{{item.node == 'text'}}">
+    <!--如果是,直接进行-->
+    <template is="AEmojiView" data="{{item}}" />
+  </block>
+</template>
+<!--循环模版-->
+<template name="aParse1">
+  <!--<template is="aParse2" data="{{item}}" />-->
+  <!--判断是否是标签节点-->
+  <block a:if="{{item.node == 'element'}}">
+    <block a:if="{{item.tag == 'button'}}">
+      <button type="default" size="mini">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse2" data="{{item}}" />
+        </block>
+      </button>
+    </block>
+    <!--li类型-->
+    <block a:elif="{{item.tag == 'li'}}">
+      <view class="{{item.classStr}} aParse-li" style="{{item.styleStr}}">
+        <view class="{{item.classStr}} aParse-li-inner">
+          <view class="{{item.classStr}} aParse-li-text">
+            <view class="{{item.classStr}} aParse-li-circle"></view>
+          </view>
+          <view class="{{item.classStr}} aParse-li-text">
+            <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+              <template is="aParse2" data="{{item}}" />
+            </block>
+          </view>
+        </view>
+      </view>
+    </block>
+    <!--video类型-->
+    <block a:elif="{{item.tag == 'video'}}">
+      <template is="aParseVideo" data="{{item}}" />
+    </block>
+    <!--img类型-->
+    <block a:elif="{{item.tag == 'img'}}">
+      <template is="aParseImg" data="{{item}}" />
+    </block>
+    <!--a类型-->
+    <block a:elif="{{item.tag == 'a'}}">
+      <view bindtap="aParseTagATap" class="aParse-inline {{item.classStr}} aParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse2" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <block a:elif="{{item.tag == 'br'}}">
+      <template is="AParseBr"></template>
+    </block>
+    <!--其他块级标签-->
+    <block a:elif="{{item.tagType == 'block'}}">
+      <view class="{{item.classStr}} aParse-{{item.tag}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse2" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <!--内联标签-->
+    <view a:else class="{{item.classStr}} aParse-{{item.tag}} aParse-{{item.tagType}}" style="{{item.styleStr}}">
+      <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+        <template is="aParse2" data="{{item}}" />
+      </block>
+    </view>
+  </block>
+  <!--判断是否是文本节点-->
+  <block a:elif="{{item.node == 'text'}}">
+    <!--如果是,直接进行-->
+    <template is="AEmojiView" data="{{item}}" />
+  </block>
+</template>
+<!--循环模版-->
+<template name="aParse2">
+  <!--<template is="aParse3" data="{{item}}" />-->
+  <!--判断是否是标签节点-->
+  <block a:if="{{item.node == 'element'}}">
+    <block a:if="{{item.tag == 'button'}}">
+      <button type="default" size="mini">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse3" data="{{item}}" />
+        </block>
+      </button>
+    </block>
+    <!--li类型-->
+    <block a:elif="{{item.tag == 'li'}}">
+      <view class="{{item.classStr}} aParse-li" style="{{item.styleStr}}">
+        <view class="{{item.classStr}} aParse-li-inner">
+          <view class="{{item.classStr}} aParse-li-text">
+            <view class="{{item.classStr}} aParse-li-circle"></view>
+          </view>
+          <view class="{{item.classStr}} aParse-li-text">
+            <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+              <template is="aParse3" data="{{item}}" />
+            </block>
+          </view>
+        </view>
+      </view>
+    </block>
+    <!--video类型-->
+    <block a:elif="{{item.tag == 'video'}}">
+      <template is="aParseVideo" data="{{item}}" />
+    </block>
+    <!--img类型-->
+    <block a:elif="{{item.tag == 'img'}}">
+      <template is="aParseImg" data="{{item}}" />
+    </block>
+    <!--a类型-->
+    <block a:elif="{{item.tag == 'a'}}">
+      <view bindtap="aParseTagATap" class="aParse-inline {{item.classStr}} aParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse3" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <block a:elif="{{item.tag == 'br'}}">
+      <template is="AParseBr"></template>
+    </block>
+    <!--其他块级标签-->
+    <block a:elif="{{item.tagType == 'block'}}">
+      <view class="{{item.classStr}} aParse-{{item.tag}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse3" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <!--内联标签-->
+    <view a:else class="{{item.classStr}} aParse-{{item.tag}} aParse-{{item.tagType}}" style="{{item.styleStr}}">
+      <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+        <template is="aParse3" data="{{item}}" />
+      </block>
+    </view>
+  </block>
+  <!--判断是否是文本节点-->
+  <block a:elif="{{item.node == 'text'}}">
+    <!--如果是,直接进行-->
+    <template is="AEmojiView" data="{{item}}" />
+  </block>
+</template>
+<!--循环模版-->
+<template name="aParse3">
+  <!--<template is="aParse4" data="{{item}}" />-->
+  <!--判断是否是标签节点-->
+  <block a:if="{{item.node == 'element'}}">
+    <block a:if="{{item.tag == 'button'}}">
+      <button type="default" size="mini">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse4" data="{{item}}" />
+        </block>
+      </button>
+    </block>
+    <!--li类型-->
+    <block a:elif="{{item.tag == 'li'}}">
+      <view class="{{item.classStr}} aParse-li" style="{{item.styleStr}}">
+        <view class="{{item.classStr}} aParse-li-inner">
+          <view class="{{item.classStr}} aParse-li-text">
+            <view class="{{item.classStr}} aParse-li-circle"></view>
+          </view>
+          <view class="{{item.classStr}} aParse-li-text">
+            <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+              <template is="aParse4" data="{{item}}" />
+            </block>
+          </view>
+        </view>
+      </view>
+    </block>
+    <!--video类型-->
+    <block a:elif="{{item.tag == 'video'}}">
+      <template is="aParseVideo" data="{{item}}" />
+    </block>
+    <!--img类型-->
+    <block a:elif="{{item.tag == 'img'}}">
+      <template is="aParseImg" data="{{item}}" />
+    </block>
+    <!--a类型-->
+    <block a:elif="{{item.tag == 'a'}}">
+      <view bindtap="aParseTagATap" class="aParse-inline {{item.classStr}} aParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse4" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <block a:elif="{{item.tag == 'br'}}">
+      <template is="AParseBr"></template>
+    </block>
+    <!--其他块级标签-->
+    <block a:elif="{{item.tagType == 'block'}}">
+      <view class="{{item.classStr}} aParse-{{item.tag}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse4" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <!--内联标签-->
+    <view a:else class="{{item.classStr}} aParse-{{item.tag}} aParse-{{item.tagType}}" style="{{item.styleStr}}">
+      <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+        <template is="aParse4" data="{{item}}" />
+      </block>
+    </view>
+  </block>
+  <!--判断是否是文本节点-->
+  <block a:elif="{{item.node == 'text'}}">
+    <!--如果是,直接进行-->
+    <template is="AEmojiView" data="{{item}}" />
+  </block>
+</template>
+<!--循环模版-->
+<template name="aParse4">
+  <!--<template is="aParse5" data="{{item}}" />-->
+  <!--判断是否是标签节点-->
+  <block a:if="{{item.node == 'element'}}">
+    <block a:if="{{item.tag == 'button'}}">
+      <button type="default" size="mini">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse5" data="{{item}}" />
+        </block>
+      </button>
+    </block>
+    <!--li类型-->
+    <block a:elif="{{item.tag == 'li'}}">
+      <view class="{{item.classStr}} aParse-li" style="{{item.styleStr}}">
+        <view class="{{item.classStr}} aParse-li-inner">
+          <view class="{{item.classStr}} aParse-li-text">
+            <view class="{{item.classStr}} aParse-li-circle"></view>
+          </view>
+          <view class="{{item.classStr}} aParse-li-text">
+            <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+              <template is="aParse5" data="{{item}}" />
+            </block>
+          </view>
+        </view>
+      </view>
+    </block>
+    <!--video类型-->
+    <block a:elif="{{item.tag == 'video'}}">
+      <template is="aParseVideo" data="{{item}}" />
+    </block>
+    <!--img类型-->
+    <block a:elif="{{item.tag == 'img'}}">
+      <template is="aParseImg" data="{{item}}" />
+    </block>
+    <!--a类型-->
+    <block a:elif="{{item.tag == 'a'}}">
+      <view bindtap="aParseTagATap" class="aParse-inline {{item.classStr}} aParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse5" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <block a:elif="{{item.tag == 'br'}}">
+      <template is="AParseBr"></template>
+    </block>
+    <!--其他块级标签-->
+    <block a:elif="{{item.tagType == 'block'}}">
+      <view class="{{item.classStr}} aParse-{{item.tag}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse5" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <!--内联标签-->
+    <view a:else class="{{item.classStr}} aParse-{{item.tag}} aParse-{{item.tagType}}" style="{{item.styleStr}}">
+      <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+        <template is="aParse5" data="{{item}}" />
+      </block>
+    </view>
+  </block>
+  <!--判断是否是文本节点-->
+  <block a:elif="{{item.node == 'text'}}">
+    <!--如果是,直接进行-->
+    <template is="AEmojiView" data="{{item}}" />
+  </block>
+</template>
+<!--循环模版-->
+<template name="aParse5">
+  <!--<template is="aParse6" data="{{item}}" />-->
+  <!--判断是否是标签节点-->
+  <block a:if="{{item.node == 'element'}}">
+    <block a:if="{{item.tag == 'button'}}">
+      <button type="default" size="mini">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse6" data="{{item}}" />
+        </block>
+      </button>
+    </block>
+    <!--li类型-->
+    <block a:elif="{{item.tag == 'li'}}">
+      <view class="{{item.classStr}} aParse-li" style="{{item.styleStr}}">
+        <view class="{{item.classStr}} aParse-li-inner">
+          <view class="{{item.classStr}} aParse-li-text">
+            <view class="{{item.classStr}} aParse-li-circle"></view>
+          </view>
+          <view class="{{item.classStr}} aParse-li-text">
+            <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+              <template is="aParse6" data="{{item}}" />
+            </block>
+          </view>
+        </view>
+      </view>
+    </block>
+    <!--video类型-->
+    <block a:elif="{{item.tag == 'video'}}">
+      <template is="aParseVideo" data="{{item}}" />
+    </block>
+    <!--img类型-->
+    <block a:elif="{{item.tag == 'img'}}">
+      <template is="aParseImg" data="{{item}}" />
+    </block>
+    <!--a类型-->
+    <block a:elif="{{item.tag == 'a'}}">
+      <view bindtap="aParseTagATap" class="aParse-inline {{item.classStr}} aParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse6" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <block a:elif="{{item.tag == 'br'}}">
+      <template is="AParseBr"></template>
+    </block>
+    <!--其他块级标签-->
+    <block a:elif="{{item.tagType == 'block'}}">
+      <view class="{{item.classStr}} aParse-{{item.tag}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse6" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <!--内联标签-->
+    <view a:else class="{{item.classStr}} aParse-{{item.tag}} aParse-{{item.tagType}}" style="{{item.styleStr}}">
+      <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+        <template is="aParse6" data="{{item}}" />
+      </block>
+    </view>
+  </block>
+  <!--判断是否是文本节点-->
+  <block a:elif="{{item.node == 'text'}}">
+    <!--如果是,直接进行-->
+    <template is="AEmojiView" data="{{item}}" />
+  </block>
+</template>
+<!--循环模版-->
+<template name="aParse6">
+  <!--<template is="aParse7" data="{{item}}" />-->
+  <!--判断是否是标签节点-->
+  <block a:if="{{item.node == 'element'}}">
+    <block a:if="{{item.tag == 'button'}}">
+      <button type="default" size="mini">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse7" data="{{item}}" />
+        </block>
+      </button>
+    </block>
+    <!--li类型-->
+    <block a:elif="{{item.tag == 'li'}}">
+      <view class="{{item.classStr}} aParse-li" style="{{item.styleStr}}">
+        <view class="{{item.classStr}} aParse-li-inner">
+          <view class="{{item.classStr}} aParse-li-text">
+            <view class="{{item.classStr}} aParse-li-circle"></view>
+          </view>
+          <view class="{{item.classStr}} aParse-li-text">
+            <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+              <template is="aParse7" data="{{item}}" />
+            </block>
+          </view>
+        </view>
+      </view>
+    </block>
+    <!--video类型-->
+    <block a:elif="{{item.tag == 'video'}}">
+      <template is="aParseVideo" data="{{item}}" />
+    </block>
+    <!--img类型-->
+    <block a:elif="{{item.tag == 'img'}}">
+      <template is="aParseImg" data="{{item}}" />
+    </block>
+    <!--a类型-->
+    <block a:elif="{{item.tag == 'a'}}">
+      <view bindtap="aParseTagATap" class="aParse-inline {{item.classStr}} aParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse7" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <block a:elif="{{item.tag == 'br'}}">
+      <template is="AParseBr"></template>
+    </block>
+    <!--其他块级标签-->
+    <block a:elif="{{item.tagType == 'block'}}">
+      <view class="{{item.classStr}} aParse-{{item.tag}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse7" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <!--内联标签-->
+    <view a:else class="{{item.classStr}} aParse-{{item.tag}} aParse-{{item.tagType}}" style="{{item.styleStr}}">
+      <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+        <template is="aParse7" data="{{item}}" />
+      </block>
+    </view>
+  </block>
+  <!--判断是否是文本节点-->
+  <block a:elif="{{item.node == 'text'}}">
+    <!--如果是,直接进行-->
+    <template is="AEmojiView" data="{{item}}" />
+  </block>
+</template>
+<!--循环模版-->
+<template name="aParse7">
+  <!--<template is="aParse8" data="{{item}}" />-->
+  <!--判断是否是标签节点-->
+  <block a:if="{{item.node == 'element'}}">
+    <block a:if="{{item.tag == 'button'}}">
+      <button type="default" size="mini">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse8" data="{{item}}" />
+        </block>
+      </button>
+    </block>
+    <!--li类型-->
+    <block a:elif="{{item.tag == 'li'}}">
+      <view class="{{item.classStr}} aParse-li" style="{{item.styleStr}}">
+        <view class="{{item.classStr}} aParse-li-inner">
+          <view class="{{item.classStr}} aParse-li-text">
+            <view class="{{item.classStr}} aParse-li-circle"></view>
+          </view>
+          <view class="{{item.classStr}} aParse-li-text">
+            <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+              <template is="aParse8" data="{{item}}" />
+            </block>
+          </view>
+        </view>
+      </view>
+    </block>
+    <!--video类型-->
+    <block a:elif="{{item.tag == 'video'}}">
+      <template is="aParseVideo" data="{{item}}" />
+    </block>
+    <!--img类型-->
+    <block a:elif="{{item.tag == 'img'}}">
+      <template is="aParseImg" data="{{item}}" />
+    </block>
+    <!--a类型-->
+    <block a:elif="{{item.tag == 'a'}}">
+      <view bindtap="aParseTagATap" class="aParse-inline {{item.classStr}} aParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse8" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <block a:elif="{{item.tag == 'br'}}">
+      <template is="AParseBr"></template>
+    </block>
+    <!--其他块级标签-->
+    <block a:elif="{{item.tagType == 'block'}}">
+      <view class="{{item.classStr}} aParse-{{item.tag}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse8" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <!--内联标签-->
+    <view a:else class="{{item.classStr}} aParse-{{item.tag}} aParse-{{item.tagType}}" style="{{item.styleStr}}">
+      <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+        <template is="aParse8" data="{{item}}" />
+      </block>
+    </view>
+  </block>
+  <!--判断是否是文本节点-->
+  <block a:elif="{{item.node == 'text'}}">
+    <!--如果是,直接进行-->
+    <template is="AEmojiView" data="{{item}}" />
+  </block>
+</template>
+<!--循环模版-->
+<template name="aParse8">
+  <!--<template is="aParse9" data="{{item}}" />-->
+  <!--判断是否是标签节点-->
+  <block a:if="{{item.node == 'element'}}">
+    <block a:if="{{item.tag == 'button'}}">
+      <button type="default" size="mini">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse9" data="{{item}}" />
+        </block>
+      </button>
+    </block>
+    <!--li类型-->
+    <block a:elif="{{item.tag == 'li'}}">
+      <view class="{{item.classStr}} aParse-li" style="{{item.styleStr}}">
+        <view class="{{item.classStr}} aParse-li-inner">
+          <view class="{{item.classStr}} aParse-li-text">
+            <view class="{{item.classStr}} aParse-li-circle"></view>
+          </view>
+          <view class="{{item.classStr}} aParse-li-text">
+            <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+              <template is="aParse9" data="{{item}}" />
+            </block>
+          </view>
+        </view>
+      </view>
+    </block>
+    <!--video类型-->
+    <block a:elif="{{item.tag == 'video'}}">
+      <template is="aParseVideo" data="{{item}}" />
+    </block>
+    <!--img类型-->
+    <block a:elif="{{item.tag == 'img'}}">
+      <template is="aParseImg" data="{{item}}" />
+    </block>
+    <!--a类型-->
+    <block a:elif="{{item.tag == 'a'}}">
+      <view bindtap="aParseTagATap" class="aParse-inline {{item.classStr}} aParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse9" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <block a:elif="{{item.tag == 'br'}}">
+      <template is="AParseBr"></template>
+    </block>
+    <!--其他块级标签-->
+    <block a:elif="{{item.tagType == 'block'}}">
+      <view class="{{item.classStr}} aParse-{{item.tag}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse9" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <!--内联标签-->
+    <view a:else class="{{item.classStr}} aParse-{{item.tag}} aParse-{{item.tagType}}" style="{{item.styleStr}}">
+      <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+        <template is="aParse9" data="{{item}}" />
+      </block>
+    </view>
+  </block>
+  <!--判断是否是文本节点-->
+  <block a:elif="{{item.node == 'text'}}">
+    <!--如果是,直接进行-->
+    <template is="AEmojiView" data="{{item}}" />
+  </block>
+</template>
+<!--循环模版-->
+<template name="aParse9">
+  <!--<template is="aParse10" data="{{item}}" />-->
+  <!--判断是否是标签节点-->
+  <block a:if="{{item.node == 'element'}}">
+    <block a:if="{{item.tag == 'button'}}">
+      <button type="default" size="mini">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse10" data="{{item}}" />
+        </block>
+      </button>
+    </block>
+    <!--li类型-->
+    <block a:elif="{{item.tag == 'li'}}">
+      <view class="{{item.classStr}} aParse-li" style="{{item.styleStr}}">
+        <view class="{{item.classStr}} aParse-li-inner">
+          <view class="{{item.classStr}} aParse-li-text">
+            <view class="{{item.classStr}} aParse-li-circle"></view>
+          </view>
+          <view class="{{item.classStr}} aParse-li-text">
+            <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+              <template is="aParse10" data="{{item}}" />
+            </block>
+          </view>
+        </view>
+      </view>
+    </block>
+    <!--video类型-->
+    <block a:elif="{{item.tag == 'video'}}">
+      <template is="aParseVideo" data="{{item}}" />
+    </block>
+    <!--img类型-->
+    <block a:elif="{{item.tag == 'img'}}">
+      <template is="aParseImg" data="{{item}}" />
+    </block>
+    <!--a类型-->
+    <block a:elif="{{item.tag == 'a'}}">
+      <view bindtap="aParseTagATap" class="aParse-inline {{item.classStr}} aParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse10" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <block a:elif="{{item.tag == 'br'}}">
+      <template is="AParseBr"></template>
+    </block>
+    <!--其他块级标签-->
+    <block a:elif="{{item.tagType == 'block'}}">
+      <view class="{{item.classStr}} aParse-{{item.tag}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse10" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <!--内联标签-->
+    <view a:else class="{{item.classStr}} aParse-{{item.tag}} aParse-{{item.tagType}}" style="{{item.styleStr}}">
+      <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+        <template is="aParse10" data="{{item}}" />
+      </block>
+    </view>
+  </block>
+  <!--判断是否是文本节点-->
+  <block a:elif="{{item.node == 'text'}}">
+    <!--如果是,直接进行-->
+    <template is="AEmojiView" data="{{item}}" />
+  </block>
+</template>
+<!--循环模版-->
+<template name="aParse10">
+  <!--<template is="aParse11" data="{{item}}" />-->
+  <!--判断是否是标签节点-->
+  <block a:if="{{item.node == 'element'}}">
+    <block a:if="{{item.tag == 'button'}}">
+      <button type="default" size="mini">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse11" data="{{item}}" />
+        </block>
+      </button>
+    </block>
+    <!--li类型-->
+    <block a:elif="{{item.tag == 'li'}}">
+      <view class="{{item.classStr}} aParse-li" style="{{item.styleStr}}">
+        <view class="{{item.classStr}} aParse-li-inner">
+          <view class="{{item.classStr}} aParse-li-text">
+            <view class="{{item.classStr}} aParse-li-circle"></view>
+          </view>
+          <view class="{{item.classStr}} aParse-li-text">
+            <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+              <template is="aParse11" data="{{item}}" />
+            </block>
+          </view>
+        </view>
+      </view>
+    </block>
+    <!--video类型-->
+    <block a:elif="{{item.tag == 'video'}}">
+      <template is="aParseVideo" data="{{item}}" />
+    </block>
+    <!--img类型-->
+    <block a:elif="{{item.tag == 'img'}}">
+      <template is="aParseImg" data="{{item}}" />
+    </block>
+    <!--a类型-->
+    <block a:elif="{{item.tag == 'a'}}">
+      <view bindtap="aParseTagATap" class="aParse-inline {{item.classStr}} aParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse11" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <block a:elif="{{item.tag == 'br'}}">
+      <template is="AParseBr"></template>
+    </block>
+    <!--其他块级标签-->
+    <block a:elif="{{item.tagType == 'block'}}">
+      <view class="{{item.classStr}} aParse-{{item.tag}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse11" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <!--内联标签-->
+    <view a:else class="{{item.classStr}} aParse-{{item.tag}} aParse-{{item.tagType}}" style="{{item.styleStr}}">
+      <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+        <template is="aParse11" data="{{item}}" />
+      </block>
+    </view>
+  </block>
+  <!--判断是否是文本节点-->
+  <block a:elif="{{item.node == 'text'}}">
+    <!--如果是,直接进行-->
+    <template is="AEmojiView" data="{{item}}" />
+  </block>
+</template>
+<!--循环模版-->
+<template name="aParse11">
+  <!--<template is="aParse12" data="{{item}}" />-->
+  <!--判断是否是标签节点-->
+  <block a:if="{{item.node == 'element'}}">
+    <block a:if="{{item.tag == 'button'}}">
+      <button type="default" size="mini">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse12" data="{{item}}" />
+        </block>
+      </button>
+    </block>
+    <!--li类型-->
+    <block a:elif="{{item.tag == 'li'}}">
+      <view class="{{item.classStr}} aParse-li" style="{{item.styleStr}}">
+        <view class="{{item.classStr}} aParse-li-inner">
+          <view class="{{item.classStr}} aParse-li-text">
+            <view class="{{item.classStr}} aParse-li-circle"></view>
+          </view>
+          <view class="{{item.classStr}} aParse-li-text">
+            <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+              <template is="aParse12" data="{{item}}" />
+            </block>
+          </view>
+        </view>
+      </view>
+    </block>
+    <!--video类型-->
+    <block a:elif="{{item.tag == 'video'}}">
+      <template is="aParseVideo" data="{{item}}" />
+    </block>
+    <!--img类型-->
+    <block a:elif="{{item.tag == 'img'}}">
+      <template is="aParseImg" data="{{item}}" />
+    </block>
+    <!--a类型-->
+    <block a:elif="{{item.tag == 'a'}}">
+      <view bindtap="aParseTagATap" class="aParse-inline {{item.classStr}} aParse-{{item.tag}}" data-src="{{item.attr.href}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse12" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <block a:elif="{{item.tag == 'br'}}">
+      <template is="AParseBr"></template>
+    </block>
+    <!--其他块级标签-->
+    <block a:elif="{{item.tagType == 'block'}}">
+      <view class="{{item.classStr}} aParse-{{item.tag}}" style="{{item.styleStr}}">
+        <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+          <template is="aParse12" data="{{item}}" />
+        </block>
+      </view>
+    </block>
+    <!--内联标签-->
+    <view a:else class="{{item.classStr}} aParse-{{item.tag}} aParse-{{item.tagType}}" style="{{item.styleStr}}">
+      <block a:for="{{item.nodes}}" a:for-item="item" a:key="">
+        <template is="aParse12" data="{{item}}" />
+      </block>
+    </view>
+  </block>
+  <!--判断是否是文本节点-->
+  <block a:elif="{{item.node == 'text'}}">
+    <!--如果是,直接进行-->
+    <template is="AEmojiView" data="{{item}}" />
+  </block>
+</template>

+ 149 - 0
Component/aParse/aParse.js

@@ -0,0 +1,149 @@
+
+/**
+ * utils函数引入
+ **/
+import showdown from './showdown.js';
+import HtmlToJson from './html2json.js';
+/**
+ * 配置及公有属性
+ **/
+var realWindowWidth = 0;
+var realWindowHeight = 0;
+dd.getSystemInfo({
+  success: function(res) {
+    realWindowWidth = res.windowWidth
+    realWindowHeight = res.windowHeight
+  }
+})
+/**
+ * 主函数入口区
+ **/
+function aParse(bindName = 'aParseData', type = 'html', data = '<div class="color:red;">数据不能为空</div>', target, imagePadding) {
+  var that = target;
+  var transData = {};//存放转化后的数据
+  if (type == 'html') {
+    transData = HtmlToJson.html2json(data, bindName);
+    // console.log(JSON.stringify(transData, ' ', ' '));
+  } else if (type == 'md' || type == 'markdown') {
+    var converter = new showdown.Converter();
+    var html = converter.makeHtml(data);
+    transData = HtmlToJson.html2json(html, bindName);
+    // console.log(JSON.stringify(transData, ' ', ' '));
+  }
+  transData.view = {};
+  transData.view.imagePadding = 0;
+  if (typeof (imagePadding) != 'undefined') {
+    transData.view.imagePadding = imagePadding
+  }
+  var bindData = {};
+  bindData[bindName] = transData;
+  that.setData(bindData)
+  that.aParseImgLoad = aParseImgLoad;
+  that.aParseImgTap = aParseImgTap;
+}
+// 图片点击事件
+function aParseImgTap(e) {
+  var that = this;
+  var nowImgUrl = e.target.dataset.idx;
+  var tagFrom = e.target.dataset.from;
+  if (typeof (tagFrom) != 'undefined' && tagFrom.length > 0) {
+    dd.previewImage({
+      current: nowImgUrl, // 当前显示图片的http链接
+      urls: that.data[tagFrom].imageUrls // 需要预览的图片http链接列表
+    })
+  }
+}
+
+/**
+ * 图片视觉宽高计算函数区 
+ **/
+function aParseImgLoad(e) {
+  var that = this;
+  var tagFrom = e.target.dataset.from;
+  var idx = e.target.dataset.idx;
+  if (typeof (tagFrom) != 'undefined' && tagFrom.length > 0) {
+    calMoreImageInfo(e, idx, that, tagFrom)
+  }
+}
+// 假循环获取计算图片视觉最佳宽高
+function calMoreImageInfo(e, idx, that, bindName) {
+  var temData = that.data[bindName];
+  if (!temData || temData.images.length == 0) {
+    return;
+  }
+  var temImages = temData.images;
+  //因为无法获取view宽度 需要自定义padding进行计算,稍后处理
+  var recal = aAutoImageCal(e.detail.width, e.detail.height, that, bindName);
+  // temImages[idx].width = recal.imageWidth;
+  // temImages[idx].height = recal.imageheight; 
+  // temData.images = temImages;
+  // var bindData = {};
+  // bindData[bindName] = temData;
+  // that.setData(bindData);
+  var index = temImages[idx].index
+  var key = `${bindName}`
+  for (var i of index.split('.')) key += `.nodes[${i}]`
+  var keyW = key + '.width'
+  var keyH = key + '.height'
+  that.setData({
+    [keyW]: recal.imageWidth,
+    [keyH]: recal.imageheight,
+  })
+}
+
+// 计算视觉优先的图片宽高
+function aAutoImageCal(originalWidth, originalHeight, that, bindName) {
+  //获取图片的原始长宽
+  var windowWidth = 0, windowHeight = 0;
+  var autoWidth = 0, autoHeight = 0;
+  var results = {};
+  var padding = that.data[bindName].view.imagePadding;
+  windowWidth = realWindowWidth - 2 * padding;
+  windowHeight = realWindowHeight;
+  //判断按照那种方式进行缩放
+  // console.log("windowWidth" + windowWidth);
+  if (originalWidth > windowWidth) {//在图片width大于手机屏幕width时候
+    autoWidth = windowWidth;
+    // console.log("autoWidth" + autoWidth);
+    autoHeight = (autoWidth * originalHeight) / originalWidth;
+    // console.log("autoHeight" + autoHeight);
+    results.imageWidth = autoWidth;
+    results.imageheight = autoHeight;
+  } else {//否则展示原来的数据
+    results.imageWidth = originalWidth;
+    results.imageheight = originalHeight;
+  }
+  return results;
+}
+
+function aParseTemArray(temArrayName, bindNameReg, total, that) {
+  var array = [];
+  var temData = that.data;
+  var obj = null;
+  for (var i = 0; i < total; i++) {
+    var simArr = temData[bindNameReg + i].nodes;
+    array.push(simArr);
+  }
+
+  temArrayName = temArrayName || 'aParseTemArray';
+  obj = JSON.parse('{"' + temArrayName + '":""}');
+  obj[temArrayName] = array;
+  that.setData(obj);
+}
+
+/**
+ * 配置emojis
+ * 
+ */
+
+function emojisInit(reg = '', baseSrc = "/aParse/emojis/", emojis) {
+  HtmlToJson.emojisInit(reg, baseSrc, emojis);
+}
+
+module.exports = {
+  aParse: aParse,
+  aParseTemArray: aParseTemArray,
+  emojisInit: emojisInit
+}
+
+

+ 1 - 0
Component/aParse/aParse.json

@@ -0,0 +1 @@
+{}

+ 293 - 0
Component/aParse/html2json.js

@@ -0,0 +1,293 @@
+
+
+var __placeImgeUrlHttps = "https";
+var __emojisReg = '';
+var __emojisBaseSrc = '';
+var __emojis = {};
+var aDiscode = require('./aDiscode.js');
+var HTMLParser = require('./htmlparser.js');
+// Empty Elements - HTML 5
+var empty = makeMap("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr");
+// Block Elements - HTML 5
+var block = makeMap("br,a,code,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video");
+
+// Inline Elements - HTML 5
+var inline = makeMap("abbr,acronym,applet,b,basefont,bdo,big,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var");
+
+// Elements that you can, intentionally, leave open
+// (and which close themselves)
+var closeSelf = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");
+
+// Attributes that have their values filled in disabled="disabled"
+var fillAttrs = makeMap("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected");
+
+// Special Elements (can contain anything)
+var special = makeMap("wxxxcode-style,script,style,view,scroll-view,block");
+function makeMap(str) {
+    var obj = {}, items = str.split(",");
+    for (var i = 0; i < items.length; i++)
+        obj[items[i]] = true;
+    return obj;
+}
+
+function q(v) {
+    return '"' + v + '"';
+}
+
+function removeDOCTYPE(html) {
+    return html
+        .replace(/<\?xml.*\?>\n/, '')
+        .replace(/<.*!doctype.*\>\n/, '')
+        .replace(/<.*!DOCTYPE.*\>\n/, '');
+}
+
+function trimHtml(html) {
+  return html
+        .replace(/\r?\n+/g, '')
+        .replace(/<!--.*?-->/ig, '')
+        .replace(/\/\*.*?\*\//ig, '')
+        .replace(/[ ]+</ig, '<')
+}
+
+
+function html2json(html, bindName) {
+    
+    //处理字符串
+    html = removeDOCTYPE(html);
+    html = trimHtml(html);
+    html = aDiscode.strDiscode(html);
+    // console.log(html)
+    //生成node节点
+    var bufArray = [];
+    var results = {
+        node: bindName,
+        nodes: [],
+        images:[],
+        imageUrls:[]
+    };
+    var index = 0;
+    HTMLParser(html, {
+        start: function (tag, attrs, unary) {
+            //debug(tag, attrs, unary);
+            // node for this element
+            var node = {
+                node: 'element',
+                tag: tag,
+            };
+
+            if (bufArray.length === 0) {
+                node.index = index.toString()
+                index += 1
+            } else {
+                var parent = bufArray[0];
+                if (parent.nodes === undefined) {
+                    parent.nodes = [];
+                }
+                node.index = parent.index + '.' + parent.nodes.length
+            }
+
+            if (block[tag]) {
+                node.tagType = "block";
+            } else if (inline[tag]) {
+                node.tagType = "inline";
+            } else if (closeSelf[tag]) {
+                node.tagType = "closeSelf";
+            }
+
+            if (attrs.length !== 0) {
+                node.attr = attrs.reduce(function (pre, attr) {
+                    var name = attr.name;
+                    var value = attr.value;
+                    if (name == 'class') {
+                        // console.dir(value);
+                        //  value = value.join("")
+                        node.classStr = value;
+                    }
+                    // has multi attibutes
+                    // make it array of attribute
+                    if (name == 'style') {
+                        // console.dir(value);
+                        //  value = value.join("")
+                        node.styleStr = value;
+                    }
+                    if (value.match(/ /)) {
+                        value = value.split(' ');
+                    }
+                    
+
+                    // if attr already exists
+                    // merge it
+                    if (pre[name]) {
+                        if (Array.isArray(pre[name])) {
+                            // already array, push to last
+                            pre[name].push(value);
+                        } else {
+                            // single value, make it array
+                            pre[name] = [pre[name], value];
+                        }
+                    } else {
+                        // not exist, put it
+                        pre[name] = value;
+                    }
+
+                    return pre;
+                }, {});
+            }
+
+            //对img添加额外数据
+            if (node.tag === 'img') {
+                node.imgIndex = results.images.length;
+                var imgUrl = node.attr.src;
+                if (imgUrl[0] == '') {
+                    imgUrl.splice(0, 1);
+                }
+                imgUrl = aDiscode.urlToHttpUrl(imgUrl, __placeImgeUrlHttps);
+                node.attr.src = imgUrl;
+                node.from = bindName;
+                results.images.push(node);
+                results.imageUrls.push(imgUrl);
+            }
+            
+            // 处理font标签样式属性
+            if (node.tag === 'font') {
+                var fontSize = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', '-webkit-xxx-large'];
+                var styleAttrs = {
+                    'color': 'color',
+                    'face': 'font-family',
+                    'size': 'font-size'
+                };
+                if (!node.attr.style) node.attr.style = [];
+                if (!node.styleStr) node.styleStr = '';
+                for (var key in styleAttrs) {
+                    if (node.attr[key]) {
+                        var value = key === 'size' ? fontSize[node.attr[key]-1] : node.attr[key];
+                        node.attr.style.push(styleAttrs[key]);
+                        node.attr.style.push(value);
+                        node.styleStr += styleAttrs[key] + ': ' + value + ';';
+                    }
+                }
+            }
+
+            //临时记录source资源
+            if(node.tag === 'source'){
+                results.source = node.attr.src;
+            }
+            
+            if (unary) {
+                // if this tag doesn't have end tag
+                // like <img src="hoge.png"/>
+                // add to parents
+                var parent = bufArray[0] || results;
+                if (parent.nodes === undefined) {
+                    parent.nodes = [];
+                }
+                parent.nodes.push(node);
+            } else {
+                bufArray.unshift(node);
+            }
+        },
+        end: function (tag) {
+            //debug(tag);
+            // merge into parent tag
+            var node = bufArray.shift();
+            if (node.tag !== tag) console.error('invalid state: mismatch end tag');
+
+            //当有缓存source资源时于于video补上src资源
+            if(node.tag === 'video' && results.source){
+                node.attr.src = results.source;
+                delete results.source;
+            }
+            
+            if (bufArray.length === 0) {
+                results.nodes.push(node);
+            } else {
+                var parent = bufArray[0];
+                if (parent.nodes === undefined) {
+                    parent.nodes = [];
+                }
+                parent.nodes.push(node);
+            }
+        },
+        chars: function (text) {
+            //debug(text);
+            var node = {
+                node: 'text',
+                text: text,
+                textArray:transEmojiStr(text)
+            };
+            
+            if (bufArray.length === 0) {
+                node.index = index.toString()
+                index += 1
+                results.nodes.push(node);
+            } else {
+                var parent = bufArray[0];
+                if (parent.nodes === undefined) {
+                    parent.nodes = [];
+                }
+                node.index = parent.index + '.' + parent.nodes.length
+                parent.nodes.push(node);
+            }
+        },
+        comment: function (text) {
+            //debug(text);
+            // var node = {
+            //     node: 'comment',
+            //     text: text,
+            // };
+            // var parent = bufArray[0];
+            // if (parent.nodes === undefined) {
+            //     parent.nodes = [];
+            // }
+            // parent.nodes.push(node);
+        },
+    });
+    return results;
+};
+
+function transEmojiStr(str){
+  // var eReg = new RegExp("["+__reg+' '+"]");
+//   str = str.replace(/\[([^\[\]]+)\]/g,':$1:')
+  
+  var emojiObjs = [];
+  //如果正则表达式为空
+  if(__emojisReg.length == 0 || !__emojis){
+      var emojiObj = {}
+      emojiObj.node = "text";
+      emojiObj.text = str;
+      array = [emojiObj];
+      return array;
+  }
+  //这个地方需要调整
+  str = str.replace(/\[([^\[\]]+)\]/g,':$1:')
+  var eReg = new RegExp("[:]");
+  var array = str.split(eReg);
+  for(var i = 0; i < array.length; i++){
+    var ele = array[i];
+    var emojiObj = {};
+    if(__emojis[ele]){
+      emojiObj.node = "element";
+      emojiObj.tag = "emoji";
+      emojiObj.text = __emojis[ele];
+      emojiObj.baseSrc= __emojisBaseSrc;
+    }else{
+      emojiObj.node = "text";
+      emojiObj.text = ele;
+    }
+    emojiObjs.push(emojiObj);
+  }
+  
+  return emojiObjs;
+}
+
+function emojisInit(reg='',baseSrc="/aParse/emojis/",emojis){
+    __emojisReg = reg;
+    __emojisBaseSrc=baseSrc;
+    __emojis=emojis;
+}
+
+module.exports = {
+    html2json: html2json,
+    emojisInit:emojisInit
+};
+

+ 180 - 0
Component/aParse/htmlparser.js

@@ -0,0 +1,180 @@
+
+// Regular Expressions for parsing tags and attributes
+var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,
+	endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/,
+	attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;
+
+// Empty Elements - HTML 5
+var empty = makeMap("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr");
+
+// Block Elements - HTML 5
+var block = makeMap("a,address,code,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video");
+
+// Inline Elements - HTML 5
+var inline = makeMap("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var");
+
+// Elements that you can, intentionally, leave open
+// (and which close themselves)
+var closeSelf = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");
+
+// Attributes that have their values filled in disabled="disabled"
+var fillAttrs = makeMap("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected");
+
+// Special Elements (can contain anything)
+var special = makeMap("wxxxcode-style,script,style,view,scroll-view,block");
+
+function HTMLParser(html, handler) {
+	var index, chars, match, stack = [], last = html;
+	stack.last = function () {
+		return this[this.length - 1];
+	};
+
+	while (html) {
+		chars = true;
+
+		// Make sure we're not in a script or style element
+		if (!stack.last() || !special[stack.last()]) {
+
+			// Comment
+			if (html.indexOf("<!--") == 0) {
+				index = html.indexOf("-->");
+
+				if (index >= 0) {
+					if (handler.comment)
+						handler.comment(html.substring(4, index));
+					html = html.substring(index + 3);
+					chars = false;
+				}
+
+				// end tag
+			} else if (html.indexOf("</") == 0) {
+				match = html.match(endTag);
+
+				if (match) {
+					html = html.substring(match[0].length);
+					match[0].replace(endTag, parseEndTag);
+					chars = false;
+				}
+
+				// start tag
+			} else if (html.indexOf("<") == 0) {
+				match = html.match(startTag);
+
+				if (match) {
+					html = html.substring(match[0].length);
+					match[0].replace(startTag, parseStartTag);
+					chars = false;
+				}
+			}
+
+			if (chars) {
+				index = html.indexOf("<");
+				var text = ''
+				while (index === 0) {
+                                  text += "<";
+                                  html = html.substring(1);
+                                  index = html.indexOf("<");
+				}
+				text += index < 0 ? html : html.substring(0, index);
+				html = index < 0 ? "" : html.substring(index);
+
+				if (handler.chars)
+					handler.chars(text);
+			}
+
+		} else {
+
+			html = html.replace(new RegExp("([\\s\\S]*?)<\/" + stack.last() + "[^>]*>"), function (all, text) {
+				text = text.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g, "$1$2");
+				if (handler.chars)
+					handler.chars(text);
+
+				return "";
+			});
+
+
+			parseEndTag("", stack.last());
+		}
+
+		if (html == last)
+			throw "Parse Error: " + html;
+		last = html;
+	}
+
+	// Clean up any remaining tags
+	parseEndTag();
+
+	function parseStartTag(tag, tagName, rest, unary) {
+		tagName = tagName.toLowerCase();
+
+		if (block[tagName]) {
+			while (stack.last() && inline[stack.last()]) {
+				parseEndTag("", stack.last());
+			}
+		}
+
+		if (closeSelf[tagName] && stack.last() == tagName) {
+			parseEndTag("", tagName);
+		}
+
+		unary = empty[tagName] || !!unary;
+
+		if (!unary)
+			stack.push(tagName);
+
+		if (handler.start) {
+			var attrs = [];
+
+			rest.replace(attr, function (match, name) {
+				var value = arguments[2] ? arguments[2] :
+					arguments[3] ? arguments[3] :
+						arguments[4] ? arguments[4] :
+							fillAttrs[name] ? name : "";
+
+				attrs.push({
+					name: name,
+					value: value,
+					escaped: value.replace(/(^|[^\\])"/g, '$1\\\"') //"
+				});
+			});
+
+			if (handler.start) {
+				handler.start(tagName, attrs, unary);
+			}
+
+		}
+	}
+
+	function parseEndTag(tag, tagName) {
+		// If no tag name is provided, clean shop
+		if (!tagName)
+			var pos = 0;
+
+		// Find the closest opened tag of the same type
+		else {
+			tagName = tagName.toLowerCase();
+			for (var pos = stack.length - 1; pos >= 0; pos--)
+				if (stack[pos] == tagName)
+					break;
+		}
+		if (pos >= 0) {
+			// Close all the open elements, up the stack
+			for (var i = stack.length - 1; i >= pos; i--)
+				if (handler.end)
+					handler.end(stack[i]);
+
+			// Remove the open elements from the stack
+			stack.length = pos;
+		}
+	}
+};
+
+
+function makeMap(str) {
+	var obj = {}, items = str.split(",");
+	for (var i = 0; i < items.length; i++)
+		obj[items[i]] = true;
+	return obj;
+}
+
+module.exports = HTMLParser;

+ 2518 - 0
Component/aParse/showdown.js

@@ -0,0 +1,2518 @@
+function getDefaultOpts(simple) {
+  'use strict';
+
+  var defaultOptions = {
+    omitExtraWLInCodeBlocks: {
+      defaultValue: false,
+      describe: 'Omit the default extra whiteline added to code blocks',
+      type: 'boolean'
+    },
+    noHeaderId: {
+      defaultValue: false,
+      describe: 'Turn on/off generated header id',
+      type: 'boolean'
+    },
+    prefixHeaderId: {
+      defaultValue: false,
+      describe: 'Specify a prefix to generated header ids',
+      type: 'string'
+    },
+    headerLevelStart: {
+      defaultValue: false,
+      describe: 'The header blocks level start',
+      type: 'integer'
+    },
+    parseImgDimensions: {
+      defaultValue: false,
+      describe: 'Turn on/off image dimension parsing',
+      type: 'boolean'
+    },
+    simplifiedAutoLink: {
+      defaultValue: false,
+      describe: 'Turn on/off GFM autolink style',
+      type: 'boolean'
+    },
+    literalMidWordUnderscores: {
+      defaultValue: false,
+      describe: 'Parse midword underscores as literal underscores',
+      type: 'boolean'
+    },
+    strikethrough: {
+      defaultValue: false,
+      describe: 'Turn on/off strikethrough support',
+      type: 'boolean'
+    },
+    tables: {
+      defaultValue: false,
+      describe: 'Turn on/off tables support',
+      type: 'boolean'
+    },
+    tablesHeaderId: {
+      defaultValue: false,
+      describe: 'Add an id to table headers',
+      type: 'boolean'
+    },
+    ghCodeBlocks: {
+      defaultValue: true,
+      describe: 'Turn on/off GFM fenced code blocks support',
+      type: 'boolean'
+    },
+    tasklists: {
+      defaultValue: false,
+      describe: 'Turn on/off GFM tasklist support',
+      type: 'boolean'
+    },
+    smoothLivePreview: {
+      defaultValue: false,
+      describe: 'Prevents weird effects in live previews due to incomplete input',
+      type: 'boolean'
+    },
+    smartIndentationFix: {
+      defaultValue: false,
+      description: 'Tries to smartly fix identation in es6 strings',
+      type: 'boolean'
+    }
+  };
+  if (simple === false) {
+    return JSON.parse(JSON.stringify(defaultOptions));
+  }
+  var ret = {};
+  for (var opt in defaultOptions) {
+    if (defaultOptions.hasOwnProperty(opt)) {
+      ret[opt] = defaultOptions[opt].defaultValue;
+    }
+  }
+  return ret;
+}
+
+/**
+ * Created by Tivie on 06-01-2015.
+ */
+
+// Private properties
+var showdown = {},
+    parsers = {},
+    extensions = {},
+    globalOptions = getDefaultOpts(true),
+    flavor = {
+      github: {
+        omitExtraWLInCodeBlocks:   true,
+        prefixHeaderId:            'user-content-',
+        simplifiedAutoLink:        true,
+        literalMidWordUnderscores: true,
+        strikethrough:             true,
+        tables:                    true,
+        tablesHeaderId:            true,
+        ghCodeBlocks:              true,
+        tasklists:                 true
+      },
+      vanilla: getDefaultOpts(true)
+    };
+
+/**
+ * helper namespace
+ * @type {{}}
+ */
+showdown.helper = {};
+
+/**
+ * TODO LEGACY SUPPORT CODE
+ * @type {{}}
+ */
+showdown.extensions = {};
+
+/**
+ * Set a global option
+ * @static
+ * @param {string} key
+ * @param {*} value
+ * @returns {showdown}
+ */
+showdown.setOption = function (key, value) {
+  'use strict';
+  globalOptions[key] = value;
+  return this;
+};
+
+/**
+ * Get a global option
+ * @static
+ * @param {string} key
+ * @returns {*}
+ */
+showdown.getOption = function (key) {
+  'use strict';
+  return globalOptions[key];
+};
+
+/**
+ * Get the global options
+ * @static
+ * @returns {{}}
+ */
+showdown.getOptions = function () {
+  'use strict';
+  return globalOptions;
+};
+
+/**
+ * Reset global options to the default values
+ * @static
+ */
+showdown.resetOptions = function () {
+  'use strict';
+  globalOptions = getDefaultOpts(true);
+};
+
+/**
+ * Set the flavor showdown should use as default
+ * @param {string} name
+ */
+showdown.setFlavor = function (name) {
+  'use strict';
+  if (flavor.hasOwnProperty(name)) {
+    var preset = flavor[name];
+    for (var option in preset) {
+      if (preset.hasOwnProperty(option)) {
+        globalOptions[option] = preset[option];
+      }
+    }
+  }
+};
+
+/**
+ * Get the default options
+ * @static
+ * @param {boolean} [simple=true]
+ * @returns {{}}
+ */
+showdown.getDefaultOptions = function (simple) {
+  'use strict';
+  return getDefaultOpts(simple);
+};
+
+/**
+ * Get or set a subParser
+ *
+ * subParser(name)       - Get a registered subParser
+ * subParser(name, func) - Register a subParser
+ * @static
+ * @param {string} name
+ * @param {function} [func]
+ * @returns {*}
+ */
+showdown.subParser = function (name, func) {
+  'use strict';
+  if (showdown.helper.isString(name)) {
+    if (typeof func !== 'undefined') {
+      parsers[name] = func;
+    } else {
+      if (parsers.hasOwnProperty(name)) {
+        return parsers[name];
+      } else {
+        throw Error('SubParser named ' + name + ' not registered!');
+      }
+    }
+  }
+};
+
+/**
+ * Gets or registers an extension
+ * @static
+ * @param {string} name
+ * @param {object|function=} ext
+ * @returns {*}
+ */
+showdown.extension = function (name, ext) {
+  'use strict';
+
+  if (!showdown.helper.isString(name)) {
+    throw Error('Extension \'name\' must be a string');
+  }
+
+  name = showdown.helper.stdExtName(name);
+
+  // Getter
+  if (showdown.helper.isUndefined(ext)) {
+    if (!extensions.hasOwnProperty(name)) {
+      throw Error('Extension named ' + name + ' is not registered!');
+    }
+    return extensions[name];
+
+    // Setter
+  } else {
+    // Expand extension if it's wrapped in a function
+    if (typeof ext === 'function') {
+      ext = ext();
+    }
+
+    // Ensure extension is an array
+    if (!showdown.helper.isArray(ext)) {
+      ext = [ext];
+    }
+
+    var validExtension = validate(ext, name);
+
+    if (validExtension.valid) {
+      extensions[name] = ext;
+    } else {
+      throw Error(validExtension.error);
+    }
+  }
+};
+
+/**
+ * Gets all extensions registered
+ * @returns {{}}
+ */
+showdown.getAllExtensions = function () {
+  'use strict';
+  return extensions;
+};
+
+/**
+ * Remove an extension
+ * @param {string} name
+ */
+showdown.removeExtension = function (name) {
+  'use strict';
+  delete extensions[name];
+};
+
+/**
+ * Removes all extensions
+ */
+showdown.resetExtensions = function () {
+  'use strict';
+  extensions = {};
+};
+
+/**
+ * Validate extension
+ * @param {array} extension
+ * @param {string} name
+ * @returns {{valid: boolean, error: string}}
+ */
+function validate(extension, name) {
+  'use strict';
+
+  var errMsg = (name) ? 'Error in ' + name + ' extension->' : 'Error in unnamed extension',
+    ret = {
+      valid: true,
+      error: ''
+    };
+
+  if (!showdown.helper.isArray(extension)) {
+    extension = [extension];
+  }
+
+  for (var i = 0; i < extension.length; ++i) {
+    var baseMsg = errMsg + ' sub-extension ' + i + ': ',
+        ext = extension[i];
+    if (typeof ext !== 'object') {
+      ret.valid = false;
+      ret.error = baseMsg + 'must be an object, but ' + typeof ext + ' given';
+      return ret;
+    }
+
+    if (!showdown.helper.isString(ext.type)) {
+      ret.valid = false;
+      ret.error = baseMsg + 'property "type" must be a string, but ' + typeof ext.type + ' given';
+      return ret;
+    }
+
+    var type = ext.type = ext.type.toLowerCase();
+
+    // normalize extension type
+    if (type === 'language') {
+      type = ext.type = 'lang';
+    }
+
+    if (type === 'html') {
+      type = ext.type = 'output';
+    }
+
+    if (type !== 'lang' && type !== 'output' && type !== 'listener') {
+      ret.valid = false;
+      ret.error = baseMsg + 'type ' + type + ' is not recognized. Valid values: "lang/language", "output/html" or "listener"';
+      return ret;
+    }
+
+    if (type === 'listener') {
+      if (showdown.helper.isUndefined(ext.listeners)) {
+        ret.valid = false;
+        ret.error = baseMsg + '. Extensions of type "listener" must have a property called "listeners"';
+        return ret;
+      }
+    } else {
+      if (showdown.helper.isUndefined(ext.filter) && showdown.helper.isUndefined(ext.regex)) {
+        ret.valid = false;
+        ret.error = baseMsg + type + ' extensions must define either a "regex" property or a "filter" method';
+        return ret;
+      }
+    }
+
+    if (ext.listeners) {
+      if (typeof ext.listeners !== 'object') {
+        ret.valid = false;
+        ret.error = baseMsg + '"listeners" property must be an object but ' + typeof ext.listeners + ' given';
+        return ret;
+      }
+      for (var ln in ext.listeners) {
+        if (ext.listeners.hasOwnProperty(ln)) {
+          if (typeof ext.listeners[ln] !== 'function') {
+            ret.valid = false;
+            ret.error = baseMsg + '"listeners" property must be an hash of [event name]: [callback]. listeners.' + ln +
+              ' must be a function but ' + typeof ext.listeners[ln] + ' given';
+            return ret;
+          }
+        }
+      }
+    }
+
+    if (ext.filter) {
+      if (typeof ext.filter !== 'function') {
+        ret.valid = false;
+        ret.error = baseMsg + '"filter" must be a function, but ' + typeof ext.filter + ' given';
+        return ret;
+      }
+    } else if (ext.regex) {
+      if (showdown.helper.isString(ext.regex)) {
+        ext.regex = new RegExp(ext.regex, 'g');
+      }
+      if (!ext.regex instanceof RegExp) {
+        ret.valid = false;
+        ret.error = baseMsg + '"regex" property must either be a string or a RegExp object, but ' + typeof ext.regex + ' given';
+        return ret;
+      }
+      if (showdown.helper.isUndefined(ext.replace)) {
+        ret.valid = false;
+        ret.error = baseMsg + '"regex" extensions must implement a replace string or function';
+        return ret;
+      }
+    }
+  }
+  return ret;
+}
+
+/**
+ * Validate extension
+ * @param {object} ext
+ * @returns {boolean}
+ */
+showdown.validateExtension = function (ext) {
+  'use strict';
+
+  var validateExtension = validate(ext, null);
+  if (!validateExtension.valid) {
+    console.warn(validateExtension.error);
+    return false;
+  }
+  return true;
+};
+
+/**
+ * showdownjs helper functions
+ */
+
+if (!showdown.hasOwnProperty('helper')) {
+  showdown.helper = {};
+}
+
+/**
+ * Check if var is string
+ * @static
+ * @param {string} a
+ * @returns {boolean}
+ */
+showdown.helper.isString = function isString(a) {
+  'use strict';
+  return (typeof a === 'string' || a instanceof String);
+};
+
+/**
+ * Check if var is a function
+ * @static
+ * @param {string} a
+ * @returns {boolean}
+ */
+showdown.helper.isFunction = function isFunction(a) {
+  'use strict';
+  var getType = {};
+  return a && getType.toString.call(a) === '[object Function]';
+};
+
+/**
+ * ForEach helper function
+ * @static
+ * @param {*} obj
+ * @param {function} callback
+ */
+showdown.helper.forEach = function forEach(obj, callback) {
+  'use strict';
+  if (typeof obj.forEach === 'function') {
+    obj.forEach(callback);
+  } else {
+    for (var i = 0; i < obj.length; i++) {
+      callback(obj[i], i, obj);
+    }
+  }
+};
+
+/**
+ * isArray helper function
+ * @static
+ * @param {*} a
+ * @returns {boolean}
+ */
+showdown.helper.isArray = function isArray(a) {
+  'use strict';
+  return a.constructor === Array;
+};
+
+/**
+ * Check if value is undefined
+ * @static
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+ */
+showdown.helper.isUndefined = function isUndefined(value) {
+  'use strict';
+  return typeof value === 'undefined';
+};
+
+/**
+ * Standardidize extension name
+ * @static
+ * @param {string} s extension name
+ * @returns {string}
+ */
+showdown.helper.stdExtName = function (s) {
+  'use strict';
+  return s.replace(/[_-]||\s/g, '').toLowerCase();
+};
+
+function escapeCharactersCallback(wholeMatch, m1) {
+  'use strict';
+  var charCodeToEscape = m1.charCodeAt(0);
+  return '~E' + charCodeToEscape + 'E';
+}
+
+/**
+ * Callback used to escape characters when passing through String.replace
+ * @static
+ * @param {string} wholeMatch
+ * @param {string} m1
+ * @returns {string}
+ */
+showdown.helper.escapeCharactersCallback = escapeCharactersCallback;
+
+/**
+ * Escape characters in a string
+ * @static
+ * @param {string} text
+ * @param {string} charsToEscape
+ * @param {boolean} afterBackslash
+ * @returns {XML|string|void|*}
+ */
+showdown.helper.escapeCharacters = function escapeCharacters(text, charsToEscape, afterBackslash) {
+  'use strict';
+  // First we have to escape the escape characters so that
+  // we can build a character class out of them
+  var regexString = '([' + charsToEscape.replace(/([\[\]\\])/g, '\\$1') + '])';
+
+  if (afterBackslash) {
+    regexString = '\\\\' + regexString;
+  }
+
+  var regex = new RegExp(regexString, 'g');
+  text = text.replace(regex, escapeCharactersCallback);
+
+  return text;
+};
+
+var rgxFindMatchPos = function (str, left, right, flags) {
+  'use strict';
+  var f = flags || '',
+    g = f.indexOf('g') > -1,
+    x = new RegExp(left + '|' + right, 'g' + f.replace(/g/g, '')),
+    l = new RegExp(left, f.replace(/g/g, '')),
+    pos = [],
+    t, s, m, start, end;
+
+  do {
+    t = 0;
+    while ((m = x.exec(str))) {
+      if (l.test(m[0])) {
+        if (!(t++)) {
+          s = x.lastIndex;
+          start = s - m[0].length;
+        }
+      } else if (t) {
+        if (!--t) {
+          end = m.index + m[0].length;
+          var obj = {
+            left: {start: start, end: s},
+            match: {start: s, end: m.index},
+            right: {start: m.index, end: end},
+            wholeMatch: {start: start, end: end}
+          };
+          pos.push(obj);
+          if (!g) {
+            return pos;
+          }
+        }
+      }
+    }
+  } while (t && (x.lastIndex = s));
+
+  return pos;
+};
+
+/**
+ * matchRecursiveRegExp
+ *
+ * (c) 2007 Steven Levithan <stevenlevithan.com>
+ * MIT License
+ *
+ * Accepts a string to search, a left and right format delimiter
+ * as regex patterns, and optional regex flags. Returns an array
+ * of matches, allowing nested instances of left/right delimiters.
+ * Use the "g" flag to return all matches, otherwise only the
+ * first is returned. Be careful to ensure that the left and
+ * right format delimiters produce mutually exclusive matches.
+ * Backreferences are not supported within the right delimiter
+ * due to how it is internally combined with the left delimiter.
+ * When matching strings whose format delimiters are unbalanced
+ * to the left or right, the output is intentionally as a
+ * conventional regex library with recursion support would
+ * produce, e.g. "<<x>" and "<x>>" both produce ["x"] when using
+ * "<" and ">" as the delimiters (both strings contain a single,
+ * balanced instance of "<x>").
+ *
+ * examples:
+ * matchRecursiveRegExp("test", "\\(", "\\)")
+ * returns: []
+ * matchRecursiveRegExp("<t<<e>><s>>t<>", "<", ">", "g")
+ * returns: ["t<<e>><s>", ""]
+ * matchRecursiveRegExp("<div id=\"x\">test</div>", "<div\\b[^>]*>", "</div>", "gi")
+ * returns: ["test"]
+ */
+showdown.helper.matchRecursiveRegExp = function (str, left, right, flags) {
+  'use strict';
+
+  var matchPos = rgxFindMatchPos (str, left, right, flags),
+    results = [];
+
+  for (var i = 0; i < matchPos.length; ++i) {
+    results.push([
+      str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end),
+      str.slice(matchPos[i].match.start, matchPos[i].match.end),
+      str.slice(matchPos[i].left.start, matchPos[i].left.end),
+      str.slice(matchPos[i].right.start, matchPos[i].right.end)
+    ]);
+  }
+  return results;
+};
+
+/**
+ *
+ * @param {string} str
+ * @param {string|function} replacement
+ * @param {string} left
+ * @param {string} right
+ * @param {string} flags
+ * @returns {string}
+ */
+showdown.helper.replaceRecursiveRegExp = function (str, replacement, left, right, flags) {
+  'use strict';
+
+  if (!showdown.helper.isFunction(replacement)) {
+    var repStr = replacement;
+    replacement = function () {
+      return repStr;
+    };
+  }
+
+  var matchPos = rgxFindMatchPos(str, left, right, flags),
+      finalStr = str,
+      lng = matchPos.length;
+
+  if (lng > 0) {
+    var bits = [];
+    if (matchPos[0].wholeMatch.start !== 0) {
+      bits.push(str.slice(0, matchPos[0].wholeMatch.start));
+    }
+    for (var i = 0; i < lng; ++i) {
+      bits.push(
+        replacement(
+          str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end),
+          str.slice(matchPos[i].match.start, matchPos[i].match.end),
+          str.slice(matchPos[i].left.start, matchPos[i].left.end),
+          str.slice(matchPos[i].right.start, matchPos[i].right.end)
+        )
+      );
+      if (i < lng - 1) {
+        bits.push(str.slice(matchPos[i].wholeMatch.end, matchPos[i + 1].wholeMatch.start));
+      }
+    }
+    if (matchPos[lng - 1].wholeMatch.end < str.length) {
+      bits.push(str.slice(matchPos[lng - 1].wholeMatch.end));
+    }
+    finalStr = bits.join('');
+  }
+  return finalStr;
+};
+
+/**
+ * POLYFILLS
+ */
+if (showdown.helper.isUndefined(console)) {
+  console = {
+    warn: function (msg) {
+      'use strict';
+      alert(msg);
+    },
+    log: function (msg) {
+      'use strict';
+      alert(msg);
+    },
+    error: function (msg) {
+      'use strict';
+      throw msg;
+    }
+  };
+}
+
+/**
+ * Created by Estevao on 31-05-2015.
+ */
+
+/**
+ * Showdown Converter class
+ * @class
+ * @param {object} [converterOptions]
+ * @returns {Converter}
+ */
+showdown.Converter = function (converterOptions) {
+  'use strict';
+
+  var
+      /**
+       * Options used by this converter
+       * @private
+       * @type {{}}
+       */
+      options = {},
+
+      /**
+       * Language extensions used by this converter
+       * @private
+       * @type {Array}
+       */
+      langExtensions = [],
+
+      /**
+       * Output modifiers extensions used by this converter
+       * @private
+       * @type {Array}
+       */
+      outputModifiers = [],
+
+      /**
+       * Event listeners
+       * @private
+       * @type {{}}
+       */
+      listeners = {};
+
+  _constructor();
+
+  /**
+   * Converter constructor
+   * @private
+   */
+  function _constructor() {
+    converterOptions = converterOptions || {};
+
+    for (var gOpt in globalOptions) {
+      if (globalOptions.hasOwnProperty(gOpt)) {
+        options[gOpt] = globalOptions[gOpt];
+      }
+    }
+
+    // Merge options
+    if (typeof converterOptions === 'object') {
+      for (var opt in converterOptions) {
+        if (converterOptions.hasOwnProperty(opt)) {
+          options[opt] = converterOptions[opt];
+        }
+      }
+    } else {
+      throw Error('Converter expects the passed parameter to be an object, but ' + typeof converterOptions +
+      ' was passed instead.');
+    }
+
+    if (options.extensions) {
+      showdown.helper.forEach(options.extensions, _parseExtension);
+    }
+  }
+
+  /**
+   * Parse extension
+   * @param {*} ext
+   * @param {string} [name='']
+   * @private
+   */
+  function _parseExtension(ext, name) {
+
+    name = name || null;
+    // If it's a string, the extension was previously loaded
+    if (showdown.helper.isString(ext)) {
+      ext = showdown.helper.stdExtName(ext);
+      name = ext;
+
+      // LEGACY_SUPPORT CODE
+      if (showdown.extensions[ext]) {
+        console.warn('DEPRECATION WARNING: ' + ext + ' is an old extension that uses a deprecated loading method.' +
+          'Please inform the developer that the extension should be updated!');
+        legacyExtensionLoading(showdown.extensions[ext], ext);
+        return;
+      // END LEGACY SUPPORT CODE
+
+      } else if (!showdown.helper.isUndefined(extensions[ext])) {
+        ext = extensions[ext];
+
+      } else {
+        throw Error('Extension "' + ext + '" could not be loaded. It was either not found or is not a valid extension.');
+      }
+    }
+
+    if (typeof ext === 'function') {
+      ext = ext();
+    }
+
+    if (!showdown.helper.isArray(ext)) {
+      ext = [ext];
+    }
+
+    var validExt = validate(ext, name);
+    if (!validExt.valid) {
+      throw Error(validExt.error);
+    }
+
+    for (var i = 0; i < ext.length; ++i) {
+      switch (ext[i].type) {
+
+        case 'lang':
+          langExtensions.push(ext[i]);
+          break;
+
+        case 'output':
+          outputModifiers.push(ext[i]);
+          break;
+      }
+      if (ext[i].hasOwnProperty(listeners)) {
+        for (var ln in ext[i].listeners) {
+          if (ext[i].listeners.hasOwnProperty(ln)) {
+            listen(ln, ext[i].listeners[ln]);
+          }
+        }
+      }
+    }
+
+  }
+
+  /**
+   * LEGACY_SUPPORT
+   * @param {*} ext
+   * @param {string} name
+   */
+  function legacyExtensionLoading(ext, name) {
+    if (typeof ext === 'function') {
+      ext = ext(new showdown.Converter());
+    }
+    if (!showdown.helper.isArray(ext)) {
+      ext = [ext];
+    }
+    var valid = validate(ext, name);
+
+    if (!valid.valid) {
+      throw Error(valid.error);
+    }
+
+    for (var i = 0; i < ext.length; ++i) {
+      switch (ext[i].type) {
+        case 'lang':
+          langExtensions.push(ext[i]);
+          break;
+        case 'output':
+          outputModifiers.push(ext[i]);
+          break;
+        default:// should never reach here
+          throw Error('Extension loader error: Type unrecognized!!!');
+      }
+    }
+  }
+
+  /**
+   * Listen to an event
+   * @param {string} name
+   * @param {function} callback
+   */
+  function listen(name, callback) {
+    if (!showdown.helper.isString(name)) {
+      throw Error('Invalid argument in converter.listen() method: name must be a string, but ' + typeof name + ' given');
+    }
+
+    if (typeof callback !== 'function') {
+      throw Error('Invalid argument in converter.listen() method: callback must be a function, but ' + typeof callback + ' given');
+    }
+
+    if (!listeners.hasOwnProperty(name)) {
+      listeners[name] = [];
+    }
+    listeners[name].push(callback);
+  }
+
+  function rTrimInputText(text) {
+    var rsp = text.match(/^\s*/)[0].length,
+        rgx = new RegExp('^\\s{0,' + rsp + '}', 'gm');
+    return text.replace(rgx, '');
+  }
+
+  /**
+   * Dispatch an event
+   * @private
+   * @param {string} evtName Event name
+   * @param {string} text Text
+   * @param {{}} options Converter Options
+   * @param {{}} globals
+   * @returns {string}
+   */
+  this._dispatch = function dispatch (evtName, text, options, globals) {
+    if (listeners.hasOwnProperty(evtName)) {
+      for (var ei = 0; ei < listeners[evtName].length; ++ei) {
+        var nText = listeners[evtName][ei](evtName, text, this, options, globals);
+        if (nText && typeof nText !== 'undefined') {
+          text = nText;
+        }
+      }
+    }
+    return text;
+  };
+
+  /**
+   * Listen to an event
+   * @param {string} name
+   * @param {function} callback
+   * @returns {showdown.Converter}
+   */
+  this.listen = function (name, callback) {
+    listen(name, callback);
+    return this;
+  };
+
+  /**
+   * Converts a markdown string into HTML
+   * @param {string} text
+   * @returns {*}
+   */
+  this.makeHtml = function (text) {
+    //check if text is not falsy
+    if (!text) {
+      return text;
+    }
+
+    var globals = {
+      gHtmlBlocks:     [],
+      gHtmlMdBlocks:   [],
+      gHtmlSpans:      [],
+      gUrls:           {},
+      gTitles:         {},
+      gDimensions:     {},
+      gListLevel:      0,
+      hashLinkCounts:  {},
+      langExtensions:  langExtensions,
+      outputModifiers: outputModifiers,
+      converter:       this,
+      ghCodeBlocks:    []
+    };
+
+    // attacklab: Replace ~ with ~T
+    // This lets us use tilde as an escape char to avoid md5 hashes
+    // The choice of character is arbitrary; anything that isn't
+    // magic in Markdown will work.
+    text = text.replace(/~/g, '~T');
+
+    // attacklab: Replace $ with ~D
+    // RegExp interprets $ as a special character
+    // when it's in a replacement string
+    text = text.replace(/\$/g, '~D');
+
+    // Standardize line endings
+    text = text.replace(/\r\n/g, '\n'); // DOS to Unix
+    text = text.replace(/\r/g, '\n'); // Mac to Unix
+
+    if (options.smartIndentationFix) {
+      text = rTrimInputText(text);
+    }
+
+    // Make sure text begins and ends with a couple of newlines:
+    //text = '\n\n' + text + '\n\n';
+    text = text;
+    // detab
+    text = showdown.subParser('detab')(text, options, globals);
+
+    // stripBlankLines
+    text = showdown.subParser('stripBlankLines')(text, options, globals);
+
+    //run languageExtensions
+    showdown.helper.forEach(langExtensions, function (ext) {
+      text = showdown.subParser('runExtension')(ext, text, options, globals);
+    });
+
+    // run the sub parsers
+    text = showdown.subParser('hashPreCodeTags')(text, options, globals);
+    text = showdown.subParser('githubCodeBlocks')(text, options, globals);
+    text = showdown.subParser('hashHTMLBlocks')(text, options, globals);
+    text = showdown.subParser('hashHTMLSpans')(text, options, globals);
+    text = showdown.subParser('stripLinkDefinitions')(text, options, globals);
+    text = showdown.subParser('blockGamut')(text, options, globals);
+    text = showdown.subParser('unhashHTMLSpans')(text, options, globals);
+    text = showdown.subParser('unescapeSpecialChars')(text, options, globals);
+
+    // attacklab: Restore dollar signs
+    text = text.replace(/~D/g, '$$');
+
+    // attacklab: Restore tildes
+    text = text.replace(/~T/g, '~');
+
+    // Run output modifiers
+    showdown.helper.forEach(outputModifiers, function (ext) {
+      text = showdown.subParser('runExtension')(ext, text, options, globals);
+    });
+    return text;
+  };
+
+  /**
+   * Set an option of this Converter instance
+   * @param {string} key
+   * @param {*} value
+   */
+  this.setOption = function (key, value) {
+    options[key] = value;
+  };
+
+  /**
+   * Get the option of this Converter instance
+   * @param {string} key
+   * @returns {*}
+   */
+  this.getOption = function (key) {
+    return options[key];
+  };
+
+  /**
+   * Get the options of this Converter instance
+   * @returns {{}}
+   */
+  this.getOptions = function () {
+    return options;
+  };
+
+  /**
+   * Add extension to THIS converter
+   * @param {{}} extension
+   * @param {string} [name=null]
+   */
+  this.addExtension = function (extension, name) {
+    name = name || null;
+    _parseExtension(extension, name);
+  };
+
+  /**
+   * Use a global registered extension with THIS converter
+   * @param {string} extensionName Name of the previously registered extension
+   */
+  this.useExtension = function (extensionName) {
+    _parseExtension(extensionName);
+  };
+
+  /**
+   * Set the flavor THIS converter should use
+   * @param {string} name
+   */
+  this.setFlavor = function (name) {
+    if (flavor.hasOwnProperty(name)) {
+      var preset = flavor[name];
+      for (var option in preset) {
+        if (preset.hasOwnProperty(option)) {
+          options[option] = preset[option];
+        }
+      }
+    }
+  };
+
+  /**
+   * Remove an extension from THIS converter.
+   * Note: This is a costly operation. It's better to initialize a new converter
+   * and specify the extensions you wish to use
+   * @param {Array} extension
+   */
+  this.removeExtension = function (extension) {
+    if (!showdown.helper.isArray(extension)) {
+      extension = [extension];
+    }
+    for (var a = 0; a < extension.length; ++a) {
+      var ext = extension[a];
+      for (var i = 0; i < langExtensions.length; ++i) {
+        if (langExtensions[i] === ext) {
+          langExtensions[i].splice(i, 1);
+        }
+      }
+      for (var ii = 0; ii < outputModifiers.length; ++i) {
+        if (outputModifiers[ii] === ext) {
+          outputModifiers[ii].splice(i, 1);
+        }
+      }
+    }
+  };
+
+  /**
+   * Get all extension of THIS converter
+   * @returns {{language: Array, output: Array}}
+   */
+  this.getAllExtensions = function () {
+    return {
+      language: langExtensions,
+      output: outputModifiers
+    };
+  };
+};
+
+/**
+ * Turn Markdown link shortcuts into XHTML <a> tags.
+ */
+showdown.subParser('anchors', function (text, options, globals) {
+  'use strict';
+
+  text = globals.converter._dispatch('anchors.before', text, options, globals);
+
+  var writeAnchorTag = function (wholeMatch, m1, m2, m3, m4, m5, m6, m7) {
+    if (showdown.helper.isUndefined(m7)) {
+      m7 = '';
+    }
+    wholeMatch = m1;
+    var linkText = m2,
+        linkId = m3.toLowerCase(),
+        url = m4,
+        title = m7;
+
+    if (!url) {
+      if (!linkId) {
+        // lower-case and turn embedded newlines into spaces
+        linkId = linkText.toLowerCase().replace(/ ?\n/g, ' ');
+      }
+      url = '#' + linkId;
+
+      if (!showdown.helper.isUndefined(globals.gUrls[linkId])) {
+        url = globals.gUrls[linkId];
+        if (!showdown.helper.isUndefined(globals.gTitles[linkId])) {
+          title = globals.gTitles[linkId];
+        }
+      } else {
+        if (wholeMatch.search(/\(\s*\)$/m) > -1) {
+          // Special case for explicit empty url
+          url = '';
+        } else {
+          return wholeMatch;
+        }
+      }
+    }
+
+    url = showdown.helper.escapeCharacters(url, '*_', false);
+    var result = '<a href="' + url + '"';
+
+    if (title !== '' && title !== null) {
+      title = title.replace(/"/g, '&quot;');
+      title = showdown.helper.escapeCharacters(title, '*_', false);
+      result += ' title="' + title + '"';
+    }
+
+    result += '>' + linkText + '</a>';
+
+    return result;
+  };
+
+  // First, handle reference-style links: [link text] [id]
+  /*
+   text = text.replace(/
+   (							// wrap whole match in $1
+   \[
+   (
+   (?:
+   \[[^\]]*\]		// allow brackets nested one level
+   |
+   [^\[]			// or anything else
+   )*
+   )
+   \]
+
+   [ ]?					// one optional space
+   (?:\n[ ]*)?				// one optional newline followed by spaces
+
+   \[
+   (.*?)					// id = $3
+   \]
+   )()()()()					// pad remaining backreferences
+   /g,_DoAnchors_callback);
+   */
+  text = text.replace(/(\[((?:\[[^\]]*]|[^\[\]])*)][ ]?(?:\n[ ]*)?\[(.*?)])()()()()/g, writeAnchorTag);
+
+  //
+  // Next, inline-style links: [link text](url "optional title")
+  //
+
+  /*
+   text = text.replace(/
+   (						// wrap whole match in $1
+   \[
+   (
+   (?:
+   \[[^\]]*\]	// allow brackets nested one level
+   |
+   [^\[\]]			// or anything else
+   )
+   )
+   \]
+   \(						// literal paren
+   [ \t]*
+   ()						// no id, so leave $3 empty
+   <?(.*?)>?				// href = $4
+   [ \t]*
+   (						// $5
+   (['"])				// quote char = $6
+   (.*?)				// Title = $7
+   \6					// matching quote
+   [ \t]*				// ignore any spaces/tabs between closing quote and )
+   )?						// title is optional
+   \)
+   )
+   /g,writeAnchorTag);
+   */
+  text = text.replace(/(\[((?:\[[^\]]*]|[^\[\]])*)]\([ \t]*()<?(.*?(?:\(.*?\).*?)?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,
+                      writeAnchorTag);
+
+  //
+  // Last, handle reference-style shortcuts: [link text]
+  // These must come last in case you've also got [link test][1]
+  // or [link test](/foo)
+  //
+
+  /*
+   text = text.replace(/
+   (                // wrap whole match in $1
+   \[
+   ([^\[\]]+)       // link text = $2; can't contain '[' or ']'
+   \]
+   )()()()()()      // pad rest of backreferences
+   /g, writeAnchorTag);
+   */
+  text = text.replace(/(\[([^\[\]]+)])()()()()()/g, writeAnchorTag);
+
+  text = globals.converter._dispatch('anchors.after', text, options, globals);
+  return text;
+});
+
+showdown.subParser('autoLinks', function (text, options, globals) {
+  'use strict';
+
+  text = globals.converter._dispatch('autoLinks.before', text, options, globals);
+
+  var simpleURLRegex  = /\b(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+)(?=\s|$)(?!["<>])/gi,
+      delimUrlRegex   = /<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)>/gi,
+      simpleMailRegex = /(?:^|[ \n\t])([A-Za-z0-9!#$%&'*+-/=?^_`\{|}~\.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?:$|[ \n\t])/gi,
+      delimMailRegex  = /<(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi;
+
+  text = text.replace(delimUrlRegex, replaceLink);
+  text = text.replace(delimMailRegex, replaceMail);
+  // simpleURLRegex  = /\b(((https?|ftp|dict):\/\/|www\.)[-.+~:?#@!$&'()*,;=[\]\w]+)\b/gi,
+  // Email addresses: <address@domain.foo>
+
+  if (options.simplifiedAutoLink) {
+    text = text.replace(simpleURLRegex, replaceLink);
+    text = text.replace(simpleMailRegex, replaceMail);
+  }
+
+  function replaceLink(wm, link) {
+    var lnkTxt = link;
+    if (/^www\./i.test(link)) {
+      link = link.replace(/^www\./i, 'http://www.');
+    }
+    return '<a href="' + link + '">' + lnkTxt + '</a>';
+  }
+
+  function replaceMail(wholeMatch, m1) {
+    var unescapedStr = showdown.subParser('unescapeSpecialChars')(m1);
+    return showdown.subParser('encodeEmailAddress')(unescapedStr);
+  }
+
+  text = globals.converter._dispatch('autoLinks.after', text, options, globals);
+
+  return text;
+});
+
+/**
+ * These are all the transformations that form block-level
+ * tags like paragraphs, headers, and list items.
+ */
+showdown.subParser('blockGamut', function (text, options, globals) {
+  'use strict';
+
+  text = globals.converter._dispatch('blockGamut.before', text, options, globals);
+
+  // we parse blockquotes first so that we can have headings and hrs
+  // inside blockquotes
+  text = showdown.subParser('blockQuotes')(text, options, globals);
+  text = showdown.subParser('headers')(text, options, globals);
+
+  // Do Horizontal Rules:
+  var key = showdown.subParser('hashBlock')('<hr />', options, globals);
+  text = text.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm, key);
+  text = text.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm, key);
+  text = text.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm, key);
+
+  text = showdown.subParser('lists')(text, options, globals);
+  text = showdown.subParser('codeBlocks')(text, options, globals);
+  text = showdown.subParser('tables')(text, options, globals);
+
+  // We already ran _HashHTMLBlocks() before, in Markdown(), but that
+  // was to escape raw HTML in the original Markdown source. This time,
+  // we're escaping the markup we've just created, so that we don't wrap
+  // <p> tags around block-level tags.
+  text = showdown.subParser('hashHTMLBlocks')(text, options, globals);
+  text = showdown.subParser('paragraphs')(text, options, globals);
+
+  text = globals.converter._dispatch('blockGamut.after', text, options, globals);
+
+  return text;
+});
+
+showdown.subParser('blockQuotes', function (text, options, globals) {
+  'use strict';
+
+  text = globals.converter._dispatch('blockQuotes.before', text, options, globals);
+  /*
+   text = text.replace(/
+   (								// Wrap whole match in $1
+   (
+   ^[ \t]*>[ \t]?			// '>' at the start of a line
+   .+\n					// rest of the first line
+   (.+\n)*					// subsequent consecutive lines
+   \n*						// blanks
+   )+
+   )
+   /gm, function(){...});
+   */
+
+  text = text.replace(/((^[ \t]{0,3}>[ \t]?.+\n(.+\n)*\n*)+)/gm, function (wholeMatch, m1) {
+    var bq = m1;
+
+    // attacklab: hack around Konqueror 3.5.4 bug:
+    // "----------bug".replace(/^-/g,"") == "bug"
+    bq = bq.replace(/^[ \t]*>[ \t]?/gm, '~0'); // trim one level of quoting
+
+    // attacklab: clean up hack
+    bq = bq.replace(/~0/g, '');
+
+    bq = bq.replace(/^[ \t]+$/gm, ''); // trim whitespace-only lines
+    bq = showdown.subParser('githubCodeBlocks')(bq, options, globals);
+    bq = showdown.subParser('blockGamut')(bq, options, globals); // recurse
+
+    bq = bq.replace(/(^|\n)/g, '$1  ');
+    // These leading spaces screw with <pre> content, so we need to fix that:
+    bq = bq.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm, function (wholeMatch, m1) {
+      var pre = m1;
+      // attacklab: hack around Konqueror 3.5.4 bug:
+      pre = pre.replace(/^  /mg, '~0');
+      pre = pre.replace(/~0/g, '');
+      return pre;
+    });
+
+    return showdown.subParser('hashBlock')('<blockquote>\n' + bq + '\n</blockquote>', options, globals);
+  });
+
+  text = globals.converter._dispatch('blockQuotes.after', text, options, globals);
+  return text;
+});
+
+/**
+ * Process Markdown `<pre><code>` blocks.
+ */
+showdown.subParser('codeBlocks', function (text, options, globals) {
+  'use strict';
+
+  text = globals.converter._dispatch('codeBlocks.before', text, options, globals);
+  /*
+   text = text.replace(text,
+   /(?:\n\n|^)
+   (								// $1 = the code block -- one or more lines, starting with a space/tab
+   (?:
+   (?:[ ]{4}|\t)			// Lines must start with a tab or a tab-width of spaces - attacklab: g_tab_width
+   .*\n+
+   )+
+   )
+   (\n*[ ]{0,3}[^ \t\n]|(?=~0))	// attacklab: g_tab_width
+   /g,function(){...});
+   */
+
+  // attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
+  text += '~0';
+
+  var pattern = /(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g;
+  text = text.replace(pattern, function (wholeMatch, m1, m2) {
+    var codeblock = m1,
+        nextChar = m2,
+        end = '\n';
+
+    codeblock = showdown.subParser('outdent')(codeblock);
+    codeblock = showdown.subParser('encodeCode')(codeblock);
+    codeblock = showdown.subParser('detab')(codeblock);
+    codeblock = codeblock.replace(/^\n+/g, ''); // trim leading newlines
+    codeblock = codeblock.replace(/\n+$/g, ''); // trim trailing newlines
+
+    if (options.omitExtraWLInCodeBlocks) {
+      end = '';
+    }
+
+    codeblock = '<pre><code>' + codeblock + end + '</code></pre>';
+
+    return showdown.subParser('hashBlock')(codeblock, options, globals) + nextChar;
+  });
+
+  // attacklab: strip sentinel
+  text = text.replace(/~0/, '');
+
+  text = globals.converter._dispatch('codeBlocks.after', text, options, globals);
+  return text;
+});
+
+/**
+ *
+ *   *  Backtick quotes are used for <code></code> spans.
+ *
+ *   *  You can use multiple backticks as the delimiters if you want to
+ *     include literal backticks in the code span. So, this input:
+ *
+ *         Just type ``foo `bar` baz`` at the prompt.
+ *
+ *       Will translate to:
+ *
+ *         <p>Just type <code>foo `bar` baz</code> at the prompt.</p>
+ *
+ *    There's no arbitrary limit to the number of backticks you
+ *    can use as delimters. If you need three consecutive backticks
+ *    in your code, use four for delimiters, etc.
+ *
+ *  *  You can use spaces to get literal backticks at the edges:
+ *
+ *         ... type `` `bar` `` ...
+ *
+ *       Turns to:
+ *
+ *         ... type <code>`bar`</code> ...
+ */
+showdown.subParser('codeSpans', function (text, options, globals) {
+  'use strict';
+
+  text = globals.converter._dispatch('codeSpans.before', text, options, globals);
+
+  /*
+   text = text.replace(/
+   (^|[^\\])					// Character before opening ` can't be a backslash
+   (`+)						// $2 = Opening run of `
+   (							// $3 = The code block
+   [^\r]*?
+   [^`]					// attacklab: work around lack of lookbehind
+   )
+   \2							// Matching closer
+   (?!`)
+   /gm, function(){...});
+   */
+
+  if (typeof(text) === 'undefined') {
+    text = '';
+  }
+  text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,
+    function (wholeMatch, m1, m2, m3) {
+      var c = m3;
+      c = c.replace(/^([ \t]*)/g, '');	// leading whitespace
+      c = c.replace(/[ \t]*$/g, '');	// trailing whitespace
+      c = showdown.subParser('encodeCode')(c);
+      return m1 + '<code>' + c + '</code>';
+    }
+  );
+
+  text = globals.converter._dispatch('codeSpans.after', text, options, globals);
+  return text;
+});
+
+/**
+ * Convert all tabs to spaces
+ */
+showdown.subParser('detab', function (text) {
+  'use strict';
+
+  // expand first n-1 tabs
+  text = text.replace(/\t(?=\t)/g, '    '); // g_tab_width
+
+  // replace the nth with two sentinels
+  text = text.replace(/\t/g, '~A~B');
+
+  // use the sentinel to anchor our regex so it doesn't explode
+  text = text.replace(/~B(.+?)~A/g, function (wholeMatch, m1) {
+    var leadingText = m1,
+        numSpaces = 4 - leadingText.length % 4;  // g_tab_width
+
+    // there *must* be a better way to do this:
+    for (var i = 0; i < numSpaces; i++) {
+      leadingText += ' ';
+    }
+
+    return leadingText;
+  });
+
+  // clean up sentinels
+  text = text.replace(/~A/g, '    ');  // g_tab_width
+  text = text.replace(/~B/g, '');
+
+  return text;
+
+});
+
+/**
+ * Smart processing for ampersands and angle brackets that need to be encoded.
+ */
+showdown.subParser('encodeAmpsAndAngles', function (text) {
+  'use strict';
+  // Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin:
+  // http://bumppo.net/projects/amputator/
+  text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, '&amp;');
+
+  // Encode naked <'s
+  text = text.replace(/<(?![a-z\/?\$!])/gi, '&lt;');
+
+  return text;
+});
+
+/**
+ * Returns the string, with after processing the following backslash escape sequences.
+ *
+ * attacklab: The polite way to do this is with the new escapeCharacters() function:
+ *
+ *    text = escapeCharacters(text,"\\",true);
+ *    text = escapeCharacters(text,"`*_{}[]()>#+-.!",true);
+ *
+ * ...but we're sidestepping its use of the (slow) RegExp constructor
+ * as an optimization for Firefox.  This function gets called a LOT.
+ */
+showdown.subParser('encodeBackslashEscapes', function (text) {
+  'use strict';
+  text = text.replace(/\\(\\)/g, showdown.helper.escapeCharactersCallback);
+  text = text.replace(/\\([`*_{}\[\]()>#+-.!])/g, showdown.helper.escapeCharactersCallback);
+  return text;
+});
+
+/**
+ * Encode/escape certain characters inside Markdown code runs.
+ * The point is that in code, these characters are literals,
+ * and lose their special Markdown meanings.
+ */
+showdown.subParser('encodeCode', function (text) {
+  'use strict';
+
+  // Encode all ampersands; HTML entities are not
+  // entities within a Markdown code span.
+  text = text.replace(/&/g, '&amp;');
+
+  // Do the angle bracket song and dance:
+  text = text.replace(/</g, '&lt;');
+  text = text.replace(/>/g, '&gt;');
+
+  // Now, escape characters that are magic in Markdown:
+  text = showdown.helper.escapeCharacters(text, '*_{}[]\\', false);
+
+  // jj the line above breaks this:
+  //---
+  //* Item
+  //   1. Subitem
+  //            special char: *
+  // ---
+
+  return text;
+});
+
+/**
+ *  Input: an email address, e.g. "foo@example.com"
+ *
+ *  Output: the email address as a mailto link, with each character
+ *    of the address encoded as either a decimal or hex entity, in
+ *    the hopes of foiling most address harvesting spam bots. E.g.:
+ *
+ *    <a href="&#x6D;&#97;&#105;&#108;&#x74;&#111;:&#102;&#111;&#111;&#64;&#101;
+ *       x&#x61;&#109;&#x70;&#108;&#x65;&#x2E;&#99;&#111;&#109;">&#102;&#111;&#111;
+ *       &#64;&#101;x&#x61;&#109;&#x70;&#108;&#x65;&#x2E;&#99;&#111;&#109;</a>
+ *
+ *  Based on a filter by Matthew Wickline, posted to the BBEdit-Talk
+ *  mailing list: <http://tinyurl.com/yu7ue>
+ *
+ */
+showdown.subParser('encodeEmailAddress', function (addr) {
+  'use strict';
+
+  var encode = [
+    function (ch) {
+      return '&#' + ch.charCodeAt(0) + ';';
+    },
+    function (ch) {
+      return '&#x' + ch.charCodeAt(0).toString(16) + ';';
+    },
+    function (ch) {
+      return ch;
+    }
+  ];
+
+  addr = 'mailto:' + addr;
+
+  addr = addr.replace(/./g, function (ch) {
+    if (ch === '@') {
+      // this *must* be encoded. I insist.
+      ch = encode[Math.floor(Math.random() * 2)](ch);
+    } else if (ch !== ':') {
+      // leave ':' alone (to spot mailto: later)
+      var r = Math.random();
+      // roughly 10% raw, 45% hex, 45% dec
+      ch = (
+        r > 0.9 ? encode[2](ch) : r > 0.45 ? encode[1](ch) : encode[0](ch)
+      );
+    }
+    return ch;
+  });
+
+  addr = '<a href="' + addr + '">' + addr + '</a>';
+  addr = addr.replace(/">.+:/g, '">'); // strip the mailto: from the visible part
+
+  return addr;
+});
+
+/**
+ * Within tags -- meaning between < and > -- encode [\ ` * _] so they
+ * don't conflict with their use in Markdown for code, italics and strong.
+ */
+showdown.subParser('escapeSpecialCharsWithinTagAttributes', function (text) {
+  'use strict';
+
+  // Build a regex to find HTML tags and comments.  See Friedl's
+  // "Mastering Regular Expressions", 2nd Ed., pp. 200-201.
+  var regex = /(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--.*?--\s*)+>)/gi;
+
+  text = text.replace(regex, function (wholeMatch) {
+    var tag = wholeMatch.replace(/(.)<\/?code>(?=.)/g, '$1`');
+    tag = showdown.helper.escapeCharacters(tag, '\\`*_', false);
+    return tag;
+  });
+
+  return text;
+});
+
+/**
+ * Handle github codeblocks prior to running HashHTML so that
+ * HTML contained within the codeblock gets escaped properly
+ * Example:
+ * ```ruby
+ *     def hello_world(x)
+ *       puts "Hello, #{x}"
+ *     end
+ * ```
+ */
+showdown.subParser('githubCodeBlocks', function (text, options, globals) {
+  'use strict';
+
+  // early exit if option is not enabled
+  if (!options.ghCodeBlocks) {
+    return text;
+  }
+
+  text = globals.converter._dispatch('githubCodeBlocks.before', text, options, globals);
+
+  text += '~0';
+
+  text = text.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g, function (wholeMatch, language, codeblock) {
+    var end = (options.omitExtraWLInCodeBlocks) ? '' : '\n';
+
+    // First parse the github code block
+    codeblock = showdown.subParser('encodeCode')(codeblock);
+    codeblock = showdown.subParser('detab')(codeblock);
+    codeblock = codeblock.replace(/^\n+/g, ''); // trim leading newlines
+    codeblock = codeblock.replace(/\n+$/g, ''); // trim trailing whitespace
+
+    codeblock = '<pre><code' + (language ? ' class="' + language + ' language-' + language + '"' : '') + '>' + codeblock + end + '</code></pre>';
+
+    codeblock = showdown.subParser('hashBlock')(codeblock, options, globals);
+
+    // Since GHCodeblocks can be false positives, we need to
+    // store the primitive text and the parsed text in a global var,
+    // and then return a token
+    return '\n\n~G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\n\n';
+  });
+
+  // attacklab: strip sentinel
+  text = text.replace(/~0/, '');
+
+  return globals.converter._dispatch('githubCodeBlocks.after', text, options, globals);
+});
+
+showdown.subParser('hashBlock', function (text, options, globals) {
+  'use strict';
+  text = text.replace(/(^\n+|\n+$)/g, '');
+  return '\n\n~K' + (globals.gHtmlBlocks.push(text) - 1) + 'K\n\n';
+});
+
+showdown.subParser('hashElement', function (text, options, globals) {
+  'use strict';
+
+  return function (wholeMatch, m1) {
+    var blockText = m1;
+
+    // Undo double lines
+    blockText = blockText.replace(/\n\n/g, '\n');
+    blockText = blockText.replace(/^\n/, '');
+
+    // strip trailing blank lines
+    blockText = blockText.replace(/\n+$/g, '');
+
+    // Replace the element text with a marker ("~KxK" where x is its key)
+    blockText = '\n\n~K' + (globals.gHtmlBlocks.push(blockText) - 1) + 'K\n\n';
+
+    return blockText;
+  };
+});
+
+showdown.subParser('hashHTMLBlocks', function (text, options, globals) {
+  'use strict';
+
+  var blockTags = [
+      'pre',
+      'div',
+      'h1',
+      'h2',
+      'h3',
+      'h4',
+      'h5',
+      'h6',
+      'blockquote',
+      'table',
+      'dl',
+      'ol',
+      'ul',
+      'script',
+      'noscript',
+      'form',
+      'fieldset',
+      'iframe',
+      'math',
+      'style',
+      'section',
+      'header',
+      'footer',
+      'nav',
+      'article',
+      'aside',
+      'address',
+      'audio',
+      'canvas',
+      'figure',
+      'hgroup',
+      'output',
+      'video',
+      'p'
+    ],
+    repFunc = function (wholeMatch, match, left, right) {
+      var txt = wholeMatch;
+      // check if this html element is marked as markdown
+      // if so, it's contents should be parsed as markdown
+      if (left.search(/\bmarkdown\b/) !== -1) {
+        txt = left + globals.converter.makeHtml(match) + right;
+      }
+      return '\n\n~K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\n\n';
+    };
+
+  for (var i = 0; i < blockTags.length; ++i) {
+    text = showdown.helper.replaceRecursiveRegExp(text, repFunc, '^(?: |\\t){0,3}<' + blockTags[i] + '\\b[^>]*>', '</' + blockTags[i] + '>', 'gim');
+  }
+
+  // HR SPECIAL CASE
+  text = text.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,
+    showdown.subParser('hashElement')(text, options, globals));
+
+  // Special case for standalone HTML comments:
+  text = text.replace(/(<!--[\s\S]*?-->)/g,
+    showdown.subParser('hashElement')(text, options, globals));
+
+  // PHP and ASP-style processor instructions (<?...?> and <%...%>)
+  text = text.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,
+    showdown.subParser('hashElement')(text, options, globals));
+  return text;
+});
+
+/**
+ * Hash span elements that should not be parsed as markdown
+ */
+showdown.subParser('hashHTMLSpans', function (text, config, globals) {
+  'use strict';
+
+  var matches = showdown.helper.matchRecursiveRegExp(text, '<code\\b[^>]*>', '</code>', 'gi');
+
+  for (var i = 0; i < matches.length; ++i) {
+    text = text.replace(matches[i][0], '~L' + (globals.gHtmlSpans.push(matches[i][0]) - 1) + 'L');
+  }
+  return text;
+});
+
+/**
+ * Unhash HTML spans
+ */
+showdown.subParser('unhashHTMLSpans', function (text, config, globals) {
+  'use strict';
+
+  for (var i = 0; i < globals.gHtmlSpans.length; ++i) {
+    text = text.replace('~L' + i + 'L', globals.gHtmlSpans[i]);
+  }
+
+  return text;
+});
+
+/**
+ * Hash span elements that should not be parsed as markdown
+ */
+showdown.subParser('hashPreCodeTags', function (text, config, globals) {
+  'use strict';
+
+  var repFunc = function (wholeMatch, match, left, right) {
+    // encode html entities
+    var codeblock = left + showdown.subParser('encodeCode')(match) + right;
+    return '\n\n~G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\n\n';
+  };
+
+  text = showdown.helper.replaceRecursiveRegExp(text, repFunc, '^(?: |\\t){0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>', '^(?: |\\t){0,3}</code>\\s*</pre>', 'gim');
+  return text;
+});
+
+showdown.subParser('headers', function (text, options, globals) {
+  'use strict';
+
+  text = globals.converter._dispatch('headers.before', text, options, globals);
+
+  var prefixHeader = options.prefixHeaderId,
+      headerLevelStart = (isNaN(parseInt(options.headerLevelStart))) ? 1 : parseInt(options.headerLevelStart),
+
+  // Set text-style headers:
+  //	Header 1
+  //	========
+  //
+  //	Header 2
+  //	--------
+  //
+      setextRegexH1 = (options.smoothLivePreview) ? /^(.+)[ \t]*\n={2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n=+[ \t]*\n+/gm,
+      setextRegexH2 = (options.smoothLivePreview) ? /^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n-+[ \t]*\n+/gm;
+
+  text = text.replace(setextRegexH1, function (wholeMatch, m1) {
+
+    var spanGamut = showdown.subParser('spanGamut')(m1, options, globals),
+        hID = (options.noHeaderId) ? '' : ' id="' + headerId(m1) + '"',
+        hLevel = headerLevelStart,
+        hashBlock = '<h' + hLevel + hID + '>' + spanGamut + '</h' + hLevel + '>';
+    return showdown.subParser('hashBlock')(hashBlock, options, globals);
+  });
+
+  text = text.replace(setextRegexH2, function (matchFound, m1) {
+    var spanGamut = showdown.subParser('spanGamut')(m1, options, globals),
+        hID = (options.noHeaderId) ? '' : ' id="' + headerId(m1) + '"',
+        hLevel = headerLevelStart + 1,
+      hashBlock = '<h' + hLevel + hID + '>' + spanGamut + '</h' + hLevel + '>';
+    return showdown.subParser('hashBlock')(hashBlock, options, globals);
+  });
+
+  // atx-style headers:
+  //  # Header 1
+  //  ## Header 2
+  //  ## Header 2 with closing hashes ##
+  //  ...
+  //  ###### Header 6
+  //
+  text = text.replace(/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm, function (wholeMatch, m1, m2) {
+    var span = showdown.subParser('spanGamut')(m2, options, globals),
+        hID = (options.noHeaderId) ? '' : ' id="' + headerId(m2) + '"',
+        hLevel = headerLevelStart - 1 + m1.length,
+        header = '<h' + hLevel + hID + '>' + span + '</h' + hLevel + '>';
+
+    return showdown.subParser('hashBlock')(header, options, globals);
+  });
+
+  function headerId(m) {
+    var title, escapedId = m.replace(/[^\w]/g, '').toLowerCase();
+
+    if (globals.hashLinkCounts[escapedId]) {
+      title = escapedId + '-' + (globals.hashLinkCounts[escapedId]++);
+    } else {
+      title = escapedId;
+      globals.hashLinkCounts[escapedId] = 1;
+    }
+
+    // Prefix id to prevent causing inadvertent pre-existing style matches.
+    if (prefixHeader === true) {
+      prefixHeader = 'section';
+    }
+
+    if (showdown.helper.isString(prefixHeader)) {
+      return prefixHeader + title;
+    }
+    return title;
+  }
+
+  text = globals.converter._dispatch('headers.after', text, options, globals);
+  return text;
+});
+
+/**
+ * Turn Markdown image shortcuts into <img> tags.
+ */
+showdown.subParser('images', function (text, options, globals) {
+  'use strict';
+
+  text = globals.converter._dispatch('images.before', text, options, globals);
+
+  var inlineRegExp    = /!\[(.*?)]\s?\([ \t]*()<?(\S+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(['"])(.*?)\6[ \t]*)?\)/g,
+      referenceRegExp = /!\[([^\]]*?)] ?(?:\n *)?\[(.*?)]()()()()()/g;
+
+  function writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title) {
+
+    var gUrls   = globals.gUrls,
+        gTitles = globals.gTitles,
+        gDims   = globals.gDimensions;
+
+    linkId = linkId.toLowerCase();
+
+    if (!title) {
+      title = '';
+    }
+
+    if (url === '' || url === null) {
+      if (linkId === '' || linkId === null) {
+        // lower-case and turn embedded newlines into spaces
+        linkId = altText.toLowerCase().replace(/ ?\n/g, ' ');
+      }
+      url = '#' + linkId;
+
+      if (!showdown.helper.isUndefined(gUrls[linkId])) {
+        url = gUrls[linkId];
+        if (!showdown.helper.isUndefined(gTitles[linkId])) {
+          title = gTitles[linkId];
+        }
+        if (!showdown.helper.isUndefined(gDims[linkId])) {
+          width = gDims[linkId].width;
+          height = gDims[linkId].height;
+        }
+      } else {
+        return wholeMatch;
+      }
+    }
+
+    altText = altText.replace(/"/g, '&quot;');
+    altText = showdown.helper.escapeCharacters(altText, '*_', false);
+    url = showdown.helper.escapeCharacters(url, '*_', false);
+    var result = '<img src="' + url + '" alt="' + altText + '"';
+
+    if (title) {
+      title = title.replace(/"/g, '&quot;');
+      title = showdown.helper.escapeCharacters(title, '*_', false);
+      result += ' title="' + title + '"';
+    }
+
+    if (width && height) {
+      width  = (width === '*') ? 'auto' : width;
+      height = (height === '*') ? 'auto' : height;
+
+      result += ' width="' + width + '"';
+      result += ' height="' + height + '"';
+    }
+
+    result += ' />';
+    return result;
+  }
+
+  // First, handle reference-style labeled images: ![alt text][id]
+  text = text.replace(referenceRegExp, writeImageTag);
+
+  // Next, handle inline images:  ![alt text](url =<width>x<height> "optional title")
+  text = text.replace(inlineRegExp, writeImageTag);
+
+  text = globals.converter._dispatch('images.after', text, options, globals);
+  return text;
+});
+
+showdown.subParser('italicsAndBold', function (text, options, globals) {
+  'use strict';
+
+  text = globals.converter._dispatch('italicsAndBold.before', text, options, globals);
+
+  if (options.literalMidWordUnderscores) {
+    //underscores
+    // Since we are consuming a \s character, we need to add it
+    text = text.replace(/(^|\s|>|\b)__(?=\S)([\s\S]+?)__(?=\b|<|\s|$)/gm, '$1<strong>$2</strong>');
+    text = text.replace(/(^|\s|>|\b)_(?=\S)([\s\S]+?)_(?=\b|<|\s|$)/gm, '$1<em>$2</em>');
+    //asterisks
+    text = text.replace(/(\*\*)(?=\S)([^\r]*?\S[*]*)\1/g, '<strong>$2</strong>');
+    text = text.replace(/(\*)(?=\S)([^\r]*?\S)\1/g, '<em>$2</em>');
+
+  } else {
+    // <strong> must go first:
+    text = text.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g, '<strong>$2</strong>');
+    text = text.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g, '<em>$2</em>');
+  }
+
+  text = globals.converter._dispatch('italicsAndBold.after', text, options, globals);
+  return text;
+});
+
+/**
+ * Form HTML ordered (numbered) and unordered (bulleted) lists.
+ */
+showdown.subParser('lists', function (text, options, globals) {
+  'use strict';
+
+  text = globals.converter._dispatch('lists.before', text, options, globals);
+  /**
+   * Process the contents of a single ordered or unordered list, splitting it
+   * into individual list items.
+   * @param {string} listStr
+   * @param {boolean} trimTrailing
+   * @returns {string}
+   */
+  function processListItems (listStr, trimTrailing) {
+    // The $g_list_level global keeps track of when we're inside a list.
+    // Each time we enter a list, we increment it; when we leave a list,
+    // we decrement. If it's zero, we're not in a list anymore.
+    //
+    // We do this because when we're not inside a list, we want to treat
+    // something like this:
+    //
+    //    I recommend upgrading to version
+    //    8. Oops, now this line is treated
+    //    as a sub-list.
+    //
+    // As a single paragraph, despite the fact that the second line starts
+    // with a digit-period-space sequence.
+    //
+    // Whereas when we're inside a list (or sub-list), that line will be
+    // treated as the start of a sub-list. What a kludge, huh? This is
+    // an aspect of Markdown's syntax that's hard to parse perfectly
+    // without resorting to mind-reading. Perhaps the solution is to
+    // change the syntax rules such that sub-lists must start with a
+    // starting cardinal number; e.g. "1." or "a.".
+    globals.gListLevel++;
+
+    // trim trailing blank lines:
+    listStr = listStr.replace(/\n{2,}$/, '\n');
+
+    // attacklab: add sentinel to emulate \z
+    listStr += '~0';
+
+    var rgx = /(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,
+        isParagraphed = (/\n[ \t]*\n(?!~0)/.test(listStr));
+
+    listStr = listStr.replace(rgx, function (wholeMatch, m1, m2, m3, m4, taskbtn, checked) {
+      checked = (checked && checked.trim() !== '');
+      var item = showdown.subParser('outdent')(m4, options, globals),
+          bulletStyle = '';
+
+      // Support for github tasklists
+      if (taskbtn && options.tasklists) {
+        bulletStyle = ' class="task-list-item" style="list-style-type: none;"';
+        item = item.replace(/^[ \t]*\[(x|X| )?]/m, function () {
+          var otp = '<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';
+          if (checked) {
+            otp += ' checked';
+          }
+          otp += '>';
+          return otp;
+        });
+      }
+      // m1 - Leading line or
+      // Has a double return (multi paragraph) or
+      // Has sublist
+      if (m1 || (item.search(/\n{2,}/) > -1)) {
+        item = showdown.subParser('githubCodeBlocks')(item, options, globals);
+        item = showdown.subParser('blockGamut')(item, options, globals);
+      } else {
+        // Recursion for sub-lists:
+        item = showdown.subParser('lists')(item, options, globals);
+        item = item.replace(/\n$/, ''); // chomp(item)
+        if (isParagraphed) {
+          item = showdown.subParser('paragraphs')(item, options, globals);
+        } else {
+          item = showdown.subParser('spanGamut')(item, options, globals);
+        }
+      }
+      item =  '\n<li' + bulletStyle + '>' + item + '</li>\n';
+      return item;
+    });
+
+    // attacklab: strip sentinel
+    listStr = listStr.replace(/~0/g, '');
+
+    globals.gListLevel--;
+
+    if (trimTrailing) {
+      listStr = listStr.replace(/\s+$/, '');
+    }
+
+    return listStr;
+  }
+
+  /**
+   * Check and parse consecutive lists (better fix for issue #142)
+   * @param {string} list
+   * @param {string} listType
+   * @param {boolean} trimTrailing
+   * @returns {string}
+   */
+  function parseConsecutiveLists(list, listType, trimTrailing) {
+    // check if we caught 2 or more consecutive lists by mistake
+    // we use the counterRgx, meaning if listType is UL we look for UL and vice versa
+    var counterRxg = (listType === 'ul') ? /^ {0,2}\d+\.[ \t]/gm : /^ {0,2}[*+-][ \t]/gm,
+      subLists = [],
+      result = '';
+
+    if (list.search(counterRxg) !== -1) {
+      (function parseCL(txt) {
+        var pos = txt.search(counterRxg);
+        if (pos !== -1) {
+          // slice
+          result += '\n\n<' + listType + '>' + processListItems(txt.slice(0, pos), !!trimTrailing) + '</' + listType + '>\n\n';
+
+          // invert counterType and listType
+          listType = (listType === 'ul') ? 'ol' : 'ul';
+          counterRxg = (listType === 'ul') ? /^ {0,2}\d+\.[ \t]/gm : /^ {0,2}[*+-][ \t]/gm;
+
+          //recurse
+          parseCL(txt.slice(pos));
+        } else {
+          result += '\n\n<' + listType + '>' + processListItems(txt, !!trimTrailing) + '</' + listType + '>\n\n';
+        }
+      })(list);
+      for (var i = 0; i < subLists.length; ++i) {
+
+      }
+    } else {
+      result = '\n\n<' + listType + '>' + processListItems(list, !!trimTrailing) + '</' + listType + '>\n\n';
+    }
+
+    return result;
+  }
+
+  // attacklab: add sentinel to hack around khtml/safari bug:
+  // http://bugs.webkit.org/show_bug.cgi?id=11231
+  text += '~0';
+
+  // Re-usable pattern to match any entire ul or ol list:
+  var wholeList = /^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;
+
+  if (globals.gListLevel) {
+    text = text.replace(wholeList, function (wholeMatch, list, m2) {
+      var listType = (m2.search(/[*+-]/g) > -1) ? 'ul' : 'ol';
+      return parseConsecutiveLists(list, listType, true);
+    });
+  } else {
+    wholeList = /(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;
+    //wholeList = /(\n\n|^\n?)( {0,3}([*+-]|\d+\.)[ \t]+[\s\S]+?)(?=(~0)|(\n\n(?!\t| {2,}| {0,3}([*+-]|\d+\.)[ \t])))/g;
+    text = text.replace(wholeList, function (wholeMatch, m1, list, m3) {
+
+      var listType = (m3.search(/[*+-]/g) > -1) ? 'ul' : 'ol';
+      return parseConsecutiveLists(list, listType);
+    });
+  }
+
+  // attacklab: strip sentinel
+  text = text.replace(/~0/, '');
+
+  text = globals.converter._dispatch('lists.after', text, options, globals);
+  return text;
+});
+
+/**
+ * Remove one level of line-leading tabs or spaces
+ */
+showdown.subParser('outdent', function (text) {
+  'use strict';
+
+  // attacklab: hack around Konqueror 3.5.4 bug:
+  // "----------bug".replace(/^-/g,"") == "bug"
+  text = text.replace(/^(\t|[ ]{1,4})/gm, '~0'); // attacklab: g_tab_width
+
+  // attacklab: clean up hack
+  text = text.replace(/~0/g, '');
+
+  return text;
+});
+
+/**
+ *
+ */
+showdown.subParser('paragraphs', function (text, options, globals) {
+  'use strict';
+
+  text = globals.converter._dispatch('paragraphs.before', text, options, globals);
+  // Strip leading and trailing lines:
+  text = text.replace(/^\n+/g, '');
+  text = text.replace(/\n+$/g, '');
+
+  var grafs = text.split(/\n{2,}/g),
+      grafsOut = [],
+      end = grafs.length; // Wrap <p> tags
+
+  for (var i = 0; i < end; i++) {
+    var str = grafs[i];
+    // if this is an HTML marker, copy it
+    if (str.search(/~(K|G)(\d+)\1/g) >= 0) {
+      grafsOut.push(str);
+    } else {
+      str = showdown.subParser('spanGamut')(str, options, globals);
+      str = str.replace(/^([ \t]*)/g, '<p>');
+      str += '</p>';
+      grafsOut.push(str);
+    }
+  }
+
+  /** Unhashify HTML blocks */
+  end = grafsOut.length;
+  for (i = 0; i < end; i++) {
+    var blockText = '',
+        grafsOutIt = grafsOut[i],
+        codeFlag = false;
+    // if this is a marker for an html block...
+    while (grafsOutIt.search(/~(K|G)(\d+)\1/) >= 0) {
+      var delim = RegExp.$1,
+          num   = RegExp.$2;
+
+      if (delim === 'K') {
+        blockText = globals.gHtmlBlocks[num];
+      } else {
+        // we need to check if ghBlock is a false positive
+        if (codeFlag) {
+          // use encoded version of all text
+          blockText = showdown.subParser('encodeCode')(globals.ghCodeBlocks[num].text);
+        } else {
+          blockText = globals.ghCodeBlocks[num].codeblock;
+        }
+      }
+      blockText = blockText.replace(/\$/g, '$$$$'); // Escape any dollar signs
+
+      grafsOutIt = grafsOutIt.replace(/(\n\n)?~(K|G)\d+\2(\n\n)?/, blockText);
+      // Check if grafsOutIt is a pre->code
+      if (/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(grafsOutIt)) {
+        codeFlag = true;
+      }
+    }
+    grafsOut[i] = grafsOutIt;
+  }
+  text = grafsOut.join('\n\n');
+  // Strip leading and trailing lines:
+  text = text.replace(/^\n+/g, '');
+  text = text.replace(/\n+$/g, '');
+  return globals.converter._dispatch('paragraphs.after', text, options, globals);
+});
+
+/**
+ * Run extension
+ */
+showdown.subParser('runExtension', function (ext, text, options, globals) {
+  'use strict';
+
+  if (ext.filter) {
+    text = ext.filter(text, globals.converter, options);
+
+  } else if (ext.regex) {
+    // TODO remove this when old extension loading mechanism is deprecated
+    var re = ext.regex;
+    if (!re instanceof RegExp) {
+      re = new RegExp(re, 'g');
+    }
+    text = text.replace(re, ext.replace);
+  }
+
+  return text;
+});
+
+/**
+ * These are all the transformations that occur *within* block-level
+ * tags like paragraphs, headers, and list items.
+ */
+showdown.subParser('spanGamut', function (text, options, globals) {
+  'use strict';
+
+  text = globals.converter._dispatch('spanGamut.before', text, options, globals);
+  text = showdown.subParser('codeSpans')(text, options, globals);
+  text = showdown.subParser('escapeSpecialCharsWithinTagAttributes')(text, options, globals);
+  text = showdown.subParser('encodeBackslashEscapes')(text, options, globals);
+
+  // Process anchor and image tags. Images must come first,
+  // because ![foo][f] looks like an anchor.
+  text = showdown.subParser('images')(text, options, globals);
+  text = showdown.subParser('anchors')(text, options, globals);
+
+  // Make links out of things like `<http://example.com/>`
+  // Must come after _DoAnchors(), because you can use < and >
+  // delimiters in inline links like [this](<url>).
+  text = showdown.subParser('autoLinks')(text, options, globals);
+  text = showdown.subParser('encodeAmpsAndAngles')(text, options, globals);
+  text = showdown.subParser('italicsAndBold')(text, options, globals);
+  text = showdown.subParser('strikethrough')(text, options, globals);
+
+  // Do hard breaks:
+  text = text.replace(/  +\n/g, ' <br />\n');
+
+  text = globals.converter._dispatch('spanGamut.after', text, options, globals);
+  return text;
+});
+
+showdown.subParser('strikethrough', function (text, options, globals) {
+  'use strict';
+
+  if (options.strikethrough) {
+    text = globals.converter._dispatch('strikethrough.before', text, options, globals);
+    text = text.replace(/(?:~T){2}([\s\S]+?)(?:~T){2}/g, '<del>$1</del>');
+    text = globals.converter._dispatch('strikethrough.after', text, options, globals);
+  }
+
+  return text;
+});
+
+/**
+ * Strip any lines consisting only of spaces and tabs.
+ * This makes subsequent regexs easier to write, because we can
+ * match consecutive blank lines with /\n+/ instead of something
+ * contorted like /[ \t]*\n+/
+ */
+showdown.subParser('stripBlankLines', function (text) {
+  'use strict';
+  return text.replace(/^[ \t]+$/mg, '');
+});
+
+/**
+ * Strips link definitions from text, stores the URLs and titles in
+ * hash references.
+ * Link defs are in the form: ^[id]: url "optional title"
+ *
+ * ^[ ]{0,3}\[(.+)\]: // id = $1  attacklab: g_tab_width - 1
+ * [ \t]*
+ * \n?                  // maybe *one* newline
+ * [ \t]*
+ * <?(\S+?)>?          // url = $2
+ * [ \t]*
+ * \n?                // maybe one newline
+ * [ \t]*
+ * (?:
+ * (\n*)              // any lines skipped = $3 attacklab: lookbehind removed
+ * ["(]
+ * (.+?)              // title = $4
+ * [")]
+ * [ \t]*
+ * )?                 // title is optional
+ * (?:\n+|$)
+ * /gm,
+ * function(){...});
+ *
+ */
+showdown.subParser('stripLinkDefinitions', function (text, options, globals) {
+  'use strict';
+
+  var regex = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?(\S+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=~0))/gm;
+
+  // attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
+  text += '~0';
+
+  text = text.replace(regex, function (wholeMatch, linkId, url, width, height, blankLines, title) {
+    linkId = linkId.toLowerCase();
+    globals.gUrls[linkId] = showdown.subParser('encodeAmpsAndAngles')(url);  // Link IDs are case-insensitive
+
+    if (blankLines) {
+      // Oops, found blank lines, so it's not a title.
+      // Put back the parenthetical statement we stole.
+      return blankLines + title;
+
+    } else {
+      if (title) {
+        globals.gTitles[linkId] = title.replace(/"|'/g, '&quot;');
+      }
+      if (options.parseImgDimensions && width && height) {
+        globals.gDimensions[linkId] = {
+          width:  width,
+          height: height
+        };
+      }
+    }
+    // Completely remove the definition from the text
+    return '';
+  });
+
+  // attacklab: strip sentinel
+  text = text.replace(/~0/, '');
+
+  return text;
+});
+
+showdown.subParser('tables', function (text, options, globals) {
+  'use strict';
+
+  if (!options.tables) {
+    return text;
+  }
+
+  var tableRgx = /^[ \t]{0,3}\|?.+\|.+\n[ \t]{0,3}\|?[ \t]*:?[ \t]*(?:-|=){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:-|=){2,}[\s\S]+?(?:\n\n|~0)/gm;
+
+  function parseStyles(sLine) {
+    if (/^:[ \t]*--*$/.test(sLine)) {
+      return ' style="text-align:left;"';
+    } else if (/^--*[ \t]*:[ \t]*$/.test(sLine)) {
+      return ' style="text-align:right;"';
+    } else if (/^:[ \t]*--*[ \t]*:$/.test(sLine)) {
+      return ' style="text-align:center;"';
+    } else {
+      return '';
+    }
+  }
+
+  function parseHeaders(header, style) {
+    var id = '';
+    header = header.trim();
+    if (options.tableHeaderId) {
+      id = ' id="' + header.replace(/ /g, '_').toLowerCase() + '"';
+    }
+    header = showdown.subParser('spanGamut')(header, options, globals);
+
+    return '<th' + id + style + '>' + header + '</th>\n';
+  }
+
+  function parseCells(cell, style) {
+    var subText = showdown.subParser('spanGamut')(cell, options, globals);
+    return '<td' + style + '>' + subText + '</td>\n';
+  }
+
+  function buildTable(headers, cells) {
+    var tb = '<table>\n<thead>\n<tr>\n',
+        tblLgn = headers.length;
+
+    for (var i = 0; i < tblLgn; ++i) {
+      tb += headers[i];
+    }
+    tb += '</tr>\n</thead>\n<tbody>\n';
+
+    for (i = 0; i < cells.length; ++i) {
+      tb += '<tr>\n';
+      for (var ii = 0; ii < tblLgn; ++ii) {
+        tb += cells[i][ii];
+      }
+      tb += '</tr>\n';
+    }
+    tb += '</tbody>\n</table>\n';
+    return tb;
+  }
+
+  text = globals.converter._dispatch('tables.before', text, options, globals);
+
+  text = text.replace(tableRgx, function (rawTable) {
+
+    var i, tableLines = rawTable.split('\n');
+
+    // strip wrong first and last column if wrapped tables are used
+    for (i = 0; i < tableLines.length; ++i) {
+      if (/^[ \t]{0,3}\|/.test(tableLines[i])) {
+        tableLines[i] = tableLines[i].replace(/^[ \t]{0,3}\|/, '');
+      }
+      if (/\|[ \t]*$/.test(tableLines[i])) {
+        tableLines[i] = tableLines[i].replace(/\|[ \t]*$/, '');
+      }
+    }
+
+    var rawHeaders = tableLines[0].split('|').map(function (s) { return s.trim();}),
+        rawStyles = tableLines[1].split('|').map(function (s) { return s.trim();}),
+        rawCells = [],
+        headers = [],
+        styles = [],
+        cells = [];
+
+    tableLines.shift();
+    tableLines.shift();
+
+    for (i = 0; i < tableLines.length; ++i) {
+      if (tableLines[i].trim() === '') {
+        continue;
+      }
+      rawCells.push(
+        tableLines[i]
+          .split('|')
+          .map(function (s) {
+            return s.trim();
+          })
+      );
+    }
+
+    if (rawHeaders.length < rawStyles.length) {
+      return rawTable;
+    }
+
+    for (i = 0; i < rawStyles.length; ++i) {
+      styles.push(parseStyles(rawStyles[i]));
+    }
+
+    for (i = 0; i < rawHeaders.length; ++i) {
+      if (showdown.helper.isUndefined(styles[i])) {
+        styles[i] = '';
+      }
+      headers.push(parseHeaders(rawHeaders[i], styles[i]));
+    }
+
+    for (i = 0; i < rawCells.length; ++i) {
+      var row = [];
+      for (var ii = 0; ii < headers.length; ++ii) {
+        if (showdown.helper.isUndefined(rawCells[i][ii])) {
+
+        }
+        row.push(parseCells(rawCells[i][ii], styles[ii]));
+      }
+      cells.push(row);
+    }
+
+    return buildTable(headers, cells);
+  });
+
+  text = globals.converter._dispatch('tables.after', text, options, globals);
+
+  return text;
+});
+
+/**
+ * Swap back in all the special characters we've hidden.
+ */
+showdown.subParser('unescapeSpecialChars', function (text) {
+  'use strict';
+
+  text = text.replace(/~E(\d+)E/g, function (wholeMatch, m1) {
+    var charCodeToReplace = parseInt(m1);
+    return String.fromCharCode(charCodeToReplace);
+  });
+  return text;
+});
+module.exports = showdown;

+ 15 - 0
Component/img-box/index.acss

@@ -0,0 +1,15 @@
+.img-name{
+  width: 80rpx;
+  height: 80rpx;
+  border-radius: 100%;
+  background: #26A2FF;
+  color: #fff;
+  text-align: center;
+  line-height: 80rpx;
+  font-size: 28rpx;
+}
+.img-url{
+  width: 80rpx;
+  height: 80rpx;
+  border-radius: 100%;
+}

+ 8 - 0
Component/img-box/index.axml

@@ -0,0 +1,8 @@
+<view>
+  <view a:if="{{imgUrl}}"  style="width:{{width}};height:{{height}}">
+    <image class="img-url" style="width:{{width}};height:{{height}}" mode="scaleToFill" src="{{imgUrl}}"/>
+  </view>
+  <view a:else  style="width:{{width}};height:{{height}}">
+    <view class="img-name" style="width:{{width}};height:{{height}};line-height:{{height}};font-size:{{fSize}}">{{userName}}</view>
+  </view>
+</view>

+ 46 - 0
Component/img-box/index.js

@@ -0,0 +1,46 @@
+var app = getApp()
+Component({
+  mixins: [],
+  data: {
+    userName:'',
+  },
+  props: {
+      name:'未定义',
+      id:'',
+      imgUrl:'',
+      width:'',
+      height:'',
+      fSize:'',
+  },
+  //为渲染后回调,此时页面已经渲染,通常在这里请求服务端数据比较合适。
+  didMount() {
+      this.setName();
+  },
+  //为更新后回调,每次组件数据变更的时候都会调用。
+  didUpdate() {
+    
+  },
+  //为删除后回调,每当组件示例从页面删除的时候会触发此回调。
+  didUnmount() {
+
+  },
+  methods: {
+    setName(){
+          var str=this.props.name;
+          var name=str.substr(str.length-2);
+          let userImg=this.props.imgUrl;
+          if(this.props.id&&app.globalData.usersList.length>0&&!userImg){
+              app.globalData.usersList.some(item=>{
+                if(this.props.id==item.id){
+                  userImg=item.img_url
+                  return true
+                }
+              })
+          }
+          this.setData({
+            userName:name,
+            imgUrl:userImg
+          })
+    }
+  },
+});

+ 3 - 0
Component/img-box/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 12 - 0
Component/noData/noData.acss

@@ -0,0 +1,12 @@
+.nodata{
+  font-size: 28rpx;
+  color: #909399;
+}
+.nodata image{
+  width: 340rpx;
+  height: 340rpx;
+}
+.nodata .content2{
+  margin-bottom: 20rpx;
+  text-align: center
+}

+ 6 - 0
Component/noData/noData.axml

@@ -0,0 +1,6 @@
+<view>
+  <view class="flex-box-v flex-center-center  nodata">
+    <image mode="scaleToFill" src="../../../image/noData.png"/>
+    <view class="content2">{{content}}</view>
+  </view>
+</view>

+ 11 - 0
Component/noData/noData.js

@@ -0,0 +1,11 @@
+Component({
+  mixins: [],
+  data: {},
+  props: {
+    content:'暂无内容'
+  },
+  didMount() {},
+  didUpdate() {},
+  didUnmount() {},
+  methods: {},
+});

+ 3 - 0
Component/noData/noData.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 33 - 0
Component/process/process.acss

@@ -0,0 +1,33 @@
+.process-title{
+  padding:16rpx 32rpx;
+  background: #fff;
+}
+.process-title text:nth-child(1){
+  font-size: 36rpx;
+  color: #222;
+  font-weight: 600;
+}
+.process-title text:nth-child(2){
+  color: #909399;
+  font-weight: 500;
+  padding-left: 20rpx;
+  font-size: 32rpx;
+}
+.process-bottom{
+  padding:16rpx 32rpx;
+  background: #fff;
+}
+.process-bottom-right{
+  margin-left: 10rpx;
+}
+.process-name{
+  margin-right: 20rpx;
+}
+.process-date{
+  font-size: 24rpx;
+  color: #909399;
+  padding: 4rpx 0;
+}
+.process-context{
+  font-size: 28rpx;
+}

+ 27 - 0
Component/process/process.axml

@@ -0,0 +1,27 @@
+<view>
+  <view class="process-title border-bottom flex-box flex-flex-v-ce">
+      <text>审批</text><text>多人审批时,以最后一人为准</text>
+  </view>
+  <view class="process-bottom">
+    <view class="flex-box" style="position: relative;" a:for="{{process}}">
+      <view class="imgBox" a:if="{{(index+1)!=process.length}}"></view>
+      <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="80rpx" width="80rpx"></img-box>
+      <view class="process-bottom-right flex-1">
+        <view class="flex-box flex-v-ce names">
+          <text class="process-name">{{item.name}}</text>
+          <text class="fontColorF" a:if="{{item.remark == '申请人'||item.remark == '发起'}}">{{item.remark}}</text>
+          <text class="yellow" a:if="{{item.remark == '待审核'}}">{{item.remark}}</text>
+          <text class="green" a:if="{{item.remark == '审核通过'}}">{{item.remark}}</text>
+          <text class="red" a:if="{{item.remark == '审核驳回'}}">{{item.remark}}</text>
+          <text style="color:#FF9600" class="state" a:if="{{item.remark == '待处理'}}">{{item.remark}}</text>
+          <text style="color:#F56C6C" a:if="{{item.remark == '驳回'}}">{{item.remark}}</text>
+          <text class="flex-1"></text>
+          <text a:if="{{item.review_point&&item.review_point>0}}">+{{item.review_point}}</text>
+          <text a:if="{{item.review_point&&item.review_point<0}}">{{item.review_point}}</text>
+        </view>
+        <view class="process-date">{{item.time}}</view>
+        <view class="process-context" a:if="{{item.remark!='申请人'}}">{{item.review_remark}}</view>
+      </view>
+    </view>
+  </view>
+</view>

+ 11 - 0
Component/process/process.js

@@ -0,0 +1,11 @@
+Component({
+  mixins: [],
+  data: {},
+  props: {
+    process:[]
+  },
+  didMount() {},
+  didUpdate() {},
+  didUnmount() {},
+  methods: {},
+});

+ 6 - 0
Component/process/process.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "img-box": "/Component/img-box/index"
+  }
+}

+ 62 - 0
Component/selectDate/selectDate.acss

@@ -0,0 +1,62 @@
+.all-date{
+  overflow: hidden;
+  height: 100vh;
+  position: fixed;
+  left: 0;
+  right:0;
+  top:80rpx;
+  z-index: 5;
+  /* background-color: rgba(0,0,0,.7); */
+}
+.date-header{
+  background-color: #fff;
+  z-index: 3;
+  box-shadow:inset 0px 0px 5px #ccc;
+  padding-top: 28rpx;
+  position: fixed;
+  left: 0;
+  right: 0;
+  z-index: 8;
+}
+.date-bottom{
+    animation-duration: 0.2s;
+    background-color: rgba(0,0,0,.7);
+    height: 100%;
+}
+.selectDateType{
+  width: 200rpx;
+  margin: 0rpx auto;
+  border: 1px solid #26a2ff;
+  border-radius: 6rpx;
+  text-align: center;
+}
+.selectDateType view{
+  padding: 4rpx 0;
+}
+.selectDateType .dateActive{
+  background-color: #26a2ff;
+  color: #fff;
+}
+.date-btn view{
+  text-align: center;
+  padding: 20rpx 0;
+}
+.date-btn view:nth-child(1){
+  background-color: #f1f1f1;
+}
+.date-btn view:nth-child(2){
+  background-color: #26a2ff;
+  color: #fff;
+}
+.data-main{
+  margin: 32rpx 0;
+  text-align: center;
+}
+
+.data-main .dateVal{
+  color: #26a2ff;
+  width: 200rpx;
+  padding: 16rpx 0;
+  border-bottom: 1px solid #26a2ff;
+  display: inline-block;
+}

+ 26 - 0
Component/selectDate/selectDate.axml

@@ -0,0 +1,26 @@
+<view class="all-date">
+  <view class="data-tier" catchTap="onClose"></view>
+  <view class="date-header {{isShow?'showPop':''}}" >
+    <view class="flex-box selectDateType">
+      <view a:if="{{notDate}}" data-index="1" class="{{dateIndex == 1 ? 'dateActive':''}} flex-1" catchTap="activeDate">月</view>
+      <view data-index="2" class="{{dateIndex == 2 ? 'dateActive':''}} flex-1" catchTap="activeDate">日</view>
+    </view>
+    <view class="data-main">
+        <block a:if="{{dateIndex==1}}">
+            <text class="dateVal" onTap="selectDate">{{month}}</text>
+        </block>
+        <block a:else>
+            <view class="flex-box flex-center-center">
+               <text class="dateVal" onTap="selectDay">{{startDay}}</text>
+               <text class="fontColorT" style="margin:0 20rpx;">至</text>
+               <text class="dateVal" onTap="selectDay2">{{endDay}}</text>
+            </view>
+        </block>
+    </view>
+    <view class="flex-box date-btn">
+      <view class="flex-1" catchTap="onClose">取消</view>
+      <view class="flex-1" catchTap="onConfirm">确定</view>
+    </view>
+  </view>
+  <view class="meng" catchTap="onClose"></view>
+</view>

+ 112 - 0
Component/selectDate/selectDate.js

@@ -0,0 +1,112 @@
+var app = getApp()
+var that;
+Component({
+  mixins: [],
+  data: {
+    dateIndex: 1,
+    month: app.globalData.month,//月
+    startDay: app.globalData.day,
+    endDay: app.globalData.day,
+    
+  },
+  props: {
+    onClose: (data) => console.log(data),
+    onConfirm:(data) => console.log(data),
+    defaultDate:{type:"1",date:app.globalData.month},
+    notDate:true,
+  },
+  didMount() {
+    if(!this.props.defaultDate){
+           this.setData({
+              dateIndex:"2",
+          })
+    }
+    if(this.props.defaultDate.type==1){
+          this.setData({
+              dateIndex:"1",
+              month:this.props.defaultDate.date,
+              isShow:this.props.isShow
+          })
+    }else{
+          this.setData({
+              dateIndex:"2",
+              startDay:this.props.defaultDate.date[0],
+              endDay:this.props.defaultDate.date[1],
+              isShow:this.props.isShow
+          })
+    }
+  },
+  didUpdate() { },
+  didUnmount() { },
+  methods: {
+    onConfirm(){
+        var obj;
+        if (this.data.startDay > this.data.endDay) {
+          app.globalData.showToast("开始时间不能大于结束时间")
+          return false;
+        }else{
+            if(this.data.dateIndex==1){
+                obj={
+                  type:this.data.dateIndex,
+                  date:this.data.month
+                }
+            }else{
+                obj={
+                  type:this.data.dateIndex,
+                  date:[this.data.startDay,this.data.endDay]
+                }
+            }
+            this.props.onConfirm(obj);
+            this.props.onClose();
+        }
+    },
+    onClose(){
+      this.props.onClose();
+    },
+    selectDay() {
+      dd.datePicker({
+        format: 'yyyy-MM-dd',
+        currentDate: this.data.startDay,
+        success: (res) => {
+          this.setData({
+            startDay: res.date,
+            //  endDay: res.date
+          })
+        },
+      });
+    },
+    selectDay2() {
+      dd.datePicker({
+        format: 'yyyy-MM-dd',
+        currentDate: this.data.endDay,
+        success: (res) => {
+          if (res.date < this.data.startDay) {
+            app.globalData.showToast("结束时间不能小于开始时间")
+            this.setData({
+              endDay: this.data.startDay
+            })
+            return false;
+          }
+          this.setData({
+            endDay: res.date
+          })
+        },
+      });
+    },
+    activeDate(e) {
+      this.setData({ dateIndex: e.target.dataset.index })
+    },
+    selectDate() {
+      dd.datePicker({
+        format: 'yyyy-MM',
+        currentDate: this.data.month,
+        success: (res) => {
+          this.setData({
+            month: res.date
+          })
+        },
+      });
+    },
+
+  },
+});

+ 3 - 0
Component/selectDate/selectDate.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 64 - 0
Component/selectDate_two/selectDate_two.acss

@@ -0,0 +1,64 @@
+.all-date{
+  overflow: hidden;
+  height: 100vh;
+  position: fixed;
+  left: 0;
+  right:0;
+  top:80rpx;
+  z-index: 5;
+  /* background-color: rgba(0,0,0,.7); */
+}
+.date-header{
+  background-color: #fff;
+  z-index: 3;
+  box-shadow:inset 0px 0px 5px #ccc;
+  padding-top: 28rpx;
+    position: fixed;
+  left: 0;
+  right: 0;
+  z-index: 8;
+}
+.date-bottom{
+    animation-duration: 0.2s;
+    background-color: rgba(0,0,0,.7);
+    height: 100%;
+}
+.selectDateType{
+  width: 400rpx;
+  margin: 0rpx auto;
+  border: 1px solid #26a2ff;
+  border-radius: 6rpx;
+  text-align: center;
+}
+.selectDateType view{
+  padding: 4rpx 0;
+  width: 100rpx;
+  text-align: center;
+}
+.selectDateType .dateActive{
+  background-color: #26a2ff;
+  color: #fff;
+}
+.date-btn view{
+  text-align: center;
+  padding: 20rpx 0;
+}
+.date-btn view:nth-child(1){
+  background-color: #f1f1f1;
+}
+.date-btn view:nth-child(2){
+  background-color: #26a2ff;
+  color: #fff;
+}
+.data-main{
+  margin: 32rpx 0;
+  text-align: center;
+}
+
+.data-main .dateVal{
+  color: #26a2ff;
+  width: 200rpx;
+  padding: 16rpx 0;
+  border-bottom: 1px solid #26a2ff;
+  display: inline-block;
+}

+ 64 - 0
Component/selectDate_two/selectDate_two.axml

@@ -0,0 +1,64 @@
+<view class="all-date">
+  <view class="data-tier" catchTap="onClose"></view>
+  <view class="date-header {{isShow?'showPop':''}}">
+    <view class="flex-box selectDateType">
+      <block a:if="{{showSelect}}">
+        <view data-index="1" a:if="{{dateIndex == '1'}}" class="{{dateIndex == '1' ? 'dateActive':''}} flex-1" catchTap="activeDate">年</view>
+        <view data-index="2" a:if="{{dateIndex == '2'}}" class="{{dateIndex == '2' ? 'dateActive':''}} flex-1" catchTap="activeDate">季度</view>
+        <view data-index="3" a:if="{{dateIndex == '3'}}" class="{{dateIndex == '3' ? 'dateActive':''}} flex-1" catchTap="activeDate">月</view>
+      </block>
+      <block a:else>
+        <view data-index="1"  class="{{dateIndex == '1' ? 'dateActive':''}} flex-1" catchTap="activeDate">年</view>
+        <view data-index="2"  class="{{dateIndex == '2' ? 'dateActive':''}} flex-1" catchTap="activeDate">季度</view>
+        <view data-index="3"  class="{{dateIndex == '3' ? 'dateActive':''}} flex-1" catchTap="activeDate">月</view>
+        <view data-index="4"  class="{{dateIndex == '4' ? 'dateActive':''}} flex-1" catchTap="activeDate">自定义</view>
+      </block>
+    </view>
+    <view class="data-main">
+      <block a:if="{{dateIndex=='1'}}">
+        <picker onChange="selectYear" value="{{yearIndex}}" range="{{yearArr}}">
+          <view class="dateVal">{{yearArr[yearIndex]}}</view>
+        </picker>
+        <!--<text class="dateVal" onTap="selectYear">{{year}}</text> -->
+      </block>
+      <block a:if="{{dateIndex=='3'}}">
+        <text class="dateVal" onTap="selectDate">{{month}}</text>
+      </block>
+      <block a:if="{{dateIndex=='2'}}">
+        <view class="flex-box flex-center-center">
+          <picker onChange="selectYear2" value="{{jdYearIndex}}" range="{{yearArr}}">
+            <view class="dateVal">{{yearArr[jdYearIndex]}}</view>
+          </picker>
+          <!--<text class="dateVal" onTap="selectDay">{{jdYear}}</text> -->
+          <text class="fontColorT" style="margin:0 20rpx;">--</text>
+          <picker onChange="setjdji" value="{{jdji}}" range="{{jdArr}}">
+            <view class="dateVal">{{jdArr[jdji]}}</view>
+          </picker>
+          <!--<text class="dateVal" onTap="selectDay2">{{jdji}}</text> -->
+        </view>
+      </block>
+
+      
+      <block a:if="{{dateIndex=='4'}}">
+        <text data-index="customIndOn" class="dateVal" onTap="customDate">{{customIndOn}}</text>
+        <text class="fontColorT" style="margin:0 20rpx;">--</text>
+        <text data-index="customIndTw" class="dateVal" onTap="customDate">{{customIndTw}}</text>
+        <!-- <view class="flex-box flex-center-center">
+          <picker onChange="selectYear2" value="{{customIndOn}}" range="{{customArr}}">
+            <view class="dateVal">{{customArr[customInd]}}</view>
+          </picker>
+          <text class="fontColorT" style="margin:0 20rpx;">--</text>
+          <picker onChange="setjdji" value="{{customIndOnTw}}" range="{{customArr}}">
+            <view class="dateVal">{{customArr[jdji]}}</view>
+          </picker>
+        </view> -->
+      </block>
+
+    </view>
+    <view class="flex-box date-btn">
+      <view class="flex-1" catchTap="onClose">取消</view>
+      <view class="flex-1" catchTap="onConfirm">确定</view>
+    </view>
+  </view>
+  <view class="meng" catchTap="onClose"></view>
+</view>

+ 196 - 0
Component/selectDate_two/selectDate_two.js

@@ -0,0 +1,196 @@
+var app = getApp()
+var that,yearIndex;
+// 设置默认年份
+app.globalData.yearArr.forEach((item,index)=>{
+    if(item==app.globalData.year){
+     yearIndex=index
+  }
+})
+Component({
+  mixins: [],
+  data: {
+    dateIndex: "1",
+    day: app.globalData.day,//日
+    year: app.globalData.year,//年
+    month: app.globalData.month,//月
+    jdYear: app.globalData.year,//季度年
+    jdji: 0,//季度季
+    jdArr: ['一季度', '二季度', '三季度', '四季度'],
+    yearIndex:yearIndex,
+    yearArr:app.globalData.yearArr,
+    jdYearIndex:yearIndex,
+    isShowArr:[true,true,true],
+    showSelect:false,
+    customIndOn: app.globalData.day,
+    customIndTw: app.globalData.day,
+    // custom: '',
+  },
+  props: {
+    onClose: (data) => console.log(data),
+    onConfirm: (data) => console.log(data),
+    showSelectP:false,
+    dateObj:{
+      type:'3',
+      date:app.globalData.month
+    },
+  },
+  didMount() {
+    this.setData({isShow: this.props.isShow,showSelect:this.props.showSelectP})
+    if(this.props.dateObj.type){
+      this.setData({
+        dateIndex:this.props.dateObj.type,
+      })
+      if(this.props.dateObj.type==1){
+          this.data.yearArr.forEach((item,index)=>{
+            if(this.props.dateObj.date==item){
+                this.setData({
+                  yearIndex:index,
+                })
+            }
+          })
+      }else if(this.props.dateObj.type==2){
+          var data=String(this.props.dateObj.date);
+          this.data.yearArr.forEach((item,index)=>{
+            if(data.substr(0,4)==item){
+                this.setData({
+                  jdYearIndex:index,
+                })
+            }
+          })
+          this.setData({
+            jdji:data.substr(data.length-1,1)-1
+          })
+      }else if(this.props.dateObj.type==4){
+          this.setData({
+            customIndOn: this.props.dateObj.date.start_date,
+            customIndTw: this.props.dateObj.date.end_date,
+          })
+      }else{
+          this.setData({
+            month:this.props.dateObj.date,
+          })
+      }
+    }
+  },
+  didUpdate() { },
+  didUnmount() { },
+  methods: {
+    selectYear2(e) {
+      this.setData({
+        jdYearIndex: e.detail.value,
+      });
+    },
+    selectYear(e) {
+      this.setData({
+        yearIndex: e.detail.value,
+      });
+    },
+    setjdji(e) {
+      this.setData({
+        jdji: e.detail.value,
+      });
+    },
+    onConfirm() {
+      var obj;
+      switch (this.data.dateIndex) {
+        case "1":
+          obj = {
+            type: this.data.dateIndex,
+            date: this.data.yearArr[this.data.yearIndex]
+          }
+          break
+        case "2":
+          var year=this.data.yearArr[this.data.jdYearIndex];
+          var num=this.data.jdji;
+          num++;
+          let arrNew=new Array()
+          arrNew.push(year)
+          arrNew.push(num)
+          let strNew=arrNew.join('')
+          obj = {
+            type: this.data.dateIndex,
+            date:parseInt(strNew)
+          }
+          break
+        case "3":
+          obj = {
+            type: this.data.dateIndex,
+            date: this.data.month
+          }
+          break
+        case "4":
+          function tsTamp(ydm) {
+            return new Date(ydm).getTime()
+          }
+          let timeC = (tsTamp(this.data.customIndOn) - tsTamp(this.data.customIndTw)) / (60 * 60 * 24 * 1000)
+          console.log(timeC)
+          if(timeC > 0){
+            app.globalData.showToast("开始时间不能大于结束时间")
+            return
+          }
+          if(Math.abs(timeC) > 30) {
+            app.globalData.showToast("自定义事件区间不能大于一个月")
+            return
+          }
+          obj = {
+            type: this.data.dateIndex,
+            date: {
+              start_date: this.data.customIndOn,
+              end_date: this.data.customIndTw
+            }
+          }
+          break
+      };
+      this.props.onConfirm(obj);
+      this.props.onClose();
+
+    },
+    onClose() {
+      this.props.onClose();
+    },
+    selectDay() {
+      dd.datePicker({
+        format: 'yyyy',
+        currentDate: this.data.jdYear,
+        success: (res) => {
+          this.setData({
+            jdYear: res.date
+          })
+        },
+      });
+    },
+    selectDay2() {
+
+    },
+    selectDate() {
+      dd.datePicker({
+        format: 'yyyy-MM',
+        currentDate: this.data.month,
+        success: (res) => {
+          this.setData({
+            month: res.date
+          })
+        },
+      });
+    },
+    customDate(e) {
+      console.log(e)
+      let cust = e.target.dataset.index
+      dd.datePicker({
+        format: 'yyyy-MM-dd',
+        currentDate: this.data[cust],
+        success : res =>{
+          console.log(res)
+          this.setData({
+            [cust]: res.date
+          })
+        },
+      })
+    },
+    
+    activeDate(e) {
+      this.setData({ dateIndex: e.target.dataset.index })
+    },
+
+  },
+});

+ 3 - 0
Component/selectDate_two/selectDate_two.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 196 - 0
Component/selectEnevt/selectEnevt.acss

@@ -0,0 +1,196 @@
+
+.all{
+  background-color: #fff;
+  height: 100%;
+  margin-top: 40rpx;
+  border-radius: 20rpx 20rpx 0 0; 
+  padding-top: 80rpx;
+  z-index:3
+}
+.close{
+  position: absolute;
+  right: 10rpx !important;
+  top: 50rpx !important;
+  padding: 20rpx;
+}
+.close image{
+  width: 40rpx;
+  height: 40rpx;
+}
+.search{
+    background-color: #f1f1f1;
+    border-radius: 6rpx;
+    width: 80%;
+    margin: 0 auto;
+    padding:6rpx 10rpx;
+}
+.search input{
+    background-color: #f1f1f1;
+}
+.search image{
+  width: 30rpx;
+  height: 30rpx;
+  margin-left: 10rpx;
+}
+.content{
+    margin-top: 16rpx;
+    border-top: 1px solid #f1f1f1;
+    width: 100%;
+}
+.date-btn view{
+  text-align: center;
+  padding: 20rpx 0;
+}
+.date-btn view:nth-child(1){
+  background-color: #f1f1f1;
+}
+.date-btn view:nth-child(2){
+  background-color: #26a2ff;
+  color: #fff;
+}
+.data-main{
+  margin: 32rpx 0;
+  text-align: center;
+}
+
+.data-main .dateVal{
+  color: #26a2ff;
+  width: 200rpx;
+  padding: 16rpx 0;
+  border-bottom: 1px solid #26a2ff;
+  display: inline-block;
+}
+
+.ul2{
+  width: 100%;
+  background-color: #fff;
+  box-sizing: border-box;
+}
+.li{
+    padding:20rpx 24rpx;
+    border-bottom: 1px solid #f1f1f1;
+}
+.ul2 .li .xia{
+  color: #26A2FF !important;
+}
+.shu{
+  padding: 10rpx 24rpx;
+  background: #fff;
+  font-size: 28rpx;
+  color: #26A2FF;
+  border-bottom: 1px solid #f1f1f1;
+}
+.shu view:last-child{
+  color: #ccc;
+}
+
+/* 人员 */
+.scroll{
+  width: 100%;
+  background-color: #fff;
+  box-sizing: border-box;
+  height: calc(100vh - 320rpx);
+}
+.userItem{
+    padding:14rpx 24rpx;
+    border-bottom: 1px solid #f1f1f1;
+}
+.shu{
+  padding: 14rpx 24rpx;
+  background: #fff;
+  font-size: 28rpx;
+  color: #26A2FF;
+  border-bottom: 1px solid #f1f1f1;
+}
+.shu view:last-child{
+  color: #ccc;
+}
+.search{
+    background-color: #f1f1f1;
+    border-radius: 10rpx;
+    margin: 0 32rpx;
+    padding:8rpx 10rpx;
+}
+
+.search image{
+  width: 30rpx;
+  height: 30rpx;
+  margin-left: 10rpx;
+}
+.StaffFooter{
+  position: fixed;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: #fff;
+  padding: 10rpx;
+  border-top: 1px solid #f1f1f1;
+}
+
+.staffBtn{
+    background: #26A2FF;
+    color: #fff;
+    border-radius: 6rpx;
+    height: 88rpx;
+    text-align: center;
+    line-height: 88rpx;
+    padding: 0 20rpx;
+}
+.f-left{
+  overflow-x: auto;
+}
+.rule-all-text{
+  font-size: 28rpx;
+  color: #999;
+  position: relative;
+  right: 10rpx;
+  bottom: 5rpx;
+}
+.staff-all{
+  background: rgba(245, 247, 250, 1);
+  padding: 16rpx 32rpx;
+}
+.enevt_li{
+  padding:0.2rem 0.24rem;
+  border-bottom:1px solid rgb(241, 241, 241)
+}
+.main-right{
+  margin-left: 10rpx;
+}
+.main-right .name{
+  padding-top:12rpx;
+  font-size: 36rpx;
+}
+.main-right .context{
+    overflow : hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    -webkit-box-orient: vertical;
+    padding-top: 10rpx;
+    margin-bottom: 10rpx;
+}
+.main-right .date{
+   color: #909399;
+}
+.item{
+  padding: 10rpx 0;
+}
+.item .flex-2{
+    padding-left: 28rpx; 
+}
+.users{
+  margin-left: 20rpx;
+}
+.num{
+  font-size: 28rpx;
+  color: #909399;
+}
+.index{
+  width: 90rpx;
+  text-align: center;
+}
+.index image{
+  width: 40rpx;
+  height: 40rpx;
+}

+ 40 - 0
Component/selectEnevt/selectEnevt.axml

@@ -0,0 +1,40 @@
+<view class="all">
+  <view class="close">
+      <image mode="scaleToFill" catchTap="onClose"  src="../../../image/close.png"/>
+  </view>
+  <form onReset="onReset">
+    <view class="search flex-box flex-v-ce">
+      <image mode="scaleToFill" src="../../../image/ss.png"></image>
+      <input placeholder="请输入姓名或事件内容搜索" onInput="bindKeyInput" class="flex-1" value="{{keyVal}}"></input>
+      <button a:if="{{isVal}}" class="delVal" formType="reset">×</button>
+    </view>
+  </form>
+  <view class="content">
+    <scroll-view class="scroll" a:if="{{list.length>0}}" scroll-y="{{true}}" onScrollToLower="onScrollToLower">
+      <radio-group class="radio-group" onChange="radioChange" name="lib">
+        <label  class="flex-box enevt_li border-bottom" a:for="{{list}}" key="label-{{index}}">
+          <img-box name="{{item.employee_name}}" imgUrl="{{item.employee_img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
+          <view class="flex-1 main-right">
+            <view class="flex-box flex-v-ce">
+              <view class="name flex-1">{{item.employee_name}}</view>
+              <view class="red da" a:if="{{item.point>0}}">+{{item.point}}{{item.ptObj.name}}</view>
+              <view class="green da" a:else>{{item.point}}{{item.ptObj.name}}</view>
+            </view>
+            <view class="flex-box flex-v-ce">
+              <view class="context flex-1" a:if="{{item.remark}}">{{item.remark}}</view>
+              <radio value="{{item}}" checked="{{item.checked}}"/>
+            </view>
+            <view class="flex-box flex-v-ce">
+              <view class="date flex-1">{{item.event_time}}</view>
+            </view>
+          </view>
+        </label  >
+        <view class="noDatas" a:if="{{isData}}">没有更多咯</view>
+      </radio-group>
+    </scroll-view>
+    <no-data a:if="{{list.length==0}}"></no-data>
+  </view>
+  <view class="StaffFooter flex-box-end">
+    <view class="staffBtn" onTap="onConfirm">确定</view>
+  </view>
+</view>

+ 90 - 0
Component/selectEnevt/selectEnevt.js

@@ -0,0 +1,90 @@
+var app = getApp()
+var that;
+Component({
+  data: {
+    list: [],//人员集合
+    isData:'',
+    page:1,
+    selectEnevt:{},
+    keyVal:'',
+  },
+  props: {
+    onClose: (data) => console.log(data),
+    onConfirm: (data) => console.log(data),
+    defaultEnevt: '',
+    defaultVal:'',
+  },
+  didMount() {
+    that = this;
+    this.setData({ keyVal: this.props.defaultVal,isVal:this.props.defaultVal? true:false })
+    that.getlist();
+  },
+  methods: {
+    radioChange: function(e) {
+      this.setData({
+        selectEnevt:e.detail.value
+      })
+    },
+    onReset() {
+      this.setData({
+        isVal: false,
+        keyVal: ''
+      })
+      that.getlist();
+    },
+    onConfirm() {
+      this.props.onConfirm(this.data.selectEnevt,this.data.keyVal);
+      this.onClose();
+    },
+    //搜索
+    bindKeyInput(e) {
+      this.setData({
+        keyVal: e.detail.value,
+        isVal: e.detail.value ? true : false
+      })
+      that.getlist();
+    },
+    //关闭
+    onClose(e) {
+      this.props.onClose();
+    },
+    //获取事件列表
+    getlist(is) {
+      app.$get('api/integral/statistics/integral', {page:that.data.page, keyword:that.data.keyVal, page_size: 20}).then((res) => {
+        var data = res.data.data.list;
+        data.map((item) => {
+          item.ptObj = app.getTypesItem(item.pt_id);
+          item.checked=false;
+          if(item.id==that.props.defaultEnevt){
+            item.checked=true;
+          }
+        })
+        if (is) {
+          if (data.length == 0) {
+            this.setData({
+              isData: true
+            })
+            return;
+          }
+          var list = that.data.list;
+          this.setData({
+            list: list.concat(data)
+          })
+        } else {
+          this.setData({ list: [] });
+          this.setData({
+            list: data,
+            isData: false
+          })
+        }
+      })
+    },
+    //上啦加载
+    onScrollToLower() {
+      if (!that.data.isData) {
+        this.setData({ page: ++that.data.page })
+        this.getlist(true);
+      }
+    },
+  },
+});

+ 7 - 0
Component/selectEnevt/selectEnevt.json

@@ -0,0 +1,7 @@
+{
+  "component": true,
+    "usingComponents": {
+    "img-box": "/Component/img-box/index",
+    "no-data": "/Component/noData/noData"
+  }
+}

+ 89 - 0
Component/selectRule/selectRule.acss

@@ -0,0 +1,89 @@
+
+.all{
+  background-color: #fff;
+  height: 100%;
+  margin-top: 40rpx;
+  border-radius: 20rpx 20rpx 0 0; 
+  padding-top: 80rpx;
+  z-index: 999
+}
+.close{
+  position: absolute;
+  right: 10rpx !important;
+  top: 50rpx !important;
+  padding: 20rpx;
+}
+.close image{
+  width: 40rpx;
+  height: 40rpx;
+}
+.left{
+  background: #f1f1f1;
+  height: calc(100vh - 212rpx);
+}
+.left .yi{
+  padding: 20rpx 24rpx;
+  position: relative;
+}
+.left .er{
+  border-bottom: 1px solid #f1f1f1;
+  background-color: #fff;
+  padding: 20rpx  0rpx;
+  padding-left: 40rpx;
+  position: relative;
+}
+.left .active::before{
+    position: absolute;
+    content: " ";
+    width: 6rpx;
+    height: 22rpx;
+    background: #26A2FF;
+    left: 10rpx;
+    top:50%;
+    margin-top: -11rpx;
+}
+.left .itemActive{
+  color: #26A2FF;
+}
+.right{
+   height: calc(100vh - 212rpx);
+}
+.search{
+    background-color: #f1f1f1;
+    border-radius: 6rpx;
+    width: 80%;
+    margin: 0 auto;
+    padding:6rpx 10rpx;
+}
+.search input{
+    background-color: #f1f1f1;
+}
+.search image{
+  width: 30rpx;
+  height: 30rpx;
+  margin-left: 10rpx;
+}
+.content{
+    margin-top: 16rpx;
+    border-top: 1px solid #f1f1f1;
+}
+.radio{
+  width: 80rpx;
+  text-align: center;
+  box-sizing: border-box;
+}
+.items{
+  padding: 14rpx;
+  border-bottom: 1px solid #f1f1f1;
+}
+.num{
+  font-size: 28rpx;
+}
+.items-top{
+  padding:20rpx 28rpx;
+  border-bottom: 1px solid #f1f1f1;
+}
+.nodata{
+  text-align: center;
+  padding: 40rpx;
+}

+ 71 - 0
Component/selectRule/selectRule.axml

@@ -0,0 +1,71 @@
+<view class="all">
+  <view class="close">
+    <image mode="scaleToFill" catchTap="plusOne" src="../../../image/close.png"/>
+  </view>
+  <form onReset="onReset">
+    <view class="search flex-box flex-v-ce">
+      <image mode="scaleToFill" src="../../../image/ss.png"/>
+      <input placeholder="请输入规则内容搜索" onInput="bindKeyInput" class="flex-1"/>
+      <button a:if="{{isVal}}" class="delVal" formType="reset">×</button>
+    </view>
+  </form>
+  <view class="flex-box content">
+    <scroll-view class="flex-2 left" scroll-y="{{true}}" a:if="{{isItem}}">
+      <view style="height: 100%">
+        <view class="tree" a:for="{{rule_tree}}">
+          <view class="{{item.id == activeIndex ? 'active':''}} yi" catchTap="activeTree" data-item="{{item}}">{{item.name}}</view>
+          <view catchTap="activeItem" data-item="{{child}}" class="{{child.id == activeItemIndex ? 'itemActive':''}} er" a:if="{{item.child&&item.child.length>0&&item.id == activeIndex}}" a:for="{{item.child}}" a:for-index="idx" a:for-item="child">
+              {{child.name}}
+          </view>
+        </view>
+      </view>
+    </scroll-view>
+    <scroll-view class="flex-5 right" scroll-y="{{true}}" a:if="{{isItem}}">
+      <view a:if="{{item_child_list.length>0}}">
+        <view class="flex-box flex-v-ce items-top" a:for="{{item_child_list}}" catchTap="openDetail" data-item="{{item}}">
+          <view class="flex-1" data-item="{{item}}">{{item.name}}</view>
+          <image mode="scaleToFill" src="../../../image/right.png" style="width: 26rpx;height: 26rpx;"/>
+        </view>
+      </view>
+      <view>
+        <radio-group class="radio-group" onChange="radioChange">
+          <label class="flex-box flex-v-ce items" a:for="{{item_list}}">
+            <view class="radio">
+              <radio value="{{item}}" checked="{{item.checked}}"/>{{item.value}}</view>
+            <view class="radio-right flex-1">
+              <view>{{item.remark}}</view>
+              <view class="red num" a:if="{{item.min_point>0}}">+{{(item.range_type == 1 ? item.min_point : item.min_point +' ~ '+ item.max_point)}}
+                <text class="fontColorT" style="margin-left:10rpx">{{item.pt_Obj.name}}</text></view>
+              <view class="green num" a:if="{{item.min_point<0}}">{{(item.range_type == 1 ? item.min_point : item.min_point+' ~ '+item.max_point)}}
+                <text class="fontColorT" style="margin-left:10rpx">{{item.pt_Obj.name}}</text></view>
+            </view>
+          </label>
+        </radio-group>
+        <view a:if="{{item_list.length==0}}" class="nodata fontColorF">
+          <view>
+            <image mode="scaleToFill" src="../../../image/noData.png" style="width: 340rpx;height: 340rpx;margin-bottom:20rpx;"/>
+          </view>
+          <text a:if="{{isCreator}}">暂无积分规则,请前往钉钉电脑端添加【积分规则】</text>
+          <text a:else>暂无积分规则,请联系主管理员“{{creatorName}}”或积分管理员前往钉钉电脑添加【积分规则】</text>
+        </view>
+      </view>
+    </scroll-view>
+    <scroll-view class="flex-5 right" scroll-y="{{true}}" a:else>
+      <radio-group class="radio-group" onChange="radioChange" a:if="{{selectItem.length>0}}">
+        <label class="flex-box flex-v-ce items" a:for="{{selectItem}}">
+          <view class="radio">
+            <radio value="{{item}}" checked="{{item.checked}}"/>{{item.value}}</view>
+          <view class="radio-right flex-1">
+            <view>{{item.remark}}</view>
+            <view class="green num" a:if="{{item.min_point<0}}">{{(item.range_type == 1 ? item.min_point : item.min_point+' ~ '+item.max_point)}}
+              <text class="fontColorT" style="margin-left:10rpx">{{item.pt_Obj.name}}</text></view>
+            <view class="red num" a:if="{{item.min_point>0}}">+{{(item.range_type == 1 ? item.min_point : item.min_point+' ~ '+item.max_point)}}
+              <text class="fontColorT" style="margin-left:10rpx">{{item.pt_Obj.name}}</text></view>
+          </view>
+        </label>
+      </radio-group>
+      <view a:else class="nodata fontColorT">暂无积分规则,请前往钉钉电脑端添加【积分规则】</view>
+      </view>
+    </scroll-view>
+  </view>
+</view>

+ 152 - 0
Component/selectRule/selectRule.js

@@ -0,0 +1,152 @@
+var app = getApp()
+var that;
+Component({
+  mixins: [],
+  data: {
+    allItems:[],
+    item_list: {},
+    rule_tree: {},
+    types:'',
+    activeIndex:'',//一级索引
+    activeItemIndex:'',//二级索引
+    item_child_list:[],//子数据集合
+    isItem:true,//判断是否显示左侧
+    selectItem:[],//选择的数据
+    isCreator:false,
+    creatorName:'',
+  },
+  props: {
+    onClose: (data) => console.log(data),
+    onConfirm:(data) => console.log(data),
+    isGzType:'',
+    defaultId:'',//默认选中
+  },
+  didMount() {
+    that = this;
+    this.setData({types:app.globalData.types,isCreator: app.globalData.isCreator,creatorName:app.globalData.corpMessage.creators})
+    this.getData();
+  },
+  didUpdate() { },
+  didUnmount() { },
+  methods: {
+    onReset(){
+      this.setData({
+          selectItem: [],
+          isItem:true,
+          isVal:false
+      })
+    },
+    //搜索
+    bindKeyInput(e) {
+        var item_list=this.data.allItems;
+        var items=item_list.filter((item)=>{
+            return item.remark.indexOf(e.detail.value) >= 0
+        });
+        this.setData({
+          selectItem: items,
+          isItem:e.detail.value? false:true,
+          isVal:e.detail.value? true:false
+        })
+    },
+    //点击一级
+    activeTree(e){
+      var item=e.target.dataset.item
+      var item_list=this.data.allItems;
+      if(item.id==this.data.activeIndex){
+        this.setData({
+          activeIndex:'',
+          item_child_list:[],
+          item_list: item_list,
+          activeItemIndex:'',
+        })
+        return false;
+      }
+      this.setData({item_child_list:[]});
+      if(item.child&&item.child.length>0){
+          // this.setData({
+          //   activeItemIndex:item.child[0].id
+          // })
+        // if(item.child[0].child&&item.child[0].child.length>0){
+        //   this.setData({
+        //     item_child_list:item.child[0].child
+        //   })
+        // }
+      }
+      this.setData({
+        activeIndex:item.id
+      })
+      this.getItem(item.id);
+    },
+    //点击二级
+    activeItem(e){
+      var item=e.target.dataset.item
+      this.setData({
+        activeItemIndex:item.id,
+        item_list:[]
+      });
+      if(item.child&&item.child.length>0){
+          this.setData({
+            item_child_list:item.child
+          })
+      }else{
+          this.setData({
+            item_child_list:[]
+          })
+      }
+     this.getItem(item.id);
+    },
+    openDetail(e){
+        var id=e.target.dataset.item.id;
+        this.setData({
+          activeItemIndex:id,
+          item_child_list:e.target.dataset.item.child
+        });
+        this.getItem(id);
+    },
+    getItem(id){
+        var item_list=this.data.allItems;
+        var items=item_list.filter((item)=>{return item.rule_id==id});
+        that.setData({
+          item_list: items,
+        })
+    },
+    radioChange: function (e) {
+      this.props.onConfirm(e.detail.value);
+      this.plusOne();
+    },
+    getData() {
+      var pt_id,typeObj;
+      if(that.props.isGzType){
+        typeObj=app.getTypesItem(that.props.isGzType);
+        pt_id=typeObj.id;
+      }
+      app.$get2("api/integral/rule/trees", { pt_id: pt_id,cycle_type: 1 }).then((res)=>{
+        var item_list = res.data.data.item_list
+        var rule_tree = res.data.data.rule_tree
+        var list = []
+        for (let i in item_list) {
+          for (let k in item_list[i]) {
+            item_list[i][k].pt_Obj=that.props.isGzType? typeObj:app.getTypesItem(item_list[i][k].pt_id);
+            list.push(item_list[i][k])
+          }
+        }
+        if(this.props.defaultId){
+          list.map(item=>{
+            if(this.props.defaultId==item.id){
+              item.checked=true;
+            }
+          })
+        }
+        that.setData({
+          item_list: list,
+          rule_tree:rule_tree,
+          allItems:list,
+        })
+      })
+    },
+    //关闭
+    plusOne(e) {
+      this.props.onClose();
+    },
+  },
+});

+ 3 - 0
Component/selectRule/selectRule.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 106 - 0
Component/selectRule_two/selectRule_two.acss

@@ -0,0 +1,106 @@
+.all-date{
+  overflow: hidden;
+  height: 100vh;
+  position: fixed;
+  left: 0;
+  right:0;
+  top:80rpx;
+  z-index: 5;
+  /* background-color: rgba(0,0,0,.7); */
+}
+.date-header{
+  background-color: #fff;
+  box-shadow:inset 0px 0px 5px #ccc;
+  padding-top: 28rpx;
+  margin-top: 0rpx;
+  transform: translateY(-100%);
+  position: fixed;
+  left: 0;
+  right: 0;
+  z-index: 8;
+}
+.date-bottom{
+    animation-duration: 0.2s;
+    background-color: rgba(0,0,0,.7);
+    height: 100%;
+}
+
+.date-btn view{
+  text-align: center;
+  padding: 20rpx 0;
+}
+.date-btn view:nth-child(1){
+  background-color: #f1f1f1;
+}
+.date-btn view:nth-child(2){
+  background-color: #26a2ff;
+  color: #fff;
+}
+.data-main{
+  margin: 32rpx 0;
+  text-align: center;
+}
+
+.data-main .dateVal{
+  color: #26a2ff;
+  width: 200rpx;
+  padding: 16rpx 0;
+  border-bottom: 1px solid #26a2ff;
+  display: inline-block;
+}
+
+
+.all2{
+  background-color: #fff;
+  height: 100%;
+  margin-top: 40rpx;
+  border-radius: 50rpx 50rpx 0 0; 
+  padding-top: 80rpx;
+  z-index: 999
+}
+.close{
+  width: 40rpx;
+  height: 40rpx;
+  position: absolute;
+  right: 30rpx;
+  top: 70rpx;
+}
+
+.search{
+    background-color: #f1f1f1;
+    border-radius: 20rpx;
+    width: 80%;
+    margin: 0 auto;
+    padding:6rpx 10rpx;
+}
+.search input{
+    background-color: #f1f1f1;
+}
+.search image{
+  width: 30rpx;
+  height: 30rpx;
+  margin-left: 10rpx;
+}
+.ul{
+  background-color: #fff;
+  height: 500rpx;
+}
+.li2{
+    height: 100rpx;
+    border-bottom: 1px solid #f1f1f1;
+}
+.ul .li2 .xia{
+  padding-right: 24rpx;
+  color: #26A2FF !important;
+}
+.shu{
+  padding: 14rpx 24rpx;
+  background: #fff;
+  font-size: 28rpx;
+  color: #26A2FF;
+  border-bottom: 1px solid #f1f1f1;
+}
+.shu view:last-child{
+  color: #ccc;
+}
+

+ 39 - 0
Component/selectRule_two/selectRule_two.axml

@@ -0,0 +1,39 @@
+<view class="all-date">
+  <view class="data-tier" catchTap="onClose"></view>
+  <view class="date-header {{isShow?'showPop':''}}">
+    <view>
+      <view class="flex-box flex-v-ce shu" a:if="{{terr.length>1}}">
+        <view a:for="{{terr}}" class="flex-box flex-v-ce flex-d-wrap" data-index="{{index}}" catchTap="activeItem" data-item="{{item}}">
+          <image mode="scaleToFill" src="../../../image/right.png" style="width:20rpx;height:20rpx;margin:0 6rpx;" a:if="{{index!=0}}"/> {{item.name}}
+        </view>
+      </view>
+
+      <scroll-view class="ul" scroll-y="{{true}}">
+          <view class="flex-box flex-v-ce li2" a:for="{{rule_tree}}">
+            <view  class="{{item.id==activeId? 'active':''}} flex-box flex-v-ce flex-1"  data-item="{{item}}"   catchTap="radioChange">
+              <view class="radio_"></view>
+              <view class="font-flex-word">{{item.name}}</view>
+            </view>
+            <view class="xia" data-item="{{item}}" catchTap="openDown" a:if="{{item.child.length>0}}">| 下级</view>
+          </view>
+      </scroll-view>
+
+      <!-- <scroll-view class="ul" scroll-y="{{true}}">
+        <radio-group class="radio-group" onChange="radioChange">
+          <view class="flex-box flex-v-ce li" a:for="{{rule_tree}}" a:key="{{item.id}}">
+            <label class="flex-box flex-v-ce" style="width:88%;height:56rpx">
+              <radio checked="{{item.checked}}" value="{{item}}" name="{{item.id}}"/>
+              <view class="font-flex-word" style="margin-left:10rpx;width:90%">{{item.name}}</view>
+            </label>
+            <view class="xia" data-item="{{item}}" catchTap="openDown" a:if="{{item.child.length>0}}">| 下级</view>
+          </view>
+        </radio-group>
+      </scroll-view> -->
+    </view>
+    <view class="flex-box date-btn">
+      <view class="flex-1" catchTap="onClose">取消</view>
+      <view class="flex-1" catchTap="onConfirm">确定</view>
+    </view>
+  </view>
+  <view class="meng" catchTap="onClose"></view>
+</view>

+ 93 - 0
Component/selectRule_two/selectRule_two.js

@@ -0,0 +1,93 @@
+var app = getApp()
+var that;
+Component({
+  mixins: [],
+  data: {
+    all_rule_list: [],
+    isShow: false,
+    terr: [
+      { name: '全部', id: 0 }
+    ],
+    rule_tree: [],
+    activeId:'',
+  },
+  props: {
+    onConfirm: (data) => console.log(data),
+    onClose: (data) => console.log(data),
+    defaultSection: '',
+  },
+  didMount() {
+    that = this;
+    this.setData({
+      isShow: this.props.isShow,
+      activeId:this.props.defaultSection,
+      terr: [{ name: '全部', id: 0 }],
+      selectTissue: { name: '全部分类', id: '' }
+    })
+    this.getData();
+  },
+  didUpdate() { },
+  didUnmount() { },
+  methods: {
+    onConfirm() {
+      this.props.onConfirm(this.data.selectTissue);
+      this.props.onClose();
+    },
+    //点击导航栏
+    activeItem(e) {
+      var item = e.target.dataset.item;
+      var index = e.target.dataset.index;
+      var terr = this.data.terr;
+      if ((index + 1) == terr.length) { return false };
+      this.setData({ rule_tree: [] });
+      if (index == 0) {
+        this.setData({
+          terr: [{ name: '全部', id: 0 }],
+          rule_tree: this.data.all_rule_list
+        })
+      } else {
+        var arr = terr.slice(0, index + 1);
+        this.setData({
+          rule_tree: item.child,
+          terr: arr
+        })
+      }
+    },
+    // 点击下一级
+    openDown(e) {
+      that.setData({ rule_tree:[]});
+      var item = e.target.dataset.item;
+      var terr = this.data.terr;
+      terr.push(item);
+      that.setData({
+        rule_tree: item.child,
+        terr: terr
+      })
+    },
+    radioChange: function (e) {
+      this.setData({
+        selectTissue: e.target.dataset.item,
+        activeId:e.target.dataset.item.id
+      })
+    },
+    getData() {
+      app.$get("api/integral/rule/trees", { pt_id: 3,cycle_type: 1 }).then((res) => {
+        var rule_tree = res.data.data.rule_tree;
+        rule_tree.unshift({
+          name:'全部分类',
+          id:'',
+          child:[]
+        })
+        that.setData({
+          rule_tree: rule_tree,
+          all_rule_list:rule_tree
+        })
+      })
+    },
+    
+    //关闭
+    onClose(e) {
+      this.props.onClose();
+    },
+  },
+});

+ 3 - 0
Component/selectRule_two/selectRule_two.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 109 - 0
Component/selectSection/selectSection.acss

@@ -0,0 +1,109 @@
+.all-date{
+  overflow: hidden;
+  height: 100vh;
+  position: fixed;
+  left: 0;
+  right:0;
+  top:80rpx;
+  z-index: 5;
+  /* background-color: rgba(0,0,0,.7); */
+}
+.date-header{
+  background-color: #fff;
+  box-shadow:inset 0px 0px 5px #ccc;
+  padding-top: 28rpx;
+  margin-top: 0rpx;
+  transform: translateY(-100%);
+  position: fixed;
+  left: 0;
+  right: 0;
+  z-index: 8;
+}
+.date-bottom{
+    animation-duration: 0.2s;
+    background-color: rgba(0,0,0,.7);
+    height: 100%;
+}
+
+.date-btn view{
+  text-align: center;
+  padding: 20rpx 0;
+}
+.date-btn view:nth-child(1){
+  background-color: #f1f1f1;
+}
+.date-btn view:nth-child(2){
+  background-color: #26a2ff;
+  color: #fff;
+}
+.data-main{
+  margin: 32rpx 0;
+  text-align: center;
+}
+
+.data-main .dateVal{
+  color: #26a2ff;
+  width: 200rpx;
+  padding: 16rpx 0;
+  border-bottom: 1px solid #26a2ff;
+  display: inline-block;
+}
+
+
+.all2{
+  background-color: #fff;
+  height: 100%;
+  margin-top: 40rpx;
+  border-radius: 50rpx 50rpx 0 0; 
+  padding-top: 80rpx;
+  z-index: 999
+}
+.close{
+  width: 40rpx;
+  height: 40rpx;
+  position: absolute;
+  right: 30rpx;
+  top: 70rpx;
+}
+
+.search{
+    background-color: #f1f1f1;
+    border-radius: 20rpx;
+    width: 80%;
+    margin: 0 auto;
+    padding:6rpx 10rpx;
+}
+.search input{
+    background-color: #f1f1f1;
+}
+.search image{
+  width: 30rpx;
+  height: 30rpx;
+  margin-left: 10rpx;
+}
+.ul{
+  background-color: #fff;
+  height: 500rpx;
+}
+.li2{
+    height: 100rpx;
+    border-bottom: 1px solid #f1f1f1;
+}
+.ul .li2 .xia{
+  color: #26A2FF !important;
+  padding-right: 24rpx
+}
+
+.shu{
+  padding: 14rpx 24rpx;
+  background: #fff;
+  font-size: 28rpx;
+  color: #26A2FF;
+  border-bottom: 1px solid #f1f1f1;
+}
+.shu view:last-child{
+  color: #ccc;
+}
+.images{
+  width:50rpx;height:50rpx; margin:0 10rpx
+}

+ 28 - 0
Component/selectSection/selectSection.axml

@@ -0,0 +1,28 @@
+<view class="all-date">
+  <view class="data-tier" catchTap="onClose"></view>
+  <view class="date-header {{isShow?'showPop':''}}">
+    <view>
+      <view class="flex-box flex-v-ce shu" a:if="{{terr.length>1}}">
+        <view a:for="{{terr}}" class="flex-box flex-v-ce flex-d-wrap" data-index="{{index}}" catchTap="activeItem" data-item="{{item}}">
+          <image mode="scaleToFill" src="../../../image/right.png" style="width:20rpx;height:20rpx;margin:0 6rpx;" a:if="{{index!=0}}"/>
+                {{item.name}}
+        </view>
+      </view>
+      <scroll-view class="ul" scroll-y="{{true}}">
+          <view class="flex-box flex-v-ce li2" a:for="{{rule_tree}}" a:key="{{index}}">
+            <view  class="{{item.id==activeId? 'active':''}} flex-box flex-v-ce flex-1"  data-item="{{item}}"   catchTap="radioChange">
+              <view class="radio_"></view>
+              <image  class="images" src="../../../image/BM.png"/>
+              <view class="font-flex-word">{{item.name}}</view>
+            </view>
+            <view class="xia" data-item="{{item}}" catchTap="openDown" a:if="{{item._child.length>0}}">| 下级</view>
+          </view>
+      </scroll-view>
+    </view>
+    <view class="flex-box date-btn">
+      <view class="flex-1" catchTap="onClose">取消</view>
+      <view class="flex-1" catchTap="onConfirm">确定</view>
+    </view>
+  </view>
+  <view class="meng" catchTap="onClose"></view>
+</view>

+ 103 - 0
Component/selectSection/selectSection.js

@@ -0,0 +1,103 @@
+var app = getApp()
+var that;
+Component({
+  mixins: [],
+  data: {
+    all_rule_list: {},
+    isShow:false,
+    terr:[
+      {name: '全部', id:0}
+    ],
+    rule_tree: [],
+    activeId:'',
+  },
+  props: {
+    onConfirm: (data) => console.log(data),
+    onClose:(data) => console.log(data),
+    defaultSection:'',
+  },
+  didMount() {
+    that = this;
+    this.setData({
+      isShow:this.props.isShow,
+      activeId:this.props.defaultSection,
+      terr:[{name: '全部', id:0}],
+      selectTissue:{name:'全公司',id:''}
+    })
+    this.getBmData();
+  },
+  didUpdate() { },
+  didUnmount() { },
+  methods: {
+    onConfirm(){
+        if(!this.data.selectTissue){
+          app.globalData.showToast("请选择部门");
+          return;
+        }
+        this.props.onConfirm(this.data.selectTissue);
+        this.props.onClose();
+    },
+    //点击导航栏
+    activeItem(e){
+       var item=e.target.dataset.item;
+       var index=e.target.dataset.index;
+       var terr=this.data.terr;
+      if((index+1)==terr.length){return false};
+      this.setData({ rule_tree:[]});
+      if(index==0){
+        this.setData({
+          terr:[{name: '全部', id:0}],
+          rule_tree:this.data.all_rule_list
+        })
+      }else{
+        var arr=terr.slice(0,index+1);
+        this.setData({
+          rule_tree:item._child,
+          terr:arr
+        })
+      }
+    },
+    // 点击下一级
+    openDown(e){
+      this.setData({ rule_tree:[]});
+       var item=e.target.dataset.item;
+       var terr=this.data.terr;
+       terr.push(item);
+       if(item._child.length>0){
+        item._child.map(item=>{
+          if(item.id==this.props.defaultSection){
+            item.checked=true;
+          }
+        }) 
+        that.setData({
+          rule_tree:item._child,
+          terr:terr
+        })
+       }
+    },
+    radioChange: function(e) {
+        this.setData({
+          selectTissue:e.target.dataset.item,
+          activeId:e.target.dataset.item.id,
+        })
+    },
+    //获取部门列表
+    getBmData() {
+      app.$get("api/department/tree", {}).then((res) => {
+        var list = res.data.data.list||[];
+        list.unshift({
+          name:'全公司',
+          id:''
+        })
+        this.setData({
+          rule_tree: list,
+          all_rule_list:list,
+        })
+      })
+    },
+    //关闭
+    onClose(e) {
+      this.props.onClose();
+    },
+  },
+});

+ 3 - 0
Component/selectSection/selectSection.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 66 - 0
Component/selectSectionBottom/selectSectionBottom.acss

@@ -0,0 +1,66 @@
+
+.all{
+  background-color: #fff;
+  height: 100%;
+  margin-top: 40rpx;
+  border-radius: 20rpx 20rpx 0 0; 
+  padding-top: 80rpx;
+  z-index:3
+}
+.close{
+  position: absolute;
+  right: 10rpx !important;
+  top: 50rpx !important;
+  padding: 20rpx;
+}
+.close image{
+  width: 40rpx;
+  height: 40rpx;
+}
+.content{
+    margin-top: 16rpx;
+    border-top: 1px solid #f1f1f1;
+    width: 100%;
+}
+.search{
+    background-color: #f1f1f1;
+    border-radius: 6rpx;
+    width: 80%;
+    margin: 0 auto;
+    padding:6rpx 10rpx;
+}
+.search input{
+    background-color: #f1f1f1;
+}
+.search image{
+  width: 30rpx;
+  height: 30rpx;
+  margin-left: 10rpx;
+}
+
+.ul{
+  background-color: #fff;
+  height: calc(100vh - 390rpx);
+}
+.li2{
+    height: 100rpx;
+    border-bottom: 1px solid #f1f1f1;
+}
+.ul .li2 .xia{
+  color: #26A2FF !important;
+  padding-right: 24rpx
+}
+
+.shu{
+  padding: 14rpx 24rpx;
+  background: #fff;
+  font-size: 28rpx;
+  color: #26A2FF;
+  border-bottom: 1px solid #f1f1f1;
+}
+.shu view:last-child{
+  color: #ccc;
+}
+.images{
+  width:50rpx;height:50rpx; margin:0 10rpx
+}

+ 36 - 0
Component/selectSectionBottom/selectSectionBottom.axml

@@ -0,0 +1,36 @@
+<view class="all">
+  <view class="close">
+      <image mode="scaleToFill" catchTap="onClose"  src="../../../image/close.png"/>
+  </view>
+  <view class="content">
+    <view>
+      <view class="flex-box flex-v-ce shu" a:if="{{terr.length>1}}">
+        <view a:for="{{terr}}" class="flex-box flex-v-ce flex-d-wrap" data-index="{{index}}" catchTap="activeItem" data-item="{{item}}">
+          <image mode="scaleToFill" src="../../../image/right.png" style="width:20rpx;height:20rpx;margin:0 6rpx;" a:if="{{index!=0}}"/>
+          <text style="max-width:2.5rem" class="font-flex-word">{{item.name}}</text>
+        </view>
+      </view>
+      <scroll-view class="ul" scroll-y="{{true}}">
+        <view class="flex-box flex-v-ce li2" a:for="{{rule_tree}}" a:key="{{index}}">
+          <label class="flex-1">
+            <view class="flex-box flex-v-ce flex-1" style="padding-left:24rpx;">
+              <checkbox checked="{{item.checked}}" data-index="{{index}}" data-item="{{item}}" onChange="radioChange" name="{{item.id}}"/>
+              <image class="images" src="../../../image/BM.png"/>
+              <view class="font-flex-word" style="width:4rem">{{item.name}}</view>
+            </view>
+          </label>
+          <view class="xia" data-item="{{item}}" catchTap="openDown" a:if="{{item._child.length>0}}">| 下级</view>
+        </view>
+      </scroll-view>
+    </view>
+  </view>
+  <view class="StaffFooter flex-box flex-v-ce">
+    <view class="flex-1 f-left flex-box flex-v-ce">
+      <view a:for="{{selectSenction}}" style="margin-right:10rpx;" a:if="{{item.id}}">
+        <image a:if="{{item.img_url}}" class="img-url" style="width:70rpx;height:70rpx;display: inline-block;  position: relative;top: 6rpx;" src="{{item.img_url}}"></image>
+        <view a:else style="width: 70rpx;height: 70rpx;border-radius: 100%;background: #26A2FF;color: #fff;text-align: center;line-height: 70rpx;font-size: 24rpx;">{{item.name.substr(item.name.length-2)}}</view>
+      </view>
+    </view>
+    <view class="staffBtn" onTap="onConfirm">确定</view>
+  </view>
+</view>

+ 148 - 0
Component/selectSectionBottom/selectSectionBottom.js

@@ -0,0 +1,148 @@
+var app = getApp()
+var that;
+Component({
+  mixins: [],
+  data: {
+    all_rule_list: {},
+    isShow: false,
+    terr: [
+      { name: '全部', id: 0 }
+    ],
+    rule_tree: [],
+    selectSenction: [],
+  },
+  props: {
+    onConfirm: (data) => console.log(data),
+    onClose: (data) => console.log(data),
+    defaultSection: [],
+  },
+  didMount() {
+    that = this;
+    this.setData({
+      isShow: this.props.isShow,
+      terr: [{ name: '全部', id: 0 }],
+      selectSenction: this.props.defaultSection,
+    })
+    this.getBmData();
+  },
+  methods: {
+    onConfirm() {
+      if (!this.data.selectSenction) {
+        app.globalData.showToast("请选择部门");
+        return;
+      }
+      this.props.onConfirm(this.data.selectSenction);
+      this.props.onClose();
+    },
+    //点击导航栏
+    activeItem(e) {
+      var item = e.target.dataset.item;
+      var index = e.target.dataset.index;
+      var terr = this.data.terr;
+      if ((index + 1) == terr.length) { return false };
+      this.setData({ rule_tree: [] });
+      if (index == 0) {
+       var all_rule_list= this.data.all_rule_list;
+       var selectSenction=this.data.selectSenction;
+        all_rule_list.map((item) => { //设置列表的选中状态
+          item.checked = false;
+          if (selectSenction.length > 0) {
+            selectSenction.forEach(item2 => {
+              if (item.id == item2.id) {
+                item.checked = true;
+              }
+            })
+          }
+        })
+        this.setData({
+          terr: [{ name: '全部', id: 0 }],
+          rule_tree: all_rule_list
+        })
+      } else {
+        var arr = terr.slice(0, index + 1);
+        this.setData({
+          rule_tree: item._child,
+          terr: arr
+        })
+      }
+    },
+    // 点击下一级
+    openDown(e) {
+      this.setData({ rule_tree: [] });
+      var item = e.target.dataset.item;
+      var terr = this.data.terr;
+      var selectSenction=this.data.selectSenction;
+      terr.push(item);
+      if (item._child.length > 0) {
+        item._child.map(item => {
+          if (selectSenction.length > 0) {
+            selectSenction.forEach(item2 => {
+              if (item.id == item2.id) {
+                item.checked = true;
+              }
+            })
+          }
+        })
+        that.setData({
+          rule_tree: item._child,
+          terr: terr
+        })
+      }
+    },
+    radioChange: function (e) {
+      var selectSenction = this.data.selectSenction;
+      var isExist = false;
+      let item = e.target.dataset.item;
+      let index = e.target.dataset.index;
+      let checked = `rule_tree[${index}].checked`;//获取当前控制选中的字段
+      let elm = this.data.rule_tree[index].checked;//当前的状态
+      this.setData({
+        [checked]: !elm,
+      })
+      if (e.detail.value) {//当有值时选中
+        selectSenction.forEach((element, _this) => {
+          if (element.id == item.id) {
+            isExist = true;
+          }
+        });
+        if (!isExist) {
+          selectSenction.push(item);
+        }
+      } else {//取消选中
+        selectSenction.forEach((element, index, _this) => {
+          if (element.id == item.id) {
+            _this.splice(index, 1);
+          }
+        });
+      }
+      this.setData({
+        selectSenction: selectSenction
+      })
+    },
+    //获取部门列表
+    getBmData() {
+      app.$get("api/department/tree", {}).then((res) => {
+        var list = res.data.data.list || [];
+        var defaultSection = that.props.defaultSection;
+        list.map((item) => { //设置列表的选中状态
+          item.checked = false;
+          if (defaultSection.length > 0) {
+            defaultSection.forEach(item2 => {
+              if (item.id == item2.id) {
+                item.checked = true;
+              }
+            })
+          }
+        })
+        this.setData({
+          rule_tree: list,
+          all_rule_list: list,
+        })
+      })
+    },
+    //关闭
+    onClose(e) {
+      this.props.onClose();
+    },
+  },
+});

+ 7 - 0
Component/selectSectionBottom/selectSectionBottom.json

@@ -0,0 +1,7 @@
+{
+  "component": true,
+    "usingComponents": {
+    "img-box": "/Component/img-box/index",
+    "no-data": "/Component/noData/noData"
+  }
+}

+ 155 - 0
Component/selectSectionStaff/selectSectionStaff.acss

@@ -0,0 +1,155 @@
+
+.all{
+  background-color: #fff;
+  height: 100%;
+  margin-top: 40rpx;
+  border-radius: 20rpx 20rpx 0 0; 
+  padding-top: 80rpx;
+  z-index:3
+}
+.close{
+  position: absolute;
+  right: 10rpx !important;
+  top: 50rpx !important;
+  padding: 20rpx;
+}
+.close image{
+  width: 40rpx;
+  height: 40rpx;
+}
+.search{
+    background-color: #f1f1f1;
+    border-radius: 6rpx;
+    width: 80%;
+    margin: 0 auto;
+    padding:6rpx 10rpx;
+}
+.search input{
+    background-color: #f1f1f1;
+}
+.search image{
+  width: 30rpx;
+  height: 30rpx;
+  margin-left: 10rpx;
+}
+.content{
+    margin-top: 16rpx;
+    border-top: 1px solid #f1f1f1;
+    width: 100%;
+}
+.date-btn view{
+  text-align: center;
+  padding: 20rpx 0;
+}
+.date-btn view:nth-child(1){
+  background-color: #f1f1f1;
+}
+.date-btn view:nth-child(2){
+  background-color: #26a2ff;
+  color: #fff;
+}
+.data-main{
+  margin: 32rpx 0;
+  text-align: center;
+}
+
+.data-main .dateVal{
+  color: #26a2ff;
+  width: 200rpx;
+  padding: 16rpx 0;
+  border-bottom: 1px solid #26a2ff;
+  display: inline-block;
+}
+
+.ul2{
+  width: 100%;
+  background-color: #fff;
+  box-sizing: border-box;
+}
+.li{
+    padding:20rpx 24rpx;
+    border-bottom: 1px solid #f1f1f1;
+}
+.ul2 .li .xia{
+  color: #26A2FF !important;
+}
+.shu{
+  padding: 10rpx 24rpx;
+  background: #fff;
+  font-size: 28rpx;
+  color: #26A2FF;
+  border-bottom: 1px solid #f1f1f1;
+}
+.shu view:last-child{
+  color: #ccc;
+}
+
+/* 人员 */
+.staff-ul{
+  width: 100%;
+  background-color: #fff;
+  box-sizing: border-box;
+  height: calc(100vh - 350rpx);
+}
+.userItem{
+    padding:14rpx 24rpx;
+    border-bottom: 1px solid #f1f1f1;
+}
+.staff-ul .userItem .xia{
+  color: #26A2FF !important;
+}
+.shu{
+  padding: 14rpx 24rpx;
+  background: #fff;
+  font-size: 28rpx;
+  color: #26A2FF;
+  border-bottom: 1px solid #f1f1f1;
+}
+.shu view:last-child{
+  color: #ccc;
+}
+.search{
+    background-color: #f1f1f1;
+    border-radius: 10rpx;
+    margin: 0 32rpx;
+    padding:8rpx 10rpx;
+}
+
+.search image{
+  width: 30rpx;
+  height: 30rpx;
+  margin-left: 10rpx;
+}
+.StaffFooter{
+  position: fixed;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: #fff;
+  padding: 10rpx;
+  border-top: 1px solid #f1f1f1;
+}
+
+.staffBtn{
+    background: #26A2FF;
+    color: #fff;
+    border-radius: 6rpx;
+    height: 88rpx;
+    text-align: center;
+    line-height: 88rpx;
+    padding: 0 20rpx;
+}
+.f-left{
+  overflow-x: auto;
+}
+.rule-all-text{
+  font-size: 28rpx;
+  color: #999;
+  position: relative;
+  right: 10rpx;
+  bottom: 5rpx;
+}
+.staff-all{
+  background: rgba(245, 247, 250, 1);
+  padding: 16rpx 32rpx;
+}

+ 74 - 0
Component/selectSectionStaff/selectSectionStaff.axml

@@ -0,0 +1,74 @@
+<view class="all">
+  <view class="close">
+      <image mode="scaleToFill" catchTap="onClose"  src="../../../image/close.png"/>
+  </view>
+  <form onReset="onReset">
+    <view class="search flex-box flex-v-ce">
+      <image mode="scaleToFill" src="../../../image/ss.png"></image>
+      <input placeholder="请输入姓名搜索" onInput="bindKeyInput" class="flex-1"></input>
+      <button a:if="{{isVal}}" class="delVal" formType="reset">×</button>
+    </view>
+  </form>
+  <view class="content">
+    <view a:if="{{terr.length>1}}" class="flex-box flex-v-ce shu">
+      <view a:for="{{terr}}" class="flex-box flex-v-ce" data-index="{{index}}" catchTap="activeItem" data-item="{{item}}">
+        <image a:if="{{index!=0}}" mode="scaleToFill" src="../../../image/right.png" style="width:20rpx;height:20rpx;margin:0 6rpx;"></image>
+        <text style="max-width:2.5rem" class="font-flex-word">{{item.name}}</text>
+      </view>
+    </view>
+    <scroll-view class="staff-ul" scroll-y="{{true}}" style="{{terr.length>1? 'height: calc(100vh - 390rpx);':'height: calc(100vh - 320rpx);'}}">
+      <view class="ul2">
+        <view a:for="{{rule_tree}}" class="flex-box flex-v-ce li">
+          <view class="flex-box flex-v-ce flex-1" data-item="{{item}}" catchTap="changeSection">
+            <image mode="scaleToFill" style="width:50rpx;height:50rpx; margin:0 10rpx;" src="../../../image/BM.png"></image>
+            <text class="flex-1">{{item.name}}</text>
+          </view>
+          <view a:if="{{item._child.length>0}}" class="xia" data-item="{{item}}" catchTap="openDown">| 下级</view>
+        </view>
+      </view>
+      <view class="flex-box flex-v-ce staff-all">
+        <view class="flex-1"></view>
+        <label a:if="{{isAll}}">
+          <text class="rule-all-text">全选</text>
+          <checkbox onChange="ruleActiveAll" disabled="{{item.disabled}}" checked="{{isAllChecked}}"></checkbox>
+        </label>
+      </view>
+      <view a:if="{{userList.length>0&&isAll&&item.name.indexOf(keyVal)>= 0}}" a:for="{{userList}}" class="flex-box flex-v-ce userItem">
+          <label class="flex-box flex-v-ce flex-1">
+            <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="70rpx" width="70rpx"></img-box>
+            <text style="margin-left:20rpx;" class="flex-1">{{item.name}}</text>
+            <checkbox onChange="radioChange" data-index="{{index}}" data-item="{{item}}" checked="{{item.checked}}" name="{{item.id}}"></checkbox>
+          </label>
+      </view>
+      <view a:if="{{userList.length>0&&!isAll&&item.name.indexOf(keyVal)>= 0}}" a:for="{{userList}}" class="flex-box flex-v-ce userItem">
+          <view class="{{item.checked? 'active':''}} flex-box flex-v-ce flex-1" catchTap="radioChange" data-index="{{index}}" data-item="{{item}}">
+            <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="70rpx" width="70rpx"></img-box>
+            <text style="margin-left:20rpx;" class="flex-1">{{item.name}}</text>
+            <view class="radio_"></view>
+          </view>
+      </view>
+      <view a:if="{{userList.length==0}}">
+        <view style="text-align:center">
+          <image mode="scaleToFill" src="../../../image/noData.png" style="width: 340rpx;height: 340rpx;margin-bottom:20rpx;"/>
+        </view>
+        <view class="fontColorF" style="margin-top:0rpx;text-align: center;" a:if="{{isCreator}}">
+          <view  style="font-size:0.28rem">未授权员工进入系统,请前往钉钉电脑端</view>
+          <view  style="font-size:0.28rem">为员工【启用积分管理】</view>
+        </view>
+        <view class="fontColorF" style="margin-top:0rpx;text-align: center;" a:else>
+          <view style="font-size:0.28rem">你当前没有可管理人员,请前往钉钉电脑端</view>
+          <view  style="font-size:0.28rem" >设置【管理范围】</view>
+        </view>
+      </view>
+    </scroll-view>
+  </view>
+  <view class="StaffFooter flex-box flex-v-ce">
+    <view class="flex-1 f-left flex-box flex-v-ce">
+      <view a:for="{{selectUserId}}" style="margin-right:10rpx;" a:if="{{item.id}}">
+        <image a:if="{{item.img_url}}" class="img-url" style="width:70rpx;height:70rpx;display: inline-block;  position: relative;top: 6rpx;" src="{{item.img_url}}"></image>
+        <view a:else style="width: 70rpx;height: 70rpx;border-radius: 100%;background: #26A2FF;color: #fff;text-align: center;line-height: 70rpx;font-size: 24rpx;">{{item.name.substr(item.name.length-2)}}</view>
+      </view>
+    </view>
+    <view class="staffBtn" onTap="onConfirm">确定</view>
+  </view>
+</view>

+ 295 - 0
Component/selectSectionStaff/selectSectionStaff.js

@@ -0,0 +1,295 @@
+var app = getApp()
+var that;
+Component({
+  mixins: [],
+  data: {
+    userList: [],//人员集合
+    all_user_list: [],//人员集合
+    isShow: false,
+    showId: 0,//显示的部门ID下员工
+    terr: [
+      { name: '全部', id: 0 }
+    ],
+    all_rule_list: [],
+    rule_tree: [],
+    selectUserId: [],
+    isAllChecked: false,
+    isAll: true,
+    userData: [],
+    isCreator: false,
+    creatorName: '',
+    keyVal:'',
+  },
+  props: {
+    onClose: (data) => console.log(data),
+    onConfirm: (data) => console.log(data),
+    selectUser: [],
+    isAllSelect: true,//是否多选
+    isLeadership: false,//数据源是否是自己的管理范围
+    isBoss: false,//是否去除创始人
+    isUser: false,//是否去除自己
+  },
+  didMount() {
+    that = this;
+    this.setData({ isCreator: app.globalData.isCreator, creatorName: app.globalData.corpMessage.creators })
+    // app.login(app.globalData.corpId, function (is) {
+      // if (is) {
+        that.setData({
+          selectUserId: that.props.selectUser[0] ? that.props.selectUser : [],
+          isAll: that.props.isAllSelect,
+          userData:app.globalData.userData.employee_detail.manage_scope,
+          terr: [{ name: '全部', id: 0 }]
+        })
+      // }
+      that.getData(0);
+      that.getBmData();
+    // })
+  },
+  didUpdate() { },
+  didUnmount() {
+  },
+  methods: {
+    onReset() {
+      this.setData({
+        isVal: false,
+        keyVal:''
+      })
+    },
+    onConfirm() {
+      if (this.data.selectUserId.length == 0) {
+        app.globalData.showToast("请选择一名员工")
+        return
+      }
+      this.props.onConfirm(this.data.selectUserId);
+      this.onClose();
+    },
+    //搜索
+    bindKeyInput(e) {
+      this.setData({
+        keyVal:e.detail.value,
+        isVal: e.detail.value ? true : false
+      })
+    },
+    changeSection(e) {
+      var item = e.target.dataset.item;
+      var terr = this.data.terr;
+      terr.push(item);
+      if (item._child.length > 0) {
+        that.setData({
+          rule_tree: item._child,
+          terr: terr,
+          isAllChecked: false
+        })
+      } else {
+        that.setData({
+          rule_tree: [],
+          terr: terr,
+          isAllChecked: false
+        })
+      }
+      this.getData(item.id);
+    },
+    //点击导航栏
+    activeItem(e) {
+      var item = e.target.dataset.item;
+      var index = e.target.dataset.index;
+      var terr = this.data.terr;
+      if ((index + 1) == terr.length) { return false };
+      this.setData({ rule_tree: [] });
+      if (index == 0) {
+        this.setData({
+          terr: [{ name: '全部', id: 0 }],
+          rule_tree: this.data.all_rule_list,
+          isAllChecked: false
+        })
+      } else {
+        var arr = terr.slice(0, index + 1);
+        this.setData({
+          rule_tree: item._child,
+          terr: arr,
+          isAllChecked: false
+        })
+      }
+      this.getData(item.id);
+    },
+    // 点击下一级
+    openDown(e) {
+      this.setData({ rule_tree: [] });
+      var item = e.target.dataset.item;
+      var terr = this.data.terr;
+      terr.push(item);
+      if (item._child.length > 0) {
+        that.setData({
+          rule_tree: item._child,
+          terr: terr,
+          isAllChecked: false
+        })
+      }
+      this.getData(item.id);
+    },
+    getArrDifference(arr1, arr2) {
+      var obj = {};
+      arr1.concat(arr2).forEach(function (v, i, arr) {
+        obj[v.id] = v;
+      });
+      return obj;
+    },
+    //全选择
+    ruleActiveAll(e) {
+      var userList = this.data.userList;
+      var selectUserId = this.data.selectUserId;
+      if (e.detail.value) {
+        userList.map(item => {
+          item.checked = true;
+        })
+        if (selectUserId.length > 0) {
+          var obj = this.getArrDifference(selectUserId, userList);
+          this.setData({
+            selectUserId: Object.values(obj),
+            userList: userList,
+            isAllChecked: true
+          })
+        } else {
+          this.setData({
+            selectUserId: userList,
+            userList: userList,
+            isAllChecked: true
+          })
+        }
+
+      } else {
+        userList.map(item => {
+          item.checked = false;
+        })
+        this.setData({
+          userList: userList,
+          selectUserId: [],
+          isAllChecked: false
+        })
+      }
+    },
+    //选择
+    radioChange: function (e) {
+      var selectUserId = this.data.selectUserId;
+      var isExist = false;
+      var userList = this.data.userList;
+      if (!this.data.isAll) {//单选择
+        let item = e.target.dataset.item;
+        let index = e.target.dataset.index;
+        let checked = `userList[${index}].checked`;//获取当前控制选中的字段
+        let elm = this.data.userList[index].checked;//当前的状态
+
+        //将所有的选中状态改成未中
+        var userList = this.data.userList;
+        userList.map((item, item_index) => {  
+          if (item.checked) {
+            var item_checked = `userList[${item_index}].checked`;
+            this.setData({
+              [item_checked]: false
+            })
+          }
+        })
+        if(!elm){
+          selectUserId.forEach((element, _this) => {
+            if (element.id == item.id) {
+              isExist = true;
+            }
+          });
+          if (!isExist) {
+            selectUserId=[];
+            selectUserId.push(item);
+          }
+        }else{//取消选中
+            selectUserId=[];
+        }
+        this.setData({
+            [checked]: !elm,
+        })
+      } else {//多选择
+        let item = e.target.dataset.item;
+        let index = e.target.dataset.index;
+        let checked = `userList[${index}].checked`;//获取当前控制选中的字段
+        let elm = this.data.userList[index].checked;//当前的状态
+        this.setData({
+           [checked]: !elm,
+        })
+        if (e.detail.value) {//当有值时选中
+          selectUserId.forEach((element, _this) => {
+            if (element.id == item.id) {
+              isExist = true;
+            }
+          });
+          if (!isExist) {
+            selectUserId.push(item);
+          }
+        } else {//取消选中
+          selectUserId.forEach((element, index, _this) => {
+            if (element.id == item.id) {
+              _this.splice(index, 1);
+            }
+          });
+        }
+      }
+      this.setData({
+          selectUserId: selectUserId
+      })
+    },
+    //关闭
+    onClose(e) {
+      this.props.onClose();
+    },
+    //获取人员列表
+    getData(dept_id) {
+      this.setData({
+        userList: [],
+        all_user_list: []
+      })
+      app.$get("api/employee/list", { dept_id: dept_id }).then((res) => {
+        var list = res.data.data.list || [];
+        var selectUserId = this.data.selectUserId;
+        var arr = [];
+        var userList = [];
+        list.forEach(item => {
+          if(this.props.isBoss&&item.is_creator == 1){
+              return null
+          }else if(this.props.isUser&&item.id == app.globalData.userData.id){
+              return null
+          }else{
+              userList.push(item)
+          }
+        });
+        userList.map((item) => { //设置列表的选中状态
+          item.checked = false;
+          if (selectUserId.length > 0) {
+            selectUserId.forEach(item2 => {
+              if (item.id == item2.id) {
+                item.checked = true;
+              }
+            })
+          }
+        })
+        that.data.userData.map((item) => {//列表数据是否是自己的管理范围
+          userList.map((item2) => {
+            if (item.id == item2.id) {
+              arr.push(item2);
+            }
+          })
+        })
+        this.setData({
+          userList: that.props.isLeadership ? arr : userList,
+          all_user_list: that.props.isLeadership ? arr : userList,
+        })
+      })
+    },
+    //获取部门列表
+    getBmData() {
+      app.$get("api/department/tree", {}).then((res) => {
+        var list = res.data.data.list;
+        this.setData({
+          rule_tree: list,
+          all_rule_list: list
+        })
+      })
+    },
+  },
+});

+ 6 - 0
Component/selectSectionStaff/selectSectionStaff.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+    "usingComponents": {
+    "img-box": "/Component/img-box/index"
+  }
+}

+ 169 - 0
Component/selectSectionStaff_tow/selectSectionStaff_tow.acss

@@ -0,0 +1,169 @@
+
+.all{
+  background-color: #fff;
+  height: 100%;
+  margin-top: 40rpx;
+  border-radius: 20rpx 20rpx 0 0; 
+  padding-top: 80rpx;
+  z-index:3
+}
+.close{
+  position: absolute;
+  right: 10rpx !important;
+  top: 50rpx !important;
+  padding: 20rpx;
+}
+.close image{
+  width: 40rpx;
+  height: 40rpx;
+}
+.search{
+    background-color: #f1f1f1;
+    border-radius: 6rpx;
+    width: 80%;
+    margin: 0 auto;
+    padding:6rpx 10rpx;
+}
+.search input{
+    background-color: #f1f1f1;
+}
+.search image{
+  width: 30rpx;
+  height: 30rpx;
+  margin-left: 10rpx;
+}
+.content{
+    margin-top: 16rpx;
+    border-top: 1px solid #f1f1f1;
+    width: 100%;
+}
+.date-btn view{
+  text-align: center;
+  padding: 20rpx 0;
+}
+.date-btn view:nth-child(1){
+  background-color: #f1f1f1;
+}
+.date-btn view:nth-child(2){
+  background-color: #26a2ff;
+  color: #fff;
+}
+.data-main{
+  margin: 32rpx 0;
+  text-align: center;
+}
+
+.data-main .dateVal{
+  color: #26a2ff;
+  width: 200rpx;
+  padding: 16rpx 0;
+  border-bottom: 1px solid #26a2ff;
+  display: inline-block;
+}
+
+
+.li{
+    padding:20rpx 24rpx;
+    border-bottom: 1px solid #f1f1f1;
+}
+
+.ul .li .xia{
+  padding-right: 24rpx;
+  color: #26A2FF !important;
+}
+.shu{
+  padding: 10rpx 24rpx;
+  background: #fff;
+  font-size: 28rpx;
+  color: #26A2FF;
+  border-bottom: 1px solid #f1f1f1;
+}
+.shu view:last-child{
+  color: #ccc;
+}
+
+/* 人员 */
+.staff-ul{
+  width: 100%;
+  background-color: #fff;
+  box-sizing: border-box;
+  height: calc(100vh - 390rpx);
+}
+.userItem{
+    padding:14rpx 24rpx;
+    border-bottom: 1px solid #f1f1f1;
+}
+.staff-ul .userItem .xia{
+  color: #26A2FF !important;
+}
+
+.shu view:last-child{
+  color: #ccc;
+}
+.search{
+    background-color: #f1f1f1;
+    border-radius: 10rpx;
+    margin: 0 32rpx;
+    padding:8rpx 10rpx;
+}
+.search input{
+    background-color: #f1f1f1;
+    font-size: 26rpx;
+}
+.search image{
+  width: 30rpx;
+  height: 30rpx;
+  margin-left: 10rpx;
+}
+.StaffFooter{
+  position: fixed;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: #fff;
+  padding: 10rpx;
+  border-top: 1px solid #f1f1f1;
+}
+
+.staffBtn{
+    background: #26A2FF;
+    color: #fff;
+    border-radius: 6rpx;
+    height: 88rpx;
+    text-align: center;
+    line-height: 88rpx;
+    padding: 0 40rpx;
+}
+.f-left{
+  margin-right:10rpx; 
+  overflow-x: auto;
+}
+.rule-all-text{
+  font-size: 28rpx;
+  color: #999;
+  position: relative;
+  right: 10rpx;
+  bottom: 5rpx;
+}
+.staff-all{
+  background: rgba(245, 247, 250, 1);
+  padding: 16rpx 32rpx;
+}
+.img_name_box{
+    width: 70rpx;
+    height: 70rpx;
+    border-radius: 50rpx;
+    background: #26A2FF;
+    color: #fff;
+    line-height: 70rpx;
+    text-align: center;
+    font-size: 28rpx;
+}
+.img_box{
+    width: 70rpx;
+    height: 70rpx;
+    border-radius: 50rpx;
+    display: block;
+    position: relative;
+    top: 4rpx;
+}

+ 54 - 0
Component/selectSectionStaff_tow/selectSectionStaff_tow.axml

@@ -0,0 +1,54 @@
+<view class="all">
+  <view class="close">
+    <image mode="scaleToFill" catchTap="onClose" src="../../../image/close.png"/>
+  </view>
+  <form onReset="onReset">
+    <view class="search flex-box flex-v-ce">
+      <image mode="scaleToFill" src="../../../image/ss.png"/>
+      <input placeholder="请输入姓名搜索" onInput="bindKeyInput" class="flex-1"/>
+      <button a:if="{{isVal}}" class="delVal" formType="reset">×</button>
+    </view>
+  </form>
+  <view class="content">
+    <view class="flex-box flex-v-ce shu" a:if="{{terr.length>1}}">
+      <view a:for="{{terr}}" class="flex-box flex-v-ce" data-index="{{index}}" catchTap="activeItem" data-item="{{item}}">
+        <image mode="scaleToFill" src="../../../image/right.png" style="width:20rpx;height:20rpx;margin:0 6rpx;" a:if="{{index!=0}}"/>
+        <text style="max-width:2.5rem" class="font-flex-word">{{item.name}}</text>
+      </view>
+    </view>
+    <scroll-view class="staff-ul" scroll-y="{{true}}" style="{{terr.length>1? 'height: calc(100vh - 390rpx);':'height: calc(100vh - 320rpx);'}}">
+      <view class="ul2">
+        <view class="flex-box flex-v-ce li" a:for="{{rule_tree}}">
+          <view class="flex-box flex-v-ce flex-1" data-item="{{item}}" catchTap="changeSection">
+            <image mode="scaleToFill" style="width:50rpx;height:50rpx; margin:0 10rpx;" src="../../../image/BM.png"/>
+            <text class="flex-1">{{item.name}}</text>
+          </view>
+          <view class="xia" a:if="{{item._child.length>0}}" data-item="{{item}}" catchTap="openDown">| 下级</view>
+        </view>
+      </view>
+
+      <view a:if="{{item.name.indexOf(keyVal)>= 0}}" class="flex-box flex-v-ce userItem" a:for="{{userList}}" a:key="{{index}}">
+        <view class="{{item.checked? 'active':''}} flex-box flex-v-ce flex-1" catchTap="bindtap1" data-index="{{index}}" data-item="{{item}}">
+          <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="70rpx" width="70rpx"></img-box>
+          <text style="margin-left:20rpx;" class="flex-1">{{item.name}}</text>
+          <view class="radio_"></view>
+        </view>
+      </view>
+      
+      <view a:if="{{userList.length==0}}">
+        <view class="fontColorF" style="margin-top:200rpx;text-align: center;">
+          <view>你暂无相关审批人</view>
+        </view>
+      </view>
+    </scroll-view>
+  </view>
+  <view class="StaffFooter flex-box flex-v-ce">
+    <view class="flex-1 f-left flex-box flex-v-ce">
+      <view a:for="{{selectUserId}}" style="margin-right:10rpx;" a:key="{{index}}" a:if="{{item.id}}">
+        <image mode="scaleToFill" class="img_box" src="{{item.img_url}}" a:if="{{item.img_url}}"/>
+        <view a:else class="img_name_box">{{item.name.substr(item.name.length-2)}}</view>
+      </view>
+    </view>
+    <view class="staffBtn" onTap="onConfirm">确定</view>
+  </view>
+</view>

+ 225 - 0
Component/selectSectionStaff_tow/selectSectionStaff_tow.js

@@ -0,0 +1,225 @@
+var app = getApp()
+var that;
+Component({
+  mixins: [],
+  data: {
+    userList: [],//人员集合
+    all_user_list: [],//人员集合
+    isShow: false,
+    showId: 0,//显示的部门ID下员工
+    terr: [
+      { name: '全部', id: 0 }
+    ],
+    all_rule_list: [],
+    rule_tree: [],
+    selectUserId: [],
+    isAllChecked: false,
+    userData: [],//初次显示的数据源
+    keyVal: ''
+  },
+  props: {
+    onClose: (data) => console.log(data),
+    onConfirm: (data) => console.log(data),
+    selectUser: [],//默认选择
+    isAllSelect: true,//是否多选
+    isLeadership: false,//是否选择领导
+    superior_list: [],//上级交叉领导集合
+    islead: false,//是否只显示领导
+  },
+  didMount() {
+    that = this;
+    this.setData({ selectUserId: this.props.selectUser[0] ? this.props.selectUser : [] })
+    var superior_list = this.props.superior_list;//将传进来的上级集合,转成集合里变成对象(原先是数组)【】
+    var userData = app.globalData.userData.employee_detail;
+    this.setData({
+      userData: this.props.isLeadership ? userData.manage_scope : superior_list.length > 0 ? superior_list : userData.superior_list,
+      terr: [{ name: '全部', id: 0 }]
+    })
+    this.getBmData();
+    this.getData(0);
+  },
+  methods: {
+    onReset() {
+      this.setData({
+        isVal: false,
+        keyVal: ''
+      })
+    },
+    onConfirm() {
+      this.props.onConfirm(this.data.selectUserId);
+      this.onClose();
+    },
+    //搜索
+    bindKeyInput(e) {
+      this.setData({
+        keyVal: e.detail.value,
+        isVal: e.detail.value ? true : false
+      })
+
+    },
+    changeSection(e) {
+      var item = e.target.dataset.item;
+      var terr = this.data.terr;
+      terr.push(item);
+      if (item._child.length > 0) {
+        that.setData({
+          rule_tree: item._child,
+          terr: terr,
+          isAllChecked: false
+        })
+      } else {
+        that.setData({
+          rule_tree: [],
+          terr: terr,
+          isAllChecked: false
+        })
+      }
+      this.getData(item.id);
+    },
+    //点击导航栏
+    activeItem(e) {
+      var item = e.target.dataset.item;
+      var index = e.target.dataset.index;
+      var terr = this.data.terr;
+      if ((index + 1) == terr.length) { return false };
+
+      this.setData({ rule_tree: [], userList: [], all_user_list: [] });
+      if (index == 0) {
+        this.setData({
+          terr: [{ name: '全部', id: 0 }],
+          rule_tree: this.data.all_rule_list,
+          isAllChecked: false
+        })
+      } else {
+        var arr = terr.slice(0, index + 1);
+        this.setData({
+          rule_tree: item._child,
+          terr: arr,
+          isAllChecked: false
+        })
+      }
+      this.getData(item.id);
+    },
+    // 点击下一级
+    openDown(e) {
+      this.setData({ rule_tree: [] });
+      var item = e.target.dataset.item;
+      var terr = this.data.terr;
+      terr.push(item);
+      if (item._child.length > 0) {
+        that.setData({
+          rule_tree: item._child,
+          terr: terr,
+          isAllChecked: false
+        })
+      }
+      this.getData(item.id);
+    },
+    getArrDifference(arr1, arr2) {
+      var obj = {};
+      arr1.concat(arr2).forEach(function (v, i, arr) {
+        obj[v.id] = v;
+      });
+      return obj;
+    },
+    //单选择
+    bindtap1(e) {
+      this.setData({ selectUserId: [] });
+      var index = e.target.dataset.index;
+      var checked = `userList[${index}].checked`;
+      var elm = this.data.userList[index].checked;
+      var userList = this.data.userList;
+      userList.map((item, item_index) => {
+        if (item.checked) {
+          var item_checked = `userList[${item_index}].checked`;
+          this.setData({
+            [item_checked]: false
+          })
+        }
+      })
+      var arr = [];
+      arr.push(e.target.dataset.item);
+      if (!elm) {
+        this.setData({
+          [checked]: !elm,
+          selectUserId: arr
+        })
+      } else {
+        this.setData({
+          [checked]: !elm,
+          selectUserId: []
+        })
+      }
+    },
+    //关闭
+    onClose(e) {
+      this.props.onClose();
+    },
+    //获取人员列表
+    getData(dept_id) {
+      this.setData({ userList: [], all_user_list: [] })
+      app.$get("api/employee/list", { dept_id: dept_id }).then((res) => {
+        var list = res.data.data.list;
+        var selectUserId = this.data.selectUserId;
+        var arr = [];
+        var ids = [];
+        if (that.props.islead) {//只显示管理者  
+          list.map((item) => {
+            item.checked = false;
+            var isManager=false;
+            item.role_list.forEach(roleItem=>{
+              if (roleItem.name == 'admin' || roleItem.name == 'creator' || roleItem.name == 'point_manager' || roleItem.name == 'dept_manager') {
+                    isManager=true;
+              }
+            })
+            if (isManager) {
+              arr.push(item);
+              if (selectUserId.length > 0) {
+                selectUserId.forEach(item2 => {
+                  if (item.id == item2.id) {
+                    item.checked = true;
+                    ids.push(item);
+                  }
+                })
+              }
+            }
+          })
+        } else {
+          list.map((item) => {
+            item.checked = false;
+            if (selectUserId.length > 0) {
+              selectUserId.forEach(item2 => {
+                if (item.id == item2.id) {
+                  item.checked = true;
+                  ids.push(item);
+                }
+              })
+            }
+          })
+          that.data.userData.map((item) => {
+            list.map((item2) => {
+              if (item.id == item2.id) {
+                arr.push(item2);
+              }
+            })
+          })
+        }
+        this.setData({
+          userList: arr,
+          all_user_list: arr,
+          selectUserId: ids.length > 0 ? ids : this.data.selectUserId
+        })
+      })
+    },
+    //获取部门列表
+    getBmData() {
+      app.$get("api/department/tree", {}).then((res) => {
+        var list = res.data.data.list;
+        this.setData({
+          rule_tree: list,
+          all_rule_list: list
+        })
+      })
+    },
+  },
+});

+ 6 - 0
Component/selectSectionStaff_tow/selectSectionStaff_tow.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+    "usingComponents": {
+    "img-box": "/Component/img-box/index"
+  }
+}

+ 104 - 0
Component/selectStaff/selectStaff.acss

@@ -0,0 +1,104 @@
+.all-date {
+  overflow: hidden;
+  height: 100vh;
+  position: fixed;
+  left: 0;
+  right: 0;
+  top: 80rpx;
+  z-index: 5;
+  /* background-color: rgba(0,0,0,.7); */
+}
+
+.staff-header {
+  background-color: #fff;
+  box-shadow: inset 0px 0px 5px #ccc;
+  padding-top: 28rpx;
+  margin-top: 0rpx;
+  transform: translateY(-100%);
+  position: fixed;
+  left: 0;
+  right: 0;
+  z-index: 8;
+}
+
+.staff-btn view {
+  text-align: center;
+  padding: 20rpx 0;
+}
+
+.staff-btn view:nth-child(1) {
+  background-color: #f1f1f1;
+}
+
+.staff-btn view:nth-child(2) {
+  background-color: #26a2ff;
+  color: #fff;
+}
+
+.staff-ul {
+  width: 100%;
+  background-color: #fff;
+  height: 700rpx;
+  box-sizing: border-box;
+  margin-top: 28rpx;
+  border-top: 1px solid #f1f1f1;
+}
+
+.userItem {
+  padding: 10rpx 32rpx;
+  border-bottom: 1px solid #f1f1f1;
+}
+
+.staff-ul .userItem .xia {
+  color: #26A2FF !important;
+}
+
+.shu {
+  padding: 14rpx 24rpx;
+  background: #fff;
+  font-size: 28rpx;
+  color: #26A2FF;
+  border-bottom: 1px solid #f1f1f1;
+}
+
+.shu view:last-child {
+  color: #ccc;
+}
+
+.search {
+  background-color: #f1f1f1;
+  border-radius: 10rpx;
+  margin: 0 32rpx;
+  padding: 8rpx 10rpx;
+}
+
+.search input {
+  background-color: #f1f1f1;
+}
+
+.search image {
+  width: 30rpx;
+  height: 30rpx;
+  margin-left: 10rpx;
+}
+
+.selectUsers {
+  padding: 10rpx;
+  border-top: 1px solid #f1f1f1;
+  overflow-y: auto;
+  width: 100%;
+}
+
+.date-btn view {
+  text-align: center;
+  padding: 20rpx 0;
+}
+
+.date-btn view:nth-child(1) {
+  background-color: #f1f1f1;
+}
+
+.date-btn view:nth-child(2) {
+  background-color: #26a2ff;
+  color: #fff;
+}

+ 35 - 0
Component/selectStaff/selectStaff.axml

@@ -0,0 +1,35 @@
+<view class="all-date">
+  <view class="data-tier" catchTap="onClose"></view>
+  <view class="staff-header {{isShow?'showPop':''}}">
+    <form onReset="onReset">
+      <view class="search flex-box flex-v-ce">
+        <image mode="scaleToFill" src="../../../image/ss.png"/>
+        <input placeholder="请输入姓名搜索" onInput="bindKeyInput" class="flex-1"/>
+        <button a:if="{{isVal}}" class="delVal" formType="reset">×</button>
+      </view>
+    </form>
+    <scroll-view class="staff-ul" scroll-y="{{true}}">
+      <view class="flex-box flex-v-ce userItem" a:for="{{userList}}" a:if="{{item.name.indexOf(keyVal)>= 0}}">
+        <label class="flex-box flex-v-ce flex-1">
+          <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="70rpx" width="70rpx"></img-box>
+          <text style="margin-left:20rpx;" class="flex-1">{{item.name}}</text>
+          <checkbox onChange="radioChange" data-index="{{index}}" data-item="{{item}}" checked="{{item.checked}}" name="{{item.id}}" value="{{item}}"/>
+        </label>
+      </view>
+      <view a:if="{{userList.length==0}}" class="fontColorF" style="margin-top:200rpx;text-align: center;">
+        <view>暂无相关人员</view>
+      </view>
+    </scroll-view>
+    <view class="flex-box flex-v-ce selectUsers" a:if="{{selectUserId.length>0}}">
+      <view a:for="{{selectUserId}}" style="margin-right:10rpx;height:70rpx;">
+        <image a:if="{{item.img_url}}" class="img-url" style="width:70rpx;height:70rpx;display: inline-block;  position: relative;top: 6rpx;" src="{{item.img_url}}"></image>
+        <view a:else style="width: 70rpx;height: 70rpx;border-radius: 100%;background: #26A2FF;color: #fff;text-align: center;line-height: 70rpx;font-size: 24rpx;">{{item.name.substr(item.name.length-2)}}</view>
+      </view>
+    </view>
+    <view class="flex-box date-btn">
+      <view class="flex-1" catchTap="onClose">取消</view>
+      <view class="flex-1" catchTap="onConfirm">确定</view>
+    </view>
+  </view>
+  <view class="meng" catchTap="onClose"></view>
+</view>

+ 119 - 0
Component/selectStaff/selectStaff.js

@@ -0,0 +1,119 @@
+var app = getApp()
+var that;
+Component({
+  mixins: [],
+  data: {
+    all_user_list: {},
+    isShow: false,
+    keyVal: '',
+    isAll: true,
+  },
+  props: {
+    onConfirm: (data) => console.log(data),
+    onClose: (data) => console.log(data),
+    defaultUser: '',
+    isAllSelect: true,//是否多选
+  },
+  didMount() {
+    that = this;
+    this.setData({ isShow: this.props.isShow, isAll: that.props.isAllSelect, })
+    this.getData();
+  },
+  didUpdate() { },
+  didUnmount() { },
+  methods: {
+    onReset() {
+      this.setData({
+        isVal: false,
+        keyVal: ''
+      })
+    },
+    //搜索
+    bindKeyInput(e) {
+      this.setData({
+        keyVal: e.detail.value,
+        isVal: e.detail.value ? true : false
+      })
+    },
+    onConfirm() {
+      this.props.onConfirm(this.data.selectUserId);
+      this.props.onClose();
+    },
+    radioChange: function (e) {
+      var selectUserId = this.data.selectUserId;
+      var isExist = false;
+      let item = e.target.dataset.item;
+      let index = e.target.dataset.index;
+      let checked = `userList[${index}].checked`;//获取当前控制选中的字段
+      let elm = this.data.userList[index].checked;//当前的状态
+      if (this.data.isAll) {//当可多选时
+        if (e.detail.value) {//当有值时选中
+          selectUserId.forEach((element, _this) => {
+            if (element.id == item.id) {
+              isExist = true;
+            }
+          });
+          if (!isExist) {
+            selectUserId.push(item);
+          }
+        } else {//取消选中
+          selectUserId.forEach((element, index, _this) => {
+            if (element.id == item.id) {
+              _this.splice(index, 1);
+            }
+          });
+        }
+      } else {//单选择
+        let userList=this.data.userList;
+        userList.map(item => {
+          item.checked = false;
+        })
+        selectUserId = [];
+        if (e.detail.value) {//当有值时选中
+            selectUserId.push(item);
+            this.setData({
+              userList: userList
+            })
+        } else {//取消选中
+          // selectUserId = [];
+        }
+      }
+      this.setData({
+        [checked]: !elm,
+      })
+      this.setData({
+        selectUserId: selectUserId
+      })
+    },
+    getData(keywords) {
+      app.$get("api/employee/list", { dept_id: 0, keywords: keywords }).then((res) => {
+        var list = res.data.data.list;
+        var arr = this.props.defaultUser;
+        if (typeof (arr) == 'string') {
+          arr = arr.split(',');
+        }
+        var ids = [], userList = list;
+        userList.map(item => {
+          item.checked = false;
+          if (arr.length > 0) {
+            arr.forEach(item2 => {
+              if (item.id == item2) {
+                item.checked = true;
+                ids.push(item);
+              }
+            })
+          }
+        })
+        this.setData({
+          userList: userList,
+          all_user_list: userList,
+          selectUserId: ids.length > 0 ? ids : []
+        })
+      })
+    },
+    //关闭
+    onClose(e) {
+      this.props.onClose();
+    }
+  },
+});

+ 6 - 0
Component/selectStaff/selectStaff.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+    "usingComponents": {
+    "img-box": "/Component/img-box/index"
+  }
+}

+ 70 - 0
Component/selectSx/selectSx.acss

@@ -0,0 +1,70 @@
+.all-date{
+  overflow: hidden;
+  height: 100vh;
+  position: fixed;
+  left: 0;
+  right:0;
+  top:80rpx;
+  z-index: 5;
+  /* background-color: rgba(0,0,0,.7); */
+}
+.staff-header{
+  background-color: #fff;
+  box-shadow:inset 0px 0px 5px #ccc;
+  padding-top: 28rpx;
+  margin-top: 0rpx;
+  transform: translateY(-100%);
+    position: fixed;
+  left: 0;
+  right: 0;
+  z-index: 8;
+}
+
+.staff-btn view{
+  text-align: center;
+  padding: 20rpx 0;
+}
+.staff-btn view:nth-child(1){
+  background-color: #f1f1f1;
+}
+.staff-btn view:nth-child(2){
+  background-color: #26a2ff;
+  color: #fff;
+}
+
+.sx-ul{
+  width: 100%;
+  background-color: #fff;
+  height: 600rpx;
+  box-sizing: border-box;
+}
+.rule-title{
+  margin-bottom: 20rpx;
+  padding:0 28rpx;
+}
+.rule-item{
+  margin-bottom: 20rpx;
+}
+.ruleGe{
+  background: #f5f7fa;
+  padding: 16rpx;
+  font-size: 28rpx;
+  width: 22%;
+  text-align: center;
+  box-sizing: border-box;
+  margin: 0rpx  1.5%  20rpx 1.5%;
+}
+.rule-all-text{
+  font-size: 28rpx;
+  color: #999;
+  position: relative;
+  right: 10rpx;
+  bottom: 5rpx;
+}
+.rule-items{
+  padding: 0 14rpx;
+}
+.ruleActive{
+    color: #26a2ff!important;
+    background: #26a2ff33!important;
+}

+ 21 - 0
Component/selectSx/selectSx.axml

@@ -0,0 +1,21 @@
+<view class="all-date">
+  <view class="data-tier" catchTap="onClose"></view>
+  <view class="staff-header {{isShow?'showPop':''}}">
+    <scroll-view class="sx-ul" scroll-y="{{true}}">
+      <view a:for="{{sxArr}}" class="rule-item">
+        <view class="flex-box flex-v-ce rule-title">
+          <view class="flex-1">{{item.name}}</view>
+        </view>
+        <view class="flex-box flex-d-wrap rule-items" a:if="{{item.child.length>0}}">
+          <view catchTap="ruleActive" data-index="{{index}}" data-indexChild="{{idx}}" class="{{itemName.checked==true? 'ruleActive':''}} ruleGe font-flex-word" a:for="{{item.child}}" a:for-index="idx" a:for-item="itemName">{{itemName.name}}</view>
+        </view>
+        <view style="text-align: center;font-size:22rpx;" class="fontColorT" a:else>暂无相关规则</view>
+      </view>
+    </scroll-view>
+    <view class="flex-box staff-btn">
+      <view class="flex-1" catchTap="onClose">取消</view>
+      <view class="flex-1" catchTap="onConfirm">确定</view>
+    </view>
+  </view>
+   <view class="meng" catchTap="onClose"></view>
+</view>

+ 118 - 0
Component/selectSx/selectSx.js

@@ -0,0 +1,118 @@
+var app = getApp()
+var that;
+Component({
+  mixins: [],
+  data: {
+    isShow: false,
+
+    sxArr: [
+      {
+        name: '人员',
+        child: [
+          { name: "全部", code: "all", checked: true },
+          { name: "管理者", code: "manager", checked: false },
+          { name: "员工", code: "employee", checked: false },
+        ],
+      },
+      {
+        name: '排序',
+        child: [
+          { name: "从高到低", code: "DESC", checked: true },
+          { name: "从低到高", code: "ASC", checked: false },
+        ],
+      },
+      {
+        name: '积分分类',
+        child: [
+          { name: "B分", code: "3", checked: true },
+          { name: "A分", code: "2", checked: false },
+        ],
+      }
+    ],
+    sxArr2: [
+      {
+        name: '人员',
+        child: [
+          { name: "全部", code: "all", checked: false },
+          { name: "管理者", code: "manager", checked: false },
+          { name: "员工", code: "employee", checked: false },
+        ],
+      },
+      {
+        name: '排序',
+        child: [
+          { name: "从高到低", code: "DESC", checked: false },
+          { name: "从低到高", code: "ASC", checked: false },
+        ],
+      },
+      {
+        name: '积分分类',
+        child: [
+          { name: "B分", code: "3", checked: false },
+          { name: "A分", code: "2", checked: false },
+        ],
+      }
+    ]
+  },
+  props: {
+    onConfirm: (data) => console.log(data),
+    onClose: (data) => console.log(data),
+    defaultSx:['all','DESC','3'],
+  },
+  didMount() {
+    that = this;
+    var sxArr=this.data.sxArr;
+    sxArr.map(item=>{
+        item.child.map(item2=>{
+          item2.checked=false;
+          if(this.props.defaultSx[0]==item2.code){
+             item2.checked=true;
+          }
+          if(this.props.defaultSx[1]==item2.code){
+             item2.checked=true;
+          }
+          if(this.props.defaultSx[2]==item2.code){
+             item2.checked=true;
+          }
+        })
+    })
+    this.setData({ isShow: this.props.isShow,sxArr:sxArr })
+  },
+  didUpdate() { },
+  didUnmount() { },
+  methods: {
+    //单
+    ruleActive(e) {
+      var index = e.target.dataset.index;
+      var sxArrItem = `sxArr[${index}].child`;
+      this.setData({
+        [sxArrItem]: this.data.sxArr2[index].child
+      })
+      var indexChild = e.target.dataset.indexChild;
+      var isChecked = this.data.sxArr[index].child[indexChild].checked;
+      var elem = `sxArr[${index}].child[${indexChild}].checked`;
+      this.setData({
+        [elem]: !isChecked
+      })
+    },
+    onConfirm() {
+      var sxArr = this.data.sxArr;
+      var arr = [];
+      sxArr.forEach(item => {
+        if (item.child.length > 0) {
+          item.child.forEach((a) => {
+            if (a.checked == true) {
+              arr.push(a.code);
+            }
+          })
+        }
+      });
+      this.props.onConfirm(arr);
+      this.props.onClose();
+    },
+    //关闭
+    onClose(e) {
+      this.props.onClose();
+    },
+  },
+});

+ 3 - 0
Component/selectSx/selectSx.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 70 - 0
Component/selectSxZp/selectSxZp.acss

@@ -0,0 +1,70 @@
+.all-date{
+  overflow: hidden;
+  height: 100vh;
+  position: fixed;
+  left: 0;
+  right:0;
+  top:80rpx;
+  z-index: 5;
+  /* background-color: rgba(0,0,0,.7); */
+}
+.staff-header{
+  background-color: #fff;
+  box-shadow:inset 0px 0px 5px #ccc;
+  padding-top: 28rpx;
+  margin-top: 0rpx;
+  transform: translateY(-100%);
+    position: fixed;
+  left: 0;
+  right: 0;
+  z-index: 8;
+}
+
+.staff-btn view{
+  text-align: center;
+  padding: 20rpx 0;
+}
+.staff-btn view:nth-child(1){
+  background-color: #f1f1f1;
+}
+.staff-btn view:nth-child(2){
+  background-color: #26a2ff;
+  color: #fff;
+}
+
+.sx-ul{
+  width: 100%;
+  background-color: #fff;
+  height: 500rpx;
+  box-sizing: border-box;
+}
+.rule-title{
+  margin-bottom: 20rpx;
+  padding:0 28rpx;
+}
+.rule-item{
+  margin-bottom: 20rpx;
+}
+.ruleGe{
+  background: #f5f7fa;
+  padding: 16rpx;
+  font-size: 28rpx;
+  /* width: 22%; */
+  text-align: center;
+  box-sizing: border-box;
+  margin: 0rpx  1.5%  20rpx 1.5%;
+}
+.rule-all-text{
+  font-size: 28rpx;
+  color: #999;
+  position: relative;
+  right: 10rpx;
+  bottom: 5rpx;
+}
+.rule-items{
+  padding: 0 14rpx;
+}
+.ruleActive{
+    color: #26a2ff!important;
+    background: #26a2ff33!important;
+}

+ 32 - 0
Component/selectSxZp/selectSxZp.axml

@@ -0,0 +1,32 @@
+<view class="all-date">
+  <view class="data-tier" catchTap="onClose"></view>
+  <view class="staff-header {{isShow?'showPop':''}}">
+    <scroll-view class="sx-ul" scroll-y="{{true}}">
+      <view a:for="{{sxArr}}" class="rule-item">
+        <block a:if="{{item.name=='任务状态'}}">
+          <block a:if="{{typeIndex==1}}">
+            <view class="flex-box flex-v-ce rule-title">
+              <view class="flex-1">{{item.name}}</view>
+            </view>
+            <view class="flex-box flex-d-wrap rule-items">
+              <view catchTap="ruleActive" data-index="{{index}}" data-indexChild="{{idx}}" class="{{itemName.checked==true? 'ruleActive':''}} ruleGe font-flex-word" a:for="{{item.child}}" a:for-index="idx" a:for-item="itemName">{{itemName.name}}</view>
+            </view>
+          </block>
+        </block>
+        <block a:else>
+          <view class="flex-box flex-v-ce rule-title">
+            <view class="flex-1">{{item.name}}</view>
+          </view>
+          <view class="flex-box flex-d-wrap rule-items">
+            <view catchTap="ruleActive" data-index="{{index}}" data-indexChild="{{idx}}" class="{{itemName.checked==true? 'ruleActive':''}} ruleGe font-flex-word" a:for="{{item.child}}" a:for-index="idx" a:for-item="itemName">{{itemName.name}}</view>
+          </view>
+        </block>
+      </view>
+    </scroll-view>
+    <view class="flex-box staff-btn">
+      <view class="flex-1" catchTap="onClose">取消</view>
+      <view class="flex-1" catchTap="onConfirm">确定</view>
+    </view>
+  </view>
+  <view class="meng" catchTap="onClose"></view>
+</view>

+ 139 - 0
Component/selectSxZp/selectSxZp.js

@@ -0,0 +1,139 @@
+var app = getApp()
+var that;
+Component({
+  mixins: [],
+  data: {
+    isShow: false,
+    typeIndex: 1,
+    sxArr: [
+      {
+        name: '积分类型',
+        child: [
+          { name: "全部", code: 0, checked: true },
+          // { name: "绩效分", code: 1, checked: false },
+          { name: "A分", code: 2, checked: false },
+          { name: "B分", code: 3, checked: false },
+        ],
+      },
+      {
+        name: '任务状态',
+        child: [
+          { name: "全部", code: "all", checked: true },
+          { name: "进行中", code: "running", checked: false },
+          { name: "已完成", code: "complete", checked: false },
+        ],
+      },
+      {
+        name: '排序',
+        child: [
+          { name: "按发布时间", code: "publish", checked: true },
+          { name: "按截止时间", code: "expire", checked: false },
+        ],
+      }
+    ],
+    sxArr2: [
+      {
+        name: '积分类型',
+        child: [
+          { name: "全部", code: 0, checked: false },
+          // { name: "绩效分", code: 1, checked: false },
+          { name: "A分", code: 2, checked: false },
+          { name: "B分", code: 3, checked: false },
+        ],
+      },
+      {
+        name: '任务状态',
+        child: [
+          { name: "全部", code: "all", checked: false },
+          { name: "进行中", code: "running", checked: false },
+          { name: "已完成", code: "complete", checked: false },
+        ],
+      },
+      {
+        name: '排序',
+        child: [
+          { name: "按发布时间", code: "publish", checked: false },
+          { name: "按截止时间", code: "expire", checked: false },
+        ],
+      }
+    ],
+  },
+  props: {
+    onConfirm: (data) => console.log(data),
+    onClose: (data) => console.log(data),
+    defaultSx: [0, 'all', 'publish'],
+    typeIndex: 1,
+  },
+  didMount() {
+    that = this;
+    var sxArr = this.data.sxArr;
+    if (this.props.defaultSx.length > 0) {
+      sxArr.map(item => {
+        item.child.map(item2 => {
+          item2.checked = false;
+          if (this.props.defaultSx[0] == item2.code) {
+            item2.checked = true;
+          }
+          if (this.props.defaultSx[1] == item2.code) {
+            item2.checked = true;
+          }
+          if (this.props.defaultSx[2] == item2.code) {
+            item2.checked = true;
+          }
+        })
+      })
+    } else {
+      this.props.defaultSx = [0, 'all', 'publish'];
+      sxArr.map(item => {
+        item.child.map(item2 => {
+          item2.checked = false;
+          if (this.props.defaultSx[0] == item2.code) {
+            item2.checked = true;
+          }
+          if (this.props.defaultSx[1] == item2.code) {
+            item2.checked = true;
+          }
+          if (this.props.defaultSx[2] == item2.code) {
+            item2.checked = true;
+          }
+        })
+      })
+    }
+    this.setData({ isShow: this.props.isShow, sxArr: sxArr, typeIndex: this.props.typeIndex })
+  },
+  methods: {
+    //单
+    ruleActive(e) {
+      var index = e.target.dataset.index;
+      var sxArrItem = `sxArr[${index}].child`;
+      this.setData({
+        [sxArrItem]: this.data.sxArr2[index].child
+      })
+      var indexChild = e.target.dataset.indexChild;
+      var isChecked = this.data.sxArr[index].child[indexChild].checked;
+      var elem = `sxArr[${index}].child[${indexChild}].checked`;
+      this.setData({
+        [elem]: !isChecked
+      })
+    },
+    onConfirm() {
+      var sxArr = this.data.sxArr;
+      var arr = [];
+      sxArr.forEach(item => {
+        if (item.child.length > 0) {
+          item.child.forEach((a) => {
+            if (a.checked == true) {
+              arr.push(a.code);
+            }
+          })
+        }
+      });
+      this.props.onConfirm(arr);
+      this.props.onClose();
+    },
+    //关闭
+    onClose(e) {
+      this.props.onClose();
+    },
+  },
+});

+ 3 - 0
Component/selectSxZp/selectSxZp.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 71 - 0
Component/selectType/selectType.acss

@@ -0,0 +1,71 @@
+.all2 {
+  background-color: #fff;
+  height: 100%;
+  margin-top: 40rpx;
+  border-radius: 20rpx 20rpx 0 0;
+  padding-top: 80rpx;
+  z-index: 999
+}
+
+.close{
+  position: absolute;
+  right: 10rpx !important;
+  top: 50rpx !important;
+  padding: 20rpx;
+}
+.close image{
+  width: 40rpx;
+  height: 40rpx;
+}
+
+.search {
+  background-color: #f1f1f1;
+  border-radius: 6rpx;
+  width: 80%;
+  margin: 0 auto;
+  padding: 6rpx 10rpx;
+}
+
+.search input {
+  background-color: #f1f1f1;
+}
+
+.search image {
+  width: 30rpx;
+  height: 30rpx;
+  margin-left: 10rpx;
+}
+
+.content2 {
+  margin-top: 16rpx;
+  border-top: 1px solid #f1f1f1;
+  background: #f1f1f1;
+  height: calc(100vh - 212rpx);
+}
+
+.ul3 {
+  width: 100%;
+  background-color: #fff;
+  height: 100%;
+}
+
+.li {
+  padding: 24rpx;
+  border-bottom: 1px solid #f1f1f1;
+}
+
+.ul3 .li .xia {
+  color: #26A2FF !important;
+}
+
+.shu {
+  padding: 14rpx 24rpx;
+  background: #fff;
+  margin-bottom: 20rpx;
+  font-size: 28rpx;
+  color: #26A2FF;
+}
+
+.shu view:last-child {
+  color: #ccc;
+}

+ 33 - 0
Component/selectType/selectType.axml

@@ -0,0 +1,33 @@
+<view class="all2">
+  <view class="close">
+      <image mode="scaleToFill" catchTap="plusOne"  src="../../../image/close.png"/>
+  </view>
+   <!-- <view class="search flex-box flex-v-ce">
+      <image mode="scaleToFill" src="../../../image/ss.png"/>
+      <input placeholder="请输入搜索关键字" onInput="bindKeyInput"/>
+   </view> -->
+   <view class="content2">
+      <view class="flex-box flex-v-ce shu" a:if="{{terr.length>1}}">
+        <view a:for="{{terr}}" class="flex-box flex-v-ce" data-index="{{index}}" catchTap="activeItem" data-item="{{item}}">
+            <image mode="scaleToFill" src="../../../image/right.png" style="width:20rpx;height:20rpx;margin:0 6rpx;" a:if="{{index!=0}}"/>
+            {{item.name}}
+        </view>
+      </view>
+
+      <scroll-view class="ul3" scroll-y="{{true}}">
+         <radio-group class="radio-group" onChange="radioChange">
+            <view class="flex-box flex-v-ce li" a:for="{{rule_tree}}">
+               <label class="flex-box flex-v-ce flex-1"><radio value="{{item}}"  checked="{{item.checked}}" name="{{item.id}}"/><image mode="scaleToFill" style="width:60rpx;height:60rpx; margin:0 10rpx;" src="../../../image/e66f.jpg"/> {{item.name}}</label>
+               <view class="xia" data-item="{{item}}" catchTap="openDown" a:if="{{item.child.length>0}}">| 下级</view>
+            </view>
+         </radio-group>
+         <view a:if="{{rule_tree.length==0}}" class="nodata fontColorF">
+            <view>
+              <image mode="scaleToFill" src="../../../image/noData.png" style="width: 340rpx;height: 340rpx;margin-bottom:20rpx;"/>
+            </view>
+            <text a:if="{{isCreator}}">暂无积分分类,请前往钉钉电脑端添加【积分分类】</text>
+            <text a:else>暂无积分分类,请联系主管理员“{{creatorName}}”或积分管理员前往钉钉电脑添加【积分分类】</text>
+         </view>
+      </scroll-view>
+   </view>
+</view>

+ 123 - 0
Component/selectType/selectType.js

@@ -0,0 +1,123 @@
+var app = getApp()
+var that;
+Component({
+  mixins: [],
+  data: {
+    all_rule_list: {},
+    rule_tree: {},
+    terr: [
+      { name: '全部', id: 0 }
+    ],
+    isCreator:false,
+    creatorName:'',
+
+  },
+  props: {
+    onClose: (data) => console.log(data),
+    onConfirm: (data) => console.log(data),
+    isGzType: '',
+    defaultId: '',//默认选中
+  },
+  didMount() {
+    that = this;
+    this.setData({
+      terr: [{ name: '全部', id: 0 }],
+      isCreator: app.globalData.isCreator,
+      creatorName:app.globalData.corpMessage.creators
+    })
+    this.getData();
+  },
+  didUpdate() { },
+  didUnmount() { },
+  methods: {
+        //搜索
+    bindKeyInput(e) {
+        var item_list=this.data.allItems;
+        var items=item_list.filter((item)=>{
+            return item.remark.indexOf(e.detail.value) >= 0
+        });
+        this.setData({
+          selectItem: items,
+          isItem:e.detail.value? false:true
+        })
+    },
+    //点击导航栏
+    activeItem(e) {
+      this.setData({ rule_tree: [] });
+      var item = e.target.dataset.item;
+      var index = e.target.dataset.index;
+      var terr = this.data.terr;
+      if ((index + 1) == terr.length) { return false };
+      if (index == 0) {
+        this.setData({
+          terr: [{ name: '全部', id: 0 }],
+          rule_tree: this.data.all_rule_list
+        })
+      } else {
+        var arr = terr.slice(0, index + 1);
+        this.setData({
+          rule_tree: item.child,
+          terr: arr
+        })
+      }
+    },
+    // 点击下一级
+    openDown(e) {
+      this.setData({ rule_tree: [] });
+      var item = e.target.dataset.item;
+      var terr = this.data.terr;
+
+      terr.push(item);
+      if (item.child.length > 0) {
+        that.setData({
+          rule_tree: item.child,
+          terr: terr
+        })
+      }
+    },
+    radioChange: function (e) {
+      this.props.onConfirm(e.detail.value);
+      this.plusOne();
+    },
+    recursion(data) {
+      for (var i = 0; i < data.length; i++) {
+        data[i].checked = false;
+        if (data[i].child.length > 0) {
+          this.recursion(data[i].child);
+        }
+      }
+      return data;
+    },
+    getData() {
+      var pt_id
+      if (that.props.isGzType) {
+        pt_id = app.getTypesItem(that.props.isGzType).id;
+      }
+      app.$get("api/integral/rule/trees", { pt_id: pt_id,cycle_type: 1 }).then((res) => {
+        var rule_tree = res.data.data.rule_tree
+        if (this.props.defaultId) {
+          rule_tree.map(item => {
+            if (this.props.defaultId == item.id) {
+              item.checked = true;
+            }
+            
+            item.child.map(item2 => {
+              if (this.props.defaultId == item2.id) {
+                item2.checked = true;
+              }
+            })
+
+          })
+        }
+        that.setData({
+          rule_tree: rule_tree,
+          all_rule_list: rule_tree
+        })
+      })
+    },
+    //关闭
+    plusOne(e) {
+      this.props.onClose();
+    },
+  },
+});

+ 3 - 0
Component/selectType/selectType.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 74 - 0
Component/selectUser/selectUser.acss

@@ -0,0 +1,74 @@
+.all-date{
+  background-color: #fff;
+  height: 100%;
+  margin-top: 40rpx;
+  border-radius: 20rpx 20rpx 0 0; 
+  padding-top: 80rpx;
+  z-index: 999
+}
+.staff-header{
+  background-color: #fff;
+  box-shadow:inset 0px 0px 5px #ccc;
+  padding-top: 28rpx;
+  margin-top: 0rpx;
+  transform: translateY(-100%);
+}
+
+.staff-btn view{
+  text-align: center;
+  padding: 20rpx 0;
+}
+.staff-btn view:nth-child(1){
+  background-color: #f1f1f1;
+}
+.staff-btn view:nth-child(2){
+  background-color: #26a2ff;
+  color: #fff;
+}
+
+.sx-ul{
+  width: 100%;
+  background-color: #fff;
+  height: 400rpx;
+  box-sizing: border-box;
+}
+.rule-title{
+  margin-bottom: 20rpx;
+  padding:0 28rpx;
+}
+.rule-item{
+  margin-bottom: 20rpx;
+}
+.ruleGe{
+  background: #f5f7fa;
+  padding: 16rpx;
+  font-size: 28rpx;
+  width: 22%;
+  text-align: center;
+  box-sizing: border-box;
+  margin: 0rpx  1.5%  20rpx 1.5%;
+}
+.rule-all-text{
+  font-size: 28rpx;
+  color: #999;
+  position: relative;
+  right: 10rpx;
+  bottom: 5rpx;
+}
+.rule-items{
+  padding: 0 14rpx;
+}
+.ruleActive{
+    color: #26a2ff!important;
+    background: #26a2ff33!important;
+}
+.close{
+  position: absolute;
+  right: 10rpx !important;
+  top: 50rpx !important;
+  padding: 20rpx;
+}
+.close image{
+  width: 40rpx;
+  height: 40rpx;
+}

+ 28 - 0
Component/selectUser/selectUser.axml

@@ -0,0 +1,28 @@
+<view class="all-date">
+   <view class="close">
+      <image mode="scaleToFill" catchTap="plusOne"  src="../../../image/close.png"/>
+  </view>
+  <view>
+    <view class="search flex-box flex-v-ce">
+      <image mode="scaleToFill" src="../../../image/ss.png"/>
+      <input placeholder="请输入姓名搜索" onInput="bindKeyInput"/>
+    </view>
+    <scroll-view class="staff-ul" scroll-y="{{true}}">
+      <checkbox-group class="radio-group" onChange="radioChange">
+        <view class="flex-box flex-v-ce userItem" a:for="{{userList}}">
+          <label class="flex-box flex-v-ce flex-1">
+            <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="80rpx" width="80rpx"></img-box>
+            <text style="margin-left:20rpx;" class="flex-1">{{item.name}}</text>
+            <checkbox value="{{item}}" checked="{{item.checked}}" name="{{item.id}}"/>
+          </label>
+        </view>
+      </checkbox-group>
+    </scroll-view>
+    <view class="flex-box flex-v-ce selectUsers font-flex-word">
+      <view a:for="{{selectUserId}}" style="margin-right:10rpx;">
+      <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="80rpx" width="80rpx"></img-box>
+      </view>
+    </view>
+  </view>
+   <view class="meng" catchTap="onClose"></view>
+</view>

+ 63 - 0
Component/selectUser/selectUser.js

@@ -0,0 +1,63 @@
+var app = getApp()
+var that;
+Component({
+  mixins: [],
+  data: {
+    all_user_list: {},
+    isShow: false,
+  },
+  props: {
+    onConfirm: (data) => console.log(data),
+    onClose: (data) => console.log(data),
+  },
+  didMount() {
+    that = this;
+    this.setData({ isShow: this.props.isShow })
+    this.getData();
+  },
+  didUpdate() { },
+  didUnmount() { },
+  methods: {
+    //搜索
+    bindKeyInput(e) {
+      if (e.detail.value) {
+        var all_user_list = this.data.all_user_list;
+        var items = all_user_list.filter((item) => {
+          return item.name.indexOf(e.detail.value) >= 0
+        });
+        this.setData({ userList: items });
+      } else {
+        this.setData({ userList: this.data.all_user_list });
+      }
+
+    },
+    onConfirm() {
+      this.props.onConfirm(this.data.selectUserId);
+      this.props.onClose();
+    },
+    radioChange: function (e) {
+      if (e.detail.value) {
+        var arr = e.detail.value;
+        this.setData({
+          selectUserId: e.detail.value
+        })
+      } else {
+        this.setData({
+          selectUserId:[]
+        })
+      }
+    },
+    getData(keywords) {
+      app.$get("api/employee/list", { dept_id: 0, keywords: keywords }).then((res) => {
+        this.setData({
+          userList: res.data.data.list,
+          all_user_list: res.data.data.list
+        })
+      })
+    },
+    //关闭
+    onClose(e) {
+      this.props.onClose();
+    }
+  },
+});

+ 6 - 0
Component/selectUser/selectUser.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+    "usingComponents": {
+    "img-box": "/Component/img-box/index"
+  }
+}

+ 483 - 0
app.acss

@@ -0,0 +1,483 @@
+	page {
+		color: #303133;
+		font-size: 32rpx;
+		background: rgba(245, 247, 250, 1);
+		height: 100%;
+		width: 100%;
+		margin: 0;
+		padding: 0;
+		-webkit-font-smoothing: antialiased;
+		-webkit-tap-highlight-color: transparent;
+		font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
+	}
+
+	.nodeBer {
+		border: none!important;
+	}
+
+	view, text {
+		line-height: 40rpx;
+	}
+
+	.blue {
+		color: #26A2FF!important;
+	}
+
+	.red {
+		color: #F56C6C!important;
+	}
+
+	.yellow {
+		color: #E6A23C!important;
+	}
+
+	.yellow2 {
+		color: #fc0!important;
+	}
+
+	.green {
+		color: #67C23A!important;
+	}
+
+	.fontColorZ {
+		color: #303133!important;
+	}
+
+	.fontColorF {
+		color: #606266 !important;
+	}
+
+	.fontColorX {
+		color: #969799 !important;
+	}
+
+	.fontColorT {
+		color: #C0C4CC!important;
+	}
+
+	/* 搜索框 */
+
+	.search {
+		background-color: #f1f1f1;
+		border-radius: 10rpx;
+		width: 90%;
+		margin: 0 auto;
+		padding: 6rpx 10rpx;
+	}
+
+	.search input {
+		background-color: #f1f1f1;
+		font-size: 32rpx !important;
+	}
+
+	.search image {
+		width: 30rpx;
+		height: 30rpx;
+		margin-left: 10rpx;
+	}
+
+	/* 弹窗相关 */
+
+	.data-tier {
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		height: 80rpx;
+	}
+
+	.animationBox {
+		position: fixed;
+		left: 0;
+		right: 0;
+		top: 0;
+		overflow: hidden;
+		z-index: 3;
+		transform: translate(0, -100%);
+	}
+/* 禁止滚动背景穿透 */
+	.container__mask {
+		overflow: hidden;
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		z-index: 1;
+}
+
+	.tab {
+		background: #fff;
+		text-align: center;
+		z-index: 4;
+		position: sticky;
+		top: 0;
+		height: 80rpx;
+	}
+
+	.tab view {
+		width: 25%;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+	}
+
+	.tab view text {
+		position: relative;
+		padding: 20rpx 0;
+		/* width: 120%; */
+		white-space: nowrap
+	}
+
+	.tab text::after {
+		position: absolute;
+		top: 50%;
+		right: -20rpx;
+		margin-top: -0.1rem;
+		border: 0.06rem solid;
+		border-color: transparent transparent #C0C4CC #C0C4CC;
+		-webkit-transform: rotate(-45deg);
+		transform: rotate(-45deg);
+		opacity: .8;
+		content: '';
+	}
+
+	.tab .activeView {
+		color: #26a2ff;
+	}
+
+	.tab .activeView::after {
+		margin-top: -0.02rem;
+		-webkit-transform: rotate(135deg);
+		transform: rotate(135deg);
+		border-color: transparent transparent #26a2ff #26a2ff;
+	}
+
+	.windows {
+		position: fixed;
+		top: 0px;
+		left: 0px;
+		right: 0px;
+		bottom: 0px;
+		background: rgba(0, 0, 0, 0.4);
+		z-index: 999;
+	}
+
+	.meng {
+		position: fixed;
+		bottom: 0;
+		background-color: rgba(0, 0, 0, .5);
+		left: 0;
+		right: 0;
+		top: 80rpx;
+		overflow: hidden;
+	}
+
+	.delVal {
+		height: 40rpx;
+		width: 40rpx;
+		border-radius: 100%;
+		background-color: #909399;
+		color: #fff;
+		text-align: center;
+		/* line-height: 40rpx; */
+		line-height: 34rpx;
+		margin: 0 10rpx;
+	}
+
+	/* 弹窗过程 */
+
+	.pop-up {
+		position: fixed;
+		right: 10rpx;
+		width: 100rpx;
+		height: 100rpx;
+		border-radius: 50%;
+		background: #fff;
+		text-align: center;
+		bottom: 50%;
+		box-sizing: border-box;
+		line-height: 100rpx;
+		box-shadow: 0 0 0.12rem rgba(0, 0, 0, .15);
+	}
+
+	.showPop {
+		animation: showLayer 0.2s linear both;
+	}
+
+	@keyframes showLayer {
+		0% {
+			transform: translateY(-100%);
+		}
+		100% {
+			transform: translateY(0%);
+		}
+	}
+
+	/* 带字体背景颜色 */
+
+	.redBox {
+		border-radius: 6rpx;
+		background: rgba(245,108,108,.1);
+		color: #F56C6C;
+		font-size: 28rpx;
+		padding: 0 6rpx;
+	}
+
+	.greenBox {
+		border-radius: 6rpx;
+		background: rgba(103,194,58,.1);
+		color: #67C23A;
+		font-size: 28rpx;
+		padding: 0 6rpx;
+	}
+
+	.yellowBox2{
+		border-radius: 6rpx;
+		background: rgba(255,204,0,.1);
+		color: #fc0;
+		font-size: 28rpx;
+		padding: 0 6rpx;
+	}
+
+	.yellowBox {
+		border-radius: 6rpx;
+		background: rgba(230,162,60,.1);
+		color: #E6A23C;
+		font-size: 28rpx;
+		padding: 0 6rpx;
+	}
+
+	.blueBox {
+		border-radius: 6rpx;
+		background: rgba(38,162,255,.1);
+		color: #26A2FF;
+		font-size: 28rpx;
+		padding: 0 6rpx;
+	}
+
+	.textBox {
+		border-radius: 6rpx;
+		background: rgba(48,49,51,.1);
+		color: #303133;
+		font-size: 28rpx;
+		padding: 0 6rpx;
+	}
+
+	.margin-bottom {
+		margin-bottom: 20rpx;
+	}
+
+	.margin-top {
+		margin-top: 20rpx;
+	}
+
+	.defBtn {
+		background: #26A2FF;
+		color: #fff;
+	}
+
+	.border-bottom {
+		border-bottom: 1px solid #f1f1f1;
+	}
+
+	.text-right {
+		text-align: right;
+	}
+
+	.text-left {
+		text-align: left;
+	}
+
+	.noDatas {
+		text-align: center;
+		padding: 16rpx 0;
+		color: #909399
+	}
+
+	.radio_ {
+		width: 40rpx !important;
+		height: 40rpx !important;
+		border: 1px solid #ccc;
+		border-radius: 50% !important;
+		background: #fff;
+		position: relative;
+		margin: 0 20rpx 0 24rpx;
+	}
+
+	.active .radio_ {
+		border: 1px solid #26A2FF;
+	}
+
+	.active .radio_::before {
+		content: '';
+		width: 20rpx !important;
+		height: 20rpx !important;
+		border-radius: 50% !important;
+		background: #26A2FF;
+		position: absolute;
+		display: block;
+		top: 50%;
+		left: 50%;
+		margin-top: -10rpx;
+		margin-left: -9.5rpx;
+	}
+
+	/* 盒子模型 */
+
+	.flex-box {
+		display: -webkit-box;
+		display: -moz-box;
+		display: -ms-flexbox;
+		display: -webkit-flex;
+		display: flex;
+	}
+
+	/*盒子模型,竖向自适应,垂直排列  */
+
+	.flex-box-v {
+		display: -webkit-box;
+		display: -webkit-flex;
+		display: flex;
+		-webkit-box-orient: vertical;
+		-webkit-flex-flow: column;
+		flex-flow: column !important;
+	}
+
+	.flex-box-ce{
+		display: -webkit-box;
+		display: -moz-box;
+		display: -ms-flexbox;
+		display: -webkit-flex;
+		display: flex;
+		align-items: center;
+		-webkit-align-items: center;
+		-webkit-box-align: center;
+	}
+
+	/* 水平等列排版(容器左右没缝隙,子元素左右两边自适应) */
+
+	.flex-d-center {
+		justify-content: space-between;
+		-webkit-justify-content: space-between;
+	}
+
+	/* 水平等列排版(子元素两边有缝隙自己适应) */
+
+	.flex-dv-center {
+		justify-content: space-around;
+		-webkit-justify-content: space-around;
+	}
+
+	/*通过一起使用 box-align 和 box-pack 属性,对 view 框的子元素进行居中,目前没有浏览器支持box-align 和 box-pack 属性,所以需要加上浏览器内核-webkit,-moz等的简写  */
+
+	.flex-center-center {
+		justify-content: center;
+		-webkit-justify-content: center;
+		-moz-justify-content: center;
+		align-items: center;
+		-webkit-align-items: center;
+		-webkit-box-pack: center;
+		-webkit-box-align: center;
+		-moz-align-items: center;
+		-moz-box-pack: center;
+		-moz-box-align: center;
+	}
+
+	/*对view中的子元素进行居中,并且位于容器的中间位置 水平居中  */
+
+	.flex-v-zhu, .flex-h-zhu {
+		justify-content: center;
+		-webkit-justify-content: center;
+		-webkit-box-pack: center;
+	}
+
+	/*对view中的子元素进行居中,并且位于容器的中间位置 垂直居中  */
+
+	.flex-v-ce, .flex-h-ce {
+		align-items: center;
+		-webkit-align-items: center;
+		-webkit-box-align: center;
+	}
+
+	/*让所有弹性盒模型对象的子元素都有相同的长度,且忽略它们内部的内容:  */
+
+	.flex-1 {
+		-webkit-box-flex: 1;
+		-moz-box-flex: 1;
+		-webkit-flex: 1;
+		-ms-flex: 1;
+		flex: 1;
+	}
+
+	.flex-2 {
+		-webkit-box-flex: 2;
+		box-flex: 2;
+		-moz-box-flex: 2;
+		-webkit-flex: 2;
+		-ms-flex: 2;
+		flex: 2;
+	}
+
+	.flex-3 {
+		-webkit-box-flex: 3;
+		box-flex: 3;
+		-moz-box-flex: 3;
+		-webkit-flex: 3;
+		-ms-flex: 3;
+		flex: 3;
+	}
+
+	.flex-4 {
+		-webkit-box-flex: 4;
+		box-flex: 4;
+		-moz-box-flex: 4;
+		-webkit-flex: 4;
+		-ms-flex: 4;
+		flex: 4;
+	}
+
+	.flex-5 {
+		-webkit-box-flex: 5;
+		box-flex: 5;
+		-moz-box-flex: 5;
+		-webkit-flex: 5;
+		-ms-flex: 5;
+		flex: 5;
+	}
+
+	.flex-direction-row-reverse {
+		flex-direction: row-reverse;
+		-webkit-flex-direction: row-reverse;
+	}
+
+	/*超出部分用....表示的公用样式  */
+
+	.font-flex-word {
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+	}
+
+	/* 内容超出部分自动换行 */
+
+	.flex-d-wrap {
+		flex-wrap: wrap;
+	}
+
+	/* 内容超出部分不换行 */
+
+	.flex-no-wrap {
+		flex-wrap: nowrap;
+	}
+
+	/* 从右边开始排列 */
+
+	.flex-box-end {
+		display: -webkit-box;
+		display: -moz-box;
+		display: -ms-flexbox;
+		display: -webkit-flex;
+		display: flex;
+		justify-content: flex-end;
+	}

+ 342 - 0
app.js

@@ -0,0 +1,342 @@
+import { showToast } from './utils/feedback'
+import { formatTime, arrRemoveObj, getTypeItem } from './utils/util'
+import * as socketApi from './utils/websocket'
+
+// const baseUrl = "https://test-ding.g107.com/";//测试
+const baseUrl = "https://ding.insys.g107.com/";//正式
+var that;
+var yearArr = [];
+var year = formatTime(new Date()).year;
+for (var i = 2018; i <= year; i++) {
+  yearArr.push(i);
+}
+App({
+  //自定义全局变量
+  globalData: {
+    baseUrl:baseUrl,
+    // webScoketUrl: "test-ding.g107.com",//webScoket测试
+    webScoketUrl: "ding.insys.g107.com",//webScoket正式
+    showToast: showToast,//提示框
+    arrRemoveObj: arrRemoveObj,//删除数组的某一项
+    year: formatTime(new Date()).year,//当前年
+    month: formatTime(new Date()).month,//当前月
+    day: formatTime(new Date()).day,//当前日
+    month_tow: formatTime(new Date()).month_tow,//当前月份
+    allDate: formatTime(new Date()).allDate,//带时分
+    types: [],
+    userData: '',
+    token: '',
+    ALIOSS_URL: 'https://integralsys.oss-cn-shenzhen.aliyuncs.com',
+    imgHttpUrl: 'https://intesys.cms.g107.com/integral.php/Api/get_signature',
+    corpId: '',
+    yearArr: yearArr,
+    isAdministrator: false,//是否管理员
+    isCreator: false,//是否是创始人
+    corpMessage: '',//企业套餐信息
+    usersList: [],//缓存的人员列表
+    socketApi:socketApi,//长连接
+  },
+  //获取积分类型
+  getTypes(callBack) {
+    this.$get("api/integral/types", {}).then((res) => {
+      this.globalData.types = res.data.data.list;
+      callBack();
+    })
+  },
+  //获取套餐信息
+  getCorp(corpId) {
+    this.$get("api/order/corp", { corp_id: corpId }).then((res) => {
+      this.globalData.corpMessage = res.data.data;
+    })
+  },
+  routerGet2(url, data = {}, Accept) {
+    return new Promise(function (resolve, reject) {
+      dd.httpRequest({
+        url: baseUrl + url,
+        method: 'GET',
+        headers: {
+          'Content-Type': 'application/x-www-form-urlencoded',
+          'A-Token': that.globalData.token,
+          'Accept': Accept ? Accept : ''
+        },
+        data: data,
+        timeout:10000,
+        dataType: 'json',
+        success: function (res) {
+          if (res.data.code == 1) {
+            if (res.data.refresh_token && res.data.refresh_token != that.globalData.token) {
+              that.globalData.token = res.data.refresh_token
+            }
+            resolve(res);
+          } else if (res.data.code == 401) {
+            that.globalData.showToast("授权已过期");
+            // reject(res);
+          } else {
+            that.globalData.showToast(res.data.msg)
+            // reject(res);
+          }
+        },
+        fail: function (res) {
+          if (res.errorMessage == 'NETWORK ERROR') {
+            dd.alert({
+              title: '网络异常',
+              content: '网络异常,请检查网络是否畅通,再重新进入应用',
+              buttonText: '我知道了',
+              success: () => { },
+            });
+            return;
+          }
+          reject(res);
+        }
+      });
+    })
+  },
+  routerGet(url, data = {}, Accept) {
+    return new Promise(function (resolve, reject) {
+      dd.showLoading();
+      dd.httpRequest({
+        url: baseUrl + url,
+        method: 'GET',
+        timeout:10000,
+        headers: {
+          'Content-Type': 'application/x-www-form-urlencoded',
+          'A-Token': that.globalData.token,
+          'Accept': Accept ? Accept : ''
+        },
+        data: data,
+        dataType: 'json',
+        success: function (res) {
+          if (res.data.code == 1) {
+            if (res.data.refresh_token && res.data.refresh_token != that.globalData.token) {
+              that.globalData.token = res.data.refresh_token
+            }
+            resolve(res);
+          } else if (res.data.code == 401) {
+            that.globalData.showToast("授权已过期");
+            // reject(res);
+          } else {
+            that.globalData.showToast(res.data.msg)
+            // reject(res);
+          }
+        },
+        fail: function (res) {
+          if (res.errorMessage == 'NETWORK ERROR') {
+            dd.alert({
+              title: '网络异常',
+              content: '网络异常,请检查网络是否畅通,再重新进入应用',
+              buttonText: '我知道了',
+              success: () => { },
+            });
+            return;
+          }
+          reject(res);
+        },
+        complete: function () {
+          dd.hideLoading();
+        }
+      });
+    })
+  },
+  routerPost(url, data = {}, Accept) {
+    return new Promise(function (resolve, reject) {
+      dd.httpRequest({
+        url: baseUrl + url,
+        method: 'POST',
+        headers: {
+          'Content-Type': 'application/x-www-form-urlencoded',
+          'A-Token': that.globalData.token,
+          'Accept': Accept ? Accept : ''
+        },
+        timeout:10000,
+        data: data,
+        dataType: 'json',
+        success: function (res) {
+          if (res.data.code == 1) {
+            if (res.refresh_token && res.data.refresh_token != that.globalData.token) {
+              that.globalData.token = res.data.refresh_token
+            }
+            resolve(res);
+          } else if (res.data.code == 401) {
+            that.globalData.showToast("授权已过期");
+            reject(res);
+          } else if(res.data.code == 3000) {
+            reject(res);
+          }else{
+            that.globalData.showToast(res.data.msg);
+            reject(res);
+          }
+        },
+        fail: function (res) {
+          if(res.error==19||res.error==13){
+            if(url=='api/integral/review/a/entry'||url=='api/integral/point/entry'){
+              	let sum=0;
+                if(data){
+                  sum=Number(JSON.parse(data.items).length)*Number(JSON.parse(data.members).length);
+                }
+                that.$post('api/e', {sum:sum,message:'钉钉小程序'}).then(res => {})
+            }
+          }
+          if (res.errorMessage == 'NETWORK ERROR') {
+            dd.alert({
+              title: '网络异常',
+              content: '网络异常,请检查网络是否畅通,再重新进入应用',
+              buttonText: '我知道了',
+              success: () => { },
+            });
+            return;
+          }
+          reject(res);
+        }
+      });
+    })
+  },
+  //封装post
+  $post(url, data = {}, Accept) {
+    // if (url == 'api/ding/login') {
+    //   return that.routerPost(url, data, Accept);
+    // }
+    // if (!that.globalData.token) {
+    //   dd.navigateTo({
+    //     url: '../../init/init'
+    //   })
+    //   return Promise.reject("登录中")
+    // } else {
+    return that.routerPost(url, data, Accept);
+    // }
+  },
+  //封装get
+  $get(url, data = {}, Accept) {
+    // if (url == 'api/integral/types' || url == 'api/order/corp') {
+    //   return that.routerGet(url, data, Accept);
+    // }
+    // if (!that.globalData.token) {
+    //   dd.navigateTo({
+    //     url: '../../init/init'
+    //   })
+    //   return Promise.reject("登录中")
+    // } else {
+    return that.routerGet(url, data, Accept);
+    // }
+  },
+  //封装get
+  $get2(url, data = {}, Accept) {
+    // if (url == 'api/integral/types' || url == 'api/order/corp') {
+    //   return that.routerGet2(url, data, Accept);
+    // }
+    // if (!that.globalData.token) {
+    //   dd.navigateTo({
+    //     url: '../../init/init'
+    //   })
+    //   return Promise.reject("登录中")
+    // } else {
+    return that.routerGet2(url, data, Accept);
+    // }
+  },
+  //免登 isShowStart是否显示引导页
+  login(corpId, callBack, errBack=function(){},isShowStart=false) {
+    if (that.globalData.token) {
+      callBack(true)
+    } else {
+      dd.getAuthCode({
+        success: function (res) {
+          that.$post('api/ding/login', { authCode: res.authCode, corpId: corpId }).then(res => {
+            if (res.data.code == 1) {
+              var { token, user } = res.data.data;
+              var isStart = false;
+              if (user.is_official == 1) {
+                user.employee_detail.role_list.forEach(item => {
+                  if (item.name == 'creator') {
+                    that.globalData.isCreator = true;
+                    isStart = true;
+                  }
+                  if (item.name == 'admin' || item.name == 'creator' || item.name == 'point_manager' || item.name == 'dept_manager') {
+                    that.globalData.isAdministrator = true;
+                  }
+                });
+                that.globalData.token = token;
+                that.globalData.userData = user;
+                var getIsStart = dd.getStorageSync({ key: 'isStart' });//判断是否需要打开引导页
+                // console.log(JSON.stringify(user));
+                that.getUserList();//缓存人员列表
+                if (isStart && !getIsStart.data&&isShowStart) {//判断是否需要打开引导
+                  dd.reLaunch({
+                    url: '../start/start'
+                  })
+                } else {
+                  callBack(true);
+                }
+              } else {
+                callBack(false);
+              }
+            } else if (res.data.code == 3000) {
+              that.globalData.showToast("员工信息同步中,请稍后进入")
+            } else {
+              that.globalData.showToast(res.msg)
+            }
+          }).catch(err => {
+            errBack(err.data);
+            return
+            if (err.data.code == 2001) {
+              dd.confirm({
+                title: '尊敬的用户',
+                content: '你当前的套餐已到期',
+                confirmButtonText: '去续费',
+                cancelButtonText: '暂不需要',
+                success: (result) => {
+                  if (result.confirm) {
+                    dd.reLaunch({
+                      url: `../../deploy/addMoney/addMoney`
+                    })
+                  }
+                },
+              });
+            }
+          })
+        },
+        fail: function (err) {
+          console.log(JSON.stringify(err))
+          that.globalData.showToast("错误" + JSON.stringify(err))
+        }
+      });
+    }
+  },
+  getUserList() {
+    this.$get("api/employee/list",{ dept_id: 0 }).then((res) => {
+      that.globalData.usersList = res.data.data.list;
+    })
+  },
+  getTypesItem(id) {
+    return getTypeItem(this.globalData.types, id);
+  },
+  updateApp(){
+    const updateManager = dd.getUpdateManager()
+    updateManager.onCheckForUpdate(function (res) {
+      // 请求完新版本信息的回调
+      // console.log(res.hasUpdate) // 是否有更新
+    })
+    updateManager.onUpdateReady(function (ret) {
+      // console.log(ret.version) // 更新版本号
+      dd.confirm({
+        title: '更新提示',
+        content: '新版本已经准备好,是否重启应用?',
+        success: function (res) {
+          if (res.confirm) {
+            // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+            updateManager.applyUpdate()
+          }
+        }
+      })
+    })
+    updateManager.onUpdateFailed(function () {
+      // 新版本下载失败
+    })
+  },
+  onLaunch(options) {
+    dd.globalData=this.globalData;
+    that = this;
+    that.updateApp();
+    that.getTypes(function () { });
+    that.getCorp(options.query.corpId);
+    that.globalData.corpId = options.query.corpId;
+  },
+});

+ 107 - 0
app.json

@@ -0,0 +1,107 @@
+{
+  "pages": [
+    "pages/begin/begin",
+    "pages/workbench/approval_batch/approval_batch",
+    "pages/workbench/index/index",
+    "pages/statistics/index/index",
+    "pages/deploy/index/index",
+    "pages/workbench/statistics_A/statistics_A",
+    "pages/workbench/statistics_B/statistics_B",
+    "pages/workbench/jk_A/jk_A",
+    "pages/workbench/jk_B/jk_B",
+    "pages/workbench/apply/apply",
+    "pages/workbench/prize_buckle/prize_buckle",
+    "pages/workbench/my_approve/my_approve",
+    "pages/workbench/approveDetail/approveDetail",
+    "pages/statistics/my_PrizeBuckle/my_PrizeBuckle",
+    "pages/statistics/prizeBuckleDetail/prizeBuckleDetail",
+    "pages/statistics/my_apply/my_apply",
+    "pages/statistics/applyDetail/applyDetail",
+    "pages/statistics/glz_execute/glz_execute",
+    "pages/statistics/check_top/check_top",
+    "pages/statistics/checkDetail/checkDetail",
+    "pages/statistics/integralEvent/integralEvent",
+    "pages/statistics/sectionRanking/sectionRanking",
+    "pages/statistics/B_ranking/B_ranking",
+    "pages/statistics/customRamking/customRamking",
+    "pages/statistics/addCustom/addCustom",
+    "pages/statistics/customDetail/customDetail",
+    "pages/statistics/userRamking/userRamking",
+    "pages/deploy/organization/organization",
+    "pages/deploy/addMoney/addMoney",
+    "pages/deploy/setCheck/setCheck",
+    "pages/deploy/integralRule/integralRule",
+    "pages/workbench/approve/approve",
+    "pages/statistics/C_ranking/C_ranking",
+    "pages/noJurisdiction/noJurisdiction",
+    "pages/init/init",
+    "pages/deploy/sku/sku",
+    "pages/start/start",
+    "pages/deploy/upgrade/upgrade",
+    "pages/deploy/upgradeDetail/upgradeDetail",
+    "pages/statistics/grant/grant",
+    "pages/statistics/myGrant/myGrant",
+    "pages/statistics/assaign/assaign",
+    "pages/statistics/offerAreward/offerAreward",
+    "pages/statistics/my_issue/my_issue",
+    "pages/statistics/workDetail/workDetail",
+    "pages/statistics/schedule/schedule",
+    "pages/statistics/recordOne/recordOne",
+    "pages/statistics/workpoints/workpoints",
+    "pages/statistics/my_task/my_task",
+    "pages/statistics/openPerform/openPerform",
+    "pages/statistics/taskDetail/taskDetail",
+    "pages/statistics/repetitive_tasks_detail/repetitive_tasks_detail",
+    "pages/statistics/getTask/getTask",
+    "pages/statistics/assaign_set/assaign_set",
+    "pages/statistics/offerAreward_set/offerAreward_set",
+    "pages/statistics/logDetail/logDetail",
+    "pages/demo/demo",
+    "pages/statistics/my_sp/my_sp",
+    "pages/statistics/allTask/allTask",
+    "pages/deploy/buy/buy",
+    "pages/statistics/log_rank/log_rank",
+    "pages/statistics/task_rank/task_rank",
+    "pages/exchange/exchange/exchange",
+    "pages/exchange/exchangeRecord/exchangeRecord",
+    "pages/exchange/gxdDetail/gxdDetail",
+    "pages/exchange/prizeDetail/prizeDetail",
+    "pages/exchange/commodityDetail/commodityDetail",
+    "pages/workbench/noticeDetail/noticeDetail",
+    "pages/reportBox/report/report",
+    "pages/reportBox/noUser/noUser",
+    "pages/reportBox/newspaperTask/newspaperTask",
+    "pages/reportBox/moreE/moreE"
+  ],
+  "window": {
+    "defaultTitle": "功道云",
+    "titleBarColor": "#26A2FF",
+    "pullRefresh": false,
+    "allowsBounceVertical": "NO"
+  },
+  "tabBar": {
+    "textColor": "#606266",
+    "selectedColor": "#49a9ee",
+    "backgroundColor": "#ffffff",
+    "items": [
+      {
+        "pagePath": "pages/workbench/index/index",
+        "name": "首页",
+        "icon": "image/home.png",
+        "activeIcon": "image/activeHome.png"
+      },
+      {
+        "pagePath": "pages/statistics/index/index",
+        "name": "工作台",
+        "icon": "image/tj.png",
+        "activeIcon": "image/activeTj.png"
+      },
+      {
+        "pagePath": "pages/deploy/index/index",
+        "name": "我的",
+        "icon": "image/my.png",
+        "activeIcon": "image/select_my.png"
+      }
+    ]
+  }
+}

BIN
image/1.png


BIN
image/2.png


BIN
image/3.png


BIN
image/BM.png


BIN
image/Bf.png


BIN
image/Bj.png


BIN
image/a7.png


BIN
image/a_apply.png


BIN
image/a_entry.png


BIN
image/activeHome.png


BIN
image/activeTj.png


BIN
image/addImg.png


BIN
image/add_ticket.png


BIN
image/all.png


BIN
image/all2.png


BIN
image/apply_list.png


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
image/approval_process.svg


BIN
image/att_sign.png


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor