提交 d2f0484b 编写于 作者: 孙喜旺

会话存档员工检索接口修改

上级 74fc57ea
......@@ -6,7 +6,7 @@ VUE_APP_BASE_API = 'http://demo.linkwechat.cn/api'
# VUE_APP_BASE_API = 'http://n3rpzt.natappfree.cc'
# 开发环境IP
VUE_APP_BASE_URL = 'http://119.45.28.29:8090'
VUE_APP_BASE_URL = 'http://demo.linkwechat.cn/api'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
......@@ -2,7 +2,7 @@
ENV = 'production'
# 仟微管理系统/生产环境api
VUE_APP_BASE_API = 'http://119.45.28.29:8090'
VUE_APP_BASE_API = 'http://demo.linkwechat.cn/api'
# 生产环境IP
VUE_APP_BASE_URL = 'http://119.45.28.29:8090'
VUE_APP_BASE_URL = 'http://demo.linkwechat.cn/api'
# Do not edit. File was generated by node-gyp's "configure" step
{
"target_defaults": {
"cflags": [],
"default_configuration": "Release",
"defines": [],
"include_dirs": [],
"libraries": [],
"msbuild_toolset": "v141",
"msvs_windows_target_platform_version": "10.0.17763.0"
},
"variables": {
"asan": 0,
"build_v8_with_gn": "false",
"coverage": "false",
"dcheck_always_on": 0,
"debug_nghttp2": "false",
"debug_node": "false",
"enable_lto": "false",
"enable_pgo_generate": "false",
"enable_pgo_use": "false",
"error_on_warn": "false",
"force_dynamic_crt": 0,
"host_arch": "x64",
"icu_data_in": "..\\..\\deps\\icu-tmp\\icudt67l.dat",
"icu_endianness": "l",
"icu_gyp_path": "tools/icu/icu-generic.gyp",
"icu_path": "deps/icu-small",
"icu_small": "false",
"icu_ver_major": "67",
"is_debug": 0,
"napi_build_version": "7",
"nasm_version": "2.14",
"node_byteorder": "little",
"node_debug_lib": "false",
"node_enable_d8": "false",
"node_install_npm": "true",
"node_module_version": 83,
"node_no_browser_globals": "false",
"node_prefix": "/usr/local",
"node_release_urlbase": "https://nodejs.org/download/release/",
"node_shared": "false",
"node_shared_brotli": "false",
"node_shared_cares": "false",
"node_shared_http_parser": "false",
"node_shared_libuv": "false",
"node_shared_nghttp2": "false",
"node_shared_openssl": "false",
"node_shared_zlib": "false",
"node_tag": "",
"node_target_type": "executable",
"node_use_bundled_v8": "true",
"node_use_dtrace": "false",
"node_use_etw": "true",
"node_use_node_code_cache": "true",
"node_use_node_snapshot": "true",
"node_use_openssl": "true",
"node_use_v8_platform": "true",
"node_with_ltcg": "true",
"node_without_node_options": "false",
"openssl_fips": "",
"openssl_is_fips": "false",
"ossfuzz": "false",
"shlib_suffix": "so.83",
"target_arch": "x64",
"v8_enable_31bit_smis_on_64bit_arch": 0,
"v8_enable_gdbjit": 0,
"v8_enable_i18n_support": 1,
"v8_enable_inspector": 1,
"v8_enable_lite_mode": 0,
"v8_enable_object_print": 1,
"v8_enable_pointer_compression": 0,
"v8_no_strict_aliasing": 1,
"v8_optimized_debug": 1,
"v8_promise_internal_field_count": 1,
"v8_random_seed": 0,
"v8_trace_maps": 0,
"v8_use_siphash": 1,
"want_separate_host_toolset": 0,
"nodedir": "C:\\Users\\77514\\AppData\\Local\\node-gyp\\Cache\\14.15.0",
"standalone_static_library": 1,
"msbuild_path": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\MSBuild\\15.0\\Bin\\MSBuild.exe"
}
}
import request from '@/utils/request'
const getTree = (params) => {
const getExternalChatList = (params) => {
return request({
url: '/chat/mapping/list',
method: 'get',
params,
url: '/linkwechat/msg/selectExternalChatList/'+ params.fromId,
method: 'get'
})
}
const getInternalChatList = (params) => {
return request({
url: '/linkwechat/msg/selectInternalChatList/'+ params.fromId,
method: 'get'
})
}
const getGroupChatList = (params) => {
return request({
url: '/linkwechat/msg/selectGroupChatList/'+ params.fromId,
method: 'get'
})
}
const chatList = (params) => {
return request({
url: '/wecom/finance/getChatContactList',
url: '/linkwechat/msg/list',
method: 'get',
params,
})
......@@ -26,7 +39,7 @@ const indexEchart = () => {
method: 'get'
})
}
//
//
const chatGrounpList = (params) => {
return request({
url: '/wecom/finance/getChatRoomContactList',
......@@ -52,7 +65,9 @@ const getChatAllList = (params) => {
export const content = {
indexEchart,
indexTable,
getTree,
getExternalChatList,
getInternalChatList,
getGroupChatList,
chatList,
listByCustomer,
getChatAllList,
......
......@@ -4,40 +4,40 @@
<li v-for="(item, index) in allChat" :key="index">
<!-- <span v-if="item.fromInfo.name">{{item.fromInfo.name}}</span> -->
<div :style="{ color: item.action == 'send' ? '#199ed8' : '#999' }">
<span v-if="item.fromInfo">{{ item.fromInfo.name }}</span>
<span v-if="item">{{ item.name }}</span>
<span
:style="{ color: item.action == 'send' ? '#199ed8' : '#999' }"
>{{ parseTime(item.msgTime) }}</span
>{{ item.msgTime }}</span
>
</div>
<div v-if="item.msgType == 'text'" class="msgtypetext">
{{ item.text.content }}
{{ JSON.parse(item.contact).content }}
</div>
<div v-else-if="item.msgType == 'image'" class="msgtypeimg">
<img :src="item.image.attachment" @click="showImg(item)" />
<img :src="JSON.parse(item.contact).attachment" @click="showImg(JSON.parse(item.contact))" />
</div>
<div
v-else-if="item.msgType == 'file'"
class="msgtypefile"
@click="down(item.file)"
@click="down(JSON.parse(item.contact))"
>
{{ item.file.fileName }}
{{ JSON.parse(item.contact).fileName }}
</div>
<div v-else-if="item.msgType == 'voice'" class="msgtypevoice">
<i
class="el-icon-microphone"
style=" font-size: 40px; color: #199ed8;"
@click="playVideo(item)"
@click="playVideo(JSON.parse(item.contact))"
></i>
</div>
<div v-else-if="item.msgType == 'emotion'" class="msgtypeimg">
<img :src="item.emotion.attachment" @click="showImg(item)" />
<img :src="JSON.parse(item.contact).attachment" @click="showImg(item)" />
</div>
<div v-else-if="item.msgType == 'video'" class="msgtypevideo">
<i
class="el-icon-video-play"
style=" font-size: 40px; color: #199ed8;"
@click="play(item, 'video')"
@click="play(JSON.parse(item.contact), 'video')"
></i>
</div>
<div v-else-if="item.msgType == 'location'" class="msgtypecard">
......@@ -45,24 +45,24 @@
<el-amap
ref="map"
vid="amapDemo"
:center="[item.location.longitude, item.location.latitude]"
:center="[JSON.parse(item.contact).longitude, JSON.parse(item.contact).latitude]"
:zoom="zoom"
class="amap-demo"
style="pointer-events: none;"
>
<el-amap-marker
:position="[item.location.longitude, item.location.latitude]"
:position="[JSON.parse(item.contact).longitude, iJSON.parse(item.contact).latitude]"
></el-amap-marker>
</el-amap>
</div>
<div class="card_foot">{{ item.location.address }}</div>
<div class="card_foot">{{ JSON.parse(item.contact).address }}</div>
</div>
<div v-else-if="item.msgType == 'weapp'" class="msgtypecard">
<div class="card_name">{{ item.weApp.title }}</div>
<div class="card_name">{{ JSON.parse(item.contact).title }}</div>
<div class="card_foot">小程序</div>
</div>
<div v-else-if="item.msgType == 'card'" class="msgtypecard ">
<div class="card_name">{{ item.card.corpName }}</div>
<div class="card_name">{{ JSON.parse(item.contact).corpName }}</div>
<div class="card_foot">个人名片</div>
</div>
</li>
......@@ -165,20 +165,20 @@ export default {
mp3.pause()
},
playVideo(e) {
this.vioceSrc = [e.voice.attachment]
this.vioceSrc = [e.attachment]
this.diavioce = true
},
onBeforePlay(next) {
next() // 开始播放
},
showImg(e) {
this.imgSrc = e.image.attachment
this.imgSrc = e.attachment
this.dialogVisible = true
},
play(e) {
this.dia = true
const player = this.$refs.videoPlayer.player
this.playerOptions['sources'][0]['src'] = e.video.attachment
this.playerOptions['sources'][0]['src'] = e.attachment
player.play()
},
down(e) {
......
......@@ -7,15 +7,12 @@
:key="index"
@click="liClick(item)"
>
<el-row
style="padding:10px"
v-if="item.finalChatContext.msgtype == 'text'"
>
<el-row style="padding:10px" v-if="item.msgType == 'text'">
<span class="fl">
<div class="ninebox">
<ul v-if="item.roomInfo">
<ul v-if="item.avatar">
<li
v-for="(a, i) in item.roomInfo.avatar.split(',')"
v-for="(a, i) in item.avatar.split(',')"
:key="i"
>
<img :src="a" />
......@@ -25,14 +22,14 @@
</span>
<span class="fl" style="margin-left:8px;line-height:60px">
<p>
{{ item.finalChatContext.roomInfo.name }}
{{ item.name }}
<span class="fr gray">{{
parseTime(item.finalChatContext.fromInfo.updateTime)
item.msgTime
}}</span>
</p>
<p class="gray" v-if="item.finalChatContext.fromInfo">
{{ item.finalChatContext.fromInfo.name }}:{{
item.finalChatContext.text.content
<p class="gray" v-if="item">
{{ item.name }}:{{
item.content
}}
</p>
</span>
......@@ -43,7 +40,7 @@
<p><span class="fr gray">{{parseTime(item.finalChatContext.msgtime)}}</span></p>
<p class="gray padt10" >{{item.finalChatContext.from}}:
<span v-if="item.finalChatContext.file.fileext=='mp4'">[视频]</span>
</p>
</p>
</el-col>
</el-row> -->
</li>
......
......@@ -9,10 +9,10 @@
>
<el-row style="padding:10px">
<span class="fl">
<img :src="item.finalChatContext.fromInfo.avatarMediaid"
<img :src="item.avatar"
/></span>
<span class="fl" style="margin-left:8px">
<p>{{ item.finalChatContext.fromInfo.name }}</p>
<p>{{ item.name }}</p>
</span>
</el-row>
</li>
......
......@@ -8,9 +8,12 @@
@click="liClick(item)"
>
<el-row style="padding:10px">
<span class="fl"> <img :src="item.receiveWeCustomer.avatar"/></span>
<span class="fl"> <img :src="item.avatar"/></span>
<span class="fl" style="margin-left:8px">
<p>{{ item.receiveWeCustomer.name }}</p>
<p>{{ item.name }}</p>
</span>
<span class="fl">
<p>{{ item.contact }}</p>
</span>
</el-row>
</li>
......@@ -32,7 +35,6 @@ export default {
defluat: false
}
},
data() {
return {
loadings: true
......@@ -42,6 +44,14 @@ export default {
liClick(e) {
console.log(e, 'liClick')
this.$emit('chatFn', e)
},
msgContentType(type,msg){
console.log(type,msg, 'msgContentType')
//消息获取
/*case msg = JSON.parse(msg);
switch (type){
case "text":
}*/
}
}
}
......
......@@ -227,17 +227,17 @@
>
<el-table-column prop="date" label="发起人">
<template slot-scope="scope">
{{ scope.row.fromInfo.name }}
{{ scope.row.name }}
</template>
</el-table-column>
<el-table-column prop="name" label="通话时间">
<template slot-scope="scope">
{{ parseTime(scope.row.msgtime) }}
{{ scope.row.msgTime }}
</template>
</el-table-column>
<el-table-column prop="address" label="时长">
<template slot-scope="scope">
{{ scope.row.voice.play_length }}s
{{ JSON.parse(scope.row.contact).play_length }}s
</template>
</el-table-column>
<el-table-column prop="address" label="操作">
......@@ -245,7 +245,7 @@
<el-button
type="text"
size="small"
@click="voiceLook(scope.row.voice)"
@click="voiceLook(JSON.parse(scope.row.contact))"
>查看</el-button
>
</template>
......@@ -265,7 +265,7 @@ import chat from '../component/chat.vue'
import insideList from '../component/insideList.vue'
import grouplist from '../component/groupList.vue'
import * as api from '@/api/organization'
import { content } from '@/api/content.js'
import { content } from '@/api/conversation/content.js'
import { yearMouthDay, parseTime } from '@/utils/common.js'
export default {
......@@ -278,7 +278,7 @@ export default {
data() {
return {
employAmount: 1,
employId: '',
fromId: '',
employName: '',
talkName: '',
treeData: [],
......@@ -362,8 +362,8 @@ export default {
this.activeNameThreeClick(true)
},
activeNameThreeClick(page, group) {
console.log(this.chat.id, 'this.chat.id')
if (!!!this.chat.id) {
console.log(this.chat.receiver,this.fromId, 'this.chat.id')
if (!!!this.chat.receiver) {
return //没有选择人
}
if (!!!page) {
......@@ -383,31 +383,26 @@ export default {
msgType = 'voice'
}
let query = {
fromId: this.employId,
fromId: this.fromId,
msgType,
pageSize: '10',
pageNum: this.currentPage,
orderByColumn: "msg_time",
isAsc: "asc",
beginTime: this.takeTime ? yearMouthDay(this.takeTime[0]) : '',
endTime: this.takeTime ? yearMouthDay(this.takeTime[1]) : ''
}
if (this.activeName == '2') {
query.roomId = this.chat.roomId
} else {
query.receiveId = this.chat.receiveId
}
if (this.activeName == '2') {
content.chatGrounpList(query).then((res) => {
this.total = Number(res.total)
console.log(res, 'this.activeName=')
this.resortData(res)
})
} else {
content.chatList(query).then((res) => {
console.log(res.rows, 'ssss')
this.total = Number(res.total)
this.resortData(res)
})
if (this.activeName != '2') {
query.toList = this.chat.receiver
}else {
query.roomId = this.chat.receiver
}
content.chatList(query).then((res) => {
console.log(res.rows, 'ssss')
this.total = Number(res.total)
this.resortData(res)
})
}
},
resortData(res) {
......@@ -446,25 +441,50 @@ export default {
},
tabClick(flag) {
this.personList = []
if (!this.employId) {
if (!this.fromId) {
return
}
console.log
if (flag) {
this.loading = true
}
content
.getTree({
fromId: this.employId,
searchType: this.activeName
})
.then(({ rows }) => {
this.loading = false
this.personList = rows
})
.catch((err) => {
this.loading = false
})
if(this.activeName == 0){
content
.getInternalChatList({
fromId: this.fromId
})
.then(({ data }) => {
this.loading = false
this.personList = data
})
.catch((err) => {
this.loading = false
})
}else if(this.activeName == 1){
content
.getExternalChatList({
fromId: this.fromId
})
.then(({ data }) => {
this.loading = false
this.personList = data
})
.catch((err) => {
this.loading = false
})
}else {
content
.getGroupChatList({
fromId: this.fromId
})
.then(({ data }) => {
this.loading = false
this.personList = data
})
.catch((err) => {
this.loading = false
})
}
},
filterNode(value, data) {
console.log(value, data)
......@@ -486,7 +506,7 @@ export default {
})
} else {
this.talkName = data.name
this.employId = data.userId
this.fromId = data.userId
this.tabClick()
}
}
......
......@@ -83,7 +83,7 @@
<script>
import {
content
} from '@/api/content.js'
} from '@/api/conversation/content.js'
import {
yearMouthDay,
parseTime
......
......@@ -249,7 +249,7 @@ import list from '../component/customerList.vue'
import chats from '../component/chat.vue'
import grouplist from '../component/groupList.vue'
import { content } from '@/api/content.js'
import { content } from '@/api/conversation/content.js'
import { yearMouthDay } from '@/utils/common.js'
export default {
components: {
......
......@@ -261,7 +261,7 @@
<script>
var elementResizeDetectorMaker = require('element-resize-detector')
import { arrData } from '@/utils/common.js'
import { content } from '@/api/content.js'
import { content } from '@/api/conversation/content.js'
import echarts from 'echarts'
export default {
name: 'Index',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册