imatrix-ui 2.9.18-dw → 2.9.19-boe01

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