imatrix-ui 2.8.39-dw → 2.8.39-pvtmp

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 (189) hide show
  1. package/lib/super-ui.css +1 -1
  2. package/lib/super-ui.umd.min.js +5 -35
  3. package/package.json +6 -4
  4. package/packages/breadcrumb/index.js +6 -0
  5. package/packages/breadcrumb/src/breadcrumb.vue +71 -0
  6. package/packages/department-tree/index.js +6 -0
  7. package/packages/department-tree/src/department-tree.vue +108 -0
  8. package/packages/department-tree-inline/index.js +6 -0
  9. package/packages/department-tree-inline/src/department-multi-tree-inline.vue +411 -0
  10. package/packages/department-tree-inline/src/department-single-tree-inline.vue +293 -0
  11. package/packages/department-tree-inline/src/department-tree-inline.vue +86 -0
  12. package/packages/department-tree-inline/src/department-tree-service.js +275 -0
  13. package/packages/department-tree-inline/src/search-result.vue +176 -0
  14. package/packages/department-user-tree/index.js +6 -0
  15. package/packages/department-user-tree/src/department-user-multiple-tree.vue +116 -0
  16. package/packages/department-user-tree/src/department-user-single-tree.vue +76 -0
  17. package/packages/department-user-tree/src/department-user-tree.vue +101 -0
  18. package/packages/department-user-tree-inline/index.js +6 -0
  19. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +639 -0
  20. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +274 -0
  21. package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +79 -0
  22. package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +248 -0
  23. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +142 -0
  24. package/packages/department-user-tree-inline/src/search-result.vue +197 -0
  25. package/packages/directives/prevent-reclick.js +19 -0
  26. package/packages/dynamic-source-select/index.js +6 -0
  27. package/packages/dynamic-source-select/src/dynamic-source-select-service.js +75 -0
  28. package/packages/dynamic-source-select/src/dynamic-source-select.vue +586 -0
  29. package/packages/dynamic-source-select/src/events.js +55 -0
  30. package/packages/fs-preview/index.js +6 -0
  31. package/packages/fs-preview/src/fs-preview.vue +226 -0
  32. package/packages/fs-upload/index.js +6 -0
  33. package/packages/fs-upload/src/fs-upload-multi.vue +420 -0
  34. package/packages/fs-upload/src/fs-upload-single.vue +312 -0
  35. package/packages/fs-upload/src/fs-upload.vue +189 -0
  36. package/packages/fs-upload/src/see-big-picture.vue +55 -0
  37. package/packages/fs-upload-list/index.js +6 -0
  38. package/packages/fs-upload-list/src/fs-upload-list.vue +287 -0
  39. package/packages/hamburger/index.js +6 -0
  40. package/packages/hamburger/src/hamburger.vue +38 -0
  41. package/packages/index.js +121 -0
  42. package/packages/multipart-upload/index.js +6 -0
  43. package/packages/multipart-upload/src/index.vue +73 -0
  44. package/packages/multipart-upload/src/multipart-upload-form.vue +297 -0
  45. package/packages/multipart-upload/src/multipart-upload-list.vue +378 -0
  46. package/packages/organization-input/index.js +6 -0
  47. package/packages/organization-input/src/organization-input.vue +542 -0
  48. package/packages/plugins/export-data-new.js +468 -0
  49. package/packages/plugins/export-data.js +361 -0
  50. package/packages/plugins/index.js +15 -0
  51. package/packages/plugins/public-method.js +43 -0
  52. package/packages/remove-department/index.js +6 -0
  53. package/packages/remove-department/src/remove-department.vue +172 -0
  54. package/packages/remove-department/src/remove-dept-service.js +20 -0
  55. package/packages/remove-user/index.js +6 -0
  56. package/packages/remove-user/src/remove-user-service.js +20 -0
  57. package/packages/remove-user/src/remove-user.vue +195 -0
  58. package/packages/remove-workgroup/index.js +6 -0
  59. package/packages/remove-workgroup/src/remove-workgroup-service.js +20 -0
  60. package/packages/remove-workgroup/src/remove-workgroup.vue +159 -0
  61. package/packages/rich-editor/index.js +7 -0
  62. package/packages/rich-editor/index.vue +278 -0
  63. package/packages/rich-editor/langs/zh-Hans.js +1 -0
  64. package/packages/rich-editor/viewer.vue +103 -0
  65. package/packages/scan-code-input/index.js +6 -0
  66. package/packages/scan-code-input/src/events.js +33 -0
  67. package/packages/scan-code-input/src/scan-code-input-colse.vue +131 -0
  68. package/packages/scan-code-input/src/scan-code-input.vue +116 -0
  69. package/packages/secret-info/index.js +7 -0
  70. package/packages/secret-info/index.vue +90 -0
  71. package/packages/super-grid/index.js +7 -0
  72. package/packages/super-grid/src/apis.js +825 -0
  73. package/packages/super-grid/src/columns-config.vue +335 -0
  74. package/packages/super-grid/src/custom-formatter.js +280 -0
  75. package/packages/super-grid/src/dynamic-input.vue +1286 -0
  76. package/packages/super-grid/src/eventBus.js +2 -0
  77. package/packages/super-grid/src/events.js +55 -0
  78. package/packages/super-grid/src/formValidatorUtil.js +226 -0
  79. package/packages/super-grid/src/formatter.js +181 -0
  80. package/packages/super-grid/src/group-column.vue +100 -0
  81. package/packages/super-grid/src/header-context-menu.vue +87 -0
  82. package/packages/super-grid/src/index-column.vue +51 -0
  83. package/packages/super-grid/src/normal-column.vue +775 -0
  84. package/packages/super-grid/src/public-methods.js +31 -0
  85. package/packages/super-grid/src/row-operation.vue +161 -0
  86. package/packages/super-grid/src/search-button.vue +66 -0
  87. package/packages/super-grid/src/search-condition-input.vue +61 -0
  88. package/packages/super-grid/src/search-condition-list.vue +59 -0
  89. package/packages/super-grid/src/search-form-advancedQuery.vue +654 -0
  90. package/packages/super-grid/src/search-form-dialog.vue +79 -0
  91. package/packages/super-grid/src/search-form-item.vue +405 -0
  92. package/packages/super-grid/src/search-form-number.vue +38 -0
  93. package/packages/super-grid/src/search-form-open.vue +170 -0
  94. package/packages/super-grid/src/search-form-ordinarySearch.vue +196 -0
  95. package/packages/super-grid/src/search-form.vue +642 -0
  96. package/packages/super-grid/src/search-methods.js +448 -0
  97. package/packages/super-grid/src/selection-column.vue +43 -0
  98. package/packages/super-grid/src/store.js +3 -0
  99. package/packages/super-grid/src/super-grid-service.js +595 -0
  100. package/packages/super-grid/src/super-grid.vue +2936 -0
  101. package/packages/super-grid/src/utils.js +782 -0
  102. package/packages/super-grid/src/view-image-dialog.vue +130 -0
  103. package/packages/super-nine-grid/index.js +7 -0
  104. package/packages/super-nine-grid/src/apis.js +103 -0
  105. package/packages/super-nine-grid/src/custom-formatter.js +66 -0
  106. package/packages/super-nine-grid/src/formatter.js +131 -0
  107. package/packages/super-nine-grid/src/search-form-number.vue +38 -0
  108. package/packages/super-nine-grid/src/search-form.vue +430 -0
  109. package/packages/super-nine-grid/src/search-methods.js +134 -0
  110. package/packages/super-nine-grid/src/store.js +3 -0
  111. package/packages/super-nine-grid/src/super-grid-service.js +93 -0
  112. package/packages/super-nine-grid/src/super-nine-grid.vue +883 -0
  113. package/packages/super-nine-grid/src/utils.js +261 -0
  114. package/packages/svg-icon/index.js +6 -0
  115. package/packages/svg-icon/src/svg-icon.vue +43 -0
  116. package/packages/utils/memory-cache-utils.js +90 -0
  117. package/packages/utils/utils.js +152 -0
  118. package/packages/utils/value-set.js +86 -0
  119. package/packages/valid-code/index.js +7 -0
  120. package/packages/valid-code/src/valid-code.vue +95 -0
  121. package/packages/workflow-button/index.js +6 -0
  122. package/packages/workflow-button/src/workflow-button.vue +325 -0
  123. package/packages/workflow-history-list/index.js +6 -0
  124. package/packages/workflow-history-list/src/api.js +7 -0
  125. package/packages/workflow-history-list/src/workflow-history-list.vue +197 -0
  126. package/packages/workgroup-tree/index.js +6 -0
  127. package/packages/workgroup-tree/src/workgroup-tree.vue +77 -0
  128. package/packages/workgroup-tree-inline/index.js +6 -0
  129. package/packages/workgroup-tree-inline/src/search-result.vue +168 -0
  130. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +458 -0
  131. package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +71 -0
  132. package/packages/workgroup-user-tree/index.js +6 -0
  133. package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +100 -0
  134. package/packages/workgroup-user-tree-inline/index.js +6 -0
  135. package/packages/workgroup-user-tree-inline/src/search-result.vue +197 -0
  136. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +192 -0
  137. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +584 -0
  138. package/packages/year-range-picker/index.js +6 -0
  139. package/packages/year-range-picker/src/year-range-picker.vue +51 -0
  140. package/src/api/sso-service.js +9 -1
  141. package/src/api/tab.js +3 -3
  142. package/src/i18n/i18n.js +1 -1
  143. package/src/i18n/langs/cn.js +15 -5
  144. package/src/i18n/langs/en.js +15 -5
  145. package/src/index.js +93 -0
  146. package/src/permission.js +51 -17
  147. package/src/plugins.js +3 -3
  148. package/src/store/getters.js +2 -1
  149. package/src/store/modules/app.js +10 -1
  150. package/src/store/modules/user.js +11 -18
  151. package/src/styles/display-layout.scss +34 -0
  152. package/src/styles/index.scss +32 -4
  153. package/src/styles/theme/dark-blue/button.scss +9 -0
  154. package/src/styles/theme/dark-blue/card.scss +64 -0
  155. package/src/styles/theme/dark-blue/checkbox.scss +10 -0
  156. package/src/styles/theme/dark-blue/dark-blue-var.scss +8 -0
  157. package/src/styles/theme/dark-blue/dialog.scss +21 -0
  158. package/src/styles/theme/dark-blue/element-variables.scss +7 -0
  159. package/src/styles/theme/dark-blue/font.scss +71 -0
  160. package/src/styles/theme/dark-blue/form.scss +51 -0
  161. package/src/styles/theme/dark-blue/index.scss +247 -0
  162. package/src/styles/theme/dark-blue/input.scss +15 -0
  163. package/src/styles/theme/dark-blue/pagination.scss +14 -0
  164. package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
  165. package/src/styles/theme/dark-blue/sidebar.scss +296 -0
  166. package/src/styles/theme/dark-blue/tab.scss +83 -0
  167. package/src/styles/theme/dark-blue/table.scss +60 -0
  168. package/src/styles/theme/dark-blue/tree.scss +31 -0
  169. package/src/styles/theme/dark-blue/var.scss +1028 -0
  170. package/src/styles/theme/gray/input-style.scss +8 -0
  171. package/src/styles/theme/gray/sidebar.scss +14 -2
  172. package/src/utils/auth-api.js +171 -0
  173. package/src/utils/auth.js +75 -41
  174. package/src/utils/calculator/calculator-factory.js +2 -2
  175. package/src/utils/calculator/calculator-util.js +7 -7
  176. package/src/utils/common-util.js +134 -1
  177. package/src/utils/jump-page-utils.js +36 -10
  178. package/src/utils/menu.js +19 -0
  179. package/src/utils/permission.js +4 -0
  180. package/src/utils/permissionAuth.js +46 -25
  181. package/src/utils/request.js +65 -8
  182. package/src/utils/util.js +77 -29
  183. package/src/views/dsc-component/Sidebar/Item.vue +5 -5
  184. package/src/views/dsc-component/Sidebar/Link.vue +11 -2
  185. package/src/views/dsc-component/Sidebar/SidebarItem.vue +37 -21
  186. package/src/views/dsc-component/Sidebar/index.vue +24 -12
  187. package/src/views/dsc-component/tabs/tab-content.vue +18 -2
  188. package/src/views/layout/components/Breadcrumb/index.vue +1 -1
  189. package/src/views/login/index.vue +1 -1
@@ -0,0 +1,95 @@
1
+ <template>
2
+ <div
3
+ class="ValidCode disabled-select"
4
+ :style="`width:${width}; height:${height}`"
5
+ @click="refreshCode"
6
+ >
7
+ <span
8
+ v-for="(item, index) in codeList"
9
+ :key="index"
10
+ :style="getStyle(item)"
11
+ >{{ item.code }}</span>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ export default {
17
+ name: 'ValidCode',
18
+ model: {
19
+ prop: 'value',
20
+ event: 'input'
21
+ },
22
+ props: {
23
+ width: {
24
+ type: String,
25
+ default: '100px'
26
+ },
27
+ height: {
28
+ type: String,
29
+ default: '40px'
30
+ },
31
+ length: {
32
+ type: Number,
33
+ default: 4
34
+ },
35
+ refresh: {
36
+ type: Number,
37
+ default: null
38
+ }
39
+ },
40
+ data() {
41
+ return {
42
+ codeList: []
43
+ }
44
+ },
45
+ watch: {
46
+ refresh() {
47
+ this.createdCode()
48
+ }
49
+ },
50
+ mounted() {
51
+ this.createdCode()
52
+ },
53
+ methods: {
54
+ refreshCode() {
55
+ this.createdCode()
56
+ },
57
+ createdCode() {
58
+ const len = this.length
59
+ const codeList = []
60
+ const chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz0123456789'
61
+ const charsLen = chars.length
62
+ // 生成
63
+ for (let i = 0; i < len; i++) {
64
+ const rgb = [Math.round(Math.random() * 220), Math.round(Math.random() * 240), Math.round(Math.random() * 200)]
65
+ codeList.push({
66
+ code: chars.charAt(Math.floor(Math.random() * charsLen)),
67
+ color: `rgb(${rgb})`,
68
+ fontSize: `${10 + (+[Math.floor(Math.random() * 10)] + 6)}px`,
69
+ padding: `${[Math.floor(Math.random() * 10)]}px`,
70
+ transform: `rotate(${Math.floor(Math.random() * 90) - Math.floor(Math.random() * 90)}deg)`
71
+ })
72
+ }
73
+ // 指向
74
+ this.codeList = codeList
75
+ this.$emit('input', codeList.map(item => item.code).join(''))
76
+ },
77
+ getStyle(data) {
78
+ return `color: ${data.color}; font-size: ${data.fontSize}; padding: ${data.padding}; transform: ${data.transform}`
79
+ }
80
+ }
81
+ }
82
+ </script>
83
+
84
+ <style scoped lang="scss">
85
+ .ValidCode{
86
+ display: flex;
87
+ background-color: #fff;
88
+ justify-content: center;
89
+ align-items: center;
90
+ cursor: pointer;
91
+ span{
92
+ display: inline-block;
93
+ }
94
+ }
95
+ </style>
@@ -0,0 +1,6 @@
1
+ import WorkflowButton from './src/workflow-button.vue'
2
+ WorkflowButton.install = function(Vue) {
3
+ Vue.component(WorkflowButton.name, WorkflowButton)
4
+ }
5
+
6
+ export default WorkflowButton
@@ -0,0 +1,325 @@
1
+ <template>
2
+ <span>
3
+ <span v-if="typeof(buttonInfo['theTransactor'])!=='undefined' && buttonInfo['theTransactor'] === false" class="operation-area">
4
+ <slot :name="slotBefore" />
5
+ <slot name="errorArea" />
6
+ <slot :name="slotAfter" />
7
+ </span>
8
+ <span v-else class="operation-area">
9
+ <slot :name="slotBefore" />
10
+ <el-button v-for="(button,buttonIndex) in buttons" :key="buttonIndex" v-permission="button.permission" :disabled="preventReclick" :type="button.type" size="small" :class="button.code?button.code:''" @click="button.clickFun">
11
+ {{ button.i18nButtonName }}
12
+ </el-button>
13
+ <slot :name="slotAfter" />
14
+ </span>
15
+ </span>
16
+ </template>
17
+
18
+ <script>
19
+ import { mapGetters } from 'vuex'
20
+ export default {
21
+ name: 'WorkflowButton',
22
+ props: {
23
+ // 控制按钮的相关信息
24
+ buttonInfo: {
25
+ type: Object,
26
+ default: null
27
+ },
28
+ // 隐藏的按钮编码集合
29
+ // 值可以为['selectTransactor','selectTache','readButton','retrieveButton','copyButton','assignButton'],
30
+ // 分别表示['当任务是"待选择办理人"状态时,表单页面显示的提交按钮',
31
+ // '当任务是"待选择环节"状态时,表单页面显示的提交按钮',
32
+ // '已阅按钮','取回按钮','抄送按钮','指派按钮']
33
+ hiddenBtns: {
34
+ type: Array,
35
+ default: null
36
+ },
37
+ // 资源编码前缀,例如:系统编码.实体类名 或 系统编码.页面编码,用于控制按钮权限
38
+ permissionPrefix: {
39
+ type: String,
40
+ default: null
41
+ },
42
+ formButtonPosition: {
43
+ type: String,
44
+ default: null
45
+ }
46
+ },
47
+ data() {
48
+ const buttonsPermission = this.getButtonsPermission()
49
+ return {
50
+ slotBefore: 'before',
51
+ slotAfter: 'after',
52
+ buttons: [],
53
+ buttonsPermission // 各按钮资源编码
54
+ }
55
+ },
56
+ computed: {
57
+ ...mapGetters([
58
+ 'preventReclick'
59
+ ])
60
+ },
61
+ provide() {
62
+ return {
63
+ }
64
+ },
65
+ created() {
66
+ // console.log('this.buttonInfo', this.buttonInfo)
67
+ // console.log('this.buttonsPermission', this.buttonsPermission)
68
+ const tempButtons = []
69
+ const _that = this
70
+ if ((typeof (this.buttonInfo['processState']) === 'undefined' || this.buttonInfo['processState'] === null) || (this.buttonInfo['processState'] === 'UNSUBMIT' && this.buttonInfo['active'] === 'WAIT_TRANSACT')) {
71
+ if (typeof (this.buttonInfo['processState']) === 'undefined' || this.buttonInfo['showButtonSave'] === true) {
72
+ tempButtons.push({
73
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['saveButton']),
74
+ 'permission': this.buttonsPermission['save'],
75
+ 'type': 'primary',
76
+ 'clickFun': function() {
77
+ _that.$emit('save')
78
+ },
79
+ 'code': 'saveButton'
80
+ })
81
+ }
82
+ tempButtons.push({
83
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['submitButton']),
84
+ 'permission': this.buttonsPermission['submitProcess'],
85
+ 'type': 'primary',
86
+ 'clickFun': function() {
87
+ _that.$emit('submitProcess')
88
+ },
89
+ 'code': 'submitButton'
90
+ })
91
+ }
92
+ if (this.buttonInfo['processState']) {
93
+ if (this.buttonInfo['active'] === 'WAIT_TRANSACT' && this.buttonInfo['processingMode'] === 'TYPE_READ') {
94
+ if ((!this.hiddenBtns || (this.hiddenBtns && this.hiddenBtns.indexOf('readButton') === -1))) {
95
+ tempButtons.push({
96
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['readButton']),
97
+ 'permission': this.buttonsPermission['completeTask'],
98
+ 'type': 'primary',
99
+ 'clickFun': function() { _that.completeTask('READED') },
100
+ 'code': 'readButton'
101
+ })
102
+ }
103
+ } else if (this.buttonInfo['processState'] === 'SUBMIT') {
104
+ if (this.buttonInfo['processingMode'] !== 'TYPE_READ' && this.buttonInfo['showButtonSave'] && (this.buttonInfo['active'] === 'WAIT_TRANSACT' || this.buttonInfo['active'] === 'WAIT_DESIGNATE_TRANSACTOR' || this.buttonInfo['active'] === 'WAIT_CHOICE_TACHE' || this.buttonInfo['active'] === 'DRAW_WAIT')) {
105
+ tempButtons.push({
106
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['saveButton']),
107
+ 'permission': this.buttonsPermission['update'],
108
+ 'type': 'primary',
109
+ 'clickFun': function() { _that.$emit('update') },
110
+ 'code': 'saveButton'
111
+ })
112
+ }
113
+ if (this.buttonInfo['active'] && this.buttonInfo['active'] === 'WAIT_DESIGNATE_TRANSACTOR' && (!this.hiddenBtns || (this.hiddenBtns && this.hiddenBtns.indexOf('selectTransactor') === -1))) {
114
+ tempButtons.push({
115
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['submitButton']),
116
+ 'permission': this.buttonsPermission['selectTransactor'],
117
+ 'type': 'primary',
118
+ 'clickFun': function() { _that.$emit('selectTransactors') },
119
+ 'code': 'submitButton'
120
+ })
121
+ }
122
+ if (this.buttonInfo['active'] && this.buttonInfo['active'] === 'WAIT_CHOICE_TACHE' && (!this.hiddenBtns || (this.hiddenBtns && this.hiddenBtns.indexOf('selectTache') === -1))) {
123
+ tempButtons.push({
124
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['submitButton']),
125
+ 'permission': this.buttonsPermission['selectTache'],
126
+ 'type': 'primary',
127
+ 'clickFun': function() { _that.$emit('selectTaches') },
128
+ 'code': 'submitButton'
129
+ })
130
+ }
131
+ if (this.buttonInfo['active'] && this.buttonInfo['active'] === 'DRAW_WAIT' && this.buttonInfo['showButtonDraw']) {
132
+ tempButtons.push({
133
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['drawButton']),
134
+ 'permission': this.buttonsPermission['drawTask'],
135
+ 'type': 'primary',
136
+ 'clickFun': function() { _that.$emit('drawTask') },
137
+ 'code': 'drawButton'
138
+ })
139
+ }
140
+ if (this.buttonInfo['drawTask'] && this.buttonInfo['active'] === 'WAIT_TRANSACT' && this.buttonInfo['showButtonAbandon']) {
141
+ tempButtons.push({
142
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['abandonButton']),
143
+ 'permission': this.buttonsPermission['abandonReceive'],
144
+ 'type': 'primary',
145
+ 'clickFun': function() { _that.$emit('abandonDraw') },
146
+ 'code': 'abandonButton'
147
+ })
148
+ }
149
+ if (this.buttonInfo['active'] === 'COMPLETED' && this.buttonInfo['processingMode'] !== 'TYPE_READ' && ((!this.hiddenBtns || (this.hiddenBtns && this.hiddenBtns.indexOf('retrieveButton') === -1)) && this.buttonInfo['showButtonGetBack'])) {
150
+ tempButtons.push({
151
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['backButton']),
152
+ 'permission': this.buttonsPermission['retrieve'],
153
+ 'type': 'primary',
154
+ 'clickFun': function() { _that.$emit('retrieveTask') },
155
+ 'code': 'backButton'
156
+ })
157
+ }
158
+ if (this.buttonInfo['active'] === 'WAIT_TRANSACT' && this.buttonInfo['processingMode'] === 'EDIT') {
159
+ tempButtons.push({
160
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['submitButton']),
161
+ 'permission': this.buttonsPermission['submitTask'],
162
+ 'type': 'primary',
163
+ 'clickFun': function() { _that.completeTask('SUBMIT') },
164
+ 'code': 'submitButton'
165
+ })
166
+ }
167
+
168
+ if (this.buttonInfo['active'] === 'WAIT_TRANSACT' && (this.buttonInfo['processingMode'] === 'APPROVE' || this.buttonInfo['processingMode'] === 'COUNTERSIGN')) {
169
+ tempButtons.push({
170
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['agreeButton']),
171
+ 'permission': this.buttonsPermission['approve'],
172
+ 'type': 'primary',
173
+ 'clickFun': function() { _that.completeTask('APPROVE') },
174
+ 'code': 'agreeButton'
175
+ })
176
+ tempButtons.push({
177
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['disagreeButton']),
178
+ 'permission': this.buttonsPermission['refuse'],
179
+ 'type': 'primary',
180
+ 'clickFun': function() { _that.completeTask('REFUSE') },
181
+ 'code': 'disagreeButton'
182
+ })
183
+ if (this.buttonInfo['processingMode'] === 'COUNTERSIGN' && this.buttonInfo['showButtonAddCounter']) {
184
+ tempButtons.push({
185
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['addSignerButton']),
186
+ 'permission': this.buttonsPermission['addSigner'],
187
+ 'type': 'primary',
188
+ 'clickFun': function() { _that.$emit('addSigner') },
189
+ 'code': 'addSignerButton'
190
+ })
191
+ }
192
+ if (this.buttonInfo['processingMode'] === 'COUNTERSIGN' && this.buttonInfo['showButtonDelCounter']) {
193
+ tempButtons.push({
194
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['removeSignerButton']),
195
+ 'permission': this.buttonsPermission['removeSigner'],
196
+ 'type': 'primary',
197
+ 'clickFun': function() { _that.$emit('removeSigner') },
198
+ 'code': 'removeSignerButton'
199
+ })
200
+ }
201
+ }
202
+ if (this.buttonInfo['active'] === 'WAIT_TRANSACT' && this.buttonInfo['processingMode'] === 'VOTE') {
203
+ tempButtons.push({
204
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['approveButton']),
205
+ 'permission': this.buttonsPermission['agreement'],
206
+ 'type': 'primary',
207
+ 'clickFun': function() { _that.completeTask('AGREEMENT') },
208
+ 'code': 'approveButton'
209
+ })
210
+ tempButtons.push({
211
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['opposeButton']),
212
+ 'permission': this.buttonsPermission['oppose'],
213
+ 'type': 'primary',
214
+ 'clickFun': function() { _that.completeTask('OPPOSE') },
215
+ 'code': 'opposeButton'
216
+ })
217
+ if (this.buttonInfo['showButtonKiken']) {
218
+ tempButtons.push({
219
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['abstainButton']),
220
+ 'permission': this.buttonsPermission['kiken'],
221
+ 'type': 'primary',
222
+ 'clickFun': function() { _that.completeTask('KIKEN') },
223
+ 'code': 'abstainButton'
224
+ })
225
+ }
226
+ }
227
+ if (this.buttonInfo['active'] === 'WAIT_TRANSACT' && this.buttonInfo['processingMode'] !== 'TYPE_READ' && this.buttonInfo['showButtonCopy'] && ((!this.hiddenBtns || (this.hiddenBtns && this.hiddenBtns.indexOf('copyButton') === -1)) && this.buttonInfo['showButtonCopy'])) {
228
+ tempButtons.push({
229
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['copyButton']),
230
+ 'permission': this.buttonsPermission['copyTask'],
231
+ 'type': '',
232
+ 'clickFun': function() { _that.$emit('createCopyTask') },
233
+ 'code': 'copyButton'
234
+ })
235
+ }
236
+ if (this.buttonInfo['processingMode'] !== 'TYPE_READ' && (this.buttonInfo['active'] === 'WAIT_TRANSACT' || this.buttonInfo['active'] === 'DRAW_WAIT') && ((!this.hiddenBtns || (this.hiddenBtns && this.hiddenBtns.indexOf('assignButton') === -1)) && this.buttonInfo['showButtonAppoint'])) {
237
+ tempButtons.push({
238
+ 'i18nButtonName': this.i18nButtonName(this.buttonInfo['appointButton']),
239
+ 'permission': this.buttonsPermission['assign'],
240
+ 'type': '',
241
+ 'clickFun': function() { _that.$emit('assignTask') },
242
+ 'code': 'appointButton'
243
+ })
244
+ }
245
+ }
246
+ }
247
+ if (this.formButtonPosition === 'bottomRight') {
248
+ this.buttons = tempButtons.slice().reverse()
249
+ this.slotBefore = 'after'
250
+ this.slotAfter = 'before'
251
+ } else {
252
+ this.buttons = tempButtons
253
+ }
254
+ },
255
+ mounted() {
256
+
257
+ },
258
+ methods: {
259
+ exportReportButt() {
260
+ // console.log('this.$emit(exportReport)')
261
+ this.$emit('exportReport')
262
+ },
263
+ completeTask(operationResult) {
264
+ this.$emit('completeTask', operationResult)
265
+ },
266
+ // 国际化显示按钮名称
267
+ i18nButtonName(buttonName) {
268
+ const defaultButtonPrefix = 'initVal:'
269
+ if (buttonName.indexOf(defaultButtonPrefix) >= 0) {
270
+ // 表示使用默认的按钮名称
271
+ const defaultButtonName = buttonName.substring(buttonName.indexOf(defaultButtonPrefix) + defaultButtonPrefix.length)
272
+ return this.$t('workflowButton.' + defaultButtonName)
273
+ } else {
274
+ return buttonName
275
+ }
276
+ },
277
+ getButtonsPermission() {
278
+ const defaultPermission = 'true'
279
+ const completeTaskPermission = this.permissionPrefix ? this.permissionPrefix + '.completeTask' : defaultPermission
280
+ return {
281
+ // 第一环节保存,同“更新”
282
+ save: this.permissionPrefix ? this.permissionPrefix + '.save' : defaultPermission,
283
+ // 第一环节提交
284
+ submitProcess: this.permissionPrefix ? this.permissionPrefix + '.submitProcess' : defaultPermission,
285
+ // 同意(办理任务)
286
+ approve: this.permissionPrefix ? this.permissionPrefix + '.approve' : completeTaskPermission,
287
+ // 不同意(办理任务)
288
+ refuse: this.permissionPrefix ? this.permissionPrefix + '.refuse' : completeTaskPermission,
289
+ // 提交(办理任务)
290
+ submitTask: this.permissionPrefix ? this.permissionPrefix + '.submit' : completeTaskPermission,
291
+ // 赞成(办理任务)
292
+ agreement: this.permissionPrefix ? this.permissionPrefix + '.agreement' : completeTaskPermission,
293
+ // 反对(办理任务)
294
+ oppose: this.permissionPrefix ? this.permissionPrefix + '.oppose' : completeTaskPermission,
295
+ // 弃权(办理任务)
296
+ kiken: this.permissionPrefix ? this.permissionPrefix + '.kiken' : completeTaskPermission,
297
+ // 阅(办理任务)
298
+ readed: this.permissionPrefix ? this.permissionPrefix + '.readed' : completeTaskPermission,
299
+ // 领取任务
300
+ drawTask: this.permissionPrefix ? this.permissionPrefix + '.drawTask' : defaultPermission,
301
+ // 放弃领取
302
+ abandonReceive: this.permissionPrefix ? this.permissionPrefix + '.abandonReceive' : defaultPermission,
303
+ // 取回
304
+ retrieve: this.permissionPrefix ? this.permissionPrefix + '.retrieve' : defaultPermission,
305
+ // 更新
306
+ update: this.permissionPrefix ? this.permissionPrefix + '.update' : defaultPermission,
307
+ // 指派
308
+ assign: this.permissionPrefix ? this.permissionPrefix + '.assign' : defaultPermission,
309
+ // 选择办理人
310
+ selectTransactor: this.permissionPrefix ? this.permissionPrefix + '.selectTransactor' : defaultPermission,
311
+ // 选择环节
312
+ selectTache: this.permissionPrefix ? this.permissionPrefix + '.selectTache' : defaultPermission,
313
+ // 抄送
314
+ copyTask: this.permissionPrefix ? this.permissionPrefix + '.copyTask' : defaultPermission,
315
+ // 加签
316
+ addSigner: this.permissionPrefix ? this.permissionPrefix + '.addSigner' : defaultPermission,
317
+ // 减签
318
+ removeSigner: this.permissionPrefix ? this.permissionPrefix + '.removeSigner' : defaultPermission,
319
+ // 导出报告
320
+ exportReport: this.permissionPrefix ? this.permissionPrefix + '.exportReport' : defaultPermission
321
+ }
322
+ }
323
+ }
324
+ }
325
+ </script>
@@ -0,0 +1,6 @@
1
+ import WorkflowHistoryList from './src/workflow-history-list.vue'
2
+ WorkflowHistoryList.install = function(Vue) {
3
+ Vue.component(WorkflowHistoryList.name, WorkflowHistoryList)
4
+ }
5
+
6
+ export default WorkflowHistoryList
@@ -0,0 +1,7 @@
1
+ const apis = {
2
+ refresh() {
3
+ this.getData()
4
+ }
5
+ }
6
+
7
+ export default apis
@@ -0,0 +1,197 @@
1
+ <template>
2
+ <el-table
3
+ v-if="loaded"
4
+ ref="historyList"
5
+ style="width: 100%"
6
+ :height="tableHeight"
7
+ :data="histories"
8
+ element-loading-text="Loading"
9
+ border
10
+ fit
11
+ highlight-current-row
12
+ row-key="uuid"
13
+ :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
14
+ lazy
15
+ :load="getChildren"
16
+ >
17
+ <el-table-column :label="$t('workflowHistoryList.index')" align="left" width="80px">
18
+ <template slot-scope="scope">
19
+ {{ scope.$index+1 }}
20
+ </template>
21
+ </el-table-column>
22
+ <el-table-column :label="$t('workflowHistoryList.taskName')" align="left" width="250">
23
+ <template slot-scope="scope">
24
+ <span v-if="scope.row.historyType && scope.row.historyType ==='PROCESS_START'">{{ $t('workflowHistoryList.processStart') }}</span>
25
+ <span v-else-if="scope.row.historyType && scope.row.historyType ==='PROCESS_END'">{{ $t('workflowHistoryList.processEnd') }}</span>
26
+ <span v-else-if="scope.row.current" style="color:#E6A23C">{{ i18nTaskName(scope.row) }}</span>
27
+ <span v-else-if="!scope.row.special">{{ i18nTaskName(scope.row) }}</span>
28
+ <span v-else-if="scope.row.special === true" style="color:red">{{ i18nTaskName(scope.row) +'['+$t('workflowHistoryList.specailText')+']' }}</span>
29
+ </template>
30
+ </el-table-column>
31
+ <el-table-column :label="$t('workflowHistoryList.operator')" align="left" width="250">
32
+ <template slot-scope="scope">
33
+ <span v-if="scope.row.historyType && scope.row.historyType ==='PROCESS_END'" />
34
+ <span v-else>{{ scope.row.creatorName }}</span>
35
+ </template>
36
+ </el-table-column>
37
+ <el-table-column :label="$t('workflowHistoryList.operatorLg')" align="left" width="250">
38
+ <template slot-scope="scope">
39
+ <span v-if="scope.row.historyType && scope.row.historyType ==='PROCESS_END'" />
40
+ <span v-else>{{ scope.row.creator }}</span>
41
+ </template>
42
+ </el-table-column>
43
+ <el-table-column :label="$t('workflowHistoryList.operatorDept')" align="left" width="150">
44
+ <template slot-scope="scope">
45
+ <span v-if="scope.row.historyType && scope.row.historyType ==='PROCESS_END'" />
46
+ <span v-else>{{ scope.row.departmentName }}</span>
47
+ </template>
48
+ </el-table-column>
49
+ <el-table-column :label="$t('workflowHistoryList.operationTime')" align="left" width="200">
50
+ <template slot-scope="scope">
51
+ <span v-if="scope.row.historyType && scope.row.historyType ==='PROCESS_END'" />
52
+ <span v-else>{{ scope.row.formatCreatedTime }}</span>
53
+ </template>
54
+ </el-table-column>
55
+ <el-table-column :label="$t('workflowHistoryList.operation')" align="left" width="400">
56
+ <template slot-scope="scope">
57
+ <span v-if="scope.row.historyType && scope.row.historyType ==='PROCESS_END'" />
58
+ <span v-else-if="scope.row.current" style="color:#E6A23C">{{ scope.row.transactionResult }} {{ $t('workflowHistoryList.toDoText') }}</span>
59
+ <span v-else>{{ i18nOperation(scope.row) }}</span>
60
+ </template>
61
+ </el-table-column>
62
+ <el-table-column :label="$t('workflowHistoryList.opinion')" align="left" width="400">
63
+ <template slot-scope="scope">
64
+ <span v-if="scope.row.historyType && scope.row.historyType ==='PROCESS_END'" />
65
+ <span v-else>{{ scope.row.opinion }}</span>
66
+ </template>
67
+ </el-table-column>
68
+ </el-table>
69
+ </template>
70
+
71
+ <script>
72
+ import Vue from 'vue'
73
+ import { i18nOperation } from '../../../src/utils/workflow-util'
74
+ import { getLanguageWithLocale } from '../../../src/utils/util'
75
+ import ApiJs from './api'
76
+ export default {
77
+ name: 'WorkflowHistoryList',
78
+ props: {
79
+ workflowId: {
80
+ type: Number,
81
+ default: null
82
+ },
83
+ // 流转历史列表,在图形流转历史中查看子流程流转历史需要使用
84
+ historyList: {
85
+ type: Array,
86
+ default: null
87
+ },
88
+ // 主子流程的国际化配置
89
+ allProcessI18n: {
90
+ type: Object,
91
+ default: null
92
+ }
93
+ },
94
+ data() {
95
+ let histories = null
96
+ if (this.historyList && this.historyList.length > 0) {
97
+ histories = [].concat(this.historyList)
98
+ }
99
+ return {
100
+ loaded: false,
101
+ histories,
102
+ processI18n: null,
103
+ processNameI18n: null,
104
+ tableHeight: null
105
+ }
106
+ },
107
+ computed: {
108
+
109
+ },
110
+ provide() {
111
+ return {
112
+ }
113
+ },
114
+ created() {
115
+ this.getI18nSet().then(processI18n => {
116
+ this.processI18n = processI18n
117
+ if (!this.histories || this.histories === null) {
118
+ this.getData()
119
+ } else {
120
+ this.loaded = true
121
+ }
122
+ })
123
+ },
124
+ mounted() {
125
+ this.$nextTick(() => {
126
+ this.tableHeight = window.innerHeight - 120
127
+ })
128
+ },
129
+ methods: {
130
+ ...ApiJs,
131
+ getData() {
132
+ this.$http.get(Vue.prototype.baseAPI + '/wf-editor/instance-histories/' + this.workflowId).then(data => {
133
+ this.histories = data.histories
134
+ if (data && data.currentTasks) {
135
+ this.histories = this.histories.concat(data.currentTasks)
136
+ }
137
+ this.loaded = true
138
+ }).catch(error => {
139
+ console.log(error)
140
+ this.loaded = true
141
+ })
142
+ },
143
+ getI18nSet() {
144
+ return new Promise((resolve, reject) => {
145
+ if (this.allProcessI18n) {
146
+ resolve(this.allProcessI18n)
147
+ } else {
148
+ this.$http.get(Vue.prototype.baseAPI + '/wf-editor/i18n-settings/get-bundle-info?workflowId=' + this.workflowId).then((processI18n) => {
149
+ resolve(processI18n)
150
+ }).catch((error) => {
151
+ reject(error)
152
+ })
153
+ }
154
+ })
155
+ },
156
+ i18nOperation(row) {
157
+ let oneProcessI18n
158
+ let processNameI18n
159
+ const language = getLanguageWithLocale()
160
+ const bundleCode = row.bundleCode
161
+ if (bundleCode && bundleCode !== '' && this.processI18n) {
162
+ oneProcessI18n = this.processI18n[bundleCode]
163
+ }
164
+ if (oneProcessI18n && oneProcessI18n['processName']) {
165
+ processNameI18n = oneProcessI18n['processName'][language]
166
+ }
167
+ return i18nOperation(row, processNameI18n, oneProcessI18n, language)
168
+ },
169
+ i18nTaskName(row) {
170
+ let oneProcessI18n
171
+ const bundleCode = row.bundleCode
172
+ if (bundleCode && bundleCode !== '' && this.processI18n) {
173
+ oneProcessI18n = this.processI18n[bundleCode]
174
+ }
175
+ let taskName = null
176
+ // if (!bundleCode && this.processI18n && Object.keys(this.processI18n).length === 1) {
177
+ // // 表示是主流程的国际化配置
178
+ // const bundleCodes = Object.keys(this.processI18n)
179
+ // oneProcessI18n = this.processI18n[bundleCodes[0]]
180
+ // }
181
+ const i18nKey = row.i18nKey
182
+ if (i18nKey && oneProcessI18n && oneProcessI18n[i18nKey]) {
183
+ // 根据locale获得语言编码,例如:cn->zh_CN,en->en_US
184
+ const language = getLanguageWithLocale()
185
+ taskName = oneProcessI18n[i18nKey][language]
186
+ }
187
+ if (!taskName || taskName === null) {
188
+ taskName = row.taskName
189
+ }
190
+ return taskName
191
+ },
192
+ getChildren(row, treeNode, resolve) {
193
+ resolve(row.children)
194
+ }
195
+ }
196
+ }
197
+ </script>
@@ -0,0 +1,6 @@
1
+ import WorkgroupTree from './src/workgroup-tree.vue'
2
+ WorkgroupTree.install = function(Vue) {
3
+ Vue.component(WorkgroupTree.name, WorkgroupTree)
4
+ }
5
+
6
+ export default WorkgroupTree