Commit 2fd8359b by 闻闻闻

H5更新

2 parents 3ff25449 58f22719
......@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<script src="./jweixin-1.2.0.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"></script>
</head>
......
......@@ -39,6 +39,7 @@ export default {
({ data }) => {
let { timestamp, nonceStr, signature } = data
wx.agentConfig({
beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
debug: true,
corpid: this.corpId, // 必填,企业微信的corpid,必须与当前登录的企业一致
agentid: this.agentId, // 必填,企业微信的应用id (e.g. 1000247)
......
......@@ -95,7 +95,7 @@ export default {
},
// 选择二维码确认按钮
submitSelectQrCode(data) {
debugger
// debugger
this.form.groupCodeId = data.id
this.form.qrCode = data.codeUrl
this.$refs.form.validateField('qrCode')
......
......@@ -77,7 +77,7 @@ export default {
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id)
this.ids = selection.map((item) => item.newGroupId)
},
/** 删除按钮操作 */
remove(id) {
......@@ -98,7 +98,7 @@ export default {
},
download(data) {
let name = data.activityScene + '-' + data.newGroupId + '.png'
download(id).then((res) => {
download(data.newGroupId).then((res) => {
if (res != null) {
let blob = new Blob([res], { type: 'application/zip' })
let url = window.URL.createObjectURL(blob)
......@@ -111,8 +111,8 @@ export default {
})
},
/** 批量下载 */
downloadBatch(qrCode) {
this.$confirm('是否确认下载所有图片吗?', '警告', {
downloadBatch() {
this.$confirm('是否确认下载所有活码图片吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
......@@ -209,9 +209,15 @@ export default {
</el-tooltip>
</div>
<div>
<el-button type="primary" @click="download()">批量下载</el-button>
<el-button
type="primary"
:disabled="!ids.length"
@click="downloadBatch()"
>批量下载</el-button
>
<el-button
v-hasPermi="['customerManage:customer:export']"
:disabled="!ids.length"
type="cyan"
@click="remove()"
>批量删除</el-button
......
<template>
<div class="takecontent">
<ul>
<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
<div :style="{'color':item.action=='send'?'#199ed8':'#999'}"><span
v-if="item.fromInfo">{{item.fromInfo.name}}</span> <span
:style="{'color':item.action=='send'?'#199ed8':'#999'}">{{parseTime(item.msgtime)}}</span></div>
<div v-if="item.msgtype=='text'" class="msgtypetext" >
<div v-if="item.msgtype=='text'" class="msgtypetext">
{{item.text.content}}
</div>
<div v-else-if="item.msgtype=='image'" class="msgtypeimg">
<img :src="item.image.attachment" @click="showImg(item)">
</div>
<div v-else-if="item.msgtype=='file'" class="msgtypefile" @click="down(item.file)">
{{item.file.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)"></i>
<i class="el-icon-microphone" style=" font-size: 40px; color: #199ed8;" @click="playVideo(item)"></i>
</div>
<div v-else-if="item.msgtype=='emotion'" class="msgtypeimg">
<img :src="item.emotion.attachment" @click="showImg(item)">
<img :src="item.emotion.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')"></i>
</div>
<div v-else-if="item.msgtype=='location'" class="msgtypecard" >
<div v-else-if="item.msgtype=='location'" class="msgtypecard">
<div class="card_name">
<el-amap ref="map" vid="amapDemo" :center="[item.location.longitude, item.location.latitude]" :zoom="zoom" class="amap-demo" style="pointer-events: none;">
<el-amap-marker :position="[item.location.longitude, item.location.latitude]"></el-amap-marker>
</el-amap>
<el-amap ref="map" vid="amapDemo" :center="[item.location.longitude, item.location.latitude]" :zoom="zoom"
class="amap-demo" style="pointer-events: none;">
<el-amap-marker :position="[item.location.longitude, item.location.latitude]"></el-amap-marker>
</el-amap>
</div>
<div class="card_foot" >{{item.location.address}}</div>
<div class="card_foot">{{item.location.address}}</div>
</div>
<div v-else-if="item.msgtype=='weapp'" class="msgtypecard">
<div class="card_name"></div>
......@@ -45,61 +45,58 @@
</li>
</ul>
<div class="shabowbox" v-show="dia" >
<div class="close" @click="dia=false"><i class="el-icon-circle-close"></i></div>
<div class="shabowboxvidoe">
<video-player class="video-player vjs-custom-skin"
ref="videoPlayer"
id="videoPlayer"
:playsinline="true" :options="playerOptions"></video-player>
<div class="shabowbox" v-show="dia">
<div class="close" @click="dia=false"><i class="el-icon-circle-close"></i></div>
<div class="shabowboxvidoe">
<video-player class="video-player vjs-custom-skin" ref="videoPlayer" id="videoPlayer" :playsinline="true"
:options="playerOptions"></video-player>
</div>
</div>
<div class="shabowbox" v-show="diavioce">
<div class="close" @click="vioceClose"><i class="el-icon-circle-close"></i></div>
<div class="shabowboxvidoe shabowboxaudio">
<AudioPlayer :audio-list="vioceSrc" ref="AudioPlayer" :before-play="onBeforePlay" />
</div>
</div>
<div class="shabowbox" v-show="diavioce" >
<div class="close" @click="diavioce=false"><i class="el-icon-circle-close"></i></div>
<div class="shabowboxvidoe shabowboxaudio">
<AudioPlayer :audio-list="vioceSrc"
:before-play="onBeforePlay" />
</div>
</div>
<el-dialog
:visible.sync="dialogVisible"
width="30%"
>
<img :src="imgSrc" style="width:100%;max-height:600px">
<span slot="footer" class="dialog-footer">
</span>
</el-dialog>
<el-dialog :visible.sync="dialogVisible" width="30%">
<img :src="imgSrc" style="width:100%;max-height:600px">
<span slot="footer" class="dialog-footer">
</span>
</el-dialog>
</div>
</template>
<script>
import { AMapManager } from 'vue-amap';
import {
AMapManager
} from 'vue-amap';
import 'video.js/dist/video-js.css'
import 'vue-video-player/src/custom-theme.css'
import {
parseTime,
yearMouthDay
} from '@/utils/common.js'
export default {
components:{AMapManager},
components: {
AMapManager
},
props: {
allChat: {
type: Array,
defluat: () => []
}
},
mounted(){
},
mounted() {
},
data() {
return {
dia: false,
diavioce:false,
dialogVisible:false,
imgSrc:'',
vioceSrc:[],
diavioce: false,
dialogVisible: false,
imgSrc: '',
vioceSrc: [],
playerOptions: {
playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
autoplay: false, //如果true,浏览器准备好时开始回放。
......@@ -116,50 +113,55 @@
}],
poster: "", //你的封面地址(覆盖在视频上面的图片)
width: document.documentElement.clientWidth,
height:'475',
height: '475',
notSupportedMessage: '此视频暂无法播放,请稍后再试' //允许覆盖Video.js无法播放媒体源时显示的默认信息。
},
zoom: 15,
center: [117.148118, 36.660223],
markers: [
{
position: [117.148118, 36.660223],
visible: false,
draggable: false,
}
]
zoom: 15,
center: [117.148118, 36.660223],
markers: [{
position: [117.148118, 36.660223],
visible: false,
draggable: false,
}]
}
},
methods: {
 
   
playVideo(e){
this.vioceSrc=[e.voice.attachment]
this.diavioce=true;
vioceClose() {
this.diavioce = false
const mp3 = this.$refs.AudioPlayer;
mp3.pause()
},
playVideo(e) {
this.vioceSrc = [ e.voice.attachment]
this.diavioce = true;
},
onBeforePlay(next){
next() // 开始播放
onBeforePlay(next) {
next() // 开始播放
},
showImg(e){
this.imgSrc=e.image.attachment;
this.dialogVisible=true
showImg(e) {
this.imgSrc = e.image.attachment;
this.dialogVisible = true
},
play(e) {
this.dia=true
const player = this.$refs.videoPlayer.player
this.playerOptions['sources'][0]['src']=e.video.attachment;
player.play()
this.dia = true
const player = this.$refs.videoPlayer.player
this.playerOptions['sources'][0]['src'] = e.video.attachment;
player.play()
},
down(e) {
//下载文件
const url = window.URL.createObjectURL(new Blob([e.attachment], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
}))
const link = document.createElement('a')
link.href = url
link.setAttribute('download', e.filename) // 下载文件的名称及文件类型后缀
document.body.appendChild(link)
link.click()
document.body.removeChild(link); // 下载完成移除元素
window.URL.revokeObjectURL(url); // 释放掉blob对象
}
}
}
......@@ -170,11 +172,54 @@
padding: 0;
margin: 0;
}
#videoPlayer /deep/ .vjs-tech{ height: 450px;}
.shabowbox{ position: fixed;width:100%;height: 100%; background: rgba(0, 0, 0,0.4);left: 0;top: 0;z-index: 2000;}
.shabowboxvidoe{ position: fixed;width: 800px; height: 475px;left: 50%;margin-left: -400px;top:50%;margin-top: -235px;;z-index: 2001;background: #fff;}
.shabowboxaudio{ height: 125px;padding: 12px;}
.close{ position: fixed;width: 50px; height:50px;right: 10px;z-index: 2012;top: 10px;text-align: center;line-height: 50px;font-size: 20px;color: #FFF;cursor: pointer;font-size: 43px;}
#videoPlayer /deep/ .vjs-tech {
height: 450px;
}
.shabowbox {
position: fixed;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
left: 0;
top: 0;
z-index: 2000;
}
.shabowboxvidoe {
position: fixed;
width: 800px;
height: 475px;
left: 50%;
margin-left: -400px;
top: 50%;
margin-top: -235px;
;
z-index: 2001;
background: #fff;
}
.shabowboxaudio {
height: 125px;
padding: 12px;
}
.close {
position: fixed;
width: 50px;
height: 50px;
right: 10px;
z-index: 2012;
top: 10px;
text-align: center;
line-height: 50px;
font-size: 20px;
color: #FFF;
cursor: pointer;
font-size: 43px;
}
.takecontent {
text-align: left;
width: 100%;
......@@ -217,9 +262,9 @@
.msgtypevideo {
margin: 10px;
cursor: pointer;
border-radius: 8px;
}
......@@ -257,4 +302,5 @@
}
}
</style>
<template>
<div class="list" v-loading="loading">
<div v-if="personList.length>=1">
<div v-if="personList">
<ul>
<li v-for="(item,index) in personList" :key="index" @click="liClick(item)">
<el-row style="padding:10px" v-if="item.finalChatContext.msgtype=='text'">
<span class="fl">
<div class="ninebox">
<ul v-if="item.roomInfo">
<li v-for="(a,i) in item.roomInfo.avatar.split(',')" :key="i"><img :src="a" alt=""></li>
<li v-for="(a,i) in item.roomInfo.avatar.split(',')" :key="i"><img :src="a" ></li>
</ul>
</div>
......@@ -63,13 +62,13 @@
*{ padding: 0;
.fl{float: left;}
margin: 0;}
.ninebox{ width: 62px; height: 60px; border: 1px solid #199ed8;;
.ninebox{ width: 54px; height: 52px; border: 1px solid #199ed8;;
ul li{
float: left;
width: 17px;
height: 17px;
width: 15px;
height: 15px;
padding: 0!important;
margin:1px 2px 2px 1px;
margin:1px 1px 1px 1px;
}}
.list {
overflow-y:scroll;
......@@ -83,7 +82,7 @@
.gray{color: #999;}
.padt10{padding-top: 10px;}
ul li {
padding: 10px;
padding:3px 10px;
overflow: hidden;
border-bottom: 1px solid #efefef;
cursor: pointer;
......@@ -92,8 +91,8 @@
text-overflow:ellipsis;}
:hover{ background: #efefef;}
img {
width: 40px;
height: 40px;
width: 100%;
height: 100%;
float: left
}
}
......
<template>
<div class="list" v-loading="loading">
<div v-if="personList.length>=1">
<div v-if="personList">
<ul>
<li v-for="(item,index) in personList" :key="index" @click="liClick(item)">
<el-row style="padding:10px">
......@@ -36,6 +36,7 @@
},
methods:{
liClick(e){
console.log(e,'liClick')
this.$emit('chatFn',e)
}
}
......
......@@ -2,13 +2,13 @@
<div class="employ">
<el-row>
<el-col :span="6" class="borderR">
<div class="hd_box">
<!-- <div class="hd_box">
<div class="hd_name">成员({{employAmount}})</div>
<div class="paddingT10">
<el-input placeholder="请输入内容" prefix-icon="el-icon-search" v-model="employName">
</el-input>
</div>
</div>
</div> -->
<div class="ct_box ct_boxFirst">
<el-tree class="filter-tree" :data="treeData" :props="defaultProps" :filter-node-method="filterNode"
ref="tree" @node-click="handleNodeClick" :default-expand-all="true">
......@@ -100,7 +100,7 @@
<el-table-column prop="action" label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="downloadFile(scope.row)">下载</el-button>
<el-button type="text" size="small">查看</el-button>
</template>
</el-table-column>
</el-table>
......@@ -122,14 +122,26 @@
start-placeholder="开始日期" end-placeholder="结束日期" align="right" @change="activeNameThreeClick">
</el-date-picker>
</div>
<el-table :data="fileData" stripe style="width: 100%" :header-cell-style="{background:'#fff'}">
<el-table :data="allVoice" stripe style="width: 100%" :header-cell-style="{background:'#fff'}">
<el-table-column prop="date" label="发起人">
<template slot-scope="scope">
{{scope.row.fromInfo.name}}
</template>
</el-table-column>
<el-table-column prop="name" label="通话时间">
<template slot-scope="scope">
{{parseTime(scope.row.msgtime)}}
</template>
</el-table-column>
<el-table-column prop="address" label="时长">
<template slot-scope="scope">
{{(scope.row.voice.play_length)}}s
</template>
</el-table-column>
<el-table-column prop="address" label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="voiceLook(scope.row.voice)">查看</el-button>
</template>
</el-table-column>
</el-table>
</div>
......@@ -150,8 +162,9 @@
content
} from '@/api/content.js'
import {
yearMouthDay,download
yearMouthDay,parseTime
} from '@/utils/common.js'
export default {
components: {
list,
......@@ -195,8 +208,19 @@
},
mounted() {
this.getTree()
//this.getAmount()
},
methods: {
voiceLook(e){
const url = window.URL.createObjectURL(new Blob([e.attachment]))
const link = document.createElement('a')
link.href = url
link.setAttribute('download','yuyin') // 下载文件的名称及文件类型后缀
document.body.appendChild(link)
link.click()
document.body.removeChild(link); // 下载完成移除元素
window.URL.revokeObjectURL(url); // 释放掉blob对象
},
downloadFile(e){
const url = window.URL.createObjectURL(new Blob([e.file.attachment],{type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'}))
const link = document.createElement('a')
......@@ -227,7 +251,10 @@
this.activeNameThreeClick(true)
},
activeNameThreeClick(page, group) {
console.log(this.activeName)
console.log(this.chat.id,'this.chat.id')
if(!!!this.chat.id){
return //没有选择人
}
if (!!!page) {
this.currentPage = 1
}
......@@ -260,12 +287,15 @@
if (this.activeName=='2') {
content.chatGrounpList(query).then(res => {
this.total = Number(res.total)
this.resortData(res)
console.log(res,'this.activeName=')
this.resortData(res.data)
})
} else {
content.chatList(query).then(res => {
console.log(res,'ssss')
this.total = Number(res.total)
this.resortData(res)
this.resortData(res.data)
})
}
}
......@@ -311,17 +341,16 @@
if (!this.employId) {
return
}
console.log
if (flag) {
this.loading = true
}
content.getTree({
fromId: this.employId,
searchType: this.activeName
}).then(({
rows
}) => {
}).then((res) => {
this.loading = false
this.personList = rows
this.personList = res.data.rows
}).catch(err => {
this.loading = false
})
......@@ -331,6 +360,18 @@
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
// getAmount(){
// let querys = {
// pageNum: '1',
// pageSize: '999',
// department: ''
// }
// api.getList(querys).then(({
// total
// }) => {
// this.employAmount= total
// })
// },
handleNodeClick(data, add) {
if (!data.userId) {
let querys = {
......@@ -338,12 +379,9 @@
pageSize: '999',
department: data.id
}
api.getList(querys).then(({
rows
}) => {
const newChild = rows;
api.getList(querys).then(res => {
this.$set(data, 'children', []);
data.children = rows
data.children = res.data.rows
})
} else {
this.talkName = data.name;
......@@ -413,7 +451,7 @@
}
.ct_boxFirst {
height: 707px !important;
height: 800px !important;
}
.ct_box {
......
......@@ -4,7 +4,6 @@
<el-row>
<el-form-item label="员工名称">
<el-input v-model="form.Ename" placeholder="客户名称" style="width:300px"></el-input>
</el-form-item>
<el-form-item label="客户名称">
<el-input v-model="form.Cname" placeholder="客户名称" style="width:300px"></el-input>
......@@ -15,7 +14,6 @@
<el-input v-model="form.Scontent" placeholder="查找内容" style="width:300px"></el-input>
</el-form-item>
<el-form-item label="时间范围">
<el-date-picker v-model="form.Stime" type="datetimerange" format='yyyy-MM-dd' range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期" align="right">
</el-date-picker>
......@@ -146,8 +144,8 @@
}
content.getChatAllList(query).then(res => {
console.log(res)
this.fileData = res.rows;
this.total = Number(res.total)
this.fileData = res.data.rows;
this.total = Number(res.data.total)
})
},
chechName(e) {
......
......@@ -16,7 +16,7 @@
<el-col :span="4">
<img v-if="i.avatar" :src="i.avatar" alt="头像">
</el-col>
<el-col :span="16" v-if="i"><span style="line-height:40px">{{i.name}}</span></el-col>
<el-col :span="20" v-if="i"><span style="line-height:40px">{{i.name}}</span></el-col>
</el-row>
</li>
</ul>
......@@ -230,11 +230,11 @@
content.getTree({
fromId: this.employId,
searchType: this.activeName
}).then(({
rows
}) => {
}).then((
res
) => {
this.loading = false
this.personList = rows
this.personList =res.data.rows
}).catch(err => {
this.loading = false
})
......@@ -255,7 +255,6 @@
} else if (this.activeNameThree == 4) {
msgType = 'voice'
}
let query = {
fromId: this.chatData.fromId,
msgType,
......@@ -271,13 +270,13 @@
}
if (group) {
content.chatGrounpList(query).then(res => {
this.total = Number(res.total)
this.resortData(res)
this.total = Number(res.data.total)
this.resortData(res.data)
})
} else {
content.chatList(query).then(res => {
this.total = Number(res.total)
this.resortData(res)
this.total = Number(res.data.total)
this.resortData(res.data)
})
}
},
......@@ -312,11 +311,11 @@
}
content.listByCustomer(querys).then(res => {
console.log(res)
res.rows = res.rows.filter((a, b) => {
res.rows = res.data.rows.filter((a, b) => {
return a && a.name
})
this.CList = res.rows
this.employAmount = res.total;
this.CList = res.data.rows
this.employAmount = res.data.total;
})
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!