@bytenew/bn-bus-ui 1.1.463 → 1.1.464

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 (167) hide show
  1. package/dist/assocTableSearch-Bfe96864.js +349 -0
  2. package/dist/assocTableSearch.css +1 -0
  3. package/dist/bn-bus-ui.es.js +65 -0
  4. package/dist/bn-bus-ui.umd.js +49 -0
  5. package/dist/chooseIPaasData-COrrvQKZ.js +391 -0
  6. package/dist/chooseIPaasData.css +1 -0
  7. package/dist/defaultSet-CzN1ec_d.js +297 -0
  8. package/dist/defaultSet.css +1 -0
  9. package/dist/fileFormData-D_Q1vylE.js +53 -0
  10. package/dist/formItemFooter-BvptZj_u.js +108 -0
  11. package/dist/formItemFooter.css +1 -0
  12. package/dist/funcExprDialog-BguNs9fl.js +139 -0
  13. package/dist/funcExprDialog.css +1 -0
  14. package/dist/index-0oB7QocU.js +44 -0
  15. package/dist/index-69fRP0M8.js +89 -0
  16. package/dist/index-BdklTJtF.js +66 -0
  17. package/dist/index-Bu3jHlby.js +45 -0
  18. package/dist/index-BxWx5kpG.js +89 -0
  19. package/dist/index-C5LQ0OSs.js +183 -0
  20. package/dist/index-C8YhrrUN.js +51 -0
  21. package/dist/index-COuPCIzB.js +45 -0
  22. package/dist/index-CSvVyjxx.js +178 -0
  23. package/dist/index-DCv51EXX.js +109 -0
  24. package/dist/index-DUSI6MuC.js +135 -0
  25. package/dist/index-DVzxs2vR.js +58 -0
  26. package/dist/index-Dd4b8zNb.js +746 -0
  27. package/dist/index-Md-ZlkCW.js +66 -0
  28. package/dist/index-hsSIY2FP.js +221 -0
  29. package/dist/index-n13-H3_Y.js +118 -0
  30. package/dist/index-wUl5aPUD.js +64 -0
  31. package/dist/index.css +1 -0
  32. package/dist/index2.css +1 -0
  33. package/dist/index3.css +1 -0
  34. package/dist/index4.css +1 -0
  35. package/dist/index5.css +1 -0
  36. package/dist/index6.css +1 -0
  37. package/dist/index7.css +1 -0
  38. package/dist/install-CNjs0u5x.js +23299 -0
  39. package/dist/install.css +1 -0
  40. package/dist/setOption-CXOifQcx.js +329 -0
  41. package/dist/setOption.css +1 -0
  42. package/dist/setRelationOption-C7VDhej7.js +5217 -0
  43. package/dist/setRelationOption.css +1 -0
  44. package/package.json +4 -20
  45. package/install.js +0 -134
  46. package/packages/BnAddress/index.vue +0 -141
  47. package/packages/BnAddressParse/index.vue +0 -75
  48. package/packages/BnAdvancedFilter/BnFilterView.vue +0 -145
  49. package/packages/BnAdvancedFilter/index.vue +0 -345
  50. package/packages/BnAdvancedFilter/util.js +0 -171
  51. package/packages/BnCascader/BnCascader.vue +0 -543
  52. package/packages/BnCascader/BnCascaderPanel.vue +0 -1331
  53. package/packages/BnCascader/cascaderDisplay.js +0 -102
  54. package/packages/BnCheck/BnCheck.vue +0 -253
  55. package/packages/BnColumnConfig/columnConfigDialog.vue +0 -134
  56. package/packages/BnColumnConfig/component/childrenFormSetting/assocTable.vue +0 -143
  57. package/packages/BnColumnConfig/component/childrenFormSetting/assocTableSearch.vue +0 -314
  58. package/packages/BnColumnConfig/component/childrenFormSetting/index.vue +0 -243
  59. package/packages/BnColumnConfig/component/defaultSet/defaultSet.vue +0 -114
  60. package/packages/BnColumnConfig/component/defaultSet/stringDefault.vue +0 -210
  61. package/packages/BnColumnConfig/component/funcExprDialog/funcExprDialog.vue +0 -126
  62. package/packages/BnColumnConfig/component/packageFilter/index.vue +0 -141
  63. package/packages/BnColumnConfig/component/paraExplainSet/index.vue +0 -156
  64. package/packages/BnColumnConfig/component/setOption/setOption.vue +0 -321
  65. package/packages/BnColumnConfig/component/setRelationOption/ConditionList.vue +0 -277
  66. package/packages/BnColumnConfig/component/setRelationOption/LevelHeader.vue +0 -144
  67. package/packages/BnColumnConfig/component/setRelationOption/setRelationOption.vue +0 -642
  68. package/packages/BnColumnConfig/data.js +0 -129
  69. package/packages/BnColumnConfig/index.scss +0 -23
  70. package/packages/BnColumnConfig/index.vue +0 -309
  71. package/packages/BnCondVal/BnCondVal.vue +0 -112
  72. package/packages/BnCondVal/itemVal/dateRegVal.vue +0 -39
  73. package/packages/BnCondVal/itemVal/dateVal.vue +0 -39
  74. package/packages/BnCondVal/itemVal/numRegVal.vue +0 -67
  75. package/packages/BnCondVal/itemVal/numVal.vue +0 -44
  76. package/packages/BnCondVal/itemVal/relationVal.vue +0 -73
  77. package/packages/BnCondVal/itemVal/selectColumnVal.vue +0 -58
  78. package/packages/BnCondVal/itemVal/selectVal.vue +0 -59
  79. package/packages/BnCondVal/itemVal/stringVal.vue +0 -156
  80. package/packages/BnCondition/index.vue +0 -551
  81. package/packages/BnCondition/util.js +0 -232
  82. package/packages/BnDatePicker/BnDatePicker.vue +0 -194
  83. package/packages/BnDrop/BnDrop.vue +0 -917
  84. package/packages/BnEmptyTip/BnEmptyTip.vue +0 -107
  85. package/packages/BnExportOrder/BnExportOrder.vue +0 -241
  86. package/packages/BnExportOrder/validatorCode.vue +0 -94
  87. package/packages/BnFileView/BnFileView.vue +0 -271
  88. package/packages/BnFileView/FileDetail.vue +0 -125
  89. package/packages/BnFileView/videoPreview.vue +0 -70
  90. package/packages/BnFilterOption/BnFilterOption.vue +0 -160
  91. package/packages/BnFunExpr/BnFunExpr.vue +0 -608
  92. package/packages/BnImportOrder/BnImportOrder.vue +0 -323
  93. package/packages/BnImportTemplate/BnImportTemplate.vue +0 -866
  94. package/packages/BnImportTemplate/assets/merge_tip_img.png +0 -0
  95. package/packages/BnImportTemplate/assets/sheet_tip.png +0 -0
  96. package/packages/BnImportTemplate/assets/xls.png +0 -0
  97. package/packages/BnImportTemplate/components/ImportTemplateTrigger.vue +0 -198
  98. package/packages/BnImportTemplate/components/TemplateEditDialog.vue +0 -340
  99. package/packages/BnImportTemplate/components/TemplateFieldsConfig.vue +0 -401
  100. package/packages/BnImportTemplate/components/TemplateListDialog.vue +0 -297
  101. package/packages/BnInpNum/BnInpNum.vue +0 -165
  102. package/packages/BnMenus/BnMenus.vue +0 -502
  103. package/packages/BnMenus/MenuItem.vue +0 -321
  104. package/packages/BnOrderCard/BnOrderCard.vue +0 -389
  105. package/packages/BnOrderCard/orderRemark.vue +0 -178
  106. package/packages/BnOrderCard/util.js +0 -94
  107. package/packages/BnOrderDetail/BnOrderDetail.vue +0 -338
  108. package/packages/BnOrderDetail/filterLogByUser.vue +0 -108
  109. package/packages/BnOrderDetail/orderLogs.vue +0 -53
  110. package/packages/BnOrderDetail/showSubForm/index.vue +0 -41
  111. package/packages/BnOrderDetail/showSubForm/showChildTable.vue +0 -61
  112. package/packages/BnOrderDetail/showSubForm/showTimeLine.vue +0 -131
  113. package/packages/BnOrderDetail/showSubForm/tableCellCopy.vue +0 -84
  114. package/packages/BnOrderShare/index.vue +0 -378
  115. package/packages/BnOrderShare/shareUrlInp.vue +0 -54
  116. package/packages/BnRadio/BnRadio.vue +0 -181
  117. package/packages/BnRelation/BnRelation.vue +0 -120
  118. package/packages/BnSelect/BnSelect.vue +0 -485
  119. package/packages/BnSmartForm/BnBatchForm.vue +0 -334
  120. package/packages/BnSmartForm/BnBatchFormDialog.vue +0 -423
  121. package/packages/BnSmartForm/BnSmartElf/elfLog/index.vue +0 -57
  122. package/packages/BnSmartForm/BnSmartElf/index.vue +0 -95
  123. package/packages/BnSmartForm/BnSmartFormPsychic.js +0 -629
  124. package/packages/BnSmartForm/BnSmartFormUtil.js +0 -524
  125. package/packages/BnSmartForm/addressForm/index.vue +0 -73
  126. package/packages/BnSmartForm/checkboxForm/index.vue +0 -99
  127. package/packages/BnSmartForm/childrenForm/childFormFile.vue +0 -237
  128. package/packages/BnSmartForm/childrenForm/childrenFormBody.vue +0 -260
  129. package/packages/BnSmartForm/childrenForm/index.vue +0 -110
  130. package/packages/BnSmartForm/childrenForm/searchInventory.vue +0 -115
  131. package/packages/BnSmartForm/chooseAssocTable/chooseAssocTable.vue +0 -451
  132. package/packages/BnSmartForm/chooseAssocTable/chooseChildGood.vue +0 -229
  133. package/packages/BnSmartForm/chooseAssocTable/tableCellCopy.vue +0 -84
  134. package/packages/BnSmartForm/chooseChildOrder/chooseChildOrder.vue +0 -158
  135. package/packages/BnSmartForm/chooseIPaasData/chooseIPaasData.vue +0 -307
  136. package/packages/BnSmartForm/chooseIPaasData/tableCellCopy.vue +0 -84
  137. package/packages/BnSmartForm/choosePackage/choosePackage.vue +0 -361
  138. package/packages/BnSmartForm/dateDualForm/index.vue +0 -37
  139. package/packages/BnSmartForm/dateForm/index.vue +0 -38
  140. package/packages/BnSmartForm/fileForm/fileFormData.js +0 -50
  141. package/packages/BnSmartForm/fileForm/index.vue +0 -240
  142. package/packages/BnSmartForm/formItemFooter/formItemFooter.vue +0 -38
  143. package/packages/BnSmartForm/formItemTop/formItemTop.vue +0 -42
  144. package/packages/BnSmartForm/index.vue +0 -1201
  145. package/packages/BnSmartForm/numberForm/index.vue +0 -63
  146. package/packages/BnSmartForm/radioForm/index.vue +0 -72
  147. package/packages/BnSmartForm/receiveForm/index.vue +0 -112
  148. package/packages/BnSmartForm/relationForm/index.vue +0 -82
  149. package/packages/BnSmartForm/scoreForm/index.vue +0 -39
  150. package/packages/BnSmartForm/selectForm/index.vue +0 -55
  151. package/packages/BnSmartForm/showValForm/index.vue +0 -42
  152. package/packages/BnSmartForm/showValForm/showValFormTable.vue +0 -104
  153. package/packages/BnSmartForm/smartFormsCommon.scss +0 -43
  154. package/packages/BnSmartForm/stringForm/index.vue +0 -170
  155. package/packages/BnVirtPopover/index.vue +0 -319
  156. package/packages/BnWebLog/BnWebLog.vue +0 -140
  157. package/packages/BnWorkSettingDrop/advancedOptions.js +0 -112
  158. package/packages/BnWorkSettingDrop/benBenAIUtil.js +0 -89
  159. package/packages/BnWorkSettingDrop/index.vue +0 -292
  160. package/packages/font/iconfont.css +0 -243
  161. package/packages/font/iconfont.ttf +0 -0
  162. package/packages/font/iconfont.woff +0 -0
  163. package/packages/font/iconfont.woff2 +0 -0
  164. package/utils/addressParse-old.js +0 -645
  165. package/utils/addressParse.js +0 -735
  166. package/utils/config.js +0 -68
  167. package/utils/index.js +0 -1171
@@ -1,307 +0,0 @@
1
- <template>
2
- <el-dialog v-model="show" :title="`请选择${columnData.name}`" top="18px" width="70%" destroy-on-close
3
- style="margin-bottom: 0">
4
- <tableCellCopy ref="childTableCopy"></tableCellCopy>
5
- <div class="chooseIPaasData">
6
- <div class="chooseIPaasData-search w-margin-bottom10">
7
- <template v-for="(item,index) in searchPost.conditions" :key="index">
8
- <div class="chooseIPaasData-search-item">
9
- <BnAdvancedFilter v-model="searchPost.conditions[index]" :columnList="searchColumns" @valueChange="search()"
10
- :allowSearchType="false" allowDel @del="searchPost.conditions.splice(index,1)"
11
- :postFunc="postFunc" :pathUrl="item.pathUrl" :postData="item.postData"/>
12
- </div>
13
- </template>
14
- </div>
15
- <div class="w-flex-between w-margin-bottom10">
16
- <div class="w-flex-center">
17
- <BnDrop v-model="searchPost.conditions" :options="conditions" multiple
18
- :optionProps="{value:'columnCode',label:'name'}">
19
- <el-button type="primary" link> + 添加筛选条件</el-button>
20
- </BnDrop>
21
- </div>
22
- <div class="w-flex-center">
23
- <el-button type="primary" @click="search">筛选</el-button>
24
- </div>
25
- </div>
26
- <vxe-table ref="assocTable" border size="small" :data="orderList" class="chooseIPaasData-out"
27
- v-loading="loading" :tooltip-config="{}"
28
- :row-config="{keyField: 'id',isCurrent: true, isHover: true}"
29
- :max-height="tableMaxHeight" min-height="50"
30
- :expand-config="{expandAll: true}"
31
- :column-config="{resizable: true}"
32
- :checkbox-config="{ checkRowKeys: selectData}"
33
- :scroll-x="{ enabled: true, gt: 8 }"
34
- :scroll-y="{ enabled: true, gt: 15 }"
35
- @checkbox-change="checkChange"
36
- @cell-mouseenter="onMouseEvent"
37
- @cell-mouseleave="onMouseEvent"
38
- @checkbox-all="checkAllTask">
39
- <vxe-column type="checkbox" width="32" fixed="left"></vxe-column>
40
- <vxe-column :visible="column.extraInfo.isAddable == 1" :title="column.name" :field="column.columnCode"
41
- min-width="160"
42
- v-for="(column,index) in columnData.moduleDefinition" :key="index"
43
- show-header-overflow="title" show-overflow="title" show-footer-overflow>
44
- <template #default="scope">
45
- <span>{{ getTitle(column, scope.row[column.columnCode]) }}</span>
46
- </template>
47
- </vxe-column>
48
- <template #empty>
49
- <span>暂无数据</span>
50
- </template>
51
- </vxe-table>
52
- </div>
53
- <template #footer>
54
- <div class="w-flex-right w-flex-center">
55
- <span class="w-font13 w-color-gray w-margin-right8">已选择({{ selectData.length }}/{{
56
- orderList.length
57
- }})条</span>
58
- <el-pagination class="w-margin-right8"
59
- background
60
- v-model:current-page="searchPost.pageNum"
61
- v-model:page-size="searchPost.pageSize"
62
- layout="prev, pager, next" @current-change="search"
63
- :total="searchPost.total">
64
- </el-pagination>
65
- <el-button @click="show = false">取消</el-button>
66
- <el-popover placement="top-start" :width="298" trigger="hover">
67
- <div class="BnSmartForm-title-tip">在原有的子表单值的基础上追加选中的数据</div>
68
- <template #reference>
69
- <el-button type="primary" @click="sure('add')" :disabled="selectData.length == 0">确认追加</el-button>
70
- </template>
71
- </el-popover>
72
- <el-popover placement="top-start" :width="290" trigger="hover">
73
- <div class="BnSmartForm-title-tip">用选中的数据直接覆盖子表单的原有的值</div>
74
- <template #reference>
75
- <el-button type="primary" @click="sure('cover')" :disabled="selectData.length == 0">确认覆盖</el-button>
76
- </template>
77
- </el-popover>
78
- </div>
79
- </template>
80
- </el-dialog>
81
- </template>
82
- <script>
83
- import {cloneDeep} from "lodash";
84
- import {getSearchComponents, searchValueToJson} from "../../../utils/index.js";
85
- import tableCellCopy from "./tableCellCopy.vue";
86
- import {getColumnValText} from "../BnSmartFormUtil.js";
87
-
88
- export default {
89
- name: 'chooseIPaasData',
90
- components: {tableCellCopy},
91
- props: {
92
- // 接口请求外部转发
93
- postFunc: Function,
94
- // 扩展参数
95
- extendPost: Object,
96
- },
97
- data() {
98
- return {
99
- show: false,
100
- loading: false,
101
- // 子表单信息
102
- columnData: {},
103
- // 支持筛选的组件
104
- searchColumns: [],
105
- // 对筛选组件进行处理,尽量少的传一些字段
106
- conditions: [],
107
- // 最大高度
108
- tableMaxHeight: 400,
109
- // 选中数据
110
- selectData: [],
111
- // 高级筛选
112
- searchPost: {
113
- pageSize: 20,
114
- pageNum: 1,
115
- total: 0,
116
- conditions: [],
117
- taskContent:''
118
- },
119
- // 表格数据
120
- orderList: [],
121
- // 快捷筛选项
122
- searchList: []
123
- }
124
- },
125
- methods: {
126
- /**
127
- * 打开选择弹框,处理数据回显
128
- * */
129
- open(column,contents) {
130
- this.columnData = cloneDeep(column);
131
- this.orderList = []
132
- this.searchPost.pageNum = 1;
133
- this.searchPost.taskContent = JSON.stringify(contents);
134
- this.searchColumns = []
135
- try {
136
- // 整理筛选条件
137
- let conditions = []
138
- column.moduleDefinition.forEach(i => {
139
- let outData = i.outDataSourceInfo[0] || {}
140
- let extend = outData.extend ? JSON.parse(outData.extend) : {}
141
- if (outData.platform == 'relation_ipaas' && extend.io == 'in') {
142
- conditions.push(i)
143
- }
144
- })
145
- this.searchColumns = getSearchComponents(conditions, this.extendPost.appId, this.extendPost.projectId)
146
- // 简化筛选的字段
147
- this.conditions = this.searchColumns.map(i => {
148
- return {
149
- id: i.id,
150
- name: i.name,
151
- behaviorType: i.behaviorType,
152
- columnCode: i.columnCode,
153
- searchType: i.searchType,
154
- value: i.value
155
- }
156
- })
157
- } catch (e) {
158
- console.log('格式化关联表筛选组件' + e)
159
- }
160
- this.tableMaxHeight = window.innerHeight - 360;
161
- this.postFunc(`/v2/client/cache/get/${this.extendPost.projectId}_${this.columnData.id}_${this.extendPost.userId || ''}_assocTable`, {}, 'get').then(res => {
162
- if (!res.code && res.data) {
163
- const c = JSON.parse(res.data)
164
- if (c.conditions) {
165
- this.searchPost.conditions = c.conditions;
166
- } else if (this.searchColumns.length > 0) {
167
- this.searchPost.conditions = [cloneDeep(this.searchColumns[0])]
168
- }
169
- }
170
- this.search();
171
- })
172
- this.show = true;
173
- },
174
- /**
175
- * 选中任务
176
- * */
177
- checkChange({checked, row}) {
178
- this.$refs.assocTable.setCheckboxRow(row, checked);
179
- if (checked) {
180
- if (!this.selectData.includes(row.id)) {
181
- this.selectData.push(row.id);
182
- }
183
- } else {
184
- if (this.selectData.includes(row.id)) {
185
- this.selectData.splice(this.selectData.indexOf(row.id), 1);
186
- }
187
- }
188
- },
189
- /**
190
- * 全选任务
191
- * */
192
- checkAllTask({records}) {
193
- if (records.length != 0) {
194
- records.map((task) => {
195
- if (!this.selectData.includes(task.id)) {
196
- this.selectData.push(task.id);
197
- }
198
- });
199
- } else {
200
- this.selectData = []
201
- }
202
- },
203
- /**
204
- * 筛选数据
205
- * */
206
- search(postData) {
207
- this.searchPost = {...this.searchPost, ...postData}
208
- this.postFunc('/v2/client/cache/save', {
209
- key: `${this.extendPost.projectId}_${this.columnData.id}_${this.extendPost.userId || ''}_assocTable`,
210
- value: this.searchPost
211
- })
212
- let post = {
213
- ...this.searchPost,
214
- conditions: JSON.stringify(this.searchPost.conditions),
215
- originId:this.extendPost.projectId,
216
- subFormId:this.columnData.id
217
- }
218
- this.selectData = []
219
- this.$refs.assocTable?.clearCheckboxRow()
220
- this.loading = true;
221
- this.postFunc('/biztable/content/queryChildTask', post).then(res => {
222
- this.loading = false;
223
- if (!res.code) {
224
- this.orderList = res.data.results
225
- this.searchPost.total = parseInt(res.data.total);
226
- this.searchPost.pageNum = res.data.pageNum;
227
- } else {
228
- this.orderList = [];
229
- this.searchPost.total = 0;
230
- this.searchPost.pageNum = 1;
231
- }
232
- })
233
- },
234
- /**
235
- * 鼠标移入移出单元格,展示隐藏复制按钮
236
- * @param {Event} e 事件对象
237
- */
238
- onMouseEvent(scope) {
239
- // 当鼠标悬浮到单元格时,再加复制按钮
240
- let e = scope.$event;
241
- // 鼠标离开
242
- if (e.type === "mouseleave") {
243
- this.$refs.childTableCopy?.onHide()
244
- } else {
245
- let data = {
246
- column: {columnCode: this.headerColumns[scope.columnIndex - 2]?.columnCode},
247
- row: scope.row
248
- }
249
- // 有值再显示
250
- if (data.row[data.column.columnCode]) {
251
- this.$refs.childTableCopy?.onShow(scope.cell, data)
252
- }
253
- }
254
- },
255
- /**
256
- * 转义title
257
- * */
258
- getTitle(column, value) {
259
- let text = getColumnValText(column, true, value);
260
- return text;
261
- },
262
- /**
263
- * 确认
264
- * */
265
- sure(type) {
266
- let orders = this.orderList.reduce((acc, i) => {
267
- if (this.selectData.includes(i.id)) {
268
- acc.push(i);
269
- }
270
- return acc
271
- }, []);
272
- setTimeout(() => {
273
- this.$emit('setChildrenForm', orders, type, this.columnData.columnCode)
274
- }, 200)
275
- this.show = false;
276
- },
277
- }
278
- }
279
- </script>
280
-
281
- <style scoped lang="scss">
282
- .chooseIPaasData {
283
- height: 100%;
284
- overflow: hidden;
285
-
286
- &-search {
287
- display: flex;
288
- flex-wrap: wrap;
289
- max-height: 142px;
290
- overflow-y: auto;
291
- gap: 10px 18px;
292
-
293
- &-item {
294
- width: calc(33.33% - 18px);
295
- flex-grow: 0;
296
- }
297
- }
298
-
299
- &-out {
300
- :deep(.vxe-table--header) {
301
- .vxe-header--row {
302
- background-color: #ecf5ff;
303
- }
304
- }
305
- }
306
- }
307
- </style>
@@ -1,84 +0,0 @@
1
- <template>
2
- <div class="worksheetCopy" :style="style" v-show="visiable || isMouseIn" @mouseover="onMouseEvent"
3
- @mouseleave="onMouseEvent" @click.stop="copyText">复制
4
- </div>
5
- </template>
6
-
7
- <script>
8
- export default {
9
- name: "WorksheetCopy",
10
- data() {
11
- return {
12
- isMouseIn: false,
13
- visiable: false,
14
- params: {},
15
- style: {},
16
- };
17
- },
18
- methods: {
19
- /**
20
- * 鼠标移入移出
21
- * @param {Event} e 事件对象
22
- */
23
- onMouseEvent(e) {
24
- this.isMouseIn = e.type === "mouseleave" ? false : true;
25
- },
26
- /**
27
- * 初始化
28
- * @param {Object} params {column:组件信息,row:行数据}
29
- */
30
- onShow(target, params) {
31
- try {
32
- const {right, top} = target.getBoundingClientRect();
33
- this.style = {
34
- left: `${right - 34}px`,
35
- top: `${top}px`,
36
- };
37
- this.params = params;
38
- this.visiable = true;
39
- }catch (e){
40
- console.log('显示复制按钮失败')
41
- }
42
- },
43
- onHide() {
44
- this.visiable = false;
45
- },
46
- /**
47
- * 复制文本
48
- */
49
- copyText() {
50
- const {column, row} = this.params;
51
- let copyValue = row[column.columnCode] || "";
52
- if(copyValue) {
53
- const textarea = document.createElement('textarea');
54
- textarea.value = copyValue;
55
- document.body.appendChild(textarea);
56
- textarea.select();
57
- document.execCommand('copy');
58
- document.body.removeChild(textarea);
59
- this.$message.success('复制成功');
60
- } else {
61
- this.$message.warning('无内容可复制');
62
- }
63
- },
64
- },
65
- };
66
- </script>
67
- <style lang='scss' scoped>
68
- .worksheetCopy {
69
- position: fixed;
70
- width: 34px;
71
- height: 22px;
72
- line-height: 22px;
73
- text-align: center;
74
- background-color: rgba(51, 51, 51, 0.3);
75
- color: #fff;
76
- font-size: 12px;
77
- z-index: 999999;
78
-
79
- &:hover {
80
- background-color: #65acff;
81
- cursor: pointer;
82
- }
83
- }
84
- </style>