vue2-client 1.15.13 → 1.15.15

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 (34) hide show
  1. package/jest.config.js +22 -22
  2. package/package.json +2 -2
  3. package/src/ReportView.js +0 -6
  4. package/src/base-client/components/common/XForm/XForm.vue +419 -419
  5. package/src/base-client/components/common/XForm/demo.vue +105 -105
  6. package/src/base-client/components/common/XFormTable/demo.vue +0 -1
  7. package/src/base-client/components/common/XPrint/PrintBill.vue +3 -1
  8. package/src/base-client/components/common/XRate/demo.vue +102 -102
  9. package/src/base-client/components/common/XTable/XTableWrapper.vue +166 -1
  10. package/src/base-client/components/common/XUploadFilesView/index.vue +485 -485
  11. package/src/base-client/components/layout/XPageView/RenderRow.vue +88 -88
  12. package/src/base-client/components/layout/XPageView/XPageView.vue +223 -223
  13. package/src/base-client/components/layout/XPageView/XTab/XTab.vue +96 -96
  14. package/src/base-client/components/layout/XPageView/componentTypes.js +22 -22
  15. package/src/main.js +3 -4
  16. package/src/pages/WorkflowDetail/WorkFlowDemo2.vue +2 -1
  17. package/src/pages/WorkflowDetail/WorkflowDetail.vue +20 -4
  18. package/src/pages/WorkflowDetail/WorkflowPageDetail/LeaveMessage.vue +388 -388
  19. package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +475 -148
  20. package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowTimeline.vue +677 -188
  21. package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkflowLog.vue +1 -1
  22. package/src/pages/WorkflowDetail/WorkflowPageDetail/components/WorkflowPersonSelector.vue +25 -23
  23. package/src/pages/XPageViewExample/index.vue +149 -149
  24. package/src/router/async/router.map.js +3 -5
  25. package/src/router/index.js +27 -27
  26. package/src/router.js +0 -2
  27. package/src/services/api/workFlow.js +0 -4
  28. package/test/request.test.js +17 -17
  29. package/vue.config.js +2 -5
  30. package/src/base-client/components/common/AMisRender/index.js +0 -3
  31. package/src/base-client/components/common/AMisRender/index.vue +0 -263
  32. package/src/pages/AMisDemo/AMisDemo.vue +0 -325
  33. package/src/pages/AMisDemo/AMisDemo2.vue +0 -74
  34. package/test/Amis.spec.js +0 -164
@@ -50,7 +50,7 @@ export default {
50
50
  name: 'WorkflowLog',
51
51
  props: {
52
52
  workflowId: {
53
- type: String,
53
+ type: [String, Number],
54
54
  required: true
55
55
  }
56
56
  },
@@ -1,28 +1,30 @@
1
1
  <template>
2
2
  <div v-if="workflowHandleWrap.needSelectPerson">
3
- <!-- 多分支选择(包含WF_RESULT的情况) -->
4
- <template v-if="workflowHandleWrap.isWfResultBranch && workflowHandleWrap.branchNodes.length > 0">
5
- <a-form-item
6
- v-for="node in workflowHandleWrap.branchNodes"
7
- :key="node.stepId"
8
- :label="`${node.stepName}处理人`"
9
- required
10
- >
11
- <a-select
12
- :value="getBranchPersonValue(node.stepId)"
13
- :getPopupContainer="(triggerNode) => triggerNode.parentNode"
14
- @change="setBranchPersonValue(node.stepId, $event, node.chargePersonOptions)"
15
- :placeholder="`请选择${node.stepName}的处理人`"
16
- :options="node.chargePersonOptions"
17
- :filter-option="filterOption"
18
- style="width: 195px"
19
- show-search
3
+ <!-- 多分支选择(包含WF_RESULT的条件分支或并行分支的情况) -->
4
+ <template v-if="workflowHandleWrap.needMultipleBranchSelection && workflowHandleWrap.branchNodes.length > 0">
5
+ <template v-for="node in workflowHandleWrap.branchNodes">
6
+ <a-form-item
7
+ v-if="node.needSelectPerson"
8
+ :key="node.stepId"
9
+ :label="`${node.stepName}处理人`"
10
+ required
20
11
  >
21
- <a-select-option v-for="option in node.chargePersonOptions" :key="option.value" :value="option.value">
22
- {{ option.label }}
23
- </a-select-option>
24
- </a-select>
25
- </a-form-item>
12
+ <a-select
13
+ :value="getBranchPersonValue(node.stepId)"
14
+ :getPopupContainer="(triggerNode) => triggerNode.parentNode"
15
+ @change="setBranchPersonValue(node.stepId, $event, node.chargePersonOptions)"
16
+ :placeholder="`请选择${node.stepName}的处理人`"
17
+ :options="node.chargePersonOptions"
18
+ :filter-option="filterOption"
19
+ style="width: 195px"
20
+ show-search
21
+ >
22
+ <a-select-option v-for="option in node.chargePersonOptions" :key="option.value" :value="option.value">
23
+ {{ option.label }}
24
+ </a-select-option>
25
+ </a-select>
26
+ </a-form-item>
27
+ </template>
26
28
  </template>
27
29
 
28
30
  <!-- 单分支选择(前台可计算的情况) -->
@@ -90,7 +92,7 @@ export default {
90
92
 
91
93
  // 获取分支选择标签文本
92
94
  getBranchSelectionLabel () {
93
- if (this.workflowHandleWrap.isWfResultBranch) {
95
+ if (this.workflowHandleWrap.needMultipleBranchSelection) {
94
96
  return '分支节点处理人选择'
95
97
  } else if (this.workflowHandleWrap.calculatedTargetNode) {
96
98
  return `请选择${this.workflowHandleWrap.getStepNameByStepId(this.workflowHandleWrap.calculatedTargetNode)}处理人`
@@ -1,149 +1,149 @@
1
- <script setup>
2
- import { onMounted, ref } from 'vue'
3
- import XPageView from '@vue2-client/base-client/components/layout/XPageView'
4
-
5
- const xPageViewRef = ref(null)
6
-
7
- onMounted(() => {
8
- xPageViewRef.value.init({
9
- configValue: {
10
- type: 'page',
11
- onMounted: function (curr) {
12
- console.warn(curr.data)
13
- // 设置Tab配置数据
14
- curr.data.tabData = {
15
- index: 0,
16
- items: [
17
- // 第一组配置
18
- {
19
- tabConfigs: [
20
- { title: '表单列表', type: 'XFormTable', props: { serviceName: 'af-system', queryParamsName: 'crud_dictionary_manage' } },
21
- { title: '新增表单', type: 'XAddNativeForm', props: { serviceName: 'af-system', configName: 'crud_dictionary_manage_add_form' } }
22
- ]
23
- },
24
- // 第二组配置
25
- {
26
- tabConfigs: [
27
- { title: '数据列表', type: 'XFormTable', props: { serviceName: 'af-system', queryParamsName: 'crud_dictionary_manage' } },
28
- { title: '编辑表单', type: 'XAddNativeForm', props: { serviceName: 'af-system', configName: 'crud_dictionary_manage_add_form' } },
29
- { title: '查看记录', type: 'XFormTable', props: { serviceName: 'af-system', queryParamsName: 'crud_dictionary_manage' } }
30
- ]
31
- }
32
- ]
33
- }
34
- console.log('页面初始化完成,全局数据上下文已创建')
35
- },
36
- gutter: [16, 16],
37
- children: [
38
- {
39
- id: 'controlRow',
40
- type: 'row',
41
- gutter: 16,
42
- template: 'card',
43
- children: [
44
- {
45
- id: 'buttonContainer',
46
- span: '24',
47
- type: 'row',
48
- gutter: 8,
49
- children: [
50
- {
51
- id: 'reloadButton',
52
- span: '6',
53
- type: 'a-button',
54
- props: {
55
- type: 'primary',
56
- value: '切换Tab配置'
57
- },
58
- children: [
59
- {
60
- type: 'text',
61
- text: '切换Tab配置'
62
- }
63
- ],
64
- event: {
65
- click: function (e, context) {
66
- // 切换Tab配置
67
- const tabData = context.data.tabData
68
- tabData.index = tabData.index === 0 ? 1 : 0
69
-
70
- // 获取当前配置和Tab组件
71
- const currentConfig = tabData.items[tabData.index]
72
- const tabComponent = context.comps.pageTab
73
-
74
- if (tabComponent) {
75
- // 更新Tab组件配置
76
- tabComponent.$props.data = currentConfig.tabConfigs
77
- console.log('Tab配置已更新,当前配置索引:', tabData.index)
78
-
79
- // 更新状态文本
80
- const statusText = context.comps.statusText
81
- if (statusText && statusText.$el) {
82
- statusText.message = `点击按钮切换不同的Tab配置,当前是第${tabData.index + 1}组配置`
83
- }
84
- }
85
- }
86
- }
87
- },
88
- {
89
- id: 'statusText',
90
- span: '18',
91
- type: 'a-alert',
92
- props: {
93
- message: '点击按钮切换不同的Tab配置,当前是第1组配置',
94
- type: 'success'
95
- }
96
- }
97
- ]
98
- }
99
- ]
100
- },
101
- {
102
- id: 'row2',
103
- type: 'row',
104
- gutter: 16,
105
- template: 'none',
106
- children: [
107
- {
108
- id: 'pageTab',
109
- span: '24',
110
- type: 'XTab',
111
- props: {
112
- showTabBar: true,
113
- data: [
114
- {
115
- title: '表单列表',
116
- type: 'XFormTable',
117
- props: {
118
- serviceName: 'af-system',
119
- queryParamsName: 'crud_dictionary_manage'
120
- }
121
- },
122
- {
123
- title: '新增表单',
124
- type: 'XAddNativeForm',
125
- props: {
126
- serviceName: 'af-system',
127
- configName: 'crud_dictionary_manage_add_form'
128
- }
129
- }
130
- ],
131
- onChange: function (oldKey, newKey, oldTab, newTab) {
132
- console.log('Tab changed:', oldKey, newKey)
133
- }
134
- }
135
- }
136
- ]
137
- }
138
- ]
139
- },
140
- serviceName: 'af-his'
141
- })
142
- })
143
- </script>
144
-
145
- <template>
146
- <div>
147
- <x-page-view ref="xPageViewRef"></x-page-view>
148
- </div>
149
- </template>
1
+ <script setup>
2
+ import { onMounted, ref } from 'vue'
3
+ import XPageView from '@vue2-client/base-client/components/layout/XPageView'
4
+
5
+ const xPageViewRef = ref(null)
6
+
7
+ onMounted(() => {
8
+ xPageViewRef.value.init({
9
+ configValue: {
10
+ type: 'page',
11
+ onMounted: function (curr) {
12
+ console.warn(curr.data)
13
+ // 设置Tab配置数据
14
+ curr.data.tabData = {
15
+ index: 0,
16
+ items: [
17
+ // 第一组配置
18
+ {
19
+ tabConfigs: [
20
+ { title: '表单列表', type: 'XFormTable', props: { serviceName: 'af-system', queryParamsName: 'crud_dictionary_manage' } },
21
+ { title: '新增表单', type: 'XAddNativeForm', props: { serviceName: 'af-system', configName: 'crud_dictionary_manage_add_form' } }
22
+ ]
23
+ },
24
+ // 第二组配置
25
+ {
26
+ tabConfigs: [
27
+ { title: '数据列表', type: 'XFormTable', props: { serviceName: 'af-system', queryParamsName: 'crud_dictionary_manage' } },
28
+ { title: '编辑表单', type: 'XAddNativeForm', props: { serviceName: 'af-system', configName: 'crud_dictionary_manage_add_form' } },
29
+ { title: '查看记录', type: 'XFormTable', props: { serviceName: 'af-system', queryParamsName: 'crud_dictionary_manage' } }
30
+ ]
31
+ }
32
+ ]
33
+ }
34
+ console.log('页面初始化完成,全局数据上下文已创建')
35
+ },
36
+ gutter: [16, 16],
37
+ children: [
38
+ {
39
+ id: 'controlRow',
40
+ type: 'row',
41
+ gutter: 16,
42
+ template: 'card',
43
+ children: [
44
+ {
45
+ id: 'buttonContainer',
46
+ span: '24',
47
+ type: 'row',
48
+ gutter: 8,
49
+ children: [
50
+ {
51
+ id: 'reloadButton',
52
+ span: '6',
53
+ type: 'a-button',
54
+ props: {
55
+ type: 'primary',
56
+ value: '切换Tab配置'
57
+ },
58
+ children: [
59
+ {
60
+ type: 'text',
61
+ text: '切换Tab配置'
62
+ }
63
+ ],
64
+ event: {
65
+ click: function (e, context) {
66
+ // 切换Tab配置
67
+ const tabData = context.data.tabData
68
+ tabData.index = tabData.index === 0 ? 1 : 0
69
+
70
+ // 获取当前配置和Tab组件
71
+ const currentConfig = tabData.items[tabData.index]
72
+ const tabComponent = context.comps.pageTab
73
+
74
+ if (tabComponent) {
75
+ // 更新Tab组件配置
76
+ tabComponent.$props.data = currentConfig.tabConfigs
77
+ console.log('Tab配置已更新,当前配置索引:', tabData.index)
78
+
79
+ // 更新状态文本
80
+ const statusText = context.comps.statusText
81
+ if (statusText && statusText.$el) {
82
+ statusText.message = `点击按钮切换不同的Tab配置,当前是第${tabData.index + 1}组配置`
83
+ }
84
+ }
85
+ }
86
+ }
87
+ },
88
+ {
89
+ id: 'statusText',
90
+ span: '18',
91
+ type: 'a-alert',
92
+ props: {
93
+ message: '点击按钮切换不同的Tab配置,当前是第1组配置',
94
+ type: 'success'
95
+ }
96
+ }
97
+ ]
98
+ }
99
+ ]
100
+ },
101
+ {
102
+ id: 'row2',
103
+ type: 'row',
104
+ gutter: 16,
105
+ template: 'none',
106
+ children: [
107
+ {
108
+ id: 'pageTab',
109
+ span: '24',
110
+ type: 'XTab',
111
+ props: {
112
+ showTabBar: true,
113
+ data: [
114
+ {
115
+ title: '表单列表',
116
+ type: 'XFormTable',
117
+ props: {
118
+ serviceName: 'af-system',
119
+ queryParamsName: 'crud_dictionary_manage'
120
+ }
121
+ },
122
+ {
123
+ title: '新增表单',
124
+ type: 'XAddNativeForm',
125
+ props: {
126
+ serviceName: 'af-system',
127
+ configName: 'crud_dictionary_manage_add_form'
128
+ }
129
+ }
130
+ ],
131
+ onChange: function (oldKey, newKey, oldTab, newTab) {
132
+ console.log('Tab changed:', oldKey, newKey)
133
+ }
134
+ }
135
+ }
136
+ ]
137
+ }
138
+ ]
139
+ },
140
+ serviceName: 'af-his'
141
+ })
142
+ })
143
+ </script>
144
+
145
+ <template>
146
+ <div>
147
+ <x-page-view ref="xPageViewRef"></x-page-view>
148
+ </div>
149
+ </template>
@@ -43,8 +43,6 @@ routerResource.submitTicket = () => import('@vue2-client/pages/system/ticket')
43
43
  routerResource.ServiceReview = () => import('@vue2-client/pages/ServiceReview')
44
44
  // 系统设置
45
45
  routerResource.settings = () => import('@vue2-client/pages/system/settings')
46
- // AMIS示例页面
47
- routerResource.amisDemo = () => import('@vue2-client/pages/AMisDemo/AMisDemo')
48
46
  // 页面编辑器
49
47
  routerResource.editablePage = () => import('@vue2-client/pages/lowCode/lowCodeEditor.vue')
50
48
  // 数据检索
@@ -53,16 +51,16 @@ routerResource.dynamicStatistics = () => import('@vue2-client/pages/DynamicStati
53
51
  routerResource.newDynamicStatistics = () => import('@vue2-client/pages/NewDynamicStatistics')
54
52
  // 示例页面
55
53
  routerResource.example = {
56
- path: 'example',
54
+ path: 'example',
57
55
  name: '示例主页面',
58
- // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo2.vue'),
56
+ component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo2.vue'),
59
57
  // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
60
58
  // component: () => import('@vue2-client/pages/addressSelect/addressDemo.vue'),
61
59
  // component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
62
60
  // component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
63
61
  // component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
64
62
  // component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
65
- component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
63
+ // component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
66
64
  // component: () => import('@vue2-client/base-client/components/common/XDatePicker/demo.vue'),
67
65
  // component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
68
66
  // component: () => import('@vue2-client/base-client/components/common/XRate/demo.vue'),
@@ -1,27 +1,27 @@
1
- import { formatRoutes } from '@vue2-client/utils/routerUtil'
2
-
3
- // 不需要登录拦截的路由配置
4
- const loginIgnore = {
5
- names: ['404', '403'], // 根据路由名称匹配
6
- paths: ['/login', '/example', '/system/example', '/system/example/default', '/system/example/sub-example', '/submitTicket', '/submitTicket/', '/ServiceReview', '/DynamicStatistics', '/NewDynamicStatistics'], // 根据路由fullPath匹配
7
- /**
8
- * 判断路由是否包含在该配置中
9
- * @param route vue-router 的 route 对象
10
- * @returns {boolean}
11
- */
12
- includes (route) {
13
- return this.names.includes(route.name) || this.paths.includes(route.path)
14
- }
15
- }
16
-
17
- /**
18
- * 初始化路由实例
19
- * @param isAsync 是否异步路由模式
20
- * @returns {RouterOptions}
21
- */
22
- function initRouter (isAsync) {
23
- const options = require('./async/config.async').default
24
- formatRoutes(options.routes)
25
- return options
26
- }
27
- export { loginIgnore, initRouter }
1
+ import { formatRoutes } from '@vue2-client/utils/routerUtil'
2
+
3
+ // 不需要登录拦截的路由配置
4
+ const loginIgnore = {
5
+ names: ['404', '403'], // 根据路由名称匹配
6
+ paths: ['/login', '/example', '/system/example', '/system/example/default', '/system/example/sub-example', '/submitTicket', '/submitTicket/', '/ServiceReview', '/DynamicStatistics', '/NewDynamicStatistics'], // 根据路由fullPath匹配
7
+ /**
8
+ * 判断路由是否包含在该配置中
9
+ * @param route vue-router 的 route 对象
10
+ * @returns {boolean}
11
+ */
12
+ includes (route) {
13
+ return this.names.includes(route.name) || this.paths.includes(route.path)
14
+ }
15
+ }
16
+
17
+ /**
18
+ * 初始化路由实例
19
+ * @param isAsync 是否异步路由模式
20
+ * @returns {RouterOptions}
21
+ */
22
+ function initRouter (isAsync) {
23
+ const options = require('./async/config.async').default
24
+ formatRoutes(options.routes)
25
+ return options
26
+ }
27
+ export { loginIgnore, initRouter }
package/src/router.js CHANGED
@@ -8,8 +8,6 @@ const routes = [
8
8
  // 对于每个路由,你都可以使用 'loadView' 方法动态加载对应的组件
9
9
  { path: '/Tree', component: loadView('Tree') },
10
10
  { path: '/XStepView', component: loadView('XStepView') },
11
- { path: '/Amis', component: () => import('@vue2-client/pages/AMisDemo/AMisDemo') },
12
- { path: '/Amis2', component: () => import('@vue2-client/pages/AMisDemo/AMisDemo2') },
13
11
  { path: '/DynamicStatistics', component: () => import('@vue2-client/pages/DynamicStatistics/index') },
14
12
  { path: '/NewDynamicStatistics', component: () => import('@vue2-client/pages/NewDynamicStatistics/index') },
15
13
  { path: '/submitTicket', component: () => import('@vue2-client/pages/system/ticket') },
@@ -18,16 +18,12 @@ const workFlowViewApi = {
18
18
  afterWorkFlowFinalStepSubmit: '/logic/afterWorkFlowFinalStepSubmit',
19
19
  // 获取步骤留言和表单填写人姓名
20
20
  getStepNoteAndHandler: '/logic/getStepNoteAndHandler',
21
- // 更新步骤信息
22
- updateWorkFlowStepData: '/logic/updateWorkFlowStepData',
23
21
  // 保存工作流日志
24
22
  saveWorkFlowLog: '/logic/saveWorkFlowLog',
25
23
  // 获取工作流日志
26
24
  getWorkFlowLog: '/logic/getWorkFlowLog',
27
25
  // 获取员工任务详情信息
28
26
  getEmployeeTaskDetail: '/logic/getEmployeeTaskDetail',
29
- // 根据流程名称获取所有步骤名称
30
- getWorkFlowStepNames: '/logic/getWorkFlowStepNames',
31
27
  // 获取工作流任务留言
32
28
  getWorkFlowLeaveMessage: '/logic/getWorkFlowLeaveMessage',
33
29
  // 更新任务完成时间
@@ -1,17 +1,17 @@
1
- import EncryptUtil from '@vue2-client/utils/EncryptUtil'
2
- import { test, describe } from '@jest/globals'
3
-
4
- describe('请求加密模块', () => {
5
- const VALID_KEY = 'a964287a2cef8781ed76bd63dcadd578'
6
- const TEST_PAYLOAD = {
7
- username: 'admin',
8
- password: 'P@ssw0rd_测试',
9
- timestamp: Date.now()
10
- }
11
-
12
- // CBC加密测试
13
- test('应生成有效的加密字符串', () => {
14
- const encrypted = EncryptUtil.AESEncryptCBC(TEST_PAYLOAD, VALID_KEY)
15
- console.log(encrypted)
16
- })
17
- })
1
+ import EncryptUtil from '@vue2-client/utils/EncryptUtil'
2
+ import { test, describe } from '@jest/globals'
3
+
4
+ describe('请求加密模块', () => {
5
+ const VALID_KEY = 'a964287a2cef8781ed76bd63dcadd578'
6
+ const TEST_PAYLOAD = {
7
+ username: 'admin',
8
+ password: 'P@ssw0rd_测试',
9
+ timestamp: Date.now()
10
+ }
11
+
12
+ // CBC加密测试
13
+ test('应生成有效的加密字符串', () => {
14
+ const encrypted = EncryptUtil.AESEncryptCBC(TEST_PAYLOAD, VALID_KEY)
15
+ console.log(encrypted)
16
+ })
17
+ })
package/vue.config.js CHANGED
@@ -53,8 +53,8 @@ module.exports = {
53
53
  changeOrigin: true
54
54
  },
55
55
  '/api/af-apply': {
56
- // pathRewrite: { '^/api/af-apply': '/' },
57
- target: revenue,
56
+ pathRewrite: { '^/api/af-apply': '/' },
57
+ target: 'http://127.0.0.1:9031',
58
58
  changeOrigin: true
59
59
  },
60
60
  '/api/af-scada': {
@@ -163,9 +163,6 @@ module.exports = {
163
163
  }))
164
164
 
165
165
  config.plugins.push(
166
- // new CopyPlugin({
167
- // patterns: [{ from: 'node_modules/amis/sdk', to: 'amis/sdk' }],
168
- // })
169
166
  )
170
167
 
171
168
  // 生产环境下将资源压缩成gzip格式
@@ -1,3 +0,0 @@
1
- import AMisRender from './index.vue'
2
-
3
- export default AMisRender