vue2-client 1.21.14 → 1.22.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 (42) hide show
  1. package/package.json +1 -1
  2. package/src/base-client/components/common/XFormTable/XFormTable.vue +11 -1
  3. package/src/base-client/components/common/XInspectionDetailDrawer/index.vue +140 -43
  4. package/src/base-client/components/common/XInspectionDetailDrawer/services/inspectionService.js +2 -1
  5. package/src/pages/userInfoDetailManage/ApplySystemQuery/applySystemConfig.js +4 -0
  6. package/src/pages/userInfoDetailManage/ApplySystemQuery/index.vue +111 -0
  7. package/src/pages/userInfoDetailManage/ArchiveMaintainQuery/index.vue +56 -0
  8. package/src/pages/userInfoDetailManage/AttachmentSystemQuery/index.vue +20 -0
  9. package/src/pages/userInfoDetailManage/BusinessFlowQuery/index.vue +583 -0
  10. package/src/pages/userInfoDetailManage/CallRecordQuery/index.vue +45 -21
  11. package/src/pages/userInfoDetailManage/CallSystemQuery/index.vue +59 -0
  12. package/src/pages/userInfoDetailManage/FillCardRecordQuery/index.vue +0 -2
  13. package/src/pages/userInfoDetailManage/HandplanSystemQuery/handplanSystemConfig.js +6 -0
  14. package/src/pages/userInfoDetailManage/HandplanSystemQuery/index.vue +178 -0
  15. package/src/pages/userInfoDetailManage/InfoChangeRecordQuery/index.vue +46 -12
  16. package/src/pages/userInfoDetailManage/InvoiceSystemQuery/index.vue +35 -0
  17. package/src/pages/userInfoDetailManage/MachineRecordQuery/index.vue +1 -1
  18. package/src/pages/userInfoDetailManage/RevenueSystemQuery/index.vue +164 -0
  19. package/src/pages/userInfoDetailManage/RevenueSystemQuery/revenueSystemConfig.js +4 -0
  20. package/src/pages/userInfoDetailManage/SafeCheckSystemQuery/index.vue +56 -0
  21. package/src/pages/userInfoDetailManage/UserDefectDetailQuery/index.vue +86 -0
  22. package/src/pages/userInfoDetailManage/UserDetailFieldPanel/index.vue +206 -0
  23. package/src/pages/userInfoDetailManage/UserDetailSubTabPanel/index.vue +151 -0
  24. package/src/pages/userInfoDetailManage/UserDevicesQuery/deviceCardConfig.js +37 -0
  25. package/src/pages/userInfoDetailManage/UserDevicesQuery/index.vue +718 -0
  26. package/src/pages/userInfoDetailManage/UserDisableQuery/index.vue +89 -0
  27. package/src/pages/userInfoDetailManage/UserDiscountRecordQuery/index.vue +80 -0
  28. package/src/pages/userInfoDetailManage/UserEnableQuery/index.vue +80 -0
  29. package/src/pages/userInfoDetailManage/UserHandRecordQuery/index.vue +177 -28
  30. package/src/pages/userInfoDetailManage/UserInvoiceListQuery/index.vue +89 -0
  31. package/src/pages/userInfoDetailManage/UserLimitInfoPanel/index.vue +376 -0
  32. package/src/pages/userInfoDetailManage/UserLimitRecordQuery/index.vue +80 -0
  33. package/src/pages/userInfoDetailManage/UserMachineArrearsQuery/index.vue +68 -0
  34. package/src/pages/userInfoDetailManage/UserPriceChangeQuery/index.vue +118 -0
  35. package/src/pages/userInfoDetailManage/UserRefundQuery/index.vue +80 -0
  36. package/src/pages/userInfoDetailManage/VisitHistoryQuery/index.vue +197 -0
  37. package/src/pages/userInfoDetailManage/WorkOrderSystemQuery/index.vue +53 -0
  38. package/src/pages/userInfoDetailManage/index.vue +427 -9
  39. package/src/pages/userInfoDetailManage/queryTabConfig.js +353 -0
  40. package/src/pages/userInfoDetailManage/uploadFilesHistory/index.vue +441 -139
  41. package/src/pages/userInfoDetailManage/userInfoDetailQueryTabs.vue +418 -123
  42. package/src/utils/reg.js +166 -166
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.21.14",
3
+ "version": "1.22.1",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -20,7 +20,7 @@
20
20
  @onLocalSubmit="onLocalSubmit"
21
21
  @x-form-item-emit-func="emitFunc"
22
22
  @afterSubmit="onAddOrEditSubmitAfterSubmit"
23
- @onSubmit="$listeners.addFormSubmit"
23
+ @onSubmit="onAddFormSubmit"
24
24
  >
25
25
  <template slot="groupFormItems" slot-scope="{ form, model, rules, modifyModelData }">
26
26
  <slot
@@ -877,6 +877,16 @@ export default {
877
877
  this.initConfig()
878
878
  }
879
879
  },
880
+ /**
881
+ * 新增/修改表单提交(未自定义 addFormSubmit 时走默认提交)
882
+ */
883
+ onAddFormSubmit (params, modalClose) {
884
+ if (this.$listeners.addFormSubmit) {
885
+ this.$listeners.addFormSubmit(params, modalClose)
886
+ return
887
+ }
888
+ this.$refs.xAddForm.$refs.nativeForm.defaultSubmit(params.realForm, modalClose)
889
+ },
880
890
  /**
881
891
  * 提交新增/修改表单后事件
882
892
  */
@@ -102,51 +102,53 @@
102
102
  <div class="photos-header">
103
103
  <div class="photos-title">
104
104
  <a-icon type="picture" style="color: #1890FF;" />
105
- <span>安检照片</span>
106
- </div>
107
- <div class="photos-count" v-if="inspectionData.attachments.filePhotos && inspectionData.attachments.filePhotos.length > 0">
108
- 共 {{ totalPhotos }} 张
105
+ <span>拍照签名信息</span>
109
106
  </div>
110
107
  </div>
111
108
  <div class="photos-content">
112
- <div class="subsection-label"><a-icon type="home" />整体安检照片</div>
113
- <file-image-group
114
- :file-ids="inspectionData.attachments.filePhotos || []"
115
- :service-name="effectiveServiceName"
116
- :columns="5"
117
- :image-size="60"
118
- :gap="10"
119
- alt-prefix="整体安检照片"
120
- empty-text="暂无整体安检照片"
121
- />
122
- </div>
123
- <div v-if="inspectionData?.attachments?.imagePhotos && inspectionData.attachments.imagePhotos.length > 0" class="photos-content">
124
- <div class="subsection-label"><a-icon type="file-protect" />
125
- {{safeCheckWebConfig?.safeCheckResult?.notificationName || '通知书照片'}}
126
- </div>
127
- <file-image-group
128
- :file-ids="inspectionData.attachments.imagePhotos || []"
129
- :service-name="effectiveServiceName"
130
- :columns="5"
131
- :image-size="60"
132
- :gap="10"
133
- :alt-prefix="safeCheckWebConfig?.safeCheckResult?.notificationName || '通知书照片'"
134
- :empty-text="`暂无${safeCheckWebConfig?.safeCheckResult?.notificationName || '通知书照片'}`"
135
- />
136
- </div>
137
- <div v-if="inspectionData?.attachments?.contractPhotos && inspectionData.attachments.contractPhotos.length > 0" class="photos-content">
138
- <div class="subsection-label"><a-icon type="file" />
139
- {{safeCheckWebConfig?.safeCheckResult?.contractName || '合同照片'}}
140
- </div>
141
- <file-image-group
142
- :file-ids="inspectionData.attachments.contractPhotos || []"
143
- :service-name="effectiveServiceName"
144
- :columns="5"
145
- :image-size="60"
146
- :gap="10"
147
- :alt-prefix="safeCheckWebConfig?.safeCheckResult?.contractName || '合同照片'"
148
- :empty-text="`暂无${safeCheckWebConfig?.safeCheckResult?.contractName || '合同照片'}`"
149
- />
109
+ <template v-if="inspectionData.signatureForm && inspectionData.signatureForm.formConfig && inspectionData.signatureForm.formConfig.formJson">
110
+ <template v-for="(field, fieldIndex) in inspectionData.signatureForm.formConfig.formJson">
111
+ <div v-if="shouldShowField(field)" :key="fieldIndex" class="signature-field">
112
+ <div class="field-label">
113
+ <span class="field-name">{{ field.name }}</span>
114
+ </div>
115
+ <div class="field-value">
116
+ <!-- file 类型 -->
117
+ <template v-if="field.type === 'file'">
118
+ <file-image-group
119
+ v-if="getFieldFiles(field.model)"
120
+ :file-ids="getFieldFiles(field.model)"
121
+ :service-name="effectiveServiceName"
122
+ :columns="5"
123
+ :image-size="60"
124
+ :gap="10"
125
+ :alt-prefix="field.name"
126
+ :empty-text="`暂无${field.name}`"
127
+ />
128
+ <span v-else class="empty-text">暂无</span>
129
+ </template>
130
+ <!-- image 类型 -->
131
+ <template v-else-if="field.type === 'image'">
132
+ <file-image-group
133
+ v-if="getFieldImages(field.model)"
134
+ :file-ids="getFieldImages(field.model)"
135
+ :service-name="effectiveServiceName"
136
+ :columns="5"
137
+ :image-size="60"
138
+ :gap="10"
139
+ :alt-prefix="field.name"
140
+ :empty-text="`暂无${field.name}`"
141
+ />
142
+ <span v-else class="empty-text">暂无</span>
143
+ </template>
144
+ <!-- select/其他文本类型 -->
145
+ <template v-else>
146
+ <span class="text-value">{{ getFieldValue(field.model) || '暂无' }}</span>
147
+ </template>
148
+ </div>
149
+ </div>
150
+ </template>
151
+ </template>
150
152
  </div>
151
153
  </div>
152
154
  </div>
@@ -210,6 +212,7 @@ import { FileImageGroup } from '@vue2-client/base-client/components/common/FileI
210
212
  import ImagePreviewModal from '@vue2-client/base-client/components/common/ImagePreviewModal/ImagePreviewModal.vue'
211
213
  import { printWithHtmlToImage, exportToPDFWithJpeg } from '@vue2-client/utils/htmlToImage'
212
214
  import { runLogic } from '@vue2-client/services/api/common'
215
+ import { executeStrFunctionByContext } from 'vue2-client/src/utils/runEvalFunction'
213
216
 
214
217
  export default {
215
218
  name: 'XInspectionDetailDrawer',
@@ -614,8 +617,69 @@ export default {
614
617
  deviceList: [],
615
618
  checkItems: [],
616
619
  hazardList: [],
617
- attachments: { signature: null, recordings: [], filePhotos: [], imagePhotos: [] }
620
+ attachments: { signature: null, recordings: [], filePhotos: [], imagePhotos: [] }
618
621
  }
622
+ },
623
+
624
+ /**
625
+ * 判断字段是否应该显示(根据 showFormItemFunc 条件)
626
+ */
627
+ shouldShowField (field) {
628
+ if (!field.showFormItemFunc) return true
629
+ try {
630
+ const formData = this.inspectionData.signatureForm || {}
631
+ const obj = executeStrFunctionByContext(this, field.showFormItemFunc, [
632
+ formData,
633
+ null,
634
+ field,
635
+ null,
636
+ 'view',
637
+ null,
638
+ null
639
+ ])
640
+ // 判断是 bool 还是 obj 兼容
641
+ if (typeof obj === 'boolean') {
642
+ return obj
643
+ } else if (obj && typeof obj === 'object') {
644
+ console.warn('showFormItemFunc obj', obj)
645
+ // obj 是一个对象,并且不是数组
646
+ if (Object.prototype.hasOwnProperty.call(obj, 'show')) {
647
+ return obj?.show
648
+ }
649
+ }
650
+ return true
651
+ } catch (e) {
652
+ console.warn('showFormItemFunc 执行失败:', e)
653
+ return true
654
+ }
655
+ },
656
+
657
+ /**
658
+ * 获取字段对应的文本值
659
+ */
660
+ getFieldValue (modelName) {
661
+ if (!modelName || !this.inspectionData.signatureForm) return null
662
+ return this.inspectionData.signatureForm[modelName]
663
+ },
664
+
665
+ /**
666
+ * 获取 file 类型字段的文件列表
667
+ */
668
+ getFieldFiles (modelName) {
669
+ if (!modelName || !this.inspectionData.signatureForm) return null
670
+ const files = this.inspectionData.signatureForm[modelName]
671
+ if (!Array.isArray(files) || files.length === 0) return null
672
+ return files
673
+ },
674
+
675
+ /**
676
+ * 获取 image 类型字段的图片列表
677
+ */
678
+ getFieldImages (modelName) {
679
+ if (!modelName || !this.inspectionData.signatureForm) return null
680
+ const images = this.inspectionData.signatureForm[modelName]
681
+ if (!Array.isArray(images) || images.length === 0) return null
682
+ return images
619
683
  }
620
684
  }
621
685
  }
@@ -735,4 +799,37 @@ export default {
735
799
  .section-grid { grid-template-columns: 1fr; }
736
800
  }
737
801
  .subsection-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #6b7280; font-weight: 500; margin-bottom: 12px; }
802
+
803
+ .signature-field {
804
+ display: flex;
805
+ flex-direction: column;
806
+ margin-bottom: 16px;
807
+ padding: 12px;
808
+ background: #fafafa;
809
+ border-radius: 6px;
810
+ border: 1px solid #f0f0f0;
811
+
812
+ .field-label {
813
+ margin-bottom: 8px;
814
+
815
+ .field-name {
816
+ font-size: 14px;
817
+ font-weight: 600;
818
+ color: #1f2937;
819
+ }
820
+ }
821
+
822
+ .field-value {
823
+ .text-value {
824
+ font-size: 14px;
825
+ color: #6b7280;
826
+ }
827
+
828
+ .empty-text {
829
+ font-size: 14px;
830
+ color: #9ca3af;
831
+ font-style: italic;
832
+ }
833
+ }
834
+ }
738
835
  </style>
@@ -251,7 +251,8 @@ class InspectionService {
251
251
  deviceList: await this.extractDeviceList(checkResultJson),
252
252
  checkItems: this.extractCheckItems(checkResultJson),
253
253
  hazardList: this.transformDefectList(defectList),
254
- attachments: this.extractAttachments(signatureForm)
254
+ attachments: this.extractAttachments(signatureForm),
255
+ signatureForm: signatureForm
255
256
  }
256
257
  }
257
258
 
@@ -0,0 +1,4 @@
1
+ export {
2
+ filterApplySubTabs,
3
+ canShowApplyTab
4
+ } from '@vue2-client/pages/userInfoDetailManage/queryTabConfig'
@@ -0,0 +1,111 @@
1
+ <template>
2
+ <div v-if="currUserInfo" class="user-detail-apply">
3
+ <h4 class="user-detail-apply-title">
4
+ 报建系统记录
5
+ <span v-if="activeSubLabel" class="user-detail-apply-curr">{{ activeSubLabel }}</span>
6
+ </h4>
7
+ <a-tabs
8
+ :activeKey="activeSubKey"
9
+ class="user-detail-apply-tabs"
10
+ :tab-bar-gutter="8"
11
+ @change="changeSubTab"
12
+ >
13
+ <a-tab-pane v-for="sub in filteredSubTabs" :key="sub.key">
14
+ <span slot="tab" class="user-detail-apply-sub-tab">
15
+ <a-icon :type="sub.icon" />
16
+ {{ sub.label }}
17
+ </span>
18
+ <template v-if="activeSubKey === sub.key">
19
+ <component
20
+ :is="sub.component"
21
+ :currUserInfo="currUserInfo"
22
+ />
23
+ </template>
24
+ </a-tab-pane>
25
+ </a-tabs>
26
+ </div>
27
+ </template>
28
+
29
+ <script>
30
+ import { mapState } from 'vuex'
31
+ import { filterApplySubTabs } from '@vue2-client/pages/userInfoDetailManage/ApplySystemQuery/applySystemConfig'
32
+ import ApplyRecordQuery from '@vue2-client/pages/userInfoDetailManage/ApplyRecordQuery'
33
+
34
+ export default {
35
+ name: 'ApplySystemQuery',
36
+ components: {
37
+ ApplyRecordQuery
38
+ },
39
+ props: {
40
+ currUserInfo: {
41
+ type: Object,
42
+ default: () => undefined
43
+ }
44
+ },
45
+ data () {
46
+ return {
47
+ activeSubKey: ''
48
+ }
49
+ },
50
+ watch: {
51
+ filteredSubTabs: {
52
+ immediate: true,
53
+ handler (tabs) {
54
+ if (!tabs.length) {
55
+ return
56
+ }
57
+ const valid = tabs.some(tab => tab.key === this.activeSubKey)
58
+ if (!valid) {
59
+ this.activeSubKey = tabs[0].key
60
+ }
61
+ }
62
+ }
63
+ },
64
+ computed: {
65
+ ...mapState('account', { login: 'login' }),
66
+ filteredSubTabs () {
67
+ return filterApplySubTabs(this.login)
68
+ },
69
+ activeSubLabel () {
70
+ const tab = this.filteredSubTabs.find(item => item.key === this.activeSubKey)
71
+ return tab?.label || ''
72
+ }
73
+ },
74
+ methods: {
75
+ changeSubTab (key) {
76
+ this.activeSubKey = key
77
+ }
78
+ }
79
+ }
80
+ </script>
81
+
82
+ <style scoped lang="less">
83
+ .user-detail-apply-title {
84
+ margin: 0 0 16px;
85
+ padding-left: 12px;
86
+ border-left: 4px solid #1890ff;
87
+ font-size: 16px;
88
+ font-weight: 700;
89
+ color: rgba(0, 0, 0, 0.85);
90
+ line-height: 1.4;
91
+ }
92
+
93
+ .user-detail-apply-curr {
94
+ margin-left: 12px;
95
+ font-size: 13px;
96
+ font-weight: 400;
97
+ color: rgba(0, 0, 0, 0.45);
98
+ }
99
+
100
+ .user-detail-apply-tabs {
101
+ :deep(.ant-tabs-bar) {
102
+ margin-bottom: 16px;
103
+ }
104
+ }
105
+
106
+ .user-detail-apply-sub-tab {
107
+ display: inline-flex;
108
+ align-items: center;
109
+ gap: 6px;
110
+ }
111
+ </style>
@@ -0,0 +1,56 @@
1
+ <template>
2
+ <user-detail-sub-tab-panel
3
+ title="档案维护记录"
4
+ :currUserInfo="currUserInfo"
5
+ :sub-tabs="subTabs"
6
+ :panel-components="panelComponents"
7
+ :filter-sub-tabs="filterSubTabs"
8
+ />
9
+ </template>
10
+
11
+ <script>
12
+ import { mapState } from 'vuex'
13
+ import UserDetailSubTabPanel from '@vue2-client/pages/userInfoDetailManage/UserDetailSubTabPanel'
14
+ import InfoChangeRecordQuery from '@vue2-client/pages/userInfoDetailManage/InfoChangeRecordQuery'
15
+ import UserPriceChangeQuery from '@vue2-client/pages/userInfoDetailManage/UserPriceChangeQuery'
16
+
17
+ export default {
18
+ name: 'ArchiveMaintainQuery',
19
+ components: {
20
+ UserDetailSubTabPanel,
21
+ InfoChangeRecordQuery,
22
+ UserPriceChangeQuery
23
+ },
24
+ props: {
25
+ currUserInfo: {
26
+ type: Object,
27
+ default: () => undefined
28
+ }
29
+ },
30
+ data () {
31
+ return {
32
+ subTabs: [
33
+ { key: 'priceChange', label: '调价记录查询', icon: 'rise', component: 'UserPriceChangeQuery' },
34
+ { key: 'archiveChange', label: '档案变更记录', icon: 'form', component: 'InfoChangeRecordQuery', permission: '变更记录' }
35
+ ]
36
+ }
37
+ },
38
+ computed: {
39
+ ...mapState('account', { login: 'login' }),
40
+ panelComponents () {
41
+ return { InfoChangeRecordQuery, UserPriceChangeQuery }
42
+ }
43
+ },
44
+ methods: {
45
+ filterSubTabs (tabs) {
46
+ const roles = this.login?.r || []
47
+ return tabs.map(tab => {
48
+ if (tab.component && tab.permission && !roles.includes(tab.permission)) {
49
+ return { ...tab, component: null }
50
+ }
51
+ return tab
52
+ })
53
+ }
54
+ }
55
+ }
56
+ </script>
@@ -0,0 +1,20 @@
1
+ <template>
2
+ <upload-files-history :currUserInfo="currUserInfo" />
3
+ </template>
4
+
5
+ <script>
6
+ import uploadFilesHistory from '@vue2-client/pages/userInfoDetailManage/uploadFilesHistory'
7
+
8
+ export default {
9
+ name: 'AttachmentSystemQuery',
10
+ components: {
11
+ uploadFilesHistory
12
+ },
13
+ props: {
14
+ currUserInfo: {
15
+ type: Object,
16
+ default: () => undefined
17
+ }
18
+ }
19
+ }
20
+ </script>