Commit 6b97dc24 by xinla

下载会话问题及相关代码修整

1 parent 66f224db
import request from '@/utils/request' import request from '@/utils/request'
// 外部联系人 会话列表 // 外部联系人 会话列表
const getExternalChatList = (fromId) => { export const getExternalChatList = fromId => {
return request({ return request({
url: '/chat/msg/selectExternalChatList/' + fromId, url: '/chat/msg/selectExternalChatList/' + fromId,
method: 'get' method: 'get'
...@@ -9,7 +9,7 @@ const getExternalChatList = (fromId) => { ...@@ -9,7 +9,7 @@ const getExternalChatList = (fromId) => {
} }
// 单聊 会话列表 // 单聊 会话列表
const selectAloneChatList = (params) => { export const selectAloneChatList = params => {
return request({ return request({
url: '/chat/msg/selectAloneChatList', url: '/chat/msg/selectAloneChatList',
method: 'get', method: 'get',
...@@ -18,21 +18,21 @@ const selectAloneChatList = (params) => { ...@@ -18,21 +18,21 @@ const selectAloneChatList = (params) => {
} }
// 内部联系人列表 // 内部联系人列表
const getInternalChatList = (fromId) => { export const getInternalChatList = fromId => {
return request({ return request({
url: '/chat/msg/selectInternalChatList/' + fromId, url: '/chat/msg/selectInternalChatList/' + fromId,
method: 'get' method: 'get'
}) })
} }
const getGroupChatList = (fromId) => { export const getGroupChatList = fromId => {
return request({ return request({
url: '/chat/msg/selectGroupChatList/' + fromId, url: '/chat/msg/selectGroupChatList/' + fromId,
method: 'get' method: 'get'
}) })
} }
// const chatList = (params) => { // export const chatList = (params) => {
// return request({ // return request({
// url: '/chat/msg/list', // url: '/chat/msg/list',
// method: 'get', // method: 'get',
...@@ -40,13 +40,13 @@ const getGroupChatList = (fromId) => { ...@@ -40,13 +40,13 @@ const getGroupChatList = (fromId) => {
// }) // })
// } // }
const indexTable = () => { export const indexTable = () => {
return request({ return request({
url: '/wecom/page/getCorpBasicData', url: '/wecom/page/getCorpBasicData',
method: 'get' method: 'get'
}) })
} }
const indexEchart = () => { export const indexEchart = () => {
return request({ return request({
url: '/wecom/page/getCorpRealTimeData', url: '/wecom/page/getCorpRealTimeData',
method: 'get' method: 'get'
...@@ -54,7 +54,7 @@ const indexEchart = () => { ...@@ -54,7 +54,7 @@ const indexEchart = () => {
} }
// 全文检索 会话列表 // 全文检索 会话列表
export const getChatList = (params) => { export const getChatList = params => {
return request({ return request({
url: '/chat/msg/selectFullSearchChatList', url: '/chat/msg/selectFullSearchChatList',
method: 'get', method: 'get',
...@@ -63,7 +63,7 @@ export const getChatList = (params) => { ...@@ -63,7 +63,7 @@ export const getChatList = (params) => {
} }
// 全文检索 导出列表 // 全文检索 导出列表
export const exportList = (params) => { export const exportList = params => {
return request({ return request({
url: '/chat/msg/selectFullSearchChatList/export', url: '/chat/msg/selectFullSearchChatList/export',
method: 'get', method: 'get',
...@@ -71,16 +71,3 @@ export const exportList = (params) => { ...@@ -71,16 +71,3 @@ export const exportList = (params) => {
// responseType: 'blob' // responseType: 'blob'
}) })
} }
//
export const content = {
indexEchart,
indexTable,
getExternalChatList,
selectAloneChatList,
getInternalChatList,
getGroupChatList,
// chatList,
getChatList
}
export default content
...@@ -6,16 +6,8 @@ ...@@ -6,16 +6,8 @@
<span class="fr download" @click="exportList()">下载会话</span> <span class="fr download" @click="exportList()">下载会话</span>
</div> </div>
</div> </div>
<el-tabs <el-tabs v-model="activeTab" @tab-click="v => opened.includes(v.name) || opened.push(v.name)">
v-model="activeTab" <el-tab-pane v-for="(item, index) of list" :key="index" :label="item.label" :name="item.type">
@tab-click="(v) => opened.includes(v.name) || opened.push(v.name)"
>
<el-tab-pane
v-for="(item, index) of list"
:key="index"
:label="item.label"
:name="item.type"
>
<chatListClassTab <chatListClassTab
v-if="opened.includes(item.type)" v-if="opened.includes(item.type)"
:queryChat="queryChat" :queryChat="queryChat"
...@@ -28,7 +20,7 @@ ...@@ -28,7 +20,7 @@
<script> <script>
import chatListClassTab from './chatListClassTab.vue' import chatListClassTab from './chatListClassTab.vue'
import api from '@/api/conversation/content.js' import * as api from '@/api/conversation/content.js'
export default { export default {
components: { chatListClassTab }, components: { chatListClassTab },
props: { props: {
...@@ -81,10 +73,12 @@ export default { ...@@ -81,10 +73,12 @@ export default {
.then(() => { .then(() => {
return api.exportList(this.queryChat) return api.exportList(this.queryChat)
}) })
.then((response) => { .then(response => {
this.download(response.msg) this.download(response.msg)
}) })
.catch(function() {}) .catch(function(err) {
console.log(err)
})
} }
} }
} }
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<script> <script>
import chatList from './chatList.vue' import chatList from './chatList.vue'
import api from '@/api/conversation/content.js' import * as api from '@/api/conversation/content.js'
import Voice from '@/components/Voice' import Voice from '@/components/Voice'
export default { export default {
name: '', name: '',
......
...@@ -32,25 +32,15 @@ ...@@ -32,25 +32,15 @@
<span style="line-height:40px">{{ item.name }}</span> <span style="line-height:40px">{{ item.name }}</span>
</el-col> </el-col>
<el-col :span="10" class="ar"> <el-col :span="10" class="ar">
<span <span :style="{ color: item.type === 1 ? '#4bde03' : '#f9a90b' }"
:style="{ color: item.type === 1 ? '#4bde03' : '#f9a90b' }"
>{{ { 1: '@微信', 2: '@企业微信' }[item.type] }} >{{ { 1: '@微信', 2: '@企业微信' }[item.type] }}
</span> </span>
<i <i :class="['el-icon-s-custom', { 1: 'man', 2: 'woman' }[item.gender]]"></i>
:class="[
'el-icon-s-custom',
{ 1: 'man', 2: 'woman' }[item.gender]
]"
></i>
</el-col> </el-col>
</el-row> </el-row>
<div class="ac mt10 mb15"> <div class="ac mt10 mb15">
{{ {{ customerList.length != customerTotal ? '下拉加载更多' : '看到底了~' }}
customerList.length != customerTotal
? '下拉加载更多'
: '看到底了~'
}}
</div> </div>
</template> </template>
<el-empty v-else :image-size="100"></el-empty> <el-empty v-else :image-size="100"></el-empty>
...@@ -93,10 +83,7 @@ ...@@ -93,10 +83,7 @@
<el-empty v-else :image-size="100" description="请选择客户"></el-empty> <el-empty v-else :image-size="100" description="请选择客户"></el-empty>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<chatListClass <chatListClass v-show="queryChat.receiveName" :queryChat="queryChat"></chatListClass>
v-show="queryChat.receiveName"
:queryChat="queryChat"
></chatListClass>
<el-empty <el-empty
v-if="!queryChat.receiveName" v-if="!queryChat.receiveName"
...@@ -111,7 +98,7 @@ ...@@ -111,7 +98,7 @@
import chatListClass from './component/chatListClass.vue' import chatListClass from './component/chatListClass.vue'
import userList from './component/userList.vue' import userList from './component/userList.vue'
import grouplist from './component/groupList.vue' import grouplist from './component/groupList.vue'
import api from '@/api/conversation/content.js' import * as api from '@/api/conversation/content.js'
import * as apiCustomer from '@/api/customer/index' import * as apiCustomer from '@/api/customer/index'
export default { export default {
components: { components: {
...@@ -183,7 +170,7 @@ export default { ...@@ -183,7 +170,7 @@ export default {
this.loading = false this.loading = false
this.personList = data this.personList = data
}) })
.catch((err) => { .catch(err => {
this.loading = false this.loading = false
}) })
} else { } else {
...@@ -193,7 +180,7 @@ export default { ...@@ -193,7 +180,7 @@ export default {
this.loading = false this.loading = false
this.personList = data this.personList = data
}) })
.catch((err) => { .catch(err => {
this.loading = false this.loading = false
}) })
} }
...@@ -205,7 +192,7 @@ export default { ...@@ -205,7 +192,7 @@ export default {
this.customerList = [] this.customerList = []
} }
page && (this.customerQuery.pageNum = page) page && (this.customerQuery.pageNum = page)
apiCustomer.getList(this.customerQuery).then((res) => { apiCustomer.getList(this.customerQuery).then(res => {
this.customerList.push(...res.rows) this.customerList.push(...res.rows)
this.customerTotal = ~~res.total this.customerTotal = ~~res.total
this.customerQuery.pageNum++ this.customerQuery.pageNum++
......
...@@ -34,10 +34,22 @@ ...@@ -34,10 +34,22 @@
<div class="name pd15">{{ talkName }}</div> <div class="name pd15">{{ talkName }}</div>
<el-tabs v-model="activeName" @tab-click="tabClick(true)"> <el-tabs v-model="activeName" @tab-click="tabClick(true)">
<el-tab-pane label="内部联系人" name="0"> <el-tab-pane label="内部联系人" name="0">
<userList v-if="activeName == 0" :personList="personList" :loading="loading" @chatFn="chatFn"> </userList> <userList
v-if="activeName == 0"
:personList="personList"
:loading="loading"
@chatFn="chatFn"
>
</userList>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="外部联系人" name="1"> <el-tab-pane label="外部联系人" name="1">
<userList v-if="activeName == 1" :personList="personList" :loading="loading" @chatFn="chatFn"> </userList> <userList
v-if="activeName == 1"
:personList="personList"
:loading="loading"
@chatFn="chatFn"
>
</userList>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="群聊" name="2"> <el-tab-pane label="群聊" name="2">
<grouplist <grouplist
...@@ -57,7 +69,11 @@ ...@@ -57,7 +69,11 @@
<el-col :span="12"> <el-col :span="12">
<chatListClass v-show="queryChat.receiveName" :queryChat="queryChat"></chatListClass> <chatListClass v-show="queryChat.receiveName" :queryChat="queryChat"></chatListClass>
<el-empty v-if="!queryChat.receiveName" description="请选择联系人" :image-size="100"></el-empty> <el-empty
v-if="!queryChat.receiveName"
description="请选择联系人"
:image-size="100"
></el-empty>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
...@@ -67,7 +83,7 @@ import chatListClass from './component/chatListClass.vue' ...@@ -67,7 +83,7 @@ import chatListClass from './component/chatListClass.vue'
import userList from './component/userList.vue' import userList from './component/userList.vue'
import grouplist from './component/groupList.vue' import grouplist from './component/groupList.vue'
import * as apiOrg from '@/api/organization' import * as apiOrg from '@/api/organization'
import api from '@/api/conversation/content.js' import * as api from '@/api/conversation/content.js'
export default { export default {
components: { components: {
...@@ -141,7 +157,7 @@ export default { ...@@ -141,7 +157,7 @@ export default {
this.loading = false this.loading = false
this.personList = data this.personList = data
}) })
.catch((err) => { .catch(err => {
this.loading = false this.loading = false
}) })
} else if (this.activeName == 1) { } else if (this.activeName == 1) {
...@@ -151,7 +167,7 @@ export default { ...@@ -151,7 +167,7 @@ export default {
this.loading = false this.loading = false
this.personList = data this.personList = data
}) })
.catch((err) => { .catch(err => {
this.loading = false this.loading = false
}) })
} else { } else {
...@@ -161,7 +177,7 @@ export default { ...@@ -161,7 +177,7 @@ export default {
this.loading = false this.loading = false
this.personList = data this.personList = data
}) })
.catch((err) => { .catch(err => {
this.loading = false this.loading = false
}) })
} }
...@@ -196,7 +212,7 @@ export default { ...@@ -196,7 +212,7 @@ export default {
// data.children.push(...rows) // data.children.push(...rows)
let arr = node.data.children ? node.data.children.concat(rows || []) : rows || [] let arr = node.data.children ? node.data.children.concat(rows || []) : rows || []
arr.forEach((element) => { arr.forEach(element => {
element.isLeaf = !!element.userId element.isLeaf = !!element.userId
}) })
resolve(arr) resolve(arr)
......
...@@ -9,7 +9,12 @@ ...@@ -9,7 +9,12 @@
<el-row type="flex" class="row-bg" justify="space-between"> <el-row type="flex" class="row-bg" justify="space-between">
<el-col :span="24" class="title_name">数据总览</el-col> <el-col :span="24" class="title_name">数据总览</el-col>
</el-row> </el-row>
<el-row type="flex" class="row-bg" justify="space-between" style="margin-top:35px; text-align: center;"> <el-row
type="flex"
class="row-bg"
justify="space-between"
style="margin-top:35px; text-align: center;"
>
<el-col :span="6" class="col_style">企业成员总数</el-col> <el-col :span="6" class="col_style">企业成员总数</el-col>
<el-col :span="6" class="col_style">客户总人数</el-col> <el-col :span="6" class="col_style">客户总人数</el-col>
<el-col :span="6" class="col_style">客户群总数</el-col> <el-col :span="6" class="col_style">客户群总数</el-col>
...@@ -44,7 +49,12 @@ ...@@ -44,7 +49,12 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row type="flex" class="row-bg" justify="space-between" style="margin-top:30px; text-align: center;"> <el-row
type="flex"
class="row-bg"
justify="space-between"
style="margin-top:30px; text-align: center;"
>
<el-col :span="6">发起申请数</el-col> <el-col :span="6">发起申请数</el-col>
<el-col :span="6">新增客户数</el-col> <el-col :span="6">新增客户数</el-col>
<el-col :span="6">群新增人数</el-col> <el-col :span="6">群新增人数</el-col>
...@@ -58,10 +68,17 @@ ...@@ -58,10 +68,17 @@
> >
<el-col :span="6">{{ erchatsTable.newApplyCnt }}</el-col> <el-col :span="6">{{ erchatsTable.newApplyCnt }}</el-col>
<el-col :span="6">{{ erchatsTable.newContactCnt }}</el-col> <el-col :span="6">{{ erchatsTable.newContactCnt }}</el-col>
<el-col :span="6">{{ erchatsTable.newMemberCnt ? erchatsTable.newMemberCnt : 0 }}</el-col> <el-col :span="6">{{
erchatsTable.newMemberCnt ? erchatsTable.newMemberCnt : 0
}}</el-col>
<el-col :span="6">{{ erchatsTable.negativeFeedbackCnt }}</el-col> <el-col :span="6">{{ erchatsTable.negativeFeedbackCnt }}</el-col>
</el-row> </el-row>
<el-row type="flex" class="row-bg" justify="space-between" style="margin-top:10px; text-align: center;"> <el-row
type="flex"
class="row-bg"
justify="space-between"
style="margin-top:10px; text-align: center;"
>
<el-col <el-col
:span="6" :span="6"
:class="{ :class="{
...@@ -143,20 +160,34 @@ ...@@ -143,20 +160,34 @@
<p class="p2">登录时间:{{ parseTime(new Date()) }}</p> <p class="p2">登录时间:{{ parseTime(new Date()) }}</p>
<p class="p1 p3 margint20">LinkWechat 企业微信SCRM</p> <p class="p1 p3 margint20">LinkWechat 企业微信SCRM</p>
<p class="p2 p4">版本信息:开源 <span class="fr">可用期限:永久</span></p> <p class="p2 p4">版本信息:开源 <span class="fr">可用期限:永久</span></p>
<el-row :gutter="20" type="flex" class="row-bg" justify="center" style="text-align:center"> <el-row
:gutter="20"
type="flex"
class="row-bg"
justify="center"
style="text-align:center"
>
<el-col :span="10" class="flexspan"> <el-col :span="10" class="flexspan">
<img src="../assets/index/bzwd.png" /> <img src="../assets/index/bzwd.png" />
<a href="https://www.yuque.com/linkwechat/help"> 帮助手册</a> <a href="https://www.yuque.com/linkwechat/help"> 帮助手册</a>
</el-col> </el-col>
<el-col :span="2"></el-col> <el-col :span="2"></el-col>
<el-col :span="10" class="flexspan" @click.native="msgInfo('《使用手册》正在加急上线中,敬请关注…')" <el-col
:span="10"
class="flexspan"
@click.native="msgInfo('《使用手册》正在加急上线中,敬请关注…')"
><img src="../assets/index/kfsc.png" /> 开发文档</el-col ><img src="../assets/index/kfsc.png" /> 开发文档</el-col
> >
</el-row> </el-row>
</div> </div>
<div class="inedx_r_top_bottom"> <div class="inedx_r_top_bottom">
<span class="inedx_r_top_bottomp1"><img src="../assets/index/gxrz.png" /> 更新日志</span> <span class="inedx_r_top_bottomp1"><img src="../assets/index/gxrz.png" /> 更新日志</span>
<span class="fr" style="color:#0079DE" @click="msgInfo('《更新日志》正在加急上线中,敬请关注…')">更多</span> <span
class="fr"
style="color:#0079DE"
@click="msgInfo('《更新日志》正在加急上线中,敬请关注…')"
>更多</span
>
<ul> <ul>
<li v-for="(index, i) in 3" :key="i" @click="msgInfo('暂无内容')"> <li v-for="(index, i) in 3" :key="i" @click="msgInfo('暂无内容')">
即将上线,敬请期待 <span class="fr">03-26</span> 即将上线,敬请期待 <span class="fr">03-26</span>
...@@ -174,13 +205,17 @@ ...@@ -174,13 +205,17 @@
</div> </div>
<div class="inedx_r_top_bottom" style="text-align:center"> <div class="inedx_r_top_bottom" style="text-align:center">
<p style="text-align:left"> <p style="text-align:left">
<span class="inedx_r_top_bottomp1"> <img src="../assets/index/kfq.png" /> 官方交流</span> <span class="inedx_r_top_bottomp1">
<img src="../assets/index/kfq.png" /> 官方交流</span
>
</p> </p>
<img :src="bossImg" class="img" /> <img :src="bossImg" class="img" />
</div> </div>
<div class="inedx_r_top_bottom" style="text-align:center"> <div class="inedx_r_top_bottom" style="text-align:center">
<p style="text-align:left"> <p style="text-align:left">
<span class="inedx_r_top_bottomp1"> <img src="../assets/index/khq.png" /> 联系客服</span> <span class="inedx_r_top_bottomp1">
<img src="../assets/index/khq.png" /> 联系客服</span
>
</p> </p>
<img :src="bossImg" class="img" /> <img :src="bossImg" class="img" />
</div> </div>
...@@ -198,7 +233,8 @@ ...@@ -198,7 +233,8 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="4" v-for="(index, i) in car" :key="i"> <el-col :span="4" v-for="(index, i) in car" :key="i">
<div class="grid-content" @click="$router.push(index.url)"> <div class="grid-content" @click="$router.push(index.url)">
<span class="fl"> <img :src="index.img" alt="" /> </span><span class="fl craname">{{ index.name }}</span> <span class="fl"> <img :src="index.img" alt="" /> </span
><span class="fl craname">{{ index.name }}</span>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -206,7 +242,7 @@ ...@@ -206,7 +242,7 @@
</div> </div>
</template> </template>
<script> <script>
import { content } from '@/api/conversation/content.js' import * as content from '@/api/conversation/content.js'
import echarts from 'echarts' import echarts from 'echarts'
export default { export default {
name: 'Index', name: 'Index',
...@@ -285,12 +321,12 @@ export default { ...@@ -285,12 +321,12 @@ export default {
} }
}, },
tableInfo() { tableInfo() {
content.indexTable().then((res) => { content.indexTable().then(res => {
this.table = res.data this.table = res.data
}) })
}, },
erchatInfo() { erchatInfo() {
content.indexEchart().then((res) => { content.indexEchart().then(res => {
this.allData = res.data this.allData = res.data
this.uptime = res.data.updateTime this.uptime = res.data.updateTime
this.erchatsTable = this.allData.today this.erchatsTable = this.allData.today
...@@ -305,7 +341,7 @@ export default { ...@@ -305,7 +341,7 @@ export default {
arr4: [], arr4: [],
time: [] time: []
} }
this.erchatsTable.dataList.forEach((a) => { this.erchatsTable.dataList.forEach(a => {
data.arr1.push(a.newApplyCnt) data.arr1.push(a.newApplyCnt)
data.time.push(a.xtime) data.time.push(a.xtime)
data.arr3.push(a.newMemberCnt) data.arr3.push(a.newMemberCnt)
...@@ -327,7 +363,7 @@ export default { ...@@ -327,7 +363,7 @@ export default {
this.resizeArr.push(charts) this.resizeArr.push(charts)
let resize = function() { let resize = function() {
this.resizeArr.forEach((element) => { this.resizeArr.forEach(element => {
element.resize() element.resize()
}) })
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!