Commit 838e19ff by xinla

Merge remote-tracking branch 'origin/front_end_1.5'

2 parents 9bb536ac 8892a025
...@@ -27,10 +27,15 @@ export default { ...@@ -27,10 +27,15 @@ export default {
video: 'attachment', video: 'attachment',
voice: 'attachment', voice: 'attachment',
location: 'address', location: 'address',
weapp: 'title', weapp: 'title'
card: 'corpname' // card: 'corpname'
} }
let attr = typeDict[this.message.msgType]
if (attr) {
return JSON.parse(this.message.contact)[typeDict[this.message.msgType]] return JSON.parse(this.message.contact)[typeDict[this.message.msgType]]
} else {
return JSON.parse(this.message.contact)
}
} }
}, },
watch: {}, watch: {},
...@@ -65,13 +70,7 @@ export default { ...@@ -65,13 +70,7 @@ export default {
{{ content }} {{ content }}
</template> </template>
<template v-else-if="'image,emotion'.includes(message.msgType)"> <template v-else-if="'image,emotion'.includes(message.msgType)">
<el-image <el-image style="width: 100px; height: 100px" :src="content" fit="fit" :preview-src-list="[content]"> </el-image>
style="width: 100px; height: 100px"
:src="content"
fit="fit"
:preview-src-list="[content]"
>
</el-image>
</template> </template>
<a <a
v-else-if="'file'.includes(message.msgType)" v-else-if="'file'.includes(message.msgType)"
...@@ -90,11 +89,7 @@ export default { ...@@ -90,11 +89,7 @@ export default {
{{ content }} {{ content }}
</a> </a>
<div v-else-if="message.msgType === 'voice'"> <div v-else-if="message.msgType === 'voice'">
<i <i class="el-icon-microphone" style=" font-size: 40px; color: #199ed8;" @click="playAudio('attachment')"></i>
class="el-icon-microphone"
style=" font-size: 40px; color: #199ed8;"
@click="playAudio('attachment')"
></i>
</div> </div>
<template v-else-if="message.msgType === 'video'"> <template v-else-if="message.msgType === 'video'">
<video <video
...@@ -137,44 +132,50 @@ export default { ...@@ -137,44 +132,50 @@ export default {
></video-player> --> ></video-player> -->
</template> </template>
<div v-else-if="message.msgType === 'location'" class="msgtypecard"> <div v-else-if="message.msgType === 'location'" class="msgtypecard">
<div class="card_name"> <div class="card-content">
<el-amap <el-amap
ref="map" ref="map"
vid="amapDemo" vid="amapDemo"
:center="[ :center="[JSON.parse(message.contact).longitude, JSON.parse(message.contact).latitude]"
JSON.parse(message.contact).longitude,
JSON.parse(message.contact).latitude
]"
:zoom="15" :zoom="15"
class="amap-demo" class="amap-demo"
style="pointer-events: none;" style="pointer-events: none;"
> >
<el-amap-marker <el-amap-marker
:position="[ :position="[JSON.parse(message.contact).longitude, JSON.parse(message.contact).latitude]"
JSON.parse(message.contact).longitude,
JSON.parse(message.contact).latitude
]"
></el-amap-marker> ></el-amap-marker>
</el-amap> </el-amap>
</div> </div>
<div class="card_foot">{{ content }}</div> <div class="card-foot">{{ content }}</div>
</div> </div>
<div v-else-if="message.msgType === 'weapp'" class="msgtypecard"> <div v-else-if="message.msgType === 'weapp'" class="msgtypecard">
<div class="card_name">{{ content }}</div> <div class="card-content">{{ content }}</div>
<div class="card_foot">小程序</div> <div class="card-foot">小程序</div>
</div> </div>
<div v-else-if="message.msgType === 'card'" class="msgtypecard "> <div v-else-if="message.msgType === 'card'" class="msgtypecard ">
<div class="card_name">{{ content }}</div> <div class="card-content">
<div class="card_foot">个人名片</div> <span style="flex: none;"> {{ content.corpname }}: </span>
<span>
{{ content.userid }}
</span>
</div>
<div class="card-foot">个人名片</div>
</div>
<!-- 图文链接 -->
<div v-else-if="message.msgType === 'link'" class="msgtypecard ">
<a :href="content.link_url">
<div class="card-content fxbw">
<div>
<div class="card--link-title">{{ content.title }}</div>
<div class="card--link-desc">{{ content.description }}</div>
</div>
<el-image style="width: 50px; height: 50px" :src="content.image_url" fit="fit"></el-image>
</div>
</a>
</div> </div>
<div v-else>不支持的消息类型:{{ message.msgType }}</div> <div v-else>不支持的消息类型:{{ message.msgType }}</div>
<el-dialog <el-dialog v-if="audioSrc[0]" :visible.sync="dialogVisible" width="30%" @close="close">
v-if="audioSrc[0]"
:visible.sync="dialogVisible"
width="30%"
@close="close"
>
<div class="shabowboxvidoe shabowboxaudio"> <div class="shabowboxvidoe shabowboxaudio">
<!-- <AudioPlayer <!-- <AudioPlayer
:audio-list="audioSrc" :audio-list="audioSrc"
...@@ -223,23 +224,45 @@ export default { ...@@ -223,23 +224,45 @@ export default {
.msgtypecard { .msgtypecard {
width: 320px; width: 320px;
height: 140px; // height: 140px;
margin: 10px 5px; margin: 10px 5px;
border-radius: 8px; border-radius: 8px;
-webkit-box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), -webkit-box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 8px 0 rgba(0, 0, 0, 0.19);
0 6px 8px 0 rgba(0, 0, 0, 0.19);
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 8px 0 rgba(0, 0, 0, 0.19); box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 8px 0 rgba(0, 0, 0, 0.19);
position: relative; position: relative;
background: #f8f8f8; background: #f8f8f8;
overflow: hidden; overflow: hidden;
.card_name { .card-content {
width: 320px; width: 320px;
height: 105px; min-height: 105px;
line-height: 80px; height: 100%;
text-indent: 10px; display: flex;
align-items: center;
padding: 10px;
line-height: 1.5;
// text-indent: 10px;
color: #333;
.card--link-title {
font-size: 16px;
font-weight: 500;
margin-bottom: 5px;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
display: -webkit-box;
white-space: pre-wrap;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.card--link-desc {
font-size: 14px;
color: #aaa;
}
} }
.card_foot { .card-foot {
position: absolute; position: absolute;
height: 20px; height: 20px;
border-top: 1px solid #efefef; border-top: 1px solid #efefef;
......
...@@ -35,7 +35,6 @@ export default { ...@@ -35,7 +35,6 @@ export default {
rewardImageUrl: '', rewardImageUrl: '',
rewardRule: '' rewardRule: ''
}, },
rewardImageUrlTemp: '',
action: process.env.VUE_APP_BASE_API + window.CONFIG.services.wecom + '/fission/upload', action: process.env.VUE_APP_BASE_API + window.CONFIG.services.wecom + '/fission/upload',
headers: window.CONFIG.headers, headers: window.CONFIG.headers,
ruleForm: { ruleForm: {
...@@ -223,7 +222,7 @@ export default { ...@@ -223,7 +222,7 @@ export default {
}, },
handleAvatarSuccess(res, file) { handleAvatarSuccess(res, file) {
// this.rewardImageUrlTemp = URL.createObjectURL(file.raw) //预览 // this.rewardImageUrlTemp = URL.createObjectURL(file.raw) //预览
this.rewardImageUrlTemp = this.groupForm.rewardImageUrl = res.data.rewardImageUrl this.groupForm.rewardImageUrl = res.data.rewardImageUrl
}, },
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
const isJPG = file.type === 'image/jpeg' const isJPG = file.type === 'image/jpeg'
...@@ -388,7 +387,7 @@ export default { ...@@ -388,7 +387,7 @@ export default {
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload" :before-upload="beforeAvatarUpload"
> >
<img v-if="rewardImageUrlTemp" :src="rewardImageUrlTemp" class="avatar" /> <img v-if="groupForm.rewardImageUrl" :src="groupForm.rewardImageUrl" class="avatar" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
......
...@@ -167,8 +167,17 @@ export default { ...@@ -167,8 +167,17 @@ export default {
}) })
}) })
if (hasErrorTag.length > 0) { if (hasErrorTag.length > 0) {
this.msgError('已有标签[' + hasErrorTag + ']不在标签库中,或存在异常') this.$notify({
return // title: '标题名称',
message: this.$createElement(
'i',
{ style: 'color: red' },
'已有标签[' + hasErrorTag + ']不在标签库中,已被删除或存在异常'
),
type: 'warning',
customClass: 'mzindex'
})
// this.msgError('已有标签[' + hasErrorTag + ']不在标签库中,已被删除或存在异常')
} }
if (type === 'remove' && this.selectedTag.length === 0) { if (type === 'remove' && this.selectedTag.length === 0) {
this.msgError('该客户没有标签,不可进行移除') this.msgError('该客户没有标签,不可进行移除')
...@@ -443,3 +452,8 @@ export default { ...@@ -443,3 +452,8 @@ export default {
margin-left: 10px; margin-left: 10px;
} }
</style> </style>
<style>
.mzindex {
z-index: 5000 !important;
}
</style>
<script> <script>
import { import { getAllocateCustomers, getAllocateGroups } from '@/api/customer/dimission'
getAllocateCustomers,
getAllocateGroups
} from '@/api/customer/dimission'
export default { export default {
name: 'AllocatedStaffDetailList', name: 'AllocatedStaffDetailList',
...@@ -50,9 +47,7 @@ export default { ...@@ -50,9 +47,7 @@ export default {
} }
page && (this.query.pageNum = page) page && (this.query.pageNum = page)
this.loading = true this.loading = true
;(this.type === 'customer' ? getAllocateCustomers : getAllocateGroups)( ;(this.type === 'customer' ? getAllocateCustomers : getAllocateGroups)(this.query)
this.query
)
.then(({ rows, total }) => { .then(({ rows, total }) => {
this.list = rows this.list = rows
this.total = +total this.total = +total
...@@ -68,40 +63,20 @@ export default { ...@@ -68,40 +63,20 @@ export default {
<template> <template>
<div class="page"> <div class="page">
<el-table <el-table ref="multipleTable" :data="list" tooltip-effect="dark" style="width: 100%">
ref="multipleTable" <el-table-column v-if="type === 'customer'" prop="customerName" label="客户名称"></el-table-column>
:data="list"
tooltip-effect="dark"
style="width: 100%"
>
<el-table-column
v-if="type === 'customer'"
prop="customerName"
label="客户名称"
></el-table-column>
<el-table-column v-else prop="groupName" label="群名称"></el-table-column> <el-table-column v-else prop="groupName" label="群名称"></el-table-column>
<el-table-column <el-table-column :prop="type === 'customer' ? 'takeUserName' : 'newOwnerName'" label="接替员工"></el-table-column>
:prop="type === 'customer' ? 'takeUserName' : 'newOwnerName'" <el-table-column prop="department" label="接替员工所属部门" show-overflow-tooltip></el-table-column>
label="接替员工" <el-table-column prop="allocateTime" label="分配时间" show-overflow-tooltip></el-table-column>
></el-table-column>
<el-table-column
prop="department"
label="接替员工所属部门"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop="allocateTime"
label="分配时间"
show-overflow-tooltip
></el-table-column>
<el-table-column label="操作" width="100"> <el-table-column label="操作" width="100">
<template slot-scope="scope"> <template slot-scope="{ row }">
<el-button <el-button
v-hasPermi="['customerManage:dimission:edit']" v-hasPermi="['customerManage:dimission:edit']"
@click=" @click="
$router.push({ $router.push({
path: 'customerDetail', path: 'customerDetail',
query: { id: scope.row.id } query: { data: JSON.stringify(row) }
}) })
" "
type="text" type="text"
......
...@@ -258,13 +258,13 @@ export default { ...@@ -258,13 +258,13 @@ export default {
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="100"> <el-table-column label="操作" width="100">
<template slot-scope="scope"> <template slot-scope="{ row }">
<el-button <el-button
v-hasPermi="['customerManage:customer:view']" v-hasPermi="['customerManage:customer:view']"
@click=" @click="
$router.push({ $router.push({
path: 'customerDetail', path: 'customerDetail',
query: { id: scope.row.externalUserid } query: { data: JSON.stringify(row) }
}) })
" "
type="text" type="text"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!