@kyfe/ks-query-table 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) hide show
  1. package/.bitmap +38 -0
  2. package/.editorconfig +5 -0
  3. package/.env.dev +2 -0
  4. package/.env.gray +2 -0
  5. package/.env.prod +2 -0
  6. package/.env.stg +3 -0
  7. package/.env.uat +2 -0
  8. package/.eslintignore +1 -0
  9. package/.eslintrc.js +25 -0
  10. package/.gitmodules +4 -0
  11. package/.prettierrc +11 -0
  12. package/README.md +15 -0
  13. package/babel.config.js +10 -0
  14. package/build-apm.sh +9 -0
  15. package/build.sh +16 -0
  16. package/config/index.js +20 -0
  17. package/jsconfig.json +7 -0
  18. package/kuasheng-sdk/index.js +80 -0
  19. package/kuasheng-sdk/lib/assets.js +304 -0
  20. package/kuasheng-sdk/lib/context.js +199 -0
  21. package/kuasheng-sdk/lib/layout.js +346 -0
  22. package/kuasheng-sdk/lib/location.js +46 -0
  23. package/kuasheng-sdk/lib/media.js +342 -0
  24. package/kuasheng-sdk/lib/navigation.js +30 -0
  25. package/kuasheng-sdk/lib/request.js +76 -0
  26. package/kuasheng-sdk/lib/system.js +190 -0
  27. package/kuasheng-sdk/lib/userinfo.js +98 -0
  28. package/kuasheng-sdk/util/check.js +102 -0
  29. package/kuasheng-sdk/util/config.js +47 -0
  30. package/kuasheng-sdk/util/device.js +25 -0
  31. package/kuasheng-sdk/util/error.js +19 -0
  32. package/kuasheng-sdk/util/funtional.js +153 -0
  33. package/kuasheng-sdk/util/mixin.js +36 -0
  34. package/kuasheng-sdk/util/requestUtil.js +41 -0
  35. package/kuasheng-sdk/util/response.js +33 -0
  36. package/kuasheng-sdk/util/warn.js +35 -0
  37. package/kuasheng-ui/CHANGELOG.md +9 -0
  38. package/kuasheng-ui/components/card.vue +57 -0
  39. package/kuasheng-ui/components/ks-area-select/README.md +43 -0
  40. package/kuasheng-ui/components/ks-area-select/area-picker.vue +554 -0
  41. package/kuasheng-ui/components/ks-area-select/area-search.vue +363 -0
  42. package/kuasheng-ui/components/ks-area-select/areas-pop.vue +56 -0
  43. package/kuasheng-ui/components/ks-area-select/common.js +183 -0
  44. package/kuasheng-ui/components/ks-area-select/index.vue +355 -0
  45. package/kuasheng-ui/components/ks-area-select/mixins.js +216 -0
  46. package/kuasheng-ui/components/ks-area-single-select/README.md +50 -0
  47. package/kuasheng-ui/components/ks-area-single-select/hot-city.js +45 -0
  48. package/kuasheng-ui/components/ks-area-single-select/index.vue +324 -0
  49. package/kuasheng-ui/components/ks-calendar/index.vue +269 -0
  50. package/kuasheng-ui/components/ks-call-phone/call-tips.vue +70 -0
  51. package/kuasheng-ui/components/ks-call-phone/call.vue +178 -0
  52. package/kuasheng-ui/components/ks-call-phone/index.js +48 -0
  53. package/kuasheng-ui/components/ks-call-phone/index.vue +131 -0
  54. package/kuasheng-ui/components/ks-call-phone//345/221/274/345/217/253/347/273/204/344/273/266.md +0 -0
  55. package/kuasheng-ui/components/ks-date-picker/README.md +23 -0
  56. package/kuasheng-ui/components/ks-date-picker/date-picker-bottom.vue +123 -0
  57. package/kuasheng-ui/components/ks-date-picker/date-picker-dropdown.vue +80 -0
  58. package/kuasheng-ui/components/ks-date-picker/date-picker-right.vue +87 -0
  59. package/kuasheng-ui/components/ks-date-picker/date-picker-top.vue +88 -0
  60. package/kuasheng-ui/components/ks-date-picker/date-picker.js +15 -0
  61. package/kuasheng-ui/components/ks-date-picker/date-range-select.vue +92 -0
  62. package/kuasheng-ui/components/ks-date-picker/date-select.vue +65 -0
  63. package/kuasheng-ui/components/ks-date-picker/date-week-month.vue +131 -0
  64. package/kuasheng-ui/components/ks-date-picker/index.js +12 -0
  65. package/kuasheng-ui/components/ks-date-picker/mixin.js +92 -0
  66. package/kuasheng-ui/components/ks-date-picker/month-range-select.vue +129 -0
  67. package/kuasheng-ui/components/ks-date-picker/month-select.vue +85 -0
  68. package/kuasheng-ui/components/ks-date-picker/quarter-select.vue +94 -0
  69. package/kuasheng-ui/components/ks-date-picker/style.less +121 -0
  70. package/kuasheng-ui/components/ks-date-picker/utils.js +109 -0
  71. package/kuasheng-ui/components/ks-date-picker/week-select.vue +99 -0
  72. package/kuasheng-ui/components/ks-decrypt/index.vue +159 -0
  73. package/kuasheng-ui/components/ks-employee/README.md +78 -0
  74. package/kuasheng-ui/components/ks-employee/employee-input.vue +173 -0
  75. package/kuasheng-ui/components/ks-employee/employee-list.vue +662 -0
  76. package/kuasheng-ui/components/ks-employee/employee-popup.vue +197 -0
  77. package/kuasheng-ui/components/ks-employee/employee-search.vue +250 -0
  78. package/kuasheng-ui/components/ks-employee/employee-selected.vue +173 -0
  79. package/kuasheng-ui/components/ks-employee/index.js +17 -0
  80. package/kuasheng-ui/components/ks-employee/package-lock.json +5 -0
  81. package/kuasheng-ui/components/ks-employee/package.json +15 -0
  82. package/kuasheng-ui/components/ks-employee/yarn.lock +4 -0
  83. package/kuasheng-ui/components/ks-field-money/index.js +8 -0
  84. package/kuasheng-ui/components/ks-field-money/index.vue +212 -0
  85. package/kuasheng-ui/components/ks-field-money/package.json +11 -0
  86. package/kuasheng-ui/components/ks-field-money/utils.js +65 -0
  87. package/kuasheng-ui/components/ks-field-money//351/207/221/351/242/235/350/275/254/346/215/242/345/231/250.md +0 -0
  88. package/kuasheng-ui/components/ks-history-search/history-input.vue +131 -0
  89. package/kuasheng-ui/components/ks-history-search/history-list.vue +188 -0
  90. package/kuasheng-ui/components/ks-history-search/img/delete.png +0 -0
  91. package/kuasheng-ui/components/ks-history-search/index.js +9 -0
  92. package/kuasheng-ui/components/ks-history-search/index.vue +125 -0
  93. package/kuasheng-ui/components/ks-history-search/package-lock.json +5 -0
  94. package/kuasheng-ui/components/ks-history-search/package.json +15 -0
  95. package/kuasheng-ui/components/ks-history-search/utils.js +35 -0
  96. package/kuasheng-ui/components/ks-input-search/index.vue +106 -0
  97. package/kuasheng-ui/components/ks-list/index.vue +75 -0
  98. package/kuasheng-ui/components/ks-loading/index.js +16 -0
  99. package/kuasheng-ui/components/ks-month/index.vue +47 -0
  100. package/kuasheng-ui/components/ks-month/package.json +3 -0
  101. package/kuasheng-ui/components/ks-month/range.vue +172 -0
  102. package/kuasheng-ui/components/ks-month/single.vue +136 -0
  103. package/kuasheng-ui/components/ks-month/style.less +125 -0
  104. package/kuasheng-ui/components/ks-month/utils.js +35 -0
  105. package/kuasheng-ui/components/ks-nav/index.vue +264 -0
  106. package/kuasheng-ui/components/ks-nav-bar.js +35 -0
  107. package/kuasheng-ui/components/ks-org/ks-org-tree.vue +247 -0
  108. package/kuasheng-ui/components/ks-org/ks-popup-tree.vue +154 -0
  109. package/kuasheng-ui/components/ks-org/ks-tree-input.vue +240 -0
  110. package/kuasheng-ui/components/ks-org/ks-tree-node.vue +94 -0
  111. package/kuasheng-ui/components/ks-org/ks-tree.vue +229 -0
  112. package/kuasheng-ui/components/ks-org/utils.js +54 -0
  113. package/kuasheng-ui/components/ks-popover/index.vue +457 -0
  114. package/kuasheng-ui/components/ks-popover/mixin.js +28 -0
  115. package/kuasheng-ui/components/ks-popover/utils.js +60 -0
  116. package/kuasheng-ui/components/ks-pull-refresh/index.vue +43 -0
  117. package/kuasheng-ui/components/ks-quarter/index.vue +256 -0
  118. package/kuasheng-ui/components/ks-table/README.md +103 -0
  119. package/kuasheng-ui/components/ks-table/cell.vue +31 -0
  120. package/kuasheng-ui/components/ks-table/index.js +8 -0
  121. package/kuasheng-ui/components/ks-table/index.less +486 -0
  122. package/kuasheng-ui/components/ks-table/index.vue +1088 -0
  123. package/kuasheng-ui/components/ks-table/package.json +12 -0
  124. package/kuasheng-ui/components/ks-table/release.md +7 -0
  125. package/kuasheng-ui/components/ks-toast.js +35 -0
  126. package/kuasheng-ui/components/ks-upload/index.vue +174 -0
  127. package/kuasheng-ui/components/ks-user-access.vue +229 -0
  128. package/kuasheng-ui/components/no-data/README.md +45 -0
  129. package/kuasheng-ui/components/no-data/image.js +1 -0
  130. package/kuasheng-ui/components/no-data/index.vue +83 -0
  131. package/kuasheng-ui/components/notice-bar.vue +16 -0
  132. package/kuasheng-ui/components/steps.js +11 -0
  133. package/kuasheng-ui/components/tabs.vue +40 -0
  134. package/kuasheng-ui/index.js +239 -0
  135. package/kuasheng-ui/patch/datetime-picker/datetimePicker.md +0 -0
  136. package/kuasheng-ui/patch/datetime-picker/index.js +46 -0
  137. package/kuasheng-ui/patch/datetime-picker/utils.js +78 -0
  138. package/kuasheng-ui/patch/field/field.md +1 -0
  139. package/kuasheng-ui/patch/field/index.js +122 -0
  140. package/kuasheng-ui/patch/field/utils.js +36 -0
  141. package/kuasheng-ui/patch/form/form.md +7 -0
  142. package/kuasheng-ui/patch/form/index.js +106 -0
  143. package/kuasheng-ui/patch/index.js +12 -0
  144. package/kuasheng-ui/patch/pagination/index.js +78 -0
  145. package/kuasheng-ui/style/animation-ui.less +31 -0
  146. package/kuasheng-ui/style/font/number/font-number1.otf +0 -0
  147. package/kuasheng-ui/style/font/number/font-number2.ttf +0 -0
  148. package/kuasheng-ui/style/images/checked.svg +1 -0
  149. package/kuasheng-ui/style/images/success.svg +1 -0
  150. package/kuasheng-ui/style/index.less +6 -0
  151. package/kuasheng-ui/style/kuasheng-ui.less +207 -0
  152. package/kuasheng-ui/style/reset-vant.less +307 -0
  153. package/kuasheng-ui/style/vant-var.less +138 -0
  154. package/kuasheng-ui/utils/apis.js +17 -0
  155. package/kuasheng-ui/utils/axios-adapter.js +47 -0
  156. package/kuasheng-ui/utils/bem.js +39 -0
  157. package/kuasheng-ui/utils/bus.js +97 -0
  158. package/kuasheng-ui/utils/common.js +88 -0
  159. package/kuasheng-ui/utils/decrypt/config.js +12 -0
  160. package/kuasheng-ui/utils/decrypt/decrypt-api.js +139 -0
  161. package/kuasheng-ui/utils/decrypt/index.js +6 -0
  162. package/kuasheng-ui/utils/decrypt/mask.js +36 -0
  163. package/kuasheng-ui/utils/decrypt/virtual.js +44 -0
  164. package/kuasheng-ui/utils/directive.js +57 -0
  165. package/kuasheng-ui/utils/directive.md +23 -0
  166. package/kuasheng-ui/utils/drcheck-plugin.js +219 -0
  167. package/kuasheng-ui/utils/error-plugin.js +88 -0
  168. package/kuasheng-ui/utils/filter.js +149 -0
  169. package/kuasheng-ui/utils/http-interceptors.js +18 -0
  170. package/kuasheng-ui/utils/http.js +140 -0
  171. package/kuasheng-ui/utils/index.js +5 -0
  172. package/kuasheng-ui/utils/init-event.js +20 -0
  173. package/kuasheng-ui/utils/log.js +309 -0
  174. package/kuasheng-ui/utils/token.js +9 -0
  175. package/kuasheng-ui/utils/type.js +45 -0
  176. package/kuasheng-ui/utils/validate.js +20 -0
  177. package/kuasheng-ui/utils/watermark.js +67 -0
  178. package/kuasheng-ui/version.js +1 -0
  179. package/ky-apm/client.js +37 -0
  180. package/ky-apm/customHttp.js +38 -0
  181. package/ky-apm/index.js +68 -0
  182. package/ky-apm/plugins/performance.js +84 -0
  183. package/ky-apm/plugins/self-error.js +26 -0
  184. package/ky-apm/warn-log.js +3 -0
  185. package/package.json +81 -10
  186. package/plugin/ks-chii-webpack-html/index.js +53 -0
  187. package/plugin/ks-chii-webpack-html/package.json +16 -0
  188. package/postcss.config.js +15 -0
  189. package/public/capsule-positon.js +50 -0
  190. package/public/fonts/DingTalkJinBuTi.ttf +0 -0
  191. package/public/framework/axios@0.19.0.min.js +9 -0
  192. package/public/framework/fastclick@1.0.6.min.js +1 -0
  193. package/public/framework/iconfont/iconfont.css +91 -0
  194. package/public/framework/iconfont/iconfont.js +1 -0
  195. package/public/framework/iconfont/iconfont.json +142 -0
  196. package/public/framework/iconfont/iconfont.ttf +0 -0
  197. package/public/framework/iconfont/iconfont.woff +0 -0
  198. package/public/framework/iconfont/iconfont.woff2 +0 -0
  199. package/public/framework/vant@2.5.6.min.js +7 -0
  200. package/public/framework/vue-router@3.1.3.min.js +6 -0
  201. package/public/framework/vue@2.6.10.runtime.min.js +6 -0
  202. package/public/framework/vuex@3.1.1.min.js +6 -0
  203. package/public/index.html +260 -0
  204. package/public/ks@3.0.8.umd.min.js +1 -0
  205. package/public/ksui@4.0.27.umd.min.js +10 -0
  206. package/public/status-bar-preset.js +39 -0
  207. package/{index.js → qt-npm/index.js} +3 -3
  208. package/qt-npm/package.json +13 -0
  209. package/src/App.vue +204 -0
  210. package/src/README.md +15 -0
  211. package/src/common/README.md +94 -0
  212. package/src/common/http/axios-adapter.js +47 -0
  213. package/src/common/http/common.js +88 -0
  214. package/src/common/http/http-interceptors.js +18 -0
  215. package/src/common/http/http-lock.js +45 -0
  216. package/src/common/http/index.js +163 -0
  217. package/src/common/http/token.js +9 -0
  218. package/src/common/styles/font/AlibabaSans102Ver2-Md.ttf +0 -0
  219. package/src/common/styles/font.less +12 -0
  220. package/src/common/styles/variables.less +43 -0
  221. package/src/common/utils/index.js +1 -0
  222. package/src/common/utils/platform/README.md +1 -0
  223. package/src/common/utils/platform/android/.gitkeep +0 -0
  224. package/src/common/utils/platform/core/index.js +24 -0
  225. package/src/common/utils/platform/index.js +164 -0
  226. package/src/common/utils/platform/ios/.gitkeep +0 -0
  227. package/src/common/utils/platform/subscribe/helper.js +38 -0
  228. package/src/common/utils/platform/subscribe/index.js +204 -0
  229. package/src/common/utils/platform/subscribe/table-animation.js +75 -0
  230. package/src/config/index.js +31 -0
  231. package/src/config.js +1 -0
  232. package/src/main.js +73 -0
  233. package/src/router.js +52 -0
  234. package/src/view/home/config.js +101 -0
  235. package/src/view/home/demo1.vue +223 -0
  236. package/src/view/home/demo2.vue +124 -0
  237. package/src/view/home/demo3.vue +51 -0
  238. package/src/view/home/demo4.vue +140 -0
  239. package/src/view/home/index.vue +97 -0
  240. package/src/view/home/query-table/README.md +45 -0
  241. package/src/view/home/query-table/api/index.js +12 -0
  242. package/src/view/home/query-table/assets/horizontal-back.svg +1 -0
  243. package/src/view/home/query-table/components/pe-table/cell.js +181 -0
  244. package/src/view/home/query-table/components/pe-table/collapse.js +334 -0
  245. package/src/view/home/query-table/components/pe-table/empty.vue +48 -0
  246. package/src/view/home/query-table/components/pe-table/header.js +328 -0
  247. package/src/view/home/query-table/components/pe-table/images/abnormal.png +0 -0
  248. package/src/view/home/query-table/components/pe-table/images/empty.png +0 -0
  249. package/src/view/home/query-table/components/pe-table/images/fold.svg +1 -0
  250. package/src/view/home/query-table/components/pe-table/images/sort.svg +1 -0
  251. package/src/view/home/query-table/components/pe-table/images/sorting.svg +1 -0
  252. package/src/view/home/query-table/components/pe-table/images/unfold.svg +1 -0
  253. package/src/view/home/query-table/components/pe-table/index.vue +847 -0
  254. package/src/view/home/query-table/components/pe-table/load-more.js +46 -0
  255. package/src/view/home/query-table/components/pe-table/props/index.js +193 -0
  256. package/src/view/home/query-table/components/pe-table/row.vue +118 -0
  257. package/src/view/home/query-table/components/pe-table/scrollbar.js +424 -0
  258. package/src/view/home/query-table/components/pe-table/stretch-damping.js +112 -0
  259. package/src/view/home/query-table/components/pe-table/style/cell.less +89 -0
  260. package/src/view/home/query-table/components/pe-table/style/empty.less +48 -0
  261. package/src/view/home/query-table/components/pe-table/style/header.less +141 -0
  262. package/src/view/home/query-table/components/pe-table/style/index.less +88 -0
  263. package/src/view/home/query-table/components/pe-table/style/load-more.less +61 -0
  264. package/src/view/home/query-table/components/pe-table/style/row.less +6 -0
  265. package/src/view/home/query-table/components/pe-table/table-loading.vue +120 -0
  266. package/src/view/home/query-table/components/pe-table/table-total.vue +57 -0
  267. package/src/view/home/query-table/components/pe-table/utils/animate.js +80 -0
  268. package/src/view/home/query-table/components/pe-table/utils/columns.js +290 -0
  269. package/src/view/home/query-table/components/pe-table/utils/data.js +12 -0
  270. package/src/view/home/query-table/components/pe-table/utils/fixed.js +69 -0
  271. package/src/view/home/query-table/components/pe-table/utils/formatter.js +327 -0
  272. package/src/view/home/query-table/components/pe-table/utils/render-cells.js +424 -0
  273. package/src/view/home/query-table/components/pe-table/utils/slot.js +28 -0
  274. package/src/view/home/query-table/components/pe-table/utils/tools.js +84 -0
  275. package/src/view/home/query-table/components/pe-table/utils/touch-scroll.js +417 -0
  276. package/src/view/home/query-table/components/query-table/index.vue +497 -0
  277. package/src/view/home/query-table/components/query-table/mixins/column-mixin.js +102 -0
  278. package/src/view/home/query-table/components/query-table/mixins/column-setting.js +143 -0
  279. package/src/view/home/query-table/components/query-table/mixins/data-mixin.js +519 -0
  280. package/src/view/home/query-table/components/query-table/mixins/pagination-mixin.js +26 -0
  281. package/src/view/home/query-table/components/query-table/mixins/table-fixed.js +130 -0
  282. package/src/view/home/query-table/components/query-table/mixins/table-horizontal.js +119 -0
  283. package/src/view/home/query-table/components/table-horizontal.vue +99 -0
  284. package/src/view/home/query-table/components/table-pagination.vue +32 -0
  285. package/src/view/home/query-table/components/table-settings/assets/arrpw-up.svg +1 -0
  286. package/src/view/home/query-table/components/table-settings/assets/disabled-down.svg +1 -0
  287. package/src/view/home/query-table/components/table-settings/assets/disabled-up.svg +1 -0
  288. package/src/view/home/query-table/components/table-settings/assets/down.svg +1 -0
  289. package/src/view/home/query-table/components/table-settings/assets/up.svg +1 -0
  290. package/src/view/home/query-table/components/table-settings/index.less +294 -0
  291. package/src/view/home/query-table/components/table-settings/index.vue +260 -0
  292. package/src/view/home/query-table/components/table-settings/settings.vue +479 -0
  293. package/src/view/home/query-table/components/table-settings/test.js +626 -0
  294. package/src/view/home/query-table/components/table-settings//344/270/252/346/200/247/350/256/276/347/275/256.md +0 -0
  295. package/src/view/home/query-table/components/tooltip.js +124 -0
  296. package/src/view/home/query-table/hooks/use-cache-promise.js +27 -0
  297. package/src/view/home/query-table/hooks/use-column-config.js +190 -0
  298. package/src/view/home/query-table/hooks/use-encryption.js +0 -0
  299. package/src/view/home/query-table/hooks/use-generic-search.js +95 -0
  300. package/src/view/home/query-table/index.js +7 -0
  301. package/src/view/home/query-table/store/column-store.js +0 -0
  302. package/src/view/home/query-table/styles/table.less +24 -0
  303. package/src/view/home/query-table/utils/column.js +36 -0
  304. package/src/view/home/query-table/utils/config.js +12 -0
  305. package/src/view/home/query-table/utils/encryption.js +32 -0
  306. package/src/view/home/query-table/utils/http.js +1 -0
  307. package/src/view/home/query-table/utils/localStorage.js +35 -0
  308. package/src/view/home//351/246/226/351/241/265.md +0 -0
  309. package/src/web.js +99 -0
  310. package/vue.config.js +131 -0
@@ -0,0 +1,138 @@
1
+ // 品牌色
2
+ @red: #FD4948;
3
+ @field-error: #FF706D;
4
+ @orange: #FE743C;
5
+ @orange-light: #FFEDDD;
6
+ @purple: #165DFF;
7
+ @purple-light: #F1F0FF;
8
+ @green: #3CD081;
9
+ @tab-active: #03050D;
10
+ @base-size: 4px;
11
+ @button-disabled-opacity: 0.5;
12
+
13
+ // font
14
+ @font-size-md: 16px;
15
+
16
+ // border
17
+ @border-color: #D9D9D9;
18
+
19
+ // 按钮
20
+ @button-default-height: @base-size * 8;
21
+ @button-default-line-height: @base-size * 8 - 2;
22
+ @button-primary-background-color: @purple;
23
+ @button-primary-border-color: @purple;
24
+ @button-info-background-color: @green;
25
+ @button-info-border-color: @green;
26
+ @button-border-radius: @border-radius-md;
27
+ @button-large-height: @base-size * 10;
28
+ @button-large-line-height: @base-size * 10 - 2;
29
+ @button-small-height: @base-size * 6;
30
+ @button-small-line-height:@base-size * 6 - 2;
31
+ // 导航栏
32
+ @nav-bar-text-color: @purple;
33
+ @nav-bar-icon-color: @purple;
34
+
35
+ // 弹出层
36
+ @popup-round-border-radius: 12px;
37
+
38
+ // cell
39
+ @cell-vertical-padding: 11px;
40
+ @cell-font-size: 14px;
41
+
42
+ // Field
43
+ @field-error-message-color: @field-error;
44
+ @field-input-error-text-color: @field-error;
45
+
46
+
47
+ // dialog
48
+ @dialog-border-radius: @border-radius-lg;
49
+ @dialog-confirm-button-text-color: @purple;
50
+
51
+ // 标签页
52
+ @tabs-default-color: @purple;
53
+ @tabs-line-height: @base-size * 11;
54
+
55
+ // 标签栏
56
+ @tabbar-item-active-color: @purple;
57
+
58
+ // 选择器
59
+ @picker-action-text-color: @purple;
60
+
61
+ // tab
62
+ @tab-active-text-color: @tab-active;
63
+
64
+ // TabBar
65
+ @tabbar-height: 60px;
66
+
67
+ // TabBar-item
68
+ @tabbar-item-text-color: #B0B3BF;
69
+
70
+
71
+ // tag
72
+ @tag-border-radius: 4px;
73
+ @tag-primary-color: @purple;
74
+ @tag-dander-color: @red;
75
+
76
+ // stepper
77
+ @stepper-button-icon-color:#6B6E7D;
78
+ @stepper-input-text-color: #03050D;
79
+
80
+ // steps
81
+ @step-finish-line-color: @purple;
82
+
83
+ // checkbox
84
+ @checkbox-checked-icon-color: @purple;
85
+
86
+ // radio
87
+ @radio-checked-icon-color: @purple;
88
+ @radio-size: 18px;
89
+
90
+ // switch
91
+ @switch-on-background-color: @purple;
92
+
93
+ // pagination
94
+ @pagination-item-default-color: @purple;
95
+ @pagination-font-size: 14px;
96
+ @pagination-height: 32px;
97
+ @pagination-item-width: 32px;
98
+ @pagination-item-disabled-color: #D7D7DB;
99
+ @pagination-item-disabled-background-color: #f2f3f8;
100
+
101
+ // progress
102
+ @progress-color: @purple;
103
+ @progress-pivot-background-color: @purple;
104
+
105
+ // sidebar
106
+ @sidebar-selected-border-color: @purple;
107
+ @sidebar-line-height: @base-size * 6;
108
+ @sidebar-padding: @base-size * 3 @padding-sm @base-size * 3 0;
109
+
110
+ // info
111
+ // @info-background-color: @purple;
112
+ // @info-dot-color: @purple;
113
+
114
+ // noticeBar
115
+ @notice-bar-text-color: @purple;
116
+ @notice-bar-background-color: @purple-light;
117
+ @notice-bar-height: 44px;
118
+
119
+ // tree-select
120
+ @tree-select-item-active-color: @purple;
121
+ @tree-select-nav-item-padding: 10px 0px;
122
+ @tree-select-font-size: 14px;
123
+
124
+ // action-sheet
125
+ @action-sheet-max-height: 60%;
126
+ @action-sheet-cancel-padding-top: 6px;
127
+ @action-sheet-item-line-height: 56px;
128
+ @action-sheet-cancel-padding-color: #f3f4f6;
129
+ @action-sheet-item-text-color: #000000;
130
+
131
+ // 日历
132
+ @calendar-range-edge-background-color: @purple;
133
+ @calendar-range-middle-color: @purple;
134
+
135
+ .ks-safe-area-top {
136
+ padding-top: constant(safe-area-inset-top);
137
+ padding-top: env(safe-area-inset-top);
138
+ }
@@ -0,0 +1,17 @@
1
+ import { http } from './http'
2
+
3
+ /**
4
+ * 请求接口获取菜单下按钮(接口)权限
5
+ * @param {array} ids
6
+ */
7
+ export const getMenuAuth = (ids = []) => {
8
+ return http('auth.menu.resources.userPermissionCode', 10132, {ids})
9
+ }
10
+
11
+ /**
12
+ * 请求接口获取数据字典
13
+ * @param {array} codes
14
+ */
15
+ export const getLookup = (codes = []) => {
16
+ return http('system.lookupValue.BatchByCode', 10124, codes)
17
+ }
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ export default function xhrAdapter(config) {
4
+ const isProd = navigator.userAgent.includes('ks_prod')
5
+ if (config._debug !== false && !isProd) {
6
+ console.log(`[request] ${config.headers.method}`, config)
7
+ }
8
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
9
+ // 超时定时器
10
+ let timer = setTimeout(() => {
11
+ const error = {message: `timeout of ${config.timeout}ms exceeded`}
12
+ error._config = config
13
+ reject(error)
14
+ }, config.timeout)
15
+
16
+ config.headers['appkey'] = config.headers.appkey && String(config.headers.appkey)
17
+ ks.request(config.headers.method,JSON.parse(config.data), config.headers).then(function(res){
18
+
19
+ // 请求成功清除定时器
20
+ clearTimeout(timer)
21
+
22
+ if (config._debug !== false && !isProd) {
23
+ console.log(`[response] ${config.headers.method}`, res)
24
+ }
25
+
26
+ let responseData = res
27
+ let response = {
28
+ data: responseData,
29
+ status: 200,
30
+ statusText: 'OK',
31
+ headers: config.headers,
32
+ config: config,
33
+ request: config
34
+ }
35
+ resolve(response)
36
+ }).catch(function(error){
37
+
38
+ clearTimeout(timer)
39
+
40
+ if (config._debug !== false && !isProd) {
41
+ console.log(`[failed] ${config.headers.method}`, error)
42
+ }
43
+ error._config = config
44
+ reject(error)
45
+ })
46
+ })
47
+ }
@@ -0,0 +1,39 @@
1
+ const ELEMENT = '__'
2
+ const MODS = '--'
3
+
4
+ function join(name, el, symbol) {
5
+ return el ? name + symbol + el : name
6
+ }
7
+
8
+ function prefix(name, mods) {
9
+ if (typeof mods === 'string') {
10
+ return [join(name, mods, MODS)]
11
+ }
12
+
13
+ if (Array.isArray(mods)) {
14
+ return mods.map(item => prefix(name, item))
15
+ }
16
+
17
+ const res = []
18
+ if (mods) {
19
+ Object.keys(mods).forEach(key => {
20
+ if(mods[key]){
21
+ res.push(name + MODS + key)
22
+ }
23
+ })
24
+ }
25
+
26
+ return res
27
+ }
28
+
29
+ export function createBEM(name) {
30
+ return function(el, mods) {
31
+ if (el && typeof el !== 'string') {
32
+ mods = el
33
+ el = ''
34
+ }
35
+ el = join(name, el, ELEMENT)
36
+ const bemClass = mods ? [el, ...prefix(el, mods)] : [el]
37
+ return bemClass
38
+ }
39
+ }
@@ -0,0 +1,97 @@
1
+ function Bus () {
2
+ this._events = Object.create(null)
3
+ }
4
+ function toArray (list, start) {
5
+ start = start || 0
6
+ var i = list.length - start
7
+ var ret = new Array(i)
8
+ while (i--) {
9
+ ret[i] = list[i + start]
10
+ }
11
+ return ret
12
+ }
13
+ let hookRE = /^hook:/
14
+ Bus.prototype.$on = function (event, fn) {
15
+ var vm = this
16
+ if (Array.isArray(event)) {
17
+ for (var i = 0, l = event.length; i < l; i++) {
18
+ vm.$on(event[i], fn)
19
+ }
20
+ } else {
21
+ (vm._events[event] || (vm._events[event] = [])).push(fn)
22
+ // optimize hook:event cost by using a boolean flag marked at registration
23
+ // instead of a hash lookup
24
+ if (hookRE.test(event)) {
25
+ vm._hasHookEvent = true
26
+ }
27
+ }
28
+ return vm
29
+ }
30
+
31
+ Bus.prototype.$once = function (event, fn) {
32
+ var vm = this
33
+ function on () {
34
+ vm.$off(event, on)
35
+ fn.apply(vm, arguments)
36
+ }
37
+ on.fn = fn
38
+ vm.$on(event, on)
39
+ return vm
40
+ }
41
+
42
+ Bus.prototype.$off = function (event, fn) {
43
+ var vm = this
44
+ // all
45
+ if (!arguments.length) {
46
+ vm._events = Object.create(null)
47
+ return vm
48
+ }
49
+ // array of events
50
+ if (Array.isArray(event)) {
51
+ for (var i = 0, l = event.length; i < l; i++) {
52
+ vm.$off(event[i], fn)
53
+ }
54
+ return vm
55
+ }
56
+ // specific event
57
+ var cbs = vm._events[event]
58
+ if (!cbs) {
59
+ return vm
60
+ }
61
+ if (!fn) {
62
+ vm._events[event] = null
63
+ return vm
64
+ }
65
+ if (fn) {
66
+ // specific handler
67
+ var cb
68
+ var i$1 = cbs.length
69
+ while (i$1--) {
70
+ cb = cbs[i$1]
71
+ if (cb === fn || cb.fn === fn) {
72
+ cbs.splice(i$1, 1)
73
+ break
74
+ }
75
+ }
76
+ }
77
+ return vm
78
+ }
79
+
80
+ Bus.prototype.$emit = function (event) {
81
+ var vm = this
82
+ var cbs = vm._events[event]
83
+ if (cbs) {
84
+ cbs = cbs.length > 1 ? toArray(cbs) : cbs
85
+ var args = toArray(arguments, 1)
86
+ for (var i = 0, l = cbs.length; i < l; i++) {
87
+ try {
88
+ cbs[i].apply(vm, args)
89
+ } catch (e) {
90
+ console.error(e, vm, ('event handler for "' + event + '"'))
91
+ }
92
+ }
93
+ }
94
+ return vm
95
+ }
96
+
97
+ export default new Bus()
@@ -0,0 +1,88 @@
1
+ import md5 from "js-md5"
2
+
3
+ const ENV_TYPES = {
4
+ prd: 'ks_prod',
5
+ uat: 'ks_uat',
6
+ stg: 'ks_stg',
7
+ dev: 'ks_dev'
8
+ }
9
+
10
+ const KS_URL_CONFIG = {
11
+ [ENV_TYPES.prd]: 'https://api.ycfm-erp.com',
12
+ [ENV_TYPES.uat]: 'http://api-uat.baoguozs.com',
13
+ [ENV_TYPES.stg]: 'http://api-stg.kyeapi.com',
14
+ [ENV_TYPES.dev]: 'http://api-dev.baoguozs.com'
15
+ }
16
+
17
+ export const random = (count) => {
18
+ let num = Date.now() + Math.floor(1000 * Math.random() + 1000)
19
+ if (count) {
20
+ return num.toString().substr(-count)
21
+ }
22
+ return num.toString()
23
+ }
24
+
25
+ export const md5Http = (token, timestamp, body) => {
26
+ return md5(md5(token).toUpperCase() + timestamp + JSON.stringify(body || {})).toUpperCase()
27
+ }
28
+
29
+ export const getXWebTraceId = (userId, menuId, now) => {
30
+ let log = window.ksui && window.ksui.log
31
+ let startTime = log && log.initTime || now
32
+ return `${userId}-${menuId || 'xxxx'}-${startTime}-${log && log.lastActionId || ''}-${random(4)}`
33
+ }
34
+
35
+ // 判断是否在环境
36
+ export const isKSClient = () => {
37
+ return navigator.userAgent.toLowerCase().indexOf('kuasheng-2.0') >= 0
38
+ }
39
+
40
+ // 获取当前环境
41
+ export const getKsEnv = () => {
42
+ return Object.keys(ENV_TYPES).find(type =>
43
+ navigator.userAgent.includes(ENV_TYPES[type])
44
+ )
45
+ }
46
+
47
+ // 获取当前环境对应的请求域名
48
+ export const getKsEnvUrl = () => {
49
+ const envType = getKsEnv()
50
+ const url = envType ? KS_URL_CONFIG[ENV_TYPES[envType]] : null
51
+ console.info(`当前轻应用走的是 XHR 请求,代理地址为${url}`)
52
+ return url
53
+ }
54
+
55
+ export const getValue = (key, obj, getSourceOfKey) => {
56
+ if (!key) {
57
+ return ''
58
+ }
59
+ let source = null
60
+ // 解析键的属性和数组索引
61
+ const parseKey = (k) => {
62
+ const index = k.indexOf('[')
63
+ return {
64
+ prop: index > 0 ? k.substr(0, index) : k,
65
+ arrayIndex: index > 0 ? +k.substring(index + 1, k.length - 1) : undefined,
66
+ }
67
+ }
68
+
69
+ // 处理每个键的情况
70
+ const handleKey = (s, k, isLast) => {
71
+ const { prop, arrayIndex } = parseKey(k)
72
+ const value = s[prop]
73
+ source = s
74
+ if (isLast) {
75
+ return arrayIndex !== undefined ? (value || [])[arrayIndex] : value
76
+ }
77
+ return arrayIndex !== undefined ? (value || [])[arrayIndex] || {} : value || {}
78
+ }
79
+
80
+ if (key.includes('.')) {
81
+ const keys = key.split('.')
82
+ const value = keys.reduce((s, k, i) => handleKey(s, k, i === keys.length - 1), obj)
83
+ return getSourceOfKey ? { source, value } : value
84
+ } else {
85
+ const value = handleKey(obj, key, true)
86
+ return getSourceOfKey ? { source, value } : value
87
+ }
88
+ }
@@ -0,0 +1,12 @@
1
+ const sysAppKey = '10124'
2
+ const virtualAppKey = '55041'
3
+
4
+ export const DECRYPT_CONFIG = {
5
+ maskTips: '如非必要请勿查看,此操作会联动风控系统监控!',
6
+ maskTitle: '温馨提示',
7
+ maskDecryptUrl: 'syslog.sensitiveFieldViewLog.save',
8
+ maskAppKey: sysAppKey,
9
+ // 虚拟
10
+ virtualDecryptUrl: 'basevirtual.virtualPhone.getVirtualNumber',
11
+ virtualAppKey,
12
+ }
@@ -0,0 +1,139 @@
1
+ import { isString } from '../type'
2
+ import { getValue } from '../common'
3
+ import { decryptMask } from './mask'
4
+ import { decryptVirtual } from './virtual'
5
+
6
+ const getMaskVal = (data = {}, key) => getValue(key, data)
7
+ const getMaskSecVal = (data = {}, key) => getValue(key, data)
8
+ const getVirtualVal = (data = {}, key) => getValue(key, data)
9
+ const matchEncrypteSymbol = (t, encrypteSymbol) => t.includes(encrypteSymbol)
10
+
11
+ export class DecryptApi {
12
+ constructor() {
13
+ /**
14
+ * @overview 加密配置
15
+ */
16
+ this.config = {
17
+ ENCRYPTE_MASK_SYMBOL: '*',
18
+ ENCRYPTE_MASKSEC_SYMBOL: '✽',
19
+ MASK_KEY: 'Mask',
20
+ VIRTUAL_KEY: 'Virtual',
21
+ MASKSEC_KEY: 'MaskSec'
22
+ }
23
+ }
24
+
25
+ /**
26
+ * @overview 获取不同加密类型key
27
+ * @param {key} 数据key名称
28
+ */
29
+ getMaskKey(key) {
30
+ const { MASK_KEY } = this.config
31
+ return `${key}${MASK_KEY}`
32
+ }
33
+ getVirtualkey(key) {
34
+ const { VIRTUAL_KEY } = this.config
35
+ return `${key}${VIRTUAL_KEY}`
36
+ }
37
+ getMaskSeckey(key) {
38
+ const { MASKSEC_KEY } = this.config
39
+ return `${key}${MASKSEC_KEY}`
40
+ }
41
+
42
+ isEncryptedByString(d = {}, key) {
43
+ const val = isString(d) ? d : getValue(key, d)
44
+ if (!val) return
45
+ const { ENCRYPTE_MASK_SYMBOL, ENCRYPTE_MASKSEC_SYMBOL } = this.config
46
+ return !!matchEncrypteSymbol(val, ENCRYPTE_MASK_SYMBOL) || matchEncrypteSymbol(val, ENCRYPTE_MASKSEC_SYMBOL)
47
+ }
48
+
49
+ /**
50
+ * @overview 是否加密类型
51
+ * @param {d} 数据对象
52
+ * @param {key} 数据key名称
53
+ */
54
+ isEncrypted(d, key) {
55
+ if (d && isString(d)) {
56
+ return this.isEncryptedByString(d)
57
+ } else {
58
+ return !!this.getEncrypteText(d, key)
59
+ }
60
+ }
61
+
62
+ /**
63
+ * @overview 获取密文
64
+ * @param {d} 数据对象
65
+ * @param {key} 数据key名称
66
+ */
67
+ getEncrypteText(d, key) {
68
+ return this.getMaskVal(d, key) || this.getVirtualVal(d, key) || this.getMaskSecVal(d, key)
69
+ }
70
+
71
+ /**
72
+ * @overview 判断是否加密字段
73
+ * @param {d} 数据对象
74
+ * @param {key} 数据key名称
75
+ */
76
+ isMask(d, key) {
77
+ return !!this.getMaskVal(d, key)
78
+ }
79
+ getMaskVal(d, key) {
80
+ return getMaskVal(d, this.getMaskKey(key))
81
+ }
82
+
83
+ /**
84
+ * @overview 判断是否虚拟号
85
+ * @param {d} 数据对象
86
+ * @param {key} 数据key名称
87
+ */
88
+ isVirtual(d, key) {
89
+ return !!this.getVirtualVal(d, key)
90
+ }
91
+ getVirtualVal(d, key) {
92
+ return getVirtualVal(d, this.getVirtualkey(key))
93
+ }
94
+
95
+ /**
96
+ * @overview 判断是否敏感字段
97
+ * @param {d} 数据对象
98
+ * @param {key} 数据key名称
99
+ */
100
+ isMaskSec(d, key) {
101
+ return !!this.getMaskSecVal(d, key)
102
+ }
103
+ getMaskSecVal(d, key) {
104
+ return getMaskSecVal(d, this.getMaskSeckey(key))
105
+ }
106
+
107
+ /**
108
+ * @overview 解密方法
109
+ * @returnType {Promise}
110
+ * @param {type} 解密类型 ['mask', 'virtual']
111
+ * @param {params} 加密对象
112
+ * @property {params.fieldName} 字段名(必填)
113
+ * @property {params.fieldContent} 字段内容,加密值(必填)
114
+ * @property {params.dataId} 唯一值,通常用的数据id(必填)
115
+ * @property {params.buttonName} 按钮名称(必填)
116
+ * @property {params.fieldNameStr} 字段中文名,类似from表单的label
117
+ */
118
+ async decrypt(params, type, options) {
119
+ if(!params) return
120
+ const maskKey = this.config.MASK_KEY.toLowerCase()
121
+ const virtualKey = this.config.VIRTUAL_KEY.toLowerCase()
122
+ // 加密字段
123
+ if (!type || type === maskKey) {
124
+ return decryptMask(params, options)
125
+ // 虚拟字段
126
+ } else if (type === virtualKey) {
127
+ return decryptVirtual(params, options)
128
+ }
129
+ return ''
130
+ }
131
+
132
+ /**
133
+ * @overview 批量解密
134
+ */
135
+ batchDecrypt() {
136
+ console.log('批量解密')
137
+ }
138
+ }
139
+
@@ -0,0 +1,6 @@
1
+ import { DecryptApi } from './decrypt-api'
2
+
3
+ const decryptApi = new DecryptApi()
4
+ export {
5
+ decryptApi
6
+ }
@@ -0,0 +1,36 @@
1
+ import { http } from '../http'
2
+ import { DECRYPT_CONFIG } from './config'
3
+
4
+ export async function decryptMask(params = {}, options = {}) {
5
+ try {
6
+ if (options.showTips !== false) {
7
+ await vant.Dialog.confirm({
8
+ title: options.maskTitle || DECRYPT_CONFIG.maskTitle,
9
+ message: options.maskTips || DECRYPT_CONFIG.maskTips
10
+ })
11
+ }
12
+ const {
13
+ dataId = crypto && crypto.randomUUID(),
14
+ moduleCode,
15
+ fieldName,
16
+ fieldContent,
17
+ } = params
18
+
19
+ const _params = {
20
+ dataId: dataId,
21
+ moduleCode,
22
+ fieldName,
23
+ fieldContent,
24
+ fieldNameStr: params.fieldNameStr || '',
25
+ buttonName: params.buttonName || ''
26
+ }
27
+ return http(
28
+ DECRYPT_CONFIG.maskDecryptUrl,
29
+ DECRYPT_CONFIG.maskAppKey,
30
+ _params
31
+ )
32
+ } catch (err) {
33
+ console.log(err)
34
+ }
35
+ }
36
+
@@ -0,0 +1,44 @@
1
+ import { http } from '../http'
2
+ import { DECRYPT_CONFIG } from './config'
3
+
4
+ export async function decryptVirtual(params = {}) {
5
+ try {
6
+ const user = params.userInfo || {}
7
+
8
+ const {
9
+ dataId = crypto && crypto.randomUUID(),
10
+ moduleCode,
11
+ fieldName,
12
+ fieldContent,
13
+ calloutPhone,
14
+ business='SYS'
15
+ } = params
16
+
17
+ const _params = {
18
+ dataId,
19
+ moduleCode,
20
+ fieldName,
21
+ fieldContent,
22
+ fieldNameStr: params.fieldNameStr || '',
23
+ buttonName: params.buttonName || '',
24
+ source: '10', // 内部app标识
25
+ company: 'kye-xkj',
26
+ proposerId: user.id,
27
+ proposer: user.name,
28
+ position: user.duty,
29
+ departmentId: user.departmentId,
30
+ department: user.departmentInfo ? user.departmentInfo.departmentRoute : user.department,
31
+ calloutPhone,
32
+ business
33
+ }
34
+
35
+ return http(
36
+ DECRYPT_CONFIG.virtualDecryptUrl,
37
+ DECRYPT_CONFIG.virtualAppKey,
38
+ _params
39
+ )
40
+ } catch (err) {
41
+ console.log(err)
42
+ }
43
+ }
44
+