imatrix-ui 2.9.15-dw-tmp2 → 2.9.16-boe1

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