Commit 7850dedd by xinla

--no commit message

1 parent b2810808
...@@ -222,7 +222,7 @@ export default { ...@@ -222,7 +222,7 @@ export default {
display: inline-block; display: inline-block;
line-height: 30px; line-height: 30px;
cursor: pointer; cursor: pointer;
color: #199ed8; color: var(--color);
// text-indent: 10px; // text-indent: 10px;
// box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 1px 4px 0 rgba(0, 0, 0, 0.19); // box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 1px 4px 0 rgba(0, 0, 0, 0.19);
} }
......
...@@ -5,12 +5,12 @@ export default { ...@@ -5,12 +5,12 @@ export default {
props: { props: {
amrUrl: { amrUrl: {
type: String, type: String,
default: '' default: '',
} },
}, },
data() { data() {
return { return {
actived: false actived: false,
// dialogVisible: false, // dialogVisible: false,
// audioSrc: [] // audioSrc: []
} }
...@@ -32,19 +32,17 @@ export default { ...@@ -32,19 +32,17 @@ export default {
} }
this.__proto__.$playRec = new BenzAMRRecorder() this.__proto__.$playRec = new BenzAMRRecorder()
this.__proto__.$playRecSymbole = this.amrUrl this.__proto__.$playRecSymbole = this.amrUrl
this.$playRec this.$playRec.initWithUrl(this.amrUrl).then(() => {
.initWithUrl(this.amrUrl) this.actived = true
.then(() => { this.$playRec.play()
this.actived = true this.$playRec.onEnded(() => {
this.$playRec.play() this.actived = false
this.$playRec.onEnded(() => {
this.actived = false
})
console.log('amr 时长:' + this.$playRec.getDuration())
}) })
// .catch((e) => { console.log('amr 时长:' + this.$playRec.getDuration())
// this.$message.error('播放录音失败,或文件损坏') })
// }) // .catch((e) => {
// this.$message.error('播放录音失败,或文件损坏')
// })
} }
// this.audioSrc = [JSON.parse(this.message.contact)[type]] // this.audioSrc = [JSON.parse(this.message.contact)[type]]
}, },
...@@ -57,7 +55,7 @@ export default { ...@@ -57,7 +55,7 @@ export default {
return true return true
} }
} }
} },
// close() { // close() {
// this.dialogVisible = false // this.dialogVisible = false
// const mp3 = this.$refs.AudioPlayer // const mp3 = this.$refs.AudioPlayer
...@@ -66,7 +64,7 @@ export default { ...@@ -66,7 +64,7 @@ export default {
// onBeforePlay(next) { // onBeforePlay(next) {
// next() // 开始播放 // next() // 开始播放
// } // }
} },
} }
</script> </script>
...@@ -74,9 +72,8 @@ export default { ...@@ -74,9 +72,8 @@ export default {
<div> <div>
<i <i
:class="['el-icon-microphone', actived && 'actived']" :class="['el-icon-microphone', actived && 'actived']"
style=" font-size: 40px; color: #199ed8;" style="font-size: 40px; color: var(--color)"
@click.stop="play('attachment')" @click.stop="play('attachment')"></i>
></i>
<!-- <AudioPlayer <!-- <AudioPlayer
:audio-list="audioSrc" :audio-list="audioSrc"
......
...@@ -141,7 +141,7 @@ export default { ...@@ -141,7 +141,7 @@ export default {
} }
// 当前激活菜单 // 当前激活菜单
.el-menu-item.is-active { .el-menu-item.is-active {
background: linear-gradient(to right, var(--color) 0%, var(--color-lighter) 100%); background: linear-gradient(to right, var(--color) 0%, var(--color-sub) 100%);
box-shadow: 0px 13px 16px 0px rgba(7, 168, 85, 0.2); box-shadow: 0px 13px 16px 0px rgba(7, 168, 85, 0.2);
border-radius: 8px; border-radius: 8px;
color: #fff !important; color: #fff !important;
......
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.g-bg-lg { .g-bg-lg {
background: linear-gradient(to left, var(--color) 0%, var(--color-lighter) 100%); background: linear-gradient(to left, var(--color) 0%, var(--color-sub) 100%);
box-shadow: 0px 13px 16px 0px rgba(7, 168, 85, 0.2); box-shadow: 0px 13px 16px 0px rgba(7, 168, 85, 0.2);
} }
// .nav-scrollbar { // .nav-scrollbar {
......
html { html {
--rgb: 7, 193, 96; /* 主题色rgb #07c160*/ --rgb: 7, 193, 96; /* 主题色rgb #07c160*/
--color: rgb(var(--rgb)); /* 主题色 #07c160*/ --color: rgb(var(--rgb)); /* 主题色 #07c160*/
--color-lighter: #90de45; /* 浅主题色 */ --color-lighter: rgb(var(--rgb), 0.12); /* #e9f7ee */
--color-sub: #90de45; /* 主题辅色 */
--color-success: #07c160; --color-success: #07c160;
--color-warning: #faad14; --color-warning: #faad14;
--color-danger: #eb5e12; --color-danger: #eb5e12;
...@@ -46,6 +47,6 @@ html { ...@@ -46,6 +47,6 @@ html {
/* 渐变背景 */ /* 渐变背景 */
.g-bg-lg { .g-bg-lg {
background: linear-gradient(to left, var(--color) 0%, var(--color-lighter) 100%); background: linear-gradient(to left, var(--color) 0%, var(--color-sub) 100%);
box-shadow: 0px 13px 16px 0px rgba(7, 168, 85, 0.2); box-shadow: 0px 13px 16px 0px rgba(7, 168, 85, 0.2);
} }
<script> <script>
import { getList, remove } from '@/api/communityOperating/keywords' import { getList, remove } from '@/api/communityOperating/keywords'
import SelectUser from '@/components/SelectUser'
export default { export default {
components: { SelectUser }, components: { SelectUser },
props: {}, props: {},
......
<script> <script>
import { getDetail, add, update } from '@/api/communityOperating/newCustomer' import { getDetail, add, update } from '@/api/communityOperating/newCustomer'
import PhoneDialog from '@/components/PhoneDialog' import PhoneDialog from '@/components/PhoneDialog'
import SelectUser from '@/components/SelectUser'
import SelectTag from '@/components/SelectTag' import SelectTag from '@/components/SelectTag'
import SelectQrCode from '@/components/SelectQrCode' import SelectQrCode from '@/components/SelectQrCode'
export default { export default {
components: { PhoneDialog, SelectTag, SelectUser, SelectQrCode }, components: { PhoneDialog, SelectTag, SelectQrCode },
data() { data() {
return { return {
selectedUserList: [], selectedUserList: [],
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
<ul> <ul>
<li v-for="(item, index) in data" :key="index"> <li v-for="(item, index) in data" :key="index">
<div class="mb15 my_header right" v-if="queryChat.fromId === item.fromId"> <div class="mb15 my_header right" v-if="queryChat.fromId === item.fromId">
<span :style="{ color: item.action == 'send' ? '#199ed8' : '#999' }">{{ item.msgTime }}</span> <span :style="{ color: item.action == 'send' ? 'var(--color)' : '#999' }">{{ item.msgTime }}</span>
<span class="ml10">{{ item.name }}</span> <span class="ml10">{{ item.name }}</span>
<img v-if="item.avatar" class="image" style="margin-left: 10px;" :src="item.avatar" /> <img v-if="item.avatar" class="image" style="margin-left: 10px" :src="item.avatar" />
<img v-else style="margin-left: 10px;" src="../../../../assets/drainageCode/header.png" /> <img v-else style="margin-left: 10px" src="../../../../assets/drainageCode/header.png" />
</div> </div>
<div v-else class="mb15 my_header"> <div v-else class="mb15 my_header">
<img v-if="item.avatar" class="image" :src="item.avatar" /> <img v-if="item.avatar" class="image" :src="item.avatar" />
<img v-else style="margin-right: 5px;" src="../../../../assets/drainageCode/header.png" /> <img v-else style="margin-right: 5px" src="../../../../assets/drainageCode/header.png" />
<span class="mr10">{{ item.name }}</span> <span class="mr10">{{ item.name }}</span>
<span :style="{ color: item.action == 'send' ? '#199ed8' : '#999' }">{{ item.msgTime }}</span> <span :style="{ color: item.action == 'send' ? 'var(--color)' : '#999' }">{{ item.msgTime }}</span>
</div> </div>
<div class="right" v-if="queryChat.fromId === item.fromId"> <div class="right" v-if="queryChat.fromId === item.fromId">
<ChatContent :queryChat="queryChat" :message="item"></ChatContent> <ChatContent :queryChat="queryChat" :message="item"></ChatContent>
...@@ -26,100 +26,100 @@ ...@@ -26,100 +26,100 @@
</template> </template>
<script> <script>
import ChatContent from '@/components/ChatContent' import ChatContent from '@/components/ChatContent'
export default { export default {
components: { components: {
ChatContent ChatContent,
},
props: {
data: {
type: Array,
defluat: () => [],
}, },
props: { queryChat: {
data: { type: Object,
type: Array, default: () => ({}),
defluat: () => []
},
queryChat: {
type: Object,
default: () => ({})
}
}, },
mounted() {}, },
data() { mounted() {},
return {} data() {
}, return {}
methods: {} },
} methods: {},
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.right { .right {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
} }
.my_header { .my_header {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.image { .image {
width: 24px; width: 24px;
height: 24px; height: 24px;
border-radius: 50%; border-radius: 50%;
margin-right: 5px; margin-right: 5px;
} }
.shabowbox { .shabowbox {
position: fixed; position: fixed;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: rgba(0, 0, 0, 0.4); background: rgba(0, 0, 0, 0.4);
left: 0; left: 0;
top: 0; top: 0;
z-index: 2000; z-index: 2000;
} }
.shabowboxvidoe { .shabowboxvidoe {
position: fixed; position: fixed;
width: 800px; width: 800px;
height: 475px; height: 475px;
left: 50%; left: 50%;
margin-left: -400px; margin-left: -400px;
top: 50%; top: 50%;
margin-top: -235px; margin-top: -235px;
z-index: 2001; z-index: 2001;
background: #fff; background: #fff;
} }
.shabowboxaudio { .shabowboxaudio {
height: 125px; height: 125px;
padding: 12px; padding: 12px;
} }
.close { .close {
position: fixed; position: fixed;
width: 50px; width: 50px;
height: 50px; height: 50px;
right: 10px; right: 10px;
z-index: 2012; z-index: 2012;
top: 10px; top: 10px;
text-align: center; text-align: center;
line-height: 50px; line-height: 50px;
font-size: 20px; font-size: 20px;
color: #fff; color: #fff;
cursor: pointer; cursor: pointer;
font-size: 43px; font-size: 43px;
} }
.takecontent { .takecontent {
border-radius: 3px; border-radius: 3px;
background-color: #eee; background-color: #eee;
position: relative; position: relative;
text-align: left; text-align: left;
height: 100%; height: 100%;
width: 100%; width: 100%;
overflow-y: scroll; overflow-y: scroll;
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
} }
ul li { ul li {
padding: 10px; padding: 10px;
}
} }
}
</style> </style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div> <div>
<div class="top"> <div class="top">
<div class="name"> <div class="name">
<span v-if="queryChat"> 与{{ queryChat.receiveName }}的聊天</span> <span v-if="queryChat">与{{ queryChat.receiveName }}的聊天</span>
<span class="fr download" @click="exportList()">下载会话</span> <span class="fr download" @click="exportList()">下载会话</span>
</div> </div>
</div> </div>
...@@ -15,106 +15,106 @@ ...@@ -15,106 +15,106 @@
</template> </template>
<script> <script>
import chatListClassTab from './chatListClassTab.vue' import chatListClassTab from './chatListClassTab.vue'
import { dateFormat } from '@/utils/index' import { dateFormat } from '@/utils/index'
import * as api from '@/api/conversation/content.js' import * as api from '@/api/conversation/content.js'
export default { export default {
components: { chatListClassTab }, components: { chatListClassTab },
props: { props: {
queryChat: { queryChat: {
type: Object, type: Object,
default: () => ({}) default: () => ({}),
}
}, },
data() { },
return { data() {
activeTab: 'all', return {
opened: ['all'], activeTab: 'all',
list: [ opened: ['all'],
{ list: [
label: '全部', {
type: 'all' label: '全部',
}, type: 'all',
{ },
label: '图片及视频', {
type: 'image,video' label: '图片及视频',
}, type: 'image,video',
{ },
label: '文件', {
type: 'file' label: '文件',
}, type: 'file',
{ },
label: '链接', {
type: 'link' label: '链接',
}, type: 'link',
{ },
label: '语音', {
type: 'voice,meeting_voice_call' label: '语音',
} type: 'voice,meeting_voice_call',
] },
} ],
}, }
watch: { },
queryChat() { watch: {
this.opened = ['all'] queryChat() {
this.activeTab = 'all' this.opened = ['all']
} this.activeTab = 'all'
}, },
mounted() {}, },
methods: { mounted() {},
exportList() { methods: {
this.$confirm('是否确认导出所有数据项?', '警告', { exportList() {
confirmButtonText: '确定', this.$confirm('是否确认导出所有数据项?', '警告', {
cancelButtonText: '取消', confirmButtonText: '确定',
type: 'warning' cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return api.exportList(this.queryChat)
}) })
.then(() => { .then((res) => {
return api.exportList(this.queryChat) if (!res) return
}) const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
.then((res) => {
if (!res) return
const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
if (window.navigator.msSaveOrOpenBlob) { if (window.navigator.msSaveOrOpenBlob) {
//兼容IE10 //兼容IE10
navigator.msSaveBlob(blob, '会话存档') navigator.msSaveBlob(blob, '会话存档')
} else { } else {
const href = URL.createObjectURL(blob) //创建新的URL表示指定的blob对象 const href = URL.createObjectURL(blob) //创建新的URL表示指定的blob对象
const a = document.createElement('a') //创建a标签 const a = document.createElement('a') //创建a标签
a.style.display = 'none' a.style.display = 'none'
a.href = href // 指定下载链接 a.href = href // 指定下载链接
a.download = dateFormat(new Date(), 'yyyy-MM-dd') + '_会话存档.xlsx' //指定下载文件名 a.download = dateFormat(new Date(), 'yyyy-MM-dd') + '_会话存档.xlsx' //指定下载文件名
a.click() //触发下载 a.click() //触发下载
URL.revokeObjectURL(a.href) //释放URL对象 URL.revokeObjectURL(a.href) //释放URL对象
} }
}) })
.catch(function (err) { .catch(function (err) {
console.log(err) console.log(err)
}) })
} },
} },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .el-tabs__header { ::v-deep .el-tabs__header {
margin: 0; margin: 0;
} }
.name { .name {
font-size: 18px; font-size: 18px;
font-weight: 600; font-weight: 600;
color: #333; color: #333;
margin-bottom: 10px; margin-bottom: 10px;
} }
.download { .download {
color: #199ed8; color: var(--color);
text-align: right; text-align: right;
font-size: 16px; font-size: 16px;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
opacity: 0.7; opacity: 0.7;
}
} }
}
</style> </style>
...@@ -4,28 +4,25 @@ ...@@ -4,28 +4,25 @@
<li <li
v-for="(item, index) in personList" v-for="(item, index) in personList"
:key="index" :key="index"
:class="{ active: index == active }" :class="['flex aic', { active: index == active }]"
@click="liClick(item, index)" @click="liClick(item, index)">
> <div class="ninebox">
<el-row type="flex" align="middle"> <ul v-if="item.avatar">
<div class="ninebox"> <li v-for="(a, i) in item.avatar.split(',')" :key="i">
<ul v-if="item.avatar"> <img :src="a" />
<li v-for="(a, i) in item.avatar.split(',')" :key="i"> </li>
<img :src="a" /> </ul>
</li> </div>
</ul> <div style="margin-left: 8px; line-height: 60px" class="toe" :title="item.groupName">
</div> {{ item.name }}
<div style="margin-left: 8px; line-height: 60px;" class="toe" :title="item.groupName"> <!-- <p>
{{ item.name }}
<!-- <p>
<span class="fr gray">{{ item.msgTime }}</span> <span class="fr gray">{{ item.msgTime }}</span>
</p> --> </p> -->
<!-- <p class="gray" v-if="item"> <!-- <p class="gray" v-if="item">
{{ item.name }}: {{ item.name }}:
{{ item.content }} {{ item.content }}
</p> --> </p> -->
</div> </div>
</el-row>
<!-- <el-row style="padding:10px" v-if="item.finalChatContext.msgtype=='file'"> <!-- <el-row style="padding:10px" v-if="item.finalChatContext.msgtype=='file'">
<el-col :span="3">&nbsp;</el-col> <el-col :span="3">&nbsp;</el-col>
<el-col :span="21"> <el-col :span="21">
...@@ -41,87 +38,88 @@ ...@@ -41,87 +38,88 @@
</div> </div>
</template> </template>
<script> <script>
import { parseTime } from '@/utils/common.js' // import { parseTime } from '@/utils/common.js'
export default { export default {
props: { props: {
personList: { personList: {
type: Array, type: Array,
defluat: () => [] defluat: () => [],
},
loading: {
type: Boolean,
defluat: false
}
}, },
loading: {
data() { type: Boolean,
return { defluat: false,
loadings: true,
active: undefined
}
}, },
methods: { },
liClick(data, index) {
this.active = index data() {
this.$emit('groupFn', data) return {
} loadings: true,
active: undefined,
} }
} },
methods: {
liClick(data, index) {
this.active = index
this.$emit('groupFn', data)
},
},
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.ninebox { .ninebox {
flex: none; flex: none;
width: 54px; width: 54px;
height: 52px; height: 52px;
border: 1px solid #199ed8; border: 1px solid var(--color);
overflow: hidden; border-radius: var(--border-radius);
ul li { overflow: hidden;
float: left; ul li {
width: 15px; float: left;
height: 15px; width: 15px;
padding: 0 !important; height: 15px;
margin: 1px 1px 1px 1px; padding: 0 !important;
} margin: 1px 1px 1px 1px;
} }
.groupList { }
overflow-y: auto; .groupList {
height: calc(100vh - 328px); overflow-y: auto;
height: calc(100vh - 328px);
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
} }
::v-deep .el-loading-spinner { ::v-deep .el-loading-spinner {
margin-top: 20px; margin-top: 20px;
} }
.gray { .gray {
color: #999; color: #999;
}
.padt10 {
padding-top: 10px;
}
ul li {
padding: 3px 10px;
overflow: hidden;
border-bottom: 1px solid #efefef;
cursor: pointer;
p {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
.padt10 { &:hover {
padding-top: 10px; background: #efefef;
} }
ul li { &.active {
padding: 3px 10px; background: var(--color-lighter);
overflow: hidden; }
border-bottom: 1px solid #efefef; img {
cursor: pointer; width: 100%;
p { height: 100%;
white-space: nowrap; float: left;
overflow: hidden;
text-overflow: ellipsis;
}
&:hover {
background: #efefef;
}
&.active {
background: #ebf4fc;
}
img {
width: 100%;
height: 100%;
float: left;
}
} }
} }
}
</style> </style>
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
class="list" class="list"
:class="{ active: index == active }" :class="{ active: index == active }"
:key="index" :key="index"
@click="liClick(item, index)" @click="liClick(item, index)">
>
<img v-if="item.avatar" class="fl mr10" :src="item.avatar" /> <img v-if="item.avatar" class="fl mr10" :src="item.avatar" />
<img class="fl mr10" v-else src="../../../../assets/drainageCode/header.png" /> <img class="fl mr10" v-else src="../../../../assets/drainageCode/header.png" />
<div class="name" :title="item.name"> <div class="name" :title="item.name">
...@@ -19,72 +18,72 @@ ...@@ -19,72 +18,72 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
personList: { personList: {
type: Array, type: Array,
defluat: () => [] defluat: () => [],
},
loading: {
type: Boolean,
defluat: false
}
}, },
loading: {
data() { type: Boolean,
return { defluat: false,
loadings: true,
active: undefined
}
}, },
methods: { },
liClick(data, index) {
this.active = index data() {
this.$emit('chatFn', data) return {
} loadings: true,
active: undefined,
} }
} },
methods: {
liClick(data, index) {
this.active = index
this.$emit('chatFn', data)
},
},
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.userList { .userList {
overflow-y: auto; overflow-y: auto;
// height: calc(100vh - 288px); // height: calc(100vh - 288px);
height: 100%; height: 100%;
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
} }
::v-deep .el-loading-spinner { ::v-deep .el-loading-spinner {
margin-top: 20px; margin-top: 20px;
} }
.gray { .gray {
color: #999; color: #999;
} }
.list { .list {
padding: 10px; padding: 10px;
overflow: hidden;
border-bottom: 1px solid #efefef;
cursor: pointer;
text-align: left;
.name {
white-space: nowrap;
overflow: hidden; overflow: hidden;
border-bottom: 1px solid #efefef; line-height: 40px;
cursor: pointer; text-overflow: ellipsis;
text-align: left; }
.name { &:hover {
white-space: nowrap; background: #efefef;
overflow: hidden; }
line-height: 40px; &.active {
text-overflow: ellipsis; background: var(--color-lighter);
} }
&:hover { img {
background: #efefef; width: 40px;
} height: 40px;
&.active { float: left;
background: #ebf4fc;
}
img {
width: 40px;
height: 40px;
float: left;
}
} }
} }
}
</style> </style>
...@@ -8,9 +8,10 @@ ...@@ -8,9 +8,10 @@
class="mb10" class="mb10"
placeholder="搜索客户名称" placeholder="搜索客户名称"
clearable clearable
prefix-icon="el-icon-search"
v-model="customerQuery.name" v-model="customerQuery.name"
@keyup.enter.native="getCustomerList(1)"></el-input> @keyup.enter.native="getCustomerList(1)">
<el-button slot="append" icon="el-icon-search" @click="getCustomerList(1)"></el-button>
</el-input>
<div v-loading="customerLoading"> <div v-loading="customerLoading">
<ul v-if="init" v-infinite-scroll="getCustomerList" infinite-scroll-distance="1" class="customer-wrap"> <ul v-if="init" v-infinite-scroll="getCustomerList" infinite-scroll-distance="1" class="customer-wrap">
<template v-if="customerList.length"> <template v-if="customerList.length">
...@@ -19,8 +20,7 @@ ...@@ -19,8 +20,7 @@
:key="index" :key="index"
tag="li" tag="li"
@click.native="choiceCustomer(item, index)" @click.native="choiceCustomer(item, index)"
class="customer-li" :class="['customer-li', { active: index == personIndex }]"
:class="{ active: index == personIndex }"
:gutter="20" :gutter="20"
type="flex" type="flex"
align="middle"> align="middle">
...@@ -261,7 +261,7 @@ export default { ...@@ -261,7 +261,7 @@ export default {
width: 40px; width: 40px;
} }
&.active { &.active {
background: #ebf4fc; background: var(--color-lighter);
} }
} }
} }
......
...@@ -7,10 +7,23 @@ ...@@ -7,10 +7,23 @@
class="mb10" class="mb10"
placeholder="搜索员工名称" placeholder="搜索员工名称"
clearable clearable
prefix-icon="el-icon-search" v-model.trim="keywords"
v-model="name" @keyup.enter.native="getDeptUser">
@keyup.enter.native="loadNode(1)"></el-input> <el-button slot="append" icon="el-icon-search" @click="getDeptUser"></el-button>
</el-input>
<div class="search-list" v-show="keywords">
<div
v-for="(item, index) in searchResult"
:key="index"
:class="['customer-li', { active: index == personIndex }]"
@click="handleNodeClick(item)">
{{ item.name }}
</div>
</div>
<el-tree <el-tree
v-show="!keywords"
ref="tree" ref="tree"
class="filter-tree" class="filter-tree"
:props="defaultProps" :props="defaultProps"
...@@ -78,7 +91,8 @@ export default { ...@@ -78,7 +91,8 @@ export default {
}, },
data() { data() {
return { return {
employAmount: 1, keywords: '',
searchResult: [],
fromId: '', fromId: '',
// employName: '', // employName: '',
talkName: '', talkName: '',
...@@ -123,7 +137,7 @@ export default { ...@@ -123,7 +137,7 @@ export default {
}, },
// getTree() { // getTree() {
// apiOrg.getTree().then(({ data }) => { // apiOrg.getTree().then(({ data }) => {
// let treeData = (this.treeData = this.handleTree(data)) // let treeData = (this.treeData = this.handleDepart(data))
// this.handleNodeClick(this.treeData[0], true) // this.handleNodeClick(this.treeData[0], true)
// }) // })
// }, // },
...@@ -175,7 +189,7 @@ export default { ...@@ -175,7 +189,7 @@ export default {
loadNode(node, resolve) { loadNode(node, resolve) {
if (node.level == 0) { if (node.level == 0) {
apiOrg.getDeptTree().then(({ data }) => { apiOrg.getDeptTree().then(({ data }) => {
let treeData = this.treeFormat(this.handleTree(data)) let treeData = this.treeFormat(this.handleDepart(data))
// this.handleNodeClick(this.treeData[0], true) // this.handleNodeClick(this.treeData[0], true)
treeData[0] && (this.defaultExpandedKeys = [treeData[0].id]) treeData[0] && (this.defaultExpandedKeys = [treeData[0].id])
resolve(treeData) resolve(treeData)
...@@ -196,7 +210,7 @@ export default { ...@@ -196,7 +210,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 || []
let arr = this.handleName(rows) let arr = this.handleUser(rows)
node.data.children && arr.push(...node.data.children) node.data.children && arr.push(...node.data.children)
arr.forEach((element) => { arr.forEach((element) => {
element.isLeaf = !!element.userId element.isLeaf = !!element.userId
...@@ -206,6 +220,18 @@ export default { ...@@ -206,6 +220,18 @@ export default {
} }
} }
}, },
getDeptUser() {
if (!this.keywords) return
this.searchResult = []
apiOrg
.getDeptUser({
deptId: this.defaultExpandedKeys[0],
userName: this.keywords,
})
.then((res) => {
this.searchResult = this.handleUser(res.rows)
})
},
treeFormat(list) { treeFormat(list) {
let dealOptions = [] let dealOptions = []
...@@ -226,7 +252,7 @@ export default { ...@@ -226,7 +252,7 @@ export default {
}) })
return dealOptions return dealOptions
}, },
handleName(data) { handleUser(data) {
return data.map((i) => { return data.map((i) => {
if (i.userName) { if (i.userName) {
i.userId = i.weUserId i.userId = i.weUserId
...@@ -235,7 +261,7 @@ export default { ...@@ -235,7 +261,7 @@ export default {
return i return i
}) })
}, },
handleTree(data) { handleDepart(data) {
return data.map((i) => { return data.map((i) => {
if (i.deptId) { if (i.deptId) {
// i.userId = i.deptId // i.userId = i.deptId
...@@ -246,7 +272,7 @@ export default { ...@@ -246,7 +272,7 @@ export default {
return i return i
}) })
}, },
handleNodeClick(data, add) { handleNodeClick(data) {
if (!data.userId) { if (!data.userId) {
} else { } else {
this.talkName = data.name this.talkName = data.name
...@@ -292,5 +318,10 @@ export default { ...@@ -292,5 +318,10 @@ export default {
display: none; display: none;
} }
} }
.search-list {
margin-top: 20px;
padding: 0 10px;
}
} }
</style> </style>
...@@ -80,12 +80,11 @@ ...@@ -80,12 +80,11 @@
</template> </template>
<script> <script>
import * as sensitiveApis from '@/api/conversation/security' import * as sensitiveApis from '@/api/conversation/security'
import SelectUser from '@/components/SelectUser'
import ChatContent from '@/components/ChatContent' import ChatContent from '@/components/ChatContent'
export default { export default {
components: { components: {
SelectUser,
ChatContent, ChatContent,
}, },
data() { data() {
......
...@@ -98,11 +98,9 @@ ...@@ -98,11 +98,9 @@
</template> </template>
<script> <script>
import * as sensitiveApis from '@/api/conversation/security' import * as sensitiveApis from '@/api/conversation/security'
import SelectUser from '@/components/SelectUser'
export default { export default {
components: { components: {},
SelectUser,
},
data() { data() {
return { return {
form: { form: {
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
import { getListNew, exportCustomer, lossRemind, getLossRemindStatus } from '@/api/customer' import { getListNew, exportCustomer, lossRemind, getLossRemindStatus } from '@/api/customer'
// import { getList as getListTag } from '@/api/customer/tag' // import { getList as getListTag } from '@/api/customer/tag'
// import { getList as getListOrganization } from '@/api/organization' // import { getList as getListOrganization } from '@/api/organization'
import SelectUser from '@/components/SelectUser'
import SelectTag from '@/components/SelectTag' import SelectTag from '@/components/SelectTag'
export default { export default {
name: 'LossRemind', name: 'LossRemind',
components: { SelectUser, SelectTag }, components: { SelectTag },
props: {}, props: {},
data() { data() {
return { return {
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
import { getDetail, add, update, getQrcode } from '@/api/drainageCode/staff' import { getDetail, add, update, getQrcode } from '@/api/drainageCode/staff'
import { getList } from '@/api/drainageCode/welcome' import { getList } from '@/api/drainageCode/welcome'
import PhoneDialog from '@/components/PhoneDialog' import PhoneDialog from '@/components/PhoneDialog'
import SelectUser from '@/components/SelectUser'
import SelectTag from '@/components/SelectTag' import SelectTag from '@/components/SelectTag'
import SelectMaterial from '@/components/SelectMaterial' import SelectMaterial from '@/components/SelectMaterial'
export default { export default {
components: { PhoneDialog, SelectTag, SelectUser, SelectMaterial }, components: { PhoneDialog, SelectTag, SelectMaterial },
data() { data() {
return { return {
dialogVisibleSelectUser: false, dialogVisibleSelectUser: false,
......
...@@ -279,7 +279,7 @@ import { ...@@ -279,7 +279,7 @@ import {
} from '@/api/drainageCode/smartForms.js' } from '@/api/drainageCode/smartForms.js'
import FormsDetail from './build/formsDetail.vue' import FormsDetail from './build/formsDetail.vue'
import PhoneDialog from '@/components/PhoneDialog' import PhoneDialog from '@/components/PhoneDialog'
import SelectUser from '@/components/SelectUser'
import SelectTag from '@/components/SelectTag' import SelectTag from '@/components/SelectTag'
import SelectMaterial from '@/components/SelectMaterial' import SelectMaterial from '@/components/SelectMaterial'
import WelcomeContent from '@/components/WelcomeContent.vue' import WelcomeContent from '@/components/WelcomeContent.vue'
...@@ -289,7 +289,7 @@ export default { ...@@ -289,7 +289,7 @@ export default {
components: { components: {
PhoneDialog, PhoneDialog,
SelectTag, SelectTag,
SelectUser,
SelectMaterial, SelectMaterial,
WelcomeContent, WelcomeContent,
Build, Build,
......
...@@ -281,7 +281,6 @@ import { ...@@ -281,7 +281,6 @@ import {
updateCodeCategory, updateCodeCategory,
removeCodeCategory, removeCodeCategory,
} from '@/api/drainageCode/staff' } from '@/api/drainageCode/staff'
import SelectUser from '@/components/SelectUser'
const groupForm = { const groupForm = {
mediaType: 15, mediaType: 15,
...@@ -290,7 +289,6 @@ const groupForm = { ...@@ -290,7 +289,6 @@ const groupForm = {
export default { export default {
name: 'CodeStaff', name: 'CodeStaff',
components: { components: {
SelectUser,
FormsDetail, FormsDetail,
Channels, Channels,
}, },
......
...@@ -187,7 +187,7 @@ export default { ...@@ -187,7 +187,7 @@ export default {
components: { components: {
PhoneDialog, PhoneDialog,
SelectTag, SelectTag,
SelectUser,
SelectMaterial, SelectMaterial,
WelcomeContent, WelcomeContent,
AddMaterial, AddMaterial,
......
...@@ -129,14 +129,11 @@ ...@@ -129,14 +129,11 @@
</div> </div>
</template> </template>
<script> <script>
import SelectUser from '@/components/SelectUser'
import moment from 'moment' import moment from 'moment'
import { getEnterpriceList, syncHMoments, getDetail } from '@/api/circle' import { getEnterpriceList, syncHMoments, getDetail } from '@/api/circle'
export default { export default {
name: 'enterprise', name: 'enterprise',
components: { components: {},
SelectUser,
},
data() { data() {
return { return {
disable: false, disable: false,
......
...@@ -123,14 +123,11 @@ ...@@ -123,14 +123,11 @@
</div> </div>
</template> </template>
<script> <script>
import SelectUser from '@/components/SelectUser'
import moment from 'moment' import moment from 'moment'
import { getEnterpriceList, syncHMoments, getDetail } from '@/api/circle' import { getEnterpriceList, syncHMoments, getDetail } from '@/api/circle'
export default { export default {
name: 'friend-index', name: 'friend-index',
components: { components: {},
SelectUser,
},
data() { data() {
return { return {
// disable: false, // disable: false,
......
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
import { add, getCustomerList } from '@/api/groupMessage' import { add, getCustomerList } from '@/api/groupMessage'
import { getMaterialMediaId } from '@/api/material' import { getMaterialMediaId } from '@/api/material'
import PhoneDialog from '@/components/PhoneDialog' import PhoneDialog from '@/components/PhoneDialog'
// import SelectUser from '@/components/SelectUser' //
import SelectTag from '@/components/SelectTag' import SelectTag from '@/components/SelectTag'
import WelcomeDetail from '@/components/WelcomeContent.vue' import WelcomeDetail from '@/components/WelcomeContent.vue'
import SelectCustomerGroup from '@/components/SelectCustomerGroup' import SelectCustomerGroup from '@/components/SelectCustomerGroup'
...@@ -196,7 +196,7 @@ export default { ...@@ -196,7 +196,7 @@ export default {
components: { components: {
PhoneDialog, PhoneDialog,
SelectTag, SelectTag,
// SelectUser, //
WelcomeDetail, WelcomeDetail,
SelectCustomerGroup, SelectCustomerGroup,
AddMaterial, AddMaterial,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!