提交 79809419 作者: 毛细亚

更新代码

上级 2f879c47
...@@ -26,26 +26,26 @@ Vue.use(globalComponent).use(permission).use(clickagain).use(loadmore).use(scrol ...@@ -26,26 +26,26 @@ Vue.use(globalComponent).use(permission).use(clickagain).use(loadmore).use(scrol
import '@/utils/vconsoleCleanup' import '@/utils/vconsoleCleanup'
// 开发环境下初始化 stagewise 工具栏 // 开发环境下初始化 stagewise 工具栏
if (process.env.NODE_ENV === 'development') { // if (process.env.NODE_ENV === 'development') {
import('@stagewise/toolbar-vue').then(({ StagewiseToolbar }) => { // import('@stagewise/toolbar-vue').then(({ StagewiseToolbar }) => {
import('@stagewise-plugins/vue').then(({ VuePlugin }) => { // import('@stagewise-plugins/vue').then(({ VuePlugin }) => {
const stagewiseConfig = { // const stagewiseConfig = {
plugins: [VuePlugin] // plugins: [VuePlugin]
}; // };
// 动态创建并挂载 StagewiseToolbar 组件 // // 动态创建并挂载 StagewiseToolbar 组件
const ToolbarConstructor = Vue.extend({ // const ToolbarConstructor = Vue.extend({
render(h) { // render(h) {
return h(StagewiseToolbar, { props: { config: stagewiseConfig } }); // return h(StagewiseToolbar, { props: { config: stagewiseConfig } });
} // }
}); // });
const toolbarInstance = new ToolbarConstructor(); // const toolbarInstance = new ToolbarConstructor();
toolbarInstance.$mount(); // toolbarInstance.$mount();
document.body.appendChild(toolbarInstance.$el); // document.body.appendChild(toolbarInstance.$el);
}); // });
}).catch(err => { // }).catch(err => {
console.error('Failed to initialize stagewise toolbar:', err); // console.error('Failed to initialize stagewise toolbar:', err);
}); // });
} // }
// 开发环境不收集日志 // 开发环境不收集日志
if (process.env.NODE_ENV !== 'development') { if (process.env.NODE_ENV !== 'development') {
......
<template> <template>
<div class="mail-list-container" <div class="mail-list-container"
ref="mailListScroll"
v-scroll:50="loadMoreMail" v-scroll:50="loadMoreMail"
> >
<!-- 搜索过滤区域 --> <!-- 搜索过滤区域 -->
...@@ -89,7 +88,6 @@ ...@@ -89,7 +88,6 @@
<!-- 通讯录列表 --> <!-- 通讯录列表 -->
<div <div
ref="mailListScroll"
v-scroll="loadMoreMail" v-scroll="loadMoreMail"
class="contact-list" class="contact-list"
> >
......
<template>
<div class="details columnFlex">
<div class="content">
<div class="tabSelect rowFlex spaceBetween columnCenter">
<div class="btnLeft rowFlex columnCenter">
跟进记录
</div>
</div>
<!-- 消息列表 -->
<div
v-if="messageSwitch"
v-scroll:50="requestDataList"
v-loading="loading"
class="messageDetailsScroll"
>
<div v-if="messageList.length > 0">
<div
v-for="(item, index) in messageList"
:key="index"
class="messageListItem"
>
<div class="itemTop">
{{ item.date }}
</div>
<div class="itemCenter">
{{ item.summary }}
</div>
</div>
</div>
</div>
<noContent v-if="!loading && messageList.length == 0" />
</div>
</div>
</template>
<script>
import { mapMutations, mapState } from 'vuex'
import { corp_follow_up_summary_config_works_list } from '@/api/works'
import { throttle } from '@/utils'
import noContent from '@/components/noContent.vue'
export default {
components: {
noContent
},
props: {
chatUserDetails: {
typeof: Object,
default: () => { }
}
},
data() {
return {
loading: false,
isloadMore: true,
messageList: [],
messageSwitch: 1,
showLayer: false,
feedbackValue: '',
messagItem: {},
pageInfo: {
page: 0,
page_size: 20,
total: 0
}
}
},
computed: {
...mapState('game', ['accountSelect', 'gameTabActive']),
...mapState('common', ['zqUserInfo']),
...mapState('user', ['isGameSystem', 'userInfo'])
},
watch: {
accountSelect(newVal, oldVal) {
if (newVal && newVal !== '' && this.gameTabActive == 11 && this.chatUserDetails.session_id) {
this.pageInfo = {
page: 0,
page_size: 20,
total: 0
}
this.isloadMore = true
this.messageList = []
this.requestDataList()
}
}
},
mounted() {
this.pageInfo = {
page: 0,
page_size: 20,
total: 0
}
this.isloadMore = true
this.messageList = []
this.loading = true
this.requestDataList()
// this.messageSwitch = this.zqUserInfo.is_assistant_reception
},
methods: {
...mapMutations('common', ['set_sendSkillMessage', 'set_isEditSkill']),
// 先编辑再发送
sendMessageEdit(item) {
if (item.answer.msgtype == 'text') { // 文本
this.set_isEditSkill([item.answer])
} else if (item.answer.msgtype == 'image') { // 图片
this.set_isEditSkill([item.answer])
}
// 复制粘贴调用接口
this.copyAuxiliary(item)
},
async updateAssistantReceptionStatus() {
const res = await updateAssistantReceptionStatus({ is_assistant_reception: this.messageSwitch })
if (res.status_code == 1) {
this.$message.success('操作成功')
}
},
async copyAuxiliary(item) {
const res = await answerCopy({ message_log_id: item.message_log_id })
if (res.status_code == 1) {
this.$message.success('复制成功')
}
},
showTextLayer(item) {
this.messagItem = item
this.showLayer = true
},
async onConfirm() {
if (this.feedbackValue == '') {
this.$message.error('请输入反馈内容')
return false
}
const data = {
message_log_id: this.messagItem.message_log_id,
feedback: this.feedbackValue
}
const res = await feedback(data)
this.showLayer = false
if (res.status_code === 1) {
this.feedbackValue = ''
this.$message.success('提交成功')
}
},
selectResult() {
if (this.chatUserDetails.session_id) {
this.pageInfo = {
page: 0,
page_size: 20,
total: 0
}
this.isloadMore = true
this.messageList = []
this.requestDataList()
this.loading = true
}
},
requestDataList: throttle(function () {
if (this.chatUserDetails.session_id) {
if (!this.isloadMore) {
console.log('没有更多数据了')
return false
}
this.loading = true
this.pageInfo.page += 1
const data = {
external_userid: this.chatUserDetails.external_userid,
...this.pageInfo
}
corp_follow_up_summary_config_works_list(data).then(
(res) => {
this.loading = false
if (res.data.data && res.data.data.length < 20) {
this.isloadMore = false
}
this.messageList = this.messageList.concat(res.data.data)
if (res.data.page_info) {
this.pageInfo = res.data.page_info
}
},
(err) => {
this.loading = false
}
)
} else {
this.isloadMore = false
this.loading = false
}
}, 500)
}
}
</script>
<style lang="scss" scoped>
.details {
width: 100%;
height: 100%;
background: #fff;
margin-left: 2px;
position: relative;
overflow: hidden;
.refundLog {
width: 100%;
height: 100%;
}
.detailsTitle {
width: 100%;
padding: 0 vw(20);
height: 60px;
font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
border-bottom: 1px solid #ebeef5;
border-left: 1px solid #ebeef5;
p {
color: #333333;
}
}
.content {
width: 100%;
height: 100%;
.tabSelect {
width: 100%;
height: 60px;
cursor: pointer;
font-size: 18px;
font-weight: 600;
border: 1px solid #ebeef5;
padding: 0 20px;
.refreshList {
color: #00bf8a;
cursor: pointer;
font-size: 16px;
margin-left: 5px;
transform: rotate(180deg);
transition: all 0.5;
}
.right {
font-weight: 400;
font-size:14px;
}
}
.contentItem {
position: relative;
.title {
position: absolute;
left: 10px;
top: 14px;
font-size: 14px;
color: #999999;
}
}
.item {
width: 100%;
height: auto;
font-size: 14px;
font-weight: 400;
color: #333333;
padding: 6px 0;
transition: all 0.5s;
position: relative;
padding-left: 10px;
cursor: pointer;
div {
width: 100%;
}
.tableImage {
width: 40px;
height: 40px;
border-radius: 6px;
margin-right: vw(10);
}
.label {
color: #999999;
}
.text {
color: #333333;
margin-left: 10px;
word-break: break-all;
max-width: 80%;
}
.icon {
display: none;
position: absolute;
right: 0;
top: 12px;
}
.dianFail {
display: inline-block;
width: 8px;
height: 8px;
background: #f45454;
border-radius: 5px;
}
.dian {
display: inline-block;
width: 8px;
height: 8px;
background: #00bf8a;
border-radius: 5px;
}
.dian2 {
display: inline-block;
width: 8px;
height: 8px;
background: #ff9d02;
border-radius: 5px;
}
}
.orderMoney {
width: calc(100% + 40px);
height: 80px;
// margin-left: -20px;
padding: 10px 0;
.orderMoneyItem {
width: 50%;
text-align: center;
margin-top: 5px;
span {
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
p {
font-size: 22px;
color: #00bf8a;
}
}
}
.filterList {
margin-bottom: 10px;
.filterListInput {
width: 60%;
margin-left: 15px;
margin-bottom: 10px;
}
.filterListDate {
width: 150px;
margin-bottom: 10px;
}
::v-deep .search-item .item-label {
margin-right: 20px;
}
}
.messageDetailsScroll {
width: 100%;
padding: 15px;
height: 100%;
overflow: auto;
overflow-x: hidden;
.messageListItem {
width: 100%;
height: auto;
margin-bottom: 10px;
.itemTop {
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 12px;
color: #86909C;
line-height: 20px;
text-align: left;
font-style: normal;
text-transform: none;
margin-bottom: 5px;
}
.itemCenter {
width: 100%;
height: 56px;
background: #F9FAFF;
border-radius: 4px 4px 4px 4px;
padding: 10px;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #4E5969;
text-align: left;
font-style: normal;
text-transform: none;
}
}
}
.orderDetails {
width: 100%;
height: auto;
margin-bottom: 20px;
position: relative;
.bridgeMain {
position: absolute;
top: 0px;
right: 0px;
width: 50px;
height: 50px;
.text {
font-size: 8px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ff9d02;
transform: rotate(48deg);
z-index: 100;
position: absolute;
right: -6px;
top: 10px;
width: 50px;
text-align: center;
}
.bridge {
font-size: 50px;
position: absolute;
top: 0;
right: 0;
}
}
.orderDetailsTitle {
width: 100%;
height: 70px;
background: #f9faff;
padding: 10px;
.money {
width: 100%;
height: auto;
margin-bottom: 12px;
margin-top: 4px;
.btns {
padding-right: 40px;
}
.btn {
background: #fff;
border-radius: 4px;
padding: 2px 5px;
margin-left: 10px;
font-size: 12px;
border: 1px solid rgba(0, 0, 0, 0.15);
color: #333333;
cursor: pointer;
}
.btnnot {
background: #ffdddd;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #f56c6c;
border: none;
}
.btnsuccess {
background: #e1fff0;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #00bf8a;
border: none;
}
.btnRefund {
background: #fff;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #00a6f0;
border-color: #00a6f0;
}
}
.text {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
}
.orderDetailsList {
width: 100%;
height: auto;
background: #ffffff;
border: 1px solid #ebeef5;
padding: 5px 0;
position: relative;
.titleFix {
position: absolute;
left: 10px;
top: 20px;
color: #999999;
}
}
}
}
::v-deep .el-tabs__item {
line-height: 26px;
font-size: 16px;
font-weight: 500;
}
::v-deep .el-collapse {
border: none;
}
::v-deep .el-collapse-item__header {
border: none;
}
::v-deep .el-collapse-item__header {
width: 100%;
height: 44px;
color: #333333;
padding-left: 10px;
font-size: 14px;
font-weight: 400;
/* 单行显示省略号 */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-collapse-item__wrap {
border: none;
}
}
</style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论