vue2-client 1.12.2 → 1.12.3-9.alpha.1

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 (44) hide show
  1. package/.env.iot +19 -0
  2. package/babel.config.js +4 -1
  3. package/docs//345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +175 -174
  4. package/package.json +2 -2
  5. package/src/base-client/components/common/XCardSet/XCardSet.vue +300 -0
  6. package/src/base-client/components/common/XCollapse/XCollapse.vue +154 -0
  7. package/src/base-client/components/common/XConversation/XConversation.vue +87 -2
  8. package/src/base-client/components/common/XConversation/XConversationDemo.vue +28 -28
  9. package/src/base-client/components/common/XDataCard/XDataCard.vue +47 -21
  10. package/src/base-client/components/common/XDatePicker/index.vue +13 -3
  11. package/src/base-client/components/common/XForm/XForm.vue +1 -1
  12. package/src/base-client/components/common/XForm/XFormItem.vue +17 -7
  13. package/src/base-client/components/common/XForm/XTreeSelect.vue +263 -264
  14. package/src/base-client/components/common/XForm/demo.vue +105 -0
  15. package/src/base-client/components/common/XFormTable/demo.vue +11 -3
  16. package/src/base-client/components/common/XPrint/Demo.vue +41 -41
  17. package/src/base-client/components/common/XRate/demo.vue +102 -0
  18. package/src/base-client/components/common/XRate/index.vue +136 -0
  19. package/src/base-client/components/common/XReportGrid/XReport.vue +240 -305
  20. package/src/base-client/components/common/XReportGrid/XReportDemo.vue +0 -2
  21. package/src/base-client/components/common/XReportGrid/XReportDesign.vue +115 -345
  22. package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +100 -723
  23. package/src/base-client/components/common/XTable/XTable.vue +3 -0
  24. package/src/base-client/components/common/XTable/XTableWrapper.vue +7 -3
  25. package/src/base-client/components/his/XHDescriptions/XHDescriptions.vue +172 -0
  26. package/src/base-client/components/his/XHisEditor/XHisEditor.vue +360 -359
  27. package/src/layouts/GridView.vue +43 -45
  28. package/src/logic/plugins/common/DateTools.js +3 -0
  29. package/src/logic/plugins/common/VueTools.js +30 -0
  30. package/src/logic/plugins/index.js +3 -1
  31. package/src/pages/LogicCallExample/index.vue +10 -0
  32. package/src/pages/WorkflowDetail/WorkFlowDemo.vue +47 -32
  33. package/src/pages/WorkflowDetail/WorkflowDetail.vue +5 -0
  34. package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +876 -864
  35. package/src/pages/userInfoDetailManage/index.vue +82 -82
  36. package/src/plugins/HiPrintPlugin.js +164 -124
  37. package/src/router/async/router.map.js +3 -2
  38. package/src/services/v3Api.js +116 -116
  39. package/src/utils/EncryptUtil.js +6 -7
  40. package/src/utils/indexedDB.js +3 -1
  41. package/src/utils/request.js +4 -8
  42. package/src/utils/routerUtil.js +17 -0
  43. package/.babelrc +0 -3
  44. package/src/base-client/components/common/XReportGrid/XReportJsonRender.vue +0 -380
@@ -1,41 +1,41 @@
1
- <script>
2
- import PrintBill from './PrintBill.vue'
3
-
4
- export default {
5
- name: 'Demo',
6
- components: { PrintBill },
7
- methods: {
8
- print () {
9
- this.$refs.print.print({
10
- reprint: '正常',
11
- billUrl: 'iot_bill',
12
- operator: `张三丰`,
13
- condition: '21952838'
14
- })
15
- },
16
- printOk () {
17
- console.log('打印成功')
18
- },
19
- test1 () {
20
- this.$printB('DiagnosisCertificate', { title: '测试浏览器打印' })
21
- },
22
- test2 () {
23
- this.$printC('DiagnosisCertificate', { title: 'DiagnosisCertificate' })
24
- }
25
- }
26
- }
27
- </script>
28
-
29
- <template>
30
- <div>
31
- <a-button @click="print">打印</a-button>
32
- <a-button @click="test1">测试打印1</a-button>
33
- <a-button @click="test2">测试打印2</a-button>
34
-
35
- <print-bill ref="print" @ok="printOk" :autoPrint="false"></print-bill>
36
- </div>
37
- </template>
38
-
39
- <style scoped>
40
-
41
- </style>
1
+ <script>
2
+ import PrintBill from './PrintBill.vue'
3
+
4
+ export default {
5
+ name: 'Demo',
6
+ components: { PrintBill },
7
+ methods: {
8
+ print () {
9
+ this.$refs.print.print({
10
+ reprint: '正常',
11
+ billUrl: 'iot_bill',
12
+ operator: `张三丰`,
13
+ condition: '21952838'
14
+ })
15
+ },
16
+ printOk () {
17
+ console.log('打印成功')
18
+ },
19
+ test1 () {
20
+ this.$printB('iot_bill_template', { condition: '21971601' })
21
+ },
22
+ test2 () {
23
+ this.$printC('DiagnosisCertificate', { title: 'DiagnosisCertificate' })
24
+ }
25
+ }
26
+ }
27
+ </script>
28
+
29
+ <template>
30
+ <div>
31
+ <a-button @click="print">打印</a-button>
32
+ <a-button @click="test1">测试打印1</a-button>
33
+ <a-button @click="test2">测试打印2</a-button>
34
+
35
+ <print-bill ref="print" @ok="printOk" :autoPrint="false"></print-bill>
36
+ </div>
37
+ </template>
38
+
39
+ <style scoped>
40
+
41
+ </style>
@@ -0,0 +1,102 @@
1
+ <template>
2
+ <div class="demo-container">
3
+ <h2>XRate 评分组件示例</h2>
4
+
5
+ <div class="demo-section">
6
+ <h3>基础用法</h3>
7
+ <x-rate v-model="basicRate" />
8
+ <div>当前值: {{ basicRate }}</div>
9
+ <a-button @click="resetBasicRate">重置</a-button>
10
+ </div>
11
+
12
+ <div class="demo-section">
13
+ <h3>允许半星</h3>
14
+ <x-rate v-model="halfRate" :allow-half="true" />
15
+ <div>当前值: {{ halfRate }}</div>
16
+ </div>
17
+
18
+ <div class="demo-section">
19
+ <h3>自定义最大分值</h3>
20
+ <x-rate v-model="customRate" :max-count="10" />
21
+ <div>当前值: {{ customRate }}</div>
22
+ </div>
23
+
24
+ <div class="demo-section">
25
+ <h3>查询模式</h3>
26
+ <x-rate v-model="queryRate" mode="查询" />
27
+ <div>当前值: {{ queryRate }}</div>
28
+ </div>
29
+
30
+ <div class="demo-section">
31
+ <h3>查询模式(多选)</h3>
32
+ <x-rate v-model="queryMultiRate" mode="查询" query-type="IN" />
33
+ <div>当前值: {{ queryMultiRate }}</div>
34
+ </div>
35
+
36
+ <div class="demo-section">
37
+ <h3>禁用状态</h3>
38
+ <x-rate v-model="disabledRate" :disabled="true" />
39
+ <div>当前值: {{ disabledRate }}</div>
40
+ </div>
41
+
42
+ <div class="demo-section">
43
+ <h3>空值处理</h3>
44
+ <x-rate v-model="emptyRate" />
45
+ <div>当前值: {{ emptyRate }}</div>
46
+ <a-button @click="clearRate">清除</a-button>
47
+ </div>
48
+ </div>
49
+ </template>
50
+
51
+ <script>
52
+ import XRate from './index.vue'
53
+
54
+ export default {
55
+ name: 'XRateDemo',
56
+ components: {
57
+ XRate
58
+ },
59
+ data () {
60
+ return {
61
+ basicRate: 3,
62
+ halfRate: 3.5,
63
+ customRate: 7,
64
+ queryRate: 4,
65
+ queryMultiRate: [3, 4],
66
+ disabledRate: 2,
67
+ emptyRate: undefined
68
+ }
69
+ },
70
+ methods: {
71
+ resetBasicRate () {
72
+ this.basicRate = 3
73
+ },
74
+ clearRate () {
75
+ this.emptyRate = undefined
76
+ }
77
+ }
78
+ }
79
+ </script>
80
+
81
+ <style lang="less" scoped>
82
+ .demo-container {
83
+ padding: 20px;
84
+
85
+ .demo-section {
86
+ margin-bottom: 30px;
87
+ padding: 20px;
88
+ border: 1px solid #eee;
89
+ border-radius: 4px;
90
+
91
+ h3 {
92
+ margin-top: 0;
93
+ margin-bottom: 16px;
94
+ color: #333;
95
+ }
96
+
97
+ .ant-btn {
98
+ margin-top: 8px;
99
+ }
100
+ }
101
+ }
102
+ </style>
@@ -0,0 +1,136 @@
1
+ <template>
2
+ <div class="x-rate">
3
+ <template v-if="mode === '查询'">
4
+ <a-select
5
+ style="width:100%"
6
+ :value="value"
7
+ :disabled="disabled"
8
+ :filter-option="filterOption"
9
+ :getPopupContainer="getPopupContainer"
10
+ :placeholder="placeholder"
11
+ :mode="queryType === 'IN' ? 'multiple' : undefined"
12
+ show-search
13
+ allowClear
14
+ @change="handleSelectChange"
15
+ >
16
+ <a-select-option v-if="!queryType || queryType !== 'IN'" key="999999" value="">全部</a-select-option>
17
+ <a-select-option
18
+ v-for="val in getRateOptions"
19
+ :key="val"
20
+ :value="val"
21
+ >
22
+ <a-rate
23
+ :value="transformValueToStars(val)"
24
+ :count="5"
25
+ :allowHalf="allowHalf"
26
+ disabled
27
+ />
28
+ </a-select-option>
29
+ </a-select>
30
+ </template>
31
+ <a-rate
32
+ v-else
33
+ :value="transformValueToStars(value)"
34
+ :count="5"
35
+ :disabled="disabled"
36
+ :allowHalf="allowHalf"
37
+ @change="handleRateChange"
38
+ />
39
+ </div>
40
+ </template>
41
+
42
+ <script>
43
+ export default {
44
+ name: 'XRate',
45
+ model: {
46
+ prop: 'value',
47
+ event: 'input'
48
+ },
49
+ props: {
50
+ value: {
51
+ type: [Number, String],
52
+ default: undefined
53
+ },
54
+ mode: {
55
+ type: String,
56
+ default: '新增/修改'
57
+ },
58
+ disabled: {
59
+ type: Boolean,
60
+ default: false
61
+ },
62
+ placeholder: {
63
+ type: String,
64
+ default: '请选择'
65
+ },
66
+ queryType: {
67
+ type: String,
68
+ default: ''
69
+ },
70
+ maxCount: {
71
+ type: Number,
72
+ default: 5
73
+ },
74
+ allowHalf: {
75
+ type: Boolean,
76
+ default: false
77
+ }
78
+ },
79
+ computed: {
80
+ getRateOptions () {
81
+ const options = []
82
+ const step = this.allowHalf ? this.maxCount / 10 : this.maxCount / 5
83
+
84
+ for (let i = (this.allowHalf ? step : step); i <= this.maxCount; i += step) {
85
+ options.push(i)
86
+ }
87
+ return options
88
+ }
89
+ },
90
+ methods: {
91
+ // 将实际分值转换为星星显示值(1-5星)
92
+ transformValueToStars (value) {
93
+ if (!value && value !== 0) return 0
94
+ return (value / this.maxCount) * 5
95
+ },
96
+ // 处理评分变化
97
+ handleRateChange (value) {
98
+ // 将星星数(1-5)转换为实际分值
99
+ const actualValue = (value / 5) * this.maxCount
100
+
101
+ // 如果支持半星,保留一位小数;否则取整
102
+ const result = this.allowHalf
103
+ ? Math.round(actualValue * 10) / 10
104
+ : Math.round(actualValue)
105
+
106
+ this.$emit('input', result)
107
+ this.$emit('change', result)
108
+ },
109
+ // 处理下拉选择变化
110
+ handleSelectChange (value) {
111
+ this.$emit('input', value)
112
+ this.$emit('change', value)
113
+ },
114
+ filterOption (input, option) {
115
+ const child = option.componentOptions.children[0]
116
+ if (child.text) {
117
+ return child.text.toLowerCase().indexOf(input.toLowerCase()) >= 0
118
+ } else if (child.elm.innerText) {
119
+ return child.elm.innerText.toLowerCase().indexOf(input.toLowerCase()) >= 0
120
+ } else {
121
+ return child.child.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
122
+ }
123
+ },
124
+ getPopupContainer (triggerNode) {
125
+ return document.body
126
+ }
127
+ }
128
+ }
129
+ </script>
130
+
131
+ <style lang="less" scoped>
132
+ .x-rate {
133
+ width: 100%;
134
+ display: inline-block;
135
+ }
136
+ </style>