@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.
- package/install.js +134 -0
- package/package.json +20 -4
- package/packages/BnAddress/index.vue +141 -0
- package/packages/BnAddressParse/index.vue +75 -0
- package/packages/BnAdvancedFilter/BnFilterView.vue +145 -0
- package/packages/BnAdvancedFilter/index.vue +345 -0
- package/packages/BnAdvancedFilter/util.js +171 -0
- package/packages/BnCascader/BnCascader.vue +543 -0
- package/packages/BnCascader/BnCascaderPanel.vue +1331 -0
- package/packages/BnCascader/cascaderDisplay.js +102 -0
- package/packages/BnCheck/BnCheck.vue +253 -0
- package/packages/BnColumnConfig/columnConfigDialog.vue +134 -0
- package/packages/BnColumnConfig/component/childrenFormSetting/assocTable.vue +143 -0
- package/packages/BnColumnConfig/component/childrenFormSetting/assocTableSearch.vue +314 -0
- package/packages/BnColumnConfig/component/childrenFormSetting/index.vue +243 -0
- package/packages/BnColumnConfig/component/defaultSet/defaultSet.vue +114 -0
- package/packages/BnColumnConfig/component/defaultSet/stringDefault.vue +210 -0
- package/packages/BnColumnConfig/component/funcExprDialog/funcExprDialog.vue +126 -0
- package/packages/BnColumnConfig/component/packageFilter/index.vue +141 -0
- package/packages/BnColumnConfig/component/paraExplainSet/index.vue +156 -0
- package/packages/BnColumnConfig/component/setOption/setOption.vue +321 -0
- package/packages/BnColumnConfig/component/setRelationOption/ConditionList.vue +277 -0
- package/packages/BnColumnConfig/component/setRelationOption/LevelHeader.vue +144 -0
- package/packages/BnColumnConfig/component/setRelationOption/setRelationOption.vue +642 -0
- package/packages/BnColumnConfig/data.js +129 -0
- package/packages/BnColumnConfig/index.scss +23 -0
- package/packages/BnColumnConfig/index.vue +309 -0
- package/packages/BnCondVal/BnCondVal.vue +112 -0
- package/packages/BnCondVal/itemVal/dateRegVal.vue +39 -0
- package/packages/BnCondVal/itemVal/dateVal.vue +39 -0
- package/packages/BnCondVal/itemVal/numRegVal.vue +67 -0
- package/packages/BnCondVal/itemVal/numVal.vue +44 -0
- package/packages/BnCondVal/itemVal/relationVal.vue +73 -0
- package/packages/BnCondVal/itemVal/selectColumnVal.vue +58 -0
- package/packages/BnCondVal/itemVal/selectVal.vue +59 -0
- package/packages/BnCondVal/itemVal/stringVal.vue +156 -0
- package/packages/BnCondition/index.vue +551 -0
- package/packages/BnCondition/util.js +232 -0
- package/packages/BnDatePicker/BnDatePicker.vue +194 -0
- package/packages/BnDrop/BnDrop.vue +917 -0
- package/packages/BnEmptyTip/BnEmptyTip.vue +107 -0
- package/packages/BnExportOrder/BnExportOrder.vue +241 -0
- package/packages/BnExportOrder/validatorCode.vue +94 -0
- package/packages/BnFileView/BnFileView.vue +271 -0
- package/packages/BnFileView/FileDetail.vue +125 -0
- package/packages/BnFileView/videoPreview.vue +70 -0
- package/packages/BnFilterOption/BnFilterOption.vue +160 -0
- package/packages/BnFunExpr/BnFunExpr.vue +608 -0
- package/packages/BnImportOrder/BnImportOrder.vue +323 -0
- package/packages/BnImportTemplate/BnImportTemplate.vue +866 -0
- package/packages/BnImportTemplate/assets/merge_tip_img.png +0 -0
- package/packages/BnImportTemplate/assets/sheet_tip.png +0 -0
- package/packages/BnImportTemplate/assets/xls.png +0 -0
- package/packages/BnImportTemplate/components/ImportTemplateTrigger.vue +198 -0
- package/packages/BnImportTemplate/components/TemplateEditDialog.vue +340 -0
- package/packages/BnImportTemplate/components/TemplateFieldsConfig.vue +401 -0
- package/packages/BnImportTemplate/components/TemplateListDialog.vue +297 -0
- package/packages/BnInpNum/BnInpNum.vue +165 -0
- package/packages/BnMenus/BnMenus.vue +502 -0
- package/packages/BnMenus/MenuItem.vue +321 -0
- package/packages/BnOrderCard/BnOrderCard.vue +389 -0
- package/packages/BnOrderCard/orderRemark.vue +178 -0
- package/packages/BnOrderCard/util.js +94 -0
- package/packages/BnOrderDetail/BnOrderDetail.vue +338 -0
- package/packages/BnOrderDetail/filterLogByUser.vue +108 -0
- package/packages/BnOrderDetail/orderLogs.vue +53 -0
- package/packages/BnOrderDetail/showSubForm/index.vue +41 -0
- package/packages/BnOrderDetail/showSubForm/showChildTable.vue +61 -0
- package/packages/BnOrderDetail/showSubForm/showTimeLine.vue +131 -0
- package/packages/BnOrderDetail/showSubForm/tableCellCopy.vue +84 -0
- package/packages/BnOrderShare/index.vue +378 -0
- package/packages/BnOrderShare/shareUrlInp.vue +54 -0
- package/packages/BnRadio/BnRadio.vue +181 -0
- package/packages/BnRelation/BnRelation.vue +120 -0
- package/packages/BnSelect/BnSelect.vue +485 -0
- package/packages/BnSmartForm/BnBatchForm.vue +334 -0
- package/packages/BnSmartForm/BnBatchFormDialog.vue +423 -0
- package/packages/BnSmartForm/BnSmartElf/elfLog/index.vue +57 -0
- package/packages/BnSmartForm/BnSmartElf/index.vue +95 -0
- package/packages/BnSmartForm/BnSmartFormPsychic.js +629 -0
- package/packages/BnSmartForm/BnSmartFormUtil.js +524 -0
- package/packages/BnSmartForm/addressForm/index.vue +73 -0
- package/packages/BnSmartForm/checkboxForm/index.vue +99 -0
- package/packages/BnSmartForm/childrenForm/childFormFile.vue +237 -0
- package/packages/BnSmartForm/childrenForm/childrenFormBody.vue +260 -0
- package/packages/BnSmartForm/childrenForm/index.vue +110 -0
- package/packages/BnSmartForm/childrenForm/searchInventory.vue +115 -0
- package/packages/BnSmartForm/chooseAssocTable/chooseAssocTable.vue +451 -0
- package/packages/BnSmartForm/chooseAssocTable/chooseChildGood.vue +229 -0
- package/packages/BnSmartForm/chooseAssocTable/tableCellCopy.vue +84 -0
- package/packages/BnSmartForm/chooseChildOrder/chooseChildOrder.vue +158 -0
- package/packages/BnSmartForm/chooseIPaasData/chooseIPaasData.vue +307 -0
- package/packages/BnSmartForm/chooseIPaasData/tableCellCopy.vue +84 -0
- package/packages/BnSmartForm/choosePackage/choosePackage.vue +361 -0
- package/packages/BnSmartForm/dateDualForm/index.vue +37 -0
- package/packages/BnSmartForm/dateForm/index.vue +38 -0
- package/packages/BnSmartForm/fileForm/fileFormData.js +50 -0
- package/packages/BnSmartForm/fileForm/index.vue +240 -0
- package/packages/BnSmartForm/formItemFooter/formItemFooter.vue +38 -0
- package/packages/BnSmartForm/formItemTop/formItemTop.vue +42 -0
- package/packages/BnSmartForm/index.vue +1201 -0
- package/packages/BnSmartForm/numberForm/index.vue +63 -0
- package/packages/BnSmartForm/radioForm/index.vue +72 -0
- package/packages/BnSmartForm/receiveForm/index.vue +112 -0
- package/packages/BnSmartForm/relationForm/index.vue +82 -0
- package/packages/BnSmartForm/scoreForm/index.vue +39 -0
- package/packages/BnSmartForm/selectForm/index.vue +55 -0
- package/packages/BnSmartForm/showValForm/index.vue +42 -0
- package/packages/BnSmartForm/showValForm/showValFormTable.vue +104 -0
- package/packages/BnSmartForm/smartFormsCommon.scss +43 -0
- package/packages/BnSmartForm/stringForm/index.vue +170 -0
- package/packages/BnVirtPopover/index.vue +319 -0
- package/packages/BnWebLog/BnWebLog.vue +140 -0
- package/packages/BnWorkSettingDrop/advancedOptions.js +112 -0
- package/packages/BnWorkSettingDrop/benBenAIUtil.js +89 -0
- package/packages/BnWorkSettingDrop/index.vue +292 -0
- package/packages/font/iconfont.css +243 -0
- package/packages/font/iconfont.ttf +0 -0
- package/packages/font/iconfont.woff +0 -0
- package/packages/font/iconfont.woff2 +0 -0
- package/utils/addressParse-old.js +645 -0
- package/utils/addressParse.js +735 -0
- package/utils/config.js +68 -0
- package/utils/index.js +1171 -0
- package/dist/assocTableSearch-C14i_zJO.js +0 -349
- package/dist/assocTableSearch.css +0 -1
- package/dist/bn-bus-ui.es.js +0 -65
- package/dist/bn-bus-ui.umd.js +0 -49
- package/dist/chooseIPaasData-Cl_5qkFA.js +0 -391
- package/dist/chooseIPaasData.css +0 -1
- package/dist/defaultSet-I4xpf8a4.js +0 -297
- package/dist/defaultSet.css +0 -1
- package/dist/fileFormData-D_Q1vylE.js +0 -53
- package/dist/formItemFooter-CTA7rDtV.js +0 -108
- package/dist/formItemFooter.css +0 -1
- package/dist/funcExprDialog-Cm5BiRM3.js +0 -139
- package/dist/funcExprDialog.css +0 -1
- package/dist/index-B6b4uj8v.js +0 -51
- package/dist/index-BWdkDTbz.js +0 -109
- package/dist/index-BdZ1zOap.js +0 -89
- package/dist/index-BdzNjjMC.js +0 -64
- package/dist/index-BfpZqab2.js +0 -66
- package/dist/index-BmkiB4hr.js +0 -66
- package/dist/index-Br1sqCoo.js +0 -58
- package/dist/index-C9qrl-yc.js +0 -183
- package/dist/index-CXFJXCn5.js +0 -746
- package/dist/index-DF114jZq.js +0 -135
- package/dist/index-DFPfZ_Il.js +0 -178
- package/dist/index-DSEtu7TN.js +0 -44
- package/dist/index-Did0UUWV.js +0 -221
- package/dist/index-DrPj-tmI.js +0 -45
- package/dist/index-DzDf9s2W.js +0 -89
- package/dist/index-LnjudNEI.js +0 -118
- package/dist/index-ObCfCmDT.js +0 -45
- package/dist/index.css +0 -1
- package/dist/index2.css +0 -1
- package/dist/index3.css +0 -1
- package/dist/index4.css +0 -1
- package/dist/index5.css +0 -1
- package/dist/index6.css +0 -1
- package/dist/index7.css +0 -1
- package/dist/install-C-scqkds.js +0 -23103
- package/dist/install.css +0 -1
- package/dist/setOption-CSnWzOny.js +0 -329
- package/dist/setOption.css +0 -1
- package/dist/setRelationOption-CJcHdfaa.js +0 -5217
- package/dist/setRelationOption.css +0 -1
|
@@ -0,0 +1,378 @@
|
|
|
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>
|
|
@@ -0,0 +1,54 @@
|
|
|
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>
|
|
@@ -0,0 +1,181 @@
|
|
|
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
|
+
|