af-mobile-client-vue3 1.6.19 → 1.6.21

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 (57) hide show
  1. package/.env +11 -11
  2. package/package.json +121 -121
  3. package/src/api/user/index.ts +50 -50
  4. package/src/components/common/MateChat/apiService.ts +310 -310
  5. package/src/components/data/OtherCharge/OtherChargeGroupModal.vue +542 -542
  6. package/src/components/data/UserDetail/api.ts +24 -24
  7. package/src/components/data/UserDetail/index.vue +660 -660
  8. package/src/components/data/XFormGroup/doc/UserForm.vue +102 -102
  9. package/src/components/data/step/index.vue +1975 -1975
  10. package/src/router/invoiceRoutes.ts +37 -37
  11. package/src/services/api/Login.ts +6 -6
  12. package/src/services/v3Api.ts +170 -170
  13. package/src/stores/modules/user.ts +441 -441
  14. package/src/types/platform.ts +194 -194
  15. package/src/utils/Storage.ts +124 -124
  16. package/src/utils/http/index.ts +228 -228
  17. package/src/utils/login/loginVerify.ts +317 -317
  18. package/src/views/SafeInspection/SecurityCertificate/AddDevice/index.vue +662 -661
  19. package/src/views/SafeInspection/SecurityCertificate/OverallHiddenDangers/index.vue +376 -376
  20. package/src/views/SafeInspection/SecurityCertificate/contractSign/index.vue +80 -80
  21. package/src/views/SafeInspection/SecurityCertificate/photoSignature/SignatureComponent/SignatureComponent.vue +285 -285
  22. package/src/views/SafeInspection/SecurityCertificate/photoSignature/index.vue +258 -258
  23. package/src/views/SafeInspection/SecurityCertificate/photoSignature/slots/QinHuaSignature.vue +82 -82
  24. package/src/views/SafeInspection/SecurityCertificate/slots/GasDevice.vue +132 -132
  25. package/src/views/SafeInspection/SecurityCertificate/userInfo/index.vue +1 -0
  26. package/src/views/SafeInspection/SecurityCertificate/userInfo/upaddress.vue +239 -239
  27. package/src/views/SafeInspection/SecurityFormItem/XMultiSelect/index.vue +194 -194
  28. package/src/views/SafeInspection/SecurityFormItem/XSignature/index.vue +68 -68
  29. package/src/views/SafeInspection/SecurityFormItem/index.vue +418 -418
  30. package/src/views/component/UserDetailView/UserDetailPage.vue +78 -78
  31. package/src/views/component/UserDetailView/index.vue +234 -234
  32. package/src/views/external/index.vue +158 -158
  33. package/src/views/user/employeeBinding/index.vue +392 -392
  34. package/src/views/user/register/index.vue +995 -995
  35. package/src/views/userRecords/AbnormalAlarmRecords.vue +21 -21
  36. package/src/views/userRecords/CardReplacementRecords.vue +21 -21
  37. package/src/views/userRecords/ChangeRecords.vue +19 -19
  38. package/src/views/userRecords/CommandViewRecords.vue +20 -20
  39. package/src/views/userRecords/GasCompensationRecords.vue +20 -20
  40. package/src/views/userRecords/GasPurchaseRecords.vue +19 -19
  41. package/src/views/userRecords/InstrumentCollectionRecords.vue +21 -21
  42. package/src/views/userRecords/MeterRecords.vue +20 -20
  43. package/src/views/userRecords/OperateRecords.vue +51 -51
  44. package/src/views/userRecords/OtherChargeRecords.vue +19 -19
  45. package/src/views/userRecords/PaymentRecords.vue +114 -114
  46. package/src/views/userRecords/PriceAdjustmentRecords.vue +19 -19
  47. package/src/views/userRecords/RepairRecords.vue +19 -19
  48. package/src/views/userRecords/ReplacementRecords.vue +19 -19
  49. package/src/views/userRecords/SafetyRecords.vue +19 -19
  50. package/src/views/userRecords/TransactionRecords.vue +21 -21
  51. package/src/views/userRecords/TransferGasRecords.vue +19 -19
  52. package/src/views/userRecords/TransferRecords.vue +19 -19
  53. package/vite.config.ts +121 -121
  54. package/certs/127.0.0.1+2-key.pem +0 -28
  55. package/certs/127.0.0.1+2.pem +0 -27
  56. package/mock/modules/prose.mock.ts.timestamp-1758877157774.mjs +0 -53
  57. package/mock/modules/user.mock.ts.timestamp-1758877157774.mjs +0 -97
@@ -1,37 +1,37 @@
1
- import type { RouteRecordRaw } from 'vue-router'
2
- import PageLayout from '@af-mobile-client-vue3/layout/PageLayout.vue'
3
- import NotFound from '@af-mobile-client-vue3/views/common/NotFound.vue'
4
- import invoiceShow from '@af-mobile-client-vue3/views/invoiceShow/index.vue'
5
-
6
- const routes: Array<RouteRecordRaw> = [
7
- {
8
- path: '/',
9
- name: 'root',
10
- component: PageLayout,
11
- redirect: { name: 'Component' },
12
- children: [
13
- {
14
- path: '/invoiceShow',
15
- name: 'invoiceShow',
16
- component: invoiceShow,
17
- meta: {
18
- requiresAuth: false,
19
- allowExternalUser: false,
20
- },
21
- },
22
- ],
23
- },
24
- {
25
- path: '/404',
26
- name: '404',
27
- component: NotFound,
28
- },
29
- {
30
- path: '/:pathMatch(.*)',
31
- redirect: {
32
- name: '404',
33
- },
34
- },
35
- ]
36
-
37
- export default routes
1
+ import type { RouteRecordRaw } from 'vue-router'
2
+ import PageLayout from '@af-mobile-client-vue3/layout/PageLayout.vue'
3
+ import NotFound from '@af-mobile-client-vue3/views/common/NotFound.vue'
4
+ import invoiceShow from '@af-mobile-client-vue3/views/invoiceShow/index.vue'
5
+
6
+ const routes: Array<RouteRecordRaw> = [
7
+ {
8
+ path: '/',
9
+ name: 'root',
10
+ component: PageLayout,
11
+ redirect: { name: 'Component' },
12
+ children: [
13
+ {
14
+ path: '/invoiceShow',
15
+ name: 'invoiceShow',
16
+ component: invoiceShow,
17
+ meta: {
18
+ requiresAuth: false,
19
+ allowExternalUser: false,
20
+ },
21
+ },
22
+ ],
23
+ },
24
+ {
25
+ path: '/404',
26
+ name: '404',
27
+ component: NotFound,
28
+ },
29
+ {
30
+ path: '/:pathMatch(.*)',
31
+ redirect: {
32
+ name: '404',
33
+ },
34
+ },
35
+ ]
36
+
37
+ export default routes
@@ -1,6 +1,6 @@
1
- const loginApi = {
2
- Login: '/af-auth/login',
3
- Logout: '/af-auth/logout',
4
- }
5
-
6
- export { loginApi }
1
+ const loginApi = {
2
+ Login: '/af-auth/login',
3
+ Logout: '/af-auth/logout',
4
+ }
5
+
6
+ export { loginApi }
@@ -1,170 +1,170 @@
1
- import { runLogic } from '@af-mobile-client-vue3/services/api/common'
2
- import { METHOD, request } from '@af-mobile-client-vue3/utils/http/index'
3
-
4
- function getLeafNodes(nodes) {
5
- // console.log(nodes)
6
- // 确保 nodes 是数组
7
- const nodeArray = Array.isArray(nodes) ? nodes : [nodes]
8
- return nodeArray.reduce((leaves, node) => {
9
- if (node.children && node.children.length) {
10
- // 递归处理子节点并合并结果
11
- leaves.push(...getLeafNodes(node.children))
12
- }
13
- else {
14
- // 当前节点是叶子节点时,直接加入结果
15
- leaves.push(node)
16
- }
17
- return leaves
18
- }, [])
19
- }
20
-
21
- function getLeafNodesByCondition(type, nodes, parent = null) {
22
- // console.log('nodes------',nodes)
23
- // 确保 nodes 是数组
24
- const nodeArray = Array.isArray(nodes) ? nodes : [nodes]
25
-
26
- return nodeArray.reduce((leaves, node) => {
27
- const isValidNode = node.resourcetype === type && node.name !== '组织机构'
28
- const updatedParent = node.name === '组织机构' ? null : node.name
29
-
30
- if (node.children && node.children.length) {
31
- // 当前节点符合条件时,加入叶子节点列表
32
- if (isValidNode && node.resourcetype === 'organization') {
33
- leaves.push({
34
- ...node,
35
- name: parent ? `${node.name}` : node.name,
36
- children: [],
37
- })
38
- }
39
- if (isValidNode && node.resourcetype === 'department') {
40
- leaves.push({
41
- ...node,
42
- name: parent ? `${node.name}-${parent}` : node.name,
43
- children: [],
44
- })
45
- }
46
- // 递归处理子节点
47
- leaves.push(...getLeafNodesByCondition(type, node.children, updatedParent))
48
- }
49
- else if (isValidNode) {
50
- // 无子节点但符合条件时,直接加入叶子节点列表
51
- if (node.resourcetype === 'organization') {
52
- leaves.push({
53
- ...node,
54
- name: parent ? `${node.name}-${parent}` : node.name,
55
- })
56
- }
57
- else if (node.resourcetype === 'department' && !nodeArray.includes(node.name)) {
58
- // console.log('数组',nodeArray.includes(node.name))
59
- leaves.push({
60
- ...node,
61
- name: parent ? `${node.name}-${parent}` : node.name,
62
- })
63
- }
64
- }
65
- return leaves
66
- }, [])
67
- }
68
-
69
- function transformData(inputData) {
70
- if (!inputData || !Array.isArray(inputData))
71
- return []
72
-
73
- function transform(node) {
74
- if (!node || typeof node !== 'object')
75
- return {}
76
-
77
- let children = []
78
- if (node.children) {
79
- if (Array.isArray(node.children)) {
80
- children = node.children.map(transform)
81
- }
82
- else if (typeof node.children === 'object') {
83
- // 检查是否是空标记
84
- if (node.children.empty === true) {
85
- children = []
86
- }
87
- else if (node.children.id || node.children.name) {
88
- // 如果是单个节点对象
89
- children = [transform(node.children)]
90
- }
91
- }
92
- }
93
-
94
- return {
95
- label: node.name || '',
96
- value: node.id ?? null,
97
- f_organization_id: node.f_organization_id,
98
- f_department_id: node.f_department_id,
99
- parentid: node.parentid || node.parentId || node.parent_id || null,
100
- orgid: node.orgid,
101
- children,
102
- }
103
- }
104
-
105
- return inputData.map(transform)
106
- }
107
-
108
- function getResData(params, toCallback) {
109
- const data = { userId: params.userid, roleName: params.roleName, filter: params.filter, filterType: params.filterType }
110
- if (params.source === '获取分公司') {
111
- runLogic('getOrgBySearch', data, 'af-system').then(res => toCallback(res))
112
- }
113
- else if (params.source === '获取部门') {
114
- runLogic('getDepBySearch', data, 'af-system').then(res => toCallback(res))
115
- }
116
- else if (params.source === '获取人员') {
117
- runLogic('getUserBySearch', data, 'af-system').then(res => toCallback(res))
118
- }
119
- else if (params.source === '根据角色获取人员') {
120
- runLogic('getUserBySearchRole', data, 'af-system').then(res => toCallback(res))
121
- }
122
- else {
123
- return search(params).then(res => toCallback(res))
124
- }
125
- }
126
-
127
- export async function searchToOption(params, callback) {
128
- function toCallback(res) {
129
- if (res.length) {
130
- if (res[0].children && res[0].children.length) {
131
- if (res[0].children[0].children) {
132
- callback(transformData(res[0].children[0].children))
133
- }
134
- else {
135
- callback(transformData(res[0].children))
136
- }
137
- }
138
- else {
139
- callback(res[0].children)
140
- }
141
- }
142
- else {
143
- callback(res)
144
- }
145
- }
146
-
147
- await getResData(params, toCallback)
148
- }
149
-
150
- export async function searchToListOption(params, callback) {
151
- function toCallback(res) {
152
- if (params.source.includes('人员')) {
153
- // console.log('ren---------',res)
154
- callback(transformData(getLeafNodes(res)))
155
- }
156
- else {
157
- const type = params.source.includes('公司') ? 'organization' : 'department'
158
- // console.log('bumenpgonngsi',res)
159
- callback(transformData(getLeafNodesByCondition(type, res)))
160
- }
161
- }
162
-
163
- await getResData(params, toCallback)
164
- }
165
-
166
- export async function search(params) {
167
- return request('/rs/search', METHOD.POST, params, params.config)
168
- }
169
-
170
- export default { searchToOption, search }
1
+ import { runLogic } from '@af-mobile-client-vue3/services/api/common'
2
+ import { METHOD, request } from '@af-mobile-client-vue3/utils/http/index'
3
+
4
+ function getLeafNodes(nodes) {
5
+ // console.log(nodes)
6
+ // 确保 nodes 是数组
7
+ const nodeArray = Array.isArray(nodes) ? nodes : [nodes]
8
+ return nodeArray.reduce((leaves, node) => {
9
+ if (node.children && node.children.length) {
10
+ // 递归处理子节点并合并结果
11
+ leaves.push(...getLeafNodes(node.children))
12
+ }
13
+ else {
14
+ // 当前节点是叶子节点时,直接加入结果
15
+ leaves.push(node)
16
+ }
17
+ return leaves
18
+ }, [])
19
+ }
20
+
21
+ function getLeafNodesByCondition(type, nodes, parent = null) {
22
+ // console.log('nodes------',nodes)
23
+ // 确保 nodes 是数组
24
+ const nodeArray = Array.isArray(nodes) ? nodes : [nodes]
25
+
26
+ return nodeArray.reduce((leaves, node) => {
27
+ const isValidNode = node.resourcetype === type && node.name !== '组织机构'
28
+ const updatedParent = node.name === '组织机构' ? null : node.name
29
+
30
+ if (node.children && node.children.length) {
31
+ // 当前节点符合条件时,加入叶子节点列表
32
+ if (isValidNode && node.resourcetype === 'organization') {
33
+ leaves.push({
34
+ ...node,
35
+ name: parent ? `${node.name}` : node.name,
36
+ children: [],
37
+ })
38
+ }
39
+ if (isValidNode && node.resourcetype === 'department') {
40
+ leaves.push({
41
+ ...node,
42
+ name: parent ? `${node.name}-${parent}` : node.name,
43
+ children: [],
44
+ })
45
+ }
46
+ // 递归处理子节点
47
+ leaves.push(...getLeafNodesByCondition(type, node.children, updatedParent))
48
+ }
49
+ else if (isValidNode) {
50
+ // 无子节点但符合条件时,直接加入叶子节点列表
51
+ if (node.resourcetype === 'organization') {
52
+ leaves.push({
53
+ ...node,
54
+ name: parent ? `${node.name}-${parent}` : node.name,
55
+ })
56
+ }
57
+ else if (node.resourcetype === 'department' && !nodeArray.includes(node.name)) {
58
+ // console.log('数组',nodeArray.includes(node.name))
59
+ leaves.push({
60
+ ...node,
61
+ name: parent ? `${node.name}-${parent}` : node.name,
62
+ })
63
+ }
64
+ }
65
+ return leaves
66
+ }, [])
67
+ }
68
+
69
+ function transformData(inputData) {
70
+ if (!inputData || !Array.isArray(inputData))
71
+ return []
72
+
73
+ function transform(node) {
74
+ if (!node || typeof node !== 'object')
75
+ return {}
76
+
77
+ let children = []
78
+ if (node.children) {
79
+ if (Array.isArray(node.children)) {
80
+ children = node.children.map(transform)
81
+ }
82
+ else if (typeof node.children === 'object') {
83
+ // 检查是否是空标记
84
+ if (node.children.empty === true) {
85
+ children = []
86
+ }
87
+ else if (node.children.id || node.children.name) {
88
+ // 如果是单个节点对象
89
+ children = [transform(node.children)]
90
+ }
91
+ }
92
+ }
93
+
94
+ return {
95
+ label: node.name || '',
96
+ value: node.id ?? null,
97
+ f_organization_id: node.f_organization_id,
98
+ f_department_id: node.f_department_id,
99
+ parentid: node.parentid || node.parentId || node.parent_id || null,
100
+ orgid: node.orgid,
101
+ children,
102
+ }
103
+ }
104
+
105
+ return inputData.map(transform)
106
+ }
107
+
108
+ function getResData(params, toCallback) {
109
+ const data = { userId: params.userid, roleName: params.roleName, filter: params.filter, filterType: params.filterType }
110
+ if (params.source === '获取分公司') {
111
+ runLogic('getOrgBySearch', data, 'af-system').then(res => toCallback(res))
112
+ }
113
+ else if (params.source === '获取部门') {
114
+ runLogic('getDepBySearch', data, 'af-system').then(res => toCallback(res))
115
+ }
116
+ else if (params.source === '获取人员') {
117
+ runLogic('getUserBySearch', data, 'af-system').then(res => toCallback(res))
118
+ }
119
+ else if (params.source === '根据角色获取人员') {
120
+ runLogic('getUserBySearchRole', data, 'af-system').then(res => toCallback(res))
121
+ }
122
+ else {
123
+ return search(params).then(res => toCallback(res))
124
+ }
125
+ }
126
+
127
+ export async function searchToOption(params, callback) {
128
+ function toCallback(res) {
129
+ if (res.length) {
130
+ if (res[0].children && res[0].children.length) {
131
+ if (res[0].children[0].children) {
132
+ callback(transformData(res[0].children[0].children))
133
+ }
134
+ else {
135
+ callback(transformData(res[0].children))
136
+ }
137
+ }
138
+ else {
139
+ callback(res[0].children)
140
+ }
141
+ }
142
+ else {
143
+ callback(res)
144
+ }
145
+ }
146
+
147
+ await getResData(params, toCallback)
148
+ }
149
+
150
+ export async function searchToListOption(params, callback) {
151
+ function toCallback(res) {
152
+ if (params.source.includes('人员')) {
153
+ // console.log('ren---------',res)
154
+ callback(transformData(getLeafNodes(res)))
155
+ }
156
+ else {
157
+ const type = params.source.includes('公司') ? 'organization' : 'department'
158
+ // console.log('bumenpgonngsi',res)
159
+ callback(transformData(getLeafNodesByCondition(type, res)))
160
+ }
161
+ }
162
+
163
+ await getResData(params, toCallback)
164
+ }
165
+
166
+ export async function search(params) {
167
+ return request('/rs/search', METHOD.POST, params, params.config)
168
+ }
169
+
170
+ export default { searchToOption, search }