|
|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div style="" class="pbInput" :style="writeStyle">
|
|
|
|
|
<div class="input-root" style="position: relative;">
|
|
|
|
|
<div class="input-root" style="position: relative">
|
|
|
|
|
<!-- 以下这个 div 用于确保 vue2 的 ref 会更新 -->
|
|
|
|
|
<div style="display: none">
|
|
|
|
|
<div>{{ teamMute ? "禁言" : "不禁言" }}</div>
|
|
|
|
|
@ -66,7 +66,7 @@
|
|
|
|
|
<!-- {{ssff}}键盘高度{{keyHeight}} 输入框距离底部距离{{writeStyle}}屏幕高度{{screenHeight}}顶部聊天区域高度{{msgKeyHeight}} -->
|
|
|
|
|
<input v-show="!showEmojiInput" :focus="isFocus" class="msg-input-input g_flex_1" :maxlength="-1" :placeholder="isTeamMute ? t('teamMutePlaceholder') : t('chatInputPlaceHolder')" v-model="inputText" type="text" :disabled="isTeamMute" :confirm-hold="true" cursor-spacing="20" :adjust-position="pushUp" confirm-type="send" @keyboardheightchange="keyboardheightchange" @focus="handleInputFocus" @confirm="handleSendTextMsg" @blur="handleInputBlur" @input="handleInput" id="msg-input" />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <div class="send-more-panel-item-wrapper">
|
|
|
|
|
<div class="send-more-panel-item" @tap="(event) => handleSendJob()">
|
|
|
|
|
<div class="iconfont icon-5gongdanguanli g_c_6 g_fs_24 g_fw_600"></div>
|
|
|
|
|
@ -75,8 +75,8 @@
|
|
|
|
|
<!-- <div class="msg-input-button" v-if="false">
|
|
|
|
|
<Icon @tap="handleEmojiVisible" class="g_p_6" style="padding-right: 5px" :size="28" type="icon-biaoqing" />
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="msg-input-button" @tap="(event) => handleSendJob()">
|
|
|
|
|
<div class="iconfont icon-5gongdanguanli g_c_6 g_fs_24"></div>
|
|
|
|
|
<div class="msg-input-button" @tap="(event) => handleSendJob()">
|
|
|
|
|
<div class="iconfont icon-detail g_c_6 g_fs_24"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="msg-input-button" v-if="true">
|
|
|
|
|
<Icon @tap="handleSendMoreVisible" class="g_p_6" style="padding-left: 5px; padding-right: 8px" type="send-more" :size="28" />
|
|
|
|
|
@ -136,12 +136,18 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="icon-text">{{ t("customText") }}</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="send-more-panel-item-wrapper" v-if="corpUserFlag">
|
|
|
|
|
<div class="send-more-panel-item-wrapper">
|
|
|
|
|
<div class="send-more-panel-item" @tap="(event) => handleSendJob()">
|
|
|
|
|
<div class="iconfont icon-5gongdanguanli g_c_6 g_fs_24 "></div>
|
|
|
|
|
<div class="iconfont icon-detail g_c_6 g_fs_24"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="icon-text">{{ "发送职位" }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="send-more-panel-item-wrapper" v-if="appType == 'isToB'">
|
|
|
|
|
<div class="send-more-panel-item" @tap="(event) => handleSendapply()">
|
|
|
|
|
<div class="iconfont icon-5gongdanguanli g_c_6 g_fs_24"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="icon-text">{{ "发送工单" }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="send-more-panel-item-wrapper">
|
|
|
|
|
<div class="send-more-panel-item" @tap="(event) => handleSetting()">
|
|
|
|
|
<Icon type="icon-shezhi" :size="30"></Icon>
|
|
|
|
|
@ -158,52 +164,26 @@
|
|
|
|
|
<UniPopup ref="popupRef" background-color="#ffffff" type="bottom" mask-background-color="rgba(0,0,0,0.4)" @change="onPopupChange">
|
|
|
|
|
<MentionMemberList :team-id="to"></MentionMemberList>
|
|
|
|
|
</UniPopup>
|
|
|
|
|
|
|
|
|
|
<div class="choose-job-send"
|
|
|
|
|
style="
|
|
|
|
|
width: calc(100vw - 48px);
|
|
|
|
|
min-height: 50px;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
top: -92px;
|
|
|
|
|
padding: 12px;
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
"
|
|
|
|
|
v-if="chooseData && chooseData.title && false"
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<div class="choose-job-send" style="width: calc(100vw - 48px); min-height: 50px; background-color: #fff; position: absolute; left: 50%; transform: translateX(-50%); top: -92px; padding: 12px; border-radius: 12px" v-if="chooseData && chooseData.title && false">
|
|
|
|
|
<div class="g_w_all g_h_all">
|
|
|
|
|
<div class="g_mb_12 g_flex_row_between">
|
|
|
|
|
<div style="font-weight:bold;font-size:16px;color:#000" class="g_flex_1">{{ chooseData.title }}</div>
|
|
|
|
|
<div style="font-weight: bold; font-size: 16px; color: #000" class="g_flex_1">{{ chooseData.title }}</div>
|
|
|
|
|
<div class="g_flex_none g_flex_column_center">
|
|
|
|
|
<i class="iconfont icon-guanbi" style="font-size: 14px;color: #666;"></i>
|
|
|
|
|
<i class="iconfont icon-guanbi" style="font-size: 14px; color: #666"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="g_flex_row_between">
|
|
|
|
|
<div class="g_flex_1 g_flex_column_center">
|
|
|
|
|
<div class="g_flex_row_start">
|
|
|
|
|
<view class="g_fs_16 g_fw_600 g_c_f40 g_lh_1_2 g_flex_column_center"
|
|
|
|
|
v-if="chooseData.salaryClassifyValue"
|
|
|
|
|
v-html="chooseData.salaryClassifyValue"> </view>
|
|
|
|
|
<view class="g_fs_16 g_fw_600 g_c_f40 g_lh_1_2 g_flex_column_center" v-if="chooseData.salaryClassifyValue" v-html="chooseData.salaryClassifyValue"> </view>
|
|
|
|
|
<view class="g_fs_14 g_c_9" v-if="chooseData.monthPay">
|
|
|
|
|
{{ chooseData.monthPay ? "丨" + chooseData.monthPay : "" }}
|
|
|
|
|
</view>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="g_flex_none g_flex_column_center" @tap="sendPointJob">
|
|
|
|
|
<div style="
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
height: 26px;
|
|
|
|
|
line-height: 26px;
|
|
|
|
|
width: 70px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
background-color: #1890ff;
|
|
|
|
|
color: #fff;
|
|
|
|
|
">
|
|
|
|
|
发送职位
|
|
|
|
|
</div>
|
|
|
|
|
<div style="font-size: 12px; border-radius: 20px; height: 26px; line-height: 26px; width: 70px; text-align: center; background-color: #1890ff; color: #fff">发送职位</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@ -216,7 +196,8 @@
|
|
|
|
|
import Face from "./face.vue";
|
|
|
|
|
import VoicePanel from "./voice-panel.vue";
|
|
|
|
|
import Icon from "../../../components/Icon.vue";
|
|
|
|
|
import { ref, getCurrentInstance, computed, onUnmounted, onMounted, defineProps, withDefaults, defineEmits, watch } from "../../../utils/transformVue";
|
|
|
|
|
import { ref, getCurrentInstance, computed, onUnmounted, onMounted, defineProps, withDefaults, defineEmits, watch} from "vue";
|
|
|
|
|
// import { ref, getCurrentInstance, computed, onUnmounted, onMounted, defineProps, withDefaults, defineEmits, watch } from "../../../utils/transformVue";
|
|
|
|
|
import { ALLOW_AT, events, REPLY_MSG_TYPE_MAP } from "../../../utils/constants";
|
|
|
|
|
import { emojiMap } from "../../../utils/emoji";
|
|
|
|
|
import { t } from "../../../utils/i18n";
|
|
|
|
|
@ -238,7 +219,14 @@ import { V2NIMConst } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK";
|
|
|
|
|
|
|
|
|
|
export type MentionedMember = { accountId: string; appellation: string };
|
|
|
|
|
const corpUserFlag = ref(uni.getStorageSync("apply-userinfo").corpUserFlag);
|
|
|
|
|
|
|
|
|
|
const G = getCurrentInstance().appContext.app.config.globalProperties.G;
|
|
|
|
|
const appType = computed(() => {
|
|
|
|
|
let val = "isToC";
|
|
|
|
|
if (G.globalConstantData.requestComeFrom && (G.globalConstantData.requestComeFrom == "assistant_miniapp" || G.globalConstantData.requestComeFrom == "supply_chain_miniapp")) {
|
|
|
|
|
val = "isToB";
|
|
|
|
|
}
|
|
|
|
|
return val; // 小程序的判断
|
|
|
|
|
});
|
|
|
|
|
const props = withDefaults(
|
|
|
|
|
defineProps<{
|
|
|
|
|
conversationType: V2NIMConst.V2NIMConversationType;
|
|
|
|
|
@ -421,8 +409,6 @@ const keyHeight = ref(350);
|
|
|
|
|
const msgKeyHeight = ref("100%");
|
|
|
|
|
const ssff = ref(uni.getWindowInfo().safeArea.top);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handleInputFocus = (e) => {
|
|
|
|
|
emojiVisible.value = false;
|
|
|
|
|
extVisible.value = false;
|
|
|
|
|
@ -430,13 +416,12 @@ const handleInputFocus = (e) => {
|
|
|
|
|
sendMoreVisible.value = false;
|
|
|
|
|
const systemInfo = uni.getSystemInfoSync();
|
|
|
|
|
const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value;
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
console.log("获取焦点获取焦点获取焦点获取焦点获取焦点获取焦点获取焦点获取焦点获取焦点获取焦点获取焦点获取焦点获取焦点获取焦点");
|
|
|
|
|
uni.$emit("msgKeyHeight", availableHeight); // 传递实际可用高度
|
|
|
|
|
writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
|
|
|
|
|
uni.$emit(events.ON_SCROLL_BOTTOM);
|
|
|
|
|
},80)
|
|
|
|
|
}, 80);
|
|
|
|
|
// if (e.detail.height === 0) {
|
|
|
|
|
// writeStyle.value = "bottom: 0";
|
|
|
|
|
// uni.$emit("msgKeyHeight", "100%"); // 键盘收起时恢复全屏高度
|
|
|
|
|
@ -453,7 +438,7 @@ const handleInputFocus = (e) => {
|
|
|
|
|
// writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
|
|
|
|
|
// // let safeBottom = 0;
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 在message-input.vue的keyboardheightchange事件中修改
|
|
|
|
|
// 在message-input.vue的keyboardheightchange事件中修改
|
|
|
|
|
@ -477,9 +462,9 @@ const keyboardheightchange = (e) => {
|
|
|
|
|
uni.$emit("msgKeyHeight", availableHeight); // 传递实际可用高度
|
|
|
|
|
writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
|
|
|
|
|
}
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
uni.$emit(events.ON_SCROLL_BOTTOM);
|
|
|
|
|
},80)
|
|
|
|
|
}, 80);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// const handleInputBlur = () => {
|
|
|
|
|
@ -576,9 +561,14 @@ const handleSendFileMsg = () => {
|
|
|
|
|
};
|
|
|
|
|
const handleSendJob = () => {
|
|
|
|
|
console.log("props.jobListShow", props.jobListShow);
|
|
|
|
|
emits("jobListShow", true);
|
|
|
|
|
emits("jobListShow", { isShow: true, type: "job" });
|
|
|
|
|
};
|
|
|
|
|
const sendPointJob = () => {
|
|
|
|
|
const handleSendapply = () => {
|
|
|
|
|
console.log("props.jobListShow", props.jobListShow);
|
|
|
|
|
emits("jobListShow", { isShow: true, type: "apply" });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const sendPointJob = () => {
|
|
|
|
|
emits("exportPointJob");
|
|
|
|
|
};
|
|
|
|
|
const handleSendCustomMsg = () => {
|
|
|
|
|
@ -638,17 +628,16 @@ const handleSendMoreVisible = () => {
|
|
|
|
|
emojiVisible.value = false;
|
|
|
|
|
sendMoreVisible.value = !sendMoreVisible.value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
if (sendMoreVisible.value) {
|
|
|
|
|
// uni.$emit(events.KeyboardEvent, 230);
|
|
|
|
|
uni.$emit("msgKeyHeight", uni.getSystemInfoSync().windowHeight - 230 - ssff.value); // 传递实际可用高度
|
|
|
|
|
} else {
|
|
|
|
|
// uni.$emit(events.KeyboardEvent, 0);
|
|
|
|
|
uni.$emit("msgKeyHeight", '100%'); // 传递实际可用高度
|
|
|
|
|
uni.$emit("msgKeyHeight", "100%"); // 传递实际可用高度
|
|
|
|
|
}
|
|
|
|
|
uni.$emit(events.ON_SCROLL_BOTTOM);
|
|
|
|
|
},80)
|
|
|
|
|
}, 80);
|
|
|
|
|
// }, 300)
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
@ -811,7 +800,7 @@ const screenHeight = ref(0);
|
|
|
|
|
screenHeight.value = uni.getSystemInfoSync().windowHeight;
|
|
|
|
|
const chooseData = ref({});
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
if(uni.getStorageSync("im_sendParams")){
|
|
|
|
|
if (uni.getStorageSync("im_sendParams")) {
|
|
|
|
|
chooseData.value = JSON.parse(uni.getStorageSync("im_sendParams")).jobDetail;
|
|
|
|
|
}
|
|
|
|
|
uninstallTeamWatch = autorun(() => {
|
|
|
|
|
|