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.
- package/.env.iot +19 -0
- package/babel.config.js +4 -1
- package/docs//345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +175 -174
- package/package.json +2 -2
- package/src/base-client/components/common/XCardSet/XCardSet.vue +300 -0
- package/src/base-client/components/common/XCollapse/XCollapse.vue +154 -0
- package/src/base-client/components/common/XConversation/XConversation.vue +87 -2
- package/src/base-client/components/common/XConversation/XConversationDemo.vue +28 -28
- package/src/base-client/components/common/XDataCard/XDataCard.vue +47 -21
- package/src/base-client/components/common/XDatePicker/index.vue +13 -3
- package/src/base-client/components/common/XForm/XForm.vue +1 -1
- package/src/base-client/components/common/XForm/XFormItem.vue +17 -7
- package/src/base-client/components/common/XForm/XTreeSelect.vue +263 -264
- package/src/base-client/components/common/XForm/demo.vue +105 -0
- package/src/base-client/components/common/XFormTable/demo.vue +11 -3
- package/src/base-client/components/common/XPrint/Demo.vue +41 -41
- package/src/base-client/components/common/XRate/demo.vue +102 -0
- package/src/base-client/components/common/XRate/index.vue +136 -0
- package/src/base-client/components/common/XReportGrid/XReport.vue +240 -305
- package/src/base-client/components/common/XReportGrid/XReportDemo.vue +0 -2
- package/src/base-client/components/common/XReportGrid/XReportDesign.vue +115 -345
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +100 -723
- package/src/base-client/components/common/XTable/XTable.vue +3 -0
- package/src/base-client/components/common/XTable/XTableWrapper.vue +7 -3
- package/src/base-client/components/his/XHDescriptions/XHDescriptions.vue +172 -0
- package/src/base-client/components/his/XHisEditor/XHisEditor.vue +360 -359
- package/src/layouts/GridView.vue +43 -45
- package/src/logic/plugins/common/DateTools.js +3 -0
- package/src/logic/plugins/common/VueTools.js +30 -0
- package/src/logic/plugins/index.js +3 -1
- package/src/pages/LogicCallExample/index.vue +10 -0
- package/src/pages/WorkflowDetail/WorkFlowDemo.vue +47 -32
- package/src/pages/WorkflowDetail/WorkflowDetail.vue +5 -0
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +876 -864
- package/src/pages/userInfoDetailManage/index.vue +82 -82
- package/src/plugins/HiPrintPlugin.js +164 -124
- package/src/router/async/router.map.js +3 -2
- package/src/services/v3Api.js +116 -116
- package/src/utils/EncryptUtil.js +6 -7
- package/src/utils/indexedDB.js +3 -1
- package/src/utils/request.js +4 -8
- package/src/utils/routerUtil.js +17 -0
- package/.babelrc +0 -3
- package/src/base-client/components/common/XReportGrid/XReportJsonRender.vue +0 -380
|
@@ -2,21 +2,11 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<div v-if="render" class="XCard">
|
|
4
4
|
<template v-for="(card, itemIndex) in data">
|
|
5
|
-
<a-card
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<!-- :service-name="serviceName"-->
|
|
11
|
-
<!-- :env="env"-->
|
|
12
|
-
<!-- :dataCard="true"-->
|
|
13
|
-
<!-- :badge-key="column.slotKeyMap"-->
|
|
14
|
-
<!-- :value="card[item.key]" />-->
|
|
15
|
-
<!-- </template>-->
|
|
16
|
-
<!-- <template v-else>-->
|
|
17
|
-
<!-- <slot :name="column.slots.customRender">{{ card[config.bandage] }}</slot>-->
|
|
18
|
-
<!-- </template>-->
|
|
19
|
-
<!-- </div>-->
|
|
5
|
+
<a-card
|
|
6
|
+
:key="'card' + itemIndex"
|
|
7
|
+
class="data-card"
|
|
8
|
+
:class="{ 'card-clicked': card.isClicked }"
|
|
9
|
+
>
|
|
20
10
|
<div
|
|
21
11
|
v-if="config && card[config.ribbon]"
|
|
22
12
|
class="ribbon"
|
|
@@ -25,7 +15,7 @@
|
|
|
25
15
|
</div>
|
|
26
16
|
<!-- 自定义标题 -->
|
|
27
17
|
<template #title>
|
|
28
|
-
<div class="custom-title">
|
|
18
|
+
<div class="custom-title" @click="clickFooter(card, 'cardclick', itemIndex)">
|
|
29
19
|
<a-tooltip placement="top">
|
|
30
20
|
<template #title>{{ card[config.id] }}</template>
|
|
31
21
|
<div class="title-id" v-if="card[config.id]">{{ card[config.id] }}</div>
|
|
@@ -51,7 +41,7 @@
|
|
|
51
41
|
</div>
|
|
52
42
|
</template>
|
|
53
43
|
<!-- 主体 -->
|
|
54
|
-
<div class="body">
|
|
44
|
+
<div class="body" v-if="card[config.text] || (config.content && config.content.length > 0)">
|
|
55
45
|
<div class="body-text" v-if="card[config.text]">
|
|
56
46
|
<a-tooltip :title="card[config.text]">
|
|
57
47
|
<span class="text-ellipsis">{{ card[config.text] }}</span>
|
|
@@ -97,9 +87,9 @@
|
|
|
97
87
|
</div>
|
|
98
88
|
<!-- 下方按钮 -->
|
|
99
89
|
<template #actions>
|
|
100
|
-
<a-row align="middle" class="custom-actions">
|
|
90
|
+
<a-row align="middle" class="custom-actions" v-if="config && config.footer && config.footer.length > 0">
|
|
101
91
|
<template v-for="(item, footerIndex) in config.footer">
|
|
102
|
-
<a-col :key="'footer_' + footerIndex" class="footer-item" :span="11" @click="clickFooter(card, item.emit)">
|
|
92
|
+
<a-col :key="'footer_' + footerIndex" class="footer-item" :span="11" @click="clickFooter(card, item.emit, itemIndex)">
|
|
103
93
|
<span>
|
|
104
94
|
<a-icon :type="item.icon" class="footer-icon" />
|
|
105
95
|
<span>{{ item.label }}</span>
|
|
@@ -189,6 +179,7 @@ export default {
|
|
|
189
179
|
default: false
|
|
190
180
|
}
|
|
191
181
|
},
|
|
182
|
+
inject: ['getConfigByName'],
|
|
192
183
|
data () {
|
|
193
184
|
return {
|
|
194
185
|
// 配置
|
|
@@ -204,7 +195,10 @@ export default {
|
|
|
204
195
|
// 分页大小选项
|
|
205
196
|
pageSizeOptions: ['4', '6', '8', '10'],
|
|
206
197
|
// 数据总数
|
|
207
|
-
total: 0
|
|
198
|
+
total: 0,
|
|
199
|
+
activeCardIndex: null, // 新增:记录当前激活的卡片索引
|
|
200
|
+
// 混入插槽组件的数据
|
|
201
|
+
mixinData: {},
|
|
208
202
|
}
|
|
209
203
|
},
|
|
210
204
|
created () {
|
|
@@ -314,7 +308,28 @@ export default {
|
|
|
314
308
|
return result
|
|
315
309
|
},
|
|
316
310
|
// 点击按钮
|
|
317
|
-
clickFooter (data, eventName) {
|
|
311
|
+
async clickFooter (data, eventName, index) {
|
|
312
|
+
if (eventName === 'cardclick') {
|
|
313
|
+
// 先触发 beforeSwitch 事件
|
|
314
|
+
if (this.data && Array.isArray(this.data)) {
|
|
315
|
+
for (const item of this.data) {
|
|
316
|
+
if (item.isClicked) {
|
|
317
|
+
// 等待 beforeSwitch 事件处理完成
|
|
318
|
+
await this.$emit('cardEmit', item, 'beforeSwitch')
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
// 清除所有卡片的点击状态
|
|
323
|
+
if (this.data && Array.isArray(this.data)) {
|
|
324
|
+
this.data.forEach(item => {
|
|
325
|
+
if (item.isClicked) {
|
|
326
|
+
this.$set(item, 'isClicked', false)
|
|
327
|
+
}
|
|
328
|
+
})
|
|
329
|
+
}
|
|
330
|
+
// 设置当前卡片的点击状态
|
|
331
|
+
this.$set(data, 'isClicked', true)
|
|
332
|
+
}
|
|
318
333
|
this.$emit('cardEmit', data, eventName)
|
|
319
334
|
},
|
|
320
335
|
// 获取数据
|
|
@@ -470,6 +485,13 @@ export default {
|
|
|
470
485
|
color: black;
|
|
471
486
|
}
|
|
472
487
|
}
|
|
488
|
+
|
|
489
|
+
&.card-clicked {
|
|
490
|
+
:deep(.ant-card-head) {
|
|
491
|
+
background-color: #e6f7ff;
|
|
492
|
+
transition: background-color 0.3s ease;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
473
495
|
}
|
|
474
496
|
|
|
475
497
|
.custom-title {
|
|
@@ -477,6 +499,10 @@ export default {
|
|
|
477
499
|
align-items: center;
|
|
478
500
|
gap: 12px;
|
|
479
501
|
|
|
502
|
+
&:hover {
|
|
503
|
+
cursor: pointer;
|
|
504
|
+
}
|
|
505
|
+
|
|
480
506
|
.title-id {
|
|
481
507
|
flex-shrink: 0;
|
|
482
508
|
width: 65px;
|
|
@@ -45,7 +45,8 @@ export default {
|
|
|
45
45
|
prop: 'value',
|
|
46
46
|
event: 'change',
|
|
47
47
|
},
|
|
48
|
-
mounted () {
|
|
48
|
+
mounted () {
|
|
49
|
+
},
|
|
49
50
|
computed: {
|
|
50
51
|
localValue: {
|
|
51
52
|
get () {
|
|
@@ -59,7 +60,8 @@ export default {
|
|
|
59
60
|
return this.value[0]
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
|
-
} catch (e) {
|
|
63
|
+
} catch (e) {
|
|
64
|
+
}
|
|
63
65
|
return this.value
|
|
64
66
|
},
|
|
65
67
|
set (val) {
|
|
@@ -158,6 +160,14 @@ export default {
|
|
|
158
160
|
return false
|
|
159
161
|
}
|
|
160
162
|
},
|
|
163
|
+
otherattr () {
|
|
164
|
+
if (['yearRangePicker', 'monthRangePicker'].includes(this.attr.type)) {
|
|
165
|
+
return {
|
|
166
|
+
mode: this.showMode
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return {}
|
|
170
|
+
}
|
|
161
171
|
},
|
|
162
172
|
methods: {
|
|
163
173
|
moment,
|
|
@@ -249,10 +259,10 @@ export default {
|
|
|
249
259
|
"
|
|
250
260
|
:ranges="ranges"
|
|
251
261
|
style="width: 100%"
|
|
252
|
-
:mode="showMode"
|
|
253
262
|
:format="formatType"
|
|
254
263
|
@panelChange="RangePanelChange"
|
|
255
264
|
@change="RangePanelChange"
|
|
265
|
+
v-bind="otherattr"
|
|
256
266
|
/>
|
|
257
267
|
</template>
|
|
258
268
|
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
</x-form-col>
|
|
78
78
|
<!-- 下拉框 -->
|
|
79
79
|
<x-form-col
|
|
80
|
-
v-else-if="
|
|
80
|
+
v-else-if="attr.type === 'select' && show"
|
|
81
81
|
:labelCol="labelCol"
|
|
82
82
|
:flex="attr.flex">
|
|
83
83
|
<a-form-model-item
|
|
@@ -535,8 +535,14 @@
|
|
|
535
535
|
:ref="attr.model"
|
|
536
536
|
:label="showLabel?attr.name:undefined"
|
|
537
537
|
:prop="attr.prop ? attr.prop : attr.model">
|
|
538
|
-
<
|
|
538
|
+
<x-rate
|
|
539
539
|
v-model="form[attr.model]"
|
|
540
|
+
:mode="mode"
|
|
541
|
+
:disabled="disabled"
|
|
542
|
+
:query-type="attr.queryType"
|
|
543
|
+
:max-count="attr.maxCount"
|
|
544
|
+
:allow-half="attr.allowHalf"
|
|
545
|
+
:placeholder="attr.placeholder ? attr.placeholder : '请选择'+attr.name.replace(/\s*/g, '')"
|
|
540
546
|
@change="attr.dataChangeFunc && debouncedDataChangeFunc()"
|
|
541
547
|
/>
|
|
542
548
|
</a-form-model-item>
|
|
@@ -644,6 +650,7 @@ import XClickChangeBtn from './itemComponent/XClickChangeBtn'
|
|
|
644
650
|
import 'moment/locale/zh-cn'
|
|
645
651
|
import XFormDatePicker from '@vue2-client/base-client/components/common/XDatePicker/index.vue'
|
|
646
652
|
import XIntervalPicker from '@vue2-client/base-client/components/common/XIntervalPicker/XIntervalPicker.vue'
|
|
653
|
+
import XRate from '@vue2-client/base-client/components/common/XRate/index.vue'
|
|
647
654
|
|
|
648
655
|
export default {
|
|
649
656
|
name: 'XFormItem',
|
|
@@ -662,7 +669,8 @@ export default {
|
|
|
662
669
|
Upload,
|
|
663
670
|
XStatusButton,
|
|
664
671
|
XClickChangeBtn,
|
|
665
|
-
XIntervalPicker
|
|
672
|
+
XIntervalPicker,
|
|
673
|
+
XRate
|
|
666
674
|
},
|
|
667
675
|
data () {
|
|
668
676
|
// 检索去抖
|
|
@@ -813,7 +821,7 @@ export default {
|
|
|
813
821
|
}
|
|
814
822
|
// xTreeSelect 自己调用 mounted
|
|
815
823
|
if (this.attr.type !== 'treeSelect') {
|
|
816
|
-
this.$emit('mounted')
|
|
824
|
+
this.$emit('mounted', this.attr)
|
|
817
825
|
}
|
|
818
826
|
},
|
|
819
827
|
computed: {
|
|
@@ -963,12 +971,14 @@ export default {
|
|
|
963
971
|
// 更新人员下拉框数据
|
|
964
972
|
async updateResOptions (type) {
|
|
965
973
|
if (this?.attr?.keyName?.toString()?.startsWith('search@根据表单项[') && this?.attr?.keyName?.toString()?.endsWith(`]联动${type}`)) {
|
|
966
|
-
const searchData = { source: `获取${type}`, userid: this.currUser.id }
|
|
967
974
|
const startIndex = this.attr.keyName.indexOf('[') + 1
|
|
968
975
|
const endIndex = this.attr.keyName.indexOf(']', startIndex)
|
|
969
976
|
const fromModel = this.attr.keyName.substring(startIndex, endIndex).replace('.', '_')
|
|
970
|
-
const formModelData = this.form[fromModel]
|
|
977
|
+
const formModelData = Array.isArray(this.form[fromModel])
|
|
978
|
+
? this.form[fromModel]
|
|
979
|
+
: [this.form[fromModel]]
|
|
971
980
|
if (fromModel?.length && formModelData?.length) {
|
|
981
|
+
const searchData = { source: `获取${type}`, userid: this.currUser.id, filter: formModelData, filterType: fromModel.indexOf('org') > -1 ? 'org' : 'dep' }
|
|
972
982
|
await searchToListOption(searchData, res => {
|
|
973
983
|
this.getDataCallback(
|
|
974
984
|
res.filter(h => {
|
|
@@ -1241,7 +1251,7 @@ export default {
|
|
|
1241
1251
|
getPopupContainer (triggerNode) {
|
|
1242
1252
|
return document.body
|
|
1243
1253
|
// return triggerNode.parentNode
|
|
1244
|
-
}
|
|
1254
|
+
},
|
|
1245
1255
|
}
|
|
1246
1256
|
}
|
|
1247
1257
|
</script>
|