Commit e5fc15c5 by xinla

Merge remote-tracking branch 'origin/front_end_1.5' into front_end_dev_2.0

2 parents 7a28842e 6b97dc24
import request from '@/utils/request'
// 外部联系人 会话列表
const getExternalChatList = fromId => {
export const getExternalChatList = fromId => {
return request({
url: '/chat/msg/selectExternalChatList/' + fromId,
method: 'get'
......@@ -9,7 +9,7 @@ const getExternalChatList = fromId => {
}
// 单聊 会话列表
const selectAloneChatList = params => {
export const selectAloneChatList = params => {
return request({
url: '/chat/msg/selectAloneChatList',
method: 'get',
......@@ -18,21 +18,21 @@ const selectAloneChatList = params => {
}
// 内部联系人列表
const getInternalChatList = fromId => {
export const getInternalChatList = fromId => {
return request({
url: '/chat/msg/selectInternalChatList/' + fromId,
method: 'get'
})
}
const getGroupChatList = fromId => {
export const getGroupChatList = fromId => {
return request({
url: '/chat/msg/selectGroupChatList/' + fromId,
method: 'get'
})
}
// const chatList = (params) => {
// export const chatList = (params) => {
// return request({
// url: '/chat/msg/list',
// method: 'get',
......@@ -40,6 +40,19 @@ const getGroupChatList = fromId => {
// })
// }
export const indexTable = () => {
return request({
url: '/wecom/page/getCorpBasicData',
method: 'get'
})
}
export const indexEchart = () => {
return request({
url: '/wecom/page/getCorpRealTimeData',
method: 'get'
})
}
// 全文检索 会话列表
export const getChatList = params => {
return request({
......@@ -58,14 +71,3 @@ export const exportList = params => {
// responseType: 'blob'
})
}
//
export const content = {
getExternalChatList,
selectAloneChatList,
getInternalChatList,
getGroupChatList,
// chatList,
getChatList
}
export default content
......@@ -6,16 +6,8 @@
<span class="fr download" @click="exportList()">下载会话</span>
</div>
</div>
<el-tabs
v-model="activeTab"
@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"
>
<el-tabs v-model="activeTab" @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
v-if="opened.includes(item.type)"
:queryChat="queryChat"
......@@ -28,7 +20,7 @@
<script>
import chatListClassTab from './chatListClassTab.vue'
import api from '@/api/conversation/content.js'
import * as api from '@/api/conversation/content.js'
export default {
components: { chatListClassTab },
props: {
......@@ -81,10 +73,12 @@ export default {
.then(() => {
return api.exportList(this.queryChat)
})
.then((response) => {
.then(response => {
this.download(response.msg)
})
.catch(function() {})
.catch(function(err) {
console.log(err)
})
}
}
}
......
......@@ -101,7 +101,7 @@
<script>
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'
export default {
name: '',
......
......@@ -32,25 +32,15 @@
<span style="line-height:40px">{{ item.name }}</span>
</el-col>
<el-col :span="10" class="ar">
<span
:style="{ color: item.type === 1 ? '#4bde03' : '#f9a90b' }"
<span :style="{ color: item.type === 1 ? '#4bde03' : '#f9a90b' }"
>{{ { 1: '@微信', 2: '@企业微信' }[item.type] }}
</span>
<i
:class="[
'el-icon-s-custom',
{ 1: 'man', 2: 'woman' }[item.gender]
]"
></i>
<i :class="['el-icon-s-custom', { 1: 'man', 2: 'woman' }[item.gender]]"></i>
</el-col>
</el-row>
<div class="ac mt10 mb15">
{{
customerList.length != customerTotal
? '下拉加载更多'
: '看到底了~'
}}
{{ customerList.length != customerTotal ? '下拉加载更多' : '看到底了~' }}
</div>
</template>
<el-empty v-else :image-size="100"></el-empty>
......@@ -93,10 +83,7 @@
<el-empty v-else :image-size="100" description="请选择客户"></el-empty>
</el-col>
<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"
......@@ -111,7 +98,7 @@
import chatListClass from './component/chatListClass.vue'
import userList from './component/userList.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'
export default {
components: {
......@@ -183,7 +170,7 @@ export default {
this.loading = false
this.personList = data
})
.catch((err) => {
.catch(err => {
this.loading = false
})
} else {
......@@ -193,7 +180,7 @@ export default {
this.loading = false
this.personList = data
})
.catch((err) => {
.catch(err => {
this.loading = false
})
}
......@@ -205,7 +192,7 @@ export default {
this.customerList = []
}
page && (this.customerQuery.pageNum = page)
apiCustomer.getList(this.customerQuery).then((res) => {
apiCustomer.getList(this.customerQuery).then(res => {
this.customerList.push(...res.rows)
this.customerTotal = ~~res.total
this.customerQuery.pageNum++
......
......@@ -34,10 +34,22 @@
<div class="name pd15">{{ talkName }}</div>
<el-tabs v-model="activeName" @tab-click="tabClick(true)">
<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 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 label="群聊" name="2">
<grouplist
......@@ -57,7 +69,11 @@
<el-col :span="12">
<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-row>
</div>
......@@ -67,7 +83,7 @@ import chatListClass from './component/chatListClass.vue'
import userList from './component/userList.vue'
import grouplist from './component/groupList.vue'
import * as apiOrg from '@/api/organization'
import api from '@/api/conversation/content.js'
import * as api from '@/api/conversation/content.js'
export default {
components: {
......@@ -141,7 +157,7 @@ export default {
this.loading = false
this.personList = data
})
.catch((err) => {
.catch(err => {
this.loading = false
})
} else if (this.activeName == 1) {
......@@ -151,7 +167,7 @@ export default {
this.loading = false
this.personList = data
})
.catch((err) => {
.catch(err => {
this.loading = false
})
} else {
......@@ -161,7 +177,7 @@ export default {
this.loading = false
this.personList = data
})
.catch((err) => {
.catch(err => {
this.loading = false
})
}
......@@ -196,7 +212,7 @@ export default {
// data.children.push(...rows)
let arr = node.data.children ? node.data.children.concat(rows || []) : rows || []
arr.forEach((element) => {
arr.forEach(element => {
element.isLeaf = !!element.userId
})
resolve(arr)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!