vue2-client 1.15.109 → 1.15.111

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 (38) hide show
  1. package/.history/src/base-client/components/his/XChart/XChart_20250812134005.vue +160 -0
  2. package/.history/src/base-client/components/his/XChart/XChart_20250812134010.vue +160 -0
  3. package/.history/src/base-client/components/his/XChart/XChart_20250812134019.vue +160 -0
  4. package/.history/src/base-client/components/his/XChart/XChart_20250812134037.vue +160 -0
  5. package/.history/src/base-client/components/his/XChart/XChart_20250812134112.vue +160 -0
  6. package/.history/src/base-client/components/his/XChart/XChart_20250812134114.vue +160 -0
  7. package/.history/src/base-client/components/his/XChart/XChart_20250812134828.vue +148 -0
  8. package/.history/src/base-client/components/his/XChart/XChart_20250812134838.vue +155 -0
  9. package/.history/src/base-client/components/his/XChart/XChart_20250812134846.vue +155 -0
  10. package/.history/src/base-client/components/his/XChart/XChart_20250812134917.vue +155 -0
  11. package/.history/src/base-client/components/his/XChart/XChart_20250812151145.vue +149 -0
  12. package/.history/src/base-client/components/his/XChart/XChart_20250812151810.vue +153 -0
  13. package/.history/src/base-client/components/his/XChart/XChart_20250812151822.vue +153 -0
  14. package/.history/src/base-client/components/his/XChart/XChart_20250812151910.vue +153 -0
  15. package/.history/src/base-client/components/his/XChart/XChart_20250812152858.vue +258 -0
  16. package/.history/src/base-client/components/his/XChart/XChart_20250812152902.vue +258 -0
  17. package/.history/src/base-client/components/his/XChart/XChart_20250812152907.vue +258 -0
  18. package/.history/src/base-client/components/his/XChart/XChart_20250812152919.vue +258 -0
  19. package/.history/src/base-client/components/his/XChart/XChart_20250812153141.vue +269 -0
  20. package/.history/src/base-client/components/his/XChart/XChart_20250812153149.vue +276 -0
  21. package/.history/src/base-client/components/his/XChart/XChart_20250812153153.vue +276 -0
  22. package/.history/src/base-client/components/his/XChart/XChart_20250812153155.vue +276 -0
  23. package/.history/src/base-client/components/his/XChart/XChart_20250812153157.vue +276 -0
  24. package/.history/src/base-client/components/his/XChart/XChart_20250812153158.vue +276 -0
  25. package/.history/src/base-client/components/his/XChart/XChart_20250812153200.vue +276 -0
  26. package/.history/src/base-client/components/his/XChart/XChart_20250812153210.vue +276 -0
  27. package/.history/src/base-client/components/his/XChart/XChart_20250812153918.vue +275 -0
  28. package/.history/src/base-client/components/his/XChart/XChart_20250812154157.vue +280 -0
  29. package/.history/src/base-client/components/his/XChart/XChart_20250812154212.vue +280 -0
  30. package/.history/src/base-client/components/his/XChart/XChart_20250812154250.vue +280 -0
  31. package/.history/src/base-client/components/his/XChart/XChart_20250812154252.vue +280 -0
  32. package/.history/src/base-client/components/his/XChart/XChart_20250812154444.vue +280 -0
  33. package/package.json +1 -1
  34. package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +4 -3
  35. package/src/base-client/components/his/XChart/XChart.vue +280 -0
  36. package/src/base-client/components/his/XChart/dome.vue +19 -0
  37. package/src/base-client/components/his/XShiftSchedule/XShiftSchedule.vue +2 -2
  38. package/src/router/async/router.map.js +1 -1
@@ -0,0 +1,155 @@
1
+ <template>
2
+ <div ref="main" :style="{width: config.width, height: config.height}">
3
+ </div>
4
+ </template>
5
+
6
+ <script>
7
+ import * as echarts from 'echarts'
8
+ import ecStat from 'echarts-stat'
9
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
10
+
11
+ export default {
12
+ name: 'XTable',
13
+ props: {
14
+ // 配置名
15
+ queryParamsName: {
16
+ type: String,
17
+ default: ''
18
+ },
19
+ // 服务名
20
+ serviceName: {
21
+ type: String,
22
+ default: 'af-his'
23
+ },
24
+ // 标准值
25
+ standardValue: {
26
+ type: Number,
27
+ default: 3.5
28
+ }
29
+ },
30
+ data () {
31
+ return {
32
+ data: [
33
+ [1, 3.176513],
34
+ [2, 3.816464],
35
+ [3, 4.119688],
36
+ [4, 4.282233],
37
+ [5, 4.655492],
38
+ [6, 3.965162],
39
+ [7, 3.5149],
40
+ [8, 3.125947],
41
+ [9, 3.44808],
42
+ [10, 3.16744],
43
+ [11, 3.620992],
44
+ [12, 4.641845],
45
+ [13, 3.175939]
46
+ ],
47
+ // 配置项
48
+ config: {
49
+ width: '900px',
50
+ height: '700px'
51
+ }
52
+ }
53
+ },
54
+ mounted () {
55
+ this.renderChart()
56
+ },
57
+ methods: {
58
+ initDome (queryParamsName, parameter) {
59
+ getConfigByName(queryParamsName, 'af-his', async (res) => {
60
+ this.config = res
61
+ runLogic(res.data, parameter, 'af-his').then(result => {
62
+ this.data = result
63
+ this.renderChart()
64
+ })
65
+ })
66
+ },
67
+ // 渲染图表
68
+ renderChart () {
69
+ echarts.registerTransform(ecStat.transform.regression)
70
+ const chartDom = this.$refs.main
71
+ const myChart = echarts.init(chartDom)
72
+
73
+ const option = {
74
+ dataset: [
75
+ {
76
+ source: this.data
77
+ },
78
+ {
79
+ transform: {
80
+ type: 'ecStat:regression'
81
+ }
82
+ }
83
+ ],
84
+ title: {
85
+ text: '仪器质控图',
86
+ subtext: 'y轴:靶值,x轴:日期',
87
+ sublink: 'https://github.com/ecomfe/echarts-stat',
88
+ left: 'center'
89
+ },
90
+ legend: {
91
+ bottom: 5
92
+ },
93
+ tooltip: {
94
+ trigger: 'axis',
95
+ axisPointer: {
96
+ type: 'cross'
97
+ }
98
+ },
99
+ xAxis: {
100
+ splitLine: {
101
+ lineStyle: {
102
+ type: 'dashed'
103
+ }
104
+ }
105
+ },
106
+ yAxis: {
107
+ splitLine: {
108
+ lineStyle: {
109
+ type: 'dashed'
110
+ }
111
+ }
112
+ },
113
+ series: [
114
+ {
115
+ name: 'scatter',
116
+ type: 'scatter'
117
+ },
118
+ {
119
+ name: 'line',
120
+ type: 'line',
121
+ datasetIndex: 1,
122
+ symbolSize: 0.1,
123
+ symbol: 'circle',
124
+ label: { show: true, fontSize: 16 },
125
+ labelLayout: { dx: -20 },
126
+ encode: { label: 2, tooltip: 1 },
127
+ markLine: {
128
+ silent: true,
129
+ symbol: 'none',
130
+ lineStyle: {
131
+ color: '#a4a4a8',
132
+ width: 2,
133
+ type: 'dashed'
134
+ },
135
+ data: [
136
+ {
137
+ yAxis: this.standardValue,
138
+ label: {
139
+ formatter: `标准值: ${this.standardValue}`
140
+ }
141
+ }
142
+ ]
143
+ }
144
+ }
145
+ ]
146
+ }
147
+ option && myChart.setOption(option)
148
+ }
149
+ }
150
+ }
151
+ </script>
152
+
153
+ <style scoped lang="less">
154
+
155
+ </style>
@@ -0,0 +1,155 @@
1
+ <template>
2
+ <div ref="main" :style="{width: config.width, height: config.height}">
3
+ </div>
4
+ </template>
5
+
6
+ <script>
7
+ import * as echarts from 'echarts'
8
+ import ecStat from 'echarts-stat'
9
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
10
+
11
+ export default {
12
+ name: 'XTable',
13
+ props: {
14
+ // 配置名
15
+ queryParamsName: {
16
+ type: String,
17
+ default: ''
18
+ },
19
+ // 服务名
20
+ serviceName: {
21
+ type: String,
22
+ default: 'af-his'
23
+ },
24
+ // 标准值
25
+ standardValue: {
26
+ type: Number,
27
+ default: 3.5
28
+ }
29
+ },
30
+ data () {
31
+ return {
32
+ data: [
33
+ [1, 3.176513],
34
+ [2, 3.816464],
35
+ [3, 4.119688],
36
+ [4, 4.282233],
37
+ [5, 4.655492],
38
+ [6, 3.965162],
39
+ [7, 3.5149],
40
+ [8, 3.125947],
41
+ [9, 3.44808],
42
+ [10, 3.16744],
43
+ [11, 3.620992],
44
+ [12, 4.641845],
45
+ [13, 3.175939]
46
+ ],
47
+ // 配置项
48
+ config: {
49
+ width: '900px',
50
+ height: '700px'
51
+ }
52
+ }
53
+ },
54
+ mounted () {
55
+ this.renderChart()
56
+ },
57
+ methods: {
58
+ initDome (queryParamsName, parameter) {
59
+ getConfigByName(queryParamsName, 'af-his', async (res) => {
60
+ this.config = res
61
+ runLogic(res.data, parameter, 'af-his').then(result => {
62
+ this.data = result
63
+ this.renderChart()
64
+ })
65
+ })
66
+ },
67
+ // 渲染图表
68
+ renderChart () {
69
+ echarts.registerTransform(ecStat.transform.regression)
70
+ const chartDom = this.$refs.main
71
+ const myChart = echarts.init(chartDom)
72
+
73
+ const option = {
74
+ dataset: [
75
+ {
76
+ source: this.data
77
+ },
78
+ {
79
+ transform: {
80
+ type: 'ecStat:regression'
81
+ }
82
+ }
83
+ ],
84
+ title: {
85
+ text: '仪器质控图',
86
+ subtext: 'y轴:靶值,x轴:日期',
87
+ sublink: 'https://github.com/ecomfe/echarts-stat',
88
+ left: 'center'
89
+ },
90
+ legend: {
91
+ bottom: 5
92
+ },
93
+ tooltip: {
94
+ trigger: 'axis',
95
+ axisPointer: {
96
+ type: 'cross'
97
+ }
98
+ },
99
+ xAxis: {
100
+ splitLine: {
101
+ lineStyle: {
102
+ type: 'dashed'
103
+ }
104
+ }
105
+ },
106
+ yAxis: {
107
+ splitLine: {
108
+ lineStyle: {
109
+ type: 'dashed'
110
+ }
111
+ }
112
+ },
113
+ series: [
114
+ {
115
+ name: 'scatter',
116
+ type: 'scatter'
117
+ },
118
+ {
119
+ name: 'line',
120
+ type: 'line',
121
+ datasetIndex: 1,
122
+ symbolSize: 0.1,
123
+ symbol: 'circle',
124
+ label: { show: true, fontSize: 16 },
125
+ labelLayout: { dx: -20 },
126
+ encode: { label: 2, tooltip: 1 },
127
+ markLine: {
128
+ silent: true,
129
+ symbol: 'none',
130
+ lineStyle: {
131
+ color: '#a4a4a8',
132
+ width: 2,
133
+ type: 'dashed'
134
+ },
135
+ data: [
136
+ {
137
+ yAxis: this.standardValue,
138
+ label: {
139
+ formatter: `标准值: ${this.standardValue}`
140
+ }
141
+ }
142
+ ]
143
+ }
144
+ }
145
+ ]
146
+ }
147
+ option && myChart.setOption(option)
148
+ }
149
+ }
150
+ }
151
+ </script>
152
+
153
+ <style scoped lang="less">
154
+
155
+ </style>
@@ -0,0 +1,149 @@
1
+ <template>
2
+ <div ref="main" :style="{width: config.width, height: config.height}">
3
+ </div>
4
+ </template>
5
+
6
+ <script>
7
+ import * as echarts from 'echarts'
8
+ import ecStat from 'echarts-stat'
9
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
10
+
11
+ export default {
12
+ name: 'XTable',
13
+ props: {
14
+ // 配置名
15
+ queryParamsName: {
16
+ type: String,
17
+ default: ''
18
+ },
19
+ // 服务名
20
+ serviceName: {
21
+ type: String,
22
+ default: 'af-his'
23
+ },
24
+ // 标准值
25
+ standardValue: {
26
+ type: Number,
27
+ default: 3.5
28
+ }
29
+ },
30
+ data () {
31
+ return {
32
+ data: [],
33
+ // 配置项
34
+ config: {}
35
+ }
36
+ },
37
+ mounted () {},
38
+ methods: {
39
+ initDome (queryParamsName, parameter) {
40
+ getConfigByName(queryParamsName, 'af-his', async (res) => {
41
+ this.config = res
42
+ console.log('res', res)
43
+ runLogic(res.data, parameter, 'af-his').then(result => {
44
+ this.standardValue = result[0][this.config.standardValue]
45
+ const listData = result.map(item => [item.x, item.y])
46
+ this.data = listData
47
+ this.renderChart()
48
+ })
49
+ })
50
+ },
51
+ // 渲染图表
52
+ renderChart () {
53
+ echarts.registerTransform(ecStat.transform.regression)
54
+ const chartDom = this.$refs.main
55
+ const myChart = echarts.init(chartDom)
56
+
57
+ const option = {
58
+ dataset: [
59
+ {
60
+ source: this.data
61
+ },
62
+ {
63
+ transform: {
64
+ type: 'ecStat:regression'
65
+ }
66
+ }
67
+ ],
68
+ title: {
69
+ text: this.config.title,
70
+ subtext: this.config.subtext,
71
+ sublink: 'https://github.com/ecomfe/echarts-stat',
72
+ left: 'center'
73
+ },
74
+ legend: {
75
+ bottom: 5
76
+ },
77
+ tooltip: {
78
+ trigger: 'axis',
79
+ axisPointer: {
80
+ type: 'cross'
81
+ }
82
+ },
83
+ xAxis: {
84
+ splitLine: {
85
+ lineStyle: {
86
+ type: 'dashed'
87
+ }
88
+ }
89
+ },
90
+ yAxis: {
91
+ splitLine: {
92
+ lineStyle: {
93
+ type: 'dashed'
94
+ }
95
+ }
96
+ },
97
+ series: [
98
+ {
99
+ name: '质检参数分布',
100
+ type: 'scatter'
101
+ },
102
+ {
103
+ name: '质检参数曲线',
104
+ type: 'line',
105
+ datasetIndex: 1,
106
+ symbolSize: 0.1,
107
+ symbol: 'circle',
108
+ label: { show: true, fontSize: 16 },
109
+ labelLayout: { dx: -20 },
110
+ encode: { label: 2, tooltip: 1 },
111
+ markLine: {
112
+ silent: true,
113
+ symbol: 'none',
114
+ lineStyle: {
115
+ color: '#a4a4a8',
116
+ width: 2,
117
+ type: 'dashed'
118
+ },
119
+ data: [
120
+ {
121
+ yAxis: this.standardValue,
122
+ label: {
123
+ formatter: `${this.config.formatter}: ${this.standardValue}`
124
+ }
125
+ }
126
+ ]
127
+ }
128
+ }
129
+ ]
130
+ }
131
+ option && myChart.setOption(option)
132
+ }
133
+ },
134
+ watch: {
135
+ queryParamsName: {
136
+ deep: true,
137
+ immediate: true,
138
+ handler (val) {
139
+ console.log('queryParamsName', val)
140
+ this.initDome(val, {})
141
+ }
142
+ }
143
+ }
144
+ }
145
+ </script>
146
+
147
+ <style scoped lang="less">
148
+
149
+ </style>
@@ -0,0 +1,153 @@
1
+ <template>
2
+ <div ref="main" :style="{width: config.width, height: config.height}">
3
+ </div>
4
+ </template>
5
+
6
+ <script>
7
+ import * as echarts from 'echarts'
8
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
9
+
10
+ export default {
11
+ name: 'XTable',
12
+ props: {
13
+ // 配置名
14
+ queryParamsName: {
15
+ type: String,
16
+ default: ''
17
+ },
18
+ // 服务名
19
+ serviceName: {
20
+ type: String,
21
+ default: 'af-his'
22
+ }
23
+ },
24
+ data () {
25
+ return {
26
+ data: [],
27
+ // LJ 中心线(靶值/均值)
28
+ standardValue: 3.5,
29
+ // 配置项
30
+ config: {}
31
+ }
32
+ },
33
+ mounted () {},
34
+ methods: {
35
+ initDome (queryParamsName, parameter) {
36
+ getConfigByName(queryParamsName, 'af-his', async (res) => {
37
+ this.config = res
38
+ console.log('res', res)
39
+ runLogic(res.data, parameter, 'af-his').then(result => {
40
+ // 以配置中的字段名提取靶值(中心线)
41
+ this.standardValue = Number(result[0][this.config.standardValue])
42
+ const listData = result.map(item => [item.x, item.y])
43
+ this.data = listData
44
+ this.renderChart()
45
+ })
46
+ })
47
+ },
48
+ // 渲染图表
49
+ renderChart () {
50
+ const chartDom = this.$refs.main
51
+ const myChart = echarts.init(chartDom)
52
+
53
+ // 计算 SD(允许从配置读取,否则用样本标准差估算)
54
+ const yValues = this.data.map(d => Number(d[1])).filter(v => !isNaN(v))
55
+ let sd = Number(this.config.sd || this.config.sigma)
56
+ if (!sd || isNaN(sd)) {
57
+ const n = yValues.length
58
+ if (n > 1) {
59
+ const mean = yValues.reduce((a, b) => a + b, 0) / n
60
+ const variance = yValues.reduce((a, v) => a + Math.pow(v - mean, 2), 0) / (n - 1)
61
+ sd = Math.sqrt(variance)
62
+ } else sd = 0
63
+ }
64
+ if (sd === 0) sd = 1
65
+
66
+ const center = Number(this.standardValue)
67
+ const lines = [
68
+ { value: center, label: `${this.config.formatter || 'CL'}: ${center}`, color: '#a4a4a8', type: 'solid' },
69
+ { value: center + sd, label: '+1 SD', color: '#67C23A', type: 'dotted' },
70
+ { value: center - sd, label: '-1 SD', color: '#67C23A', type: 'dotted' },
71
+ { value: center + 2 * sd, label: '+2 SD', color: '#E6A23C', type: 'dashed' },
72
+ { value: center - 2 * sd, label: '-2 SD', color: '#E6A23C', type: 'dashed' },
73
+ { value: center + 3 * sd, label: '+3 SD', color: '#F56C6C', type: 'solid' },
74
+ { value: center - 3 * sd, label: '-3 SD', color: '#F56C6C', type: 'solid' }
75
+ ]
76
+
77
+ const option = {
78
+ title: {
79
+ text: this.config.title,
80
+ subtext: this.config.subtext,
81
+ left: 'center'
82
+ },
83
+ legend: {
84
+ bottom: 5
85
+ },
86
+ tooltip: {
87
+ trigger: 'axis',
88
+ axisPointer: { type: 'cross' },
89
+ formatter: params => {
90
+ if (!params || !params.length) return ''
91
+ const p = params[0]
92
+ const y = Number(p.data && p.data[1])
93
+ const z = ((y - center) / sd).toFixed(2)
94
+ return `x: ${p.data && p.data[0]}<br/>y: ${y}<br/>Δ: ${(y - center).toFixed(2)}<br/>z: ${z}`
95
+ }
96
+ },
97
+ xAxis: {
98
+ type: 'value',
99
+ splitLine: {
100
+ lineStyle: {
101
+ type: 'dashed'
102
+ }
103
+ }
104
+ },
105
+ yAxis: {
106
+ type: 'value',
107
+ splitLine: {
108
+ lineStyle: {
109
+ type: 'dashed'
110
+ }
111
+ }
112
+ },
113
+ series: [
114
+ {
115
+ name: '检验值',
116
+ type: 'line',
117
+ data: this.data,
118
+ showSymbol: true,
119
+ symbol: 'circle',
120
+ symbolSize: 6,
121
+ lineStyle: { width: 2, color: '#409EFF' },
122
+ itemStyle: { color: '#409EFF' },
123
+ markLine: {
124
+ silent: true,
125
+ symbol: 'none',
126
+ data: lines.map(l => ({
127
+ yAxis: l.value,
128
+ lineStyle: { color: l.color, type: l.type, width: 2 },
129
+ label: { formatter: l.label }
130
+ }))
131
+ }
132
+ }
133
+ ]
134
+ }
135
+ option && myChart.setOption(option)
136
+ }
137
+ },
138
+ watch: {
139
+ queryParamsName: {
140
+ deep: true,
141
+ immediate: true,
142
+ handler (val) {
143
+ console.log('queryParamsName', val)
144
+ this.initDome(val, {})
145
+ }
146
+ }
147
+ }
148
+ }
149
+ </script>
150
+
151
+ <style scoped lang="less">
152
+
153
+ </style>