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,116 +1,116 @@
1
- import { METHOD, request } from '@vue2-client/utils/request'
2
- import { runLogic } from '@vue2-client/services/api/common'
3
-
4
- function getLeafNodes (nodes) {
5
- // 确保 nodes 是数组
6
- const nodeArray = Array.isArray(nodes) ? nodes : [nodes]
7
- return nodeArray.reduce((leaves, node) => {
8
- if (node.children && node.children.length) {
9
- // 递归处理子节点并合并结果
10
- leaves.push(...getLeafNodes(node.children))
11
- } else {
12
- // 当前节点是叶子节点时,直接加入结果
13
- leaves.push(node)
14
- }
15
- return leaves
16
- }, [])
17
- }
18
-
19
- function getLeafNodesByCondition (type, nodes, parent = null) {
20
- // 确保 nodes 是数组
21
- const nodeArray = Array.isArray(nodes) ? nodes : [nodes]
22
-
23
- return nodeArray.reduce((leaves, node) => {
24
- const isValidNode = node.resourcetype === type && node.name !== '组织机构'
25
- const updatedParent = node.name === '组织机构' ? null : node.name
26
-
27
- if (node.children && node.children.length) {
28
- // 当前节点符合条件时,加入叶子节点列表
29
- if (isValidNode) {
30
- leaves.push({
31
- ...node,
32
- name: parent ? `${node.name}-${parent}` : node.name,
33
- })
34
- }
35
- // 递归处理子节点
36
- leaves.push(...getLeafNodesByCondition(type, node.children, updatedParent))
37
- } else if (isValidNode) {
38
- // 无子节点但符合条件时,直接加入叶子节点列表
39
- leaves.push({
40
- ...node,
41
- name: parent ? `${node.name}-${parent}` : node.name,
42
- })
43
- }
44
-
45
- return leaves
46
- }, [])
47
- }
48
-
49
- function transformData (inputData) {
50
- function transform (node) {
51
- return {
52
- label: node.name,
53
- value: node.id,
54
- f_organization_id: node.f_organization_id,
55
- parentid: node.parentid,
56
- orgid: node.orgid,
57
- children: node.children ? node.children.map(transform) : []
58
- }
59
- }
60
-
61
- return inputData.map(transform)
62
- }
63
-
64
- function getResData (params, toCallback) {
65
- const data = { userId: params.userid, roleName: params.roleName }
66
- if (params.source === '获取分公司') {
67
- runLogic('getOrgBySearch', data, 'af-system').then(res => toCallback(res))
68
- } else if (params.source === '获取部门') {
69
- runLogic('getDepBySearch', data, 'af-system').then(res => toCallback(res))
70
- } else if (params.source === '获取人员') {
71
- runLogic('getUserBySearch', data, 'af-system').then(res => toCallback(res))
72
- } else if (params.source === '根据角色获取人员') {
73
- runLogic('getUserBySearchRole', data, 'af-system').then(res => toCallback(res))
74
- } else {
75
- return search(params).then(res => toCallback(res))
76
- }
77
- }
78
-
79
- export async function searchToOption (params, callback) {
80
- function toCallback (res) {
81
- if (res.length) {
82
- if (res[0].children && res[0].children.length) {
83
- if (res[0].children[0].children) {
84
- callback(transformData(res[0].children[0].children))
85
- } else {
86
- callback(transformData(res[0].children))
87
- }
88
- } else {
89
- callback(res[0].children)
90
- }
91
- } else {
92
- callback(res)
93
- }
94
- }
95
-
96
- await getResData(params, toCallback)
97
- }
98
-
99
- export async function searchToListOption (params, callback) {
100
- function toCallback (res) {
101
- if (params.source.includes('人员')) {
102
- callback(transformData(getLeafNodes(res)))
103
- } else {
104
- const type = params.source.includes('公司') ? 'organization' : 'department'
105
- callback(transformData(getLeafNodesByCondition(type, res)))
106
- }
107
- }
108
-
109
- await getResData(params, toCallback)
110
- }
111
-
112
- export async function search (params) {
113
- return request('/rs/search', METHOD.POST, params)
114
- }
115
-
116
- export default { searchToOption, search }
1
+ import { METHOD, request } from '@vue2-client/utils/request'
2
+ import { runLogic } from '@vue2-client/services/api/common'
3
+
4
+ function getLeafNodes (nodes) {
5
+ // 确保 nodes 是数组
6
+ const nodeArray = Array.isArray(nodes) ? nodes : [nodes]
7
+ return nodeArray.reduce((leaves, node) => {
8
+ if (node.children && node.children.length) {
9
+ // 递归处理子节点并合并结果
10
+ leaves.push(...getLeafNodes(node.children))
11
+ } else {
12
+ // 当前节点是叶子节点时,直接加入结果
13
+ leaves.push(node)
14
+ }
15
+ return leaves
16
+ }, [])
17
+ }
18
+
19
+ function getLeafNodesByCondition (type, nodes, parent = null) {
20
+ // 确保 nodes 是数组
21
+ const nodeArray = Array.isArray(nodes) ? nodes : [nodes]
22
+
23
+ return nodeArray.reduce((leaves, node) => {
24
+ const isValidNode = node.resourcetype === type && node.name !== '组织机构'
25
+ const updatedParent = node.name === '组织机构' ? null : node.name
26
+
27
+ if (node.children && node.children.length) {
28
+ // 当前节点符合条件时,加入叶子节点列表
29
+ if (isValidNode) {
30
+ leaves.push({
31
+ ...node,
32
+ name: parent ? `${node.name}-${parent}` : node.name,
33
+ })
34
+ }
35
+ // 递归处理子节点
36
+ leaves.push(...getLeafNodesByCondition(type, node.children, updatedParent))
37
+ } else if (isValidNode) {
38
+ // 无子节点但符合条件时,直接加入叶子节点列表
39
+ leaves.push({
40
+ ...node,
41
+ name: parent ? `${node.name}-${parent}` : node.name,
42
+ })
43
+ }
44
+
45
+ return leaves
46
+ }, [])
47
+ }
48
+
49
+ function transformData (inputData) {
50
+ function transform (node) {
51
+ return {
52
+ label: node.name,
53
+ value: node.id,
54
+ f_organization_id: node.f_organization_id,
55
+ parentid: node.parentid,
56
+ orgid: node.orgid,
57
+ children: node.children ? node.children.map(transform) : []
58
+ }
59
+ }
60
+
61
+ return inputData.map(transform)
62
+ }
63
+
64
+ function getResData (params, toCallback) {
65
+ const data = { userId: params.userid, roleName: params.roleName, filter: params.filter, filterType: params.filterType }
66
+ if (params.source === '获取分公司') {
67
+ runLogic('getOrgBySearch', data, 'af-system').then(res => toCallback(res))
68
+ } else if (params.source === '获取部门') {
69
+ runLogic('getDepBySearch', data, 'af-system').then(res => toCallback(res))
70
+ } else if (params.source === '获取人员') {
71
+ runLogic('getUserBySearch', data, 'af-system').then(res => toCallback(res))
72
+ } else if (params.source === '根据角色获取人员') {
73
+ runLogic('getUserBySearchRole', data, 'af-system').then(res => toCallback(res))
74
+ } else {
75
+ return search(params).then(res => toCallback(res))
76
+ }
77
+ }
78
+
79
+ export async function searchToOption (params, callback) {
80
+ function toCallback (res) {
81
+ if (res.length) {
82
+ if (res[0].children && res[0].children.length) {
83
+ if (res[0].children[0].children) {
84
+ callback(transformData(res[0].children[0].children))
85
+ } else {
86
+ callback(transformData(res[0].children))
87
+ }
88
+ } else {
89
+ callback(res[0].children)
90
+ }
91
+ } else {
92
+ callback(res)
93
+ }
94
+ }
95
+
96
+ await getResData(params, toCallback)
97
+ }
98
+
99
+ export async function searchToListOption (params, callback) {
100
+ function toCallback (res) {
101
+ if (params.source.includes('人员')) {
102
+ callback(transformData(getLeafNodes(res)))
103
+ } else {
104
+ const type = params.source.includes('公司') ? 'organization' : 'department'
105
+ callback(transformData(getLeafNodesByCondition(type, res)))
106
+ }
107
+ }
108
+
109
+ await getResData(params, toCallback)
110
+ }
111
+
112
+ export async function search (params) {
113
+ return request('/rs/search', METHOD.POST, params)
114
+ }
115
+
116
+ export default { searchToOption, search }
@@ -1,4 +1,3 @@
1
- import AesEncryptJS from 'crypto-js'
2
1
  import CryptoJS from 'crypto-js'
3
2
  import RsaEncryptJS from 'jsencrypt'
4
3
 
@@ -9,9 +8,9 @@ export default {
9
8
  * @returns {*}
10
9
  */
11
10
  AESEncrypt (word, encryKey) {
12
- const key = AesEncryptJS.enc.Utf8.parse(encryKey)
13
- const srcs = AesEncryptJS.enc.Utf8.parse(word)
14
- const encrypted = AesEncryptJS.AES.encrypt(srcs, key, { mode: AesEncryptJS.mode.ECB, padding: AesEncryptJS.pad.Pkcs7 })
11
+ const key = CryptoJS.enc.Utf8.parse(encryKey)
12
+ const srcs = CryptoJS.enc.Utf8.parse(word)
13
+ const encrypted = CryptoJS.AES.encrypt(srcs, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 })
15
14
  return encrypted.toString()
16
15
  },
17
16
  /**
@@ -20,9 +19,9 @@ export default {
20
19
  * @returns {*}
21
20
  */
22
21
  AESDecrypt (word, encryKey) {
23
- const key = AesEncryptJS.enc.Utf8.parse(encryKey)
24
- const decrypt = AesEncryptJS.AES.decrypt(word, key, { mode: AesEncryptJS.mode.ECB, padding: AesEncryptJS.pad.Pkcs7 })
25
- const ret = AesEncryptJS.enc.Utf8.stringify(decrypt).toString()
22
+ const key = CryptoJS.enc.Utf8.parse(encryKey)
23
+ const decrypt = CryptoJS.AES.decrypt(word, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 })
24
+ const ret = CryptoJS.enc.Utf8.stringify(decrypt).toString()
26
25
  try {
27
26
  return JSON.parse(ret)
28
27
  } catch (e) {
@@ -7,6 +7,8 @@ const DB_CONFIG = {
7
7
  CURRENT_VERSION: 1
8
8
  }
9
9
 
10
+ const LIULI_WEB_DB_NAME = 'view_liuli_web'
11
+
10
12
  export class IndexedDBManager {
11
13
  constructor () {
12
14
  this.db = undefined
@@ -120,7 +122,7 @@ export class IndexedDBManager {
120
122
 
121
123
  this.locks[key] = (async () => {
122
124
  try {
123
- const data = await this.getData(key)
125
+ const data = DB_CONFIG.NAME === LIULI_WEB_DB_NAME ? undefined : await this.getData(key)
124
126
  if (!data && url) {
125
127
  const res = await post(url, params)
126
128
  const processedData = processFun ? processFun(res) : res
@@ -150,20 +150,16 @@ function loadInterceptors () {
150
150
  // 让每个请求携带自定义 token 请根据实际情况自行修改
151
151
  if (token) {
152
152
  if (config.url !== V4_LOGIN) {
153
- // 判断是否为V4环境
154
- const compatible = getSystemVersion()
155
- if (compatible === 'V4') {
156
- // V4 环境则添加 V4请求头
157
- config.headers[V4_ACCESS_TOKEN] = token
158
- } else {
159
- config.headers[ACCESS_TOKEN] = token
160
- }
153
+ // V4 环境则添加 V4请求头
154
+ config.headers[V4_ACCESS_TOKEN] = token
155
+ config.headers[ACCESS_TOKEN] = token
161
156
  }
162
157
  }
163
158
 
164
159
  const v4SessionKey = localStorage.getItem(V4_SESSION_KEY)
165
160
  if (['post'].includes(config.method.toLowerCase()) && v4SessionKey &&
166
161
  !config.url.includes('/logic/openapi/') &&
162
+ !config.url.includes('devApi') &&
167
163
  !config.url.includes('auth/login')) {
168
164
  if (config.data && !(config.data instanceof FormData)) {
169
165
  config.data = {
@@ -515,6 +515,23 @@ function parsefuncOA (func) {
515
515
  icon: row.icon,
516
516
  name: row.name
517
517
  }
518
+ if (row.link) {
519
+ if (route.router.includes('?')) {
520
+ // 把问号后面的都删了
521
+ const [url, queryString] = route.router.split('?')
522
+ route.router = url
523
+ try {
524
+ const params = new URLSearchParams(queryString)
525
+ for (const [key, value] of params.entries()) {
526
+ route.meta[key] = value
527
+ }
528
+ if (route.meta.path) {
529
+ route.path = route.meta.path
530
+ delete route.meta.path
531
+ }
532
+ } catch (e) {}
533
+ }
534
+ }
518
535
  if (row.children && row.children.length > 0) {
519
536
  route.children = parsefunc(row.children)
520
537
  }
package/.babelrc DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "presets": ["@babel/preset-env"]
3
- }