@bytenew/bn-bus-ui 1.1.462 → 1.1.463

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/install.js +134 -0
  2. package/package.json +20 -4
  3. package/packages/BnAddress/index.vue +141 -0
  4. package/packages/BnAddressParse/index.vue +75 -0
  5. package/packages/BnAdvancedFilter/BnFilterView.vue +145 -0
  6. package/packages/BnAdvancedFilter/index.vue +345 -0
  7. package/packages/BnAdvancedFilter/util.js +171 -0
  8. package/packages/BnCascader/BnCascader.vue +543 -0
  9. package/packages/BnCascader/BnCascaderPanel.vue +1331 -0
  10. package/packages/BnCascader/cascaderDisplay.js +102 -0
  11. package/packages/BnCheck/BnCheck.vue +253 -0
  12. package/packages/BnColumnConfig/columnConfigDialog.vue +134 -0
  13. package/packages/BnColumnConfig/component/childrenFormSetting/assocTable.vue +143 -0
  14. package/packages/BnColumnConfig/component/childrenFormSetting/assocTableSearch.vue +314 -0
  15. package/packages/BnColumnConfig/component/childrenFormSetting/index.vue +243 -0
  16. package/packages/BnColumnConfig/component/defaultSet/defaultSet.vue +114 -0
  17. package/packages/BnColumnConfig/component/defaultSet/stringDefault.vue +210 -0
  18. package/packages/BnColumnConfig/component/funcExprDialog/funcExprDialog.vue +126 -0
  19. package/packages/BnColumnConfig/component/packageFilter/index.vue +141 -0
  20. package/packages/BnColumnConfig/component/paraExplainSet/index.vue +156 -0
  21. package/packages/BnColumnConfig/component/setOption/setOption.vue +321 -0
  22. package/packages/BnColumnConfig/component/setRelationOption/ConditionList.vue +277 -0
  23. package/packages/BnColumnConfig/component/setRelationOption/LevelHeader.vue +144 -0
  24. package/packages/BnColumnConfig/component/setRelationOption/setRelationOption.vue +642 -0
  25. package/packages/BnColumnConfig/data.js +129 -0
  26. package/packages/BnColumnConfig/index.scss +23 -0
  27. package/packages/BnColumnConfig/index.vue +309 -0
  28. package/packages/BnCondVal/BnCondVal.vue +112 -0
  29. package/packages/BnCondVal/itemVal/dateRegVal.vue +39 -0
  30. package/packages/BnCondVal/itemVal/dateVal.vue +39 -0
  31. package/packages/BnCondVal/itemVal/numRegVal.vue +67 -0
  32. package/packages/BnCondVal/itemVal/numVal.vue +44 -0
  33. package/packages/BnCondVal/itemVal/relationVal.vue +73 -0
  34. package/packages/BnCondVal/itemVal/selectColumnVal.vue +58 -0
  35. package/packages/BnCondVal/itemVal/selectVal.vue +59 -0
  36. package/packages/BnCondVal/itemVal/stringVal.vue +156 -0
  37. package/packages/BnCondition/index.vue +551 -0
  38. package/packages/BnCondition/util.js +232 -0
  39. package/packages/BnDatePicker/BnDatePicker.vue +194 -0
  40. package/packages/BnDrop/BnDrop.vue +917 -0
  41. package/packages/BnEmptyTip/BnEmptyTip.vue +107 -0
  42. package/packages/BnExportOrder/BnExportOrder.vue +241 -0
  43. package/packages/BnExportOrder/validatorCode.vue +94 -0
  44. package/packages/BnFileView/BnFileView.vue +271 -0
  45. package/packages/BnFileView/FileDetail.vue +125 -0
  46. package/packages/BnFileView/videoPreview.vue +70 -0
  47. package/packages/BnFilterOption/BnFilterOption.vue +160 -0
  48. package/packages/BnFunExpr/BnFunExpr.vue +608 -0
  49. package/packages/BnImportOrder/BnImportOrder.vue +323 -0
  50. package/packages/BnImportTemplate/BnImportTemplate.vue +866 -0
  51. package/packages/BnImportTemplate/assets/merge_tip_img.png +0 -0
  52. package/packages/BnImportTemplate/assets/sheet_tip.png +0 -0
  53. package/packages/BnImportTemplate/assets/xls.png +0 -0
  54. package/packages/BnImportTemplate/components/ImportTemplateTrigger.vue +198 -0
  55. package/packages/BnImportTemplate/components/TemplateEditDialog.vue +340 -0
  56. package/packages/BnImportTemplate/components/TemplateFieldsConfig.vue +401 -0
  57. package/packages/BnImportTemplate/components/TemplateListDialog.vue +297 -0
  58. package/packages/BnInpNum/BnInpNum.vue +165 -0
  59. package/packages/BnMenus/BnMenus.vue +502 -0
  60. package/packages/BnMenus/MenuItem.vue +321 -0
  61. package/packages/BnOrderCard/BnOrderCard.vue +389 -0
  62. package/packages/BnOrderCard/orderRemark.vue +178 -0
  63. package/packages/BnOrderCard/util.js +94 -0
  64. package/packages/BnOrderDetail/BnOrderDetail.vue +338 -0
  65. package/packages/BnOrderDetail/filterLogByUser.vue +108 -0
  66. package/packages/BnOrderDetail/orderLogs.vue +53 -0
  67. package/packages/BnOrderDetail/showSubForm/index.vue +41 -0
  68. package/packages/BnOrderDetail/showSubForm/showChildTable.vue +61 -0
  69. package/packages/BnOrderDetail/showSubForm/showTimeLine.vue +131 -0
  70. package/packages/BnOrderDetail/showSubForm/tableCellCopy.vue +84 -0
  71. package/packages/BnOrderShare/index.vue +378 -0
  72. package/packages/BnOrderShare/shareUrlInp.vue +54 -0
  73. package/packages/BnRadio/BnRadio.vue +181 -0
  74. package/packages/BnRelation/BnRelation.vue +120 -0
  75. package/packages/BnSelect/BnSelect.vue +485 -0
  76. package/packages/BnSmartForm/BnBatchForm.vue +334 -0
  77. package/packages/BnSmartForm/BnBatchFormDialog.vue +423 -0
  78. package/packages/BnSmartForm/BnSmartElf/elfLog/index.vue +57 -0
  79. package/packages/BnSmartForm/BnSmartElf/index.vue +95 -0
  80. package/packages/BnSmartForm/BnSmartFormPsychic.js +629 -0
  81. package/packages/BnSmartForm/BnSmartFormUtil.js +524 -0
  82. package/packages/BnSmartForm/addressForm/index.vue +73 -0
  83. package/packages/BnSmartForm/checkboxForm/index.vue +99 -0
  84. package/packages/BnSmartForm/childrenForm/childFormFile.vue +237 -0
  85. package/packages/BnSmartForm/childrenForm/childrenFormBody.vue +260 -0
  86. package/packages/BnSmartForm/childrenForm/index.vue +110 -0
  87. package/packages/BnSmartForm/childrenForm/searchInventory.vue +115 -0
  88. package/packages/BnSmartForm/chooseAssocTable/chooseAssocTable.vue +451 -0
  89. package/packages/BnSmartForm/chooseAssocTable/chooseChildGood.vue +229 -0
  90. package/packages/BnSmartForm/chooseAssocTable/tableCellCopy.vue +84 -0
  91. package/packages/BnSmartForm/chooseChildOrder/chooseChildOrder.vue +158 -0
  92. package/packages/BnSmartForm/chooseIPaasData/chooseIPaasData.vue +307 -0
  93. package/packages/BnSmartForm/chooseIPaasData/tableCellCopy.vue +84 -0
  94. package/packages/BnSmartForm/choosePackage/choosePackage.vue +361 -0
  95. package/packages/BnSmartForm/dateDualForm/index.vue +37 -0
  96. package/packages/BnSmartForm/dateForm/index.vue +38 -0
  97. package/packages/BnSmartForm/fileForm/fileFormData.js +50 -0
  98. package/packages/BnSmartForm/fileForm/index.vue +240 -0
  99. package/packages/BnSmartForm/formItemFooter/formItemFooter.vue +38 -0
  100. package/packages/BnSmartForm/formItemTop/formItemTop.vue +42 -0
  101. package/packages/BnSmartForm/index.vue +1201 -0
  102. package/packages/BnSmartForm/numberForm/index.vue +63 -0
  103. package/packages/BnSmartForm/radioForm/index.vue +72 -0
  104. package/packages/BnSmartForm/receiveForm/index.vue +112 -0
  105. package/packages/BnSmartForm/relationForm/index.vue +82 -0
  106. package/packages/BnSmartForm/scoreForm/index.vue +39 -0
  107. package/packages/BnSmartForm/selectForm/index.vue +55 -0
  108. package/packages/BnSmartForm/showValForm/index.vue +42 -0
  109. package/packages/BnSmartForm/showValForm/showValFormTable.vue +104 -0
  110. package/packages/BnSmartForm/smartFormsCommon.scss +43 -0
  111. package/packages/BnSmartForm/stringForm/index.vue +170 -0
  112. package/packages/BnVirtPopover/index.vue +319 -0
  113. package/packages/BnWebLog/BnWebLog.vue +140 -0
  114. package/packages/BnWorkSettingDrop/advancedOptions.js +112 -0
  115. package/packages/BnWorkSettingDrop/benBenAIUtil.js +89 -0
  116. package/packages/BnWorkSettingDrop/index.vue +292 -0
  117. package/packages/font/iconfont.css +243 -0
  118. package/packages/font/iconfont.ttf +0 -0
  119. package/packages/font/iconfont.woff +0 -0
  120. package/packages/font/iconfont.woff2 +0 -0
  121. package/utils/addressParse-old.js +645 -0
  122. package/utils/addressParse.js +735 -0
  123. package/utils/config.js +68 -0
  124. package/utils/index.js +1171 -0
  125. package/dist/assocTableSearch-CmzOXI5w.js +0 -349
  126. package/dist/assocTableSearch.css +0 -1
  127. package/dist/bn-bus-ui.es.js +0 -65
  128. package/dist/bn-bus-ui.umd.js +0 -49
  129. package/dist/chooseIPaasData-jkTJEMKT.js +0 -391
  130. package/dist/chooseIPaasData.css +0 -1
  131. package/dist/defaultSet-CiYuSOzT.js +0 -297
  132. package/dist/defaultSet.css +0 -1
  133. package/dist/fileFormData-D_Q1vylE.js +0 -53
  134. package/dist/formItemFooter-BpnVUUgV.js +0 -108
  135. package/dist/formItemFooter.css +0 -1
  136. package/dist/funcExprDialog-BMc-n5FL.js +0 -139
  137. package/dist/funcExprDialog.css +0 -1
  138. package/dist/index-8GQJARcF.js +0 -44
  139. package/dist/index-8apT0r8m.js +0 -66
  140. package/dist/index-BOFu3qAH.js +0 -183
  141. package/dist/index-BSKXuSid.js +0 -89
  142. package/dist/index-BhYvDd_Q.js +0 -45
  143. package/dist/index-BhqkeVFc.js +0 -45
  144. package/dist/index-CK7_Ou7F.js +0 -89
  145. package/dist/index-Cfb8D3Fg.js +0 -58
  146. package/dist/index-D1fGD0mX.js +0 -51
  147. package/dist/index-DE_eQGbT.js +0 -746
  148. package/dist/index-DfgiBqzS.js +0 -221
  149. package/dist/index-Dobi0ms9.js +0 -66
  150. package/dist/index-DuyQNxe0.js +0 -118
  151. package/dist/index-DxpJkrN7.js +0 -64
  152. package/dist/index-FGHeG46m.js +0 -109
  153. package/dist/index-P2M7CUTe.js +0 -178
  154. package/dist/index-xCz2zysE.js +0 -135
  155. package/dist/index.css +0 -1
  156. package/dist/index2.css +0 -1
  157. package/dist/index3.css +0 -1
  158. package/dist/index4.css +0 -1
  159. package/dist/index5.css +0 -1
  160. package/dist/index6.css +0 -1
  161. package/dist/index7.css +0 -1
  162. package/dist/install--7IU60oV.js +0 -23103
  163. package/dist/install.css +0 -1
  164. package/dist/setOption-DehYZpZr.js +0 -329
  165. package/dist/setOption.css +0 -1
  166. package/dist/setRelationOption-BL-AFUoF.js +0 -5217
  167. package/dist/setRelationOption.css +0 -1
@@ -0,0 +1,271 @@
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>
@@ -0,0 +1,125 @@
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>
@@ -0,0 +1,70 @@
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>
@@ -0,0 +1,160 @@
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>