Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
foreign
/
customer-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
76d31530
authored
Jul 21, 2021
by
panjiangyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
创建会话后打开会话失败的问题
parent
137e7c31
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
234 additions
and
6 deletions
chat.vue
components/workflow.vue
store/index.ts
utils/chat-info.ts
chat.vue
View file @
76d31530
...
@@ -20,9 +20,13 @@
...
@@ -20,9 +20,13 @@
>
>
<ChatMembers
/>
<ChatMembers
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"工作流"
name=
"three"
<el-tab-pane
label=
"工作流"
name=
"three"
>
>
工作流
</el-tab-pane
<workflow
>
:model_name=
"currentChat.business_data.model_name"
:id=
"currentChat.business_data.obj_id"
:name=
"currentChat.business_data.detail_name"
/>
</el-tab-pane>
<el-tab-pane
label=
"备注"
name=
"four"
>
<el-tab-pane
label=
"备注"
name=
"four"
>
<remarkList
<remarkList
:modelName=
"currentChat.business_data.model_name"
:modelName=
"currentChat.business_data.model_name"
...
@@ -52,6 +56,7 @@ import ChatTitle from "./components/chat-title.vue";
...
@@ -52,6 +56,7 @@ import ChatTitle from "./components/chat-title.vue";
import
MessageList
from
"./components/message-list.vue"
;
import
MessageList
from
"./components/message-list.vue"
;
import
ModelDetail
from
"./components/model-detail.vue"
;
import
ModelDetail
from
"./components/model-detail.vue"
;
import
MsgShortCut
from
"./components/msg-shortcut.vue"
;
import
MsgShortCut
from
"./components/msg-shortcut.vue"
;
import
workflow
from
"./components/workflow.vue"
;
import
buttonThrottle
from
"./utils/button-throttle"
;
import
buttonThrottle
from
"./utils/button-throttle"
;
import
{
ChatStore
,
chatStore
}
from
"@/customer-service/store/model"
;
import
{
ChatStore
,
chatStore
}
from
"@/customer-service/store/model"
;
...
@@ -65,6 +70,7 @@ import { ChatStore, chatStore } from "@/customer-service/store/model";
...
@@ -65,6 +70,7 @@ import { ChatStore, chatStore } from "@/customer-service/store/model";
remarkList
,
remarkList
,
ChatTitle
,
ChatTitle
,
ModelDetail
,
ModelDetail
,
workflow
,
},
},
})
})
export
default
class
Chat
extends
Vue
{
export
default
class
Chat
extends
Vue
{
...
...
components/workflow.vue
0 → 100644
View file @
76d31530
<
template
>
<div>
<div
v-for=
"item in mockData"
:key=
"item.id"
>
<span
class=
"name"
>
{{
item
.
name
}}
</span>
<span
class=
"state"
>
{{
item
.
state
}}
</span>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Component
,
Prop
,
Vue
}
from
"vue-property-decorator"
;
import
Chat
from
"../xim/index"
;
enum
WorkFlowStatus
{
idle
=
0
,
processing
=
1
,
done
=
2
,
}
const
sdk
=
Chat
.
getSdk
;
@
Component
({
components
:
{}
})
export
default
class
WorkFlow
extends
Vue
{
@
Prop
({
type
:
String
,
required
:
true
,
})
private
readonly
model_name
!
:
string
;
@
Prop
({
type
:
String
,
required
:
true
,
})
private
readonly
id
!
:
string
;
@
Prop
({
type
:
String
,
default
:
null
,
})
private
readonly
name
!
:
string
;
private
getStatus
(
status
:
WorkFlowStatus
)
{
}
private
mockData
=
[
{
id
:
null
,
associateId
:
27
,
processName
:
"333"
,
state
:
"无"
,
status
:
0
,
isComplete
:
null
,
},
{
id
:
51
,
associateId
:
27
,
processName
:
"bug流程测试"
,
state
:
"4"
,
status
:
1
,
isComplete
:
0
,
},
{
id
:
153
,
associateId
:
27
,
processName
:
"工作流演示流程"
,
state
:
"待联系"
,
status
:
1
,
isComplete
:
0
,
},
{
id
:
55
,
associateId
:
27
,
processName
:
"工作流演示流程"
,
state
:
"已支付111"
,
status
:
2
,
isComplete
:
1
,
},
{
id
:
56
,
associateId
:
27
,
processName
:
"最新工作流程定义"
,
state
:
"商议阶段"
,
status
:
1
,
isComplete
:
0
,
},
{
id
:
147
,
associateId
:
27
,
processName
:
"测试流程2"
,
state
:
"状态1"
,
status
:
1
,
isComplete
:
0
,
},
{
id
:
144
,
associateId
:
27
,
processName
:
"测试流程2"
,
state
:
"终结状态"
,
status
:
2
,
isComplete
:
1
,
},
{
id
:
146
,
associateId
:
27
,
processName
:
"计划任务"
,
state
:
"已完成"
,
status
:
2
,
isComplete
:
1
,
},
{
id
:
145
,
associateId
:
27
,
processName
:
"计划任务"
,
state
:
"处理中"
,
status
:
1
,
isComplete
:
0
,
},
{
id
:
143
,
associateId
:
27
,
processName
:
"计划任务"
,
state
:
"已取消"
,
status
:
2
,
isComplete
:
1
,
},
{
id
:
142
,
associateId
:
27
,
processName
:
"计划任务"
,
state
:
"已完成"
,
status
:
2
,
isComplete
:
1
,
},
{
id
:
131
,
associateId
:
27
,
processName
:
"计划任务"
,
state
:
"处理中"
,
status
:
1
,
isComplete
:
0
,
},
{
id
:
130
,
associateId
:
27
,
processName
:
"计划任务"
,
state
:
"处理中"
,
status
:
1
,
isComplete
:
0
,
},
{
id
:
129
,
associateId
:
27
,
processName
:
"计划任务"
,
state
:
"已完成"
,
status
:
2
,
isComplete
:
1
,
},
{
id
:
128
,
associateId
:
27
,
processName
:
"计划任务"
,
state
:
"已完成"
,
status
:
2
,
isComplete
:
1
,
},
{
id
:
126
,
associateId
:
27
,
processName
:
"计划任务"
,
state
:
"已取消"
,
status
:
2
,
isComplete
:
1
,
},
{
id
:
125
,
associateId
:
27
,
processName
:
"计划任务"
,
state
:
"已完成"
,
status
:
2
,
isComplete
:
1
,
},
{
id
:
124
,
associateId
:
27
,
processName
:
"计划任务"
,
state
:
"已完成"
,
status
:
2
,
isComplete
:
1
,
},
{
id
:
123
,
associateId
:
27
,
processName
:
"计划任务"
,
state
:
"已完成"
,
status
:
2
,
isComplete
:
1
,
},
{
id
:
155
,
associateId
:
27
,
processName
:
"超管演示"
,
state
:
"状态1"
,
status
:
1
,
isComplete
:
0
,
},
];
public
async
created
()
{
// const workflow = await sdk().model(this.model_name).workflow2().queryProcessByAssociateId(+this.id);
// console.log("workflow", workflow);
}
}
</
script
>
<
style
lang=
"less"
scoped
></
style
>
store/index.ts
View file @
76d31530
...
@@ -413,11 +413,14 @@ export default {
...
@@ -413,11 +413,14 @@ export default {
});
});
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
500
));
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
500
));
await
dispatch
(
ChatStore
.
ACTION_GET_MY_CHAT_LIST
);
await
dispatch
(
ChatStore
.
ACTION_GET_MY_CHAT_LIST
);
console
.
log
(
"fuck 0"
);
const
newChatInfo
=
await
getChatModelInfo
(
params
.
modelName
,
params
.
selectedListId
);
const
newChatInfo
=
await
getChatModelInfo
(
params
.
modelName
,
params
.
selectedListId
);
const
roomList
=
state
[
ChatStore
.
STATE_MY_CHAT_ROOM_LIST
];
const
roomList
=
state
[
ChatStore
.
STATE_MY_CHAT_ROOM_LIST
];
if
(
roomList
==
null
)
return
;
if
(
roomList
==
null
)
return
;
console
.
log
(
"fuck 1"
);
const
newChat
=
roomList
.
list
.
find
((
k
)
=>
k
.
chat_id
===
newChatInfo
.
chat_id
);
const
newChat
=
roomList
.
list
.
find
((
k
)
=>
k
.
chat_id
===
newChatInfo
.
chat_id
);
if
(
newChat
==
null
)
return
;
if
(
newChat
==
null
)
return
;
console
.
log
(
"fuck 2"
);
commit
(
ChatStore
.
MUTATION_SHOW_CHAT
);
commit
(
ChatStore
.
MUTATION_SHOW_CHAT
);
await
dispatch
(
ChatStore
.
ACTION_SAVE_CURRENT_CHAT_ID_VERSION
,
{
await
dispatch
(
ChatStore
.
ACTION_SAVE_CURRENT_CHAT_ID_VERSION
,
{
chatId
:
newChat
.
chat_id
,
chatId
:
newChat
.
chat_id
,
...
...
utils/chat-info.ts
View file @
76d31530
...
@@ -8,13 +8,19 @@ const chatInfo: ChatInfo = {};
...
@@ -8,13 +8,19 @@ const chatInfo: ChatInfo = {};
export
const
getChatModel
=
()
=>
chatInfo
;
export
const
getChatModel
=
()
=>
chatInfo
;
export
async
function
getChatModelInfo
(
modelName
:
string
,
id
:
string
)
{
export
async
function
getChatModelInfo
(
modelName
:
string
,
id
:
string
)
{
if
(
chatInfo
[
id
]
!=
null
)
return
chatInfo
[
id
];
if
(
chatInfo
[
id
]
!=
null
)
{
return
{
uniplatId
:
chatInfo
[
id
].
row
.
UniplatChatId
.
value
,
chat_id
:
+
chatInfo
[
id
].
row
.
UniplatImChatId
.
value
,
uniplat_version
:
0
,
};
}
const
info
=
await
Chat
.
getSdk
().
model
(
modelName
).
detail
(
id
).
query
();
const
info
=
await
Chat
.
getSdk
().
model
(
modelName
).
detail
(
id
).
query
();
const
data
=
info
;
const
data
=
info
;
chatInfo
[
id
]
=
data
;
chatInfo
[
id
]
=
data
;
return
{
return
{
uniplatId
:
info
.
row
.
UniplatChatId
.
value
,
uniplatId
:
info
.
row
.
UniplatChatId
.
value
,
chat_id
:
info
.
row
.
UniplatImBiz
Id
.
value
,
chat_id
:
+
info
.
row
.
UniplatImChat
Id
.
value
,
uniplat_version
:
0
uniplat_version
:
0
,
};
};
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment