feat: 添加ERP用户ID字段并优化多处功能

- 在ISession接口中添加erp_user_id字段以支持ERP系统集成
- 更新.env.test环境变量添加VITE_PAGE_URL配置
- 启用vueDevTools插件用于开发调试
- 移除好友删除选项以限制用户操作
- 优化消息发送逻辑,过滤空白内容
- 调整头像右键菜单触发条件
- 更新文件消息打开链接使用环境变量
- 修改会话菜单中用户信息跳转使用erp_user_id
- 更新默认access token值
This commit is contained in:
Phoenix 2025-06-05 11:41:06 +08:00
parent d4a1fd5c8b
commit a5a70391a4
9 changed files with 18 additions and 16 deletions

1
env/.env.test vendored
View File

@ -8,4 +8,5 @@ VUE_APP_PREVIEW=false
VITE_BASE_API=http://114.218.158.24:8503 VITE_BASE_API=http://114.218.158.24:8503
VITE_SOCKET_API=ws://114.218.158.24:8504 VITE_SOCKET_API=ws://114.218.158.24:8504
VITE_EPR_BASEURL=http://114.218.158.24:9020 VITE_EPR_BASEURL=http://114.218.158.24:9020
VITE_PAGE_URL=http://172.16.100.93:9032
VUE_APP_WEBSITE_NAME="" VUE_APP_WEBSITE_NAME=""

View File

@ -437,8 +437,7 @@ function onClipboardMatcher(node: any, Delta) {
function onSendMessage() { function onSendMessage() {
var delta = getQuill().getContents() var delta = getQuill().getContents()
let data = deltaToMessage(delta) // Delta let data = deltaToMessage(delta) // Delta
if (data.items.length === 0||!data.items[0].content.trim()) {
if (data.items.length === 0) {
return // return //
} }

View File

@ -88,7 +88,7 @@ const strokeDashoffset = computed(() =>
const handleClick = () => { const handleClick = () => {
if(!props.extra.is_uploading){ if(!props.extra.is_uploading){
window.open( window.open(
`${window.location.origin}/office?url=${props.extra.path}`, `${import.meta.env.VITE_PAGE_URL}/office?url=${props.extra.path}`,
'_blank', '_blank',
'width=1200,height=900,left=200,top=200,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no' 'width=1200,height=900,left=200,top=200,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no'
); );

View File

@ -21,7 +21,7 @@ export function useFriendsMenu() {
dropdown.item = Object.assign({}, item) dropdown.item = Object.assign({}, item)
dropdown.options = [] dropdown.options = []
dropdown.options.push({ label: '删除好友', key: 'delete' }) // dropdown.options.push({ label: '删除好友', key: 'delete' })
dropdown.x = e.clientX dropdown.x = e.clientX
dropdown.y = e.clientY dropdown.y = e.clientY

View File

@ -71,11 +71,11 @@ export function useSessionMenu() {
}) })
if (item.talk_type == 1) { if (item.talk_type == 1) {
options.push({ // options.push({
label: '删除好友', // label: '删除好友',
key: 'delete_contact' // key: 'delete_contact'
}) // })
} else { } else {
options.push({ options.push({
@ -107,9 +107,7 @@ export function useSessionMenu() {
} }
const onUserInfo = (item: ISession) => { const onUserInfo = (item: ISession) => {
console.error('item',item) user(item.erp_user_id)
user(item.id)
} }
// 移除会话 // 移除会话

View File

@ -27,6 +27,7 @@ export interface ISession {
content?: string // 消息内容 content?: string // 消息内容
last_message?: ISessionLastMessage last_message?: ISessionLastMessage
draft_text?: string // 草稿文本 draft_text?: string // 草稿文本
erp_user_id:number
} }
// 消息记录 // 消息记录

View File

@ -18,7 +18,7 @@ export function isLoggedIn() {
*/ */
export function getAccessToken() { export function getAccessToken() {
// return storage.get(AccessToken) || '' // return storage.get(AccessToken) || ''
return JSON.parse(localStorage.getItem('token'))||'46d71a72d8d845ad7ed23eba9bdde260e635407190c2ce1bf7fd22088e41682ea07773ec65cae8946d2003f264d55961f96e0fc5da10eb96d3a348c1664e9644ce2108c311309f398ae8ea1b8200bfd490e5cb6e8c52c9e5d493cbabb163368f8351420451a631dbfa749829ee4cda49b77b5ed2d3dced5d0f2b7dd9ee76ba5465c84a17c23af040cd92b6b2a4ea48befbb5c729dcdad0a9c9668befe84074cc24f78899c1d947f8e7f94c7eda5325b8ed698df729e76febb98549ef3482ae942fb4f4a1c92d21836fa784728f0c5483aab2760a991b6b36e6b10c84f840a6433a6ecc31dee36e8f1c6158818bc89d22a02b52442e2e6a79ca35b2fa54a4bb215abd3b9cc8ad2ef018b380a88e93a2fc55fb3e36695ae76a0ea52c973374861c70339249f89f36d787b0dfa7fc99339470dbc626eb5ff42232137ef97447e79f' return JSON.parse(localStorage.getItem('token'))||'46d71a72d8d845ad7ed23eba9bdde260e635407190c2ce1bf7fd22088e41682ea07773ec65cae8946d2003f264d55961f96e0fc5da10eb96d3a348c1664e9644ce2108c311309f398ae8ea1b8200bfd490e5cb6e8c52c9e5d493cbabb163368f8351420451a631dbfa749829ee4cda49b77b5ed2d3dced5d0f2b7dd9ee76ba5465c84a17c23af040cd92b6b2a4ea48befbb5c729dcdad0a9c9668befe84074cc24f78899c1d947f8e7f94c7eda5325b8ed698df729e76febb98549ef3482ae942fb4f4a1c92d21836fa784728f0c5483aab2760a991b6b36e6b10c84f840a6433a6ecc31dee36e8f1c6158818bc89d22726726265e9af0db370a54ea5ee002b43662d571b84c8468ac15330f79503a5cd5e72282d8bee92749b1a3c1b7fd87ae70b64b90e437e84c1b558c64a35e181b2ecf5db3007680c3607eac1edee7f59d'
} }
/** /**

View File

@ -323,13 +323,16 @@ const retry=(item:any)=>{
} }
const onContextMenuAvatar=(e:any,item:any)=>{ const onContextMenuAvatar=(e:any,item:any)=>{
e.preventDefault() if(item.talk_type!==1){
e.preventDefault()
if(item.float!=='right'){ if(item.float!=='right'){
bus.emit(EditorConst.Mention, { bus.emit(EditorConst.Mention, {
id: item.user_id, id: item.user_id,
value: item.nickname value: item.nickname
}) })
} }
}
} }
</script> </script>

View File

@ -46,9 +46,9 @@ export default defineConfig(({ mode }) => {
vueJsx({}), vueJsx({}),
compressPlugin(), compressPlugin(),
UnoCSS(), UnoCSS(),
// vueDevTools({ vueDevTools({
// launchEditor: 'trae', launchEditor: 'trae',
// }) })
], ],
define: { define: {
__APP_ENV__: env.APP_ENV __APP_ENV__: env.APP_ENV