Commit 3af9f02d by xinla

/deep/更新为::v-deep

1 parent dffb6a2a
Showing 31 changed files with 256 additions and 241 deletions
<template> <template>
<div :class="{'show':show}" class="header-search"> <div :class="{ show: show }" class="header-search">
<svg-icon class-name="search-icon" icon-class="search" @click.stop="click" /> <svg-icon class-name="search-icon" icon-class="search" @click.stop="click" />
<el-select <el-select
ref="headerSearchSelect" ref="headerSearchSelect"
...@@ -25,67 +25,67 @@ ...@@ -25,67 +25,67 @@
<script> <script>
// fuse is a lightweight fuzzy-search module // fuse is a lightweight fuzzy-search module
// make search results more in line with expectations // make search results more in line with expectations
import Fuse from "fuse.js"; import Fuse from 'fuse.js'
import path from "path"; import path from 'path'
export default { export default {
name: "HeaderSearch", name: 'HeaderSearch',
data() { data() {
return { return {
search: "", search: '',
options: [], options: [],
searchPool: [], searchPool: [],
show: false, show: false,
fuse: undefined, fuse: undefined
}; }
}, },
computed: { computed: {
routes() { routes() {
return this.$store.getters.permission_routes; return this.$store.getters.permission_routes
}, }
}, },
watch: { watch: {
routes() { routes() {
this.searchPool = this.generateRoutes(this.routes); this.searchPool = this.generateRoutes(this.routes)
}, },
searchPool(list) { searchPool(list) {
this.initFuse(list); this.initFuse(list)
}, },
show(value) { show(value) {
if (value) { if (value) {
document.body.addEventListener("click", this.close); document.body.addEventListener('click', this.close)
} else { } else {
document.body.removeEventListener("click", this.close); document.body.removeEventListener('click', this.close)
}
} }
},
}, },
mounted() { mounted() {
this.searchPool = this.generateRoutes(this.routes); this.searchPool = this.generateRoutes(this.routes)
}, },
methods: { methods: {
click() { click() {
this.show = !this.show; this.show = !this.show
if (this.show) { if (this.show) {
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus(); this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus()
} }
}, },
close() { close() {
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur(); this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur()
this.options = []; this.options = []
this.show = false; this.show = false
}, },
change(val) { change(val) {
if (this.ishttp(val.path)) { if (this.ishttp(val.path)) {
// http(s):// 路径新窗口打开 // http(s):// 路径新窗口打开
window.open(val.path, "_blank"); window.open(val.path, '_blank')
} else { } else {
this.$router.push(val.path); this.$router.push(val.path)
} }
this.search = ""; this.search = ''
this.options = []; this.options = []
this.$nextTick(() => { this.$nextTick(() => {
this.show = false; this.show = false
}); })
}, },
initFuse(list) { initFuse(list) {
this.fuse = new Fuse(list, { this.fuse = new Fuse(list, {
...@@ -97,70 +97,64 @@ export default { ...@@ -97,70 +97,64 @@ export default {
minMatchCharLength: 1, minMatchCharLength: 1,
keys: [ keys: [
{ {
name: "title", name: 'title',
weight: 0.7, weight: 0.7
}, },
{ {
name: "path", name: 'path',
weight: 0.3, weight: 0.3
}, }
], ]
}); })
}, },
// Filter out the routes that can be displayed in the sidebar // Filter out the routes that can be displayed in the sidebar
// And generate the internationalized title // And generate the internationalized title
generateRoutes(routes, basePath = "/", prefixTitle = []) { generateRoutes(routes, basePath = '/', prefixTitle = []) {
let res = []; let res = []
for (const router of routes) { for (const router of routes) {
// skip hidden router // skip hidden router
if (router.hidden) { if (router.hidden) {
continue; continue
} }
const data = { const data = {
path: !this.ishttp(router.path) path: !this.ishttp(router.path) ? path.resolve(basePath, router.path) : router.path,
? path.resolve(basePath, router.path) title: [...prefixTitle]
: router.path, }
title: [...prefixTitle],
};
if (router.meta && router.meta.title) { if (router.meta && router.meta.title) {
data.title = [...data.title, router.meta.title]; data.title = [...data.title, router.meta.title]
if (router.redirect !== "noRedirect") { if (router.redirect !== 'noRedirect') {
// only push the routes with title // only push the routes with title
// special case: need to exclude parent router without redirect // special case: need to exclude parent router without redirect
res.push(data); res.push(data)
} }
} }
// recursive child routes // recursive child routes
if (router.children) { if (router.children) {
const tempRoutes = this.generateRoutes( const tempRoutes = this.generateRoutes(router.children, data.path, data.title)
router.children,
data.path,
data.title
);
if (tempRoutes.length >= 1) { if (tempRoutes.length >= 1) {
res = [...res, ...tempRoutes]; res = [...res, ...tempRoutes]
} }
} }
} }
return res; return res
}, },
querySearch(query) { querySearch(query) {
if (query !== "") { if (query !== '') {
this.options = this.fuse.search(query); this.options = this.fuse.search(query)
} else { } else {
this.options = []; this.options = []
} }
}, },
ishttp(url) { ishttp(url) {
return url.indexOf("http://") !== -1 || url.indexOf("https://") !== -1; return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1
}, }
}, }
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -183,7 +177,7 @@ export default { ...@@ -183,7 +177,7 @@ export default {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
/deep/ .el-input__inner { ::v-deep .el-input__inner {
border-radius: 0; border-radius: 0;
border: 0; border: 0;
padding-left: 0; padding-left: 0;
......
<script> <script>
import { getList } from '@/api/customer/tag' import { getList } from '@/api/customer/tag'
import list from './list' import list from './list'
export default { export default {
components: { list }, components: { list },
props: { props: {
// 添加标签显隐 // 添加标签显隐
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
default: () => [] default: () => []
} }
}, },
data () { data() {
return { return {
text: {}, text: {},
image: {}, image: {},
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
}, },
watch: {}, watch: {},
computed: { computed: {
title () { title() {
const titleMap = { const titleMap = {
4: '文本', 4: '文本',
0: '图片', 0: '图片',
...@@ -43,38 +43,44 @@ ...@@ -43,38 +43,44 @@
return titleMap[this.type] || '素材' return titleMap[this.type] || '素材'
}, },
Pvisible: { Pvisible: {
get () { get() {
return this.visible return this.visible
}, },
set (val) { set(val) {
this.$emit('update:visible', val) this.$emit('update:visible', val)
} }
}, },
Ptype: { Ptype: {
get () { get() {
return this.type return this.type
}, },
set (val) { set(val) {
this.$emit('update:type', val) this.$emit('update:type', val)
} }
} }
}, },
created () { }, created() {},
mounted () { }, mounted() {},
methods: { methods: {
submit () { submit() {
this.Pvisible = false this.Pvisible = false
this.$emit('success', this.selectedData) this.$emit('success', this.selectedData)
}, },
onChange (data) { onChange(data) {
this.selectedData = data this.selectedData = data
} }
} }
} }
</script> </script>
<template> <template>
<el-dialog :title="`选择${title}`" :visible.sync="Pvisible" width="680px" append-to-body destroy-on-close> <el-dialog
:title="`选择${title}`"
:visible.sync="Pvisible"
width="680px"
append-to-body
destroy-on-close
>
<div> <div>
<list v-if="showArr.length <= 1" :type="showArr[0] || type" @change="onChange"> </list> <list v-if="showArr.length <= 1" :type="showArr[0] || type" @change="onChange"> </list>
<el-tabs v-else-if="showArr.length > 1" v-model="Ptype"> <el-tabs v-else-if="showArr.length > 1" v-model="Ptype">
...@@ -96,18 +102,18 @@ ...@@ -96,18 +102,18 @@
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.user-list { .user-list {
.el-row { .el-row {
line-height: 26px; line-height: 26px;
} }
} }
.mr30 { .mr30 {
margin-right: 30px; margin-right: 30px;
} }
/deep/.el-dialog__body { ::v-deep.el-dialog__body {
padding: 5px 20px; padding: 5px 20px;
height: 76vh; height: 76vh;
overflow: auto; overflow: auto;
} }
</style> </style>
<script> <script>
import { getTree, getList } from '@/api/material' import { getTree, getList } from '@/api/material'
export default { export default {
components: {}, components: {},
props: { props: {
type: { type: {
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
default: '4' default: '4'
} }
}, },
data () { data() {
return { return {
loading: true, // 遮罩层 loading: true, // 遮罩层
// 查询条件 // 查询条件
...@@ -40,32 +40,30 @@ ...@@ -40,32 +40,30 @@
} }
}, },
watch: { watch: {
radio (val) { radio(val) {
this.$emit('change', val) this.$emit('change', val)
}, },
type (val) { type(val) {
this.query.mediaType = this.type this.query.mediaType = this.type
this.query.pageNum = 1 this.query.pageNum = 1
this.list = [] this.list = []
this.getList() this.getList()
} }
}, },
computed: { computed: {},
created() {
},
created () {
this.query.mediaType = this.type this.query.mediaType = this.type
this.getList() this.getList()
}, },
mounted () { }, mounted() {},
methods: { methods: {
// 获取素材列表 // 获取素材列表
getList (page) { getList(page) {
page && (this.query.pageNum = page) page && (this.query.pageNum = page)
this.loading = true this.loading = true
getList(this.query) getList(this.query)
.then(({ rows, total }) => { .then(({ rows, total }) => {
this.list = rows.map(i => { this.list = rows.map((i) => {
i.checked = false i.checked = false
return i return i
}) })
...@@ -77,7 +75,7 @@ ...@@ -77,7 +75,7 @@
this.loading = false this.loading = false
}) })
}, },
onRowClick (row, column, event) { onRowClick(row, column, event) {
const evTarget = event.target.nodeName.toUpperCase(0) const evTarget = event.target.nodeName.toUpperCase(0)
if (evTarget == 'INPUT') { if (evTarget == 'INPUT') {
return return
...@@ -85,19 +83,25 @@ ...@@ -85,19 +83,25 @@
const checked = row.checked const checked = row.checked
if (!checked) { if (!checked) {
this.list.forEach(i => i.checked = false) this.list.forEach((i) => (i.checked = false))
} }
row.checked = !checked row.checked = !checked
this.$emit('change', row.checked ? row : null) this.$emit('change', row.checked ? row : null)
} }
} }
} }
</script> </script>
<template> <template>
<div> <div>
<template v-if="type == 4"> <template v-if="type == 4">
<el-input v-model="query.search" class="ml10 mr10 mb20" style="width: 260px;" placeholder="请输入文本内容" @keydown.enter.native="getList(1)"></el-input> <el-input
v-model="query.search"
class="ml10 mr10 mb20"
style="width: 260px"
placeholder="请输入文本内容"
@keydown.enter.native="getList(1)"
></el-input>
</template> </template>
<!-- 文本 --> <!-- 文本 -->
...@@ -166,28 +170,35 @@ ...@@ -166,28 +170,35 @@
</el-radio> </el-radio>
</el-radio-group> --> </el-radio-group> -->
<el-pagination class="fr" @current-change="getList" :current-page="query.pageNum" :page-size="query.pageSize" layout="prev, pager, next" :total="total"></el-pagination> <el-pagination
class="fr"
@current-change="getList"
:current-page="query.pageNum"
:page-size="query.pageSize"
layout="prev, pager, next"
:total="total"
></el-pagination>
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
// .img-wrap { // .img-wrap {
// /deep/.el-radio__input { // ::v-deep.el-radio__input {
// position: absolute; // position: absolute;
// left: 50%; // left: 50%;
// top: 50%; // top: 50%;
// transform: translate(-50%, -50%); // transform: translate(-50%, -50%);
// } // }
// } // }
.ma-img { .ma-img {
width: 120px; width: 120px;
height: 120px; height: 120px;
border-radius: 8px; border-radius: 8px;
border: 1px solid #e6ebf5; border: 1px solid #e6ebf5;
justify-content: center; justify-content: center;
} }
.img-li { .img-li {
// max-width: 100%; // max-width: 100%;
// height: 160px; // height: 160px;
} }
</style> </style>
...@@ -262,7 +262,7 @@ export default { ...@@ -262,7 +262,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
// .img-wrap { // .img-wrap {
// /deep/.el-radio__input { // ::v-deep.el-radio__input {
// position: absolute; // position: absolute;
// left: 50%; // left: 50%;
// top: 50%; // top: 50%;
...@@ -289,7 +289,7 @@ export default { ...@@ -289,7 +289,7 @@ export default {
top: 0; top: 0;
} }
} }
/deep/ .el-checkbox__label { ::v-deep .el-checkbox__label {
vertical-align: text-top; vertical-align: text-top;
} }
.label { .label {
......
<script> <script>
import { upload } from '@/api/material' import { upload } from '@/api/material'
import Video from 'video.js' import Video from 'video.js'
import BenzAMRRecorder from 'benz-amr-recorder' import BenzAMRRecorder from 'benz-amr-recorder'
export default { export default {
name: 'Upload', name: 'Upload',
components: {}, components: {},
props: { props: {
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
// }, // },
// }, // },
}, },
data () { data() {
return { return {
loading: false, loading: false,
action: process.env.VUE_APP_BASE_API + '/common/uploadFile2Cos', action: process.env.VUE_APP_BASE_API + '/common/uploadFile2Cos',
...@@ -54,14 +54,14 @@ ...@@ -54,14 +54,14 @@
}, },
watch: {}, watch: {},
computed: { computed: {
accept () { accept() {
return ['image/*', 'amr/*', 'video/*', '*'][this.type] return ['image/*', 'amr/*', 'video/*', '*'][this.type]
} }
}, },
created () { }, created() {},
mounted () { }, mounted() {},
methods: { methods: {
async handleBeforeUpload (file) { async handleBeforeUpload(file) {
this.loading = true this.loading = true
let isFormat = true let isFormat = true
let isSize = true let isSize = true
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
// } // }
return (isFormat && isSize) || Promise.reject() return (isFormat && isSize) || Promise.reject()
}, },
onSuccess (res, file) { onSuccess(res, file) {
if (res.code === 200) { if (res.code === 200) {
this.loading = false this.loading = false
// this.$emit('update:fileUrl', res.data.materialUrl) // this.$emit('update:fileUrl', res.data.materialUrl)
...@@ -192,23 +192,43 @@ ...@@ -192,23 +192,43 @@
this.$message.error(res.msg) this.$message.error(res.msg)
} }
}, },
onError (err, file, fileList) { onError(err, file, fileList) {
this.loading = false this.loading = false
this.$message.error('上传文件失败') this.$message.error('上传文件失败')
} }
} }
} }
</script> </script>
<template> <template>
<div> <div>
<el-upload v-loading="loading" element-loading-text="正在上传..." class="uploader" :accept="accept" :action="action" :headers="headers" :data="{ mediaType: type }" :show-file-list="false" :on-success="onSuccess" :on-error="onError" :before-upload="handleBeforeUpload"> <el-upload
v-loading="loading"
element-loading-text="正在上传..."
class="uploader"
:accept="accept"
:action="action"
:headers="headers"
:data="{ mediaType: type }"
:show-file-list="false"
:on-success="onSuccess"
:on-error="onError"
:before-upload="handleBeforeUpload"
>
<slot> <slot>
<template v-if="fileUrl"> <template v-if="fileUrl">
<img v-if="type === '0'" :src="fileUrl" class="upload-img" /> <img v-if="type === '0'" :src="fileUrl" class="upload-img" />
<div v-else-if="type === '2'"> <div v-else-if="type === '2'">
<video id="myVideo" class="video-js vjs-default-skin <video
vjs-big-play-centered" width="100%" controls webkit-playsinline="true" playsinline="true" :autoplay="false" preload="auto"> id="myVideo"
class="video-js vjs-default-skin vjs-big-play-centered"
width="100%"
controls
webkit-playsinline="true"
playsinline="true"
:autoplay="false"
preload="auto"
>
<source :src="fileUrl" type="video/mp4" /> <source :src="fileUrl" type="video/mp4" />
</video> </video>
</div> </div>
...@@ -224,7 +244,7 @@ ...@@ -224,7 +244,7 @@
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.uploader { ::v-deep.uploader {
display: inline-block; display: inline-block;
.el-upload { .el-upload {
border-radius: 6px; border-radius: 6px;
...@@ -235,9 +255,9 @@ ...@@ -235,9 +255,9 @@
border-color: #409eff; border-color: #409eff;
} }
} }
} }
.uploader-icon { .uploader-icon {
font-size: 28px; font-size: 28px;
color: #8c939d; color: #8c939d;
width: 178px; width: 178px;
...@@ -246,14 +266,14 @@ ...@@ -246,14 +266,14 @@
text-align: center; text-align: center;
border-radius: 6px; border-radius: 6px;
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
} }
.upload-img { .upload-img {
width: 178px; width: 178px;
height: 178px; height: 178px;
display: block; display: block;
} }
.tip { .tip {
color: #aaa; color: #aaa;
font-size: 12px; font-size: 12px;
} }
</style> </style>
...@@ -193,7 +193,7 @@ export default { ...@@ -193,7 +193,7 @@ export default {
.nav-scrollbar { .nav-scrollbar {
width: calc(100% - 450px); width: calc(100% - 450px);
/deep/.el-scrollbar__view { ::v-deep.el-scrollbar__view {
white-space: nowrap; white-space: nowrap;
line-height: 58px; line-height: 58px;
} }
......
<template> <template>
<el-scrollbar ref="scrollContainer" :vertical="false" class="scroll-container" @wheel.native.prevent="handleScroll"> <el-scrollbar
ref="scrollContainer"
:vertical="false"
class="scroll-container"
@wheel.native.prevent="handleScroll"
>
<slot /> <slot />
</el-scrollbar> </el-scrollbar>
</template> </template>
...@@ -55,12 +60,13 @@ export default { ...@@ -55,12 +60,13 @@ export default {
$scrollWrapper.scrollLeft = $scrollWrapper.scrollWidth - $containerWidth $scrollWrapper.scrollLeft = $scrollWrapper.scrollWidth - $containerWidth
} else { } else {
// find preTag and nextTag // find preTag and nextTag
const currentIndex = tagList.findIndex(item => item === currentTag) const currentIndex = tagList.findIndex((item) => item === currentTag)
const prevTag = tagList[currentIndex - 1] const prevTag = tagList[currentIndex - 1]
const nextTag = tagList[currentIndex + 1] const nextTag = tagList[currentIndex + 1]
// the tag's offsetLeft after of nextTag // the tag's offsetLeft after of nextTag
const afterNextTagOffsetLeft = nextTag.$el.offsetLeft + nextTag.$el.offsetWidth + tagAndTagSpacing const afterNextTagOffsetLeft =
nextTag.$el.offsetLeft + nextTag.$el.offsetWidth + tagAndTagSpacing
// the tag's offsetLeft before of prevTag // the tag's offsetLeft before of prevTag
const beforePrevTagOffsetLeft = prevTag.$el.offsetLeft - tagAndTagSpacing const beforePrevTagOffsetLeft = prevTag.$el.offsetLeft - tagAndTagSpacing
...@@ -82,7 +88,7 @@ export default { ...@@ -82,7 +88,7 @@ export default {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
width: 100%; width: 100%;
/deep/ { ::v-deep {
.el-scrollbar__bar { .el-scrollbar__bar {
bottom: 0px; bottom: 0px;
} }
......
...@@ -53,15 +53,15 @@ Vue.prototype.selectDictLabels = selectDictLabels ...@@ -53,15 +53,15 @@ Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download Vue.prototype.download = download
Vue.prototype.handleTree = handleTree Vue.prototype.handleTree = handleTree
Vue.prototype.msgSuccess = function(msg) { Vue.prototype.msgSuccess = function (msg) {
this.$message({ showClose: true, message: msg, type: 'success' }) this.$message({ showClose: true, message: msg, type: 'success' })
} }
Vue.prototype.msgError = function(msg) { Vue.prototype.msgError = function (msg) {
this.$message({ showClose: true, message: msg, type: 'error' }) this.$message({ showClose: true, message: msg, type: 'error' })
} }
Vue.prototype.msgInfo = function(msg) { Vue.prototype.msgInfo = function (msg) {
this.$message.info(msg) this.$message.info(msg)
} }
...@@ -69,10 +69,10 @@ import { pickerOptions } from '@/utils/index' ...@@ -69,10 +69,10 @@ import { pickerOptions } from '@/utils/index'
Vue.prototype.pickerOptions = pickerOptions Vue.prototype.pickerOptions = pickerOptions
import VideoPlayer from 'vue-video-player' import VideoPlayer from 'vue-video-player'
Vue.use(VideoPlayer) Vue.use(VideoPlayer)
import AudioPlayer from '@liripeng/vue-audio-player' // import AudioPlayer from '@liripeng/vue-audio-player'
import '@liripeng/vue-audio-player/lib/vue-audio-player.css' // import '@liripeng/vue-audio-player/lib/vue-audio-player.css'
Vue.use(AudioPlayer) // Vue.use(AudioPlayer)
import VueAMap from 'vue-amap' import VueAMap from 'vue-amap'
Vue.use(VueAMap) Vue.use(VueAMap)
......
...@@ -179,7 +179,7 @@ export default { ...@@ -179,7 +179,7 @@ export default {
form: { form: {
taskName: '', // 任务名称 taskName: '', // 任务名称
welcomeMsg: '', // 加群引导语 welcomeMsg: '', // 加群引导语
sendType: 0, // 发送方式 sendType: 1, // 发送方式
groupCodeId: '', // 群活码ID groupCodeId: '', // 群活码ID
tagList: [], // 标签 tagList: [], // 标签
scopeList: [], // 员工 scopeList: [], // 员工
...@@ -252,7 +252,7 @@ export default { ...@@ -252,7 +252,7 @@ export default {
getDetail(id).then(({ data }) => { getDetail(id).then(({ data }) => {
this.form.taskName = data.taskName || '' this.form.taskName = data.taskName || ''
this.form.welcomeMsg = data.welcomeMsg || '' this.form.welcomeMsg = data.welcomeMsg || ''
this.form.sendType = data.sendType || 0 this.form.sendType = data.sendType || 1
this.form.sendScope = data.sendScope || 0 this.form.sendScope = data.sendScope || 0
this.form.sendGender = data.sendGender || 0 this.form.sendGender = data.sendGender || 0
......
...@@ -153,7 +153,7 @@ export default { ...@@ -153,7 +153,7 @@ export default {
this.$confirm('是否确认删除吗?', '警告', { this.$confirm('是否确认删除吗?', '警告', {
type: 'warning' type: 'warning'
}) })
.then(function() { .then(function () {
return api.remove(id) return api.remove(id)
}) })
.then(() => { .then(() => {
...@@ -187,7 +187,7 @@ export default { ...@@ -187,7 +187,7 @@ export default {
this.$confirm('是否确认删除吗?', '警告', { this.$confirm('是否确认删除吗?', '警告', {
type: 'warning' type: 'warning'
}) })
.then(function() { .then(function () {
return api.removeDepart(id) return api.removeDepart(id)
}) })
.then(() => { .then(() => {
...@@ -571,7 +571,7 @@ export default { ...@@ -571,7 +571,7 @@ export default {
.img-wrap { .img-wrap {
height: 340px; height: 340px;
overflow: auto; overflow: auto;
/deep/.el-radio__input { ::v-deep.el-radio__input {
position: absolute; position: absolute;
right: 0; right: 0;
} }
......
...@@ -5,10 +5,9 @@ ...@@ -5,10 +5,9 @@
<!-- <span v-if="item.fromInfo.name">{{item.fromInfo.name}}</span> --> <!-- <span v-if="item.fromInfo.name">{{item.fromInfo.name}}</span> -->
<div class="mb15"> <div class="mb15">
<span class="mr20">{{ item.name }}</span> <span class="mr20">{{ item.name }}</span>
<span <span :style="{ color: item.action == 'send' ? '#199ed8' : '#999' }">{{
:style="{ color: item.action == 'send' ? '#199ed8' : '#999' }" item.msgTime
>{{ item.msgTime }}</span }}</span>
>
</div> </div>
<ChatContent :message="item"></ChatContent> <ChatContent :message="item"></ChatContent>
...@@ -37,7 +36,7 @@ export default { ...@@ -37,7 +36,7 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
#videoPlayer /deep/ .vjs-tech { #videoPlayer ::v-deep .vjs-tech {
height: 450px; height: 450px;
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<span class="fr download" @click="exportList()">下载会话</span> <span class="fr download" @click="exportList()">下载会话</span>
</div> </div>
</div> </div>
<el-tabs v-model="activeTab" @tab-click="v => opened.includes(v.name) || opened.push(v.name)"> <el-tabs v-model="activeTab" @tab-click="(v) => opened.includes(v.name) || opened.push(v.name)">
<el-tab-pane v-for="(item, index) of list" :key="index" :label="item.label" :name="item.type"> <el-tab-pane v-for="(item, index) of list" :key="index" :label="item.label" :name="item.type">
<chatListClassTab <chatListClassTab
v-if="opened.includes(item.type)" v-if="opened.includes(item.type)"
...@@ -73,10 +73,10 @@ export default { ...@@ -73,10 +73,10 @@ export default {
.then(() => { .then(() => {
return api.exportList(this.queryChat) return api.exportList(this.queryChat)
}) })
.then(response => { .then((response) => {
this.download(response.msg) this.download(response.msg)
}) })
.catch(function(err) { .catch(function (err) {
console.log(err) console.log(err)
}) })
} }
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/ .el-tabs__header { ::v-deep .el-tabs__header {
margin: 0; margin: 0;
} }
......
...@@ -15,11 +15,7 @@ ...@@ -15,11 +15,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<div <div style="margin-left: 8px; line-height: 60px" class="toe" :title="item.name">
style="margin-left:8px;line-height:60px"
class="toe"
:title="item.name"
>
{{ item.name }} {{ item.name }}
<!-- <p> <!-- <p>
<span class="fr gray">{{ item.msgTime }}</span> <span class="fr gray">{{ item.msgTime }}</span>
...@@ -95,7 +91,7 @@ export default { ...@@ -95,7 +91,7 @@ export default {
display: none; display: none;
} }
/deep/ .el-loading-spinner { ::v-deep .el-loading-spinner {
margin-top: 20px; margin-top: 20px;
} }
......
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
display: none; display: none;
} }
/deep/ .el-loading-spinner { ::v-deep .el-loading-spinner {
margin-top: 20px; margin-top: 20px;
} }
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<img v-if="item.avatar" :src="item.avatar" alt="头像" /> <img v-if="item.avatar" :src="item.avatar" alt="头像" />
</el-col> </el-col>
<el-col :span="10" v-if="item" class="toe"> <el-col :span="10" v-if="item" class="toe">
<span style="line-height:40px">{{ item.customerName }}</span> <span style="line-height: 40px">{{ item.customerName }}</span>
</el-col> </el-col>
<el-col :span="10" class="ar"> <el-col :span="10" class="ar">
<span :style="{ color: item.customerType === 1 ? '#4bde03' : '#f9a90b' }" <span :style="{ color: item.customerType === 1 ? '#4bde03' : '#f9a90b' }"
...@@ -203,7 +203,7 @@ export default { ...@@ -203,7 +203,7 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.el-tabs__nav-scroll { ::v-deep.el-tabs__nav-scroll {
padding-left: 15px; padding-left: 15px;
} }
...@@ -217,7 +217,7 @@ export default { ...@@ -217,7 +217,7 @@ export default {
.el-tabs { .el-tabs {
background: #fff; background: #fff;
} }
/deep/ .el-tabs__header { ::v-deep .el-tabs__header {
margin: 0; margin: 0;
} }
......
...@@ -157,7 +157,7 @@ export default { ...@@ -157,7 +157,7 @@ export default {
this.loading = false this.loading = false
this.personList = data this.personList = data
}) })
.catch(err => { .catch((err) => {
this.loading = false this.loading = false
}) })
} else if (this.activeName == 1) { } else if (this.activeName == 1) {
...@@ -167,7 +167,7 @@ export default { ...@@ -167,7 +167,7 @@ export default {
this.loading = false this.loading = false
this.personList = data this.personList = data
}) })
.catch(err => { .catch((err) => {
this.loading = false this.loading = false
}) })
} else { } else {
...@@ -177,7 +177,7 @@ export default { ...@@ -177,7 +177,7 @@ export default {
this.loading = false this.loading = false
this.personList = data this.personList = data
}) })
.catch(err => { .catch((err) => {
this.loading = false this.loading = false
}) })
} }
...@@ -212,7 +212,7 @@ export default { ...@@ -212,7 +212,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 || []
arr.forEach(element => { arr.forEach((element) => {
element.isLeaf = !!element.userId element.isLeaf = !!element.userId
}) })
resolve(arr) resolve(arr)
...@@ -236,14 +236,14 @@ export default { ...@@ -236,14 +236,14 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.el-tabs__nav-scroll { ::v-deep.el-tabs__nav-scroll {
padding-left: 15px; padding-left: 15px;
} }
.borderR { .borderR {
border-right: 2px solid #ccc; border-right: 2px solid #ccc;
} }
/deep/ .el-tabs__header { ::v-deep .el-tabs__header {
margin: 0; margin: 0;
} }
.employ { .employ {
......
...@@ -217,7 +217,7 @@ export default { ...@@ -217,7 +217,7 @@ export default {
.then((response) => { .then((response) => {
this.download(response.msg) this.download(response.msg)
}) })
.catch(function() {}) .catch(function () {})
} }
} }
} }
...@@ -268,13 +268,13 @@ export default { ...@@ -268,13 +268,13 @@ export default {
} }
.noborder { .noborder {
/deep/ .el-input--mini .el-input__inner { ::v-deep .el-input--mini .el-input__inner {
width: 2px; width: 2px;
border: none; border: none;
} }
} }
.emcode /deep/ em { .emcode ::v-deep em {
color: #ff0000; color: #ff0000;
} }
</style> </style>
...@@ -32,7 +32,7 @@ export default { ...@@ -32,7 +32,7 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.pd15 { ::v-deep.pd15 {
padding: 15px; padding: 15px;
} }
</style> </style>
...@@ -6,12 +6,14 @@ ...@@ -6,12 +6,14 @@
<div class="tag-input" @click="dialogVisibleSelectUser = true"> <div class="tag-input" @click="dialogVisibleSelectUser = true">
<span class="tag-place" v-if="!queryUser.length">请选择</span> <span class="tag-place" v-if="!queryUser.length">请选择</span>
<template v-else> <template v-else>
<el-tag type="info" v-for="(unit, unique) in queryUser" :key="unique">{{ unit.name }}</el-tag> <el-tag type="info" v-for="(unit, unique) in queryUser" :key="unique">{{
unit.name
}}</el-tag>
</template> </template>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="form.keyword" placeholder="搜索关键词" style="width:240px"> </el-input> <el-input v-model="form.keyword" placeholder="搜索关键词" style="width: 240px"> </el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="getSensitiveList">查询</el-button> <el-button type="primary" @click="getSensitiveList">查询</el-button>
...@@ -22,7 +24,7 @@ ...@@ -22,7 +24,7 @@
<el-col :span="8"> <el-col :span="8">
<div class="left-title">触发记录</div> <div class="left-title">触发记录</div>
</el-col> </el-col>
<el-col :span="16" style="text-align: right;"> <el-col :span="16" style="text-align: right">
<el-radio-group v-model="selectDate" size="small"> <el-radio-group v-model="selectDate" size="small">
<el-radio-button label="昨日"></el-radio-button> <el-radio-button label="昨日"></el-radio-button>
<el-radio-button label="7日"></el-radio-button> <el-radio-button label="7日"></el-radio-button>
...@@ -40,7 +42,12 @@ ...@@ -40,7 +42,12 @@
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<el-table :data="tableData" stripe style="width: 100%" :header-cell-style="{ background: '#fff' }"> <el-table
:data="tableData"
stripe
style="width: 100%"
:header-cell-style="{ background: '#fff' }"
>
<el-table-column prop="patternWords" label="敏感词"> </el-table-column> <el-table-column prop="patternWords" label="敏感词"> </el-table-column>
<el-table-column prop="content" label="内容"> <el-table-column prop="content" label="内容">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
...@@ -185,7 +192,7 @@ export default { ...@@ -185,7 +192,7 @@ export default {
} }
} }
.noborder { .noborder {
/deep/ .el-input--mini .el-input__inner { ::v-deep .el-input--mini .el-input__inner {
width: 2px; width: 2px;
border: none; border: none;
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
> >
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="form.patternWords" placeholder="搜索关键词" style="width:300px"> <el-input v-model="form.patternWords" placeholder="搜索关键词" style="width: 300px">
<el-button slot="prepend" icon="el-icon-search" @click="getSettingList"></el-button> <el-button slot="prepend" icon="el-icon-search" @click="getSettingList"></el-button>
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<div class="sub-title">匹配词间用逗号隔开</div> <div class="sub-title">匹配词间用逗号隔开</div>
</el-form-item> </el-form-item>
<el-form-item label="审计范围" :required="true" :error="rangeErrorMsg"> <el-form-item label="审计范围" :required="true" :error="rangeErrorMsg">
<div class="tag-input" style="width:auto;" @click="openAuditUserRange"> <div class="tag-input" style="width: auto" @click="openAuditUserRange">
<span class="tag-place" v-if="!auditUserRange.length" <span class="tag-place" v-if="!auditUserRange.length"
>请选择<span class="prompt-title">若不选择,则默认全体成员</span></span >请选择<span class="prompt-title">若不选择,则默认全体成员</span></span
> >
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="审计人" :required="true" :error="errorMsg"> <el-form-item label="审计人" :required="true" :error="errorMsg">
<div class="tag-input" style="width:auto;" @click="openAuditUser"> <div class="tag-input" style="width: auto" @click="openAuditUser">
<span class="tag-place" v-if="!auditUser.length" <span class="tag-place" v-if="!auditUser.length"
>请选择<span class="prompt-title">请选择部门负责人</span></span >请选择<span class="prompt-title">请选择部门负责人</span></span
> >
...@@ -302,7 +302,7 @@ export default { ...@@ -302,7 +302,7 @@ export default {
background: #efefef; background: #efefef;
padding: 18px 10px 0 10px; padding: 18px 10px 0 10px;
} }
/deep/ .add-btn { ::v-deep .add-btn {
margin-right: 10px; margin-right: 10px;
} }
.content { .content {
......
...@@ -149,7 +149,7 @@ export default { ...@@ -149,7 +149,7 @@ export default {
</template> </template>
<div v-else class="timeline-time-wrap"> <div v-else class="timeline-time-wrap">
<ul class="infinite-list" v-infinite-scroll="getList" style="overflow:auto"> <ul class="infinite-list" v-infinite-scroll="getList" style="overflow: auto">
<template v-if="list.length"> <template v-if="list.length">
<li v-for="(unit, i) in list" class="infinite-list-item" :key="i"> <li v-for="(unit, i) in list" class="infinite-list-item" :key="i">
<div class="timeline-time">{{ dateFormat(unit[0].trackTime, 'yyyy-MM-dd w') }}</div> <div class="timeline-time">{{ dateFormat(unit[0].trackTime, 'yyyy-MM-dd w') }}</div>
...@@ -188,13 +188,13 @@ export default { ...@@ -188,13 +188,13 @@ export default {
color: #999999; color: #999999;
line-height: 48px; line-height: 48px;
} }
.el-timeline > .timeline-box-item:first-child /deep/ .el-timeline-item__node { .el-timeline > .timeline-box-item:first-child ::v-deep .el-timeline-item__node {
border-radius: 0 !important; border-radius: 0 !important;
} }
.timeline-box { .timeline-box {
padding-left: 70px; padding-left: 70px;
&-item { &-item {
/deep/ .el-timeline-item__timestamp { ::v-deep .el-timeline-item__timestamp {
position: absolute; position: absolute;
top: 4px; top: 4px;
left: -45px; left: -45px;
...@@ -208,7 +208,7 @@ export default { ...@@ -208,7 +208,7 @@ export default {
} }
} }
/deep/ .el-timeline-item__tail { ::v-deep .el-timeline-item__tail {
border-left-color: #3c88f0; border-left-color: #3c88f0;
} }
</style> </style>
...@@ -86,8 +86,8 @@ export default { ...@@ -86,8 +86,8 @@ export default {
<template> <template>
<div> <div>
<!-- <el-button slot="append" circle icon="el-icon-back" @click="$router.back()"></el-button>返回 --> <!-- <el-button slot="append" circle icon="el-icon-back" @click="$router.back()"></el-button>返回 -->
<div class=" flex aic mb20" @click="goRoute(customer)"> <div class="flex aic mb20" @click="goRoute(customer)">
<el-image style="width: 80px; height: 80px;" :src="customer.avatar" fit="fit"></el-image> <el-image style="width: 80px; height: 80px" :src="customer.avatar" fit="fit"></el-image>
<div class="ml10"> <div class="ml10">
<div> <div>
{{ customer.customerName + (customer.corpName ? '-' + customer.corpName : '') }} {{ customer.customerName + (customer.corpName ? '-' + customer.corpName : '') }}
...@@ -102,14 +102,12 @@ export default { ...@@ -102,14 +102,12 @@ export default {
{{ unit }} {{ unit }}
</el-tag> </el-tag>
</template> </template>
<div v-else> <div v-else>暂无标签</div>
暂无标签
</div>
</div> </div>
</div> </div>
</div> </div>
<el-card shadow="never" style="background-color: transparent;border:none;"> <el-card shadow="never" style="background-color: transparent; border: none">
<div slot="header" class="card-title">社交关系</div> <div slot="header" class="card-title">社交关系</div>
<el-tabs value="1"> <el-tabs value="1">
<el-tab-pane <el-tab-pane
...@@ -177,7 +175,7 @@ export default { ...@@ -177,7 +175,7 @@ export default {
} }
.el-card { .el-card {
/deep/.el-card__header { ::v-deep.el-card__header {
border: 0; border: 0;
} }
} }
......
...@@ -30,7 +30,7 @@ export default { ...@@ -30,7 +30,7 @@ export default {
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.el-tabs__header { ::v-deep.el-tabs__header {
margin-bottom: 0; margin-bottom: 0;
} }
</style> </style>
...@@ -121,9 +121,7 @@ export default { ...@@ -121,9 +121,7 @@ export default {
class="image-uploader" class="image-uploader"
@update:file="handleUploadedHeadImage" @update:file="handleUploadedHeadImage"
> >
<div slot="tip"> <div slot="tip">注: 只支持2M以内的jpg/png格式图片</div>
注: 只支持2M以内的jpg/png格式图片
</div>
</upload> </upload>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -156,9 +154,7 @@ export default { ...@@ -156,9 +154,7 @@ export default {
<el-col v-show="form.showTip === 1" :sm="24" :md="12"> <el-col v-show="form.showTip === 1" :sm="24" :md="12">
<el-form-item label="客服二维码"> <el-form-item label="客服二维码">
<upload :fileUrl.sync="form.customerServerQrCode" class="image-uploader"> <upload :fileUrl.sync="form.customerServerQrCode" class="image-uploader">
<div slot="tip"> <div slot="tip">注: 只支持2M以内的jpg/png格式图片</div>
注: 只支持2M以内的jpg/png格式图片
</div>
</upload> </upload>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -180,17 +176,13 @@ export default { ...@@ -180,17 +176,13 @@ export default {
<template v-if="form.activityName"> <template v-if="form.activityName">
{{ form.activityName }} {{ form.activityName }}
</template> </template>
<template v-else> <template v-else> 活码名称 </template>
活码名称
</template>
</div> </div>
<div class="preview-guide"> <div class="preview-guide">
<template v-if="form.guide"> <template v-if="form.guide">
{{ form.guide }} {{ form.guide }}
</template> </template>
<template v-else> <template v-else> 这是加群引导语 </template>
这是加群引导语
</template>
</div> </div>
<div class="preview-code-box"> <div class="preview-code-box">
<div class="code-box-title"> <div class="code-box-title">
...@@ -214,7 +206,7 @@ export default { ...@@ -214,7 +206,7 @@ export default {
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
/deep/ .image-uploader { ::v-deep .image-uploader {
.uploader-icon { .uploader-icon {
width: 80px; width: 80px;
height: 80px; height: 80px;
......
...@@ -248,9 +248,7 @@ export default { ...@@ -248,9 +248,7 @@ export default {
<div> <div>
<div class="mid-action"> <div class="mid-action">
<div> <div>
<el-button type="primary" @click="dialog = true"> <el-button type="primary" @click="dialog = true"> 新建实际群码 </el-button>
新建实际群码
</el-button>
<el-select v-model="query.status" class="ml10" @change="getRealCodes"> <el-select v-model="query.status" class="ml10" @change="getRealCodes">
<el-option <el-option
v-for="option in statusOptions" v-for="option in statusOptions"
...@@ -311,14 +309,10 @@ export default { ...@@ -311,14 +309,10 @@ export default {
</el-form-item> </el-form-item>
<el-form-item label="实际群码" prop="actualGroupQrCode"> <el-form-item label="实际群码" prop="actualGroupQrCode">
<upload :fileUrl.sync="form.actualGroupQrCode" class="image-uploader"> <upload :fileUrl.sync="form.actualGroupQrCode" class="image-uploader">
<div slot="tip"> <div slot="tip">注: 只支持2M以内的jpg/png格式图片</div>
注: 只支持2M以内的jpg/png格式图片
</div>
</upload> </upload>
<div> <div>
<el-button type="text" @click="exampleDialog = true"> <el-button type="text" @click="exampleDialog = true"> 查看示例 </el-button>
查看示例
</el-button>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="有效期" prop="effectTime"> <el-form-item label="有效期" prop="effectTime">
...@@ -337,9 +331,7 @@ export default { ...@@ -337,9 +331,7 @@ export default {
placeholder="请输入次数" placeholder="请输入次数"
type="Number" type="Number"
></el-input> ></el-input>
<div class="tip"> <div class="tip">注: 不超过190</div>
注: 不超过190
</div>
</el-form-item> </el-form-item>
<el-form-item label="客户群"> <el-form-item label="客户群">
<template v-if="form.chatId"> <template v-if="form.chatId">
...@@ -348,13 +340,9 @@ export default { ...@@ -348,13 +340,9 @@ export default {
</el-button> </el-button>
</template> </template>
<template v-else> <template v-else>
<el-button icon="el-icon-plus" @click="customerDialog = true"> <el-button icon="el-icon-plus" @click="customerDialog = true"> 选择客户群 </el-button>
选择客户群
</el-button>
</template> </template>
<div class="tip"> <div class="tip">注: 主要用于老客标签建群</div>
注: 主要用于老客标签建群
</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -374,9 +362,7 @@ export default { ...@@ -374,9 +362,7 @@ export default {
<el-dialog :visible.sync="exampleDialog" append-to-body width="250px"> <el-dialog :visible.sync="exampleDialog" append-to-body width="250px">
<div class="example-code-box"> <div class="example-code-box">
<div class="example-text"> <div class="example-text">如图所示为标准的微信群二维码:</div>
如图所示为标准的微信群二维码:
</div>
<div class="code-box-title"> <div class="code-box-title">
<svg-icon icon-class="user" class="code-user"></svg-icon> <svg-icon icon-class="user" class="code-user"></svg-icon>
实际群名称 实际群名称
...@@ -412,7 +398,7 @@ export default { ...@@ -412,7 +398,7 @@ export default {
width: 50px; width: 50px;
height: 50px; height: 50px;
} }
/deep/ .image-uploader { ::v-deep .image-uploader {
.uploader-icon { .uploader-icon {
width: 80px; width: 80px;
height: 80px; height: 80px;
......
...@@ -42,21 +42,21 @@ ...@@ -42,21 +42,21 @@
<img :src="codeUrl" @click="getCode" class="login-code-img" /> <img :src="codeUrl" @click="getCode" class="login-code-img" />
</div> </div>
</el-form-item> </el-form-item>
<el-checkbox class="fr" v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;" <el-checkbox class="fr" v-model="loginForm.rememberMe" style="margin: 0px 0px 25px 0px"
>记住密码</el-checkbox >记住密码</el-checkbox
> >
<el-checkbox <el-checkbox
v-model="isDemonstrationLogin" v-model="isDemonstrationLogin"
@change="changeDemonAccount" @change="changeDemonAccount"
style="margin:0px 0px 25px 0px;" style="margin: 0px 0px 25px 0px"
>演示账号登录</el-checkbox >演示账号登录</el-checkbox
> >
<el-form-item style="width:100%;"> <el-form-item style="width: 100%">
<el-button <el-button
:loading="loading" :loading="loading"
size="medium" size="medium"
type="primary" type="primary"
style="width:100%;" style="width: 100%"
@click.native.prevent="handleLogin" @click.native.prevent="handleLogin"
> >
<span v-if="!loading">登 录</span> <span v-if="!loading">登 录</span>
...@@ -145,7 +145,7 @@ export default { ...@@ -145,7 +145,7 @@ export default {
}, },
watch: { watch: {
$route: { $route: {
handler: function(route) { handler: function (route) {
this.redirect = route.query && route.query.redirect this.redirect = route.query && route.query.redirect
}, },
immediate: true immediate: true
...@@ -296,7 +296,7 @@ export default { ...@@ -296,7 +296,7 @@ export default {
.login-code-img { .login-code-img {
height: 38px; height: 38px;
} }
.login /deep/.el-dialog { .login ::v-deep.el-dialog {
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!