@bytenew/bn-bus-ui 1.1.461 → 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-C14i_zJO.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-Cl_5qkFA.js +0 -391
  130. package/dist/chooseIPaasData.css +0 -1
  131. package/dist/defaultSet-I4xpf8a4.js +0 -297
  132. package/dist/defaultSet.css +0 -1
  133. package/dist/fileFormData-D_Q1vylE.js +0 -53
  134. package/dist/formItemFooter-CTA7rDtV.js +0 -108
  135. package/dist/formItemFooter.css +0 -1
  136. package/dist/funcExprDialog-Cm5BiRM3.js +0 -139
  137. package/dist/funcExprDialog.css +0 -1
  138. package/dist/index-B6b4uj8v.js +0 -51
  139. package/dist/index-BWdkDTbz.js +0 -109
  140. package/dist/index-BdZ1zOap.js +0 -89
  141. package/dist/index-BdzNjjMC.js +0 -64
  142. package/dist/index-BfpZqab2.js +0 -66
  143. package/dist/index-BmkiB4hr.js +0 -66
  144. package/dist/index-Br1sqCoo.js +0 -58
  145. package/dist/index-C9qrl-yc.js +0 -183
  146. package/dist/index-CXFJXCn5.js +0 -746
  147. package/dist/index-DF114jZq.js +0 -135
  148. package/dist/index-DFPfZ_Il.js +0 -178
  149. package/dist/index-DSEtu7TN.js +0 -44
  150. package/dist/index-Did0UUWV.js +0 -221
  151. package/dist/index-DrPj-tmI.js +0 -45
  152. package/dist/index-DzDf9s2W.js +0 -89
  153. package/dist/index-LnjudNEI.js +0 -118
  154. package/dist/index-ObCfCmDT.js +0 -45
  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-C-scqkds.js +0 -23103
  163. package/dist/install.css +0 -1
  164. package/dist/setOption-CSnWzOny.js +0 -329
  165. package/dist/setOption.css +0 -1
  166. package/dist/setRelationOption-CJcHdfaa.js +0 -5217
  167. package/dist/setRelationOption.css +0 -1
@@ -0,0 +1,108 @@
1
+ <!--通过选择成员来筛选操作日志-->
2
+ <template>
3
+ <BnDrop ref="bnDrop" pathUrl="/v2/project/column/select"
4
+ :postData="postData" :postFunc="postFunc" :labelInValue="false"
5
+ :optionProps="{value:'id',label:'title'}"
6
+ searchKey="condition" :options="userConst" multiple v-model="val"
7
+ :pageProps="{pageNum: 'pageNo',pageSize: 'pageSize'}">
8
+ <slot>
9
+ <el-button link class="filter-btn">
10
+ <span class="w-color-blue"><span class="bnUIcon bnUIcon-search"></span> 筛选</span>
11
+ <span class="w-color-gray" v-if="modelValue.length">(已选{{modelValue.length}}人)</span>
12
+ <span class="bnUIcon bnUIcon-clear filter-btn-icon w-color-red w-margin-left4" v-if="modelValue.length" @click.stop="clear()"></span>
13
+ </el-button>
14
+ </slot>
15
+ <template v-slot:dropdown-bottom>
16
+ <div class="w-text-right w-padding-lr10 w-padding-tb4">
17
+ <el-button link @click="val = [];" v-if="val.length">清空</el-button>
18
+ <el-button @click="cancel()">取消</el-button>
19
+ <el-button type="primary" @click="sure()">确定</el-button>
20
+ </div>
21
+ </template>
22
+ </BnDrop>
23
+
24
+ </template>
25
+ <script>
26
+ import {userConst} from "../../utils/index.js";
27
+ import {cloneDeep} from "lodash";
28
+
29
+ export default {
30
+ name: "searchLogByUser",
31
+ props: {
32
+ modelValue:{
33
+ type:Array,
34
+ default(){
35
+ return []
36
+ }
37
+ },
38
+ userByTable:Boolean,
39
+ // 表信息
40
+ tableInfo: Object,
41
+ // 操作列表
42
+ operateList: {
43
+ type:Array,
44
+ default(){
45
+ return []
46
+ }
47
+ },
48
+ // 底部tabList
49
+ tabPaneList: {
50
+ type:Array,
51
+ default(){
52
+ return []
53
+ }
54
+ },
55
+ // 接口请求外部转发
56
+ postFunc: Function,
57
+ },
58
+ data(){
59
+ return{
60
+ userConst,
61
+ val:[],
62
+ postData:{
63
+ "appId": this.tableInfo.appId,
64
+ "projectId": this.tableInfo.tableId,
65
+ "selectParams": this.userByTable?'':"{\"userColId\":\"-1\"}",
66
+ "type": "user",
67
+ "ids": "{\"field\":\"\",\"type\":\"user\",\"table\":\"\"}",
68
+ "condition": "",
69
+ },
70
+ }
71
+ },
72
+ methods:{
73
+ /**
74
+ * 确定
75
+ * */
76
+ sure() {
77
+ this.$emit("update:modelValue", cloneDeep(this.val));
78
+ this.$refs.bnDrop.close();
79
+ },
80
+ /**
81
+ * 取消
82
+ * */
83
+ cancel() {
84
+ this.val = cloneDeep(this.modelValue)
85
+ this.$refs.bnDrop.close();
86
+ },
87
+ /**
88
+ * 清空
89
+ * */
90
+ clear() {
91
+ this.val = []
92
+ this.$emit("update:modelValue", cloneDeep(this.val));
93
+ },
94
+ }
95
+ }
96
+ </script>
97
+ <style scoped lang="scss">
98
+ .filter-btn {
99
+ .filter-btn-icon {
100
+ display: none;
101
+ }
102
+ &:hover {
103
+ .filter-btn-icon {
104
+ display: inline;
105
+ }
106
+ }
107
+ }
108
+ </style>
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <div class="w-padding-tb10">
3
+ <BnEmptyTip v-if="!logList.length"></BnEmptyTip>
4
+ <el-timeline>
5
+ <el-timeline-item placement="top" v-for="(activity, index) in logList" :key="index"
6
+ :color="index == 0?'#0bbd87':'#DADADA'" :timestamp="activity.gmtCreate">
7
+ <el-card>
8
+ <div class="w-text-over-two w-color-black6 w-font13" :title="activity.content">{{
9
+ activity.content
10
+ }}
11
+ </div>
12
+ </el-card>
13
+ </el-timeline-item>
14
+ </el-timeline>
15
+ </div>
16
+ </template>
17
+ <script>
18
+
19
+ export default {
20
+ name: "orderLogs",
21
+ props: {
22
+ tableInfo: {},
23
+ id: {},
24
+ // 传入成员id筛选这个成员的操作记录
25
+ filterUsers: {},
26
+ // 接口请求外部转发
27
+ postFunc: Function,
28
+ },
29
+ data() {
30
+ return {
31
+ taskLog: [],
32
+ }
33
+ },
34
+ created() {
35
+ this.taskLog = [];
36
+ let postData = {
37
+ tableCode: this.tableInfo.tableCode,
38
+ id: this.id
39
+ }
40
+ // 获取工单操作记录
41
+ this.postFunc('/biztable/content/selectLogsByTaskId', postData).then(res => {
42
+ if (!res.code) {
43
+ this.taskLog = res.data;
44
+ }
45
+ })
46
+ },
47
+ computed:{
48
+ logList(){
49
+ return this.filterUsers.length>0?this.taskLog.filter(i=>this.filterUsers.includes(String(i.ownerId))):this.taskLog
50
+ }
51
+ },
52
+ }
53
+ </script>
@@ -0,0 +1,41 @@
1
+ <template>
2
+ <div class="showSubFormDetail">
3
+ <!--展示表格,或者时间线-->
4
+ <showTimeLine :columns="column.moduleDefinition" :tableData="tableData"
5
+ v-if="column.columnCode == 'serve_progress' || column.columnCode == 'tracking_back'"></showTimeLine>
6
+ <showChildTable :columns="column.moduleDefinition" :tableData="tableData"
7
+ :maxHeight="maxHeight" v-else></showChildTable>
8
+ </div>
9
+ </template>
10
+ <script>
11
+ import showChildTable from "./showChildTable.vue";
12
+ import showTimeLine from "./showTimeLine.vue";
13
+ import {tidyShowSubDataFile} from "../../../utils/index.js";
14
+
15
+ export default {
16
+ name: 'showSubFormDetail',
17
+ components: {showChildTable, showTimeLine},
18
+ props: {
19
+ column: Object,
20
+ row: Object,
21
+ maxHeight:{
22
+ default:'100%'
23
+ },
24
+ },
25
+ data() {
26
+ return {
27
+ show: false,
28
+ tableData: [],
29
+ }
30
+ },
31
+ created() {
32
+ this.tableData = tidyShowSubDataFile(this.column, this.row)
33
+ },
34
+ }
35
+ </script>
36
+
37
+ <style scoped lang="scss">
38
+ .showSubFormDetail {
39
+ max-height: 100%;
40
+ }
41
+ </style>
@@ -0,0 +1,61 @@
1
+ <template>
2
+ <tableCellCopy ref="childTableCopy"></tableCellCopy>
3
+ <vxe-table border="full"
4
+ :row-config="{ keyField: 'id' }"
5
+ :header-cell-config="{height: 36}"
6
+ resizable :tooltip-config="{}"
7
+ @cell-mouseenter="onMouseEvent"
8
+ @cell-mouseleave="onMouseEvent"
9
+ :scroll-x="{ enabled: true, gt: 10 }"
10
+ :scroll-y="{ enabled: true, gt: 30 }"
11
+ :resizable-config="{ minWidth: 120 }"
12
+ ref="childTable" :data="tableData"
13
+ min-height="40" :max-height="maxHeight">
14
+ <vxe-column type="seq" width="60"></vxe-column>
15
+ <vxe-column :title="column.name" :field="column.columnCode" min-width="160" v-for="(column,index) in columns" :key="index">
16
+ <template #default="scope" v-if="column.behaviorType == 10">
17
+ <BnFileView v-if="scope.row.inside[column.columnCode]" :file-list="scope.row.inside[column.columnCode]"
18
+ :width="32" :is-mini="true" :no-warp="true"></BnFileView>
19
+ </template>
20
+ </vxe-column>
21
+ </vxe-table>
22
+ </template>
23
+
24
+ <script>
25
+ import tableCellCopy from "./tableCellCopy.vue";
26
+
27
+ export default {
28
+ name: 'showChildTable',
29
+ components: {tableCellCopy},
30
+ props: {
31
+ columns: Array,
32
+ maxHeight: {
33
+ default: '100%'
34
+ },
35
+ tableData: Array,
36
+ },
37
+ methods: {
38
+ /**
39
+ * 鼠标移入移出单元格,展示隐藏复制按钮
40
+ * @param {Event} e 事件对象
41
+ */
42
+ onMouseEvent(scope) {
43
+ // 当鼠标悬浮到单元格时,再加复制按钮
44
+ let e = scope.$event;
45
+ // 鼠标离开
46
+ if (e.type === "mouseleave") {
47
+ this.$refs.childTableCopy?.onHide()
48
+ } else {
49
+ let data = {
50
+ column: {columnCode: this.columns[scope.columnIndex - 1]?.columnCode},
51
+ row: scope.row
52
+ }
53
+ // 有值再显示
54
+ if (data.row[data.column.columnCode]) {
55
+ this.$refs.childTableCopy?.onShow(scope.cell, data)
56
+ }
57
+ }
58
+ },
59
+ }
60
+ };
61
+ </script>
@@ -0,0 +1,131 @@
1
+ <template>
2
+ <div class="showTimeLine">
3
+ <el-timeline style="max-width: 800px;">
4
+ <el-timeline-item v-for="(item,index) in displayData"
5
+ :key="index" :timestamp="item.serve_status+'&nbsp;&nbsp;'+item.operator_time" placement="top"
6
+ :color="index == 0?'#1677FF':'#DADADA'">
7
+ <el-card body-class="showTimeLine-card">
8
+ <el-row :gutter="20">
9
+ <template v-for="(column,i) in stringList" :key="i">
10
+ <el-col :span="12" v-if="item[column.columnCode]" class="showTimeLine-box">
11
+ <div class="showTimeLine-box-title">{{column.name}}:</div>
12
+ <el-popover :content="item[column.columnCode]" placement="top-end" width="680" :disabled="!isTextOverflow(item[column.columnCode])">
13
+ <template #reference>
14
+ <div class="showTimeLine-box-text w-text-over-three" ref="textRef">{{item[column.columnCode]}}</div>
15
+ </template>
16
+ </el-popover>
17
+ </el-col>
18
+ </template>
19
+ </el-row>
20
+ <template v-for="(column,i) in imgList" :key="i">
21
+ <el-row :gutter="20" v-if="item[column.columnCode]">
22
+ <el-col :span="24" v-if="item[column.columnCode]" class="showTimeLine-box">
23
+ <div class="showTimeLine-box-title">{{column.name}}:</div>
24
+
25
+ <div class="showTimeLine-box-file"><BnFileView :file-list="item.inside[column.columnCode]" :is-mini="true" :no-warp="true" width="50px" /></div>
26
+ </el-col>
27
+ </el-row>
28
+ </template>
29
+ <template v-for="(column,i) in editorList" :key="i">
30
+ <el-row :gutter="20" v-if="item[column.columnCode]">
31
+ <el-col :span="24" v-if="item[column.columnCode]" class="showTimeLine-box">
32
+ <div class="showTimeLine-box-title">{{column.name}}:</div>
33
+ <div v-html="item[column.columnCode]"></div>
34
+ </el-col>
35
+ </el-row>
36
+ </template>
37
+
38
+ </el-card>
39
+ </el-timeline-item>
40
+ </el-timeline>
41
+
42
+ <!-- 查看更多/收起按钮 -->
43
+ <div v-if="tableData.length > 3" class="w-text-center">
44
+ <el-button type="primary" @click="toggleExpand" link>
45
+ {{ isExpanded ? '收起' : '查看更多' }}
46
+ </el-button>
47
+ </div>
48
+ </div>
49
+ </template>
50
+ <script>
51
+ export default {
52
+ name: "showTimeLine",
53
+ props: {
54
+ columns: Array,
55
+ tableData: Array,
56
+ },
57
+ data() {
58
+ return {
59
+ isExpanded: false
60
+ }
61
+ },
62
+ computed: {
63
+ displayData() {
64
+ if (this.isExpanded) {
65
+ return this.tableData
66
+ }
67
+ return this.tableData.slice(0, 3)
68
+ },
69
+ editorList() {
70
+ let list = this.columns.filter(i=> [11].includes(i.behaviorType))
71
+ return list
72
+ },
73
+ stringList() {
74
+ let list = this.columns.filter(i=> [1,2,3,4,5,6,7,8,9,12,14,15].includes(i.behaviorType) && !['serve_status','operator_time'].includes(i.columnCode))
75
+ return list
76
+ },
77
+ imgList() {
78
+ let list = this.columns.filter(i=>i.behaviorType == 10)
79
+ return list
80
+ },
81
+ },
82
+ methods: {
83
+ toggleExpand() {
84
+ this.isExpanded = !this.isExpanded
85
+ },
86
+ isTextOverflow(text) {
87
+ if (!text) return false
88
+ // 简单判断:如果文本长度超过50个字符,认为可能超出显示范围
89
+ return text.length > 50
90
+ }
91
+ }
92
+ }
93
+ </script>
94
+
95
+
96
+ <style scoped lang="scss">
97
+ .showTimeLine {
98
+ position: relative;
99
+ width: 100%;
100
+ height: 100%;
101
+
102
+ :deep(.showTimeLine-card) {
103
+ padding:20px 12px;
104
+ }
105
+ &-box{
106
+ display: flex;
107
+ margin-bottom: 20px;
108
+ &-title{
109
+ line-height: 20px;
110
+ font-size: 12px;
111
+ color: #888;
112
+ white-space: nowrap;
113
+ }
114
+ &-text{
115
+ line-height: 20px;
116
+ font-size: 12px;
117
+ color: #666;
118
+ white-space: pre-line;
119
+ }
120
+ &-file{
121
+ max-width: calc(100% - 120px);
122
+ overflow-x: hidden;
123
+ }
124
+ }
125
+ &-toggle {
126
+ text-align: center;
127
+ margin-top: 20px;
128
+ margin-bottom: 20px;
129
+ }
130
+ }
131
+ </style>
@@ -0,0 +1,84 @@
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>