n20-common-lib 1.3.8 → 1.3.11

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 (263) hide show
  1. package/nstc-g6/assets/svg/404.svg +1 -0
  2. package/nstc-g6/assets/svg/addFile.svg +32 -0
  3. package/nstc-g6/assets/svg/bug.svg +1 -0
  4. package/nstc-g6/assets/svg/chart.svg +1 -0
  5. package/nstc-g6/assets/svg/clipboard.svg +1 -0
  6. package/nstc-g6/assets/svg/component.svg +1 -0
  7. package/nstc-g6/assets/svg/dashboard.svg +1 -0
  8. package/nstc-g6/assets/svg/deleteFile.svg +28 -0
  9. package/nstc-g6/assets/svg/documentation.svg +1 -0
  10. package/nstc-g6/assets/svg/drag.svg +1 -0
  11. package/nstc-g6/assets/svg/edit.svg +1 -0
  12. package/nstc-g6/assets/svg/education.svg +1 -0
  13. package/nstc-g6/assets/svg/email.svg +1 -0
  14. package/nstc-g6/assets/svg/example.svg +1 -0
  15. package/nstc-g6/assets/svg/excel.svg +1 -0
  16. package/nstc-g6/assets/svg/exit-fullscreen.svg +1 -0
  17. package/nstc-g6/assets/svg/eye-open.svg +1 -0
  18. package/nstc-g6/assets/svg/eye.svg +1 -0
  19. package/nstc-g6/assets/svg/favorite.svg +1 -0
  20. package/nstc-g6/assets/svg/favorite_active.svg +1 -0
  21. package/nstc-g6/assets/svg/favorite_x400.svg +1 -0
  22. package/nstc-g6/assets/svg/favorite_x400_active.svg +1 -0
  23. package/nstc-g6/assets/svg/favorite_x400_blank.svg +1 -0
  24. package/nstc-g6/assets/svg/filter.svg +16 -0
  25. package/nstc-g6/assets/svg/filter@2x.png +0 -0
  26. package/nstc-g6/assets/svg/filterActive.svg +16 -0
  27. package/nstc-g6/assets/svg/filterClose@2x.png +0 -0
  28. package/nstc-g6/assets/svg/form.svg +1 -0
  29. package/nstc-g6/assets/svg/fullscreen.svg +1 -0
  30. package/nstc-g6/assets/svg/guide.svg +1 -0
  31. package/nstc-g6/assets/svg/hourglass.svg +19 -0
  32. package/nstc-g6/assets/svg/icon.svg +1 -0
  33. package/nstc-g6/assets/svg/international.svg +1 -0
  34. package/nstc-g6/assets/svg/language.svg +1 -0
  35. package/nstc-g6/assets/svg/left-dis.svg +1 -0
  36. package/nstc-g6/assets/svg/left.svg +1 -0
  37. package/nstc-g6/assets/svg/link.svg +1 -0
  38. package/nstc-g6/assets/svg/list.svg +1 -0
  39. package/nstc-g6/assets/svg/lock.svg +1 -0
  40. package/nstc-g6/assets/svg/message-t.svg +1 -0
  41. package/nstc-g6/assets/svg/money.svg +1 -0
  42. package/nstc-g6/assets/svg/money3.svg +1 -0
  43. package/nstc-g6/assets/svg/money4.svg +1 -0
  44. package/nstc-g6/assets/svg/moneyTwo.svg +1 -0
  45. package/nstc-g6/assets/svg/msg_white.svg +1 -0
  46. package/nstc-g6/assets/svg/nested.svg +1 -0
  47. package/nstc-g6/assets/svg/newsearch.svg +19 -0
  48. package/nstc-g6/assets/svg/password.svg +1 -0
  49. package/nstc-g6/assets/svg/pdf.svg +1 -0
  50. package/nstc-g6/assets/svg/people.svg +1 -0
  51. package/nstc-g6/assets/svg/peoples.svg +1 -0
  52. package/nstc-g6/assets/svg/phone.svg +1 -0
  53. package/nstc-g6/assets/svg/phone_msg.svg +1 -0
  54. package/nstc-g6/assets/svg/qq.svg +1 -0
  55. package/nstc-g6/assets/svg/right-dis.svg +1 -0
  56. package/nstc-g6/assets/svg/right.svg +1 -0
  57. package/nstc-g6/assets/svg/search.svg +1 -0
  58. package/nstc-g6/assets/svg/searchActive.svg +19 -0
  59. package/nstc-g6/assets/svg/shopping.svg +1 -0
  60. package/nstc-g6/assets/svg/size.svg +1 -0
  61. package/nstc-g6/assets/svg/skill.svg +1 -0
  62. package/nstc-g6/assets/svg/star.svg +1 -0
  63. package/nstc-g6/assets/svg/steam.svg +1 -0
  64. package/nstc-g6/assets/svg/tab.svg +1 -0
  65. package/nstc-g6/assets/svg/table.svg +1 -0
  66. package/nstc-g6/assets/svg/theme.svg +1 -0
  67. package/nstc-g6/assets/svg/tree-table.svg +1 -0
  68. package/nstc-g6/assets/svg/tree.svg +1 -0
  69. package/nstc-g6/assets/svg/user.svg +1 -0
  70. package/nstc-g6/assets/svg/wechat.svg +1 -0
  71. package/nstc-g6/assets/svg/z-left-2-dis.svg +1 -0
  72. package/nstc-g6/assets/svg/z-left-2.svg +1 -0
  73. package/nstc-g6/assets/svg/z-right-2-dis.svg +1 -0
  74. package/nstc-g6/assets/svg/z-right-2.svg +1 -0
  75. package/nstc-g6/assets/svg/z-right.svg +1 -0
  76. package/nstc-g6/assets/svg/zip.svg +1 -0
  77. package/nstc-g6/components/Calendar/index.js +8 -0
  78. package/nstc-g6/components/Calendar/src/basic/month-table.vue +129 -0
  79. package/nstc-g6/components/Calendar/src/basic/year-table.vue +126 -0
  80. package/nstc-g6/components/Calendar/src/main.vue +442 -0
  81. package/nstc-g6/components/DialogForm/index.js +8 -0
  82. package/nstc-g6/components/DialogForm/src/demo/index.vue +56 -0
  83. package/nstc-g6/components/DialogForm/src/main.vue +189 -0
  84. package/nstc-g6/components/Form/A_DEMO/component/originalForm.vue +281 -0
  85. package/nstc-g6/components/Form/A_DEMO/config/config_3.js +1222 -0
  86. package/nstc-g6/components/Form/A_DEMO/index.vue +803 -0
  87. package/nstc-g6/components/Form/AutocompleteCustom/index.vue +72 -0
  88. package/nstc-g6/components/Form/BusinessSpecific/InputMultiple.vue +191 -0
  89. package/nstc-g6/components/Form/BusinessSpecific/InputWithUnit.vue +128 -0
  90. package/nstc-g6/components/Form/BusinessSpecific/SelectTreeDialog.vue +233 -0
  91. package/nstc-g6/components/Form/BusinessSpecific/readme.md +7 -0
  92. package/nstc-g6/components/Form/CascaderCustom/index.vue +101 -0
  93. package/nstc-g6/components/Form/CheckboxCustom/index.vue +84 -0
  94. package/nstc-g6/components/Form/Component.vue +661 -0
  95. package/nstc-g6/components/Form/ComponentSecond.vue +650 -0
  96. package/nstc-g6/components/Form/DatepickerCustom/index.vue +130 -0
  97. package/nstc-g6/components/Form/InputAndDialog/index.js +15 -0
  98. package/nstc-g6/components/Form/InputAndDialog/src/main.vue +395 -0
  99. package/nstc-g6/components/Form/InputCustom/demo/index.vue +65 -0
  100. package/nstc-g6/components/Form/InputCustom/index.vue +307 -0
  101. package/nstc-g6/components/Form/IntervalinputCustom/demo/index.vue +31 -0
  102. package/nstc-g6/components/Form/IntervalinputCustom/index.vue +118 -0
  103. package/nstc-g6/components/Form/Item.vue +330 -0
  104. package/nstc-g6/components/Form/ItemSecond.vue +269 -0
  105. package/nstc-g6/components/Form/List.vue +146 -0
  106. package/nstc-g6/components/Form/ListSecond.vue +130 -0
  107. package/nstc-g6/components/Form/RadioCustom/index.vue +73 -0
  108. package/nstc-g6/components/Form/SelectAccount/index.js +15 -0
  109. package/nstc-g6/components/Form/SelectAccount/src/demo/index.vue +58 -0
  110. package/nstc-g6/components/Form/SelectAccount/src/main.vue +283 -0
  111. package/nstc-g6/components/Form/SelectAndDialog/index.js +15 -0
  112. package/nstc-g6/components/Form/SelectAndDialog/src/main.vue +384 -0
  113. package/nstc-g6/components/Form/SelectCashFlow/index.js +15 -0
  114. package/nstc-g6/components/Form/SelectCashFlow/src/demo/index.vue +42 -0
  115. package/nstc-g6/components/Form/SelectCashFlow/src/main.vue +126 -0
  116. package/nstc-g6/components/Form/SelectCustom/demo/index.vue +82 -0
  117. package/nstc-g6/components/Form/SelectCustom/index.vue +488 -0
  118. package/nstc-g6/components/Form/SelectSubject/index.js +15 -0
  119. package/nstc-g6/components/Form/SelectSubject/src/demo/index.vue +85 -0
  120. package/nstc-g6/components/Form/SelectSubject/src/main.vue +182 -0
  121. package/nstc-g6/components/Form/SelectindialogCustom/demo/index.vue +188 -0
  122. package/nstc-g6/components/Form/SelectindialogCustom/index.vue +650 -0
  123. package/nstc-g6/components/Form/SelectindialogCustom/install.js +7 -0
  124. package/nstc-g6/components/Form/TableRadioCustom/demo/index.vue +53 -0
  125. package/nstc-g6/components/Form/TableRadioCustom/index.vue +183 -0
  126. package/nstc-g6/components/Form/TextCustom/index.vue +38 -0
  127. package/nstc-g6/components/Form/UploadCustom/demo/index.vue +31 -0
  128. package/nstc-g6/components/Form/UploadCustom/iconxitongshezhi-yichu.png +0 -0
  129. package/nstc-g6/components/Form/UploadCustom/index.vue +506 -0
  130. package/nstc-g6/components/Form/configs.js +191 -0
  131. package/nstc-g6/components/Form/configsSecond.js +161 -0
  132. package/nstc-g6/components/Form/index.js +8 -0
  133. package/nstc-g6/components/Form/index.scss +29 -0
  134. package/nstc-g6/components/Form/payeePersonSelect/index.js +15 -0
  135. package/nstc-g6/components/Form/payeePersonSelect/src/demo/index.vue +164 -0
  136. package/nstc-g6/components/Form/payeePersonSelect/src/main.vue +185 -0
  137. package/nstc-g6/components/Form/readme.txt +4 -0
  138. package/nstc-g6/components/FormGroup/index.js +8 -0
  139. package/nstc-g6/components/FormGroup/src/demo/config.js +23 -0
  140. package/nstc-g6/components/FormGroup/src/demo/index.vue +85 -0
  141. package/nstc-g6/components/FormGroup/src/main.vue +639 -0
  142. package/nstc-g6/components/FormGroup/src/validate.js +23 -0
  143. package/nstc-g6/components/InputTag/InputTag.vue +270 -0
  144. package/nstc-g6/components/NstcApprovel/NstcApprovel.vue +24 -0
  145. package/nstc-g6/components/NstcBackToTop/NstcBackToTop.vue +150 -0
  146. package/nstc-g6/components/NstcBranchLazyLoad/NstcBranchLazyLoad.vue +123 -0
  147. package/nstc-g6/components/NstcCharts/NstcCharts.vue +162 -0
  148. package/nstc-g6/components/NstcCharts/define.js +74 -0
  149. package/nstc-g6/components/NstcCharts/mixins/resize.js +56 -0
  150. package/nstc-g6/components/NstcConfirm/NstcConfirm.vue +152 -0
  151. package/nstc-g6/components/NstcConfirm/index.js +25 -0
  152. package/nstc-g6/components/NstcDialog/NstcDialog.vue +185 -0
  153. package/nstc-g6/components/NstcDialogForm/NstcDialogForm.vue +176 -0
  154. package/nstc-g6/components/NstcDialogTable/NstcDialogTable.vue +280 -0
  155. package/nstc-g6/components/NstcDropdown/NstcDropdown.vue +52 -0
  156. package/nstc-g6/components/NstcDropdownTree/NstcDropdownTree.vue +396 -0
  157. package/nstc-g6/components/NstcElectronicFile/NstcElectronicFile.vue +591 -0
  158. package/nstc-g6/components/NstcExcelCustomImport/NstcExcelCustomImport.vue +475 -0
  159. package/nstc-g6/components/NstcExcelCustomImport/img/upload@2x.png +0 -0
  160. package/nstc-g6/components/NstcExcelExport/NstcExcelExport.vue +145 -0
  161. package/nstc-g6/components/NstcExcelImport/NstcExcelImport.vue +1074 -0
  162. package/nstc-g6/components/NstcExcelImport/img/upload@2x.png +0 -0
  163. package/nstc-g6/components/NstcExcelImportN/NstcExcelImportN.vue +1166 -0
  164. package/nstc-g6/components/NstcExpandCollapse/NstcExpandCollapse.vue +130 -0
  165. package/nstc-g6/components/NstcExpandCollapse/index.scss +77 -0
  166. package/nstc-g6/components/NstcFileUpload/NstcFileUpload.vue +989 -0
  167. package/nstc-g6/components/NstcFileUpload/img/addFile.svg +32 -0
  168. package/nstc-g6/components/NstcFileUpload/img/delete.svg +24 -0
  169. package/nstc-g6/components/NstcFileUpload/img/deleteFile.svg +28 -0
  170. package/nstc-g6/components/NstcFileUpload/img/download.svg +24 -0
  171. package/nstc-g6/components/NstcFileUpload/img/inputUpload.svg +30 -0
  172. package/nstc-g6/components/NstcFileUpload/img/look-diabled.svg +24 -0
  173. package/nstc-g6/components/NstcFileUpload/img/look.svg +24 -0
  174. package/nstc-g6/components/NstcForm/A_DEMO/component/originalForm.vue +281 -0
  175. package/nstc-g6/components/NstcForm/A_DEMO/config/config_3.js +1222 -0
  176. package/nstc-g6/components/NstcForm/A_DEMO/index.vue +796 -0
  177. package/nstc-g6/components/NstcForm/AutocompleteCustom/index.vue +68 -0
  178. package/nstc-g6/components/NstcForm/BusinessSpecific/InputMultiple.vue +189 -0
  179. package/nstc-g6/components/NstcForm/BusinessSpecific/InputWithUnit.vue +128 -0
  180. package/nstc-g6/components/NstcForm/BusinessSpecific/SelectTreeDialog.vue +233 -0
  181. package/nstc-g6/components/NstcForm/BusinessSpecific/readme.md +7 -0
  182. package/nstc-g6/components/NstcForm/CascaderCustom/index.vue +101 -0
  183. package/nstc-g6/components/NstcForm/CheckboxCustom/index.vue +84 -0
  184. package/nstc-g6/components/NstcForm/Component.vue +684 -0
  185. package/nstc-g6/components/NstcForm/ComponentSecond.vue +650 -0
  186. package/nstc-g6/components/NstcForm/DatepickerCustom/index.vue +130 -0
  187. package/nstc-g6/components/NstcForm/InputAndDialog/NstcInputAndDialog.vue +389 -0
  188. package/nstc-g6/components/NstcForm/InputCustom/index.vue +314 -0
  189. package/nstc-g6/components/NstcForm/IntervalInputCustom/index.vue +116 -0
  190. package/nstc-g6/components/NstcForm/Item.vue +327 -0
  191. package/nstc-g6/components/NstcForm/ItemSecond.vue +269 -0
  192. package/nstc-g6/components/NstcForm/List.vue +146 -0
  193. package/nstc-g6/components/NstcForm/ListSecond.vue +130 -0
  194. package/nstc-g6/components/NstcForm/RadioCustom/index.vue +73 -0
  195. package/nstc-g6/components/NstcForm/SelectAccount/NstcSelectAccount.vue +334 -0
  196. package/nstc-g6/components/NstcForm/SelectAndDialog/NstcSelectAndDialog.vue +377 -0
  197. package/nstc-g6/components/NstcForm/SelectCashFlow/NstcSelectCashFlow.vue +123 -0
  198. package/nstc-g6/components/NstcForm/SelectCustom/index.vue +460 -0
  199. package/nstc-g6/components/NstcForm/SelectSubject/NstcSelectSubject.vue +185 -0
  200. package/nstc-g6/components/NstcForm/SelectindialogCustom/index.vue +648 -0
  201. package/nstc-g6/components/NstcForm/TableRadioCustom/index.vue +183 -0
  202. package/nstc-g6/components/NstcForm/TextCustom/index.vue +38 -0
  203. package/nstc-g6/components/NstcForm/UploadCustom/iconxitongshezhi-yichu.png +0 -0
  204. package/nstc-g6/components/NstcForm/UploadCustom/index.vue +500 -0
  205. package/nstc-g6/components/NstcForm/configs.js +191 -0
  206. package/nstc-g6/components/NstcForm/configsSecond.js +161 -0
  207. package/nstc-g6/components/NstcForm/index.js +8 -0
  208. package/nstc-g6/components/NstcForm/index.scss +29 -0
  209. package/nstc-g6/components/NstcForm/payeePersonSelect/NstcPayeePerson.vue +188 -0
  210. package/nstc-g6/components/NstcForm/readme.txt +4 -0
  211. package/nstc-g6/components/NstcPagination/NstcPagination.vue +428 -0
  212. package/nstc-g6/components/NstcPagination/setPageNum.png +0 -0
  213. package/nstc-g6/components/NstcPagination/setpagedefault.png +0 -0
  214. package/nstc-g6/components/NstcScreenFull/NstcScreenFull.vue +70 -0
  215. package/nstc-g6/components/NstcSelectTree/NstcSelectTree.vue +729 -0
  216. package/nstc-g6/components/NstcSelectTreeList/NstcSelectTreeList.vue +676 -0
  217. package/nstc-g6/components/NstcSticky/NstcSticky.vue +97 -0
  218. package/nstc-g6/components/NstcSvgIcon/NstcSvgIcon.vue +72 -0
  219. package/nstc-g6/components/NstcTab/NstcTab.vue +80 -0
  220. package/nstc-g6/components/NstcTabWithBadge/NstcTabWithBadge.vue +45 -0
  221. package/nstc-g6/components/NstcTabWithBadge/index.scss +31 -0
  222. package/nstc-g6/components/NstcTable/ElTableColumnCustom/index.vue +292 -0
  223. package/nstc-g6/components/NstcTable/NstcTable.vue +460 -0
  224. package/nstc-g6/components/NstcTableSet/NstcTableSet.vue +801 -0
  225. package/nstc-g6/components/NstcThemePicker/NstcThemePicker.vue +186 -0
  226. package/nstc-g6/components/NstcUploadCustomExcel/NstcUploadCustomExcel.vue +330 -0
  227. package/nstc-g6/components/NstcUploadExcel/NstcUploadExcel.vue +145 -0
  228. package/nstc-g6/components/NstcWorkBench/NstcWorkBench.vue +176 -0
  229. package/nstc-g6/components/Search/NstcSearch.vue +583 -0
  230. package/nstc-g6/components/Search/src/demo/index copy.vue +101 -0
  231. package/nstc-g6/components/Search/src/demo/index.vue +103 -0
  232. package/nstc-g6/components/Search/src/main copy.vue +607 -0
  233. package/nstc-g6/components/approvelTwo/main.vue +220 -0
  234. package/nstc-g6/components/approvelTwo/progress.vue +154 -0
  235. package/nstc-g6/directives/VCopy/index.js +60 -0
  236. package/nstc-g6/directives/VNstcNumber/index.js +14 -0
  237. package/nstc-g6/directives/VNstcNumber/temp.js +446 -0
  238. package/nstc-g6/index.js +193 -0
  239. package/nstc-g6/utils/auth.js +2 -0
  240. package/nstc-g6/utils/axios.js +2 -0
  241. package/nstc-g6/utils/dateAndValidator.js +649 -0
  242. package/nstc-g6/utils/debounce.js +40 -0
  243. package/nstc-g6/utils/parseTime.js +48 -0
  244. package/nstc-g6/utils/validate/index.js +7 -0
  245. package/nstc-g6/utils/vendor/Export2Excel.js +229 -0
  246. package/nstc-g6/utils/vendor/Export2Zip.js +24 -0
  247. package/nstc-g6/utils/vue-bus.js +5 -0
  248. package/package.json +8 -2
  249. package/src/assets/css/_coreLib.scss +9 -1
  250. package/src/components/ChildRange/index.vue +28 -64
  251. package/src/components/ChildRange/style.scss +34 -0
  252. package/src/components/FileImport/index.vue +3 -1
  253. package/src/components/PageHeader/index.vue +3 -47
  254. package/src/components/PageHeader/style.scss +39 -0
  255. package/src/components/Search/index.vue +1 -97
  256. package/src/components/Search/style.scss +93 -0
  257. package/src/components/Table/ThSelectHeader.vue +28 -33
  258. package/src/components/Table/index.vue +4 -2
  259. package/src/directives/VTitle/index.js +14 -17
  260. package/style/css/normalize.scss +6 -6
  261. package/style/index.css +3 -3
  262. package/style/index.css.map +1 -1
  263. package/style/server-config.jsonc +527 -410
@@ -0,0 +1,162 @@
1
+ <template>
2
+ <div class="charts-custom" />
3
+ </template>
4
+
5
+ <script>
6
+ import * as echarts from 'echarts';
7
+ import resize from './mixins/resize'
8
+ import merge from 'lodash/merge'
9
+
10
+ import { color, axisConfig, pieConfig } from './define'
11
+
12
+ export default {
13
+ name: 'NstcCharts',
14
+
15
+ mixins: [resize],
16
+
17
+ props: {
18
+ isPie: {
19
+ type: Boolean,
20
+ default: false
21
+ },
22
+
23
+ option: {
24
+ type: Object,
25
+ require: true,
26
+ default: () => ({})
27
+ },
28
+
29
+ composedChartOption: { // 是否不跟之前设置的 option 进行合并,默认为 true,即不合并。如果合并,减少数据时,视图上还是保持着最多数据的展示效果
30
+ type: Boolean,
31
+ default: true
32
+ }
33
+ },
34
+
35
+ data() {
36
+ return {
37
+ chart: null
38
+ }
39
+ },
40
+
41
+ watch: {
42
+ option: {
43
+ deep: true,
44
+ handler() {
45
+ this.setOption()
46
+ }
47
+ }
48
+ },
49
+
50
+ mounted() {
51
+ this.initChart()
52
+ },
53
+
54
+ beforeDestroy() {
55
+ this.clear()
56
+ },
57
+
58
+ methods: {
59
+ initChart() {
60
+ this.chart = echarts.init(this.$el)
61
+ this.setOption()
62
+ },
63
+
64
+ setOption() {
65
+ this.chart.setOption(this.calcOption(this.option), this.composedChartOption)
66
+ },
67
+
68
+ grid({ grid = {}}) {
69
+ const selfGrid = {
70
+ containLabel: true
71
+ }
72
+
73
+ grid = Array.isArray(grid)
74
+ ? grid.map(item => merge({}, selfGrid, item))
75
+ : merge({}, selfGrid, grid)
76
+
77
+ return {
78
+ grid
79
+ }
80
+ },
81
+
82
+ xAxis({ xAxis }) {
83
+ xAxis = xAxis && xAxis.length
84
+ ? xAxis.map(item => merge({}, axisConfig, item))
85
+ : [merge({}, axisConfig, xAxis)]
86
+
87
+ return { xAxis }
88
+ },
89
+
90
+ yAxis({ yAxis }) {
91
+ yAxis =
92
+ yAxis && yAxis.length
93
+ ? yAxis.map(item => merge({}, axisConfig, item))
94
+ : [merge({}, axisConfig, yAxis)]
95
+
96
+ return { yAxis }
97
+ },
98
+
99
+ series({ series = [] }) {
100
+ series = series.map(sery => {
101
+ const type = sery.type
102
+ let config = {}
103
+
104
+ if (type === 'bar') {
105
+ config = {
106
+ itemStyle: {
107
+ barBorderRadius: 'stack' in sery ? 0 : [100, 100, 0, 0]
108
+ }
109
+ }
110
+ } else if (type === 'line') {
111
+ config = {
112
+ smooth: true
113
+ }
114
+ } else if (type === 'pie') {
115
+ config = pieConfig
116
+ }
117
+
118
+ return merge(config, sery)
119
+ })
120
+
121
+ return { series }
122
+ },
123
+
124
+ calcOption(params) {
125
+ const base = ['grid', 'series']
126
+ const keys = this.isPie
127
+ ? base
128
+ : base.concat(['xAxis', 'yAxis'])
129
+ const defaultConfigs = {
130
+ color,
131
+ barMaxWidth: 32,
132
+ barGap: 0
133
+ }
134
+
135
+ if (params.baseOption) {
136
+ const { baseOption, options, ...other } = params
137
+
138
+ const _baseOption = keys.reduce((prev, key) => {
139
+ return { ...prev, ...this[key](baseOption) }
140
+ }, defaultConfigs)
141
+
142
+ return { options, baseOption: merge({}, _baseOption, baseOption), ...other }
143
+ }
144
+
145
+ const option = keys.reduce((prev, key) => {
146
+ return { ...prev, ...this[key](params) }
147
+ }, defaultConfigs)
148
+
149
+ return merge({}, option, params)
150
+ },
151
+
152
+ clear() {
153
+ if (this.chart) {
154
+ this.chart.clear()
155
+ this.chart.dispose()
156
+ this.chart = null
157
+ }
158
+ }
159
+ }
160
+ }
161
+ </script>
162
+
@@ -0,0 +1,74 @@
1
+
2
+ const color = ['#99C0E5', '#A6ACE3', '#EFC27A', '#99DCD2', '#C1C1C1', '#FFB59E', '#EF8787']
3
+
4
+ const axisConfig = {
5
+ nameTextStyle: {
6
+ color: '#3d4a57',
7
+ fontSize: 12
8
+ },
9
+ axisLabel: {
10
+ color: '#3d4a57',
11
+ fontSize: 12
12
+ },
13
+ axisLine: {
14
+ lineStyle: {
15
+ color: '#AEAEAE'
16
+ }
17
+ },
18
+ axisTick: {
19
+ show: false
20
+ },
21
+ splitLine: {
22
+ lineStyle: {
23
+ color: '#D0D0D0'
24
+ }
25
+ }
26
+ }
27
+
28
+ const pieConfig = {
29
+ radius: ['38%', '54%'],
30
+ center: ['50%', '50%'],
31
+ label: {
32
+ show: false,
33
+ position: 'center',
34
+ color: '#3d4a57',
35
+ fontSize: 18,
36
+ formatter: '{b}\n\n{d}%'
37
+ // formatter: function({ name, percent }) {
38
+ // let nameStr = name
39
+ // let wrapLength =
40
+ // sery.label &&
41
+ // sery.label.wrap &&
42
+ // sery.label.wrap.length
43
+ // let result = ''
44
+ //
45
+ // // 如果有换行配置,并且名字的长度大于换行限制的长度,对名字进行换行
46
+ // if (wrapLength && name && name.length > wrapLength) {
47
+ // nameStr =
48
+ // name.slice(0, wrapLength) +
49
+ // '\n' +
50
+ // name.slice(wrapLength)
51
+ // }
52
+ //
53
+ // // 如果要隐藏名称,则只显示percent
54
+ // if (sery.label && sery.label.hideName) {
55
+ // result = percent
56
+ // } else {
57
+ // result = `${nameStr}\n(${percent}%)`
58
+ // }
59
+ //
60
+ // return result
61
+ // }
62
+ },
63
+ emphasis: {
64
+ label: {
65
+ show: true
66
+ }
67
+ }
68
+ }
69
+
70
+ export {
71
+ color,
72
+ axisConfig,
73
+ pieConfig
74
+ }
@@ -0,0 +1,56 @@
1
+ import { debounce } from '../../../utils/debounce'
2
+
3
+ export default {
4
+ data() {
5
+ return {
6
+ $_sidebarElm: null,
7
+ $_resizeHandler: null
8
+ }
9
+ },
10
+ mounted() {
11
+ this.initListener()
12
+ },
13
+ activated() {
14
+ if (!this.$_resizeHandler) {
15
+ // avoid duplication init
16
+ this.initListener()
17
+ }
18
+
19
+ // when keep-alive chart activated, auto resize
20
+ this.resize()
21
+ },
22
+ beforeDestroy() {
23
+ this.destroyListener()
24
+ },
25
+ deactivated() {
26
+ this.destroyListener()
27
+ },
28
+ methods: {
29
+ // use $_ for mixins properties
30
+ // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
31
+ $_sidebarResizeHandler(e) {
32
+ if (e.propertyName === 'width') {
33
+ this.$_resizeHandler()
34
+ }
35
+ },
36
+ initListener() {
37
+ this.$_resizeHandler = debounce(() => {
38
+ this.resize()
39
+ }, 100)
40
+ window.addEventListener('resize', this.$_resizeHandler)
41
+
42
+ this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0]
43
+ this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler)
44
+ },
45
+ destroyListener() {
46
+ window.removeEventListener('resize', this.$_resizeHandler)
47
+ this.$_resizeHandler = null
48
+
49
+ this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler)
50
+ },
51
+ resize() {
52
+ const { chart } = this
53
+ chart && chart.resize()
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,152 @@
1
+ <template>
2
+ <div class="confirmTip">
3
+ <NstcDialog
4
+ v-model="dialogVisible"
5
+ width="432px"
6
+ :show-close="false"
7
+ :close-after-confirm="false"
8
+ :show-footer="true"
9
+ @confirm="ok"
10
+ @close="cancel"
11
+ >
12
+ <div class="main">
13
+ <div class="main-item">
14
+ <i
15
+ v-if="config.type == 'error'"
16
+ class="el-icon-error errorColor i-item"
17
+ ></i>
18
+ <i
19
+ v-if="config.type == 'question'"
20
+ class="el-icon-question question i-item"
21
+ ></i>
22
+ <i
23
+ v-if="config.type == 'info'"
24
+ class="el-icon-info infoColor i-item"
25
+ ></i>
26
+ <div class="title margin-l-8">{{ config.title }}</div>
27
+ </div>
28
+
29
+ <div class="main-item margin-t-12">
30
+ <i class="el-icon-error errorColor i-item" style="opacity: 0"></i>
31
+ <div v-if="config.info" class="info margin-l-8">
32
+ {{ config.info }}
33
+ </div>
34
+ </div>
35
+ <div v-if="config.rejectMessage" class="reject-message">
36
+ <el-input
37
+ v-model="message"
38
+ type="textarea"
39
+ :rows="4"
40
+ :placeholder="config.rejectMessagePlaceHolder"
41
+ maxlength="100"
42
+ show-word-limit
43
+ />
44
+ </div>
45
+ </div>
46
+ <span slot="footer" class="dialog-footer">
47
+ <el-button v-if="config.button.ok" type="primary" @click="ok">{{
48
+ config.button.ok
49
+ }}</el-button>
50
+ <el-button
51
+ v-if="config.button.cancel"
52
+ class="nstc-g6-common-btn-2"
53
+ plain
54
+ @click="cancel"
55
+ >{{ config.button.cancel }}</el-button
56
+ >
57
+ </span>
58
+ <!-- </el-dialog> -->
59
+ </NstcDialog>
60
+ </div>
61
+ </template>
62
+
63
+ <script>
64
+ import NstcDialog from '../NstcDialog/NstcDialog.vue'
65
+ export default {
66
+ name: 'NstcConfirm',
67
+ components: {
68
+ NstcDialog
69
+ },
70
+ data() {
71
+ return {
72
+ dialogVisible: true,
73
+ config: {
74
+ type: 'question',
75
+ title: '提示语言',
76
+ info: '详情提示语言',
77
+ rejectMessage: false, //驳回意见
78
+ rejectMessagePlaceHolder: '',
79
+ button: {
80
+ ok: '确定',
81
+ cancel: '取消'
82
+ }
83
+ },
84
+ message: ''
85
+ }
86
+ },
87
+ mounted() {},
88
+ methods: {
89
+ ok() {},
90
+ cancel() {}
91
+ }
92
+ }
93
+ </script>
94
+
95
+ <style lang="scss">
96
+ .errorColor {
97
+ color: #ff3b30;
98
+ }
99
+ .question {
100
+ color: #ffbf00;
101
+ }
102
+ .infoColor {
103
+ color: #ffbf00;
104
+ }
105
+ .i-item {
106
+ font-size: 22px;
107
+ }
108
+ .title {
109
+ font-size: 16px;
110
+ font-weight: 500;
111
+ text-align: left;
112
+ color: rgba(0, 0, 0, 0.85);
113
+ line-height: 24px;
114
+ }
115
+ .info {
116
+ font-size: 14px;
117
+ font-weight: 400;
118
+ text-align: left;
119
+ color: #666666;
120
+ line-height: 22px;
121
+ }
122
+ .main-item {
123
+ display: flex;
124
+ align-items: center;
125
+ }
126
+ .margin-l-8 {
127
+ margin-left: 8px;
128
+ }
129
+ .margin-t-12 {
130
+ margin-top: 12px;
131
+ }
132
+ </style>
133
+ <style scoped>
134
+ .confirmTip /deep/ .el-dialog {
135
+ margin-top: 36vh !important;
136
+ }
137
+ .confirmTip /deep/.el-dialog__header {
138
+ /* display: none; */
139
+ border-bottom: none !important;
140
+ }
141
+ .confirmTip /deep/.el-dialog__body {
142
+ padding: 24px;
143
+ padding-bottom: 0px;
144
+ padding: 0 20px !important;
145
+ }
146
+ .confirmTip /deep/.el-dialog__footer {
147
+ padding: 16px;
148
+ }
149
+ .confirmTip /deep/.el-dialog__headerbtn {
150
+ display: none;
151
+ }
152
+ </style>
@@ -0,0 +1,25 @@
1
+ import Vue from 'vue'
2
+ import confirm from './NstcConfirm'
3
+
4
+ const confirmCon = Vue.extend(confirm);
5
+ const confirmFunction = (config, ok, cancel) => {
6
+ return new Promise((res, rej) => {
7
+ let confirmDom = new confirmCon({
8
+ el: document.createElement('div')
9
+ })
10
+ document.body.appendChild(confirmDom.$el);
11
+ console.log(confirmDom, 'confirmDom----------------');
12
+ confirmDom.config = config;
13
+ confirmDom.ok = ok ||
14
+ function () {
15
+ res()
16
+ confirmDom.dialogVisible = false
17
+ }
18
+ confirmDom.cancel = cancel || function () {
19
+ rej()
20
+ confirmDom.dialogVisible = false
21
+ }
22
+ })
23
+
24
+ }
25
+ export default confirmFunction;
@@ -0,0 +1,185 @@
1
+ <template>
2
+ <el-dialog
3
+ class="Nstc-dialog"
4
+ v-drag
5
+ :visible.sync="dialogVisible"
6
+ v-bind="$attrs"
7
+ :center="center"
8
+ :show-close="showClose"
9
+ :custom-class="customClass"
10
+ :append-to-body="toBody"
11
+ :close-on-click-modal="closeOnClickModal"
12
+ :close-on-press-escape="closeOnPressEscape"
13
+ :before-close="()=>{handleClose()}"
14
+ v-on="$listeners"
15
+ >
16
+ <template slot="title">
17
+ <span class="el-dialog__title">{{ title }}</span>
18
+ <button class="el-dialog__headerbtn" @click="handleClose">
19
+ <i class="el-dialog__close el-icon-close"></i>
20
+ </button>
21
+ </template>
22
+ <slot></slot>
23
+
24
+ <slot name="after"></slot>
25
+ <div
26
+ v-if="showFooter"
27
+ slot="footer"
28
+ class="dialog-footer"
29
+ >
30
+ <el-button
31
+ v-if="footerHandlers.confirm"
32
+ type="primary"
33
+ :disabled="footerHandlers.confirm.disabled || confirmDisabledFlag"
34
+ :class="footerHandlers.confirm.className"
35
+ @click="handleConfirm"
36
+ >
37
+ {{ footerHandlers.confirm.text || '确认' }}
38
+ </el-button>
39
+ <el-button
40
+ v-if="footerHandlers.cancel"
41
+ plain
42
+ :class="footerHandlers.cancel.className"
43
+ @click="handleClose"
44
+ >
45
+ {{ footerHandlers.cancel.text || '取消' }}
46
+ </el-button>
47
+ </div>
48
+ </el-dialog>
49
+ </template>
50
+
51
+ <script>
52
+ export default {
53
+ name: 'NstcDialog',
54
+ props: {
55
+ value: {
56
+ type: Boolean,
57
+ default: false
58
+ },
59
+
60
+ title: {
61
+ type: String,
62
+ default: ''
63
+ },
64
+
65
+ center: {
66
+ type: Boolean,
67
+ default: false
68
+ },
69
+
70
+ footerHandlers: {
71
+ type: Object,
72
+ default: () => {
73
+ return {
74
+ confirm: {
75
+ text: '', //this.$t('common_w_0002')
76
+ className: '',
77
+ disabled: false
78
+ },
79
+ cancel: {
80
+ text: '', // this.t('common_w_0003')
81
+ className: '',
82
+ disabled: false
83
+ }
84
+ }
85
+ },
86
+
87
+ },
88
+ toBody: {
89
+ type: Boolean,
90
+ default: true
91
+ },
92
+ customClass: {
93
+ type: String,
94
+ default: ''
95
+ },
96
+
97
+ showFooter: {
98
+ type: Boolean,
99
+ default: true
100
+ },
101
+
102
+ showClose: {
103
+ type: Boolean,
104
+ default: false
105
+ },
106
+
107
+ /** 是否在点击确认按钮后关闭弹窗 */
108
+ closeAfterConfirm: {
109
+ type: Boolean,
110
+ default: true
111
+ },
112
+
113
+ /** 是否在点击确认按钮后立即关闭弹窗 */
114
+ immediateCloseAfterHandler: {
115
+ type: Boolean,
116
+ default: false
117
+ },
118
+
119
+ closeOnClickModal: {
120
+ type: Boolean,
121
+ default: false
122
+ },
123
+
124
+ closeOnPressEscape: {
125
+ type: Boolean,
126
+ default: false
127
+ },
128
+
129
+ confirmDisabledFlag: {
130
+ type: Boolean,
131
+ default: false
132
+ }
133
+ },
134
+ computed: {
135
+ dialogVisible: {
136
+ get() {
137
+ return this.value
138
+ },
139
+ set(val) {
140
+ this.$emit('input', val)
141
+ }
142
+ }
143
+ },
144
+ methods: {
145
+ handleConfirm() {
146
+ this.handleListeners('confirm')
147
+ },
148
+
149
+ handleClose() {
150
+ this.handleListeners('cancel')
151
+ },
152
+
153
+ async handleListeners(type) {
154
+ this.loading = true
155
+ try {
156
+ const listener = this.$listeners[type]
157
+ const closeAfterListener = this.closeAfterConfirm || type === 'cancel'
158
+
159
+ if (this.immediateCloseAfterHandler) {
160
+ if (closeAfterListener) {
161
+ this.dialogVisible = false
162
+ }
163
+
164
+ listener && await listener()
165
+ } else {
166
+ listener && await listener()
167
+
168
+ if (closeAfterListener) {
169
+ this.dialogVisible = false
170
+ }
171
+ }
172
+ } catch (err) {
173
+ console.error(err)
174
+
175
+ err && err.type === 'VALIDATE_ERROR' && this.$message({
176
+ type: 'warning',
177
+ message: err.msg
178
+ })
179
+ } finally {
180
+ this.loading = false
181
+ }
182
+ }
183
+ }
184
+ }
185
+ </script>