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);
} }
......
<script> <script>
import { getDeptTree, getDeptUser } from '@/api/organization' import { getDeptTree, getDeptUser } from '@/api/organization'
export default { export default {
name: 'SelectUser', name: 'SelectUser',
components: {}, components: {},
props: { props: {
isWechat: { isWechat: {
type: Boolean, type: Boolean,
default: true default: true,
}, },
// 添加标签显隐 // 添加标签显隐
visible: { visible: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
title: { title: {
type: String, type: String,
default: '组织架构' default: '组织架构',
}, },
// 是否 只选择叶子节点(人员节点)/禁止选择父节点(部门节点) // 是否 只选择叶子节点(人员节点)/禁止选择父节点(部门节点)
isOnlyLeaf: { isOnlyLeaf: {
type: Boolean, type: Boolean,
default: true default: true,
}, },
// 是否单选 // 是否单选
isSigleSelect: { isSigleSelect: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
// 默认选中的节点 // 默认选中的节点
defaultValues: { defaultValues: {
...@@ -34,14 +34,14 @@ ...@@ -34,14 +34,14 @@
// 必须含有userId和name属性 // 必须含有userId和name属性
validator(val) { validator(val) {
return val.every((e) => e.userId && e.name) return val.every((e) => e.userId && e.name)
} },
}, },
// 禁止选中的节点 // 禁止选中的节点
disabledValues: { disabledValues: {
type: Array, type: Array,
default: () => [] default: () => [],
}, },
destroyOnClose: Boolean destroyOnClose: Boolean,
}, },
data() { data() {
return { return {
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
keywords: '', keywords: '',
searchResult: [], searchResult: [],
searchState: false, searchState: false,
checked: [] checked: [],
} }
}, },
watch: { watch: {
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
}, },
Pvisible(val) { Pvisible(val) {
val && this.$refs.tree && this.$refs.tree.setCheckedKeys(this.defaultValues.map((e) => e.userId || e.id)) val && this.$refs.tree && this.$refs.tree.setCheckedKeys(this.defaultValues.map((e) => e.userId || e.id))
} },
}, },
computed: { computed: {
Pvisible: { Pvisible: {
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
}, },
set(val) { set(val) {
this.$emit('update:visible', val) this.$emit('update:visible', val)
} },
}, },
defaultProps() { defaultProps() {
let that = this let that = this
...@@ -93,9 +93,9 @@ ...@@ -93,9 +93,9 @@
}, },
isLeaf(data, node) { isLeaf(data, node) {
return !data.id return !data.id
},
} }
} },
}
}, },
created() {}, created() {},
mounted() {}, mounted() {},
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
}) })
getDeptUser({ getDeptUser({
deptId: this.deptId, deptId: this.deptId,
userName: this.keywords userName: this.keywords,
}).then((res) => { }).then((res) => {
this.searchResult = this.handleUser(res.rows) this.searchResult = this.handleUser(res.rows)
}) })
...@@ -246,13 +246,13 @@ ...@@ -246,13 +246,13 @@
index > -1 && this.userList.splice(index, 1) index > -1 && this.userList.splice(index, 1)
let order = this.defaultValues.findIndex((i) => i.userId === key) let order = this.defaultValues.findIndex((i) => i.userId === key)
order > -1 && this.defaultValues.slice().splice(order, 1) order > -1 && this.defaultValues.slice().splice(order, 1)
} },
} },
} }
</script> </script>
<template> <template>
<el-dialog :title="title" :visible.sync="Pvisible" :close-on-click-modal="false" :destroy-on-close="destroyOnClose"> <el-dialog :title="title" :visible.sync="Pvisible" :close-on-click-modal="false" :destroy-on-close="destroyOnClose">
<el-row :gutter="20"> <el-row :gutter="20" style="min-height: 400px">
<el-col :span="12" :xs="24"> <el-col :span="12" :xs="24">
<div class="head-container"> <div class="head-container">
<div class="search-input"> <div class="search-input">
...@@ -262,8 +262,7 @@ ...@@ -262,8 +262,7 @@
@keyup.enter.native="setSearch" @keyup.enter.native="setSearch"
placeholder="请输入员工名称" placeholder="请输入员工名称"
clearable clearable
@change="setChange" @change="setChange">
>
<el-button slot="append" icon="el-icon-search" @click="setSearch"></el-button> <el-button slot="append" icon="el-icon-search" @click="setSearch"></el-button>
</el-input> </el-input>
</div> </div>
...@@ -291,8 +290,7 @@ ...@@ -291,8 +290,7 @@
:load="loadNode" :load="loadNode"
:props="defaultProps" :props="defaultProps"
:check-strictly="isOnlyLeaf" :check-strictly="isOnlyLeaf"
@check-change="handleCheckChange" @check-change="handleCheckChange"></el-tree>
></el-tree>
</div> </div>
</transition> </transition>
</div> </div>
...@@ -314,32 +312,32 @@ ...@@ -314,32 +312,32 @@
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
min-height: 400px; min-height: 400px;
} }
.search-input { .search-input {
margin-top: 5px; margin-top: 5px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.user-list { .user-list {
.el-row { .el-row {
line-height: 26px; line-height: 26px;
} }
} }
.search-list { .search-list {
margin-top: 20px; margin-top: 20px;
padding: 0 10px; padding: 0 10px;
} }
.fade-enter-active { .fade-enter-active {
transition: opacity 0.5s; transition: opacity 0.5s;
} }
.fade-enter { .fade-enter {
opacity: 0; opacity: 0;
} }
.fade-leave-active { .fade-leave-active {
transition: opacity 0.5s; transition: opacity 0.5s;
} }
.fade-leave-to { .fade-leave-to {
opacity: 0; opacity: 0;
} }
</style> </style>
...@@ -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,9 +32,7 @@ export default { ...@@ -32,9 +32,7 @@ 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)
.then(() => {
this.actived = true this.actived = true
this.$playRec.play() this.$playRec.play()
this.$playRec.onEnded(() => { this.$playRec.onEnded(() => {
...@@ -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,44 +26,44 @@ ...@@ -26,44 +26,44 @@
</template> </template>
<script> <script>
import ChatContent from '@/components/ChatContent' import ChatContent from '@/components/ChatContent'
export default { export default {
components: { components: {
ChatContent ChatContent,
}, },
props: { props: {
data: { data: {
type: Array, type: Array,
defluat: () => [] defluat: () => [],
}, },
queryChat: { queryChat: {
type: Object, type: Object,
default: () => ({}) default: () => ({}),
} },
}, },
mounted() {}, mounted() {},
data() { data() {
return {} 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%;
...@@ -71,9 +71,9 @@ ...@@ -71,9 +71,9 @@
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;
...@@ -83,14 +83,14 @@ ...@@ -83,14 +83,14 @@
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;
...@@ -103,9 +103,9 @@ ...@@ -103,9 +103,9 @@
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;
...@@ -121,5 +121,5 @@ ...@@ -121,5 +121,5 @@
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,17 +15,17 @@ ...@@ -15,17 +15,17 @@
</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() { data() {
return { return {
...@@ -34,32 +34,32 @@ ...@@ -34,32 +34,32 @@
list: [ list: [
{ {
label: '全部', label: '全部',
type: 'all' type: 'all',
}, },
{ {
label: '图片及视频', label: '图片及视频',
type: 'image,video' type: 'image,video',
}, },
{ {
label: '文件', label: '文件',
type: 'file' type: 'file',
}, },
{ {
label: '链接', label: '链接',
type: 'link' type: 'link',
}, },
{ {
label: '语音', label: '语音',
type: 'voice,meeting_voice_call' type: 'voice,meeting_voice_call',
} },
] ],
} }
}, },
watch: { watch: {
queryChat() { queryChat() {
this.opened = ['all'] this.opened = ['all']
this.activeTab = 'all' this.activeTab = 'all'
} },
}, },
mounted() {}, mounted() {},
methods: { methods: {
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
this.$confirm('是否确认导出所有数据项?', '警告', { this.$confirm('是否确认导出所有数据项?', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning',
}) })
.then(() => { .then(() => {
return api.exportList(this.queryChat) return api.exportList(this.queryChat)
...@@ -92,29 +92,29 @@ ...@@ -92,29 +92,29 @@
.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,10 +4,8 @@ ...@@ -4,10 +4,8 @@
<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)">
>
<el-row type="flex" align="middle">
<div class="ninebox"> <div class="ninebox">
<ul v-if="item.avatar"> <ul v-if="item.avatar">
<li v-for="(a, i) in item.avatar.split(',')" :key="i"> <li v-for="(a, i) in item.avatar.split(',')" :key="i">
...@@ -15,7 +13,7 @@ ...@@ -15,7 +13,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<div style="margin-left: 8px; line-height: 60px;" class="toe" :title="item.groupName"> <div style="margin-left: 8px; line-height: 60px" class="toe" :title="item.groupName">
{{ item.name }} {{ item.name }}
<!-- <p> <!-- <p>
<span class="fr gray">{{ item.msgTime }}</span> <span class="fr gray">{{ item.msgTime }}</span>
...@@ -25,7 +23,6 @@ ...@@ -25,7 +23,6 @@
{{ 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,39 +38,40 @@ ...@@ -41,39 +38,40 @@
</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: { loading: {
type: Boolean, type: Boolean,
defluat: false defluat: false,
} },
}, },
data() { data() {
return { return {
loadings: true, loadings: true,
active: undefined active: undefined,
} }
}, },
methods: { methods: {
liClick(data, index) { liClick(data, index) {
this.active = index this.active = index
this.$emit('groupFn', data) 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);
border-radius: var(--border-radius);
overflow: hidden; overflow: hidden;
ul li { ul li {
float: left; float: left;
...@@ -82,8 +80,8 @@ ...@@ -82,8 +80,8 @@
padding: 0 !important; padding: 0 !important;
margin: 1px 1px 1px 1px; margin: 1px 1px 1px 1px;
} }
} }
.groupList { .groupList {
overflow-y: auto; overflow-y: auto;
height: calc(100vh - 328px); height: calc(100vh - 328px);
...@@ -115,7 +113,7 @@ ...@@ -115,7 +113,7 @@
background: #efefef; background: #efefef;
} }
&.active { &.active {
background: #ebf4fc; background: var(--color-lighter);
} }
img { img {
width: 100%; width: 100%;
...@@ -123,5 +121,5 @@ ...@@ -123,5 +121,5 @@
float: left; 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,34 +18,34 @@ ...@@ -19,34 +18,34 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
personList: { personList: {
type: Array, type: Array,
defluat: () => [] defluat: () => [],
}, },
loading: { loading: {
type: Boolean, type: Boolean,
defluat: false defluat: false,
} },
}, },
data() { data() {
return { return {
loadings: true, loadings: true,
active: undefined active: undefined,
} }
}, },
methods: { methods: {
liClick(data, index) { liClick(data, index) {
this.active = index this.active = index
this.$emit('chatFn', data) 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%;
...@@ -78,7 +77,7 @@ ...@@ -78,7 +77,7 @@
background: #efefef; background: #efefef;
} }
&.active { &.active {
background: #ebf4fc; background: var(--color-lighter);
} }
img { img {
width: 40px; width: 40px;
...@@ -86,5 +85,5 @@ ...@@ -86,5 +85,5 @@
float: left; 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!