@bytenew/bn-bus-ui 1.1.463 → 1.1.465

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-BsLq8li6.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 +17 -0
  5. package/dist/chooseIPaasData-DUfjjEr2.js +391 -0
  6. package/dist/chooseIPaasData.css +1 -0
  7. package/dist/defaultSet-CR0AVrl6.js +297 -0
  8. package/dist/defaultSet.css +1 -0
  9. package/dist/fileFormData-D_Q1vylE.js +53 -0
  10. package/dist/formItemFooter-CN8bMSJS.js +108 -0
  11. package/dist/formItemFooter.css +1 -0
  12. package/dist/funcExprDialog-OOejhToM.js +139 -0
  13. package/dist/funcExprDialog.css +1 -0
  14. package/dist/index-B-VEGqoB.js +183 -0
  15. package/dist/index-BDLkgkeO.js +66 -0
  16. package/dist/index-BK-KXSCO.js +221 -0
  17. package/dist/index-BwDhrvPs.js +109 -0
  18. package/dist/index-CKX6Ga7g.js +135 -0
  19. package/dist/index-CYrbjge7.js +64 -0
  20. package/dist/index-CpTMfPTm.js +45 -0
  21. package/dist/index-D94SlRAW.js +746 -0
  22. package/dist/index-DGQrmPZ8.js +66 -0
  23. package/dist/index-D_Gjzn2Y.js +89 -0
  24. package/dist/index-DbTkT_Pc.js +118 -0
  25. package/dist/index-Dp6qwgSk.js +58 -0
  26. package/dist/index-GqIlg6mb.js +89 -0
  27. package/dist/index-MYgF6eap.js +44 -0
  28. package/dist/index-btmDCgbT.js +178 -0
  29. package/dist/index-die9_Xdx.js +51 -0
  30. package/dist/index-x2GgSFZY.js +45 -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-D9fhAvpu.js +16424 -0
  39. package/dist/install.css +1 -0
  40. package/dist/setOption-aixerIsi.js +329 -0
  41. package/dist/setOption.css +1 -0
  42. package/dist/setRelationOption-AZZQd-2m.js +775 -0
  43. package/dist/setRelationOption.css +1 -0
  44. package/package.json +7 -22
  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,378 +0,0 @@
1
- <template>
2
- <el-dialog v-model="show" width="780px" top="50px" title="分享" destroy-on-close>
3
- <div class="orderShare" v-loading="loading">
4
- <div class="orderShare-left">
5
- <el-form label-position="left" label-width="70">
6
- <el-form-item label="分享类型">
7
- <el-radio-group v-model="shareType" @change="changeShareType" :disabled="shareType=='edit'">
8
- <el-radio value="add">创建</el-radio>
9
- <el-radio value="watch">查询</el-radio>
10
- <el-radio value="edit" v-if="shareType=='edit'">编辑</el-radio>
11
- </el-radio-group>
12
- </el-form-item>
13
- <div class="orderShare-tip">
14
- <span class="bnUIcon bnUIcon-partner w-color-orange"></span>
15
- <span v-if="postData.type == 1">
16
- 若你没有可用的淘宝店铺可前往平台市场 <a class="w-color-blue"
17
- href="https://fuwu.taobao.com/ser/detail.htm?service_code=FW_GOODS-1001101627&code=FW_GOODS-1001101627"
18
- target="_blank">去订购</a>
19
- </span>
20
- <span v-if="postData.type == 3">
21
- 若你没有可用的京东POP店铺可前往平台市场 <a class="w-color-blue"
22
- href="https://fw.jd.com/main/detail/FW_GOODS-325402?rdct=true"
23
- target="_blank">去订购</a>
24
- </span>
25
- <span v-if="postData.type != 1 && postData.type != 3">
26
- 抖音(极速配置版)、京东自营生成的平台链接可以我们的班牛服务大厅统一管理
27
- <a class="w-color-blue" href="https://work.bytenew.com/app.html#/applet/serviceHallNew/shortChainManage"
28
- target="_blank">前往查看</a>
29
- </span>
30
- </div>
31
- <el-form-item label="平台类型">
32
- <el-segmented v-model="postData.type" :options="platforms" size="default" @change="changeType"/>
33
- </el-form-item>
34
- <el-form-item label="手淘" v-if="postData.type == 1">
35
- <div class="w-flex-center">
36
- <span class="bnUIcon bnUIcon-tb w-color-orange w-font24 w-margin-right5"></span>
37
- <BnSelect v-model="postData.seller" :isPage="false" @change="chooseSeller" clearable
38
- :optionProps="{value:'sellerId',label:'sellerNick'}"
39
- path-url="/v2/tableShare/getTBMiniAppShareConfig" :isInitOptions="false"
40
- :post-func="getFunc" :labelInValue="false"></BnSelect>
41
- </div>
42
- </el-form-item>
43
- <el-form-item label="抖音" v-if="postData.type == 2">
44
- <div class="w-flex-center">
45
- <span class="bnUIcon bnUIcon-dy w-color-black3 w-font24 w-margin-right5"></span>
46
- <BnSelect v-model="postData.seller" :isPage="false" @change="chooseSeller" clearable
47
- :optionProps="{value:'sellerId',label:'sellerName'}"
48
- pathUrl="/v2/dy/hall/shopList?device=dyQc" :postData="{device:'dyQc'}" :isInitOptions="false"
49
- :post-func="postFunc" :labelInValue="false"></BnSelect>
50
- </div>
51
- </el-form-item>
52
- <el-form-item label="京东POP" v-if="postData.type == 3">
53
- <div class="w-flex-center">
54
- <span class="bnUIcon bnUIcon-jd w-font24 w-margin-right5" style="color: red"></span>
55
- <BnSelect v-model="postData.seller" :isPage="false" @change="chooseSeller" clearable
56
- :optionProps="{value:'sellerId',label:'sellerName'}"
57
- pathUrl="/v2/dy/hall/shopList?device=jd" :postData="{device:'jd'}" :isInitOptions="false"
58
- :post-func="postFunc" :labelInValue="false"></BnSelect>
59
- </div>
60
- </el-form-item>
61
- <el-form-item label="京东自营" v-if="postData.type == 4">
62
- <div class="w-flex-center">
63
- <span class="bnUIcon bnUIcon-jd w-margin-right5 w-font24" style="color: red"></span>
64
- <BnSelect v-model="postData.seller" :isPage="false" @change="chooseSeller" clearable
65
- :optionProps="{value:'sellerId',label:'sellerName'}"
66
- pathUrl="/v2/dy/hall/shopList?device=jdSelf" :postData="{device:'jdSelf'}" :isInitOptions="false"
67
- :post-func="postFunc" :labelInValue="false"></BnSelect>
68
- </div>
69
- </el-form-item>
70
- <el-form-item v-if="this.url.endDate">
71
- <el-col :span="24">
72
- <el-countdown format="DD [天] HH:mm:ss [后失效]" :value="this.url.endDate">
73
- <template #title>
74
- <div class="w-flex-center">
75
- 短链到期时间:<span class="w-color-red">{{ formatDate(url.endDate) }}</span>
76
- <span class="w-color-blue w-margin-left5 w-cursor-pointer" @click="updateShortUrl">更新短链</span>
77
- </div>
78
- </template>
79
- </el-countdown>
80
- </el-col>
81
- </el-form-item>
82
- </el-form>
83
- </div>
84
- <div class="orderShare-right">
85
- <div class="w-padding-bottom10">网页端</div>
86
- <shareUrlInp :url="url.pc"></shareUrlInp>
87
- <div class="w-padding-tb10">移动端</div>
88
- <shareUrlInp :url="url.mb"></shareUrlInp>
89
- <template v-if="postData.seller">
90
- <div v-if="url.long">
91
- <div class="w-padding-tb10">平台长连接</div>
92
- <shareUrlInp :url="url.long"></shareUrlInp>
93
- </div>
94
- <div v-if="url.short">
95
- <div class="w-padding-tb10">平台短链接</div>
96
- <shareUrlInp :url="url.short"></shareUrlInp>
97
- </div>
98
- </template>
99
- </div>
100
- </div>
101
- </el-dialog>
102
- </template>
103
- <script>
104
- import shareUrlInp from "./shareUrlInp.vue";
105
-
106
- export default {
107
- name: "BnOrderShare",
108
- components: {shareUrlInp},
109
- props: {
110
- // 工单表ID
111
- tableId: {
112
- type: [String, Number],
113
- },
114
- // 应用ID
115
- appId: {
116
- type: [String, Number],
117
- },
118
- // 工单表Code
119
- tableCode: {
120
- type: String,
121
- },
122
- // 请求函数(用于生成平台链接)
123
- postFunc: {
124
- type: Function,
125
- },
126
- },
127
- data() {
128
- return {
129
- loading: false,
130
- show: false, // 弹窗显示与否
131
- shareType: 'add',//分享类型
132
- taskId: '',//编辑分享
133
- // 分享配置
134
- shareConfig: {},
135
- // 获取短链
136
- postData: {
137
- type: 1,
138
- seller: '',
139
- },
140
- platforms: [
141
- {label: '手淘', value: 1, icon: 'bnUIcon-tb w-color-orange'},
142
- {label: '抖音(极速)', value: 2, icon: 'bnUIcon-dy w-color-black3'},
143
- {label: '京东POP', value: 3, icon: 'bnUIcon-jd w-color-red'},
144
- {label: '京东自营', value: 4, icon: 'bnUIcon-jd w-color-red'},
145
- ],
146
- // 分享链接
147
- url: {
148
- // 网页端
149
- pc: '',
150
- // 移动端
151
- mb: '',
152
- // 平台长连接
153
- long: '',
154
- // 平台短链接
155
- short: '',
156
- // 过期时间
157
- endDate: '',
158
- },
159
- };
160
- },
161
- computed: {
162
- // BnSelect 需要 get 请求,将 postFunc 包装为固定 get 方式
163
- getFunc() {
164
- return (url, data) => this.postFunc(url, data, 'get');
165
- },
166
- },
167
- methods: {
168
- /**
169
- * 打开弹框
170
- * */
171
- open(taskId) {
172
- this.url = {
173
- // 网页端
174
- pc: '',
175
- // 移动端
176
- mb: '',
177
- // 平台长连接
178
- long: '',
179
- // 平台短链接
180
- short: '',
181
- // 过期时间
182
- endDate: '',
183
- }
184
- this.postData.seller = ''
185
- if (taskId) {
186
- this.shareType = 'edit'
187
- this.taskId = taskId;
188
- } else {
189
- this.shareType = 'add'
190
- this.taskId = '';
191
- }
192
- this.getShareConfig();
193
- this.show = true;
194
- },
195
- /**
196
- * 生成分享链接
197
- * */
198
- getShareUrl() {
199
- //对h5链接进行手动加密
200
- let projectId = this.tableId * 124;
201
- let app = this.appId * 124;
202
- let companyId = this.shareConfig.companyId * 124;
203
- let shareId = this.shareConfig.id * 124;
204
- this.url.pc = `https://${window.location.host}/app.html#/shareWorkTable/${this.shareType}/${app}_${projectId}_${shareId}_${companyId}`
205
- this.url.mb = `https://${window.location.host}/appMobile.html#/shareWorkTable/${this.shareType}/${app}_${projectId}_${shareId}_${companyId}?tableCode=${this.tableCode}`
206
- if (this.taskId) {
207
- this.url.pc = this.url.pc + "_" + (this.taskId * 124)
208
- this.url.mb = this.url.mb + "_" + (this.taskId * 124)
209
- }
210
- },
211
- /**
212
- * 生成分享链接
213
- * */
214
- getPlateUrl(update) {
215
- this.loading = true;
216
- let postData = {
217
- appId: this.appId,
218
- projectId: this.tableId,
219
- shareType: this.shareType,
220
- shareId: this.shareConfig.id,
221
- companyId: this.shareConfig.companyId,
222
- sellerId: this.postData.seller,
223
- tableCode: this.tableCode,
224
- // 更新
225
- forceUpdate: update || false
226
- }
227
- if (this.taskId) {
228
- postData.taskId = this.taskId;
229
- }
230
- let url = ''
231
- if (this.postData.type == 1) {
232
- url = '/v2/tableShare/createShortUrlBySellerId'
233
- // 更新短链
234
- if (update) {
235
- url = '/v2/tableShare/enforceUpdateShortUrl'
236
- }
237
- } else if (this.postData.type == 2) {
238
- url = '/v2/dy/hall/getTableLink'
239
- postData.device = 'dyQc'
240
- postData.projectName = ''
241
- } else {
242
- url = '/v2/jd/getLink'
243
- postData.sid = this.postData.seller
244
- postData.cid = this.shareConfig.companyId
245
- postData.path = ''
246
- if (this.postData.type == 4) {
247
- postData.device = 'jdSelf'
248
- }
249
- }
250
- this.postFunc(url, postData).then(res => {
251
- this.loading = false;
252
- if (!res.code) {
253
- if (this.postData.type == 1) {
254
- this.url.long = res.data.longUrl
255
- try {
256
- this.url.short = JSON.parse(res.data.shortUrl).miniapp_shorturl_create_response.result.model.short_url
257
- } catch (e) {
258
- console.log('解析短链失败', res.data.shortUrl)
259
- }
260
- this.url.endDate = new Date(res.data.expireDate)
261
- } else if (this.postData.type == 2) {
262
- this.url.short = res.data.link
263
- this.url.endDate = new Date(res.data.expireDate)
264
- } else {
265
- this.url.long = res.data.longLink
266
- }
267
- }
268
- })
269
- },
270
- /**
271
- * 获取分享配置
272
- * */
273
- getShareConfig() {
274
- this.loading = true;
275
- this.postFunc('/v2/tableShare/getTableShareConfig', {
276
- appId: this.appId,
277
- projectId: this.tableId,
278
- }).then(res => {
279
- this.loading = false;
280
- if (!res.code && res.data) {
281
- this.shareConfig = res.data
282
- this.getShareUrl();
283
- }
284
- });
285
- },
286
- /**
287
- * 切换分享类型
288
- * */
289
- changeShareType() {
290
- this.getShareUrl();
291
- if (this.postData.seller) {
292
- this.getPlateUrl();
293
- }
294
- },
295
- /**
296
- * 切换平台类型
297
- * */
298
- changeType() {
299
- this.postData.seller = '';
300
- this.url.long = '';
301
- this.url.short = '';
302
- this.url.endDate = '';
303
- },
304
- /**
305
- * 切换店铺
306
- * */
307
- chooseSeller() {
308
- if (!this.postData.seller) {
309
- this.url.long = '';
310
- this.url.short = '';
311
- this.url.endDate = '';
312
- } else {
313
- this.getPlateUrl();
314
- }
315
- },
316
- /**
317
- * 格式化日期为 YYYY-MM-DD HH:mm:ss
318
- * */
319
- formatDate(date) {
320
- if (!date) return '';
321
- const d = new Date(date);
322
- const pad = n => String(n).padStart(2, '0');
323
- return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`;
324
- },
325
- /**
326
- * 更新短链接
327
- * */
328
- updateShortUrl() {
329
- if (this.postData.type == 1) {
330
- this.$messageBox.confirm(
331
- '更新手淘短链将会使旧链接无法使用,确定更新么?',
332
- '更新提醒',
333
- {
334
- confirmButtonText: '是的',
335
- cancelButtonText: '取消',
336
- type: 'warning',
337
- }
338
- ).then(() => {
339
- this.getPlateUrl(true);
340
- })
341
- } else {
342
- this.getPlateUrl(true);
343
- }
344
- }
345
- }
346
- };
347
- </script>
348
-
349
- <style scoped lang="scss">
350
- .orderShare {
351
- display: flex;
352
- overflow-y: auto;
353
- height: 330px;
354
-
355
- &-tip {
356
- font-size: 13px;
357
- padding: 8px;
358
- background: #FAFAFA;
359
- color: #666;
360
- border: 1px solid #eee;
361
- border-radius: 4px;
362
- margin-bottom: 20px;
363
- min-height: 53px;
364
- }
365
-
366
- &-left {
367
- width: 52%;
368
- border-right: 1px solid #eee;
369
- padding-right: 10px;
370
- }
371
-
372
- &-right {
373
- width: 48%;
374
- padding-left: 10px;
375
-
376
- }
377
- }
378
- </style>
@@ -1,54 +0,0 @@
1
- <template>
2
- <div class="shareUrlInp">
3
- <div class="shareUrlInp-url">{{ url }}</div>
4
- <div><el-text class="w-cursor-pointer" type="primary" @click="copy">复制</el-text></div>
5
- <div><a class="w-cursor-pointer w-color-blue" :href="url" target="_blank">打开</a></div>
6
- <div>
7
- <el-popover placement="bottom" width="200" @show="initQc">
8
- <canvas ref="canvasRef"></canvas>
9
- <template #reference> <span class="bnUIcon bnUIcon-qc w-font26"></span></template>
10
- </el-popover>
11
- </div>
12
- </div>
13
- </template>
14
- <script>
15
- export default {
16
- name: "shareUrlInp",
17
- props: {
18
- url: String
19
- },
20
- methods:{
21
- copy(){
22
- const textarea = document.createElement('textarea');
23
- textarea.value = this.url;
24
- document.body.appendChild(textarea);
25
- textarea.select();
26
- document.execCommand('copy');
27
- document.body.removeChild(textarea);
28
- this.$message.success('复制成功');
29
- },
30
- initQc(){
31
- this.$qrcode.toCanvas(this.$refs.canvasRef, this.url, {
32
- width: 180, // 设置二维码大小
33
- });
34
- }
35
- }
36
- }
37
- </script>
38
-
39
- <style scoped lang="scss">
40
- .shareUrlInp {
41
- display: flex;
42
- justify-content: space-between;
43
- align-items: center;
44
- border: 1px solid #b0b0b0;
45
- padding: 3px 12px;
46
- border-radius: 2px;
47
-
48
- &-url {
49
- width: calc(100% - 100px);
50
- white-space: nowrap;
51
- overflow: hidden;
52
- }
53
- }
54
- </style>
@@ -1,181 +0,0 @@
1
- <template>
2
- <div class="BnRadio" :class="{'disabled': disabled}" @click="handleClick">
3
- <span class="BnRadio-icon bnUIcon" :class="{ 'bnUIcon-unChoose': !isCheck, 'bnUIcon-choose': isCheck }"/>
4
- <slot>
5
- <span class="BnRadio-label" v-if="title" :style="labelStyle" :title="title">{{ title }}</span>
6
- </slot>
7
- </div>
8
- </template>
9
-
10
- <script>
11
- export default {
12
- name: "BnRadio",
13
- props: {
14
- modelValue: [Boolean, String, Number, Object],
15
- trueData: [Boolean, String, Number, Object],
16
- falseData: [Boolean, String, Number],
17
- // option基础结构
18
- optionProps: {
19
- default() {
20
- return {
21
- value: 'id',
22
- label: 'name'
23
- };
24
- }
25
- },
26
- isChecked: Function,
27
- onClick: Function,
28
- disabled: {
29
- type: Boolean,
30
- default: false
31
- },
32
- // 允许取消
33
- allowCancel: {
34
- type: Boolean,
35
- default: true
36
- },
37
- label: String,
38
- labelStyle: {
39
- type: Object,
40
- default: () => ({})
41
- }
42
- },
43
- computed: {
44
- title() {
45
- let label = this.label;
46
- if (typeof this.trueData == 'object') {
47
- label = this.trueData[this.optionProps.label]
48
- }
49
- return label;
50
- },
51
- isCheck() {
52
- if (this.isChecked) {
53
- const result = this.isChecked({
54
- value: this.modelValue,
55
- trueData: this.trueData,
56
- falseData: this.falseData
57
- });
58
- return typeof result === "boolean" ? result : result > -1;
59
- } else {
60
- return this.check();
61
- }
62
- },
63
- value: {
64
- get() {
65
- return this.modelValue;
66
- },
67
- set(val) {
68
- this.$emit("update:modelValue", val);
69
- }
70
- }
71
- },
72
- methods: {
73
- /**
74
- * 组件默认判断
75
- * */
76
- check() {
77
- if (typeof this.trueData == 'object') {
78
- return this.modelValue[this.optionProps.value] == this.trueData[this.optionProps.value]
79
- } else {
80
- return this.modelValue == this.trueData;
81
- }
82
- },
83
- /**
84
- * 点击事件
85
- * */
86
- handleClick() {
87
- if (this.disabled) {
88
- this.emitClick();
89
- return;
90
- }
91
- if (this.isCheck) {
92
- // 选中后不允许取消,直接回
93
- if (!this.allowCancel) {
94
- return;
95
- }
96
- if (typeof this.trueData == 'object') {
97
- this.value = {}
98
- } else if (typeof this.trueData == 'boolean') {
99
- this.value = false;
100
- } else if (typeof this.trueData == 'string') {
101
- this.value = '';
102
- } else if (typeof this.trueData == 'number') {
103
- this.value = '';
104
- } else if (this.falseData) {
105
- this.value = this.falseData;
106
- }
107
- } else {
108
- this.value = this.trueData;
109
- }
110
- this.$emit("change", {
111
- value: this.modelValue,
112
- trueData: this.trueData,
113
- falseData: this.falseData
114
- });
115
- this.emitClick();
116
- },
117
- /**
118
- * 点击事件透出
119
- * */
120
- emitClick() {
121
- if (this.onClick) {
122
- this.onClick({
123
- value: this.modelValue,
124
- trueData: this.trueData,
125
- falseData: this.falseData
126
- });
127
- }
128
- }
129
- }
130
- };
131
- </script>
132
-
133
- <style scoped>
134
- @import "./../font/iconfont.css";
135
-
136
- .BnRadio {
137
- display: inline-flex;
138
- align-items: center;
139
- height: 22px;
140
- line-height: 22px;
141
- cursor: pointer;
142
- }
143
-
144
- .BnRadio.disabled {
145
- cursor: not-allowed;
146
- }
147
-
148
- .BnRadio.disabled > :nth-child(2) {
149
- opacity: 0.2;
150
- }
151
-
152
- .BnRadio-icon {
153
- color: #888;
154
-
155
- &.bnUIcon-choose {
156
- color: #1890ff;
157
- }
158
- }
159
-
160
- .disabled .BnRadio-icon {
161
- color: #ccc;
162
-
163
- &.bnUIcon-choose {
164
- color: #71b1f1;
165
- }
166
- }
167
-
168
- .BnRadio-label {
169
- box-sizing: content-box !important;
170
- display: inline-block;
171
- max-width: calc(100% - 22px);
172
- padding: 0 8px;
173
- font-size: 14px;
174
- color: #444;
175
- user-select: none;
176
- white-space: nowrap;
177
- overflow: hidden;
178
- text-overflow: ellipsis;
179
- }
180
- </style>
181
-