imatrix-ui 0.0.15 → 0.1.1-up

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 (171) hide show
  1. package/.vscode/extensions.json +3 -0
  2. package/README.md +7 -0
  3. package/components/dynamic-source-select/dynamic-source-select-service.js +106 -0
  4. package/components/dynamic-source-select/dynamic-source-select.vue +673 -0
  5. package/components/dynamic-source-select/events.js +77 -0
  6. package/components/fs-preview/fs-preview.vue +287 -0
  7. package/components/index.js +26 -0
  8. package/components/plugins/export-data-new.js +623 -0
  9. package/components/plugins/export-data.js +431 -0
  10. package/components/plugins/index.js +15 -0
  11. package/components/plugins/public-method.js +47 -0
  12. package/components/rich-editor/index-bak.vue +306 -0
  13. package/components/rich-editor/index.vue +236 -0
  14. package/components/rich-editor/langs/zh-Hans.js +438 -0
  15. package/components/rich-editor/viewer.vue +105 -0
  16. package/components/super-grid/apis.js +1065 -0
  17. package/components/super-grid/columns-config.vue +430 -0
  18. package/components/super-grid/custom-formatter.js +330 -0
  19. package/components/super-grid/dynamic-input.vue +1706 -0
  20. package/components/super-grid/eventBus.js +2 -0
  21. package/components/super-grid/events.js +56 -0
  22. package/components/super-grid/formValidatorUtil.js +300 -0
  23. package/components/super-grid/formatter.js +190 -0
  24. package/components/super-grid/group-column.vue +100 -0
  25. package/components/super-grid/header-context-menu.vue +82 -0
  26. package/components/super-grid/index-column.vue +69 -0
  27. package/components/super-grid/normal-column.vue +1148 -0
  28. package/components/super-grid/public-methods.js +30 -0
  29. package/components/super-grid/row-operation.vue +193 -0
  30. package/components/super-grid/search-button.vue +74 -0
  31. package/components/super-grid/search-condition-input.vue +73 -0
  32. package/components/super-grid/search-condition-list.vue +68 -0
  33. package/components/super-grid/search-form-advancedQuery.vue +820 -0
  34. package/components/super-grid/search-form-dialog.vue +77 -0
  35. package/components/super-grid/search-form-item.vue +470 -0
  36. package/components/super-grid/search-form-number.vue +111 -0
  37. package/components/super-grid/search-form-open.vue +178 -0
  38. package/components/super-grid/search-form-ordinarySearch.vue +218 -0
  39. package/components/super-grid/search-form.vue +756 -0
  40. package/components/super-grid/search-methods.js +484 -0
  41. package/components/super-grid/selection-column.vue +46 -0
  42. package/components/super-grid/store.js +3 -0
  43. package/components/super-grid/super-grid-service.js +682 -0
  44. package/components/super-grid/super-grid.vue +2893 -0
  45. package/components/super-grid/utils.js +851 -0
  46. package/components/super-grid/view-image-dialog.vue +173 -0
  47. package/components/utils/gogocodeTransfer.js +59 -0
  48. package/components/utils/utils.js +180 -0
  49. package/components/utils/value-set.js +98 -0
  50. package/components/z-test-utton/index.vue +82 -0
  51. package/package.json +29 -40
  52. package/public/index.html +13 -0
  53. package/public/vite.svg +1 -0
  54. package/src/api/sso-service.js +172 -19
  55. package/src/api/tab.js +36 -0
  56. package/src/api/user-service.js +11 -11
  57. package/src/assets/401/401.gif +0 -0
  58. package/src/assets/404/404-cloud.png +0 -0
  59. package/src/assets/404/404.png +0 -0
  60. package/src/assets/cloud.png +0 -0
  61. package/src/directives/permission/index.js +13 -13
  62. package/src/directives/permission/permission.js +20 -15
  63. package/src/i18n/i18n.js +16 -0
  64. package/src/i18n/langs/cn.js +254 -0
  65. package/src/i18n/langs/en.js +264 -0
  66. package/src/permission.js +157 -71
  67. package/src/plugins.js +18 -18
  68. package/src/router/index.js +96 -69
  69. package/src/store/getters.js +15 -10
  70. package/src/store/index.js +19 -19
  71. package/src/store/modules/app.js +54 -42
  72. package/src/store/modules/permission.js +137 -73
  73. package/src/store/modules/tab-content.js +36 -0
  74. package/src/store/modules/user.js +293 -80
  75. package/src/styles/display-layout.scss +34 -0
  76. package/src/styles/element-ui.scss +29 -29
  77. package/src/styles/index.scss +157 -78
  78. package/src/styles/mixin.scss +27 -27
  79. package/src/styles/theme/black/font-style.scss +70 -0
  80. package/src/styles/theme/black/index.scss +306 -0
  81. package/src/styles/theme/black/sidebar.scss +189 -0
  82. package/src/styles/theme/blue/font-style.scss +46 -0
  83. package/src/styles/theme/blue/index.scss +172 -0
  84. package/src/styles/{sidebar.scss → theme/blue/sidebar.scss} +171 -141
  85. package/src/styles/theme/blue2/font-style.scss +70 -0
  86. package/src/styles/theme/blue2/index.scss +188 -0
  87. package/src/styles/theme/blue2/sidebar.scss +201 -0
  88. package/src/styles/theme/dark-blue/button.scss +9 -0
  89. package/src/styles/theme/dark-blue/card.scss +62 -0
  90. package/src/styles/theme/dark-blue/checkbox.scss +10 -0
  91. package/src/styles/theme/dark-blue/dark-blue-var.scss +8 -0
  92. package/src/styles/theme/dark-blue/dialog.scss +21 -0
  93. package/src/styles/theme/dark-blue/element-variables.scss +7 -0
  94. package/src/styles/theme/dark-blue/font.scss +71 -0
  95. package/src/styles/theme/dark-blue/form.scss +51 -0
  96. package/src/styles/theme/dark-blue/index.scss +269 -0
  97. package/src/styles/theme/dark-blue/input.scss +15 -0
  98. package/src/styles/theme/dark-blue/message.scss +8 -0
  99. package/src/styles/theme/dark-blue/pagination.scss +14 -0
  100. package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
  101. package/src/styles/theme/dark-blue/sidebar.scss +266 -0
  102. package/src/styles/theme/dark-blue/tab.scss +83 -0
  103. package/src/styles/theme/dark-blue/table.scss +60 -0
  104. package/src/styles/theme/dark-blue/tree.scss +31 -0
  105. package/src/styles/theme/dark-blue/var.scss +1028 -0
  106. package/src/styles/theme/gray/card-style.scss +54 -0
  107. package/src/styles/theme/gray/font-style.scss +70 -0
  108. package/src/styles/theme/gray/index.scss +172 -0
  109. package/src/styles/theme/gray/input-style.scss +19 -0
  110. package/src/styles/theme/gray/scrollbar-style.scss +32 -0
  111. package/src/styles/theme/gray/sidebar.scss +231 -0
  112. package/src/styles/theme/gray/tab-style.scss +81 -0
  113. package/src/styles/transition.scss +47 -46
  114. package/src/utils/auth-api.js +159 -0
  115. package/src/utils/auth.js +61 -15
  116. package/src/utils/calculator/calculator-factory-wf.js +558 -0
  117. package/src/utils/calculator/calculator-factory.js +145 -0
  118. package/src/utils/calculator/calculator-util.js +166 -0
  119. package/src/utils/common-util.js +305 -0
  120. package/src/utils/eventBus.js +2 -0
  121. package/src/utils/iconUtils.js +28 -0
  122. package/src/utils/index.js +102 -86
  123. package/src/utils/jump-page-utils.js +814 -0
  124. package/src/utils/local-storage.js +33 -31
  125. package/src/utils/menu.js +19 -0
  126. package/src/utils/permission.js +31 -26
  127. package/src/utils/permissionAuth.js +90 -0
  128. package/src/utils/range-selector.js +188 -0
  129. package/src/utils/request.js +270 -116
  130. package/src/utils/restful-interface-utils.js +57 -0
  131. package/src/utils/util.js +698 -0
  132. package/src/utils/validate.js +34 -33
  133. package/src/utils/watermark.js +108 -0
  134. package/src/utils/workflow-util.js +93 -0
  135. package/src/views/404.vue +248 -228
  136. package/src/views/dsc-component/Sidebar/Item.vue +84 -0
  137. package/src/views/dsc-component/Sidebar/Link.vue +38 -0
  138. package/src/views/dsc-component/Sidebar/SidebarItem.vue +196 -0
  139. package/src/views/dsc-component/Sidebar/index.vue +220 -0
  140. package/src/views/dsc-component/tabs/tab-content.vue +199 -0
  141. package/src/views/error-page/401.vue +106 -91
  142. package/src/views/error-page/404.vue +248 -228
  143. package/src/views/layout/EmptyLayout.vue +3 -0
  144. package/src/views/layout/Layout.vue +81 -68
  145. package/src/views/layout/NewLayout.vue +18 -0
  146. package/src/views/layout/components/AppMain.vue +39 -29
  147. package/src/views/layout/components/Breadcrumb/index.vue +156 -0
  148. package/src/views/layout/components/Menubar/Item.vue +57 -0
  149. package/src/views/layout/components/Menubar/Link.vue +38 -0
  150. package/src/views/layout/components/Menubar/SidebarItem.vue +164 -0
  151. package/src/views/layout/components/Menubar/index.vue +210 -0
  152. package/src/views/layout/components/Sidebar/Item.vue +53 -29
  153. package/src/views/layout/components/Sidebar/Link.vue +38 -39
  154. package/src/views/layout/components/Sidebar/SidebarItem.vue +135 -100
  155. package/src/views/layout/components/Sidebar/index.vue +141 -48
  156. package/src/views/layout/components/iframe-page.vue +38 -0
  157. package/src/views/layout/components/index.js +4 -3
  158. package/src/views/layout/components/tabs/tab-content.vue +207 -0
  159. package/src/views/layout/mixin/ResizeHandler.js +41 -41
  160. package/src/views/layout/tab-content-iframe-index.vue +38 -0
  161. package/src/views/layout/tab-content-index.vue +93 -0
  162. package/src/views/login/authredirect.vue +10 -10
  163. package/src/views/login/index.vue +296 -203
  164. package/src/views/login/update-password.vue +243 -0
  165. package/src/views/redirect/index.vue +14 -12
  166. package/src/views/wf-history/tache-subprocess-history.vue +45 -0
  167. package/vite.config.js +31 -0
  168. package/lib/super-ui.css +0 -1
  169. package/lib/super-ui.umd.min.js +0 -2
  170. package/src/styles/variables.scss +0 -4
  171. package/src/views/layout/components/Navbar.vue +0 -92
@@ -0,0 +1,178 @@
1
+ <template>
2
+ <div>
3
+ <div class="grid-search-row">
4
+ <el-row v-for="r of rowNum" v-show="myOpen || r === 1" :key="r">
5
+ <el-col
6
+ v-for="n of fieldNum"
7
+ :key="n"
8
+ :xs="spanNum"
9
+ :sm="spanNum"
10
+ :md="spanNum"
11
+ :lg="spanNum"
12
+ :xl="spanNum"
13
+ >
14
+ <template
15
+ v-if="fieldNum * (r - 1) + (n - 1) < searchableColumns.length"
16
+ >
17
+ <!--初始进入台账页面时 或 展开时显示按钮--->
18
+ <search-form-item
19
+ v-show="(!myOpen && r === 1 && n < fieldNum) || myOpen"
20
+ :search-form="searchForm"
21
+ :column="searchableColumns[fieldNum * (r - 1) + (n - 1)]"
22
+ :code="code"
23
+ :is-sql="isSql"
24
+ :table-name="tableName"
25
+ :is-join-table="isJoinTable"
26
+ />
27
+ </template>
28
+ <!--初始进入台账页面时 或 展开时显示按钮--->
29
+ <search-button
30
+ v-if="
31
+ (!myOpen && r === 1 && n === fieldNum) ||
32
+ (myOpen && !isButtonNewRow && r === rowNum && n === fieldNum)
33
+ "
34
+ ref="searchBtnOpen"
35
+ :is-open="myOpen"
36
+ @submit-form="$emit('submit-form')"
37
+ @reset-form="$emit('reset-form')"
38
+ @save-condition="$emit('save-condition')"
39
+ @open-fold="openFold"
40
+ />
41
+ </el-col>
42
+ </el-row>
43
+ </div>
44
+ <!--按钮单独一行放置时--->
45
+ <el-row v-if="isShowNewBtnRow">
46
+ <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
47
+ <search-button
48
+ ref="searchBtnOpen"
49
+ :is-open="myOpen"
50
+ @submit-form="$emit('submit-form')"
51
+ @reset-form="$emit('reset-form')"
52
+ @save-condition="$emit('save-condition')"
53
+ @open-fold="openFold"
54
+ />
55
+ </el-col>
56
+ </el-row>
57
+ </div>
58
+ </template>
59
+ <script>
60
+ import searchMethods from './search-methods'
61
+ import SearchFormItem from './search-form-item.vue'
62
+ import SearchButton from './search-button.vue'
63
+ export default {
64
+ name: 'SearchFormOpen',
65
+ components: {
66
+ SearchFormItem,
67
+ SearchButton,
68
+ },
69
+ props: {
70
+ // 第一行的字段集合
71
+ searchableColumns: {
72
+ type: Array,
73
+ default: null,
74
+ },
75
+ // 查询表单信息
76
+ searchForm: {
77
+ type: Object,
78
+ default: null,
79
+ },
80
+ code: {
81
+ type: String,
82
+ default: null,
83
+ },
84
+ isSql: {
85
+ type: Boolean,
86
+ default: false,
87
+ },
88
+ tableName: {
89
+ type: String,
90
+ default: null,
91
+ },
92
+ isJoinTable: {
93
+ type: Boolean,
94
+ default: false,
95
+ },
96
+ spanNum: {
97
+ type: Number,
98
+ default: 8,
99
+ },
100
+ // 每行几个字段
101
+ fieldNum: {
102
+ type: Number,
103
+ default: null,
104
+ },
105
+ // 一共多少行
106
+ rowNum: {
107
+ type: Number,
108
+ default: null,
109
+ },
110
+ // 查询条件是否展开
111
+ isOpen: {
112
+ type: Boolean,
113
+ default: false,
114
+ },
115
+ },
116
+ data() {
117
+ let isButtonNewRow = false
118
+ let isShowNewBtnRow = false
119
+ if (
120
+ this.searchableColumns.length % this.fieldNum === 0 ||
121
+ this.rowNum > 6
122
+ ) {
123
+ // 表示查询字段正好占满行,或行数大于6时,需要另起一行放查询按钮
124
+ isButtonNewRow = true
125
+ isShowNewBtnRow = true
126
+ }
127
+ if (isButtonNewRow && !myOpen) {
128
+ // 需要另起一行,但是当前是收起状态,暂不显示最后一行按钮
129
+ isShowNewBtnRow = false
130
+ }
131
+ const myOpen = this.isOpen
132
+ return {
133
+ isButtonNewRow,
134
+ isShowNewBtnRow,
135
+ myOpen,
136
+ }
137
+ },
138
+ watch: {
139
+ myOpen() {
140
+ if (this.isButtonNewRow) {
141
+ if (!this.myOpen) {
142
+ // 需要另起一行,但是当前是收起状态,暂不显示最后一行按钮
143
+ this.isShowNewBtnRow = false
144
+ } else {
145
+ // 需要另起一行,当前是展开状态,显示最后一行按钮
146
+ this.isShowNewBtnRow = true
147
+ }
148
+ }
149
+ },
150
+ },
151
+ methods: {
152
+ ...searchMethods,
153
+ openFold(isOpen) {
154
+ this.myOpen = isOpen
155
+ this.$emit('open-fold', isOpen)
156
+ },
157
+ // 查询完毕
158
+ searchComplete() {
159
+ if (this.$refs.searchBtnOpen) {
160
+ if (Array.isArray(this.$refs.searchBtnOpen)) {
161
+ if (this.$refs.searchBtnOpen.length > 0) {
162
+ this.$refs.searchBtnOpen[0].searchComplete()
163
+ }
164
+ } else {
165
+ this.$refs.searchBtnOpen.searchComplete()
166
+ }
167
+ }
168
+ },
169
+ },
170
+ }
171
+ </script>
172
+
173
+ <style scoped>
174
+ .grid-search-row {
175
+ overflow: auto;
176
+ max-height: 320px;
177
+ }
178
+ </style>
@@ -0,0 +1,218 @@
1
+ <template>
2
+ <div>
3
+ <el-form
4
+ v-if="searchableColumns.length > 0"
5
+ ref="searchForm"
6
+ :model="searchForm"
7
+ :rules="rules"
8
+ label-position="right"
9
+ class="grid-search-form"
10
+ size="small"
11
+ >
12
+ <search-form-open
13
+ ref="searchFormContent"
14
+ :searchable-columns="searchableColumns"
15
+ :search-form="searchForm"
16
+ :code="code"
17
+ :is-sql="isSql"
18
+ :table-name="tableName"
19
+ :is-join-table="isJoinTable"
20
+ :span-num="spanNum"
21
+ :field-num="fieldNum"
22
+ :row-num="rowNum"
23
+ :is-open="isOpen"
24
+ @submit-form="$emit('submit-form')"
25
+ @reset-form="$emit('reset-form')"
26
+ @save-condition="$emit('save-condition')"
27
+ @open-fold="openFold"
28
+ />
29
+ </el-form>
30
+ </div>
31
+ </template>
32
+
33
+ <script>
34
+ import { $on, $off, $once, $emit } from '../utils/gogocodeTransfer'
35
+ import searchMethods from './search-methods'
36
+ import store from './store'
37
+ import { addDynamicProp, addDynamicPropDateSection } from './utils'
38
+ import SearchFormOpen from './search-form-open.vue'
39
+ import eventBus from '../../src/utils/eventBus'
40
+ export default {
41
+ name: 'SearchForm',
42
+ components: {
43
+ SearchFormOpen,
44
+ },
45
+ props: {
46
+ searchableColumns: {
47
+ type: Array,
48
+ default: null,
49
+ },
50
+ searchForm: {
51
+ type: Object,
52
+ default: null,
53
+ },
54
+ fieldNum: {
55
+ type: Number,
56
+ default: null,
57
+ },
58
+ rules: {
59
+ type: Object,
60
+ default: null,
61
+ },
62
+ labelWidth: {
63
+ type: String,
64
+ default: null,
65
+ },
66
+ query: {
67
+ type: Object,
68
+ default: null,
69
+ },
70
+ rowNum: {
71
+ type: Number,
72
+ default: null,
73
+ },
74
+ code: {
75
+ type: String,
76
+ default: null,
77
+ },
78
+ isSql: {
79
+ type: Boolean,
80
+ default: false,
81
+ },
82
+ spanNum: {
83
+ type: Number,
84
+ default: 8,
85
+ },
86
+ },
87
+ data() {
88
+ const gridParams = store.get(this.code)
89
+ let tableName
90
+ if (gridParams && gridParams.basicInfo && gridParams.basicInfo.tableName) {
91
+ tableName = gridParams.basicInfo.tableName
92
+ }
93
+ let isHasJoinTable
94
+ if (
95
+ gridParams &&
96
+ gridParams.basicInfo &&
97
+ gridParams.basicInfo.hasJoinTable
98
+ ) {
99
+ isHasJoinTable = gridParams.basicInfo.hasJoinTable
100
+ }
101
+ const customComponentNames = new Set()
102
+ return {
103
+ customComponentNames: customComponentNames,
104
+ dateOne: null,
105
+ dataTwo: null,
106
+ tableName,
107
+ isJoinTable: isHasJoinTable, // 是否是关联表
108
+ isOpen: false,
109
+ }
110
+ },
111
+ computed: {},
112
+ watch: {},
113
+ created() {},
114
+ methods: {
115
+ ...searchMethods,
116
+ validateForm() {
117
+ return new Promise((resolve, reject) => {
118
+ this.$refs.searchForm.validate((valid) => {
119
+ resolve(valid)
120
+ })
121
+ })
122
+ },
123
+ resetForm() {
124
+ $emit(eventBus, 'remoteMethod')
125
+ // console.log('customComponentNames=', this.customComponentNames)
126
+ if (this.customComponentNames && this.customComponentNames.length > 0) {
127
+ for (const componentName of this.customComponentNames) {
128
+ // 遍历
129
+ this.$refs[componentName][0].resetField()
130
+ }
131
+ }
132
+ this.$refs.searchForm.resetFields()
133
+ // 当是保持页数默认赋值的查询字段resetFields()不会被清空,需要下面的方法遍历设未null
134
+ this.searchableColumns.forEach((column) => {
135
+ // 表示没有默认初始查询字段
136
+ if (column.prop && column.prop.indexOf('.') > 0) {
137
+ if (column.componentType === 'dateSection') {
138
+ addDynamicPropDateSection(this.searchForm, column.prop)
139
+ } else {
140
+ // 动态给searchForm添加属性,包括多级嵌套属性,属性的初始值都为 null
141
+ addDynamicProp(this.searchForm, column.prop)
142
+ }
143
+ } else {
144
+ if (column.componentType === 'dateSection') {
145
+ this.searchForm[column.prop] = [new Date(), new Date()]
146
+ } else if (column.componentType === 'yearRange') {
147
+ this.searchForm[column.prop][0] = ''
148
+ this.searchForm[column.prop][1] = ''
149
+ } else if (
150
+ column.componentType === 'inputNumber' &&
151
+ this.searchForm[column.prop]
152
+ ) {
153
+ this.searchForm[column.prop][0] = 0
154
+ this.searchForm[column.prop][1] = 0
155
+ } else {
156
+ this.searchForm[column.prop] = null
157
+ }
158
+ }
159
+ })
160
+ // 取消当前选中的条件列表的信息
161
+ // this.$refs.searchConditionList.editConditionId = null
162
+ // this.$emit('reset')
163
+ },
164
+ openFold(isOpen) {
165
+ this.isOpen = isOpen
166
+ $emit(this, 'open-fold', isOpen)
167
+ },
168
+ // 查询完毕
169
+ searchComplete() {
170
+ if (this.$refs.searchFormContent) {
171
+ this.$refs.searchFormContent.searchComplete()
172
+ }
173
+ },
174
+ },
175
+ emits: [
176
+ 'submit-form',
177
+ 'reset-form',
178
+ 'save-condition',
179
+ 'open-fold',
180
+ 'remoteMethod',
181
+ ,
182
+ ,
183
+ 'submit-form',
184
+ 'reset-form',
185
+ 'save-condition',
186
+ ],
187
+ }
188
+ </script>
189
+
190
+ <style scoped>
191
+ .grid-search-form {
192
+ overflow: auto;
193
+ }
194
+ .grid-search-form >>> .el-form-item {
195
+ margin-bottom: 0px;
196
+ }
197
+ .grid-search-form >>> .el-form-item__label {
198
+ overflow: hidden;
199
+ text-overflow: ellipsis;
200
+ white-space: nowrap;
201
+ word-break: keep-all;
202
+ }
203
+ .grid-search-form >>> .search-btn {
204
+ margin-bottom: 5px;
205
+ text-align: center;
206
+ }
207
+ .grid-search-form >>> .el-select,
208
+ .grid-search-form >>> .customComponent {
209
+ width: 100%;
210
+ }
211
+ .grid-search-form >>> .el-row {
212
+ padding-right: 24px;
213
+ }
214
+ .grid-search-form >>> .el-col {
215
+ padding-left: 24px;
216
+ padding-bottom: 16px;
217
+ }
218
+ </style>