imatrix-ui 2.9.13-dw → 2.9.14-boe2

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 (186) hide show
  1. package/lib/super-ui.css +1 -1
  2. package/lib/super-ui.umd.min.js +5 -35
  3. package/package.json +2 -2
  4. package/src/api/sso-service.js +19 -1
  5. package/src/assets/nonemessage.png +0 -0
  6. package/src/i18n/i18n.js +1 -1
  7. package/src/i18n/langs/cn.js +18 -6
  8. package/src/i18n/langs/en.js +20 -7
  9. package/src/permission.js +2 -2
  10. package/src/plugins.js +3 -3
  11. package/src/router/index.js +10 -0
  12. package/src/store/modules/tab-content.js +6 -0
  13. package/src/store/modules/user.js +32 -2
  14. package/src/styles/index.scss +74 -4
  15. package/src/styles/theme/black/font-style.scss +70 -0
  16. package/src/styles/theme/black/index.scss +6 -30
  17. package/src/styles/theme/blue/font-style.scss +37 -0
  18. package/src/styles/theme/blue/index.scss +2 -18
  19. package/src/styles/theme/blue2/font-style.scss +70 -0
  20. package/src/styles/theme/blue2/index.scss +3 -13
  21. package/src/styles/theme/dark-blue/card.scss +4 -6
  22. package/src/styles/theme/dark-blue/index.scss +28 -3
  23. package/src/styles/theme/dark-blue/message.scss +8 -0
  24. package/src/styles/theme/dark-blue/radio.scss +13 -0
  25. package/src/styles/theme/dark-blue/sidebar.scss +7 -37
  26. package/src/styles/theme/dark-blue/table.scss +1 -1
  27. package/src/styles/theme/dark-blue/tree.scss +35 -10
  28. package/src/styles/theme/gray/card-style.scss +13 -1
  29. package/src/styles/theme/gray/font-style.scss +38 -0
  30. package/src/styles/theme/gray/index.scss +13 -25
  31. package/src/styles/theme/gray/scrollbar-style.scss +32 -0
  32. package/src/styles/theme/gray/sidebar.scss +7 -14
  33. package/src/utils/auth-api.js +45 -1
  34. package/src/utils/common-util.js +21 -81
  35. package/src/utils/jump-page-utils.js +1 -2
  36. package/src/utils/range-selector.js +185 -0
  37. package/src/utils/request.js +6 -3
  38. package/src/utils/util.js +13 -11
  39. package/src/views/dsc-component/Sidebar/Item.vue +7 -5
  40. package/src/views/dsc-component/Sidebar/SidebarItem.vue +2 -3
  41. package/src/views/dsc-component/Sidebar/index.vue +12 -20
  42. package/src/views/dsc-component/tabs/tab-content.vue +1 -5
  43. package/src/views/layout/NewLayout.vue +6 -65
  44. package/src/views/layout/components/Menubar/Item.vue +23 -7
  45. package/src/views/layout/components/Menubar/Link.vue +11 -2
  46. package/src/views/layout/components/Menubar/SidebarItem.vue +50 -7
  47. package/src/views/layout/components/Menubar/index.vue +51 -16
  48. package/src/views/layout/components/tabs/tab-content.vue +160 -0
  49. package/src/views/layout/tab-content-iframe-index.vue +31 -0
  50. package/src/views/layout/tab-content-index.vue +85 -0
  51. package/src/views/login/index.vue +1 -1
  52. package/packages/breadcrumb/index.js +0 -6
  53. package/packages/breadcrumb/src/breadcrumb.vue +0 -71
  54. package/packages/department-tree/index.js +0 -6
  55. package/packages/department-tree/src/department-tree.vue +0 -108
  56. package/packages/department-tree-inline/index.js +0 -6
  57. package/packages/department-tree-inline/src/department-multi-tree-inline.vue +0 -402
  58. package/packages/department-tree-inline/src/department-single-tree-inline.vue +0 -284
  59. package/packages/department-tree-inline/src/department-tree-inline.vue +0 -86
  60. package/packages/department-tree-inline/src/department-tree-service.js +0 -245
  61. package/packages/department-tree-inline/src/search-result.vue +0 -176
  62. package/packages/department-user-tree/index.js +0 -6
  63. package/packages/department-user-tree/src/department-user-multiple-tree.vue +0 -116
  64. package/packages/department-user-tree/src/department-user-single-tree.vue +0 -76
  65. package/packages/department-user-tree/src/department-user-tree.vue +0 -101
  66. package/packages/department-user-tree-inline/index.js +0 -6
  67. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +0 -626
  68. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +0 -269
  69. package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +0 -79
  70. package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +0 -230
  71. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -122
  72. package/packages/department-user-tree-inline/src/search-result.vue +0 -197
  73. package/packages/directives/prevent-reclick.js +0 -19
  74. package/packages/dynamic-source-select/index.js +0 -6
  75. package/packages/dynamic-source-select/src/dynamic-source-select-service.js +0 -70
  76. package/packages/dynamic-source-select/src/dynamic-source-select.vue +0 -440
  77. package/packages/dynamic-source-select/src/events.js +0 -55
  78. package/packages/fs-preview/index.js +0 -6
  79. package/packages/fs-preview/src/fs-preview.vue +0 -226
  80. package/packages/fs-upload/index.js +0 -6
  81. package/packages/fs-upload/src/fs-upload-multi.vue +0 -420
  82. package/packages/fs-upload/src/fs-upload-single.vue +0 -312
  83. package/packages/fs-upload/src/fs-upload.vue +0 -189
  84. package/packages/fs-upload/src/see-big-picture.vue +0 -55
  85. package/packages/fs-upload-list/index.js +0 -6
  86. package/packages/fs-upload-list/src/fs-upload-list.vue +0 -287
  87. package/packages/hamburger/index.js +0 -6
  88. package/packages/hamburger/src/hamburger.vue +0 -38
  89. package/packages/index.js +0 -121
  90. package/packages/multipart-upload/index.js +0 -6
  91. package/packages/multipart-upload/src/index.vue +0 -73
  92. package/packages/multipart-upload/src/multipart-upload-form.vue +0 -297
  93. package/packages/multipart-upload/src/multipart-upload-list.vue +0 -378
  94. package/packages/organization-input/index.js +0 -6
  95. package/packages/organization-input/src/organization-input.vue +0 -542
  96. package/packages/plugins/export-data-new.js +0 -466
  97. package/packages/plugins/export-data.js +0 -361
  98. package/packages/plugins/index.js +0 -15
  99. package/packages/plugins/public-method.js +0 -43
  100. package/packages/remove-department/index.js +0 -6
  101. package/packages/remove-department/src/remove-department.vue +0 -172
  102. package/packages/remove-department/src/remove-dept-service.js +0 -20
  103. package/packages/remove-user/index.js +0 -6
  104. package/packages/remove-user/src/remove-user-service.js +0 -20
  105. package/packages/remove-user/src/remove-user.vue +0 -195
  106. package/packages/remove-workgroup/index.js +0 -6
  107. package/packages/remove-workgroup/src/remove-workgroup-service.js +0 -20
  108. package/packages/remove-workgroup/src/remove-workgroup.vue +0 -159
  109. package/packages/rich-editor/index.js +0 -7
  110. package/packages/rich-editor/index.vue +0 -278
  111. package/packages/rich-editor/langs/zh-Hans.js +0 -1
  112. package/packages/rich-editor/viewer.vue +0 -103
  113. package/packages/scan-code-input/index.js +0 -6
  114. package/packages/scan-code-input/src/events.js +0 -33
  115. package/packages/scan-code-input/src/scan-code-input-colse.vue +0 -131
  116. package/packages/scan-code-input/src/scan-code-input.vue +0 -116
  117. package/packages/secret-info/index.js +0 -7
  118. package/packages/secret-info/index.vue +0 -90
  119. package/packages/super-grid/index.js +0 -7
  120. package/packages/super-grid/src/apis.js +0 -808
  121. package/packages/super-grid/src/columns-config.vue +0 -335
  122. package/packages/super-grid/src/custom-formatter.js +0 -250
  123. package/packages/super-grid/src/dynamic-input.vue +0 -1279
  124. package/packages/super-grid/src/eventBus.js +0 -2
  125. package/packages/super-grid/src/events.js +0 -55
  126. package/packages/super-grid/src/formValidatorUtil.js +0 -226
  127. package/packages/super-grid/src/formatter.js +0 -181
  128. package/packages/super-grid/src/group-column.vue +0 -100
  129. package/packages/super-grid/src/header-context-menu.vue +0 -87
  130. package/packages/super-grid/src/index-column.vue +0 -51
  131. package/packages/super-grid/src/normal-column.vue +0 -769
  132. package/packages/super-grid/src/public-methods.js +0 -31
  133. package/packages/super-grid/src/row-operation.vue +0 -161
  134. package/packages/super-grid/src/search-button.vue +0 -66
  135. package/packages/super-grid/src/search-condition-input.vue +0 -61
  136. package/packages/super-grid/src/search-condition-list.vue +0 -59
  137. package/packages/super-grid/src/search-form-advancedQuery.vue +0 -653
  138. package/packages/super-grid/src/search-form-dialog.vue +0 -79
  139. package/packages/super-grid/src/search-form-item.vue +0 -400
  140. package/packages/super-grid/src/search-form-number.vue +0 -38
  141. package/packages/super-grid/src/search-form-open.vue +0 -165
  142. package/packages/super-grid/src/search-form-ordinarySearch.vue +0 -191
  143. package/packages/super-grid/src/search-form.vue +0 -637
  144. package/packages/super-grid/src/search-methods.js +0 -454
  145. package/packages/super-grid/src/selection-column.vue +0 -43
  146. package/packages/super-grid/src/store.js +0 -3
  147. package/packages/super-grid/src/super-grid-service.js +0 -562
  148. package/packages/super-grid/src/super-grid.vue +0 -2850
  149. package/packages/super-grid/src/utils.js +0 -762
  150. package/packages/super-grid/src/view-image-dialog.vue +0 -130
  151. package/packages/super-nine-grid/index.js +0 -7
  152. package/packages/super-nine-grid/src/apis.js +0 -103
  153. package/packages/super-nine-grid/src/custom-formatter.js +0 -66
  154. package/packages/super-nine-grid/src/formatter.js +0 -132
  155. package/packages/super-nine-grid/src/search-form-number.vue +0 -38
  156. package/packages/super-nine-grid/src/search-form.vue +0 -430
  157. package/packages/super-nine-grid/src/search-methods.js +0 -134
  158. package/packages/super-nine-grid/src/store.js +0 -3
  159. package/packages/super-nine-grid/src/super-grid-service.js +0 -91
  160. package/packages/super-nine-grid/src/super-nine-grid.vue +0 -872
  161. package/packages/super-nine-grid/src/utils.js +0 -261
  162. package/packages/svg-icon/index.js +0 -6
  163. package/packages/svg-icon/src/svg-icon.vue +0 -43
  164. package/packages/utils/utils.js +0 -152
  165. package/packages/utils/value-set.js +0 -86
  166. package/packages/valid-code/index.js +0 -7
  167. package/packages/valid-code/src/valid-code.vue +0 -95
  168. package/packages/workflow-button/index.js +0 -6
  169. package/packages/workflow-button/src/workflow-button.vue +0 -325
  170. package/packages/workflow-history-list/index.js +0 -6
  171. package/packages/workflow-history-list/src/api.js +0 -7
  172. package/packages/workflow-history-list/src/workflow-history-list.vue +0 -185
  173. package/packages/workgroup-tree/index.js +0 -6
  174. package/packages/workgroup-tree/src/workgroup-tree.vue +0 -76
  175. package/packages/workgroup-tree-inline/index.js +0 -6
  176. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +0 -317
  177. package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +0 -43
  178. package/packages/workgroup-user-tree/index.js +0 -6
  179. package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +0 -100
  180. package/packages/workgroup-user-tree-inline/index.js +0 -6
  181. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +0 -163
  182. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +0 -436
  183. package/packages/year-range-picker/index.js +0 -6
  184. package/packages/year-range-picker/src/year-range-picker.vue +0 -51
  185. package/src/index.js +0 -93
  186. package/src/styles/theme/gray/form-style.scss +0 -41
@@ -1,769 +0,0 @@
1
- <template>
2
- <el-table-column
3
- :fixed="fixed"
4
- :sortable="sortable"
5
- :filters="filters"
6
- :filter-method="filterMethod"
7
- :prop="column.prop"
8
- :width="getColumnWidth()"
9
- :align="align"
10
- :header-align="headerAlign"
11
- :class-name="column.prop"
12
- >
13
- <template v-slot:header>
14
- <span :class="{is_req: isFieldRequired()}"><span class="cell--span required__label" :title="$escapeHtml(label)" v-html="$escapeHtml(label)" /></span>
15
- <i
16
- v-if="isShowAdd"
17
- class="el-icon-circle-plus-outline"
18
- style="font-size:20px;color:#409EFF"
19
- @click="createFormSubTableRow"
20
- />
21
- </template>
22
- <template slot-scope="scope">
23
- <!--添加:key="column.prop+'_'+scope.$index"是为了解决多行是行编辑状态时新建的记录的文本框内有值的问题-->
24
- <dynamic-input
25
- v-if="lineEdit.editable&& isEditable && scope.row.$editing"
26
- :key="column.prop+'_'+scope.$index"
27
- v-model="scope.row[column.prop]"
28
- :type="column.componentType"
29
- :position="{
30
- row:scope.$index,
31
- prop:column.prop
32
- }"
33
- :line-edit="lineEdit"
34
- :options="column.valueSet"
35
- :row="scope.row"
36
- :column="column"
37
- :list-code="listCode"
38
- :is-sql="isSql"
39
- @findIndex="findIndex(scope.$index)"
40
- @focus="onFocus(scope.$index)"
41
- @refresData="refresData"
42
- @refresPortData="refresPortData"
43
- @refresPortsData="refresPortsData"
44
- @refresMainTableFields="refresMainTableFields"
45
- @prohibitToEdit="prohibitToEdit"
46
- />
47
- <span v-else>
48
- <span v-if="column.operations">
49
- <span v-for="(operation,operationIndex) in column.operations" :key="operationIndex" class="cell--span">
50
- <el-dropdown
51
- v-if="operation.isGroup"
52
- :key="operationIndex"
53
- style="padding-left:10px"
54
- split-button
55
- :size="operation.buttons&&operation.buttons.length>0?operation.buttons[0].props.size:'small'"
56
- @command="handleCommand"
57
- >
58
- {{ $escapeHtml(operation.label) }}
59
- <template v-slot:dropdown>
60
- <el-dropdown-menu>
61
- <span
62
- v-for="(buttonChild,buttonChildIndex) in operation.buttons"
63
- :key="buttonChild.props.code + buttonChildIndex"
64
- >
65
- <el-dropdown-item
66
- v-permission="buttonChild.props.permission"
67
- :command="beforeHandleCommand(buttonChild.props.code, scope.row,scope.$index)"
68
- :disabled="preventReclick"
69
- >
70
- {{ $escapeHtml(buttonChild.props.label?buttonChild.props.label: (buttonChild.props.code==='search'?$t('superPageMessage.searchButtonLabel'):'')) }}
71
- </el-dropdown-item>
72
- </span>
73
- </el-dropdown-menu>
74
- </template>
75
- </el-dropdown>
76
- <row-operation
77
- v-else
78
- :operation-setting="operation.props"
79
- :label="operation.props.label?operation.props.label:scope.row[column.prop]"
80
- :operation-index="operationIndex"
81
- :entity="scope.row"
82
- :editing="scope.row.$editing"
83
- :column="column"
84
- :row-index="scope.$index"
85
- :is-show="operation.isShow"
86
- :on-click="operation.onClick"
87
- />
88
- </span>
89
- </span>
90
- <span v-else-if="customFormatValue(scope.row, column.prop, customFormat, scope.$index)" class="cell--span">
91
- <component :is="column.prop + scope.$index" :row="scope.row" :entity="scope.row" :prop="column.prop" :parent="parentFormData" :row-index="scope.$index" :show-value="$escapeHtml(getLabel(scope.row,scope.$index))" :value="getCellValue(scope.row)" :select-options="column.valueSet" />
92
- </span>
93
- <!-- 自定义格式的时候 -->
94
- <span v-else-if="columnFormatter !== undefined && columnFormatter.type !== undefined && columnFormatter.type === 'customControl' && columnFormatter.options && columnFormatter.options.format && columnFormatter.options.format !== ''" class="cell--span">
95
- <!--:key="column.prop+'_'+scope.$index+'_'+currentPage" 为了解决子表分页时,新增自动跳转到下一页,第一条记录的自定义控件被复用,导致业务逻辑没执行 -->
96
- <component
97
- :is="columnFormatter.options.format"
98
- :key="column.prop+'_'+scope.$index+'_'+currentPage"
99
- :disabled="true"
100
- :row="pageGridData[scope.$index]"
101
- :entity="pageGridData[scope.$index]"
102
- :prop="column.prop"
103
- :parent="parentFormData"
104
- :row-index="scope.$index"
105
- :show-value="$escapeHtml(getLabel(pageGridData[scope.$index],scope.$index))"
106
- :value="getCellValue(pageGridData[scope.$index])"
107
- :select-options="column.valueSet"
108
- :grid-data="gridData"
109
- :page-grid-data="pageGridData"
110
- :current-page="currentPage"
111
- /></span>
112
- <span v-else-if="columnFormatter !== undefined && columnFormatter.type !== undefined && columnFormatter.type === 'secretInfo'" :id="column.prop+'DomData'+scope.$index" class="cell--span">
113
- <secret-info
114
- :entity="scope.row"
115
- :prop="column.prop"
116
- :value="getCellValue(scope.row)"
117
- :table-name="tableName"
118
- :list-code="listCode"
119
- :page-code="pageCode"
120
- :list-name="listName"
121
- :field-label="$escapeHtml(label)"
122
- />
123
- </span>
124
- <span v-else-if="isObjectProp(column.prop)">
125
- <span v-if="column.componentType === 'annex'" type="primary">
126
- <span v-if="isShowOverflowTooltip" :id="column.prop+'DomData'+scope.$index" class="ellipsis cell--span" :title="$escapeHtml(getLabel(scope.row))" :style="{width:cellWidth+'px'}">
127
- <span v-if="$escapeHtml(getLabel(scope.row,scope.$index))">
128
- <i class="el-icon-zoom-in annex-cell" @click="previewImg(scope.row)" />
129
- </span>
130
- {{ $escapeHtml(getLabel(scope.row,scope.$index)) }}
131
- </span>
132
- <span v-else :id="column.prop+'DomData'+scope.$index" class="cell--span">
133
- <span v-if="$escapeHtml(getLabel(scope.row,scope.$index))">
134
- <i class="el-icon-zoom-in annex-cell" @click="previewImg(scope.row)" />
135
- </span>
136
- {{ $escapeHtml(getLabel(scope.row,scope.$index)) }}
137
- </span>
138
- </span>
139
- <span v-else-if="column.formatter && column.formatter.type === 'files'" type="primary">
140
- <span v-if="isShowOverflowTooltip" :id="column.prop+'DomData'+scope.$index" class="ellipsis cell--span" :title="$escapeHtml(getLabel(scope.row))" :style="{width:cellWidth+'px'}">
141
- <span v-if="$escapeHtml(getLabel(scope.row,scope.$index))">
142
- <i class="el-icon-zoom-in annex-cell" @click="previewImg(scope.row)" />
143
- </span>
144
- {{ $escapeHtml(getLabel(scope.row,scope.$index)) }}
145
-
146
- </span>
147
- <span v-else :id="column.prop+'DomData'+scope.$index" class="cell--span">
148
- <span v-if="$escapeHtml(getLabel(scope.row,scope.$index))">
149
- <i class="el-icon-zoom-in annex-cell" @click="previewImg(scope.row)" />
150
- </span>
151
- {{ $escapeHtml(getLabel(scope.row,scope.$index)) }}
152
- </span>
153
- </span>
154
- <el-link v-else-if="columnFormatter !== undefined && columnFormatter.type !== undefined && columnFormatter.type === 'hyperlinks' && getMyHyperLinkSetting(scope.row).visible === true" type="primary" @click="clickHyperLink(column, scope.row, listCode,scope.$index)">
155
- <span v-if="isShowOverflowTooltip" :id="column.prop+'DomData'+scope.$index" class="ellipsis cell--span" :title="getMyHyperLinkSetting(scope.row).title" :style="{width:cellWidth+'px'}">{{ getMyHyperLinkSetting(scope.row).label }}<i v-if="getMyHyperLinkSetting(scope.row).icon" :class="getMyHyperLinkSetting(scope.row).icon" /></span>
156
- <span v-else :id="column.prop+'DomData'+scope.$index" class="cell--span">{{ getMyHyperLinkSetting(scope.row).label }}<i v-if="getMyHyperLinkSetting(scope.row).icon" :class="getMyHyperLinkSetting(scope.row).icon" /></span>
157
- </el-link>
158
- <span v-else-if="isShowOverflowTooltip" :id="column.prop+'DomData'+scope.$index" class="ellipsis cell--span" :title="$escapeHtml(getLabel(scope.row))" :style="{width:cellWidth+'px'}">{{ $escapeHtml(getLabel(scope.row,scope.$index)) }}</span>
159
- <span v-else :id="column.prop+'DomData'+scope.$index" class="cell--span">{{ $escapeHtml(getLabel(scope.row,scope.$index)) }}</span>
160
- </span>
161
- <span v-else>
162
- <span v-if="column.componentType === 'annex'|| column.componentType==='multipartUpload'" type="primary">
163
- <span v-if="isShowOverflowTooltip" :id="column.prop+'DomData'+scope.$index" class="ellipsis cell--span" :title="$escapeHtml(getLabel(scope.row))" :style="{width:cellWidth+'px'}">
164
- <FsPreview
165
- :label="$escapeHtml(getLabel(scope.row,scope.$index))"
166
- :entity="scope.row"
167
- :file-set-obj=" JSON.parse(column.fileSet)"
168
- :is-sql="isSql"
169
- />
170
- </span>
171
- <span v-else :id="column.prop+'DomData'+scope.$index" class="cell--span">
172
- <span v-if="$escapeHtml(getLabel(scope.row,scope.$index))">
173
- <i class="el-icon-zoom-in annex-cell" @click="previewImg(scope.row)" />
174
- </span>
175
- {{ $escapeHtml(getLabel(scope.row,scope.$index)) }}
176
- </span>
177
- </span>
178
- <span v-else-if="column.formatter && column.formatter.type === 'files'">
179
- <span v-if="isShowOverflowTooltip" :id="column.prop+'DomData'+scope.$index" class="ellipsis cell--span" :title="$escapeHtml(getLabel(scope.row))" :style="{width:cellWidth+'px'}">
180
- <span v-if="$escapeHtml(getLabel(scope.row,scope.$index))">
181
- <i class="el-icon-zoom-in annex-cell" @click="previewImg(scope.row)" />
182
- </span>
183
- {{ $escapeHtml(getLabel(scope.row,scope.$index)) }}
184
- </span>
185
- <span v-else :id="column.prop+'DomData'+scope.$index" class="cell--span">
186
- <span v-if="$escapeHtml(getLabel(scope.row,scope.$index))">
187
- <i class="el-icon-zoom-in annex-cell" @click="previewImg(scope.row)" />
188
- </span>
189
- {{ $escapeHtml(getLabel(scope.row,scope.$index)) }}
190
- </span>
191
- </span>
192
- <el-link v-else-if="columnFormatter !== undefined && columnFormatter.type !== undefined && columnFormatter.type === 'hyperlinks' && getMyHyperLinkSetting(scope.row).visible === true" type="primary" @click="clickHyperLink(column, scope.row, listCode,scope.$index)">
193
- <span v-if="isShowOverflowTooltip" :id="column.prop+'DomData'+scope.$index" class="ellipsis cell--span" :title="$escapeHtml(getMyHyperLinkSetting(scope.row).title)" :style="{width:cellWidth+'px'}">{{ $escapeHtml(getMyHyperLinkSetting(scope.row).label) }}<i v-if="getMyHyperLinkSetting(scope.row).icon" :class="getMyHyperLinkSetting(scope.row).icon" /></span>
194
- <span v-else :id="column.prop+'DomData'+scope.$index" class="cell--span">{{ $escapeHtml(getMyHyperLinkSetting(scope.row).label) }}<i v-if="getMyHyperLinkSetting(scope.row).icon" :class="getMyHyperLinkSetting(scope.row).icon" /></span>
195
- </el-link>
196
- <span v-else-if="column.formatter && column.formatter.type === 'richEditor'">
197
- <el-tooltip :content="$t('superGrid.show')" class="item" effect="dark" placement="top">
198
- <em class="fa fa-info-circle annex-cell" @click="showRichEditorContent(scope.row,column,getHeader())" />
199
- </el-tooltip>
200
- </span>
201
- <span v-else-if="isShowOverflowTooltip" :id="column.prop+'DomData'+scope.$index" :title="getLabel(scope.row)" :style="{width:cellWidth+'px'}" style="white-space: pre;" class="ellipsis cell--span" v-html="$escapeHtml(getLabel(scope.row,scope.$index)) " />
202
- <span v-else :id="column.prop+'DomData'+scope.$index" class="cell--span">{{ $escapeHtml(getLabel(scope.row,scope.$index)) }}</span>
203
- </span>
204
- </span>
205
- </template>
206
- <view-image-dialog
207
- v-if="showSingleImgFlag"
208
- :file-list="fileList"
209
- @close="showSingleImgFlag = false"
210
- />
211
- <rich-editor-viewer v-if="showRichEditorViewer" ref="richEditorViewerRef" @closeRichEditorContent="closeRichEditorContent" />
212
- </el-table-column>
213
- </template>
214
- <script>
215
- import { getColumnValues, isRequiredEdit } from './utils'
216
- import DynamicInput from './dynamic-input'
217
- import store from './store'
218
- import { ArrowKeyAction, isHasEditOption, getFileList } from './utils'
219
- import { doFormatWithValueSet } from './formatter'
220
- import customFormatter from './custom-formatter'
221
- import RowOperation from './row-operation'
222
- import apis from './apis'
223
- import { mapGetters } from 'vuex'
224
- import { getEntityFieldValue, getParentObjectUtil } from '../../../src/utils/util'
225
- import ViewImageDialog from './view-image-dialog.vue'
226
- import eventBus from './eventBus'
227
- import { isDynamicDataSourceSource } from './utils'
228
- import FsPreview from '../../fs-preview'
229
- import RichEditorViewer from '../../rich-editor/viewer.vue'
230
- export default {
231
- name: 'NormalColumn',
232
- components: {
233
- DynamicInput,
234
- RowOperation,
235
- ViewImageDialog,
236
- FsPreview,
237
- RichEditorViewer
238
- },
239
- props: {
240
- column: {
241
- type: Object,
242
- default: null
243
- },
244
- customFormat: {
245
- type: Function,
246
- default: null
247
- },
248
- listCode: {
249
- type: String,
250
- default: null
251
- },
252
- isSql: {
253
- type: Boolean,
254
- default: false
255
- },
256
- newWidth: {
257
- type: Number,
258
- default: null
259
- },
260
- dragColumnProp: {
261
- type: String,
262
- default: null
263
- },
264
- tableName: {
265
- type: String,
266
- default: null
267
- },
268
- pageCode: {
269
- type: String,
270
- default: null
271
- },
272
- listName: {
273
- type: String,
274
- default: null
275
- },
276
- currentPage: {
277
- type: Number,
278
- default: 1
279
- },
280
- gridData: {
281
- type: Array,
282
- default: null
283
- },
284
- pageGridData: {
285
- type: Array,
286
- default: null
287
- }
288
- },
289
- data() {
290
- let parentFormData
291
- const gridParams = store.get(this.listCode)
292
- if (gridParams.options.extraParam && gridParams.options.extraParam.entityMap) {
293
- parentFormData = gridParams.options.extraParam.entityMap
294
- }
295
- return {
296
- selectRow: null,
297
- that: this,
298
- align: 'left', // 文本内容对齐
299
- headerAlign: 'left', // 表头对齐方式
300
- columnFormatter: this.column.formatter,
301
- hyperLinks: {},
302
- fileDownType: '',
303
- isFormSubTable: false, // 是否是表单子表
304
- subTableCanAdd: true, // 表单子表时是否有新增权限
305
- isShowAdd: false, // 是否显示表头的新增按钮
306
- cellWidth: null,
307
- parentFormData,
308
- fileMultiple: false, // 附件上传是否多选
309
- showSingleImgFlag: false,
310
- singleImgSrc: '',
311
- fileList: [],
312
- index: null,
313
- isEditable: this.column.editable,
314
- showRichEditorViewer: false
315
-
316
- }
317
- },
318
- computed: {
319
- filters() {
320
- if (this.column.filterable) {
321
- const gridParams = store.get(this.listCode)
322
- const values = getColumnValues(gridParams.gridData, this.column.prop)
323
- const filters = []
324
- for (const value of values) {
325
- filters.push({
326
- text: value,
327
- value
328
- })
329
- }
330
- return filters
331
- } else {
332
- return null
333
- }
334
- },
335
- filterMethod() {
336
- if (this.column.filterable) {
337
- return this.filterHandler
338
- } else {
339
- return null
340
- }
341
- },
342
- fixed() {
343
- if ((this.column.fixed && this.column.fixed === 'false') || this.column.fixed === undefined || this.column.fixed === '') {
344
- return false
345
- }
346
- if (this.column.prop === 'operation' && this.column.fixed && this.column.fixed === 'left') {
347
- // 操作列居右固定
348
- return 'right'
349
- }
350
- return this.column.fixed
351
- },
352
- sortable() {
353
- const gridParams = store.get(this.listCode)
354
- if (gridParams && gridParams.options && gridParams.options.isFormSubTable && gridParams.options.showOperationButton) {
355
- return false
356
- }
357
- if (this.column.sortable === 'false' || this.column.sortable === false || this.column.sortable === '') {
358
- return false
359
- } else if (this.column.sortable === 'true' || this.column.sortable === true) {
360
- return 'custom'
361
- }
362
- if (this.column.sortable) {
363
- return 'custom'
364
- } else {
365
- return false
366
- }
367
- },
368
- lineEdit() {
369
- let isLineEdit = false
370
- if (this.listCode) {
371
- const gridParams = store.get(this.listCode)
372
- if (gridParams.lineEdit !== null && gridParams.lineEdit !== undefined) {
373
- isLineEdit = gridParams.lineEdit
374
- } else {
375
- isLineEdit = false
376
- }
377
- }
378
- return isLineEdit
379
- },
380
-
381
- ...mapGetters([
382
- 'preventReclick'
383
- ])
384
- },
385
- watch: {
386
- isSql: {
387
- handler(newValue, oldValue) {
388
- this.isSql = newValue
389
- }
390
- },
391
- newWidth: {
392
- handler(newValue, oldValue) {
393
- if (newValue !== undefined && newValue !== null && this.dragColumnProp && this.dragColumnProp === this.column.prop) {
394
- this.cellWidth = newValue
395
- }
396
- }
397
- }
398
- },
399
- created() {
400
- if (this.column.width) {
401
- this.cellWidth = this.column.width - 10
402
- }
403
- const gridParams = store.get(this.listCode)
404
- if (gridParams && gridParams.options && gridParams.options.isFormSubTable) {
405
- this.isFormSubTable = gridParams.options.isFormSubTable
406
- }
407
- if (gridParams && gridParams.options && gridParams.options.subTableCanAdd !== undefined && gridParams.options.subTableCanAdd !== null) {
408
- this.subTableCanAdd = gridParams.options.subTableCanAdd
409
- }
410
- if (this.column.prop && this.column.prop === 'operation') {
411
- // 如果是操作列按钮则不显示省略号
412
- this.isShowOverflowTooltip = false
413
- } else {
414
- if (typeof (gridParams.options.showOverflowTooltip) !== 'undefined' && gridParams.options.showOverflowTooltip === false) {
415
- this.isShowOverflowTooltip = false
416
- } else {
417
- this.isShowOverflowTooltip = true
418
- }
419
- }
420
- if (typeof (gridParams.options.align) !== 'undefined') {
421
- this.align = gridParams.options.align
422
- } else if (this.column.contAlign && this.column.contAlign !== '') {
423
- this.align = this.column.contAlign
424
- }
425
- if (typeof (gridParams.options.headerAlign) !== 'undefined') {
426
- this.headerAlign = gridParams.options.headerAlign
427
- } else if (this.column.titleAlign && this.column.titleAlign !== '') {
428
- this.headerAlign = this.column.titleAlign
429
- } else {
430
- // 如果没有配置表头对齐方式,默认使用内容对齐方式
431
- this.headerAlign = 'left'
432
- }
433
- if (gridParams.isHasDynamic === undefined && this.column.dynamic !== undefined && this.column.dynamic === true) {
434
- // 当前列表中有动态列
435
- gridParams.isHasDynamic = true
436
- }
437
- this.label = this.getHeader()
438
- if (this.column.operations) {
439
- // console.log('this.column.operations', this.column.operations)
440
- }
441
- // console.log('gridParams.options.subTableCanAdd=', gridParams.options.subTableCanAdd, 'this.subTableCanAdd=', this.subTableCanAdd)
442
- this.isShowAdd = this.isFormSubTable && this.column.prop === 'operation' && this.subTableCanAdd && gridParams.options && gridParams.options.showOperationButton
443
- if (this.column.fileSet && this.column.fileSet !== '' && this.column.componentType === 'annex') {
444
- const fileSetObj = JSON.parse(this.column.fileSet)
445
- if (fileSetObj && fileSetObj.multiple) {
446
- this.fileMultiple = true
447
- }
448
- }
449
- },
450
- mounted() {
451
- // 监听保存时点击按钮事件线触发
452
- eventBus.$on('un-edit', (param) => {
453
- // 处理多选选项组问题保存问题
454
- if (this.column.componentType && (this.column.componentType === 'multiselect' || this.column.componentType === 'select')) {
455
- const isDynamic = isDynamicDataSourceSource(this.column)
456
- if (!isDynamic) {
457
- // 选项组保存时将数组处理为字符串
458
- const beforeColumnValue = param.row[this.column.prop]
459
- if (beforeColumnValue && Object.prototype.toString.apply(beforeColumnValue) === '[object Array]') {
460
- // 如果是数组才需要转换
461
- this.$set(param.row, this.column.prop, beforeColumnValue.join(','))
462
- }
463
- } else {
464
- // 动态数据源多选保存时,获取已选择的字段,由于多选选项组的值是数组,保存时要拼接成“ ,” 分隔的字符串
465
- if ('_dynamic-source-data-' + this.column.prop in this.column) {
466
- const temp = this.column['_dynamic-source-data-' + this.column.prop]
467
- const valueSetOptions = temp.valueSetOptions
468
- // 获取当前字段对应在映射关系中对应的是选项组中的哪一个key
469
- let selectDataKey
470
- for (let i = 0; i < valueSetOptions.length; i++) {
471
- const valueSetOption = valueSetOptions[i]
472
- if (this.column.prop === valueSetOption.valueColumn.dbColumnName) {
473
- selectDataKey = valueSetOption.columnName
474
- break
475
- }
476
- }
477
- if (selectDataKey) {
478
- // beforeColumnValue是数组值,如果是单选则是字符串
479
- const beforeColumnValue = param.row[this.column.prop]
480
- if (this.column.componentType === 'select') {
481
- // 如果是单选
482
- // 现在选择时已经赋值,不再需要这里进行赋值
483
- // temp.optionItems.forEach(optionItem => {
484
- // if (optionItem[temp.valueAttribute] === beforeColumnValue) {
485
- // this.$set(param.row, this.column.prop, optionItem[selectDataKey])
486
- // }
487
- // })
488
- this.$set(param.row, this.column.prop, beforeColumnValue)
489
- } else {
490
- // 如果是多选,join “ ,” , 并给row赋值
491
- // 现在选择时已经赋值,不再需要这里进行赋值
492
- // const afterColumnValue = []
493
- // temp.optionItems.forEach(optionItem => {
494
- // beforeColumnValue.forEach(value => {
495
- // if (optionItem[temp.valueAttribute] === value) {
496
- // afterColumnValue.push(optionItem[selectDataKey])
497
- // }
498
- // })
499
- // })
500
- this.$set(param.row, this.column.prop, beforeColumnValue.join(','))
501
- }
502
- }
503
- } else {
504
- const beforeColumnValue = param.row[this.column.prop]
505
- if (beforeColumnValue && Object.prototype.toString.apply(beforeColumnValue) === '[object Array]') {
506
- // 如果是数组才需要转换
507
- this.$set(param.row, this.column.prop, beforeColumnValue.join(','))
508
- }
509
- }
510
- }
511
- }
512
- })
513
- },
514
- destroyed() {
515
- eventBus.$off('un-edit')
516
- },
517
- methods: {
518
- ...customFormatter,
519
- ...apis,
520
- getHeader() {
521
- if (!this.column.titleValueSet) {
522
- return this.column.label.replace(/\\n/g, '</br>')
523
- } else {
524
- return this.formatHeader()
525
- }
526
- },
527
- formatHeader() {
528
- return doFormatWithValueSet(this.column.titleValueSetValue, this.column.label)
529
- },
530
- filterHandler(value, row, column) {
531
- const property = column['property']
532
- return row[property] === value
533
- },
534
- onFocus(index) {
535
- const gridParams = store.get(this.listCode)
536
- if (gridParams.lineEdit.editingCell) {
537
- gridParams.lineEdit.editingCell.row = index
538
- gridParams.lineEdit.editingCell.prop = this.column.prop
539
- }
540
- },
541
- findIndex(index) {
542
- this.index = index
543
- const gridParams = store.get(this.listCode)
544
- if (gridParams.lineEdit.editingCell) {
545
- gridParams.lineEdit.editingCell.row = index
546
- gridParams.lineEdit.editingCell.prop = this.column.prop
547
- }
548
- },
549
- refresData(data) {
550
- this.$emit('refresData', data)
551
- },
552
- refresPortData(port, value) {
553
- const gridParams = store.get(this.listCode)
554
- console.log('gridParams', gridParams)
555
- console.log('this.index', this.index)
556
- if (gridParams && gridParams.lineEdit && gridParams.lineEdit.editingCell) {
557
- this.$emit('refresPortData', port, value, gridParams.lineEdit.editingCell.row)
558
- } else {
559
- this.$emit('refresPortData', port, value, this.index)
560
- }
561
- },
562
- refresPortsData(map) {
563
- const gridParams = store.get(this.listCode)
564
- console.log('gridParams', gridParams)
565
- console.log('this.index', this.index)
566
- if (gridParams && gridParams.lineEdit && gridParams.lineEdit.editingCell) {
567
- this.$emit('refresPortsData', map, gridParams.lineEdit.editingCell.row)
568
- } else {
569
- this.$emit('refresPortsData', map, this.index)
570
- }
571
- },
572
- refresMainTableFields(map) {
573
- this.$emit('refresMainTableFields', map)
574
- },
575
- // @keyup.native.left="move('left')"
576
- // @keyup.native.right="move('right')"
577
- // @keyup.native.up="move('up')"
578
- // @keyup.native.down="move('down')"
579
- move(direction) {
580
- if (direction === 'left') {
581
- const prop = ArrowKeyAction.getLeftColumn(this.column.prop)
582
- const gridParams = store.get(this.listCode)
583
- gridParams.lineEdit.editingCell.prop = prop
584
- }
585
- },
586
- // filterHandler(value, row, column) {
587
- // const property = column['property']
588
- // return row[property] === value
589
- // },
590
- isSaveByEnter() {
591
- const gridParams = store.get(this.listCode)
592
- return typeof (gridParams.options.lineEditOptions.isSaveByEnter) === 'undefined' || (isHasEditOption('isSaveByEnter', this.listCode) && gridParams.options.lineEditOptions.isSaveByEnter === true)
593
- },
594
- isRestoreByEsc() {
595
- const gridParams = store.get(this.listCode)
596
- return typeof (gridParams.options.lineEditOptions.isRestoreByEsc) === 'undefined' || (isHasEditOption('isRestoreByEsc', this.listCode) && gridParams.options.lineEditOptions.isRestoreByEsc === true)
597
- },
598
- canFocus(index) {
599
- const gridParams = store.get(this.listCode)
600
- if (index === gridParams.lineEdit.editingCell.row && this.column.prop === gridParams.lineEdit.editingCell.prop) {
601
- return true
602
- } else {
603
- return false
604
- }
605
- },
606
- getLabel(row, index) {
607
- // const get1 = new Date().getTime()
608
- this.transferColumnDataToUpperCase(row)
609
- const obj = this.objectPropValueTwo(row, this.column)
610
- // // 存储执行时间
611
- // const get2 = new Date().getTime()
612
- // const get3 = Number(get2) - Number(get1)
613
- // if (!sessionStorage.getItem('getLabel')) {
614
- // sessionStorage.setItem('getLabel', get3)
615
- // } else {
616
- // const get4 = sessionStorage.getItem('getLabel')
617
- // const get5 = Number(get4) + Number(get3)
618
- // sessionStorage.setItem('getLabel', get5)
619
- // }
620
- return obj
621
- // const returnValue = this.objectPropValueTwo(row, this.column)
622
- // if (returnValue) {
623
- // // 解决当文本中有多个空格时候, vue自动将多个空格合并为一个空格,
624
- // // 或者修改vue的配置 https://cn.vuejs.org/api/application.html#app-config-compileroptions app.config.compilerOptions.whitespace
625
- // return returnValue.replaceAll(' ', '\u00A0')
626
- // }
627
- // return returnValue
628
- },
629
- getCellValue(row) {
630
- let cellValue = getEntityFieldValue(row, this.column.prop, false)
631
- if (cellValue === undefined || cellValue === null) {
632
- this.transferColumnDataToUpperCase(row)
633
- cellValue = getEntityFieldValue(row, this.column.prop, false)
634
- }
635
- return cellValue
636
- },
637
- // 兼容oracle和mysql数据库,oracle是字段名是大写的,mysql是小写的,将小写转为大写
638
- transferColumnDataToUpperCase(row) {
639
- const reg1 = /[A-Z]+/ // 大写字母
640
- if (this.isSql && reg1.test(this.column.prop)) {
641
- this.transferColumnDataToUpperCaseWithProp(row, this.column.prop.toLowerCase(), this.column.prop)
642
- }
643
- },
644
- transferColumnDataToUpperCaseWithProp(row, propLowerCase, columnProp) {
645
- let dataModel
646
- if (propLowerCase && propLowerCase.indexOf('.') > 0) {
647
- const parentObj = getParentObjectUtil(propLowerCase, row)
648
- const prop = propLowerCase.substring(propLowerCase.lastIndexOf('.') + 1)
649
- dataModel = parentObj[prop]
650
- if (dataModel !== undefined) {
651
- // sql字段名小写转大写,兼容mysql、oracle数据库
652
- parentObj[columnProp] = dataModel
653
- delete parentObj[prop]
654
- }
655
- } else {
656
- dataModel = row[propLowerCase]
657
- if (dataModel !== undefined) {
658
- // sql字段名小写转大写,兼容mysql、oracle数据库
659
- row[columnProp] = dataModel
660
- delete row[propLowerCase]
661
- }
662
- }
663
- return dataModel
664
- },
665
- getMyHyperLinkSetting(row) {
666
- // const get1 = new Date().getTime()
667
- this.transferColumnDataToUpperCase(row)
668
- const gridParams = store.get(this.listCode)
669
- let tableName
670
- if (gridParams && gridParams.basicInfo && gridParams.basicInfo.tableName) {
671
- tableName = gridParams.basicInfo.tableName
672
- }
673
- const hyperLinkResult = this.getHyperLinkSetting(this.column, row, this.isSql, gridParams.additionalParamMap, gridParams.contextParameter, tableName, this.listCode)
674
- hyperLinkResult.icon = this.getHyperIconClass(hyperLinkResult)
675
- // // 存储执行时间
676
- // const get2 = new Date().getTime()
677
- // const get3 = Number(get2) - Number(get1)
678
- // if (!sessionStorage.getItem('getMyHyperLinkSetting')) {
679
- // sessionStorage.setItem('getMyHyperLinkSetting', get3)
680
- // } else {
681
- // const get4 = sessionStorage.getItem('getMyHyperLinkSetting')
682
- // const get5 = Number(get4) + Number(get3)
683
- // sessionStorage.setItem('getMyHyperLinkSetting', get5)
684
- // }
685
- return hyperLinkResult
686
- },
687
- getHyperIconClass(hyperLinkResult) {
688
- let iconName
689
- if (hyperLinkResult && hyperLinkResult !== null && hyperLinkResult.icon && hyperLinkResult.icon !== '') {
690
- iconName = hyperLinkResult.icon
691
- }
692
- if (iconName && iconName.indexOf('fa-') === 0) {
693
- // 表示以“fa-”开头,使用font-awesome中的图标
694
- iconName = 'fa ' + iconName
695
- }
696
- return iconName
697
- },
698
- createFormSubTableRow() {
699
- console.log('触发了行新建')
700
- this.createRow(this.listCode)
701
- },
702
- handleCommand(comman) {
703
- let prop = null
704
- this.column.operations.forEach(item => {
705
- if (item.isGroup) {
706
- item.buttons.forEach(button => {
707
- if (button.props.code === comman.comman) {
708
- prop = button
709
- }
710
- })
711
- }
712
- })
713
- if (prop) {
714
- customFormatter.onClickFun(comman.row, this.column, prop.onClick, comman.rowIndex)
715
- }
716
- },
717
- beforeHandleCommand(comman, row, rowIndex) {
718
- return {
719
- comman: comman,
720
- row: row,
721
- rowIndex: rowIndex
722
- }
723
- },
724
- previewImg(row) {
725
- this.fileList = getFileList(row, this.column, this.isSql)
726
- this.showSingleImgFlag = true
727
- },
728
- getFileList(row) {
729
- return getFileList(row, this.column, this.isSql)
730
- },
731
- getColumnWidth() {
732
- if (this.column && this.column.prop === 'operation' && !this.column.width) {
733
- // 表示操作列,宽度固定
734
- return '210'
735
- }
736
- return this.column.width ? this.column.width + '' : '130'
737
- },
738
- // 设置字段禁止编辑
739
- fnProhibitToEdit(isEditable) {
740
- this.isEditable = isEditable
741
- },
742
- // 设置字段禁止编辑
743
- prohibitToEdit(entity) {
744
- this.$emit('prohibitToEdit', entity)
745
- },
746
- isFieldRequired() {
747
- return isRequiredEdit(this.column.prop, this.listCode)
748
- // return true
749
- },
750
- // 展示富文本内容
751
- showRichEditorContent(row, column, header) {
752
- this.showRichEditorViewer = true
753
- this.$nextTick(() => {
754
- this.$refs.richEditorViewerRef.showContent(row[column.prop], header)
755
- })
756
- },
757
- closeRichEditorContent() {
758
- this.showRichEditorViewer = false
759
- }
760
- }
761
- }
762
- </script>
763
- <style lang="scss" scoped>
764
- .annex-cell {
765
- padding-right:5px;
766
- cursor:pointer;
767
- color:#409EFF;
768
- }
769
- </style>