vue2-client 1.18.26 → 1.18.28

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 (92) hide show
  1. package/.eslintrc.js +90 -90
  2. package/Components.md +60 -60
  3. package/docs/index.md +30 -30
  4. package/index.js +31 -31
  5. package/jest-transform-stub.js +8 -8
  6. package/jest.setup.js +7 -7
  7. package/package.json +1 -1
  8. package/src/assets/img/querySlotDemo.svg +15 -15
  9. package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +120 -120
  10. package/src/base-client/components/common/CitySelect/index.js +3 -3
  11. package/src/base-client/components/common/CitySelect/index.md +109 -109
  12. package/src/base-client/components/common/CreateQuery/CreateQuery.vue +669 -669
  13. package/src/base-client/components/common/CreateQuery/index.js +3 -3
  14. package/src/base-client/components/common/CreateQuery/index.md +42 -42
  15. package/src/base-client/components/common/CreateSimpleFormQuery/index.js +3 -3
  16. package/src/base-client/components/common/CreateSimpleFormQuery/index.md +42 -42
  17. package/src/base-client/components/common/FormGroupEdit/index.js +3 -3
  18. package/src/base-client/components/common/FormGroupEdit/index.md +43 -43
  19. package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +166 -166
  20. package/src/base-client/components/common/FormGroupQuery/index.js +3 -3
  21. package/src/base-client/components/common/FormGroupQuery/index.md +43 -43
  22. package/src/base-client/components/common/JSONToTree/jsontotree.vue +271 -271
  23. package/src/base-client/components/common/PersonSetting/PersonSetting.vue +208 -208
  24. package/src/base-client/components/common/PersonSetting/index.js +3 -3
  25. package/src/base-client/components/common/Tree/Tree.vue +149 -149
  26. package/src/base-client/components/common/Tree/index.js +2 -2
  27. package/src/base-client/components/common/Upload/index.js +3 -3
  28. package/src/base-client/components/common/XAddNativeForm/index.md +146 -146
  29. package/src/base-client/components/common/XCard/XCard.vue +64 -64
  30. package/src/base-client/components/common/XDataDrawer/XDataDrawer.vue +180 -180
  31. package/src/base-client/components/common/XDataDrawer/index.js +3 -3
  32. package/src/base-client/components/common/XDataDrawer/index.md +41 -41
  33. package/src/base-client/components/common/XDescriptions/index.js +3 -3
  34. package/src/base-client/components/common/XDescriptions/index.md +322 -322
  35. package/src/base-client/components/common/XForm/index.md +178 -178
  36. package/src/base-client/components/common/XFormTable/XFormTable.vue +91 -80
  37. package/src/base-client/components/common/XStepView/XStepView.vue +252 -252
  38. package/src/base-client/components/common/XStepView/index.js +3 -3
  39. package/src/base-client/components/common/XStepView/index.md +31 -31
  40. package/src/base-client/components/common/XTable/XTable.vue +71 -62
  41. package/src/base-client/components/common/XTable/index.md +255 -255
  42. package/src/base-client/components/his/HChart/HChart.vue +219 -3
  43. package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
  44. package/src/base-client/plugins/Config.js +19 -19
  45. package/src/base-client/plugins/tabs-page-plugin.js +39 -39
  46. package/src/components/Charts/Bar.vue +62 -62
  47. package/src/components/Charts/ChartCard.vue +134 -134
  48. package/src/components/Charts/Liquid.vue +67 -67
  49. package/src/components/Charts/MiniArea.vue +39 -39
  50. package/src/components/Charts/MiniBar.vue +39 -39
  51. package/src/components/Charts/MiniProgress.vue +75 -75
  52. package/src/components/Charts/MiniSmoothArea.vue +40 -40
  53. package/src/components/Charts/Radar.vue +68 -68
  54. package/src/components/Charts/RankList.vue +77 -77
  55. package/src/components/Charts/TagCloud.vue +113 -113
  56. package/src/components/Charts/TransferBar.vue +64 -64
  57. package/src/components/Charts/Trend.vue +82 -82
  58. package/src/components/Charts/chart.less +12 -12
  59. package/src/components/Charts/smooth.area.less +13 -13
  60. package/src/components/NumberInfo/NumberInfo.vue +54 -54
  61. package/src/components/NumberInfo/index.js +3 -3
  62. package/src/components/NumberInfo/index.less +54 -54
  63. package/src/components/NumberInfo/index.md +43 -43
  64. package/src/components/card/ChartCard.vue +79 -79
  65. package/src/components/chart/Bar.vue +60 -60
  66. package/src/components/chart/MiniArea.vue +67 -67
  67. package/src/components/chart/MiniBar.vue +59 -59
  68. package/src/components/chart/MiniProgress.vue +57 -57
  69. package/src/components/chart/Radar.vue +80 -80
  70. package/src/components/chart/RankingList.vue +60 -60
  71. package/src/components/chart/Trend.vue +79 -79
  72. package/src/components/chart/index.less +9 -9
  73. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  74. package/src/components/input/IInput.vue +66 -66
  75. package/src/components/menu/SideMenu.vue +75 -75
  76. package/src/components/menu/menu.js +273 -273
  77. package/src/components/tool/AStepItem.vue +60 -60
  78. package/src/layouts/CommonLayout.vue +56 -56
  79. package/src/layouts/header/HeaderNotice.vue +177 -177
  80. package/src/lib.js +1 -1
  81. package/src/mock/extend/index.js +84 -84
  82. package/src/mock/goods/index.js +108 -108
  83. package/src/pages/dashboard/workplace/WorkPlace.vue +141 -141
  84. package/src/pages/system/dictionary/index.vue +44 -44
  85. package/src/pages/system/monitor/loginInfor/index.vue +37 -37
  86. package/src/pages/system/monitor/operLog/index.vue +37 -37
  87. package/src/pages/userInfoDetailManage/uploadFilesHistory/index.vue +159 -159
  88. package/src/services/api/cas.js +79 -79
  89. package/src/store/modules/setting.js +119 -119
  90. package/src/utils/authority-utils.js +85 -85
  91. package/src/utils/errorCode.js +6 -6
  92. package//350/277/201/347/247/273/346/227/245/345/277/227.md +15 -15
@@ -78,13 +78,13 @@
78
78
  <script setup>
79
79
  import { ref, watch, onMounted, computed, useAttrs, onBeforeUnmount, nextTick } from 'vue'
80
80
  import * as echarts from 'echarts/core'
81
- import { BarChart, LineChart, PieChart } from 'echarts/charts'
81
+ import { BarChart, LineChart, PieChart, CustomChart } from 'echarts/charts'
82
82
  import { TooltipComponent, LegendComponent, GridComponent } from 'echarts/components'
83
83
  import { CanvasRenderer } from 'echarts/renderers'
84
84
  import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
85
85
  import XTitle from '../XTitle/XTitle.vue'
86
86
  // 注册常用图表类型,避免每次重复导入
87
- echarts.use([BarChart, LineChart, PieChart, TooltipComponent, LegendComponent, GridComponent, CanvasRenderer])
87
+ echarts.use([BarChart, LineChart, PieChart, CustomChart, TooltipComponent, LegendComponent, GridComponent, CanvasRenderer])
88
88
 
89
89
  const props = defineProps({
90
90
  // 配置名称(用于查询配置)
@@ -712,7 +712,223 @@ const presetResolvers = {
712
712
  }
713
713
  }
714
714
  ]
715
- })
715
+ }),
716
+ // 范围折线图:显示高低两条线及差值连线
717
+ 'range-line': ({ dataset = [], config = {} }) => {
718
+ if (!dataset.length) {
719
+ return {
720
+ xAxis: { type: 'category', data: [] },
721
+ yAxis: { type: 'value' },
722
+ series: []
723
+ }
724
+ }
725
+
726
+ // 配置项
727
+ const highField = config.highField || 'high'
728
+ const lowField = config.lowField || 'low'
729
+ const highName = config.highName || '流入'
730
+ const lowName = config.lowName || '流出'
731
+ const highColor = config.highColor || '#1F66FF'
732
+ const lowColor = config.lowColor || '#A8C4FF'
733
+ const rangeLineColor = config.rangeLineColor || '#1F66FF'
734
+ const rangeLineType = config.rangeLineType || 'solid'
735
+ const valueSuffix = config.valueSuffix || ''
736
+ const showRangeLines = config.showRangeLines !== false
737
+ const isSmoothLine = typeof config.smooth === 'boolean' ? config.smooth : false
738
+ const baseSymbolSize = Number(config.symbolSize) || 10
739
+ const pointBorderWidth = Number(config.pointBorderWidth) || 3
740
+
741
+ // 提取数据
742
+ const labels = dataset.map(item => item.label)
743
+ const highData = dataset.map(item => Number(item[highField] || item.high || 0))
744
+ const lowData = dataset.map(item => Number(item[lowField] || item.low || 0))
745
+
746
+ // 构建系列
747
+ const series = [
748
+ // 高值折线
749
+ {
750
+ name: highName,
751
+ type: 'line',
752
+ smooth: isSmoothLine,
753
+ showSymbol: true,
754
+ symbol: 'circle',
755
+ symbolSize: baseSymbolSize,
756
+ z: 10,
757
+ data: highData,
758
+ lineStyle: {
759
+ width: 2,
760
+ color: highColor
761
+ },
762
+ itemStyle: {
763
+ color: '#fff',
764
+ borderColor: highColor,
765
+ borderWidth: pointBorderWidth
766
+ },
767
+ label: {
768
+ show: true,
769
+ position: 'top',
770
+ color: highColor,
771
+ fontWeight: 500,
772
+ formatter: params => `${params.value}${valueSuffix}`
773
+ },
774
+ emphasis: {
775
+ scale: true,
776
+ itemStyle: {
777
+ color: highColor,
778
+ borderColor: highColor
779
+ }
780
+ }
781
+ },
782
+ // 低值折线
783
+ {
784
+ name: lowName,
785
+ type: 'line',
786
+ smooth: isSmoothLine,
787
+ showSymbol: true,
788
+ symbol: 'circle',
789
+ symbolSize: baseSymbolSize,
790
+ z: 10,
791
+ data: lowData,
792
+ lineStyle: {
793
+ width: 2,
794
+ color: lowColor
795
+ },
796
+ itemStyle: {
797
+ color: '#fff',
798
+ borderColor: lowColor,
799
+ borderWidth: pointBorderWidth
800
+ },
801
+ label: {
802
+ show: true,
803
+ position: 'bottom',
804
+ color: lowColor,
805
+ fontWeight: 500,
806
+ formatter: params => `${params.value}${valueSuffix}`
807
+ },
808
+ emphasis: {
809
+ scale: true,
810
+ itemStyle: {
811
+ color: lowColor,
812
+ borderColor: lowColor
813
+ }
814
+ }
815
+ }
816
+ ]
817
+
818
+ // 添加差值连线(使用 custom series)
819
+ if (showRangeLines) {
820
+ series.push({
821
+ name: '差值连线',
822
+ type: 'custom',
823
+ z: 5,
824
+ renderItem: (params, api) => {
825
+ const xValue = api.value(0)
826
+ const highValue = api.value(1)
827
+ const lowValue = api.value(2)
828
+
829
+ const highPoint = api.coord([xValue, highValue])
830
+ const lowPoint = api.coord([xValue, lowValue])
831
+
832
+ return {
833
+ type: 'line',
834
+ shape: {
835
+ x1: highPoint[0],
836
+ y1: highPoint[1],
837
+ x2: lowPoint[0],
838
+ y2: lowPoint[1]
839
+ },
840
+ style: {
841
+ stroke: rangeLineColor,
842
+ lineWidth: 1,
843
+ lineDash: rangeLineType === 'dashed' ? [4, 4] : null
844
+ }
845
+ }
846
+ },
847
+ encode: {
848
+ x: 0,
849
+ y: [1, 2]
850
+ },
851
+ data: dataset.map((item, idx) => [idx, highData[idx], lowData[idx]])
852
+ })
853
+ }
854
+
855
+ return {
856
+ animationDuration: 420,
857
+ animationEasing: 'cubicOut',
858
+ tooltip: {
859
+ trigger: 'axis',
860
+ backgroundColor: 'rgba(255, 255, 255, 0.96)',
861
+ borderColor: '#E5E9F0',
862
+ borderWidth: 1,
863
+ textStyle: { color: '#333' },
864
+ axisPointer: {
865
+ type: 'line',
866
+ lineStyle: {
867
+ color: rangeLineColor,
868
+ width: 1,
869
+ type: 'dashed'
870
+ }
871
+ },
872
+ formatter: (params = []) => {
873
+ if (!params.length) return ''
874
+ const label = params[0].axisValue
875
+ let html = `<div style="font-weight:600;margin-bottom:6px">${label}</div>`
876
+ params.forEach(p => {
877
+ if (p.seriesName === '差值连线') return
878
+ const marker = `<span style="display:inline-block;width:10px;height:10px;border-radius:50%;background:${p.color};margin-right:6px"></span>`
879
+ html += `<div>${marker}${p.seriesName}: ${p.value}${valueSuffix}</div>`
880
+ })
881
+ // 计算差值
882
+ const highVal = params.find(p => p.seriesName === highName)?.value || 0
883
+ const lowVal = params.find(p => p.seriesName === lowName)?.value || 0
884
+ const diff = highVal - lowVal
885
+ html += `<div style="margin-top:4px;padding-top:4px;border-top:1px dashed #E5E9F0;color:#666">净额: ${diff}${valueSuffix}</div>`
886
+ return html
887
+ }
888
+ },
889
+ legend: {
890
+ show: true,
891
+ top: 0,
892
+ right: 20,
893
+ itemWidth: 16,
894
+ itemHeight: 8,
895
+ textStyle: { color: '#5C6C8C' },
896
+ data: [highName, lowName]
897
+ },
898
+ grid: {
899
+ top: 60,
900
+ left: 60,
901
+ right: 40,
902
+ bottom: 40,
903
+ containLabel: true
904
+ },
905
+ xAxis: {
906
+ type: 'category',
907
+ boundaryGap: false,
908
+ data: labels,
909
+ axisLine: { lineStyle: { color: '#C8D2E8' } },
910
+ axisLabel: { color: '#5C6C8C', fontWeight: 500 },
911
+ axisTick: { show: false },
912
+ splitLine: { show: false }
913
+ },
914
+ yAxis: {
915
+ type: 'value',
916
+ minInterval: 1,
917
+ axisLine: { show: false },
918
+ axisTick: { show: false },
919
+ axisLabel: {
920
+ color: '#5C6C8C',
921
+ fontWeight: 500,
922
+ formatter: value => `${value}${valueSuffix}`
923
+ },
924
+ splitLine: {
925
+ show: true,
926
+ lineStyle: { type: 'dashed', color: '#E0E6F1' }
927
+ }
928
+ },
929
+ series
930
+ }
931
+ }
716
932
  }
717
933
 
718
934
  // 颜色工具函数:将十六进制颜色转换为 RGB