@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,423 +0,0 @@
1
- <template>
2
- <div v-if="show" id="batchEditForm" class="bn-batch-form-dialog">
3
- <div class="bn-batch-form-dialog-main">
4
- <div class="bn-batch-form-dialog-main-top">
5
- <slot name="top" :select-count="selectCount">
6
- <span>
7
- 批量编辑
8
- <span class="w-color-gray w-font12">
9
- 已选择 <span class="w-color-blue">{{ selectCount }}</span> 条工单
10
- </span>
11
- </span>
12
- </slot>
13
- <span class="sIcon sIcon-close" @click="handleClose"></span>
14
- </div>
15
- <div class="w-padding20">
16
- <slot name="tip">
17
- <div class="w-tip bn-batch-form-dialog-tip">
18
- <div>
19
- <span class="bn-batch-form-dialog-tip-num">1.</span>
20
- <span class="w-color-orange">批量编辑不支持组件触发拉取,</span>
21
- <span class="w-color-gray">例如:订单号、ERP订单号、物流单号、运单号等组件不允许批量修改。</span>
22
- </div>
23
- <div>
24
- <span class="bn-batch-form-dialog-tip-num">2.</span>
25
- <span class="w-color-gray">不可编辑的工单组件不支持批量修改。</span>
26
- </div>
27
- <div>
28
- <span class="bn-batch-form-dialog-tip-num">3.</span>
29
- <span class="w-color-gray">手动添加需要修改的组件,注意:如添加的组件最后保存时值为空,则会清空工单组件数据。</span>
30
- </div>
31
- <slot name="tip-extra"></slot>
32
- </div>
33
- </slot>
34
- <div class="bn-batch-form-dialog-component-row">
35
- <BnDrop v-model="formComponent" :options="editComponents" :option-props="{ value: 'columnCode', label: 'name' }" multiple>
36
- <span class="w-color-blue w-font13 w-cursor-pointer">请选择组件</span>
37
- </BnDrop>
38
- <el-popconfirm
39
- v-if="formComponent.length > 0"
40
- title="确定要清空所有已选组件吗?"
41
- confirm-button-text="确定"
42
- cancel-button-text="取消"
43
- @confirm="clearAllComponents"
44
- >
45
- <template #reference>
46
- <span class="bn-batch-form-dialog-clear-all">
47
- <span class="sIcon sIcon-delete"></span>
48
- 一键清空组件
49
- </span>
50
- </template>
51
- </el-popconfirm>
52
- </div>
53
- </div>
54
- <div v-if="formComponent.length > 0" v-loading="loading" class="bn-batch-form-dialog-main-body">
55
- <slot name="form" :form-component="formComponent" :form-val="formVal" :loading="loading">
56
- <BnBatchForm
57
- ref="smartForm"
58
- v-model="formVal"
59
- :components="formComponent"
60
- :extend-post="mergedExtendPost"
61
- :post-func="postFunc"
62
- ></BnBatchForm>
63
- </slot>
64
- </div>
65
- <div v-if="formComponent.length == 0" class="bn-batch-form-dialog-empty">
66
- <slot name="empty">
67
- <BnEmptyTip tip="请先选择要修改的组件" />
68
- </slot>
69
- </div>
70
- <div class="bn-batch-form-dialog-main-bottom">
71
- <slot
72
- name="footer"
73
- :loading="loading"
74
- :submit="submitTask"
75
- :remember-components="rememberComponents"
76
- :select-count="selectCount"
77
- >
78
- <el-checkbox v-model="rememberComponents" @change="saveRememberFlag">记住本次编辑组件,下次默认加载</el-checkbox>
79
- <el-button
80
- type="primary"
81
- :loading="loading"
82
- @click="submitTask"
83
- >
84
- 提交
85
- </el-button>
86
- </slot>
87
- </div>
88
- </div>
89
- </div>
90
- </template>
91
- <script>
92
- import { cloneDeep } from 'lodash';
93
- import BnBatchForm from './BnBatchForm.vue';
94
-
95
- const DEFAULT_SUBMIT_URL = '/biztable/content/updateBatch';
96
-
97
- export default {
98
- name: 'BnBatchFormDialog',
99
- components: { BnBatchForm },
100
- props: {
101
- // 表信息 { tableCode, appId, tableId },appId/projectId 从中提取传给 BnBatchForm
102
- tableInfo: {
103
- type: Object,
104
- required: true,
105
- },
106
- // 工作表组件列表,组件内部会筛选可批量编辑的子集
107
- componentList: {
108
- type: Array,
109
- required: true,
110
- },
111
- // 已选工单 id 列表,用于展示数量及提交
112
- selectData: {
113
- type: Array,
114
- required: true,
115
- },
116
- // 系统来源标识,区分调用方系统,会作为扩展参数传入 BnBatchForm, 例如 费用(finance_center)、安维(anwei)
117
- source: {
118
- type: String,
119
- required: true,
120
- },
121
- // 接口请求函数,由外部传入,传给 BnBatchForm 子组件及内部提交请求共用
122
- // 调用方式:postFunc(url, data),默认 POST 请求
123
- postFunc: {
124
- type: Function,
125
- required: true,
126
- },
127
- // 用户 ID,用于记住本次编辑组件,可选
128
- userId: [String, Number],
129
- // 是否启用组件内部提交请求,false 时由业务层通过 submit 事件自行处理
130
- useInnerRequest: {
131
- type: Boolean,
132
- default: true,
133
- },
134
- },
135
- emits: ['submitSuccess', 'submit', 'close'],
136
- data() {
137
- return {
138
- show: false,
139
- loading: false,
140
- formComponent: [],
141
- editComponents: [],
142
- formVal: {},
143
- rememberComponents: false,
144
- };
145
- },
146
- computed: {
147
- mergedExtendPost() {
148
- const base = {
149
- appId: this.tableInfo?.appId,
150
- projectId: this.tableInfo?.tableId,
151
- source: this.source,
152
- };
153
- // userId 缺失时不写入 undefined
154
- if (this.userId != null) base.userId = this.userId;
155
- return base;
156
- },
157
- selectCount() {
158
- return this.selectData.length || 0;
159
- },
160
- },
161
- methods: {
162
- getColumnCode(item) {
163
- if (item == null) return null;
164
- return typeof item === 'object' ? item.columnCode : item;
165
- },
166
- extractColumnCodes(components = []) {
167
- return components.map(item => this.getColumnCode(item)).filter(code => code != null && code !== '');
168
- },
169
- restoreFormComponents(columnCodes = []) {
170
- const normalizedCodes = this.extractColumnCodes(columnCodes);
171
- if (!normalizedCodes.length || !this.editComponents.length) return;
172
- const components = normalizedCodes.map(code => this.editComponents.find(item => item.columnCode === code)).filter(Boolean);
173
- if (components.length) {
174
- this.formComponent = components;
175
- }
176
- },
177
- getStorageKey() {
178
- const tableId = this.tableInfo?.tableId;
179
- return this.userId && tableId ? `batchEditForm_components_v1_${this.userId}_${tableId}` : null;
180
- },
181
- getStoredState() {
182
- const key = this.getStorageKey();
183
- if (!key) return null;
184
- try {
185
- return JSON.parse(localStorage.getItem(key) || '{}');
186
- } catch {
187
- return {};
188
- }
189
- },
190
- // 提交成功时调用:持久化 remember 标记 + 当前组件列表
191
- saveStoredState() {
192
- const key = this.getStorageKey();
193
- if (!key) return;
194
- localStorage.setItem(
195
- key,
196
- JSON.stringify({
197
- remember: this.rememberComponents,
198
- columnCodes: this.rememberComponents ? this.extractColumnCodes(this.formComponent) : [],
199
- })
200
- );
201
- },
202
- // checkbox 变更时调用:仅持久化 remember 标记;取消勾选时同步清空已记忆的组件列表
203
- saveRememberFlag() {
204
- const key = this.getStorageKey();
205
- if (!key) return;
206
- const stored = this.getStoredState() || {};
207
- localStorage.setItem(
208
- key,
209
- JSON.stringify({
210
- ...stored,
211
- remember: this.rememberComponents,
212
- columnCodes: this.rememberComponents ? stored.columnCodes || [] : [],
213
- })
214
- );
215
- },
216
- // 读取并应用缓存状态:还原 rememberComponents 标记及已记忆的组件列表
217
- // 返回原始 stored 对象,供调用方做二次还原(如 nextTick 兜底)
218
- loadStoredState() {
219
- const stored = this.getStoredState();
220
- if (!stored || !Object.keys(stored).length) return stored;
221
- // 兼容旧版仅缓存 columnCodes 的数据
222
- if (stored.remember === undefined && stored.columnCodes?.length) {
223
- this.rememberComponents = true;
224
- } else {
225
- this.rememberComponents = !!stored.remember;
226
- }
227
- if (this.rememberComponents && stored.columnCodes?.length) {
228
- this.restoreFormComponents(stored.columnCodes);
229
- }
230
- return stored;
231
- },
232
- handleClose() {
233
- this.show = false;
234
- this.$emit('close');
235
- },
236
- clearAllComponents() {
237
- this.formComponent = [];
238
- this.formVal = {};
239
- },
240
- open() {
241
- // 筛选可批量编辑的组件:
242
- // - searchKey=2 为触发拉取类组件(订单号、运单号等),不支持批量修改
243
- // - valueEditable=1 为值不可编辑组件,不允许批量修改
244
- // - isEditable=1 为可编辑组件,仅保留此类
245
- this.editComponents = cloneDeep(
246
- (this.componentList || []).filter(i => {
247
- const extra = i.extraInfo || {};
248
- if (extra.searchKey == 2) return false;
249
- if (extra.valueEditable == 1) return false;
250
- return extra.isEditable == 1;
251
- })
252
- );
253
- this.formComponent = [];
254
- this.formVal = {};
255
- this.rememberComponents = false;
256
- // 先读取缓存再开窗,避免重复读取 localStorage
257
- const stored = this.loadStoredState();
258
- this.show = true;
259
- // 弹窗挂载后再补一次还原,避免 v-if 重建子组件时序问题
260
- if (stored?.columnCodes?.length) {
261
- this.$nextTick(() => {
262
- if (this.rememberComponents && !this.formComponent.length) {
263
- this.restoreFormComponents(stored.columnCodes);
264
- }
265
- });
266
- }
267
- },
268
- buildPostData() {
269
- return {
270
- tableCode: this.tableInfo?.tableCode,
271
- contents: this.formVal.contents,
272
- ids: this.selectData || [],
273
- };
274
- },
275
- internalBatchEditTask(data) {
276
- return this.postFunc(DEFAULT_SUBMIT_URL, data);
277
- },
278
- handleSubmitSuccess(res, postData) {
279
- this.saveStoredState();
280
- this.show = false;
281
- this.$emit('submitSuccess', res, postData);
282
- },
283
- submitTask() {
284
- // 校验表单:内置 BnBatchForm 走 checkFormContent;自定义 #form slot 时无 ref 则跳过,由业务层自行校验
285
- if (!this.validateForm()) return;
286
- const postData = this.buildPostData();
287
- if (!this.useInnerRequest) {
288
- this.saveStoredState();
289
- this.$emit('submit', postData);
290
- return;
291
- }
292
- this.loading = true;
293
- this.internalBatchEditTask(postData)
294
- .then(res => {
295
- this.loading = false;
296
- if (!res.code) {
297
- this.handleSubmitSuccess(res, postData);
298
- }
299
- })
300
- .catch(() => {
301
- this.loading = false;
302
- });
303
- },
304
- // 校验表单内容,返回 true 表示通过
305
- validateForm() {
306
- if (!this.$refs.smartForm) return true;
307
- const check = this.$refs.smartForm.checkFormContent?.();
308
- return !!check?.checked;
309
- },
310
- },
311
- };
312
- </script>
313
-
314
- <style scoped lang="scss">
315
- .bn-batch-form-dialog {
316
- position: fixed;
317
- top: 40px;
318
- left: var(--menu-width, 258px);
319
- bottom: 0;
320
- right: 0;
321
- background: rgba(0, 0, 0, 0.3);
322
- z-index: 999;
323
-
324
- &-tip {
325
- font-size: 12px;
326
- color: #999;
327
- margin-bottom: 10px;
328
- // 给 tip 区限定最大高度,内容过多时内部滚动,避免挤压底部
329
- max-height: 132px;
330
- overflow: auto;
331
-
332
- div {
333
- margin-bottom: 10px;
334
-
335
- &:last-child {
336
- margin-bottom: 0;
337
- }
338
- }
339
-
340
- &-num {
341
- font-size: 14px;
342
- font-weight: bold;
343
- color: #409eff;
344
- margin-right: 6px;
345
- }
346
- }
347
-
348
- &-empty {
349
- display: flex;
350
- flex: 1;
351
- min-height: 0;
352
- flex-direction: column;
353
- align-items: center;
354
- justify-content: center;
355
- }
356
-
357
- // main 保持原有高度不变,改为纵向 flex,子元素按内容自适应
358
- &-main {
359
- position: relative;
360
- display: flex;
361
- flex-direction: column;
362
- margin: 20px auto;
363
- height: calc(100% - 50px);
364
- width: 68%;
365
- background: #fff;
366
-
367
- &-top {
368
- flex-shrink: 0;
369
- display: flex;
370
- justify-content: space-between;
371
- align-items: center;
372
- padding: 0 20px;
373
- height: 42px;
374
- border-bottom: 1px solid #eee;
375
- color: #666;
376
-
377
- .sIcon-close {
378
- cursor: pointer;
379
- }
380
- }
381
-
382
- // body 占据剩余空间,高度自适应,内容溢出时内部滚动
383
- &-body {
384
- position: relative;
385
- flex: 1;
386
- min-height: 0;
387
- overflow: auto;
388
- width: 100%;
389
- }
390
-
391
- &-bottom {
392
- flex-shrink: 0;
393
- display: flex;
394
- justify-content: space-between;
395
- align-items: center;
396
- padding: 0 20px;
397
- height: 60px;
398
- border-top: 1px solid #eee;
399
- }
400
- }
401
-
402
- &-component-row {
403
- display: flex;
404
- align-items: center;
405
- justify-content: space-between;
406
- }
407
-
408
- &-clear-all {
409
- display: inline-flex;
410
- align-items: center;
411
- flex-shrink: 0;
412
- margin-left: 12px;
413
- font-size: 13px;
414
- color: #409eff;
415
- cursor: pointer;
416
-
417
- .sIcon {
418
- margin-right: 4px;
419
- font-size: 14px;
420
- }
421
- }
422
- }
423
- </style>
@@ -1,57 +0,0 @@
1
- <template>
2
- <div class="elfLog">
3
- <div class="elfLog-top">
4
- <img src="https://banniu-work.oss-cn-zhangjiakou.aliyuncs.com/125_10030158_26e18a1f306bad541a1713b86e6d1030.png">
5
- </div>
6
- <div class="elfLog-content">
7
- <div class="elfLog-content-time">{{ log.time }}</div>
8
- <div class="elfLog-content-warp">
9
- <span>{{log.content}}</span>
10
- </div>
11
- </div>
12
- </div>
13
- </template>
14
-
15
- <script>
16
- export default {
17
- name: "index",
18
- props: {
19
- log: Object,
20
- animation:Boolean
21
- },
22
- }
23
- </script>
24
-
25
- <style scoped lang="scss">
26
- .elfLog {
27
- position: relative;
28
- display: flex;
29
- width: 100%;
30
-
31
- &-top {
32
- img {
33
- width: 30px;
34
- height: 30px;
35
- border-radius: 50%;
36
- }
37
- }
38
-
39
- &-content {
40
- margin-left: 8px;
41
-
42
- &-time {
43
- font-size: 12px;
44
- color: #888;
45
- margin-bottom: 2px;
46
- }
47
- &-warp{
48
- padding: 4px;
49
- border-radius: 4px;
50
- background: #ffdc83;
51
- color: #000;
52
- font-size: 12px;
53
- font-family: 'Courier New', monospace;
54
- }
55
- }
56
- }
57
- </style>
@@ -1,95 +0,0 @@
1
- <!--
2
- 表单操作动作日志,点击保存的时候传给后端,定时每个月清除。就用类似gpt的风格
3
- -->
4
- <template>
5
- <div class="BnSmartElf">
6
- <div class="BnSmartElf-head">
7
- <span>建单助手</span>
8
- </div>
9
- <div class="BnSmartElf-logs">
10
- <el-scrollbar height="100%" ref="scrollbarRef">
11
- <div class="BnSmartElf-logs-item" v-for="(item,index) in logs" :key="index">
12
- <elfLog :log="item"></elfLog>
13
- </div>
14
- </el-scrollbar>
15
- </div>
16
- <div class="BnSmartElf-bac" @mouseenter="close = true" @mouseleave="close = false" @click="$emit('close')">
17
- <img src="https://banniu-work.oss-cn-zhangjiakou.aliyuncs.com/125_10030158_34d142cdae778fe5751269e3ebb078be.png" v-show="!close">
18
- <el-tooltip content="点我关闭" placement="top" :hide-after="0" :show-arrow="false">
19
- <img src="https://banniu-work.oss-cn-zhangjiakou.aliyuncs.com/125_10030158_a3e8db53df86fa2143e8d5238fc5dac0.png" v-show="close">
20
- </el-tooltip>
21
- </div>
22
- </div>
23
- </template>
24
- <script>
25
- import elfLog from "./elfLog/index.vue";
26
-
27
- export default {
28
- name: "index",
29
- components: {elfLog},
30
- props: {logs: Array},
31
- data() {
32
- return {
33
- close: false,
34
- scrollbarRef: null
35
- }
36
- },
37
- mounted() {
38
- this.scrollbarRef = this.$refs.scrollbarRef;
39
- this.scrollbarRef.scrollTo({top: 99999, behavior: "smooth"})
40
- },
41
- watch: {
42
- logs: {
43
- handler() {
44
- if (this.scrollbarRef) {
45
- this.scrollbarRef.scrollTo({top: 99999, behavior: "smooth"})
46
- }
47
- },
48
- deep: true,
49
- immediate: true,
50
- }
51
- },
52
- }
53
- </script>
54
- <style scoped lang="scss">
55
- .BnSmartElf {
56
- position: relative;
57
- width: 100%;
58
- height: 100%;
59
- padding-bottom: 16px;
60
-
61
- &-head {
62
- height: 36px;
63
- padding: 0 10px;
64
- font-size: 14px;
65
- line-height: 36px;
66
- color: #777;
67
- }
68
-
69
- &-logs {
70
- position: relative;
71
- height: calc(100% - 20px);
72
-
73
- &-item {
74
- padding: 0 10px;
75
- margin-bottom: 8px;
76
-
77
- &:last-child {
78
- margin-bottom: 200px;
79
- }
80
- }
81
- }
82
-
83
- &-bac {
84
- position: absolute;
85
- bottom: 10px;
86
- right: 10px;
87
- cursor: pointer;
88
-
89
- img {
90
- width: 70px;
91
- opacity: .7;
92
- }
93
- }
94
- }
95
- </style>