@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,271 +0,0 @@
1
- <template>
2
- <div class="bnFileView" :style="viewStyle">
3
- <el-image ref="imageRef" style="width: 0;height: 0;position: absolute;" :initial-index="imgPreviewIndex"
4
- :preview-teleported="previewTeleported"
5
- :src="imgPreviewUrl" :preview-src-list="imgPreviewUrlList" fit="cover"/>
6
- <videoPreview ref="videoRef"></videoPreview>
7
- <div class="bnFileView-body">
8
- <div v-for="(file,index) in fileList" :key="index" class="bnFileView-item"
9
- :class="{'bnFileView-showDetail':!isMini}" :style="warpStyle">
10
- <!--展示图片预览图或者文件icon-->
11
- <div class="bnFileView-item-img" :title="file.title" @click="lookFile(file)">
12
- <el-popover placement="top-start" popper-class="bnFileView-popper" :width="200" trigger="hover"
13
- :show-arrow="false" :disabled="!isMini">
14
- <div v-if="includesType(pictureType, file.type) && imagePreview">
15
- <img style="width: 180px;height: 180px" :src="getFileImg(file)">
16
- </div>
17
- <fileDetail v-if="isMini" :file="file" :index="index"
18
- @lookFile="lookFile" @delFile="delFile" :isDel="isDel" :showSize="showSize"
19
- :disabled="disabled" :downType="downType"></fileDetail>
20
- <template #reference>
21
- <img :style="widthStyle" :src="getFileImg(file)">
22
- </template>
23
- </el-popover>
24
- </div>
25
- <!--展示附件详细信息-->
26
- <fileDetail v-if="!isMini" :style="detailStyle" :file="file" :index="index"
27
- @lookFile="lookFile" @delFile="delFile" :isDel="isDel" :showSize="showSize"
28
- :disabled="disabled" :downType="downType"></fileDetail>
29
- </div>
30
- </div>
31
- </div>
32
- </template>
33
- <script>
34
- import {includes, map, toLower} from "lodash";
35
- import videoPreview from "./videoPreview.vue";
36
- import fileDetail from "./FileDetail.vue";
37
-
38
- export default {
39
- name: "BnFileView",
40
- components: {videoPreview, fileDetail},
41
- props: {
42
- //附件列表
43
- fileList: {
44
- type: Array,
45
- default() {
46
- return []
47
- }
48
- },
49
- // 最小化 仅展示icon,鼠标悬浮支持下载
50
- isMini: false,
51
- // 是否允许删除
52
- isDel: false,
53
- // 是否展示附件大小
54
- showSize: false,
55
- //是否禁用
56
- disabled: Boolean,
57
- //图片宽度
58
- width: {
59
- type: [String, Number],
60
- default: 22
61
- },
62
- //是否开启缩略图
63
- reduceNum: {
64
- type: Number,
65
- },
66
- // 展示列数
67
- row: 1,
68
- // 强制不换行
69
- noWarp: false,
70
- // 插入到body中
71
- previewTeleported: {
72
- default: true
73
- },
74
- // 图片预览
75
- imagePreview: {
76
- default: true
77
- },
78
- //下载类型 默认拿fileId
79
- downType: {
80
- type: String,
81
- default: 'id'
82
- }
83
- },
84
- computed: {
85
- // 是否强制不换行
86
- viewStyle() {
87
- if (this.noWarp) {
88
- return `width: max-content;`;
89
- } else {
90
- return ``;
91
- }
92
- },
93
- // 图片宽度计算
94
- widthStyle() {
95
- if ((this.width).toString().indexOf('px') > 0) {
96
- return `width: ${this.width}; height: ${this.width}; object-fit: contain;`;
97
- } else {
98
- return `width: ${this.width}px; height: ${this.width}px; object-fit: contain;`;
99
- }
100
- },
101
- // 详情宽度计算
102
- detailStyle() {
103
- if ((this.width).toString().indexOf('px') > 0) {
104
- return `width: calc(100% - ${this.width});`;
105
- } else {
106
- return `width: calc(100% - ${this.width}px);`;
107
- }
108
- },
109
- // 换行逻辑
110
- warpStyle() {
111
- if (this.row > 1) {
112
- let width = parseInt(100 / this.row)
113
- return `width: calc(${width}% - 4px);`;
114
- } else {
115
- return false
116
- }
117
- },
118
- // 整理图片列表
119
- imgPreviewUrlList() {
120
- let list = []
121
- if (this.fileList) {
122
- this.fileList.forEach(i => {
123
- if (this.includesType(this.pictureType, i.type)) {
124
- list.push(i.url)
125
- }
126
- })
127
- }
128
- return list;
129
- },
130
- },
131
- data() {
132
- return {
133
- imgPreviewIndex: 0,
134
- imgPreviewUrl: '',
135
- fileType: [".jpg", ".png", ".jpeg", ".img", ".gif", ".bmp", ".jfif", ".webp", ".xls", ".xlsx", ".ppt", ".pptx", ".doc", ".pdf", ".docx", ".mp4", ".webm", ".ogg", ".3gp", ".avi", ".mpeg", ".ogv", ".mpg", ".mov", ".rmvb", ".mkv"],
136
- officeFileTypes: [".xls", ".xlsx",".csv", ".ppt", ".pptx", ".doc", ".docx", ".pdf"],//office文件类型
137
- videoType: [".mp4", ".webm", ".ogg", ".3gp", ".avi", ".mpeg", ".ogv", ".mpg", ".mov", ".rmvb", ".mkv"],
138
- pictureType: [".jpg", ".png", ".jpeg", ".img", ".gif", ".bmp", ".jfif", ".webp"]
139
- };
140
- },
141
- methods: {
142
- /**
143
- * 忽略大小写判断文件类型
144
- * */
145
- includesType(typeList, fileType) {
146
- if (!fileType) return false;
147
- return includes(map(typeList, toLower), toLower(fileType));
148
- },
149
- /**
150
- * 打开文件预览,一般是除了图片、视频、音频这些无法预览的附件类型
151
- * */
152
- lookFile(file) {
153
- // 图片预览
154
- if (this.includesType(this.pictureType, file.type)) {
155
- this.imgPreviewUrl = file.url;
156
- this.imgPreviewIndex = this.imgPreviewUrlList.indexOf(file.url)
157
- this.$refs.imageRef.showPreview()
158
- } else if (this.includesType(this.videoType, file.type)) {
159
- // 视频播放
160
- this.$refs.videoRef.open(file.url)
161
- } else {
162
- // office 以及其他文件直接打开链接
163
- if (!(file.id < 1)) {
164
- window.open('/v2/attachment/showAtt?attId=' + file.id)
165
- } else {
166
- window.open(file.url)
167
- }
168
- }
169
- },
170
- /**
171
- * 根据文件类型,判端文件预览展示那种图片或icon
172
- * */
173
- getFileImg(file) {
174
- // 默认文件图片
175
- let url = "https://banniu-work.oss-cn-zhangjiakou.aliyuncs.com/125_10030158_854889b020ef5023f3ec547dcb2a12c4.png";
176
- // 图片格式附件直接展示url
177
- if (this.includesType(this.pictureType, file.type)) {
178
- url = file.url;
179
- // 处理缩略图
180
- if(this.reduceNum){
181
- if(file.url.indexOf('img.alicdn.com/')>=0 && file.url.indexOf('.jpg_')<0){
182
- url = `${file.url}_${this.reduceNum}x${this.reduceNum}.jpg`
183
- }else if(file.url.indexOf('banniu-work.oss-cn-zhangjiakou.aliyuncs.com/')>=0 && file.url.indexOf('?x-oss-process=image/resize')<0){
184
- url = `${file.url}?x-oss-process=image/resize,w_${this.reduceNum}/quality,q_${this.reduceNum}`
185
- }else if(file.url.indexOf('osscdn.lbdj.com/')>=0 && file.url.indexOf('?x-oss-process=image')<0){
186
- url = `${file.url}?x-oss-process=image/resize,w_${this.reduceNum}/format,jpg`
187
- }else if(file.url.indexOf('img10.360buyimg.com/')>=0 ){
188
- url = file.url.replace('imgzone','n1')
189
- }
190
-
191
- }
192
- }
193
- // office类型文件展示对应类型图片
194
- if (this.includesType(this.officeFileTypes, file.type)) {
195
- const lowerType = toLower(file.type);
196
- if (lowerType.includes('xls')) {
197
- url = "https://banniu-work.oss-cn-zhangjiakou.aliyuncs.com/125_10030158_d46630a679d1f3830947095edfd12f41.png"
198
- }
199
- if (lowerType.includes('ppt')) {
200
- url = "https://banniu-work.oss-cn-zhangjiakou.aliyuncs.com/125_10030158_c6352ba0d7ef5d1f7695347b7d9b0c7e.png"
201
- }
202
- if (lowerType.includes('doc')) {
203
- url = "https://banniu-work.oss-cn-zhangjiakou.aliyuncs.com/125_10030158_807fa63419a45ef7cf64bc7da8e83ec1.png"
204
- }
205
- if (lowerType.includes('pdf')) {
206
- url = "https://banniu-work.oss-cn-zhangjiakou.aliyuncs.com/125_10030158_ce5a58150d035a73a9fe14d9ac05e11a.png"
207
- }
208
- }
209
- // 视频类型文件
210
- if (this.includesType(this.videoType, file.type)) {
211
- url = "https://banniu-work.oss-cn-zhangjiakou.aliyuncs.com/125_10030158_36c05615d07ec55449fb1ddda0274787.png"
212
- }
213
- return url;
214
- },
215
- /**
216
- * 删除附件
217
- * */
218
- delFile(index) {
219
- this.fileList.splice(index, 1)
220
- this.$emit('delFile', this.fileList)
221
- },
222
- },
223
- }
224
- </script>
225
- <style>
226
- .bnFileView-popper {
227
- padding: 8px !important;
228
- }
229
- </style>
230
- <style lang="scss" scoped>
231
- .minWidth {
232
- min-width: 92px;
233
- }
234
-
235
- .bnFileView {
236
- width: 100%;
237
- vertical-align: middle;
238
-
239
- &-showDetail {
240
- width: 100%;
241
- padding: 5px 12px;
242
- }
243
-
244
- &-body {
245
- display: flex;
246
- flex-wrap: wrap;
247
- width: 100%;
248
- }
249
-
250
- &-item {
251
- display: flex;
252
- position: relative;
253
- vertical-align: middle;
254
- border-radius: 2px;
255
- font-size: 0;
256
- text-align: center;
257
- border: 1px solid #EBEEF5;
258
- margin: 2px 4px 2px 0px;
259
- align-items: center;
260
- overflow: hidden;
261
-
262
- &-img {
263
- display: inherit;
264
- position: relative;
265
- cursor: pointer;
266
- }
267
-
268
- }
269
- }
270
-
271
- </style>
@@ -1,125 +0,0 @@
1
- <template>
2
- <div class="fileDetail">
3
- <!--展示附件名字、大小-->
4
- <div class="fileDetail-info">
5
- <div class="fileDetail-info-title titleHover w-text-over" @click="$emit('lookFile',file)" :title="file.title">
6
- {{ file.title }}
7
- </div>
8
- <div class="fileDetail-info-title w-text-over" v-if="showSize">
9
- {{ returnSizeText(file.size) }}
10
- </div>
11
- </div>
12
- <!--操作按钮-->
13
- <div class="fileDetail-btn clearFix">
14
- <div class="fileDetail-btn-item" v-if="file.id != -1">
15
- <a class="w-color-blue w-cursor-pointer" :href="getDownloadUrl(file)"
16
- target="_blank"><span class="bnUIcon bnUIcon-download"></span></a>
17
- </div>
18
- <div class="fileDetail-btn-item" @click="$emit('delFile',index)" v-if="isDel && !disabled">
19
- <span class="bnUIcon bnUIcon-delete w-font-more"></span>
20
- </div>
21
- </div>
22
- </div>
23
- </template>
24
- <script>
25
- export default {
26
- name: "FileDetail",
27
- props: {
28
- //附件
29
- file: Object,
30
- index: Number,
31
- // 是否允许删除
32
- isDel: false,
33
- // 是否展示附件大小
34
- showSize: false,
35
- //是否禁用
36
- disabled: Boolean,
37
- //下载类型
38
- downType: {
39
- type: String,
40
- default: 'id'
41
- }
42
- },
43
- methods: {
44
- /**
45
- * 获取下载链接
46
- * */
47
- getDownloadUrl(file) {
48
- if (this.downType === 'url') {
49
- return file.url
50
- }
51
- return !file.id ? file.url : ('/v2/attachment/' + file.id)
52
- },
53
- /**
54
- * 计算附件大小
55
- * */
56
- returnSizeText(size) {
57
- if (size && parseFloat(size) / 1024 / 1024 < 1) {
58
- return `${(parseFloat(size) / 1024).toFixed(2)}KB`
59
- } else if (size && parseFloat(size) / 1024 / 1024 >= 1) {
60
- return `${(parseFloat(size) / 1024 / 1024).toFixed(2)}MB`
61
- } else {
62
- return ''
63
- }
64
- },
65
- },
66
- }
67
- </script>
68
- <style lang="scss" scoped>
69
- @import "./../font/iconfont.css";
70
-
71
- .fileDetail {
72
- display: flex;
73
- width: 100%;
74
- align-items: center;
75
- justify-content: space-between;
76
-
77
- &-info {
78
- flex-grow: 1;
79
- max-width: calc(100% - 40px);
80
- padding-left: 8px;
81
-
82
- &-title {
83
- width: 100%;
84
- height: 22px;
85
- line-height: 22px;
86
- font-size: 12px;
87
- text-align: left;
88
- cursor: pointer;
89
-
90
- &.titleHover:hover {
91
- color: #3BA3F8;
92
- }
93
-
94
- }
95
- }
96
-
97
- &-btn {
98
- height: 22px;
99
- line-height: 22px;
100
- display: flex;
101
- flex-wrap: wrap;
102
-
103
- &-item {
104
- display: inline-block;
105
- vertical-align: middle;
106
- text-align: center;
107
- border-radius: 50%;
108
- cursor: pointer;
109
- color: #999;
110
- height: 22px;
111
- line-height: 22px;
112
-
113
- &:last-child {
114
- margin-left: 4px;
115
- }
116
- }
117
- }
118
- }
119
-
120
- .ellipsis {
121
- overflow: hidden;
122
- white-space: nowrap;
123
- text-overflow: ellipsis;
124
- }
125
- </style>
@@ -1,70 +0,0 @@
1
- <template>
2
- <teleport to="body">
3
- <div v-if="show" class="videoPreview">
4
- <div class="videoPreview-content">
5
- <span class="videoPreview-content-close" @click="show = false">
6
- <i class="close-icon">&times;</i>
7
- </span>
8
- <video ref="modalVideo" class="videoPreview-content-video" controls :src="url" autoplay></video>
9
- </div>
10
- </div>
11
- </teleport>
12
- </template>
13
-
14
- <script>
15
- export default {
16
- data() {
17
- return {
18
- url: '',
19
- show: false,
20
- }
21
- },
22
- methods: {
23
- /**
24
- * 打开播发视频
25
- * */
26
- open(url) {
27
- this.url = url;
28
- this.show = true;
29
- },
30
- }
31
- }
32
- </script>
33
-
34
- <style scoped>
35
- .videoPreview {
36
- position: fixed; /* 使用 fixed 定位 */
37
- top: 0;
38
- left: 0;
39
- width: 100vw; /* 100% 宽度 */
40
- height: 100vh; /* 100% 高度 */
41
- overflow: hidden; /* 隐藏滚动条 */
42
- display: flex; /* 使用 flexbox */
43
- justify-content: center; /* 水平居中 */
44
- align-items: center; /* 垂直居中 */
45
- background-color: rgba(0, 0, 0, 0.5); /* 可选:背景色 */
46
- z-index: 10001;
47
- }
48
-
49
- .videoPreview-content {
50
- position: relative; /* 使关闭按钮相对于内容定位 */
51
- max-width: 100%; /* 最大宽度为 100% */
52
- max-height: 100%; /* 最大高度为 100% */
53
- }
54
-
55
- .videoPreview-content-close {
56
- position: absolute; /* 绝对定位 */
57
- top: 10px; /* 距离顶部 10px */
58
- right: 10px; /* 距离右侧 10px */
59
- font-size: 30px; /* 图标大小 */
60
- color: red; /* 红色 */
61
- cursor: pointer; /* 鼠标悬停时显示为手型 */
62
- z-index: 1100;
63
- }
64
-
65
- .videoPreview-content-video {
66
- max-width: 100%; /* 视频最大宽度为 100% */
67
- max-height: 100%; /* 视频最大高度为 100% */
68
- object-fit: contain; /* 保持视频比例 */
69
- }
70
- </style>
@@ -1,160 +0,0 @@
1
- <template>
2
- <div class="BnFilter">
3
- <el-dialog title="保存筛选条件"
4
- custom-class="w-dialog-border"
5
- :append-to-body="true"
6
- :modal-append-to-body="true"
7
- v-model="show"
8
- width="540px">
9
- <div class="save-filter-condition-modal">
10
- <div class="save-filter-condition-modal-label">筛选条件名称</div>
11
- <el-input ref="input"
12
- v-model.trim="postData.name"
13
- maxlength="50"
14
- placeholder="请输入"
15
- show-word-limit></el-input>
16
- <el-checkbox v-model="postData.isCommon">
17
- 工作表中的所有成员都可以看到和使用
18
- </el-checkbox>
19
- </div>
20
- <div slot="footer" class="w-flex-right">
21
- <el-button @click="show = false">取 消</el-button>
22
- <el-button type="primary" :disabled="postData.name == ''" v-loading="loading" @click="sureSave">确 定</el-button>
23
- </div>
24
- </el-dialog>
25
- <el-button-group>
26
- <el-button @click="open">保存</el-button>
27
- <el-popover placement="bottom-start" width="360" trigger="click" ref="pop">
28
- <div class="w-flex-center w-flex-wrap w-flex-gap5 BnFilter-plane">
29
- <el-tag v-for="tag in filterList" :key="tag.id" @click="chooseFilter(tag);$refs.pop.hide()" class="w-cursor-pointer"
30
- :closable="tag.userId != -1|| (user?.isCreator || user?.isAdmin)" type="primary" @close="handleDelete(tag)">
31
- {{ tag.key }}
32
- </el-tag>
33
- <div class="w-empty" v-if="filterList.length == 0">没有数据</div>
34
- </div>
35
- <template #reference>
36
- <el-button class="w-padding-lr6" @click="searchFiler"><span class="bnUIcon bnUIcon-arrowDown w-font12 w-color-gray"></span></el-button>
37
- </template>
38
- </el-popover>
39
- </el-button-group>
40
- </div>
41
- </template>
42
- <script>
43
- export default {
44
- name: "BnFilterOption",
45
- props: {
46
- postFunc: Function,
47
- extendPost: Object,
48
- conditions: {},
49
- user:{}
50
- },
51
- data() {
52
- return {
53
- show: false,
54
- loading: false,
55
- postData: {
56
- name: '',
57
- isCommon: false,
58
- },
59
- tableId:'',
60
- filterList:[]
61
- }
62
- },
63
- methods: {
64
- //打开弹框
65
- open() {
66
- this.postData = {
67
- name: '',
68
- isCommon: false,
69
- }
70
- this.show = true;
71
- },
72
- /**
73
- * 查询筛选条件
74
- * */
75
- searchFiler(){
76
- this.loading = true;
77
- this.postFunc('/v2/projects/getUserQueryCondition', {relationTableId:-1,...this.extendPost}).then(res=>{
78
- this.loading = false;
79
- this.filterList = [];
80
- if(!res.code){
81
- this.filterList = res.data.filter(tag =>
82
- tag.key !='COLUMN_HIDE_GLOBAL_RULE_KEY' &&
83
- (tag.userId == -1 || (this.user && this.user.id == tag.userId))
84
- )
85
- }
86
- })
87
- },
88
- /**
89
- * 保存筛选条件
90
- * */
91
- sureSave() {
92
- if (!this.postData.name) {
93
- this.$message.warning("筛选条件名称不能为空");
94
- return;
95
- }
96
- this.loading = true;
97
- this.postFunc('/v2/projects/setUserQueryCondition', {...this.postData, ...this.extendPost,value: JSON.stringify(this.conditions)}).then(res => {
98
- this.loading = false;
99
- if(!res.code){
100
- this.show = false;
101
- this.searchFiler()
102
- }
103
- })
104
- },
105
- /**
106
- * 删除标签处理
107
- * */
108
- handleDelete(item) {
109
- this.$confirm(`确定要删除筛选条件"${item.key}"吗?`, '提示', {
110
- confirmButtonText: '确定',
111
- cancelButtonText: '取消',
112
- type: 'warning'
113
- }).then(() => {
114
- this.deleteItem(item);
115
- }).catch(() => {
116
- // 取消删除
117
- });
118
- },
119
- /**
120
- * 删除
121
- * */
122
- deleteItem(item) {
123
- this.loading = true;
124
- this.postFunc('/v2/projects/delUserQueryCondition/' + item.id, null,'delete').then(res => {
125
- this.loading = false;
126
- if(!res.code){
127
- this.$message.success('删除成功');
128
- this.searchFiler()
129
- }
130
- })
131
- },
132
- chooseFilter(data){
133
- this.$emit('chooseFilter',JSON.parse(data.value))
134
- }
135
- }
136
- }
137
- </script>
138
-
139
-
140
- <style scoped lang="scss">
141
- .BnFilter{
142
- display: inline-block;
143
- &-plane{
144
- max-height: 360px;
145
- overflow-y: auto;
146
- }
147
- }
148
-
149
- .save-filter-condition-modal {
150
- padding: 10px 0 49px;
151
- border-top: 1px solid #eee;
152
- &-label {
153
- font-size: 14px;
154
- font-weight: 400;
155
- color: rgba(0, 0, 0, 0.85);
156
- line-height: 22px;
157
- margin-bottom: 16px;
158
- }
159
- }
160
- </style>