@tuotoo/kiwi-pc-plugin-toolbar 0.1.6 → 0.1.8
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/dist/index.es.js +28 -8
- package/dist/index.umd.js +7 -7
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -35643,6 +35643,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
35643
35643
|
createVNode(_component_el_select, {
|
|
35644
35644
|
style: { "width": "230px" },
|
|
35645
35645
|
teleported: false,
|
|
35646
|
+
filterable: "",
|
|
35646
35647
|
modelValue: calloutInfo.value.lineListID,
|
|
35647
35648
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => calloutInfo.value.lineListID = $event),
|
|
35648
35649
|
onVisibleChange: handleVisibleChangeSip,
|
|
@@ -35920,7 +35921,10 @@ const _hoisted_15 = { class: "call-type" };
|
|
|
35920
35921
|
const _hoisted_16 = { class: "call-duration" };
|
|
35921
35922
|
const _hoisted_17 = { class: "popup-actions" };
|
|
35922
35923
|
const _hoisted_18 = { class: "warning-tips" };
|
|
35923
|
-
const _hoisted_19 = {
|
|
35924
|
+
const _hoisted_19 = {
|
|
35925
|
+
key: 0,
|
|
35926
|
+
class: "call-plugin-customer-container"
|
|
35927
|
+
};
|
|
35924
35928
|
const _hoisted_20 = { class: "call-plugin-customer-header" };
|
|
35925
35929
|
const _hoisted_21 = {
|
|
35926
35930
|
key: 0,
|
|
@@ -36023,6 +36027,10 @@ const _sfc_main = {
|
|
|
36023
36027
|
type: Boolean,
|
|
36024
36028
|
default: false
|
|
36025
36029
|
},
|
|
36030
|
+
showCustomerInfo: {
|
|
36031
|
+
type: Boolean,
|
|
36032
|
+
default: false
|
|
36033
|
+
},
|
|
36026
36034
|
onPluginReady: Function,
|
|
36027
36035
|
onCallSuccess: Function,
|
|
36028
36036
|
onMessage: Function,
|
|
@@ -36100,8 +36108,12 @@ const _sfc_main = {
|
|
|
36100
36108
|
break;
|
|
36101
36109
|
}
|
|
36102
36110
|
if (showCallMsg.value) className += " show-call-msg";
|
|
36111
|
+
if (props.showCustomerInfo) className += " show-customer-info";
|
|
36103
36112
|
return className;
|
|
36104
36113
|
});
|
|
36114
|
+
const popupWidth = computed(() => {
|
|
36115
|
+
return props.showCustomerInfo ? 900 : 441;
|
|
36116
|
+
});
|
|
36105
36117
|
onMounted(async () => {
|
|
36106
36118
|
initDeviceData();
|
|
36107
36119
|
await getEmployeeInfo();
|
|
@@ -36155,6 +36167,7 @@ const _sfc_main = {
|
|
|
36155
36167
|
case "Error":
|
|
36156
36168
|
case "SeatBusy":
|
|
36157
36169
|
case "CallUnexpected":
|
|
36170
|
+
case "InsufficientBalance":
|
|
36158
36171
|
showError.value = true;
|
|
36159
36172
|
closeMsg.value = e.msg;
|
|
36160
36173
|
initData();
|
|
@@ -36274,14 +36287,15 @@ const _sfc_main = {
|
|
|
36274
36287
|
}
|
|
36275
36288
|
const callPopupRect = callDom.getBoundingClientRect();
|
|
36276
36289
|
const { innerWidth } = window;
|
|
36290
|
+
const maxW = popupWidth.value + 20;
|
|
36277
36291
|
if (props.popupPosition.includes("left")) {
|
|
36278
|
-
if (innerWidth - callPopupRect.left <
|
|
36279
|
-
x2 = innerWidth -
|
|
36292
|
+
if (innerWidth - callPopupRect.left < maxW) {
|
|
36293
|
+
x2 = innerWidth - popupWidth.value - 40;
|
|
36280
36294
|
callDom.style.transform = `translate(${x2}px, ${y}px)`;
|
|
36281
36295
|
}
|
|
36282
36296
|
} else if (props.popupPosition.includes("right")) {
|
|
36283
|
-
if (callPopupRect.right <
|
|
36284
|
-
x2 =
|
|
36297
|
+
if (callPopupRect.right < maxW) {
|
|
36298
|
+
x2 = popupWidth.value + 40 - innerWidth;
|
|
36285
36299
|
callDom.style.transform = `translate(${x2}px, ${y}px)`;
|
|
36286
36300
|
}
|
|
36287
36301
|
}
|
|
@@ -36380,6 +36394,7 @@ const _sfc_main = {
|
|
|
36380
36394
|
});
|
|
36381
36395
|
};
|
|
36382
36396
|
const realGetCustomerDetail = async () => {
|
|
36397
|
+
if (!props.showCustomerInfo) return;
|
|
36383
36398
|
if (!callerInfo.value.OriginalMobile) return;
|
|
36384
36399
|
await axios.get(apiHost.value + `/company/${props.initConfig.companyID}/call/customer?mobile=${callerInfo.value.OriginalMobile}`, {
|
|
36385
36400
|
headers: {
|
|
@@ -36651,7 +36666,7 @@ const _sfc_main = {
|
|
|
36651
36666
|
}),
|
|
36652
36667
|
_cache[36] || (_cache[36] = createTextVNode(" 通话结束后,当前弹窗将自动关闭,请尽快操作 ", -1))
|
|
36653
36668
|
]),
|
|
36654
|
-
|
|
36669
|
+
props.showCustomerInfo ? (openBlock(), createElementBlock("div", _hoisted_19, [
|
|
36655
36670
|
createBaseVNode("div", _hoisted_20, [
|
|
36656
36671
|
_cache[37] || (_cache[37] = createTextVNode(" 客户详情 ", -1)),
|
|
36657
36672
|
customerDetail.value.ID ? (openBlock(), createElementBlock("div", _hoisted_21, [
|
|
@@ -36678,7 +36693,7 @@ const _sfc_main = {
|
|
|
36678
36693
|
initConfig: props.initConfig,
|
|
36679
36694
|
onRefreshCustomerDetail: realGetCustomerDetail
|
|
36680
36695
|
}, null, 8, ["CustomerDetail", "initConfig"])) : createCommentVNode("", true)
|
|
36681
|
-
]),
|
|
36696
|
+
])) : createCommentVNode("", true),
|
|
36682
36697
|
createBaseVNode("div", _hoisted_22, [
|
|
36683
36698
|
_cache[41] || (_cache[41] = createBaseVNode("div", { class: "call-plugin-record-header" }, " 通话详情 ", -1)),
|
|
36684
36699
|
createBaseVNode("div", {
|
|
@@ -36947,6 +36962,8 @@ class CallPluginWrapper {
|
|
|
36947
36962
|
// 是否显示SIP列表
|
|
36948
36963
|
showRobotList: false,
|
|
36949
36964
|
// 是否显示话术列表
|
|
36965
|
+
showCustomerInfo: false,
|
|
36966
|
+
// 是否显示客户信息
|
|
36950
36967
|
initConfig: {
|
|
36951
36968
|
// companyID: '',
|
|
36952
36969
|
// employeeID: '',
|
|
@@ -36976,6 +36993,7 @@ class CallPluginWrapper {
|
|
|
36976
36993
|
showSeatStatus: this.options.showSeatStatus,
|
|
36977
36994
|
showSipList: this.options.showSipList,
|
|
36978
36995
|
showRobotList: this.options.showRobotList,
|
|
36996
|
+
showCustomerInfo: this.options.showCustomerInfo,
|
|
36979
36997
|
onPluginReady: this.options.onPluginReady,
|
|
36980
36998
|
onMessage: this.options.onMessage,
|
|
36981
36999
|
onCallSuccess: this.options.onCallSuccess,
|
|
@@ -36991,9 +37009,11 @@ class CallPluginWrapper {
|
|
|
36991
37009
|
showCallOut(mobile) {
|
|
36992
37010
|
this.instance.openCallerInfoDialog(mobile);
|
|
36993
37011
|
}
|
|
37012
|
+
offline() {
|
|
37013
|
+
if (this.options.showSeatStatus) this.instance.toggleSeatStatus("offline");
|
|
37014
|
+
}
|
|
36994
37015
|
// 公共方法:销毁插件
|
|
36995
37016
|
destroy() {
|
|
36996
|
-
if (this.options.showSeatStatus) this.instance.toggleSeatStatus("offline");
|
|
36997
37017
|
this.app.unmount();
|
|
36998
37018
|
this.container.innerHTML = "";
|
|
36999
37019
|
}
|