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' 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,6 +40,19 @@ const getGroupChatList = fromId => { ...@@ -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 => { export const getChatList = params => {
return request({ return request({
...@@ -58,14 +71,3 @@ export const exportList = params => { ...@@ -58,14 +71,3 @@ export const exportList = params => {
// responseType: 'blob' // responseType: 'blob'
}) })
} }
//
export const content = {
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)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!